@rizom/brain 0.2.0-alpha.98 → 0.2.0-alpha.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brain.js +623 -621
- package/dist/entities.d.ts +47 -0
- package/dist/entities.js +14 -14
- package/dist/entities.js.map +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +53 -53
- package/dist/plugins.d.ts +47 -0
- package/dist/plugins.js +17 -17
- package/dist/plugins.js.map +3 -3
- package/dist/services.js +15 -15
- package/dist/services.js.map +3 -3
- package/dist/site.js +92 -92
- package/dist/site.js.map +4 -4
- package/package.json +1 -1
package/dist/services.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var $X=Object.create;var{getPrototypeOf:GX,defineProperty:p5,getOwnPropertyNames:JX}=Object;var XX=Object.prototype.hasOwnProperty;function qX($){return this[$]}var YX,VX,x4=($,G,J)=>{var X=$!=null&&typeof $==="object";if(X){var q=G?YX??=new WeakMap:VX??=new WeakMap,V=q.get($);if(V)return V}J=$!=null?$X(GX($)):{};let Y=G||!$||!$.__esModule?p5(J,"default",{value:$,enumerable:!0}):J;for(let W of JX($))if(!XX.call(Y,W))p5(Y,W,{get:qX.bind($,W),enumerable:!0});if(X)q.set($,Y);return Y};var m=($,G)=>()=>(G||$((G={exports:{}}).exports,G),G.exports);var WX=($)=>$;function HX($,G){this[$]=WX.bind(null,G)}var m9=($,G)=>{for(var J in G)p5($,J,{get:G[J],enumerable:!0,configurable:!0,set:HX.bind(G,J)})};var D0=import.meta.require;var J4=m((
|
|
2
|
+
var $X=Object.create;var{getPrototypeOf:GX,defineProperty:p5,getOwnPropertyNames:JX}=Object;var XX=Object.prototype.hasOwnProperty;function qX($){return this[$]}var YX,VX,x4=($,G,J)=>{var X=$!=null&&typeof $==="object";if(X){var q=G?YX??=new WeakMap:VX??=new WeakMap,V=q.get($);if(V)return V}J=$!=null?$X(GX($)):{};let Y=G||!$||!$.__esModule?p5(J,"default",{value:$,enumerable:!0}):J;for(let W of JX($))if(!XX.call(Y,W))p5(Y,W,{get:qX.bind($,W),enumerable:!0});if(X)q.set($,Y);return Y};var m=($,G)=>()=>(G||$((G={exports:{}}).exports,G),G.exports);var WX=($)=>$;function HX($,G){this[$]=WX.bind(null,G)}var m9=($,G)=>{for(var J in G)p5($,J,{get:G[J],enumerable:!0,configurable:!0,set:HX.bind(G,J)})};var D0=import.meta.require;var J4=m((DR,g8)=>{var wX=Object.prototype.toString;g8.exports=function(G){if(G===void 0)return"undefined";if(G===null)return"null";var J=typeof G;if(J==="boolean")return"boolean";if(J==="string")return"string";if(J==="number")return"number";if(J==="symbol")return"symbol";if(J==="function")return PX(G)?"generatorfunction":"function";if(jX(G))return"array";if(IX(G))return"buffer";if(TX(G))return"arguments";if(ZX(G))return"date";if(NX(G))return"error";if(_X(G))return"regexp";switch(k8(G)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(LX(G))return"generator";switch(J=wX.call(G),J){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return J.slice(8,-1).toLowerCase().replace(/\s/g,"")};function k8($){return typeof $.constructor==="function"?$.constructor.name:null}function jX($){if(Array.isArray)return Array.isArray($);return $ instanceof Array}function NX($){return $ instanceof Error||typeof $.message==="string"&&$.constructor&&typeof $.constructor.stackTraceLimit==="number"}function ZX($){if($ instanceof Date)return!0;return typeof $.toDateString==="function"&&typeof $.getDate==="function"&&typeof $.setDate==="function"}function _X($){if($ instanceof RegExp)return!0;return typeof $.flags==="string"&&typeof $.ignoreCase==="boolean"&&typeof $.multiline==="boolean"&&typeof $.global==="boolean"}function PX($,G){return k8($)==="GeneratorFunction"}function LX($){return typeof $.throw==="function"&&typeof $.return==="function"&&typeof $.next==="function"}function TX($){try{if(typeof $.length==="number"&&typeof $.callee==="function")return!0}catch(G){if(G.message.indexOf("callee")!==-1)return!0}return!1}function IX($){if($.constructor&&typeof $.constructor.isBuffer==="function")return $.constructor.isBuffer($);return!1}});var y8=m((KR,h8)=>{/*!
|
|
3
3
|
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2015, Jon Schlinkert.
|
|
6
6
|
* Licensed under the MIT License.
|
|
7
|
-
*/h8.exports=function(G){return typeof G<"u"&&G!==null&&(typeof G==="object"||typeof G==="function")}});var u8=m((
|
|
7
|
+
*/h8.exports=function(G){return typeof G<"u"&&G!==null&&(typeof G==="object"||typeof G==="function")}});var u8=m((FR,f8)=>{var m8=y8();f8.exports=function(G){if(!m8(G))G={};var J=arguments.length;for(var X=1;X<J;X++){var q=arguments[X];if(m8(q))EX(G,q)}return G};function EX($,G){for(var J in G)if(CX(G,J))$[J]=G[J]}function CX($,G){return Object.prototype.hasOwnProperty.call($,G)}});var r8=m((RR,l8)=>{var SX=J4(),bX=u8();l8.exports=function($,G){if(typeof G==="function")G={parse:G};var J=vX($),X={section_delimiter:"---",parse:gX},q=bX({},X,G),V=q.section_delimiter,Y=J.content.split(/\r?\n/),W=null,H=p8(),U=[],M=[];function Q(_){J.content=_,W=[],U=[]}function F(_){if(M.length)H.key=kX(M[0],V),H.content=_,q.parse(H,W),W.push(H),H=p8(),U=[],M=[]}for(var K=0;K<Y.length;K++){var j=Y[K],N=M.length,P=j.trim();if(xX(P,V)){if(P.length===3&&K!==0){if(N===0||N===2){U.push(j);continue}M.push(P),H.data=U.join(`
|
|
8
8
|
`),U=[];continue}if(W===null)Q(U.join(`
|
|
9
9
|
`));if(N===2)F(U.join(`
|
|
10
10
|
`));M.push(P);continue}U.push(j)}if(W===null)Q(U.join(`
|
|
11
11
|
`));else F(U.join(`
|
|
12
|
-
`));return J.sections=W,J};function xX($,G){if($.slice(0,G.length)!==G)return!1;if($.charAt(G.length+1)===G.slice(-1))return!1;return!0}function vX($){if(SX($)!=="object")$={content:$};if(typeof $.content!=="string"&&!hX($.content))throw TypeError("expected a buffer or string");return $.content=$.content.toString(),$.sections=[],$}function kX($,G){return $?$.slice(G.length).trim():""}function p8(){return{key:"",data:"",content:""}}function gX($){return $}function hX($){if($&&$.constructor&&typeof $.constructor.isBuffer==="function")return $.constructor.isBuffer($);return!1}});var p0=m((lX,u0)=>{function d8($){return typeof $>"u"||$===null}function yX($){return typeof $==="object"&&$!==null}function mX($){if(Array.isArray($))return $;else if(d8($))return[];return[$]}function fX($,G){var J,X,q,V;if(G){V=Object.keys(G);for(J=0,X=V.length;J<X;J+=1)q=V[J],$[q]=G[q]}return $}function uX($,G){var J="",X;for(X=0;X<G;X+=1)J+=$;return J}function pX($){return $===0&&Number.NEGATIVE_INFINITY===1/$}lX.isNothing=d8;lX.isObject=yX;lX.toArray=mX;lX.repeat=uX;lX.isNegativeZero=pX;lX.extend=fX});var z2=m((
|
|
12
|
+
`));return J.sections=W,J};function xX($,G){if($.slice(0,G.length)!==G)return!1;if($.charAt(G.length+1)===G.slice(-1))return!1;return!0}function vX($){if(SX($)!=="object")$={content:$};if(typeof $.content!=="string"&&!hX($.content))throw TypeError("expected a buffer or string");return $.content=$.content.toString(),$.sections=[],$}function kX($,G){return $?$.slice(G.length).trim():""}function p8(){return{key:"",data:"",content:""}}function gX($){return $}function hX($){if($&&$.constructor&&typeof $.constructor.isBuffer==="function")return $.constructor.isBuffer($);return!1}});var p0=m((lX,u0)=>{function d8($){return typeof $>"u"||$===null}function yX($){return typeof $==="object"&&$!==null}function mX($){if(Array.isArray($))return $;else if(d8($))return[];return[$]}function fX($,G){var J,X,q,V;if(G){V=Object.keys(G);for(J=0,X=V.length;J<X;J+=1)q=V[J],$[q]=G[q]}return $}function uX($,G){var J="",X;for(X=0;X<G;X+=1)J+=$;return J}function pX($){return $===0&&Number.NEGATIVE_INFINITY===1/$}lX.isNothing=d8;lX.isObject=yX;lX.toArray=mX;lX.repeat=uX;lX.isNegativeZero=pX;lX.extend=fX});var z2=m((BR,c8)=>{function X4($,G){if(Error.call(this),this.name="YAMLException",this.reason=$,this.mark=G,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}X4.prototype=Object.create(Error.prototype);X4.prototype.constructor=X4;X4.prototype.toString=function(G){var J=this.name+": ";if(J+=this.reason||"(unknown reason)",!G&&this.mark)J+=" "+this.mark.toString();return J};c8.exports=X4});var n8=m((OR,o8)=>{var i8=p0();function $6($,G,J,X,q){this.name=$,this.buffer=G,this.position=J,this.line=X,this.column=q}$6.prototype.getSnippet=function(G,J){var X,q,V,Y,W;if(!this.buffer)return null;G=G||4,J=J||75,X="",q=this.position;while(q>0&&`\x00\r
|
|
13
13
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(q-1))===-1)if(q-=1,this.position-q>J/2-1){X=" ... ",q+=5;break}V="",Y=this.position;while(Y<this.buffer.length&&`\x00\r
|
|
14
14
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(Y))===-1)if(Y+=1,Y-this.position>J/2-1){V=" ... ",Y-=5;break}return W=this.buffer.slice(q,Y),i8.repeat(" ",G)+X+W+V+`
|
|
15
15
|
`+i8.repeat(" ",G+this.position-q+X.length)+"^"};$6.prototype.toString=function(G){var J,X="";if(this.name)X+='in "'+this.name+'" ';if(X+="at line "+(this.line+1)+", column "+(this.column+1),!G){if(J=this.getSnippet(),J)X+=`:
|
|
16
|
-
`+J}return X};o8.exports=$6});var F1=m((
|
|
17
|
-
\r`;function yq($){if($===null)return!1;var G,J,X=0,q=$.length,V=Y6;for(J=0;J<q;J++){if(G=V.indexOf($.charAt(J)),G>64)continue;if(G<0)return!1;X+=6}return X%8===0}function mq($){var G,J,X=$.replace(/[\r\n=]/g,""),q=X.length,V=Y6,Y=0,W=[];for(G=0;G<q;G++){if(G%4===0&&G)W.push(Y>>16&255),W.push(Y>>8&255),W.push(Y&255);Y=Y<<6|V.indexOf(X.charAt(G))}if(J=q%4*6,J===0)W.push(Y>>16&255),W.push(Y>>8&255),W.push(Y&255);else if(J===18)W.push(Y>>10&255),W.push(Y>>2&255);else if(J===12)W.push(Y>>4&255);if(r0)return r0.from?r0.from(W):new r0(W);return W}function fq($){var G="",J=0,X,q,V=$.length,Y=Y6;for(X=0;X<V;X++){if(X%3===0&&X)G+=Y[J>>18&63],G+=Y[J>>12&63],G+=Y[J>>6&63],G+=Y[J&63];J=(J<<8)+$[X]}if(q=V%3,q===0)G+=Y[J>>18&63],G+=Y[J>>12&63],G+=Y[J>>6&63],G+=Y[J&63];else if(q===2)G+=Y[J>>10&63],G+=Y[J>>4&63],G+=Y[J<<2&63],G+=Y[64];else if(q===1)G+=Y[J>>2&63],G+=Y[J<<4&63],G+=Y[64],G+=Y[64];return G}function uq($){return r0&&r0.isBuffer($)}_7.exports=new hq("tag:yaml.org,2002:binary",{kind:"scalar",resolve:yq,construct:mq,predicate:uq,represent:fq})});var T7=m((
|
|
16
|
+
`+J}return X};o8.exports=$6});var F1=m((AR,s8)=>{var a8=z2(),aX=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],sX=["scalar","sequence","mapping"];function tX($){var G={};if($!==null)Object.keys($).forEach(function(J){$[J].forEach(function(X){G[String(X)]=J})});return G}function eX($,G){if(G=G||{},Object.keys(G).forEach(function(J){if(aX.indexOf(J)===-1)throw new a8('Unknown option "'+J+'" is met in definition of "'+$+'" YAML type.')}),this.tag=$,this.kind=G.kind||null,this.resolve=G.resolve||function(){return!0},this.construct=G.construct||function(J){return J},this.instanceOf=G.instanceOf||null,this.predicate=G.predicate||null,this.represent=G.represent||null,this.defaultStyle=G.defaultStyle||null,this.styleAliases=tX(G.styleAliases||null),sX.indexOf(this.kind)===-1)throw new a8('Unknown kind "'+this.kind+'" is specified for "'+$+'" YAML type.')}s8.exports=eX});var l0=m((wR,e8)=>{var t8=p0(),r4=z2(),$q=F1();function G6($,G,J){var X=[];return $.include.forEach(function(q){J=G6(q,G,J)}),$[G].forEach(function(q){J.forEach(function(V,Y){if(V.tag===q.tag&&V.kind===q.kind)X.push(Y)}),J.push(q)}),J.filter(function(q,V){return X.indexOf(V)===-1})}function Gq(){var $={scalar:{},sequence:{},mapping:{},fallback:{}},G,J;function X(q){$[q.kind][q.tag]=$.fallback[q.tag]=q}for(G=0,J=arguments.length;G<J;G+=1)arguments[G].forEach(X);return $}function Q2($){this.include=$.include||[],this.implicit=$.implicit||[],this.explicit=$.explicit||[],this.implicit.forEach(function(G){if(G.loadKind&&G.loadKind!=="scalar")throw new r4("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=G6(this,"implicit",[]),this.compiledExplicit=G6(this,"explicit",[]),this.compiledTypeMap=Gq(this.compiledImplicit,this.compiledExplicit)}Q2.DEFAULT=null;Q2.create=function(){var G,J;switch(arguments.length){case 1:G=Q2.DEFAULT,J=arguments[0];break;case 2:G=arguments[0],J=arguments[1];break;default:throw new r4("Wrong number of arguments for Schema.create function")}if(G=t8.toArray(G),J=t8.toArray(J),!G.every(function(X){return X instanceof Q2}))throw new r4("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!J.every(function(X){return X instanceof $q}))throw new r4("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Q2({include:G,explicit:J})};e8.exports=Q2});var G7=m((jR,$7)=>{var Jq=F1();$7.exports=new Jq("tag:yaml.org,2002:str",{kind:"scalar",construct:function($){return $!==null?$:""}})});var X7=m((NR,J7)=>{var Xq=F1();J7.exports=new Xq("tag:yaml.org,2002:seq",{kind:"sequence",construct:function($){return $!==null?$:[]}})});var Y7=m((ZR,q7)=>{var qq=F1();q7.exports=new qq("tag:yaml.org,2002:map",{kind:"mapping",construct:function($){return $!==null?$:{}}})});var d4=m((_R,V7)=>{var Yq=l0();V7.exports=new Yq({explicit:[G7(),X7(),Y7()]})});var H7=m((PR,W7)=>{var Vq=F1();function Wq($){if($===null)return!0;var G=$.length;return G===1&&$==="~"||G===4&&($==="null"||$==="Null"||$==="NULL")}function Hq(){return null}function Uq($){return $===null}W7.exports=new Vq("tag:yaml.org,2002:null",{kind:"scalar",resolve:Wq,construct:Hq,predicate:Uq,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var M7=m((LR,U7)=>{var Mq=F1();function zq($){if($===null)return!1;var G=$.length;return G===4&&($==="true"||$==="True"||$==="TRUE")||G===5&&($==="false"||$==="False"||$==="FALSE")}function Qq($){return $==="true"||$==="True"||$==="TRUE"}function Dq($){return Object.prototype.toString.call($)==="[object Boolean]"}U7.exports=new Mq("tag:yaml.org,2002:bool",{kind:"scalar",resolve:zq,construct:Qq,predicate:Dq,represent:{lowercase:function($){return $?"true":"false"},uppercase:function($){return $?"TRUE":"FALSE"},camelcase:function($){return $?"True":"False"}},defaultStyle:"lowercase"})});var Q7=m((TR,z7)=>{var Kq=p0(),Fq=F1();function Rq($){return 48<=$&&$<=57||65<=$&&$<=70||97<=$&&$<=102}function Bq($){return 48<=$&&$<=55}function Oq($){return 48<=$&&$<=57}function Aq($){if($===null)return!1;var G=$.length,J=0,X=!1,q;if(!G)return!1;if(q=$[J],q==="-"||q==="+")q=$[++J];if(q==="0"){if(J+1===G)return!0;if(q=$[++J],q==="b"){J++;for(;J<G;J++){if(q=$[J],q==="_")continue;if(q!=="0"&&q!=="1")return!1;X=!0}return X&&q!=="_"}if(q==="x"){J++;for(;J<G;J++){if(q=$[J],q==="_")continue;if(!Rq($.charCodeAt(J)))return!1;X=!0}return X&&q!=="_"}for(;J<G;J++){if(q=$[J],q==="_")continue;if(!Bq($.charCodeAt(J)))return!1;X=!0}return X&&q!=="_"}if(q==="_")return!1;for(;J<G;J++){if(q=$[J],q==="_")continue;if(q===":")break;if(!Oq($.charCodeAt(J)))return!1;X=!0}if(!X||q==="_")return!1;if(q!==":")return!0;return/^(:[0-5]?[0-9])+$/.test($.slice(J))}function wq($){var G=$,J=1,X,q,V=[];if(G.indexOf("_")!==-1)G=G.replace(/_/g,"");if(X=G[0],X==="-"||X==="+"){if(X==="-")J=-1;G=G.slice(1),X=G[0]}if(G==="0")return 0;if(X==="0"){if(G[1]==="b")return J*parseInt(G.slice(2),2);if(G[1]==="x")return J*parseInt(G,16);return J*parseInt(G,8)}if(G.indexOf(":")!==-1)return G.split(":").forEach(function(Y){V.unshift(parseInt(Y,10))}),G=0,q=1,V.forEach(function(Y){G+=Y*q,q*=60}),J*G;return J*parseInt(G,10)}function jq($){return Object.prototype.toString.call($)==="[object Number]"&&($%1===0&&!Kq.isNegativeZero($))}z7.exports=new Fq("tag:yaml.org,2002:int",{kind:"scalar",resolve:Aq,construct:wq,predicate:jq,represent:{binary:function($){return $>=0?"0b"+$.toString(2):"-0b"+$.toString(2).slice(1)},octal:function($){return $>=0?"0"+$.toString(8):"-0"+$.toString(8).slice(1)},decimal:function($){return $.toString(10)},hexadecimal:function($){return $>=0?"0x"+$.toString(16).toUpperCase():"-0x"+$.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var F7=m((IR,K7)=>{var D7=p0(),Nq=F1(),Zq=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function _q($){if($===null)return!1;if(!Zq.test($)||$[$.length-1]==="_")return!1;return!0}function Pq($){var G,J,X,q;if(G=$.replace(/_/g,"").toLowerCase(),J=G[0]==="-"?-1:1,q=[],"+-".indexOf(G[0])>=0)G=G.slice(1);if(G===".inf")return J===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(G===".nan")return NaN;else if(G.indexOf(":")>=0)return G.split(":").forEach(function(V){q.unshift(parseFloat(V,10))}),G=0,X=1,q.forEach(function(V){G+=V*X,X*=60}),J*G;return J*parseFloat(G,10)}var Lq=/^[-+]?[0-9]+e/;function Tq($,G){var J;if(isNaN($))switch(G){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===$)switch(G){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===$)switch(G){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(D7.isNegativeZero($))return"-0.0";return J=$.toString(10),Lq.test(J)?J.replace("e",".e"):J}function Iq($){return Object.prototype.toString.call($)==="[object Number]"&&($%1!==0||D7.isNegativeZero($))}K7.exports=new Nq("tag:yaml.org,2002:float",{kind:"scalar",resolve:_q,construct:Pq,predicate:Iq,represent:Tq,defaultStyle:"lowercase"})});var J6=m((ER,R7)=>{var Eq=l0();R7.exports=new Eq({include:[d4()],implicit:[H7(),M7(),Q7(),F7()]})});var X6=m((CR,B7)=>{var Cq=l0();B7.exports=new Cq({include:[J6()]})});var j7=m((SR,w7)=>{var Sq=F1(),O7=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),A7=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function bq($){if($===null)return!1;if(O7.exec($)!==null)return!0;if(A7.exec($)!==null)return!0;return!1}function xq($){var G,J,X,q,V,Y,W,H=0,U=null,M,Q,F;if(G=O7.exec($),G===null)G=A7.exec($);if(G===null)throw Error("Date resolve error");if(J=+G[1],X=+G[2]-1,q=+G[3],!G[4])return new Date(Date.UTC(J,X,q));if(V=+G[4],Y=+G[5],W=+G[6],G[7]){H=G[7].slice(0,3);while(H.length<3)H+="0";H=+H}if(G[9]){if(M=+G[10],Q=+(G[11]||0),U=(M*60+Q)*60000,G[9]==="-")U=-U}if(F=new Date(Date.UTC(J,X,q,V,Y,W,H)),U)F.setTime(F.getTime()-U);return F}function vq($){return $.toISOString()}w7.exports=new Sq("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:bq,construct:xq,instanceOf:Date,represent:vq})});var Z7=m((bR,N7)=>{var kq=F1();function gq($){return $==="<<"||$===null}N7.exports=new kq("tag:yaml.org,2002:merge",{kind:"scalar",resolve:gq})});var P7=m((xR,_7)=>{var r0;try{q6=D0,r0=q6("buffer").Buffer}catch($){}var q6,hq=F1(),Y6=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
17
|
+
\r`;function yq($){if($===null)return!1;var G,J,X=0,q=$.length,V=Y6;for(J=0;J<q;J++){if(G=V.indexOf($.charAt(J)),G>64)continue;if(G<0)return!1;X+=6}return X%8===0}function mq($){var G,J,X=$.replace(/[\r\n=]/g,""),q=X.length,V=Y6,Y=0,W=[];for(G=0;G<q;G++){if(G%4===0&&G)W.push(Y>>16&255),W.push(Y>>8&255),W.push(Y&255);Y=Y<<6|V.indexOf(X.charAt(G))}if(J=q%4*6,J===0)W.push(Y>>16&255),W.push(Y>>8&255),W.push(Y&255);else if(J===18)W.push(Y>>10&255),W.push(Y>>2&255);else if(J===12)W.push(Y>>4&255);if(r0)return r0.from?r0.from(W):new r0(W);return W}function fq($){var G="",J=0,X,q,V=$.length,Y=Y6;for(X=0;X<V;X++){if(X%3===0&&X)G+=Y[J>>18&63],G+=Y[J>>12&63],G+=Y[J>>6&63],G+=Y[J&63];J=(J<<8)+$[X]}if(q=V%3,q===0)G+=Y[J>>18&63],G+=Y[J>>12&63],G+=Y[J>>6&63],G+=Y[J&63];else if(q===2)G+=Y[J>>10&63],G+=Y[J>>4&63],G+=Y[J<<2&63],G+=Y[64];else if(q===1)G+=Y[J>>2&63],G+=Y[J<<4&63],G+=Y[64],G+=Y[64];return G}function uq($){return r0&&r0.isBuffer($)}_7.exports=new hq("tag:yaml.org,2002:binary",{kind:"scalar",resolve:yq,construct:mq,predicate:uq,represent:fq})});var T7=m((kR,L7)=>{var pq=F1(),lq=Object.prototype.hasOwnProperty,rq=Object.prototype.toString;function dq($){if($===null)return!0;var G=[],J,X,q,V,Y,W=$;for(J=0,X=W.length;J<X;J+=1){if(q=W[J],Y=!1,rq.call(q)!=="[object Object]")return!1;for(V in q)if(lq.call(q,V))if(!Y)Y=!0;else return!1;if(!Y)return!1;if(G.indexOf(V)===-1)G.push(V);else return!1}return!0}function cq($){return $!==null?$:[]}L7.exports=new pq("tag:yaml.org,2002:omap",{kind:"sequence",resolve:dq,construct:cq})});var E7=m((gR,I7)=>{var iq=F1(),oq=Object.prototype.toString;function nq($){if($===null)return!0;var G,J,X,q,V,Y=$;V=Array(Y.length);for(G=0,J=Y.length;G<J;G+=1){if(X=Y[G],oq.call(X)!=="[object Object]")return!1;if(q=Object.keys(X),q.length!==1)return!1;V[G]=[q[0],X[q[0]]]}return!0}function aq($){if($===null)return[];var G,J,X,q,V,Y=$;V=Array(Y.length);for(G=0,J=Y.length;G<J;G+=1)X=Y[G],q=Object.keys(X),V[G]=[q[0],X[q[0]]];return V}I7.exports=new iq("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:nq,construct:aq})});var S7=m((hR,C7)=>{var sq=F1(),tq=Object.prototype.hasOwnProperty;function eq($){if($===null)return!0;var G,J=$;for(G in J)if(tq.call(J,G)){if(J[G]!==null)return!1}return!0}function $Y($){return $!==null?$:{}}C7.exports=new sq("tag:yaml.org,2002:set",{kind:"mapping",resolve:eq,construct:$Y})});var D2=m((yR,b7)=>{var GY=l0();b7.exports=new GY({include:[X6()],implicit:[j7(),Z7()],explicit:[P7(),T7(),E7(),S7()]})});var v7=m((mR,x7)=>{var JY=F1();function XY(){return!0}function qY(){return}function YY(){return""}function VY($){return typeof $>"u"}x7.exports=new JY("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:XY,construct:qY,predicate:VY,represent:YY})});var g7=m((fR,k7)=>{var WY=F1();function HY($){if($===null)return!1;if($.length===0)return!1;var G=$,J=/\/([gim]*)$/.exec($),X="";if(G[0]==="/"){if(J)X=J[1];if(X.length>3)return!1;if(G[G.length-X.length-1]!=="/")return!1}return!0}function UY($){var G=$,J=/\/([gim]*)$/.exec($),X="";if(G[0]==="/"){if(J)X=J[1];G=G.slice(1,G.length-X.length-1)}return new RegExp(G,X)}function MY($){var G="/"+$.source+"/";if($.global)G+="g";if($.multiline)G+="m";if($.ignoreCase)G+="i";return G}function zY($){return Object.prototype.toString.call($)==="[object RegExp]"}k7.exports=new WY("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:HY,construct:UY,predicate:zY,represent:MY})});var y7=m((uR,h7)=>{var c4;try{V6=D0,c4=V6("esprima")}catch($){if(typeof window<"u")c4=window.esprima}var V6,QY=F1();function DY($){if($===null)return!1;try{var G="("+$+")",J=c4.parse(G,{range:!0});if(J.type!=="Program"||J.body.length!==1||J.body[0].type!=="ExpressionStatement"||J.body[0].expression.type!=="ArrowFunctionExpression"&&J.body[0].expression.type!=="FunctionExpression")return!1;return!0}catch(X){return!1}}function KY($){var G="("+$+")",J=c4.parse(G,{range:!0}),X=[],q;if(J.type!=="Program"||J.body.length!==1||J.body[0].type!=="ExpressionStatement"||J.body[0].expression.type!=="ArrowFunctionExpression"&&J.body[0].expression.type!=="FunctionExpression")throw Error("Failed to resolve function");if(J.body[0].expression.params.forEach(function(V){X.push(V.name)}),q=J.body[0].expression.body.range,J.body[0].expression.body.type==="BlockStatement")return Function(X,G.slice(q[0]+1,q[1]-1));return Function(X,"return "+G.slice(q[0],q[1]))}function FY($){return $.toString()}function RY($){return Object.prototype.toString.call($)==="[object Function]"}h7.exports=new QY("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:DY,construct:KY,predicate:RY,represent:FY})});var q4=m((lR,f7)=>{var m7=l0();f7.exports=m7.DEFAULT=new m7({include:[D2()],explicit:[v7(),g7(),y7()]})});var V$=m((fY,Y4)=>{var K0=p0(),i7=z2(),BY=n8(),o7=D2(),OY=q4(),Z0=Object.prototype.hasOwnProperty,i4=1,n7=2,a7=3,o4=4,W6=1,AY=2,u7=3,wY=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jY=/[\x85\u2028\u2029]/,NY=/[,\[\]\{\}]/,s7=/^(?:!|!!|![a-z\-]+!)$/i,t7=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function p7($){return Object.prototype.toString.call($)}function q0($){return $===10||$===13}function d0($){return $===9||$===32}function v1($){return $===9||$===32||$===10||$===13}function K2($){return $===44||$===91||$===93||$===123||$===125}function ZY($){var G;if(48<=$&&$<=57)return $-48;if(G=$|32,97<=G&&G<=102)return G-97+10;return-1}function _Y($){if($===120)return 2;if($===117)return 4;if($===85)return 8;return 0}function PY($){if(48<=$&&$<=57)return $-48;return-1}function l7($){return $===48?"\x00":$===97?"\x07":$===98?"\b":$===116?"\t":$===9?"\t":$===110?`
|
|
18
18
|
`:$===118?"\v":$===102?"\f":$===114?"\r":$===101?"\x1B":$===32?" ":$===34?'"':$===47?"/":$===92?"\\":$===78?"\x85":$===95?"\xA0":$===76?"\u2028":$===80?"\u2029":""}function LY($){if($<=65535)return String.fromCharCode($);return String.fromCharCode(($-65536>>10)+55296,($-65536&1023)+56320)}function e7($,G,J){if(G==="__proto__")Object.defineProperty($,G,{configurable:!0,enumerable:!0,writable:!0,value:J});else $[G]=J}var $$=Array(256),G$=Array(256);for(j0=0;j0<256;j0++)$$[j0]=l7(j0)?1:0,G$[j0]=l7(j0);var j0;function TY($,G){this.input=$,this.filename=G.filename||null,this.schema=G.schema||OY,this.onWarning=G.onWarning||null,this.legacy=G.legacy||!1,this.json=G.json||!1,this.listener=G.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=$.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function J$($,G){return new i7(G,new BY($.filename,$.input,$.position,$.line,$.position-$.lineStart))}function f($,G){throw J$($,G)}function n4($,G){if($.onWarning)$.onWarning.call(null,J$($,G))}var r7={YAML:function(G,J,X){var q,V,Y;if(G.version!==null)f(G,"duplication of %YAML directive");if(X.length!==1)f(G,"YAML directive accepts exactly one argument");if(q=/^([0-9]+)\.([0-9]+)$/.exec(X[0]),q===null)f(G,"ill-formed argument of the YAML directive");if(V=parseInt(q[1],10),Y=parseInt(q[2],10),V!==1)f(G,"unacceptable YAML version of the document");if(G.version=X[0],G.checkLineBreaks=Y<2,Y!==1&&Y!==2)n4(G,"unsupported YAML version of the document")},TAG:function(G,J,X){var q,V;if(X.length!==2)f(G,"TAG directive accepts exactly two arguments");if(q=X[0],V=X[1],!s7.test(q))f(G,"ill-formed tag handle (first argument) of the TAG directive");if(Z0.call(G.tagMap,q))f(G,'there is a previously declared suffix for "'+q+'" tag handle');if(!t7.test(V))f(G,"ill-formed tag prefix (second argument) of the TAG directive");G.tagMap[q]=V}};function N0($,G,J,X){var q,V,Y,W;if(G<J){if(W=$.input.slice(G,J),X){for(q=0,V=W.length;q<V;q+=1)if(Y=W.charCodeAt(q),!(Y===9||32<=Y&&Y<=1114111))f($,"expected valid JSON character")}else if(wY.test(W))f($,"the stream contains non-printable characters");$.result+=W}}function d7($,G,J,X){var q,V,Y,W;if(!K0.isObject(J))f($,"cannot merge mappings; the provided source object is unacceptable");q=Object.keys(J);for(Y=0,W=q.length;Y<W;Y+=1)if(V=q[Y],!Z0.call(G,V))e7(G,V,J[V]),X[V]=!0}function F2($,G,J,X,q,V,Y,W){var H,U;if(Array.isArray(q)){q=Array.prototype.slice.call(q);for(H=0,U=q.length;H<U;H+=1){if(Array.isArray(q[H]))f($,"nested arrays are not supported inside keys");if(typeof q==="object"&&p7(q[H])==="[object Object]")q[H]="[object Object]"}}if(typeof q==="object"&&p7(q)==="[object Object]")q="[object Object]";if(q=String(q),G===null)G={};if(X==="tag:yaml.org,2002:merge")if(Array.isArray(V))for(H=0,U=V.length;H<U;H+=1)d7($,G,V[H],J);else d7($,G,V,J);else{if(!$.json&&!Z0.call(J,q)&&Z0.call(G,q))$.line=Y||$.line,$.position=W||$.position,f($,"duplicated mapping key");e7(G,q,V),delete J[q]}return G}function H6($){var G=$.input.charCodeAt($.position);if(G===10)$.position++;else if(G===13){if($.position++,$.input.charCodeAt($.position)===10)$.position++}else f($,"a line break is expected");$.line+=1,$.lineStart=$.position}function z1($,G,J){var X=0,q=$.input.charCodeAt($.position);while(q!==0){while(d0(q))q=$.input.charCodeAt(++$.position);if(G&&q===35)do q=$.input.charCodeAt(++$.position);while(q!==10&&q!==13&&q!==0);if(q0(q)){H6($),q=$.input.charCodeAt($.position),X++,$.lineIndent=0;while(q===32)$.lineIndent++,q=$.input.charCodeAt(++$.position)}else break}if(J!==-1&&X!==0&&$.lineIndent<J)n4($,"deficient indentation");return X}function a4($){var G=$.position,J;if(J=$.input.charCodeAt(G),(J===45||J===46)&&J===$.input.charCodeAt(G+1)&&J===$.input.charCodeAt(G+2)){if(G+=3,J=$.input.charCodeAt(G),J===0||v1(J))return!0}return!1}function U6($,G){if(G===1)$.result+=" ";else if(G>1)$.result+=K0.repeat(`
|
|
19
19
|
`,G-1)}function IY($,G,J){var X,q,V,Y,W,H,U,M,Q=$.kind,F=$.result,K;if(K=$.input.charCodeAt($.position),v1(K)||K2(K)||K===35||K===38||K===42||K===33||K===124||K===62||K===39||K===34||K===37||K===64||K===96)return!1;if(K===63||K===45){if(q=$.input.charCodeAt($.position+1),v1(q)||J&&K2(q))return!1}$.kind="scalar",$.result="",V=Y=$.position,W=!1;while(K!==0){if(K===58){if(q=$.input.charCodeAt($.position+1),v1(q)||J&&K2(q))break}else if(K===35){if(X=$.input.charCodeAt($.position-1),v1(X))break}else if($.position===$.lineStart&&a4($)||J&&K2(K))break;else if(q0(K))if(H=$.line,U=$.lineStart,M=$.lineIndent,z1($,!1,-1),$.lineIndent>=G){W=!0,K=$.input.charCodeAt($.position);continue}else{$.position=Y,$.line=H,$.lineStart=U,$.lineIndent=M;break}if(W)N0($,V,Y,!1),U6($,$.line-H),V=Y=$.position,W=!1;if(!d0(K))Y=$.position+1;K=$.input.charCodeAt(++$.position)}if(N0($,V,Y,!1),$.result)return!0;return $.kind=Q,$.result=F,!1}function EY($,G){var J,X,q;if(J=$.input.charCodeAt($.position),J!==39)return!1;$.kind="scalar",$.result="",$.position++,X=q=$.position;while((J=$.input.charCodeAt($.position))!==0)if(J===39)if(N0($,X,$.position,!0),J=$.input.charCodeAt(++$.position),J===39)X=$.position,$.position++,q=$.position;else return!0;else if(q0(J))N0($,X,q,!0),U6($,z1($,!1,G)),X=q=$.position;else if($.position===$.lineStart&&a4($))f($,"unexpected end of the document within a single quoted scalar");else $.position++,q=$.position;f($,"unexpected end of the stream within a single quoted scalar")}function CY($,G){var J,X,q,V,Y,W;if(W=$.input.charCodeAt($.position),W!==34)return!1;$.kind="scalar",$.result="",$.position++,J=X=$.position;while((W=$.input.charCodeAt($.position))!==0)if(W===34)return N0($,J,$.position,!0),$.position++,!0;else if(W===92){if(N0($,J,$.position,!0),W=$.input.charCodeAt(++$.position),q0(W))z1($,!1,G);else if(W<256&&$$[W])$.result+=G$[W],$.position++;else if((Y=_Y(W))>0){q=Y,V=0;for(;q>0;q--)if(W=$.input.charCodeAt(++$.position),(Y=ZY(W))>=0)V=(V<<4)+Y;else f($,"expected hexadecimal character");$.result+=LY(V),$.position++}else f($,"unknown escape sequence");J=X=$.position}else if(q0(W))N0($,J,X,!0),U6($,z1($,!1,G)),J=X=$.position;else if($.position===$.lineStart&&a4($))f($,"unexpected end of the document within a double quoted scalar");else $.position++,X=$.position;f($,"unexpected end of the stream within a double quoted scalar")}function SY($,G){var J=!0,X,q=$.tag,V,Y=$.anchor,W,H,U,M,Q,F={},K,j,N,P;if(P=$.input.charCodeAt($.position),P===91)H=93,Q=!1,V=[];else if(P===123)H=125,Q=!0,V={};else return!1;if($.anchor!==null)$.anchorMap[$.anchor]=V;P=$.input.charCodeAt(++$.position);while(P!==0){if(z1($,!0,G),P=$.input.charCodeAt($.position),P===H)return $.position++,$.tag=q,$.anchor=Y,$.kind=Q?"mapping":"sequence",$.result=V,!0;else if(!J)f($,"missed comma between flow collection entries");if(j=K=N=null,U=M=!1,P===63){if(W=$.input.charCodeAt($.position+1),v1(W))U=M=!0,$.position++,z1($,!0,G)}if(X=$.line,R2($,G,i4,!1,!0),j=$.tag,K=$.result,z1($,!0,G),P=$.input.charCodeAt($.position),(M||$.line===X)&&P===58)U=!0,P=$.input.charCodeAt(++$.position),z1($,!0,G),R2($,G,i4,!1,!0),N=$.result;if(Q)F2($,V,F,j,K,N);else if(U)V.push(F2($,null,F,j,K,N));else V.push(K);if(z1($,!0,G),P=$.input.charCodeAt($.position),P===44)J=!0,P=$.input.charCodeAt(++$.position);else J=!1}f($,"unexpected end of the stream within a flow collection")}function bY($,G){var J,X,q=W6,V=!1,Y=!1,W=G,H=0,U=!1,M,Q;if(Q=$.input.charCodeAt($.position),Q===124)X=!1;else if(Q===62)X=!0;else return!1;$.kind="scalar",$.result="";while(Q!==0)if(Q=$.input.charCodeAt(++$.position),Q===43||Q===45)if(W6===q)q=Q===43?u7:AY;else f($,"repeat of a chomping mode identifier");else if((M=PY(Q))>=0)if(M===0)f($,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Y)W=G+M-1,Y=!0;else f($,"repeat of an indentation width identifier");else break;if(d0(Q)){do Q=$.input.charCodeAt(++$.position);while(d0(Q));if(Q===35)do Q=$.input.charCodeAt(++$.position);while(!q0(Q)&&Q!==0)}while(Q!==0){H6($),$.lineIndent=0,Q=$.input.charCodeAt($.position);while((!Y||$.lineIndent<W)&&Q===32)$.lineIndent++,Q=$.input.charCodeAt(++$.position);if(!Y&&$.lineIndent>W)W=$.lineIndent;if(q0(Q)){H++;continue}if($.lineIndent<W){if(q===u7)$.result+=K0.repeat(`
|
|
20
20
|
`,V?1+H:H);else if(q===W6){if(V)$.result+=`
|
|
@@ -38,25 +38,25 @@ var $X=Object.create;var{getPrototypeOf:GX,defineProperty:p5,getOwnPropertyNames
|
|
|
38
38
|
`+$.slice(q,V),q=V+1;Y=W}if(H+=`
|
|
39
39
|
`,$.length-q>G&&Y>q)H+=$.slice(q,Y)+`
|
|
40
40
|
`+$.slice(Y+1);else H+=$.slice(q);return H.slice(1)}function OV($){var G="",J,X,q;for(var V=0;V<$.length;V++){if(J=$.charCodeAt(V),J>=55296&&J<=56319){if(X=$.charCodeAt(V+1),X>=56320&&X<=57343){G+=W$((J-55296)*1024+X-56320+65536),V++;continue}}q=Z1[J],G+=!q&&B2(J)?$[V]:q||W$(J)}return G}function AV($,G,J){var X="",q=$.tag,V,Y;for(V=0,Y=J.length;V<Y;V+=1)if(c0($,G,J[V],!1,!1)){if(V!==0)X+=","+(!$.condenseFlow?" ":"");X+=$.dump}$.tag=q,$.dump="["+X+"]"}function wV($,G,J,X){var q="",V=$.tag,Y,W;for(Y=0,W=J.length;Y<W;Y+=1)if(c0($,G+1,J[Y],!0,!0)){if(!X||Y!==0)q+=M6($,G);if($.dump&&V4===$.dump.charCodeAt(0))q+="-";else q+="- ";q+=$.dump}$.tag=V,$.dump=q||"[]"}function jV($,G,J){var X="",q=$.tag,V=Object.keys(J),Y,W,H,U,M;for(Y=0,W=V.length;Y<W;Y+=1){if(M="",Y!==0)M+=", ";if($.condenseFlow)M+='"';if(H=V[Y],U=J[H],!c0($,G,H,!1,!1))continue;if($.dump.length>1024)M+="? ";if(M+=$.dump+($.condenseFlow?'"':"")+":"+($.condenseFlow?"":" "),!c0($,G,U,!1,!1))continue;M+=$.dump,X+=M}$.tag=q,$.dump="{"+X+"}"}function NV($,G,J,X){var q="",V=$.tag,Y=Object.keys(J),W,H,U,M,Q,F;if($.sortKeys===!0)Y.sort();else if(typeof $.sortKeys==="function")Y.sort($.sortKeys);else if($.sortKeys)throw new H4("sortKeys must be a boolean or a function");for(W=0,H=Y.length;W<H;W+=1){if(F="",!X||W!==0)F+=M6($,G);if(U=Y[W],M=J[U],!c0($,G+1,U,!0,!0,!0))continue;if(Q=$.tag!==null&&$.tag!=="?"||$.dump&&$.dump.length>1024,Q)if($.dump&&V4===$.dump.charCodeAt(0))F+="?";else F+="? ";if(F+=$.dump,Q)F+=M6($,G);if(!c0($,G+1,M,!0,Q))continue;if($.dump&&V4===$.dump.charCodeAt(0))F+=":";else F+=": ";F+=$.dump,q+=F}$.tag=V,$.dump=q||"{}"}function D$($,G,J){var X,q,V,Y,W,H;q=J?$.explicitTypes:$.implicitTypes;for(V=0,Y=q.length;V<Y;V+=1)if(W=q[V],(W.instanceOf||W.predicate)&&(!W.instanceOf||typeof G==="object"&&G instanceof W.instanceOf)&&(!W.predicate||W.predicate(G))){if($.tag=J?W.tag:"?",W.represent){if(H=$.styleMap[W.tag]||W.defaultStyle,K$.call(W.represent)==="[object Function]")X=W.represent(G,H);else if(F$.call(W.represent,H))X=W.represent[H](G,H);else throw new H4("!<"+W.tag+'> tag resolver accepts not "'+H+'" style');$.dump=X}return!0}return!1}function c0($,G,J,X,q,V){if($.tag=null,$.dump=J,!D$($,J,!1))D$($,J,!0);var Y=K$.call($.dump);if(X)X=$.flowLevel<0||$.flowLevel>G;var W=Y==="[object Object]"||Y==="[object Array]",H,U;if(W)H=$.duplicates.indexOf(J),U=H!==-1;if($.tag!==null&&$.tag!=="?"||U||$.indent!==2&&G>0)q=!1;if(U&&$.usedDuplicates[H])$.dump="*ref_"+H;else{if(W&&U&&!$.usedDuplicates[H])$.usedDuplicates[H]=!0;if(Y==="[object Object]"){if(X&&Object.keys($.dump).length!==0){if(NV($,G,$.dump,q),U)$.dump="&ref_"+H+$.dump}else if(jV($,G,$.dump),U)$.dump="&ref_"+H+" "+$.dump}else if(Y==="[object Array]"){var M=$.noArrayIndent&&G>0?G-1:G;if(X&&$.dump.length!==0){if(wV($,M,$.dump,q),U)$.dump="&ref_"+H+$.dump}else if(AV($,M,$.dump),U)$.dump="&ref_"+H+" "+$.dump}else if(Y==="[object String]"){if($.tag!=="?")RV($,$.dump,G,V)}else{if($.skipInvalid)return!1;throw new H4("unacceptable kind of an object to dump "+Y)}if($.tag!==null&&$.tag!=="?")$.dump="!<"+$.tag+"> "+$.dump}return!0}function ZV($,G){var J=[],X=[],q,V;z6($,J,X);for(q=0,V=X.length;q<V;q+=1)G.duplicates.push(J[X[q]]);G.usedDuplicates=Array(V)}function z6($,G,J){var X,q,V;if($!==null&&typeof $==="object")if(q=G.indexOf($),q!==-1){if(J.indexOf(q)===-1)J.push(q)}else if(G.push($),Array.isArray($))for(q=0,V=$.length;q<V;q+=1)z6($[q],G,J);else{X=Object.keys($);for(q=0,V=X.length;q<V;q+=1)z6($[X[q]],G,J)}}function I$($,G){G=G||{};var J=new zV(G);if(!J.noRefs)ZV($,J);if(c0(J,0,$,!0,!0))return J.dump+`
|
|
41
|
-
`;return""}function _V($,G){return I$($,W4.extend({schema:cY},G))}PV.dump=I$;PV.safeDump=_V});var S$=m((IV,W1)=>{var t4=V$(),C$=E$();function e4($){return function(){throw Error("Function "+$+" is deprecated and cannot be used.")}}IV.Type=F1();IV.Schema=l0();IV.FAILSAFE_SCHEMA=d4();IV.JSON_SCHEMA=J6();IV.CORE_SCHEMA=X6();IV.DEFAULT_SAFE_SCHEMA=D2();IV.DEFAULT_FULL_SCHEMA=q4();IV.load=t4.load;IV.loadAll=t4.loadAll;IV.safeLoad=t4.safeLoad;IV.safeLoadAll=t4.safeLoadAll;IV.dump=C$.dump;IV.safeDump=C$.safeDump;IV.YAMLException=z2();IV.MINIMAL_SCHEMA=d4();IV.SAFE_SCHEMA=D2();IV.DEFAULT_SCHEMA=q4();IV.scan=e4("scan");IV.parse=e4("parse");IV.compose=e4("compose");IV.addConstructor=e4("addConstructor")});var x$=m((
|
|
41
|
+
`;return""}function _V($,G){return I$($,W4.extend({schema:cY},G))}PV.dump=I$;PV.safeDump=_V});var S$=m((IV,W1)=>{var t4=V$(),C$=E$();function e4($){return function(){throw Error("Function "+$+" is deprecated and cannot be used.")}}IV.Type=F1();IV.Schema=l0();IV.FAILSAFE_SCHEMA=d4();IV.JSON_SCHEMA=J6();IV.CORE_SCHEMA=X6();IV.DEFAULT_SAFE_SCHEMA=D2();IV.DEFAULT_FULL_SCHEMA=q4();IV.load=t4.load;IV.loadAll=t4.loadAll;IV.safeLoad=t4.safeLoad;IV.safeLoadAll=t4.safeLoadAll;IV.dump=C$.dump;IV.safeDump=C$.safeDump;IV.YAMLException=z2();IV.MINIMAL_SCHEMA=d4();IV.SAFE_SCHEMA=D2();IV.DEFAULT_SCHEMA=q4();IV.scan=e4("scan");IV.parse=e4("parse");IV.compose=e4("compose");IV.addConstructor=e4("addConstructor")});var x$=m((rR,b$)=>{var aV=S$();b$.exports=aV});var B6=m((F6,R6)=>{var $5=x$(),K6=F6=R6.exports;K6.yaml={parse:$5.safeLoad.bind($5),stringify:$5.safeDump.bind($5)};K6.json={parse:JSON.parse.bind(JSON),stringify:function($,G){let J=Object.assign({replacer:null,space:2},G);return JSON.stringify($,J.replacer,J.space)}};K6.javascript={parse:function parse(str,options,wrap){try{if(wrap!==!1)str=`(function() {
|
|
42
42
|
return `+str.trim()+`;
|
|
43
|
-
}());`;return eval(str)||{}}catch($){if(wrap!==!1&&/(unexpected|identifier)/i.test($.message))return parse(str,options,!1);throw SyntaxError($)}},stringify:function(){throw Error("stringifying JavaScript is not supported")}}});var k$=m((
|
|
43
|
+
}());`;return eval(str)||{}}catch($){if(wrap!==!1&&/(unexpected|identifier)/i.test($.message))return parse(str,options,!1);throw SyntaxError($)}},stringify:function(){throw Error("stringifying JavaScript is not supported")}}});var k$=m((dR,v$)=>{/*!
|
|
44
44
|
* strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
|
|
45
45
|
*
|
|
46
46
|
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
|
47
47
|
* Released under the MIT License.
|
|
48
|
-
*/v$.exports=function($){if(typeof $==="string"&&$.charAt(0)==="\uFEFF")return $.slice(1);return $}});var G5=m((sV)=>{var g$=k$(),h$=J4();sV.define=function($,G,J){Reflect.defineProperty($,G,{enumerable:!1,configurable:!0,writable:!0,value:J})};sV.isBuffer=function($){return h$($)==="buffer"};sV.isObject=function($){return h$($)==="object"};sV.toBuffer=function($){return typeof $==="string"?Buffer.from($):$};sV.toString=function($){if(sV.isBuffer($))return g$(String($));if(typeof $!=="string")throw TypeError("expected input to be a string or buffer");return g$($)};sV.arrayify=function($){return $?Array.isArray($)?$:[$]:[]};sV.startsWith=function($,G,J){if(typeof J!=="number")J=G.length;return $.slice(0,J)===G}});var U4=m((
|
|
48
|
+
*/v$.exports=function($){if(typeof $==="string"&&$.charAt(0)==="\uFEFF")return $.slice(1);return $}});var G5=m((sV)=>{var g$=k$(),h$=J4();sV.define=function($,G,J){Reflect.defineProperty($,G,{enumerable:!1,configurable:!0,writable:!0,value:J})};sV.isBuffer=function($){return h$($)==="buffer"};sV.isObject=function($){return h$($)==="object"};sV.toBuffer=function($){return typeof $==="string"?Buffer.from($):$};sV.toString=function($){if(sV.isBuffer($))return g$(String($));if(typeof $!=="string")throw TypeError("expected input to be a string or buffer");return g$($)};sV.arrayify=function($){return $?Array.isArray($)?$:[$]:[]};sV.startsWith=function($,G,J){if(typeof J!=="number")J=G.length;return $.slice(0,J)===G}});var U4=m((iR,m$)=>{var qW=B6(),YW=G5();m$.exports=function($){let G=Object.assign({},$);if(G.delimiters=YW.arrayify(G.delims||G.delimiters||"---"),G.delimiters.length===1)G.delimiters.push(G.delimiters[0]);return G.language=(G.language||G.lang||"yaml").toLowerCase(),G.engines=Object.assign({},qW,G.parsers,G.engines),G}});var O6=m((oR,f$)=>{f$.exports=function($,G){let J=G.engines[$]||G.engines[VW($)];if(typeof J>"u")throw Error('gray-matter engine "'+$+'" is not registered');if(typeof J==="function")J={parse:J};return J};function VW($){switch($.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return $}}});var A6=m((nR,u$)=>{var WW=J4(),HW=O6(),UW=U4();u$.exports=function($,G,J){if(G==null&&J==null)switch(WW($)){case"object":G=$.data,J={};break;case"string":return $;default:throw TypeError("expected file to be a string or object")}let X=$.content,q=UW(J);if(G==null){if(!q.data)return $;G=q.data}let V=$.language||q.language,Y=HW(V,q);if(typeof Y.stringify!=="function")throw TypeError('expected "'+V+'.stringify" to be a function');G=Object.assign({},$.data,G);let W=q.delimiters[0],H=q.delimiters[1],U=Y.stringify(G,J).trim(),M="";if(U!=="{}")M=O2(W)+O2(U)+O2(H);if(typeof $.excerpt==="string"&&$.excerpt!==""){if(X.indexOf($.excerpt.trim())===-1)M+=O2($.excerpt)+O2(H)}return M+O2(X)};function O2($){return $.slice(-1)!==`
|
|
49
49
|
`?$+`
|
|
50
|
-
`:$}});var l$=m((
|
|
50
|
+
`:$}});var l$=m((aR,p$)=>{var MW=U4();p$.exports=function($,G){let J=MW(G);if($.data==null)$.data={};if(typeof J.excerpt==="function")return J.excerpt($,J);let X=$.data.excerpt_separator||J.excerpt_separator;if(X==null&&(J.excerpt===!1||J.excerpt==null))return $;let q=typeof J.excerpt==="string"?J.excerpt:X||J.delimiters[0],V=$.content.indexOf(q);if(V!==-1)$.excerpt=$.content.slice(0,V);return $}});var c$=m((sR,d$)=>{var r$=J4(),zW=A6(),A2=G5();d$.exports=function($){if(r$($)!=="object")$={content:$};if(r$($.data)!=="object")$.data={};if($.contents&&$.content==null)$.content=$.contents;return A2.define($,"orig",A2.toBuffer($.content)),A2.define($,"language",$.language||""),A2.define($,"matter",$.matter||""),A2.define($,"stringify",function(G,J){if(J&&J.language)$.language=J.language;return zW($,G,J)}),$.content=A2.toString($.content),$.isEmpty=!1,$.excerpt="",$}});var o$=m((tR,i$)=>{var QW=O6(),DW=U4();i$.exports=function($,G,J){let X=DW(J),q=QW($,X);if(typeof q.parse!=="function")throw TypeError('expected "'+$+'.parse" to be a function');return q.parse(G,X)}});var j6=m((eR,s$)=>{var KW=D0("fs"),FW=r8(),w6=U4(),RW=A6(),n$=l$(),BW=B6(),OW=c$(),AW=o$(),a$=G5();function C1($,G){if($==="")return{data:{},content:$,excerpt:"",orig:$};let J=OW($),X=C1.cache[J.content];if(!G){if(X)return J=Object.assign({},X),J.orig=X.orig,J;C1.cache[J.content]=J}return wW(J,G)}function wW($,G){let J=w6(G),X=J.delimiters[0],q=`
|
|
51
51
|
`+J.delimiters[1],V=$.content;if(J.language)$.language=J.language;let Y=X.length;if(!a$.startsWith(V,X,Y))return n$($,J),$;if(V.charAt(Y)===X.slice(-1))return $;V=V.slice(Y);let W=V.length,H=C1.language(V,J);if(H.name)$.language=H.name,V=V.slice(H.raw.length);let U=V.indexOf(q);if(U===-1)U=W;if($.matter=V.slice(0,U),$.matter.replace(/^\s*#[^\n]+/gm,"").trim()==="")$.isEmpty=!0,$.empty=$.content,$.data={};else $.data=AW($.language,$.matter,J);if(U===W)$.content="";else{if($.content=V.slice(U+q.length),$.content[0]==="\r")$.content=$.content.slice(1);if($.content[0]===`
|
|
52
|
-
`)$.content=$.content.slice(1)}if(n$($,J),J.sections===!0||typeof J.section==="function")FW($,J.section);return $}C1.engines=BW;C1.stringify=function($,G,J){if(typeof $==="string")$=C1($,J);return RW($,G,J)};C1.read=function($,G){let J=KW.readFileSync($,"utf8"),X=C1(J,G);return X.path=$,X};C1.test=function($,G){return a$.startsWith($,w6(G).delimiters[0])};C1.language=function($,G){let X=w6(G).delimiters[0];if(C1.test($))$=$.slice(X.length);let q=$.slice(0,$.search(/\r?\n/));return{raw:q,name:q?q.trim():""}};C1.cache={};C1.clearCache=function(){C1.cache={}};s$.exports=C1});var NG=m((
|
|
52
|
+
`)$.content=$.content.slice(1)}if(n$($,J),J.sections===!0||typeof J.section==="function")FW($,J.section);return $}C1.engines=BW;C1.stringify=function($,G,J){if(typeof $==="string")$=C1($,J);return RW($,G,J)};C1.read=function($,G){let J=KW.readFileSync($,"utf8"),X=C1(J,G);return X.path=$,X};C1.test=function($,G){return a$.startsWith($,w6(G).delimiters[0])};C1.language=function($,G){let X=w6(G).delimiters[0];if(C1.test($))$=$.slice(X.length);let q=$.slice(0,$.search(/\r?\n/));return{raw:q,name:q?q.trim():""}};C1.cache={};C1.clearCache=function(){C1.cache={}};s$.exports=C1});var NG=m((Hj,jG)=>{var Z2=1000,_2=Z2*60,P2=_2*60,s0=P2*24,lH=s0*7,rH=s0*365.25;jG.exports=function($,G){G=G||{};var J=typeof $;if(J==="string"&&$.length>0)return dH($);else if(J==="number"&&isFinite($))return G.long?iH($):cH($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function dH($){if($=String($),$.length>100)return;var G=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!G)return;var J=parseFloat(G[1]),X=(G[2]||"ms").toLowerCase();switch(X){case"years":case"year":case"yrs":case"yr":case"y":return J*rH;case"weeks":case"week":case"w":return J*lH;case"days":case"day":case"d":return J*s0;case"hours":case"hour":case"hrs":case"hr":case"h":return J*P2;case"minutes":case"minute":case"mins":case"min":case"m":return J*_2;case"seconds":case"second":case"secs":case"sec":case"s":return J*Z2;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return J;default:return}}function cH($){var G=Math.abs($);if(G>=s0)return Math.round($/s0)+"d";if(G>=P2)return Math.round($/P2)+"h";if(G>=_2)return Math.round($/_2)+"m";if(G>=Z2)return Math.round($/Z2)+"s";return $+"ms"}function iH($){var G=Math.abs($);if(G>=s0)return Q5($,G,s0,"day");if(G>=P2)return Q5($,G,P2,"hour");if(G>=_2)return Q5($,G,_2,"minute");if(G>=Z2)return Q5($,G,Z2,"second");return $+" ms"}function Q5($,G,J,X){var q=G>=J*1.5;return Math.round($/J)+" "+X+(q?"s":"")}});var g6=m((Uj,ZG)=>{function oH($){J.debug=J,J.default=J,J.coerce=H,J.disable=Y,J.enable=q,J.enabled=W,J.humanize=NG(),J.destroy=U,Object.keys($).forEach((M)=>{J[M]=$[M]}),J.names=[],J.skips=[],J.formatters={};function G(M){let Q=0;for(let F=0;F<M.length;F++)Q=(Q<<5)-Q+M.charCodeAt(F),Q|=0;return J.colors[Math.abs(Q)%J.colors.length]}J.selectColor=G;function J(M){let Q,F=null,K,j;function N(...P){if(!N.enabled)return;let _=N,k=Number(new Date),h=k-(Q||k);if(_.diff=h,_.prev=Q,_.curr=k,Q=k,P[0]=J.coerce(P[0]),typeof P[0]!=="string")P.unshift("%O");let t=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(Z,$1)=>{if(Z==="%%")return"%";t++;let q1=J.formatters[$1];if(typeof q1==="function"){let s=P[t];Z=q1.call(_,s),P.splice(t,1),t--}return Z}),J.formatArgs.call(_,P),(_.log||J.log).apply(_,P)}if(N.namespace=M,N.useColors=J.useColors(),N.color=J.selectColor(M),N.extend=X,N.destroy=J.destroy,Object.defineProperty(N,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(F!==null)return F;if(K!==J.namespaces)K=J.namespaces,j=J.enabled(M);return j},set:(P)=>{F=P}}),typeof J.init==="function")J.init(N);return N}function X(M,Q){let F=J(this.namespace+(typeof Q>"u"?":":Q)+M);return F.log=this.log,F}function q(M){J.save(M),J.namespaces=M,J.names=[],J.skips=[];let Q=(typeof M==="string"?M:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of Q)if(F[0]==="-")J.skips.push(F.slice(1));else J.names.push(F)}function V(M,Q){let F=0,K=0,j=-1,N=0;while(F<M.length)if(K<Q.length&&(Q[K]===M[F]||Q[K]==="*"))if(Q[K]==="*")j=K,N=F,K++;else F++,K++;else if(j!==-1)K=j+1,N++,F=N;else return!1;while(K<Q.length&&Q[K]==="*")K++;return K===Q.length}function Y(){let M=[...J.names,...J.skips.map((Q)=>"-"+Q)].join(",");return J.enable(""),M}function W(M){for(let Q of J.skips)if(V(M,Q))return!1;for(let Q of J.names)if(V(M,Q))return!0;return!1}function H(M){if(M instanceof Error)return M.stack||M.message;return M}function U(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return J.enable(J.load()),J}ZG.exports=oH});var PG=m((_G,D5)=>{_G.formatArgs=aH;_G.save=sH;_G.load=tH;_G.useColors=nH;_G.storage=eH();_G.destroy=(()=>{let $=!1;return()=>{if(!$)$=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();_G.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function nH(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let $;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function aH($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+D5.exports.humanize(this.diff),!this.useColors)return;let G="color: "+this.color;$.splice(1,0,G,"color: inherit");let J=0,X=0;$[0].replace(/%[a-zA-Z%]/g,(q)=>{if(q==="%%")return;if(J++,q==="%c")X=J}),$.splice(X,0,G)}_G.log=console.debug||console.log||(()=>{});function sH($){try{if($)_G.storage.setItem("debug",$);else _G.storage.removeItem("debug")}catch(G){}}function tH(){let $;try{$=_G.storage.getItem("debug")||_G.storage.getItem("DEBUG")}catch(G){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function eH(){try{return localStorage}catch($){}}D5.exports=g6()(_G);var{formatters:$U}=D5.exports;$U.j=function($){try{return JSON.stringify($)}catch(G){return"[UnexpectedJSONParseError]: "+G.message}}});var TG=m((zj,LG)=>{LG.exports=($,G=process.argv)=>{let J=$.startsWith("-")?"":$.length===1?"-":"--",X=G.indexOf(J+$),q=G.indexOf("--");return X!==-1&&(q===-1||X<q)}});var CG=m((Qj,EG)=>{var HU=D0("os"),IG=D0("tty"),o1=TG(),{env:A1}=process,L0;if(o1("no-color")||o1("no-colors")||o1("color=false")||o1("color=never"))L0=0;else if(o1("color")||o1("colors")||o1("color=true")||o1("color=always"))L0=1;if("FORCE_COLOR"in A1)if(A1.FORCE_COLOR==="true")L0=1;else if(A1.FORCE_COLOR==="false")L0=0;else L0=A1.FORCE_COLOR.length===0?1:Math.min(parseInt(A1.FORCE_COLOR,10),3);function h6($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function y6($,G){if(L0===0)return 0;if(o1("color=16m")||o1("color=full")||o1("color=truecolor"))return 3;if(o1("color=256"))return 2;if($&&!G&&L0===void 0)return 0;let J=L0||0;if(A1.TERM==="dumb")return J;if(process.platform==="win32"){let X=HU.release().split(".");if(Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in A1){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((X)=>(X in A1))||A1.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in A1)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(A1.TEAMCITY_VERSION)?1:0;if(A1.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in A1){let X=parseInt((A1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(A1.TERM_PROGRAM){case"iTerm.app":return X>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(A1.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(A1.TERM))return 1;if("COLORTERM"in A1)return 1;return J}function UU($){let G=y6($,$&&$.isTTY);return h6(G)}EG.exports={supportsColor:UU,stdout:h6(y6(!0,IG.isatty(1))),stderr:h6(y6(!0,IG.isatty(2)))}});var vG=m((bG,F5)=>{var MU=D0("tty"),K5=D0("util");bG.init=BU;bG.log=KU;bG.formatArgs=QU;bG.save=FU;bG.load=RU;bG.useColors=zU;bG.destroy=K5.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");bG.colors=[6,2,3,4,5,1];try{let $=CG();if($&&($.stderr||$).level>=2)bG.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}bG.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,G)=>{let J=G.substring(6).toLowerCase().replace(/_([a-z])/g,(q,V)=>{return V.toUpperCase()}),X=process.env[G];if(/^(yes|on|true|enabled)$/i.test(X))X=!0;else if(/^(no|off|false|disabled)$/i.test(X))X=!1;else if(X==="null")X=null;else X=Number(X);return $[J]=X,$},{});function zU(){return"colors"in bG.inspectOpts?Boolean(bG.inspectOpts.colors):MU.isatty(process.stderr.fd)}function QU($){let{namespace:G,useColors:J}=this;if(J){let X=this.color,q="\x1B[3"+(X<8?X:"8;5;"+X),V=` ${q};1m${G} \x1B[0m`;$[0]=V+$[0].split(`
|
|
53
53
|
`).join(`
|
|
54
54
|
`+V),$.push(q+"m+"+F5.exports.humanize(this.diff)+"\x1B[0m")}else $[0]=DU()+G+" "+$[0]}function DU(){if(bG.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function KU(...$){return process.stderr.write(K5.formatWithOptions(bG.inspectOpts,...$)+`
|
|
55
55
|
`)}function FU($){if($)process.env.DEBUG=$;else delete process.env.DEBUG}function RU(){return process.env.DEBUG}function BU($){$.inspectOpts={};let G=Object.keys(bG.inspectOpts);for(let J=0;J<G.length;J++)$.inspectOpts[G[J]]=bG.inspectOpts[G[J]]}F5.exports=g6()(bG);var{formatters:SG}=F5.exports;SG.o=function($){return this.inspectOpts.colors=this.useColors,K5.inspect($,this.inspectOpts).split(`
|
|
56
|
-
`).map((G)=>G.trim()).join(" ")};SG.O=function($){return this.inspectOpts.colors=this.useColors,K5.inspect($,this.inspectOpts)}});var kG=m((Dj,m6)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)m6.exports=PG();else m6.exports=vG()});var xJ=m((f_,bJ)=>{var P5=Object.prototype.hasOwnProperty,SJ=Object.prototype.toString,PJ=Object.defineProperty,LJ=Object.getOwnPropertyDescriptor,TJ=function(G){if(typeof Array.isArray==="function")return Array.isArray(G);return SJ.call(G)==="[object Array]"},IJ=function(G){if(!G||SJ.call(G)!=="[object Object]")return!1;var J=P5.call(G,"constructor"),X=G.constructor&&G.constructor.prototype&&P5.call(G.constructor.prototype,"isPrototypeOf");if(G.constructor&&!J&&!X)return!1;var q;for(q in G);return typeof q>"u"||P5.call(G,q)},EJ=function(G,J){if(PJ&&J.name==="__proto__")PJ(G,J.name,{enumerable:!0,configurable:!0,value:J.newValue,writable:!0});else G[J.name]=J.newValue},CJ=function(G,J){if(J==="__proto__"){if(!P5.call(G,J))return;else if(LJ)return LJ(G,J).value}return G[J]};bJ.exports=function $(){var G,J,X,q,V,Y,W=arguments[0],H=1,U=arguments.length,M=!1;if(typeof W==="boolean")M=W,W=arguments[1]||{},H=2;if(W==null||typeof W!=="object"&&typeof W!=="function")W={};for(;H<U;++H)if(G=arguments[H],G!=null){for(J in G)if(X=CJ(W,J),q=CJ(G,J),W!==q){if(M&&q&&(IJ(q)||(V=TJ(q)))){if(V)V=!1,Y=X&&TJ(X)?X:[];else Y=X&&IJ(X)?X:{};EJ(W,{name:J,newValue:$(M,Y,q)})}else if(typeof q<"u")EJ(W,{name:J,newValue:q})}}return W}});import{createClient as tF}from"@libsql/client";var S=Symbol.for("drizzle:entityKind");function E1($,G){if(!$||typeof $!=="object")return!1;if($ instanceof G)return!0;if(!Object.prototype.hasOwnProperty.call(G,S))throw Error(`Class "${G.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let J=Object.getPrototypeOf($).constructor;if(J)while(J){if(S in J&&J[S]===G[S])return!0;J=Object.getPrototypeOf(J)}return!1}class w0{constructor($,G){this.table=$,this.config=G,this.name=G.name,this.keyAsName=G.keyAsName,this.notNull=G.notNull,this.default=G.default,this.defaultFn=G.defaultFn,this.onUpdateFn=G.onUpdateFn,this.hasDefault=G.hasDefault,this.primary=G.primaryKey,this.isUnique=G.isUnique,this.uniqueName=G.uniqueName,this.uniqueType=G.uniqueType,this.dataType=G.dataType,this.columnType=G.columnType,this.generated=G.generated,this.generatedIdentity=G.generatedIdentity}static[S]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue($){return $}mapToDriverValue($){return $}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}class l5{static[S]="ColumnBuilder";config;constructor($,G,J){this.config={name:$,keyAsName:$==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:G,columnType:J,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default($){return this.config.default=$,this.config.hasDefault=!0,this}$defaultFn($){return this.config.defaultFn=$,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn($){return this.config.onUpdateFn=$,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName($){if(this.config.name!=="")return;this.config.name=$}}var n1=Symbol.for("drizzle:Name");function f9($,...G){return $(...G)}function u9($,G){return`${$[n1]}_${G.join("_")}_unique`}class t2 extends w0{constructor($,G){if(!G.uniqueName)G.uniqueName=u9($,[G.name]);super($,G);this.table=$}static[S]="PgColumn"}class UX extends t2{static[S]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op($){return this.indexConfig.opClass=$,this}}class MX extends t2{static[S]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor($,G){super($,G);this.enum=G.enum}getSQLType(){return this.enum.enumName}}var p9=Symbol.for("drizzle:isPgEnum");function l9($){return!!$&&typeof $==="function"&&p9 in $&&$[p9]===!0}class zX extends t2{static[S]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor($,G){super($,G);this.enum=G.enum}getSQLType(){return this.enum.enumName}}class v4{static[S]="Subquery";constructor($,G,J,X=!1,q=[]){this._={brand:"Subquery",sql:$,selectedFields:G,alias:J,isWith:X,usedTables:q}}}var r9="0.44.7";var r5,d5,d9={startActiveSpan($,G){if(!r5)return G();if(!d5)d5=r5.trace.getTracer("drizzle-orm",r9);return f9((J,X)=>X.startActiveSpan($,(q)=>{try{return G(q)}catch(V){throw q.setStatus({code:J.SpanStatusCode.ERROR,message:V instanceof Error?V.message:"Unknown error"}),V}finally{q.end()}}),r5,d5)}};var M2=Symbol.for("drizzle:ViewBaseConfig");var c5=Symbol.for("drizzle:Schema"),c9=Symbol.for("drizzle:Columns"),i9=Symbol.for("drizzle:ExtraConfigColumns"),i5=Symbol.for("drizzle:OriginalName"),o5=Symbol.for("drizzle:BaseName"),e2=Symbol.for("drizzle:IsAlias"),o9=Symbol.for("drizzle:ExtraConfigBuilder"),QX=Symbol.for("drizzle:IsDrizzleTable");class U1{static[S]="Table";static Symbol={Name:n1,Schema:c5,OriginalName:i5,Columns:c9,ExtraConfigColumns:i9,BaseName:o5,IsAlias:e2,ExtraConfigBuilder:o9};[n1];[i5];[c5];[c9];[i9];[o5];[e2]=!1;[QX]=!0;[o9]=void 0;constructor($,G,J){this[n1]=this[i5]=$,this[c5]=G,this[o5]=J}}function DX($){return $!==null&&$!==void 0&&typeof $.getSQL==="function"}function KX($){let G={sql:"",params:[]};for(let J of $)if(G.sql+=J.sql,G.params.push(...J.params),J.typings?.length){if(!G.typings)G.typings=[];G.typings.push(...J.typings)}return G}class i1{static[S]="StringChunk";value;constructor($){this.value=Array.isArray($)?$:[$]}getSQL(){return new M1([this])}}class M1{constructor($){this.queryChunks=$;for(let G of $)if(E1(G,U1)){let J=G[U1.Symbol.Schema];this.usedTables.push(J===void 0?G[U1.Symbol.Name]:J+"."+G[U1.Symbol.Name])}}static[S]="SQL";decoder=n9;shouldInlineParams=!1;usedTables=[];append($){return this.queryChunks.push(...$.queryChunks),this}toQuery($){return d9.startActiveSpan("drizzle.buildSQL",(G)=>{let J=this.buildQueryFromSourceParams(this.queryChunks,$);return G?.setAttributes({"drizzle.query.text":J.sql,"drizzle.query.params":JSON.stringify(J.params)}),J})}buildQueryFromSourceParams($,G){let J=Object.assign({},G,{inlineParams:G.inlineParams||this.shouldInlineParams,paramStartIndex:G.paramStartIndex||{value:0}}),{casing:X,escapeName:q,escapeParam:V,prepareTyping:Y,inlineParams:W,paramStartIndex:H}=J;return KX($.map((U)=>{if(E1(U,i1))return{sql:U.value.join(""),params:[]};if(E1(U,k4))return{sql:q(U.value),params:[]};if(U===void 0)return{sql:"",params:[]};if(Array.isArray(U)){let M=[new i1("(")];for(let[Q,F]of U.entries())if(M.push(F),Q<U.length-1)M.push(new i1(", "));return M.push(new i1(")")),this.buildQueryFromSourceParams(M,J)}if(E1(U,M1))return this.buildQueryFromSourceParams(U.queryChunks,{...J,inlineParams:W||U.shouldInlineParams});if(E1(U,U1)){let M=U[U1.Symbol.Schema],Q=U[U1.Symbol.Name];return{sql:M===void 0||U[e2]?q(Q):q(M)+"."+q(Q),params:[]}}if(E1(U,w0)){let M=X.getColumnCasing(U);if(G.invokeSource==="indexes")return{sql:q(M),params:[]};let Q=U.table[U1.Symbol.Schema];return{sql:U.table[e2]||Q===void 0?q(U.table[U1.Symbol.Name])+"."+q(M):q(Q)+"."+q(U.table[U1.Symbol.Name])+"."+q(M),params:[]}}if(E1(U,s9)){let M=U[M2].schema,Q=U[M2].name;return{sql:M===void 0||U[M2].isAlias?q(Q):q(M)+"."+q(Q),params:[]}}if(E1(U,n5)){if(E1(U.value,g4))return{sql:V(H.value++,U),params:[U],typings:["none"]};let M=U.value===null?null:U.encoder.mapToDriverValue(U.value);if(E1(M,M1))return this.buildQueryFromSourceParams([M],J);if(W)return{sql:this.mapInlineParam(M,J),params:[]};let Q=["none"];if(Y)Q=[Y(U.encoder)];return{sql:V(H.value++,M),params:[M],typings:Q}}if(E1(U,g4))return{sql:V(H.value++,U),params:[U],typings:["none"]};if(E1(U,M1.Aliased)&&U.fieldAlias!==void 0)return{sql:q(U.fieldAlias),params:[]};if(E1(U,v4)){if(U._.isWith)return{sql:q(U._.alias),params:[]};return this.buildQueryFromSourceParams([new i1("("),U._.sql,new i1(") "),new k4(U._.alias)],J)}if(l9(U)){if(U.schema)return{sql:q(U.schema)+"."+q(U.enumName),params:[]};return{sql:q(U.enumName),params:[]}}if(DX(U)){if(U.shouldOmitSQLParens?.())return this.buildQueryFromSourceParams([U.getSQL()],J);return this.buildQueryFromSourceParams([new i1("("),U.getSQL(),new i1(")")],J)}if(W)return{sql:this.mapInlineParam(U,J),params:[]};return{sql:V(H.value++,U),params:[U],typings:["none"]}}))}mapInlineParam($,{escapeString:G}){if($===null)return"null";if(typeof $==="number"||typeof $==="boolean")return $.toString();if(typeof $==="string")return G($);if(typeof $==="object"){let J=$.toString();if(J==="[object Object]")return G(JSON.stringify($));return G(J)}throw Error("Unexpected param value: "+$)}getSQL(){return this}as($){if($===void 0)return this;return new M1.Aliased(this,$)}mapWith($){return this.decoder=typeof $==="function"?{mapFromDriverValue:$}:$,this}inlineParams(){return this.shouldInlineParams=!0,this}if($){return $?this:void 0}}class k4{constructor($){this.value=$}static[S]="Name";brand;getSQL(){return new M1([this])}}var n9={mapFromDriverValue:($)=>$},a9={mapToDriverValue:($)=>$},oK={...n9,...a9};class n5{constructor($,G=a9){this.value=$,this.encoder=G}static[S]="Param";brand;getSQL(){return new M1([this])}}function f0($,...G){let J=[];if(G.length>0||$.length>0&&$[0]!=="")J.push(new i1($[0]));for(let[X,q]of G.entries())J.push(q,new i1($[X+1]));return new M1(J)}(($)=>{function G(){return new M1([])}$.empty=G;function J(H){return new M1(H)}$.fromList=J;function X(H){return new M1([new i1(H)])}$.raw=X;function q(H,U){let M=[];for(let[Q,F]of H.entries()){if(Q>0&&U!==void 0)M.push(U);M.push(F)}return new M1(M)}$.join=q;function V(H){return new k4(H)}$.identifier=V;function Y(H){return new g4(H)}$.placeholder=Y;function W(H,U){return new n5(H,U)}$.param=W})(f0||(f0={}));(($)=>{class G{constructor(J,X){this.sql=J,this.fieldAlias=X}static[S]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new G(this.sql,this.fieldAlias)}}$.Aliased=G})(M1||(M1={}));class g4{constructor($){this.name=$}static[S]="Placeholder";getSQL(){return new M1([this])}}var FX=Symbol.for("drizzle:IsDrizzleView");class s9{static[S]="View";[M2];[FX]=!0;constructor({name:$,schema:G,selectedFields:J,query:X}){this[M2]={name:$,originalName:$,schema:G,selectedFields:J,query:X,isExisting:!X,isAlias:!1}}getSQL(){return new M1([this])}}w0.prototype.getSQL=function(){return new M1([this])};U1.prototype.getSQL=function(){return new M1([this])};v4.prototype.getSQL=function(){return new M1([this])};function X0($,G){return{name:typeof $==="string"&&$.length>0?$:"",config:typeof $==="object"?$:G}}var a5=typeof TextDecoder>"u"?null:new TextDecoder;class s5{static[S]="SQLiteForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor($,G){if(this.reference=()=>{let{name:J,columns:X,foreignColumns:q}=$();return{name:J,columns:X,foreignTable:q[0].table,foreignColumns:q}},G)this._onUpdate=G.onUpdate,this._onDelete=G.onDelete}onUpdate($){return this._onUpdate=$,this}onDelete($){return this._onDelete=$,this}build($){return new t9($,this)}}class t9{constructor($,G){this.table=$,this.reference=G.reference,this.onUpdate=G._onUpdate,this.onDelete=G._onDelete}static[S]="SQLiteForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:G,foreignColumns:J}=this.reference(),X=G.map((Y)=>Y.name),q=J.map((Y)=>Y.name),V=[this.table[n1],...X,J[0].table[n1],...q];return $??`${V.join("_")}_fk`}}function e9($,G){return`${$[n1]}_${G.join("_")}_unique`}class B1 extends l5{static[S]="SQLiteColumnBuilder";foreignKeyConfigs=[];references($,G={}){return this.foreignKeyConfigs.push({ref:$,actions:G}),this}unique($){return this.config.isUnique=!0,this.config.uniqueName=$,this}generatedAlwaysAs($,G){return this.config.generated={as:$,type:"always",mode:G?.mode??"virtual"},this}buildForeignKeys($,G){return this.foreignKeyConfigs.map(({ref:J,actions:X})=>{return((q,V)=>{let Y=new s5(()=>{let W=q();return{columns:[$],foreignColumns:[W]}});if(V.onUpdate)Y.onUpdate(V.onUpdate);if(V.onDelete)Y.onDelete(V.onDelete);return Y.build(G)})(J,X)})}}class O1 extends w0{constructor($,G){if(!G.uniqueName)G.uniqueName=e9($,[G.name]);super($,G);this.table=$}static[S]="SQLiteColumn"}class $8 extends B1{static[S]="SQLiteBigIntBuilder";constructor($){super($,"bigint","SQLiteBigInt")}build($){return new G8($,this.config)}}class G8 extends O1{static[S]="SQLiteBigInt";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let G=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return BigInt(G.toString("utf8"))}return BigInt(a5.decode($))}mapToDriverValue($){return Buffer.from($.toString())}}class J8 extends B1{static[S]="SQLiteBlobJsonBuilder";constructor($){super($,"json","SQLiteBlobJson")}build($){return new X8($,this.config)}}class X8 extends O1{static[S]="SQLiteBlobJson";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let G=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return JSON.parse(G.toString("utf8"))}return JSON.parse(a5.decode($))}mapToDriverValue($){return Buffer.from(JSON.stringify($))}}class q8 extends B1{static[S]="SQLiteBlobBufferBuilder";constructor($){super($,"buffer","SQLiteBlobBuffer")}build($){return new Y8($,this.config)}}class Y8 extends O1{static[S]="SQLiteBlobBuffer";mapFromDriverValue($){if(Buffer.isBuffer($))return $;return Buffer.from($)}getSQLType(){return"blob"}}function V8($,G){let{name:J,config:X}=X0($,G);if(X?.mode==="json")return new J8(J);if(X?.mode==="bigint")return new $8(J);return new q8(J)}class W8 extends B1{static[S]="SQLiteCustomColumnBuilder";constructor($,G,J){super($,"custom","SQLiteCustomColumn");this.config.fieldConfig=G,this.config.customTypeParams=J}build($){return new H8($,this.config)}}class H8 extends O1{static[S]="SQLiteCustomColumn";sqlName;mapTo;mapFrom;constructor($,G){super($,G);this.sqlName=G.customTypeParams.dataType(G.fieldConfig),this.mapTo=G.customTypeParams.toDriver,this.mapFrom=G.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function h4($){return(G,J)=>{let{name:X,config:q}=X0(G,J);return new W8(X,q,$)}}class y4 extends B1{static[S]="SQLiteBaseIntegerBuilder";constructor($,G,J){super($,G,J);this.config.autoIncrement=!1}primaryKey($){if($?.autoIncrement)this.config.autoIncrement=!0;return this.config.hasDefault=!0,super.primaryKey()}}class m4 extends O1{static[S]="SQLiteBaseInteger";autoIncrement=this.config.autoIncrement;getSQLType(){return"integer"}}class U8 extends y4{static[S]="SQLiteIntegerBuilder";constructor($){super($,"number","SQLiteInteger")}build($){return new M8($,this.config)}}class M8 extends m4{static[S]="SQLiteInteger"}class z8 extends y4{static[S]="SQLiteTimestampBuilder";constructor($,G){super($,"date","SQLiteTimestamp");this.config.mode=G}defaultNow(){return this.default(f0`(cast((julianday('now') - 2440587.5)*86400000 as integer))`)}build($){return new Q8($,this.config)}}class Q8 extends m4{static[S]="SQLiteTimestamp";mode=this.config.mode;mapFromDriverValue($){if(this.config.mode==="timestamp")return new Date($*1000);return new Date($)}mapToDriverValue($){let G=$.getTime();if(this.config.mode==="timestamp")return Math.floor(G/1000);return G}}class D8 extends y4{static[S]="SQLiteBooleanBuilder";constructor($,G){super($,"boolean","SQLiteBoolean");this.config.mode=G}build($){return new K8($,this.config)}}class K8 extends m4{static[S]="SQLiteBoolean";mode=this.config.mode;mapFromDriverValue($){return Number($)===1}mapToDriverValue($){return $?1:0}}function $4($,G){let{name:J,config:X}=X0($,G);if(X?.mode==="timestamp"||X?.mode==="timestamp_ms")return new z8(J,X.mode);if(X?.mode==="boolean")return new D8(J,X.mode);return new U8(J)}class F8 extends B1{static[S]="SQLiteNumericBuilder";constructor($){super($,"string","SQLiteNumeric")}build($){return new R8($,this.config)}}class R8 extends O1{static[S]="SQLiteNumeric";mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){return"numeric"}}class B8 extends B1{static[S]="SQLiteNumericNumberBuilder";constructor($){super($,"number","SQLiteNumericNumber")}build($){return new O8($,this.config)}}class O8 extends O1{static[S]="SQLiteNumericNumber";mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){return"numeric"}}class A8 extends B1{static[S]="SQLiteNumericBigIntBuilder";constructor($){super($,"bigint","SQLiteNumericBigInt")}build($){return new w8($,this.config)}}class w8 extends O1{static[S]="SQLiteNumericBigInt";mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return"numeric"}}function j8($,G){let{name:J,config:X}=X0($,G),q=X?.mode;return q==="number"?new B8(J):q==="bigint"?new A8(J):new F8(J)}class N8 extends B1{static[S]="SQLiteRealBuilder";constructor($){super($,"number","SQLiteReal")}build($){return new Z8($,this.config)}}class Z8 extends O1{static[S]="SQLiteReal";getSQLType(){return"real"}}function _8($){return new N8($??"")}class P8 extends B1{static[S]="SQLiteTextBuilder";constructor($,G){super($,"string","SQLiteText");this.config.enumValues=G.enum,this.config.length=G.length}build($){return new L8($,this.config)}}class L8 extends O1{static[S]="SQLiteText";enumValues=this.config.enumValues;length=this.config.length;constructor($,G){super($,G)}getSQLType(){return`text${this.config.length?`(${this.config.length})`:""}`}}class T8 extends B1{static[S]="SQLiteTextJsonBuilder";constructor($){super($,"json","SQLiteTextJson")}build($){return new I8($,this.config)}}class I8 extends O1{static[S]="SQLiteTextJson";getSQLType(){return"text"}mapFromDriverValue($){return JSON.parse($)}mapToDriverValue($){return JSON.stringify($)}}function m1($,G={}){let{name:J,config:X}=X0($,G);if(X.mode==="json")return new T8(J);return new P8(J,X)}function E8(){return{blob:V8,customType:h4,integer:$4,numeric:j8,real:_8,text:m1}}var t5=Symbol.for("drizzle:SQLiteInlineForeignKeys");class G4 extends U1{static[S]="SQLiteTable";static Symbol=Object.assign({},U1.Symbol,{InlineForeignKeys:t5});[U1.Symbol.Columns];[t5]=[];[U1.Symbol.ExtraConfigBuilder]=void 0}function RX($,G,J,X,q=$){let V=new G4($,X,q),Y=typeof G==="function"?G(E8()):G,W=Object.fromEntries(Object.entries(Y).map(([U,M])=>{let Q=M;Q.setName(U);let F=Q.build(V);return V[t5].push(...Q.buildForeignKeys(F,V)),[U,F]})),H=Object.assign(V,W);if(H[U1.Symbol.Columns]=W,H[U1.Symbol.ExtraConfigColumns]=W,J)H[G4.Symbol.ExtraConfigBuilder]=J;return H}var f4=($,G,J)=>{return RX($,G,J)};class C8{constructor($,G){this.name=$,this.value=G}static[S]="SQLiteCheckBuilder";brand;build($){return new S8($,this)}}class S8{constructor($,G){this.table=$,this.name=G.name,this.value=G.value}static[S]="SQLiteCheck";name;value}function b8($,G){return new C8($,G)}function u4(...$){if($[0].columns)return new e5($[0].columns,$[0].name);return new e5($)}class e5{static[S]="SQLitePrimaryKeyBuilder";columns;name;constructor($,G){this.columns=$,this.name=G}build($){return new x8($,this.columns,this.name)}}class x8{constructor($,G,J){this.table=$,this.columns=G,this.name=J}static[S]="SQLitePrimaryKey";columns;name;getName(){return this.name??`${this.table[G4.Symbol.Name]}_${this.columns.map(($)=>$.name).join("_")}_pk`}}var p4=f4("entities",{id:m1("id").notNull(),entityType:m1("entityType").notNull(),content:m1("content").notNull(),contentHash:m1("contentHash").notNull(),visibility:m1("visibility",{enum:["public","shared","restricted"]}).notNull().default("public"),metadata:m1("metadata",{mode:"json"}).$type().notNull().default(f0`'{}'`),created:$4("created").notNull().$defaultFn(()=>Date.now()),updated:$4("updated").notNull().$defaultFn(()=>Date.now())},($)=>{return{pk:u4({columns:[$.id,$.entityType]}),visibilityCheck:b8("entities_visibility_check",f0`${$.visibility} IN ('public', 'shared', 'restricted')`)}});import{createClient as WR}from"@libsql/client";var v8=h4({dataType(){return"F32_BLOB(1536)"},toDriver($){return Buffer.from($.buffer)},fromDriver($){return new Float32Array($.buffer,$.byteOffset,$.byteLength/4)}});var l4=f4("embeddings",{entityId:m1("entity_id").notNull(),entityType:m1("entity_type").notNull(),embedding:v8("embedding").notNull(),contentHash:m1("content_hash").notNull()},($)=>{return{pk:u4({columns:[$.entityId,$.entityType]})}});import{openSync as BX,writeSync as OX}from"fs";class f1{static instance=null;level;context;useStderr;format;logFile;fileHandle;constructor($={},G){if(this.level=$.level??3,this.context=$.context??void 0,this.useStderr=$.useStderr??!1,this.format=$.format??"text",this.logFile=$.logFile,G!==void 0)this.fileHandle=G;else if(this.logFile)try{this.fileHandle=BX(this.logFile,"a")}catch{}}static getInstance($){if(!f1.instance)f1.instance=new f1($);else if($?.useStderr!==void 0)f1.instance.useStderr=$.useStderr;return f1.instance}static resetInstance(){f1.instance=null}static createFresh($){return new f1($)}formatEntry($,G,J){let X=new Date().toISOString();if(this.format==="json"){let q={ts:X,level:$,msg:G};if(this.context)q.ctx=this.context;if(J.length>0)q.data=J;return JSON.stringify(q)}return this.context?`[${X}] [${this.context}] ${G}`:`[${X}] ${G}`}write($,G,J,X){if(this.format==="json")$(this.formatEntry(G,J,X));else if(X.length>0)$(this.formatEntry(G,J,[]),...X);else $(this.formatEntry(G,J,[]));if(this.fileHandle!==void 0){let q=this.formatJsonEntry(G,J,X);try{OX(this.fileHandle,q+`
|
|
56
|
+
`).map((G)=>G.trim()).join(" ")};SG.O=function($){return this.inspectOpts.colors=this.useColors,K5.inspect($,this.inspectOpts)}});var kG=m((Kj,m6)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)m6.exports=PG();else m6.exports=vG()});var xJ=m((u_,bJ)=>{var P5=Object.prototype.hasOwnProperty,SJ=Object.prototype.toString,PJ=Object.defineProperty,LJ=Object.getOwnPropertyDescriptor,TJ=function(G){if(typeof Array.isArray==="function")return Array.isArray(G);return SJ.call(G)==="[object Array]"},IJ=function(G){if(!G||SJ.call(G)!=="[object Object]")return!1;var J=P5.call(G,"constructor"),X=G.constructor&&G.constructor.prototype&&P5.call(G.constructor.prototype,"isPrototypeOf");if(G.constructor&&!J&&!X)return!1;var q;for(q in G);return typeof q>"u"||P5.call(G,q)},EJ=function(G,J){if(PJ&&J.name==="__proto__")PJ(G,J.name,{enumerable:!0,configurable:!0,value:J.newValue,writable:!0});else G[J.name]=J.newValue},CJ=function(G,J){if(J==="__proto__"){if(!P5.call(G,J))return;else if(LJ)return LJ(G,J).value}return G[J]};bJ.exports=function $(){var G,J,X,q,V,Y,W=arguments[0],H=1,U=arguments.length,M=!1;if(typeof W==="boolean")M=W,W=arguments[1]||{},H=2;if(W==null||typeof W!=="object"&&typeof W!=="function")W={};for(;H<U;++H)if(G=arguments[H],G!=null){for(J in G)if(X=CJ(W,J),q=CJ(G,J),W!==q){if(M&&q&&(IJ(q)||(V=TJ(q)))){if(V)V=!1,Y=X&&TJ(X)?X:[];else Y=X&&IJ(X)?X:{};EJ(W,{name:J,newValue:$(M,Y,q)})}else if(typeof q<"u")EJ(W,{name:J,newValue:q})}}return W}});import{createClient as eF}from"@libsql/client";var b=Symbol.for("drizzle:entityKind");function E1($,G){if(!$||typeof $!=="object")return!1;if($ instanceof G)return!0;if(!Object.prototype.hasOwnProperty.call(G,b))throw Error(`Class "${G.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let J=Object.getPrototypeOf($).constructor;if(J)while(J){if(b in J&&J[b]===G[b])return!0;J=Object.getPrototypeOf(J)}return!1}class w0{constructor($,G){this.table=$,this.config=G,this.name=G.name,this.keyAsName=G.keyAsName,this.notNull=G.notNull,this.default=G.default,this.defaultFn=G.defaultFn,this.onUpdateFn=G.onUpdateFn,this.hasDefault=G.hasDefault,this.primary=G.primaryKey,this.isUnique=G.isUnique,this.uniqueName=G.uniqueName,this.uniqueType=G.uniqueType,this.dataType=G.dataType,this.columnType=G.columnType,this.generated=G.generated,this.generatedIdentity=G.generatedIdentity}static[b]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue($){return $}mapToDriverValue($){return $}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}class l5{static[b]="ColumnBuilder";config;constructor($,G,J){this.config={name:$,keyAsName:$==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:G,columnType:J,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default($){return this.config.default=$,this.config.hasDefault=!0,this}$defaultFn($){return this.config.defaultFn=$,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn($){return this.config.onUpdateFn=$,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName($){if(this.config.name!=="")return;this.config.name=$}}var n1=Symbol.for("drizzle:Name");function f9($,...G){return $(...G)}function u9($,G){return`${$[n1]}_${G.join("_")}_unique`}class t2 extends w0{constructor($,G){if(!G.uniqueName)G.uniqueName=u9($,[G.name]);super($,G);this.table=$}static[b]="PgColumn"}class UX extends t2{static[b]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op($){return this.indexConfig.opClass=$,this}}class MX extends t2{static[b]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor($,G){super($,G);this.enum=G.enum}getSQLType(){return this.enum.enumName}}var p9=Symbol.for("drizzle:isPgEnum");function l9($){return!!$&&typeof $==="function"&&p9 in $&&$[p9]===!0}class zX extends t2{static[b]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor($,G){super($,G);this.enum=G.enum}getSQLType(){return this.enum.enumName}}class v4{static[b]="Subquery";constructor($,G,J,X=!1,q=[]){this._={brand:"Subquery",sql:$,selectedFields:G,alias:J,isWith:X,usedTables:q}}}var r9="0.44.7";var r5,d5,d9={startActiveSpan($,G){if(!r5)return G();if(!d5)d5=r5.trace.getTracer("drizzle-orm",r9);return f9((J,X)=>X.startActiveSpan($,(q)=>{try{return G(q)}catch(V){throw q.setStatus({code:J.SpanStatusCode.ERROR,message:V instanceof Error?V.message:"Unknown error"}),V}finally{q.end()}}),r5,d5)}};var M2=Symbol.for("drizzle:ViewBaseConfig");var c5=Symbol.for("drizzle:Schema"),c9=Symbol.for("drizzle:Columns"),i9=Symbol.for("drizzle:ExtraConfigColumns"),i5=Symbol.for("drizzle:OriginalName"),o5=Symbol.for("drizzle:BaseName"),e2=Symbol.for("drizzle:IsAlias"),o9=Symbol.for("drizzle:ExtraConfigBuilder"),QX=Symbol.for("drizzle:IsDrizzleTable");class U1{static[b]="Table";static Symbol={Name:n1,Schema:c5,OriginalName:i5,Columns:c9,ExtraConfigColumns:i9,BaseName:o5,IsAlias:e2,ExtraConfigBuilder:o9};[n1];[i5];[c5];[c9];[i9];[o5];[e2]=!1;[QX]=!0;[o9]=void 0;constructor($,G,J){this[n1]=this[i5]=$,this[c5]=G,this[o5]=J}}function DX($){return $!==null&&$!==void 0&&typeof $.getSQL==="function"}function KX($){let G={sql:"",params:[]};for(let J of $)if(G.sql+=J.sql,G.params.push(...J.params),J.typings?.length){if(!G.typings)G.typings=[];G.typings.push(...J.typings)}return G}class i1{static[b]="StringChunk";value;constructor($){this.value=Array.isArray($)?$:[$]}getSQL(){return new M1([this])}}class M1{constructor($){this.queryChunks=$;for(let G of $)if(E1(G,U1)){let J=G[U1.Symbol.Schema];this.usedTables.push(J===void 0?G[U1.Symbol.Name]:J+"."+G[U1.Symbol.Name])}}static[b]="SQL";decoder=n9;shouldInlineParams=!1;usedTables=[];append($){return this.queryChunks.push(...$.queryChunks),this}toQuery($){return d9.startActiveSpan("drizzle.buildSQL",(G)=>{let J=this.buildQueryFromSourceParams(this.queryChunks,$);return G?.setAttributes({"drizzle.query.text":J.sql,"drizzle.query.params":JSON.stringify(J.params)}),J})}buildQueryFromSourceParams($,G){let J=Object.assign({},G,{inlineParams:G.inlineParams||this.shouldInlineParams,paramStartIndex:G.paramStartIndex||{value:0}}),{casing:X,escapeName:q,escapeParam:V,prepareTyping:Y,inlineParams:W,paramStartIndex:H}=J;return KX($.map((U)=>{if(E1(U,i1))return{sql:U.value.join(""),params:[]};if(E1(U,k4))return{sql:q(U.value),params:[]};if(U===void 0)return{sql:"",params:[]};if(Array.isArray(U)){let M=[new i1("(")];for(let[Q,F]of U.entries())if(M.push(F),Q<U.length-1)M.push(new i1(", "));return M.push(new i1(")")),this.buildQueryFromSourceParams(M,J)}if(E1(U,M1))return this.buildQueryFromSourceParams(U.queryChunks,{...J,inlineParams:W||U.shouldInlineParams});if(E1(U,U1)){let M=U[U1.Symbol.Schema],Q=U[U1.Symbol.Name];return{sql:M===void 0||U[e2]?q(Q):q(M)+"."+q(Q),params:[]}}if(E1(U,w0)){let M=X.getColumnCasing(U);if(G.invokeSource==="indexes")return{sql:q(M),params:[]};let Q=U.table[U1.Symbol.Schema];return{sql:U.table[e2]||Q===void 0?q(U.table[U1.Symbol.Name])+"."+q(M):q(Q)+"."+q(U.table[U1.Symbol.Name])+"."+q(M),params:[]}}if(E1(U,s9)){let M=U[M2].schema,Q=U[M2].name;return{sql:M===void 0||U[M2].isAlias?q(Q):q(M)+"."+q(Q),params:[]}}if(E1(U,n5)){if(E1(U.value,g4))return{sql:V(H.value++,U),params:[U],typings:["none"]};let M=U.value===null?null:U.encoder.mapToDriverValue(U.value);if(E1(M,M1))return this.buildQueryFromSourceParams([M],J);if(W)return{sql:this.mapInlineParam(M,J),params:[]};let Q=["none"];if(Y)Q=[Y(U.encoder)];return{sql:V(H.value++,M),params:[M],typings:Q}}if(E1(U,g4))return{sql:V(H.value++,U),params:[U],typings:["none"]};if(E1(U,M1.Aliased)&&U.fieldAlias!==void 0)return{sql:q(U.fieldAlias),params:[]};if(E1(U,v4)){if(U._.isWith)return{sql:q(U._.alias),params:[]};return this.buildQueryFromSourceParams([new i1("("),U._.sql,new i1(") "),new k4(U._.alias)],J)}if(l9(U)){if(U.schema)return{sql:q(U.schema)+"."+q(U.enumName),params:[]};return{sql:q(U.enumName),params:[]}}if(DX(U)){if(U.shouldOmitSQLParens?.())return this.buildQueryFromSourceParams([U.getSQL()],J);return this.buildQueryFromSourceParams([new i1("("),U.getSQL(),new i1(")")],J)}if(W)return{sql:this.mapInlineParam(U,J),params:[]};return{sql:V(H.value++,U),params:[U],typings:["none"]}}))}mapInlineParam($,{escapeString:G}){if($===null)return"null";if(typeof $==="number"||typeof $==="boolean")return $.toString();if(typeof $==="string")return G($);if(typeof $==="object"){let J=$.toString();if(J==="[object Object]")return G(JSON.stringify($));return G(J)}throw Error("Unexpected param value: "+$)}getSQL(){return this}as($){if($===void 0)return this;return new M1.Aliased(this,$)}mapWith($){return this.decoder=typeof $==="function"?{mapFromDriverValue:$}:$,this}inlineParams(){return this.shouldInlineParams=!0,this}if($){return $?this:void 0}}class k4{constructor($){this.value=$}static[b]="Name";brand;getSQL(){return new M1([this])}}var n9={mapFromDriverValue:($)=>$},a9={mapToDriverValue:($)=>$},nK={...n9,...a9};class n5{constructor($,G=a9){this.value=$,this.encoder=G}static[b]="Param";brand;getSQL(){return new M1([this])}}function f0($,...G){let J=[];if(G.length>0||$.length>0&&$[0]!=="")J.push(new i1($[0]));for(let[X,q]of G.entries())J.push(q,new i1($[X+1]));return new M1(J)}(($)=>{function G(){return new M1([])}$.empty=G;function J(H){return new M1(H)}$.fromList=J;function X(H){return new M1([new i1(H)])}$.raw=X;function q(H,U){let M=[];for(let[Q,F]of H.entries()){if(Q>0&&U!==void 0)M.push(U);M.push(F)}return new M1(M)}$.join=q;function V(H){return new k4(H)}$.identifier=V;function Y(H){return new g4(H)}$.placeholder=Y;function W(H,U){return new n5(H,U)}$.param=W})(f0||(f0={}));(($)=>{class G{constructor(J,X){this.sql=J,this.fieldAlias=X}static[b]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new G(this.sql,this.fieldAlias)}}$.Aliased=G})(M1||(M1={}));class g4{constructor($){this.name=$}static[b]="Placeholder";getSQL(){return new M1([this])}}var FX=Symbol.for("drizzle:IsDrizzleView");class s9{static[b]="View";[M2];[FX]=!0;constructor({name:$,schema:G,selectedFields:J,query:X}){this[M2]={name:$,originalName:$,schema:G,selectedFields:J,query:X,isExisting:!X,isAlias:!1}}getSQL(){return new M1([this])}}w0.prototype.getSQL=function(){return new M1([this])};U1.prototype.getSQL=function(){return new M1([this])};v4.prototype.getSQL=function(){return new M1([this])};function X0($,G){return{name:typeof $==="string"&&$.length>0?$:"",config:typeof $==="object"?$:G}}var a5=typeof TextDecoder>"u"?null:new TextDecoder;class s5{static[b]="SQLiteForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor($,G){if(this.reference=()=>{let{name:J,columns:X,foreignColumns:q}=$();return{name:J,columns:X,foreignTable:q[0].table,foreignColumns:q}},G)this._onUpdate=G.onUpdate,this._onDelete=G.onDelete}onUpdate($){return this._onUpdate=$,this}onDelete($){return this._onDelete=$,this}build($){return new t9($,this)}}class t9{constructor($,G){this.table=$,this.reference=G.reference,this.onUpdate=G._onUpdate,this.onDelete=G._onDelete}static[b]="SQLiteForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:G,foreignColumns:J}=this.reference(),X=G.map((Y)=>Y.name),q=J.map((Y)=>Y.name),V=[this.table[n1],...X,J[0].table[n1],...q];return $??`${V.join("_")}_fk`}}function e9($,G){return`${$[n1]}_${G.join("_")}_unique`}class B1 extends l5{static[b]="SQLiteColumnBuilder";foreignKeyConfigs=[];references($,G={}){return this.foreignKeyConfigs.push({ref:$,actions:G}),this}unique($){return this.config.isUnique=!0,this.config.uniqueName=$,this}generatedAlwaysAs($,G){return this.config.generated={as:$,type:"always",mode:G?.mode??"virtual"},this}buildForeignKeys($,G){return this.foreignKeyConfigs.map(({ref:J,actions:X})=>{return((q,V)=>{let Y=new s5(()=>{let W=q();return{columns:[$],foreignColumns:[W]}});if(V.onUpdate)Y.onUpdate(V.onUpdate);if(V.onDelete)Y.onDelete(V.onDelete);return Y.build(G)})(J,X)})}}class O1 extends w0{constructor($,G){if(!G.uniqueName)G.uniqueName=e9($,[G.name]);super($,G);this.table=$}static[b]="SQLiteColumn"}class $8 extends B1{static[b]="SQLiteBigIntBuilder";constructor($){super($,"bigint","SQLiteBigInt")}build($){return new G8($,this.config)}}class G8 extends O1{static[b]="SQLiteBigInt";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let G=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return BigInt(G.toString("utf8"))}return BigInt(a5.decode($))}mapToDriverValue($){return Buffer.from($.toString())}}class J8 extends B1{static[b]="SQLiteBlobJsonBuilder";constructor($){super($,"json","SQLiteBlobJson")}build($){return new X8($,this.config)}}class X8 extends O1{static[b]="SQLiteBlobJson";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let G=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return JSON.parse(G.toString("utf8"))}return JSON.parse(a5.decode($))}mapToDriverValue($){return Buffer.from(JSON.stringify($))}}class q8 extends B1{static[b]="SQLiteBlobBufferBuilder";constructor($){super($,"buffer","SQLiteBlobBuffer")}build($){return new Y8($,this.config)}}class Y8 extends O1{static[b]="SQLiteBlobBuffer";mapFromDriverValue($){if(Buffer.isBuffer($))return $;return Buffer.from($)}getSQLType(){return"blob"}}function V8($,G){let{name:J,config:X}=X0($,G);if(X?.mode==="json")return new J8(J);if(X?.mode==="bigint")return new $8(J);return new q8(J)}class W8 extends B1{static[b]="SQLiteCustomColumnBuilder";constructor($,G,J){super($,"custom","SQLiteCustomColumn");this.config.fieldConfig=G,this.config.customTypeParams=J}build($){return new H8($,this.config)}}class H8 extends O1{static[b]="SQLiteCustomColumn";sqlName;mapTo;mapFrom;constructor($,G){super($,G);this.sqlName=G.customTypeParams.dataType(G.fieldConfig),this.mapTo=G.customTypeParams.toDriver,this.mapFrom=G.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function h4($){return(G,J)=>{let{name:X,config:q}=X0(G,J);return new W8(X,q,$)}}class y4 extends B1{static[b]="SQLiteBaseIntegerBuilder";constructor($,G,J){super($,G,J);this.config.autoIncrement=!1}primaryKey($){if($?.autoIncrement)this.config.autoIncrement=!0;return this.config.hasDefault=!0,super.primaryKey()}}class m4 extends O1{static[b]="SQLiteBaseInteger";autoIncrement=this.config.autoIncrement;getSQLType(){return"integer"}}class U8 extends y4{static[b]="SQLiteIntegerBuilder";constructor($){super($,"number","SQLiteInteger")}build($){return new M8($,this.config)}}class M8 extends m4{static[b]="SQLiteInteger"}class z8 extends y4{static[b]="SQLiteTimestampBuilder";constructor($,G){super($,"date","SQLiteTimestamp");this.config.mode=G}defaultNow(){return this.default(f0`(cast((julianday('now') - 2440587.5)*86400000 as integer))`)}build($){return new Q8($,this.config)}}class Q8 extends m4{static[b]="SQLiteTimestamp";mode=this.config.mode;mapFromDriverValue($){if(this.config.mode==="timestamp")return new Date($*1000);return new Date($)}mapToDriverValue($){let G=$.getTime();if(this.config.mode==="timestamp")return Math.floor(G/1000);return G}}class D8 extends y4{static[b]="SQLiteBooleanBuilder";constructor($,G){super($,"boolean","SQLiteBoolean");this.config.mode=G}build($){return new K8($,this.config)}}class K8 extends m4{static[b]="SQLiteBoolean";mode=this.config.mode;mapFromDriverValue($){return Number($)===1}mapToDriverValue($){return $?1:0}}function $4($,G){let{name:J,config:X}=X0($,G);if(X?.mode==="timestamp"||X?.mode==="timestamp_ms")return new z8(J,X.mode);if(X?.mode==="boolean")return new D8(J,X.mode);return new U8(J)}class F8 extends B1{static[b]="SQLiteNumericBuilder";constructor($){super($,"string","SQLiteNumeric")}build($){return new R8($,this.config)}}class R8 extends O1{static[b]="SQLiteNumeric";mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){return"numeric"}}class B8 extends B1{static[b]="SQLiteNumericNumberBuilder";constructor($){super($,"number","SQLiteNumericNumber")}build($){return new O8($,this.config)}}class O8 extends O1{static[b]="SQLiteNumericNumber";mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){return"numeric"}}class A8 extends B1{static[b]="SQLiteNumericBigIntBuilder";constructor($){super($,"bigint","SQLiteNumericBigInt")}build($){return new w8($,this.config)}}class w8 extends O1{static[b]="SQLiteNumericBigInt";mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return"numeric"}}function j8($,G){let{name:J,config:X}=X0($,G),q=X?.mode;return q==="number"?new B8(J):q==="bigint"?new A8(J):new F8(J)}class N8 extends B1{static[b]="SQLiteRealBuilder";constructor($){super($,"number","SQLiteReal")}build($){return new Z8($,this.config)}}class Z8 extends O1{static[b]="SQLiteReal";getSQLType(){return"real"}}function _8($){return new N8($??"")}class P8 extends B1{static[b]="SQLiteTextBuilder";constructor($,G){super($,"string","SQLiteText");this.config.enumValues=G.enum,this.config.length=G.length}build($){return new L8($,this.config)}}class L8 extends O1{static[b]="SQLiteText";enumValues=this.config.enumValues;length=this.config.length;constructor($,G){super($,G)}getSQLType(){return`text${this.config.length?`(${this.config.length})`:""}`}}class T8 extends B1{static[b]="SQLiteTextJsonBuilder";constructor($){super($,"json","SQLiteTextJson")}build($){return new I8($,this.config)}}class I8 extends O1{static[b]="SQLiteTextJson";getSQLType(){return"text"}mapFromDriverValue($){return JSON.parse($)}mapToDriverValue($){return JSON.stringify($)}}function m1($,G={}){let{name:J,config:X}=X0($,G);if(X.mode==="json")return new T8(J);return new P8(J,X)}function E8(){return{blob:V8,customType:h4,integer:$4,numeric:j8,real:_8,text:m1}}var t5=Symbol.for("drizzle:SQLiteInlineForeignKeys");class G4 extends U1{static[b]="SQLiteTable";static Symbol=Object.assign({},U1.Symbol,{InlineForeignKeys:t5});[U1.Symbol.Columns];[t5]=[];[U1.Symbol.ExtraConfigBuilder]=void 0}function RX($,G,J,X,q=$){let V=new G4($,X,q),Y=typeof G==="function"?G(E8()):G,W=Object.fromEntries(Object.entries(Y).map(([U,M])=>{let Q=M;Q.setName(U);let F=Q.build(V);return V[t5].push(...Q.buildForeignKeys(F,V)),[U,F]})),H=Object.assign(V,W);if(H[U1.Symbol.Columns]=W,H[U1.Symbol.ExtraConfigColumns]=W,J)H[G4.Symbol.ExtraConfigBuilder]=J;return H}var f4=($,G,J)=>{return RX($,G,J)};class C8{constructor($,G){this.name=$,this.value=G}static[b]="SQLiteCheckBuilder";brand;build($){return new S8($,this)}}class S8{constructor($,G){this.table=$,this.name=G.name,this.value=G.value}static[b]="SQLiteCheck";name;value}function b8($,G){return new C8($,G)}function u4(...$){if($[0].columns)return new e5($[0].columns,$[0].name);return new e5($)}class e5{static[b]="SQLitePrimaryKeyBuilder";columns;name;constructor($,G){this.columns=$,this.name=G}build($){return new x8($,this.columns,this.name)}}class x8{constructor($,G,J){this.table=$,this.columns=G,this.name=J}static[b]="SQLitePrimaryKey";columns;name;getName(){return this.name??`${this.table[G4.Symbol.Name]}_${this.columns.map(($)=>$.name).join("_")}_pk`}}var p4=f4("entities",{id:m1("id").notNull(),entityType:m1("entityType").notNull(),content:m1("content").notNull(),contentHash:m1("contentHash").notNull(),visibility:m1("visibility",{enum:["public","shared","restricted"]}).notNull().default("public"),metadata:m1("metadata",{mode:"json"}).$type().notNull().default(f0`'{}'`),created:$4("created").notNull().$defaultFn(()=>Date.now()),updated:$4("updated").notNull().$defaultFn(()=>Date.now())},($)=>{return{pk:u4({columns:[$.id,$.entityType]}),visibilityCheck:b8("entities_visibility_check",f0`${$.visibility} IN ('public', 'shared', 'restricted')`)}});import{createClient as HR}from"@libsql/client";var v8=h4({dataType(){return"F32_BLOB(1536)"},toDriver($){return Buffer.from($.buffer)},fromDriver($){return new Float32Array($.buffer,$.byteOffset,$.byteLength/4)}});var l4=f4("embeddings",{entityId:m1("entity_id").notNull(),entityType:m1("entity_type").notNull(),embedding:v8("embedding").notNull(),contentHash:m1("content_hash").notNull()},($)=>{return{pk:u4({columns:[$.entityId,$.entityType]})}});import{openSync as BX,writeSync as OX}from"fs";class f1{static instance=null;level;context;useStderr;format;logFile;fileHandle;constructor($={},G){if(this.level=$.level??3,this.context=$.context??void 0,this.useStderr=$.useStderr??!1,this.format=$.format??"text",this.logFile=$.logFile,G!==void 0)this.fileHandle=G;else if(this.logFile)try{this.fileHandle=BX(this.logFile,"a")}catch{}}static getInstance($){if(!f1.instance)f1.instance=new f1($);else if($?.useStderr!==void 0)f1.instance.useStderr=$.useStderr;return f1.instance}static resetInstance(){f1.instance=null}static createFresh($){return new f1($)}formatEntry($,G,J){let X=new Date().toISOString();if(this.format==="json"){let q={ts:X,level:$,msg:G};if(this.context)q.ctx=this.context;if(J.length>0)q.data=J;return JSON.stringify(q)}return this.context?`[${X}] [${this.context}] ${G}`:`[${X}] ${G}`}write($,G,J,X){if(this.format==="json")$(this.formatEntry(G,J,X));else if(X.length>0)$(this.formatEntry(G,J,[]),...X);else $(this.formatEntry(G,J,[]));if(this.fileHandle!==void 0){let q=this.formatJsonEntry(G,J,X);try{OX(this.fileHandle,q+`
|
|
57
57
|
`)}catch{}}}formatJsonEntry($,G,J){let X={ts:new Date().toISOString(),level:$,msg:G};if(this.context)X.ctx=this.context;if(J.length>0)X.data=J;return JSON.stringify(X)}silly($,...G){if(this.level<=0)this.write(console.debug.bind(console),"silly",$,G)}verbose($,...G){if(this.level<=1)this.write(console.debug.bind(console),"verbose",$,G)}debug($,...G){if(this.level<=2)this.write(console.debug.bind(console),"debug",$,G)}info($,...G){if(this.level<=3){let J=this.useStderr?console.error.bind(console):console.info.bind(console);this.write(J,"info",$,G)}}warn($,...G){if(this.level<=4)this.write(console.warn.bind(console),"warn",$,G)}error($,...G){if(this.level<=5)this.write(console.error.bind(console),"error",$,G)}child($){return new f1({level:this.level,context:$,useStderr:this.useStderr,format:this.format},this.fileHandle)}setUseStderr($){this.useStderr=$}}var AX=f1.getInstance();var MM=x4(j6(),1);class t$ extends Error{name="Assertion";code="ERR_ASSERTION";constructor($,G,J,X,q){super($);if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);this.actual=G,this.expected=J,this.generated=q,this.operator=X}}function R($,G){jW(Boolean($),!1,!0,"ok","Expected value to be truthy",G)}function jW($,G,J,X,q,V){if(!$)throw V instanceof Error?V:new t$(V||q,G,J,X,!V)}var NW={};function i0($,G){let J=G||NW,X=typeof J.includeImageAlt==="boolean"?J.includeImageAlt:!0,q=typeof J.includeHtml==="boolean"?J.includeHtml:!0;return $G($,X,q)}function $G($,G,J){if(ZW($)){if("value"in $)return $.type==="html"&&!J?"":$.value;if(G&&"alt"in $&&$.alt)return $.alt;if("children"in $)return e$($.children,G,J)}if(Array.isArray($))return e$($,G,J);return""}function e$($,G,J){let X=[],q=-1;while(++q<$.length)X[q]=$G($[q],G,J);return X.join("")}function ZW($){return Boolean($&&typeof $==="object")}var N6={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\uD835\uDD04",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\uD835\uDD38",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\uD835\uDC9C",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\uD835\uDD05",Bopf:"\uD835\uDD39",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\uD835\uDC9E",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\uD835\uDD07",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\uD835\uDD3B",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\uD835\uDC9F",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\uD835\uDD08",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\uD835\uDD3C",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\uD835\uDD09",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\uD835\uDD3D",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\uD835\uDD0A",Gg:"\u22D9",Gopf:"\uD835\uDD3E",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\uD835\uDCA2",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\uD835\uDD40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\uD835\uDD0D",Jopf:"\uD835\uDD41",Jscr:"\uD835\uDCA5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\uD835\uDD0E",Kopf:"\uD835\uDD42",Kscr:"\uD835\uDCA6",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\uD835\uDD0F",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\uD835\uDD43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\uD835\uDD10",MinusPlus:"\u2213",Mopf:"\uD835\uDD44",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
58
58
|
`,Nfr:"\uD835\uDD11",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\uD835\uDCA9",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\uD835\uDD12",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\uD835\uDD46",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\uD835\uDCAA",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\uD835\uDD13",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\uD835\uDCAB",Psi:"\u03A8",QUOT:'"',Qfr:"\uD835\uDD14",Qopf:"\u211A",Qscr:"\uD835\uDCAC",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\uD835\uDD16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\uD835\uDD4A",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\uD835\uDCAE",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:"\t",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\uD835\uDD17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\uD835\uDD4B",TripleDot:"\u20DB",Tscr:"\uD835\uDCAF",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\uD835\uDD18",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\uD835\uDD4C",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\uD835\uDCB0",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\uD835\uDD19",Vopf:"\uD835\uDD4D",Vscr:"\uD835\uDCB1",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\uD835\uDD1A",Wopf:"\uD835\uDD4E",Wscr:"\uD835\uDCB2",Xfr:"\uD835\uDD1B",Xi:"\u039E",Xopf:"\uD835\uDD4F",Xscr:"\uD835\uDCB3",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\uD835\uDD1C",Yopf:"\uD835\uDD50",Yscr:"\uD835\uDCB4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\uD835\uDCB5",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\uD835\uDD1E",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\uD835\uDD52",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\uD835\uDCB6",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\uD835\uDD1F",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\uD835\uDD53",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\uD835\uDCB7",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\uD835\uDD20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\uD835\uDD54",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\uD835\uDCB8",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\uD835\uDD21",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\uD835\uDD55",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\uD835\uDCB9",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\uD835\uDD22",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\uD835\uDD56",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\uD835\uDD23",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\uD835\uDD57",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\uD835\uDCBB",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\uD835\uDD24",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\uD835\uDD58",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\uD835\uDD25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\uD835\uDD59",horbar:"\u2015",hscr:"\uD835\uDCBD",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\uD835\uDD26",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\uD835\uDD5A",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\uD835\uDCBE",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\uD835\uDD27",jmath:"\u0237",jopf:"\uD835\uDD5B",jscr:"\uD835\uDCBF",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\uD835\uDD28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\uD835\uDD5C",kscr:"\uD835\uDCC0",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\uD835\uDD29",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\uD835\uDD5D",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\uD835\uDCC1",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\uD835\uDD2A",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\uD835\uDD5E",mp:"\u2213",mscr:"\uD835\uDCC2",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\uD835\uDD2B",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\uD835\uDD5F",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\uD835\uDCC3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\uD835\uDD2C",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\uD835\uDD60",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\uD835\uDD2D",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\uD835\uDD61",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\uD835\uDCC5",psi:"\u03C8",puncsp:"\u2008",qfr:"\uD835\uDD2E",qint:"\u2A0C",qopf:"\uD835\uDD62",qprime:"\u2057",qscr:"\uD835\uDCC6",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\uD835\uDD2F",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\uD835\uDD63",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\uD835\uDCC7",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\uD835\uDD30",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\uD835\uDD64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\uD835\uDCC8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\uD835\uDD31",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\uD835\uDD65",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\uD835\uDCC9",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\uD835\uDD32",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\uD835\uDD66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\uD835\uDCCA",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\uD835\uDD33",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\uD835\uDD67",vprop:"\u221D",vrtri:"\u22B3",vscr:"\uD835\uDCCB",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\uD835\uDD34",wopf:"\uD835\uDD68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\uD835\uDCCC",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\uD835\uDD35",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\uD835\uDD69",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\uD835\uDCCD",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\uD835\uDD36",yicy:"\u0457",yopf:"\uD835\uDD6A",yscr:"\uD835\uDCCE",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\uD835\uDD37",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\uD835\uDD6B",zscr:"\uD835\uDCCF",zwj:"\u200D",zwnj:"\u200C"};var _W={}.hasOwnProperty;function w2($){return _W.call(N6,$)?N6[$]:!1}var D={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};var L={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4};var z={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"};var u1={ht:"\t",lf:`
|
|
59
|
-
`,cr:"\r",space:" ",exclamationMark:"!",quotationMark:'"',numberSign:"#",dollarSign:"$",percentSign:"%",ampersand:"&",apostrophe:"'",leftParenthesis:"(",rightParenthesis:")",asterisk:"*",plusSign:"+",comma:",",dash:"-",dot:".",slash:"/",digit0:"0",digit1:"1",digit2:"2",digit3:"3",digit4:"4",digit5:"5",digit6:"6",digit7:"7",digit8:"8",digit9:"9",colon:":",semicolon:";",lessThan:"<",equalsTo:"=",greaterThan:">",questionMark:"?",atSign:"@",uppercaseA:"A",uppercaseB:"B",uppercaseC:"C",uppercaseD:"D",uppercaseE:"E",uppercaseF:"F",uppercaseG:"G",uppercaseH:"H",uppercaseI:"I",uppercaseJ:"J",uppercaseK:"K",uppercaseL:"L",uppercaseM:"M",uppercaseN:"N",uppercaseO:"O",uppercaseP:"P",uppercaseQ:"Q",uppercaseR:"R",uppercaseS:"S",uppercaseT:"T",uppercaseU:"U",uppercaseV:"V",uppercaseW:"W",uppercaseX:"X",uppercaseY:"Y",uppercaseZ:"Z",leftSquareBracket:"[",backslash:"\\",rightSquareBracket:"]",caret:"^",underscore:"_",graveAccent:"`",lowercaseA:"a",lowercaseB:"b",lowercaseC:"c",lowercaseD:"d",lowercaseE:"e",lowercaseF:"f",lowercaseG:"g",lowercaseH:"h",lowercaseI:"i",lowercaseJ:"j",lowercaseK:"k",lowercaseL:"l",lowercaseM:"m",lowercaseN:"n",lowercaseO:"o",lowercaseP:"p",lowercaseQ:"q",lowercaseR:"r",lowercaseS:"s",lowercaseT:"t",lowercaseU:"u",lowercaseV:"v",lowercaseW:"w",lowercaseX:"x",lowercaseY:"y",lowercaseZ:"z",leftCurlyBrace:"{",verticalBar:"|",rightCurlyBrace:"}",tilde:"~",replacementCharacter:"\uFFFD"};function w1($,G,J,X){let q=$.length,V=0,Y;if(G<0)G=-G>q?0:q+G;else G=G>q?q:G;if(J=J>0?J:0,X.length<L.v8MaxSafeChunkSize)Y=Array.from(X),Y.unshift(G,J),$.splice(...Y);else{if(J)$.splice(G,J);while(V<X.length)Y=X.slice(V,V+L.v8MaxSafeChunkSize),Y.unshift(G,0),$.splice(...Y),V+=L.v8MaxSafeChunkSize,G+=L.v8MaxSafeChunkSize}}function S1($,G){if($.length>0)return w1($,$.length,0,G),$;return G}var GG={}.hasOwnProperty;function JG($){let G={},J=-1;while(++J<$.length)PW(G,$[J]);return G}function PW($,G){let J;for(J in G){let q=(GG.call($,J)?$[J]:void 0)||($[J]={}),V=G[J],Y;if(V)for(Y in V){if(!GG.call(q,Y))q[Y]=[];let W=V[Y];LW(q[Y],Array.isArray(W)?W:W?[W]:[])}}}function LW($,G){let J=-1,X=[];while(++J<G.length)(G[J].add==="after"?$:X).push(G[J]);w1($,0,0,X)}function J5($,G){let J=Number.parseInt($,G);if(J<D.ht||J===D.vt||J>D.cr&&J<D.space||J>D.tilde&&J<160||J>55295&&J<57344||J>64975&&J<65008||(J&65535)===65535||(J&65535)===65534||J>1114111)return u1.replacementCharacter;return String.fromCodePoint(J)}function F0($){return $.replace(/[\t\n\r ]+/g,u1.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}var p1=_0(/[A-Za-z]/),b1=_0(/[\dA-Za-z]/),XG=_0(/[#-'*+\--9=?A-Z^-~]/);function M4($){return $!==null&&($<D.space||$===D.del)}var z4=_0(/\d/),qG=_0(/[\dA-Fa-f]/),YG=_0(/[!-/:-@[-`{-~]/);function E($){return $!==null&&$<D.horizontalTab}function H1($){return $!==null&&($<D.nul||$===D.space)}function l($){return $===D.horizontalTab||$===D.virtualSpace||$===D.space}var VG=_0(/\p{P}|\p{S}/u),WG=_0(/\s/);function _0($){return G;function G(J){return J!==null&&J>-1&&$.test(String.fromCharCode(J))}}function d($,G,J,X){let q=X?X-1:Number.POSITIVE_INFINITY,V=0;return Y;function Y(H){if(l(H))return $.enter(J),W(H);return G(H)}function W(H){if(l(H)&&V++<q)return $.consume(H),W;return $.exit(J),G(H)}}var HG={tokenize:TW};function TW($){let G=$.attempt(this.parser.constructs.contentInitial,X,q),J;return G;function X(W){if(R(W===D.eof||E(W),"expected eol or eof"),W===D.eof){$.consume(W);return}return $.enter(z.lineEnding),$.consume(W),$.exit(z.lineEnding),d($,G,z.linePrefix)}function q(W){return R(W!==D.eof&&!E(W),"expected anything other than a line ending or EOF"),$.enter(z.paragraph),V(W)}function V(W){let H=$.enter(z.chunkText,{contentType:L.contentTypeText,previous:J});if(J)J.next=H;return J=H,Y(W)}function Y(W){if(W===D.eof){$.exit(z.chunkText),$.exit(z.paragraph),$.consume(W);return}if(E(W))return $.consume(W),$.exit(z.chunkText),V;return $.consume(W),Y}}var MG={tokenize:IW},UG={tokenize:EW};function IW($){let G=this,J=[],X=0,q,V,Y;return W;function W(h){if(X<J.length){let t=J[X];return G.containerState=t[1],R(t[0].continuation,"expected `continuation` to be defined on container construct"),$.attempt(t[0].continuation,H,U)(h)}return U(h)}function H(h){if(R(G.containerState,"expected `containerState` to be defined after continuation"),X++,G.containerState._closeFlow){if(G.containerState._closeFlow=void 0,q)k();let t=G.events.length,J1=t,Z;while(J1--)if(G.events[J1][0]==="exit"&&G.events[J1][1].type===z.chunkFlow){Z=G.events[J1][1].end;break}R(Z,"could not find previous flow chunk"),_(X);let $1=t;while($1<G.events.length)G.events[$1][1].end={...Z},$1++;return w1(G.events,J1+1,0,G.events.slice(t)),G.events.length=$1,U(h)}return W(h)}function U(h){if(X===J.length){if(!q)return F(h);if(q.currentConstruct&&q.currentConstruct.concrete)return j(h);G.interrupt=Boolean(q.currentConstruct&&!q._gfmTableDynamicInterruptHack)}return G.containerState={},$.check(UG,M,Q)(h)}function M(h){if(q)k();return _(X),F(h)}function Q(h){return G.parser.lazy[G.now().line]=X!==J.length,Y=G.now().offset,j(h)}function F(h){return G.containerState={},$.attempt(UG,K,j)(h)}function K(h){return R(G.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),R(G.containerState,"expected `containerState` to be defined on tokenizer"),X++,J.push([G.currentConstruct,G.containerState]),F(h)}function j(h){if(h===D.eof){if(q)k();_(0),$.consume(h);return}return q=q||G.parser.flow(G.now()),$.enter(z.chunkFlow,{_tokenizer:q,contentType:L.contentTypeFlow,previous:V}),N(h)}function N(h){if(h===D.eof){P($.exit(z.chunkFlow),!0),_(0),$.consume(h);return}if(E(h))return $.consume(h),P($.exit(z.chunkFlow)),X=0,G.interrupt=void 0,W;return $.consume(h),N}function P(h,t){R(q,"expected `childFlow` to be defined when continuing");let J1=G.sliceStream(h);if(t)J1.push(null);if(h.previous=V,V)V.next=h;if(V=h,q.defineSkip(h.start),q.write(J1),G.parser.lazy[h.start.line]){let Z=q.events.length;while(Z--)if(q.events[Z][1].start.offset<Y&&(!q.events[Z][1].end||q.events[Z][1].end.offset>Y))return;let $1=G.events.length,q1=$1,s,X1;while(q1--)if(G.events[q1][0]==="exit"&&G.events[q1][1].type===z.chunkFlow){if(s){X1=G.events[q1][1].end;break}s=!0}R(X1,"could not find previous flow chunk"),_(X),Z=$1;while(Z<G.events.length)G.events[Z][1].end={...X1},Z++;w1(G.events,q1+1,0,G.events.slice($1)),G.events.length=Z}}function _(h){let t=J.length;while(t-- >h){let J1=J[t];G.containerState=J1[1],R(J1[0].exit,"expected `exit` to be defined on container construct"),J1[0].exit.call(G,$)}J.length=h}function k(){R(G.containerState,"expected `containerState` to be defined when closing flow"),R(q,"expected `childFlow` to be defined when closing it"),q.write([D.eof]),V=void 0,q=void 0,G.containerState._closeFlow=void 0}}function EW($,G,J){return R(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,$.attempt(this.parser.constructs.document,G,J),z.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)}function j2($){if($===D.eof||H1($)||WG($))return L.characterGroupWhitespace;if(VG($))return L.characterGroupPunctuation}function N2($,G,J){let X=[],q=-1;while(++q<$.length){let V=$[q].resolveAll;if(V&&!X.includes(V))G=V(G,J),X.push(V)}return G}var Q4={name:"attention",resolveAll:CW,tokenize:SW};function CW($,G){let J=-1,X,q,V,Y,W,H,U,M;while(++J<$.length)if($[J][0]==="enter"&&$[J][1].type==="attentionSequence"&&$[J][1]._close){X=J;while(X--)if($[X][0]==="exit"&&$[X][1].type==="attentionSequence"&&$[X][1]._open&&G.sliceSerialize($[X][1]).charCodeAt(0)===G.sliceSerialize($[J][1]).charCodeAt(0)){if(($[X][1]._close||$[J][1]._open)&&($[J][1].end.offset-$[J][1].start.offset)%3&&!(($[X][1].end.offset-$[X][1].start.offset+$[J][1].end.offset-$[J][1].start.offset)%3))continue;H=$[X][1].end.offset-$[X][1].start.offset>1&&$[J][1].end.offset-$[J][1].start.offset>1?2:1;let Q={...$[X][1].end},F={...$[J][1].start};if(zG(Q,-H),zG(F,H),Y={type:H>1?z.strongSequence:z.emphasisSequence,start:Q,end:{...$[X][1].end}},W={type:H>1?z.strongSequence:z.emphasisSequence,start:{...$[J][1].start},end:F},V={type:H>1?z.strongText:z.emphasisText,start:{...$[X][1].end},end:{...$[J][1].start}},q={type:H>1?z.strong:z.emphasis,start:{...Y.start},end:{...W.end}},$[X][1].end={...Y.start},$[J][1].start={...W.end},U=[],$[X][1].end.offset-$[X][1].start.offset)U=S1(U,[["enter",$[X][1],G],["exit",$[X][1],G]]);if(U=S1(U,[["enter",q,G],["enter",Y,G],["exit",Y,G],["enter",V,G]]),R(G.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),U=S1(U,N2(G.parser.constructs.insideSpan.null,$.slice(X+1,J),G)),U=S1(U,[["exit",V,G],["enter",W,G],["exit",W,G],["exit",q,G]]),$[J][1].end.offset-$[J][1].start.offset)M=2,U=S1(U,[["enter",$[J][1],G],["exit",$[J][1],G]]);else M=0;w1($,X-1,J-X+3,U),J=X+U.length-M-2;break}}J=-1;while(++J<$.length)if($[J][1].type==="attentionSequence")$[J][1].type="data";return $}function SW($,G){let J=this.parser.constructs.attentionMarkers.null,X=this.previous,q=j2(X),V;return Y;function Y(H){return R(H===D.asterisk||H===D.underscore,"expected asterisk or underscore"),V=H,$.enter("attentionSequence"),W(H)}function W(H){if(H===V)return $.consume(H),W;let U=$.exit("attentionSequence"),M=j2(H);R(J,"expected `attentionMarkers` to be populated");let Q=!M||M===L.characterGroupPunctuation&&q||J.includes(H),F=!q||q===L.characterGroupPunctuation&&M||J.includes(X);return U._open=Boolean(V===D.asterisk?Q:Q&&(q||!F)),U._close=Boolean(V===D.asterisk?F:F&&(M||!Q)),G(H)}}function zG($,G){$.column+=G,$.offset+=G,$._bufferIndex+=G}var Z6={name:"autolink",tokenize:bW};function bW($,G,J){let X=0;return q;function q(K){return R(K===D.lessThan,"expected `<`"),$.enter(z.autolink),$.enter(z.autolinkMarker),$.consume(K),$.exit(z.autolinkMarker),$.enter(z.autolinkProtocol),V}function V(K){if(p1(K))return $.consume(K),Y;if(K===D.atSign)return J(K);return U(K)}function Y(K){if(K===D.plusSign||K===D.dash||K===D.dot||b1(K))return X=1,W(K);return U(K)}function W(K){if(K===D.colon)return $.consume(K),X=0,H;if((K===D.plusSign||K===D.dash||K===D.dot||b1(K))&&X++<L.autolinkSchemeSizeMax)return $.consume(K),W;return X=0,U(K)}function H(K){if(K===D.greaterThan)return $.exit(z.autolinkProtocol),$.enter(z.autolinkMarker),$.consume(K),$.exit(z.autolinkMarker),$.exit(z.autolink),G;if(K===D.eof||K===D.space||K===D.lessThan||M4(K))return J(K);return $.consume(K),H}function U(K){if(K===D.atSign)return $.consume(K),M;if(XG(K))return $.consume(K),U;return J(K)}function M(K){return b1(K)?Q(K):J(K)}function Q(K){if(K===D.dot)return $.consume(K),X=0,M;if(K===D.greaterThan)return $.exit(z.autolinkProtocol).type=z.autolinkEmail,$.enter(z.autolinkMarker),$.consume(K),$.exit(z.autolinkMarker),$.exit(z.autolink),G;return F(K)}function F(K){if((K===D.dash||b1(K))&&X++<L.autolinkDomainSizeMax){let j=K===D.dash?F:Q;return $.consume(K),j}return J(K)}}var P0={partial:!0,tokenize:xW};function xW($,G,J){return X;function X(V){return l(V)?d($,q,z.linePrefix)(V):q(V)}function q(V){return V===D.eof||E(V)?G(V):J(V)}}var X5={continuation:{tokenize:kW},exit:gW,name:"blockQuote",tokenize:vW};function vW($,G,J){let X=this;return q;function q(Y){if(Y===D.greaterThan){let W=X.containerState;if(R(W,"expected `containerState` to be defined in container"),!W.open)$.enter(z.blockQuote,{_container:!0}),W.open=!0;return $.enter(z.blockQuotePrefix),$.enter(z.blockQuoteMarker),$.consume(Y),$.exit(z.blockQuoteMarker),V}return J(Y)}function V(Y){if(l(Y))return $.enter(z.blockQuotePrefixWhitespace),$.consume(Y),$.exit(z.blockQuotePrefixWhitespace),$.exit(z.blockQuotePrefix),G;return $.exit(z.blockQuotePrefix),G(Y)}}function kW($,G,J){let X=this;return q;function q(Y){if(l(Y))return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,V,z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(Y);return V(Y)}function V(Y){return $.attempt(X5,G,J)(Y)}}function gW($){$.exit(z.blockQuote)}var q5={name:"characterEscape",tokenize:hW};function hW($,G,J){return X;function X(V){return R(V===D.backslash,"expected `\\`"),$.enter(z.characterEscape),$.enter(z.escapeMarker),$.consume(V),$.exit(z.escapeMarker),q}function q(V){if(YG(V))return $.enter(z.characterEscapeValue),$.consume(V),$.exit(z.characterEscapeValue),$.exit(z.characterEscape),G;return J(V)}}var Y5={name:"characterReference",tokenize:yW};function yW($,G,J){let X=this,q=0,V,Y;return W;function W(Q){return R(Q===D.ampersand,"expected `&`"),$.enter(z.characterReference),$.enter(z.characterReferenceMarker),$.consume(Q),$.exit(z.characterReferenceMarker),H}function H(Q){if(Q===D.numberSign)return $.enter(z.characterReferenceMarkerNumeric),$.consume(Q),$.exit(z.characterReferenceMarkerNumeric),U;return $.enter(z.characterReferenceValue),V=L.characterReferenceNamedSizeMax,Y=b1,M(Q)}function U(Q){if(Q===D.uppercaseX||Q===D.lowercaseX)return $.enter(z.characterReferenceMarkerHexadecimal),$.consume(Q),$.exit(z.characterReferenceMarkerHexadecimal),$.enter(z.characterReferenceValue),V=L.characterReferenceHexadecimalSizeMax,Y=qG,M;return $.enter(z.characterReferenceValue),V=L.characterReferenceDecimalSizeMax,Y=z4,M(Q)}function M(Q){if(Q===D.semicolon&&q){let F=$.exit(z.characterReferenceValue);if(Y===b1&&!w2(X.sliceSerialize(F)))return J(Q);return $.enter(z.characterReferenceMarker),$.consume(Q),$.exit(z.characterReferenceMarker),$.exit(z.characterReference),G}if(Y(Q)&&q++<V)return $.consume(Q),M;return J(Q)}}var QG={partial:!0,tokenize:fW},V5={concrete:!0,name:"codeFenced",tokenize:mW};function mW($,G,J){let X=this,q={partial:!0,tokenize:J1},V=0,Y=0,W;return H;function H(Z){return U(Z)}function U(Z){R(Z===D.graveAccent||Z===D.tilde,"expected `` ` `` or `~`");let $1=X.events[X.events.length-1];return V=$1&&$1[1].type===z.linePrefix?$1[2].sliceSerialize($1[1],!0).length:0,W=Z,$.enter(z.codeFenced),$.enter(z.codeFencedFence),$.enter(z.codeFencedFenceSequence),M(Z)}function M(Z){if(Z===W)return Y++,$.consume(Z),M;if(Y<L.codeFencedSequenceSizeMin)return J(Z);return $.exit(z.codeFencedFenceSequence),l(Z)?d($,Q,z.whitespace)(Z):Q(Z)}function Q(Z){if(Z===D.eof||E(Z))return $.exit(z.codeFencedFence),X.interrupt?G(Z):$.check(QG,N,t)(Z);return $.enter(z.codeFencedFenceInfo),$.enter(z.chunkString,{contentType:L.contentTypeString}),F(Z)}function F(Z){if(Z===D.eof||E(Z))return $.exit(z.chunkString),$.exit(z.codeFencedFenceInfo),Q(Z);if(l(Z))return $.exit(z.chunkString),$.exit(z.codeFencedFenceInfo),d($,K,z.whitespace)(Z);if(Z===D.graveAccent&&Z===W)return J(Z);return $.consume(Z),F}function K(Z){if(Z===D.eof||E(Z))return Q(Z);return $.enter(z.codeFencedFenceMeta),$.enter(z.chunkString,{contentType:L.contentTypeString}),j(Z)}function j(Z){if(Z===D.eof||E(Z))return $.exit(z.chunkString),$.exit(z.codeFencedFenceMeta),Q(Z);if(Z===D.graveAccent&&Z===W)return J(Z);return $.consume(Z),j}function N(Z){return R(E(Z),"expected eol"),$.attempt(q,t,P)(Z)}function P(Z){return R(E(Z),"expected eol"),$.enter(z.lineEnding),$.consume(Z),$.exit(z.lineEnding),_}function _(Z){return V>0&&l(Z)?d($,k,z.linePrefix,V+1)(Z):k(Z)}function k(Z){if(Z===D.eof||E(Z))return $.check(QG,N,t)(Z);return $.enter(z.codeFlowValue),h(Z)}function h(Z){if(Z===D.eof||E(Z))return $.exit(z.codeFlowValue),k(Z);return $.consume(Z),h}function t(Z){return $.exit(z.codeFenced),G(Z)}function J1(Z,$1,q1){let s=0;return X1;function X1(i){return R(E(i),"expected eol"),Z.enter(z.lineEnding),Z.consume(i),Z.exit(z.lineEnding),r1}function r1(i){return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),Z.enter(z.codeFencedFence),l(i)?d(Z,G1,z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(i):G1(i)}function G1(i){if(i===W)return Z.enter(z.codeFencedFenceSequence),x(i);return q1(i)}function x(i){if(i===W)return s++,Z.consume(i),x;if(s>=Y)return Z.exit(z.codeFencedFenceSequence),l(i)?d(Z,r,z.whitespace)(i):r(i);return q1(i)}function r(i){if(i===D.eof||E(i))return Z.exit(z.codeFencedFence),$1(i);return q1(i)}}}function fW($,G,J){let X=this;return q;function q(Y){if(Y===D.eof)return J(Y);return R(E(Y),"expected eol"),$.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),V}function V(Y){return X.parser.lazy[X.now().line]?J(Y):G(Y)}}var D4={name:"codeIndented",tokenize:pW},uW={partial:!0,tokenize:lW};function pW($,G,J){let X=this;return q;function q(U){return R(l(U)),$.enter(z.codeIndented),d($,V,z.linePrefix,L.tabSize+1)(U)}function V(U){let M=X.events[X.events.length-1];return M&&M[1].type===z.linePrefix&&M[2].sliceSerialize(M[1],!0).length>=L.tabSize?Y(U):J(U)}function Y(U){if(U===D.eof)return H(U);if(E(U))return $.attempt(uW,Y,H)(U);return $.enter(z.codeFlowValue),W(U)}function W(U){if(U===D.eof||E(U))return $.exit(z.codeFlowValue),Y(U);return $.consume(U),W}function H(U){return $.exit(z.codeIndented),G(U)}}function lW($,G,J){let X=this;return q;function q(Y){if(X.parser.lazy[X.now().line])return J(Y);if(E(Y))return $.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),q;return d($,V,z.linePrefix,L.tabSize+1)(Y)}function V(Y){let W=X.events[X.events.length-1];return W&&W[1].type===z.linePrefix&&W[2].sliceSerialize(W[1],!0).length>=L.tabSize?G(Y):E(Y)?q(Y):J(Y)}}var _6={name:"codeText",previous:DG,resolve:rW,tokenize:dW};function rW($){let G=$.length-4,J=3,X,q;if(($[J][1].type===z.lineEnding||$[J][1].type==="space")&&($[G][1].type===z.lineEnding||$[G][1].type==="space")){X=J;while(++X<G)if($[X][1].type===z.codeTextData){$[J][1].type=z.codeTextPadding,$[G][1].type=z.codeTextPadding,J+=2,G-=2;break}}X=J-1,G++;while(++X<=G)if(q===void 0){if(X!==G&&$[X][1].type!==z.lineEnding)q=X}else if(X===G||$[X][1].type===z.lineEnding){if($[q][1].type=z.codeTextData,X!==q+2)$[q][1].end=$[X-1][1].end,$.splice(q+2,X-q-2),G-=X-q-2,X=q+2;q=void 0}return $}function DG($){return $!==D.graveAccent||this.events[this.events.length-1][1].type===z.characterEscape}function dW($,G,J){let X=this,q=0,V,Y;return W;function W(F){return R(F===D.graveAccent,"expected `` ` ``"),R(DG.call(X,X.previous),"expected correct previous"),$.enter(z.codeText),$.enter(z.codeTextSequence),H(F)}function H(F){if(F===D.graveAccent)return $.consume(F),q++,H;return $.exit(z.codeTextSequence),U(F)}function U(F){if(F===D.eof)return J(F);if(F===D.space)return $.enter("space"),$.consume(F),$.exit("space"),U;if(F===D.graveAccent)return Y=$.enter(z.codeTextSequence),V=0,Q(F);if(E(F))return $.enter(z.lineEnding),$.consume(F),$.exit(z.lineEnding),U;return $.enter(z.codeTextData),M(F)}function M(F){if(F===D.eof||F===D.space||F===D.graveAccent||E(F))return $.exit(z.codeTextData),U(F);return $.consume(F),M}function Q(F){if(F===D.graveAccent)return $.consume(F),V++,Q;if(V===q)return $.exit(z.codeTextSequence),$.exit(z.codeText),G(F);return Y.type=z.codeTextData,M(F)}}class P6{constructor($){this.left=$?[...$]:[],this.right=[]}get($){if($<0||$>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+$+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if($<this.left.length)return this.left[$];return this.right[this.right.length-$+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice($,G){let J=G===null||G===void 0?Number.POSITIVE_INFINITY:G;if(J<this.left.length)return this.left.slice($,J);if($>this.left.length)return this.right.slice(this.right.length-J+this.left.length,this.right.length-$+this.left.length).reverse();return this.left.slice($).concat(this.right.slice(this.right.length-J+this.left.length).reverse())}splice($,G,J){let X=G||0;this.setCursor(Math.trunc($));let q=this.right.splice(this.right.length-X,Number.POSITIVE_INFINITY);if(J)K4(this.left,J);return q.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push($){this.setCursor(Number.POSITIVE_INFINITY),this.left.push($)}pushMany($){this.setCursor(Number.POSITIVE_INFINITY),K4(this.left,$)}unshift($){this.setCursor(0),this.right.push($)}unshiftMany($){this.setCursor(0),K4(this.right,$.reverse())}setCursor($){if($===this.left.length||$>this.left.length&&this.right.length===0||$<0&&this.left.length===0)return;if($<this.left.length){let G=this.left.splice($,Number.POSITIVE_INFINITY);K4(this.right,G.reverse())}else{let G=this.right.splice(this.left.length+this.right.length-$,Number.POSITIVE_INFINITY);K4(this.left,G.reverse())}}}function K4($,G){let J=0;if(G.length<L.v8MaxSafeChunkSize)$.push(...G);else while(J<G.length)$.push(...G.slice(J,J+L.v8MaxSafeChunkSize)),J+=L.v8MaxSafeChunkSize}function W5($){let G={},J=-1,X,q,V,Y,W,H,U,M=new P6($);while(++J<M.length){while(J in G)J=G[J];if(X=M.get(J),J&&X[1].type===z.chunkFlow&&M.get(J-1)[1].type===z.listItemPrefix){if(R(X[1]._tokenizer,"expected `_tokenizer` on subtokens"),H=X[1]._tokenizer.events,V=0,V<H.length&&H[V][1].type===z.lineEndingBlank)V+=2;if(V<H.length&&H[V][1].type===z.content)while(++V<H.length){if(H[V][1].type===z.content)break;if(H[V][1].type===z.chunkText)H[V][1]._isInFirstContentOfListItem=!0,V++}}if(X[0]==="enter"){if(X[1].contentType)Object.assign(G,cW(M,J)),J=G[J],U=!0}else if(X[1]._container){V=J,q=void 0;while(V--)if(Y=M.get(V),Y[1].type===z.lineEnding||Y[1].type===z.lineEndingBlank){if(Y[0]==="enter"){if(q)M.get(q)[1].type=z.lineEndingBlank;Y[1].type=z.lineEnding,q=V}}else if(Y[1].type===z.linePrefix||Y[1].type===z.listItemIndent);else break;if(q)X[1].end={...M.get(q)[1].start},W=M.slice(q,J),W.unshift(X),M.splice(q,J-q+1,W)}}return w1($,0,Number.POSITIVE_INFINITY,M.slice(0)),!U}function cW($,G){let J=$.get(G)[1],X=$.get(G)[2],q=G-1,V=[];R(J.contentType,"expected `contentType` on subtokens");let Y=J._tokenizer;if(!Y){if(Y=X.parser[J.contentType](J.start),J._contentTypeTextTrailing)Y._contentTypeTextTrailing=!0}let W=Y.events,H=[],U={},M,Q,F=-1,K=J,j=0,N=0,P=[N];while(K){while($.get(++q)[1]!==K);if(R(!Q||K.previous===Q,"expected previous to match"),R(!Q||Q.next===K,"expected next to match"),V.push(q),!K._tokenizer){if(M=X.sliceStream(K),!K.next)M.push(D.eof);if(Q)Y.defineSkip(K.start);if(K._isInFirstContentOfListItem)Y._gfmTasklistFirstContentOfListItem=!0;if(Y.write(M),K._isInFirstContentOfListItem)Y._gfmTasklistFirstContentOfListItem=void 0}Q=K,K=K.next}K=J;while(++F<W.length)if(W[F][0]==="exit"&&W[F-1][0]==="enter"&&W[F][1].type===W[F-1][1].type&&W[F][1].start.line!==W[F][1].end.line)R(K,"expected a current token"),N=F+1,P.push(N),K._tokenizer=void 0,K.previous=void 0,K=K.next;if(Y.events=[],K)K._tokenizer=void 0,K.previous=void 0,R(!K.next,"expected no next token");else P.pop();F=P.length;while(F--){let _=W.slice(P[F],P[F+1]),k=V.pop();R(k!==void 0,"expected a start position when splicing"),H.push([k,k+_.length-1]),$.splice(k,2,_)}H.reverse(),F=-1;while(++F<H.length)U[j+H[F][0]]=j+H[F][1],j+=H[F][1]-H[F][0]-1;return U}var L6={resolve:oW,tokenize:nW},iW={partial:!0,tokenize:aW};function oW($){return W5($),$}function nW($,G){let J;return X;function X(W){return R(W!==D.eof&&!E(W),"expected no eof or eol"),$.enter(z.content),J=$.enter(z.chunkContent,{contentType:L.contentTypeContent}),q(W)}function q(W){if(W===D.eof)return V(W);if(E(W))return $.check(iW,Y,V)(W);return $.consume(W),q}function V(W){return $.exit(z.chunkContent),$.exit(z.content),G(W)}function Y(W){return R(E(W),"expected eol"),$.consume(W),$.exit(z.chunkContent),R(J,"expected previous token"),J.next=$.enter(z.chunkContent,{contentType:L.contentTypeContent,previous:J}),J=J.next,q}}function aW($,G,J){let X=this;return q;function q(Y){return R(E(Y),"expected a line ending"),$.exit(z.chunkContent),$.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),d($,V,z.linePrefix)}function V(Y){if(Y===D.eof||E(Y))return J(Y);R(X.parser.constructs.disable.null,"expected `disable.null` to be populated");let W=X.events[X.events.length-1];if(!X.parser.constructs.disable.null.includes("codeIndented")&&W&&W[1].type===z.linePrefix&&W[2].sliceSerialize(W[1],!0).length>=L.tabSize)return G(Y);return $.interrupt(X.parser.constructs.flow,J,G)(Y)}}function H5($,G,J,X,q,V,Y,W,H){let U=H||Number.POSITIVE_INFINITY,M=0;return Q;function Q(_){if(_===D.lessThan)return $.enter(X),$.enter(q),$.enter(V),$.consume(_),$.exit(V),F;if(_===D.eof||_===D.space||_===D.rightParenthesis||M4(_))return J(_);return $.enter(X),$.enter(Y),$.enter(W),$.enter(z.chunkString,{contentType:L.contentTypeString}),N(_)}function F(_){if(_===D.greaterThan)return $.enter(V),$.consume(_),$.exit(V),$.exit(q),$.exit(X),G;return $.enter(W),$.enter(z.chunkString,{contentType:L.contentTypeString}),K(_)}function K(_){if(_===D.greaterThan)return $.exit(z.chunkString),$.exit(W),F(_);if(_===D.eof||_===D.lessThan||E(_))return J(_);return $.consume(_),_===D.backslash?j:K}function j(_){if(_===D.lessThan||_===D.greaterThan||_===D.backslash)return $.consume(_),K;return K(_)}function N(_){if(!M&&(_===D.eof||_===D.rightParenthesis||H1(_)))return $.exit(z.chunkString),$.exit(W),$.exit(Y),$.exit(X),G(_);if(M<U&&_===D.leftParenthesis)return $.consume(_),M++,N;if(_===D.rightParenthesis)return $.consume(_),M--,N;if(_===D.eof||_===D.space||_===D.leftParenthesis||M4(_))return J(_);return $.consume(_),_===D.backslash?P:N}function P(_){if(_===D.leftParenthesis||_===D.rightParenthesis||_===D.backslash)return $.consume(_),N;return N(_)}}function U5($,G,J,X,q,V){let Y=this,W=0,H;return U;function U(K){return R(K===D.leftSquareBracket,"expected `[`"),$.enter(X),$.enter(q),$.consume(K),$.exit(q),$.enter(V),M}function M(K){if(W>L.linkReferenceSizeMax||K===D.eof||K===D.leftSquareBracket||K===D.rightSquareBracket&&!H||K===D.caret&&!W&&"_hiddenFootnoteSupport"in Y.parser.constructs)return J(K);if(K===D.rightSquareBracket)return $.exit(V),$.enter(q),$.consume(K),$.exit(q),$.exit(X),G;if(E(K))return $.enter(z.lineEnding),$.consume(K),$.exit(z.lineEnding),M;return $.enter(z.chunkString,{contentType:L.contentTypeString}),Q(K)}function Q(K){if(K===D.eof||K===D.leftSquareBracket||K===D.rightSquareBracket||E(K)||W++>L.linkReferenceSizeMax)return $.exit(z.chunkString),M(K);if($.consume(K),!H)H=!l(K);return K===D.backslash?F:Q}function F(K){if(K===D.leftSquareBracket||K===D.backslash||K===D.rightSquareBracket)return $.consume(K),W++,Q;return Q(K)}}function M5($,G,J,X,q,V){let Y;return W;function W(F){if(F===D.quotationMark||F===D.apostrophe||F===D.leftParenthesis)return $.enter(X),$.enter(q),$.consume(F),$.exit(q),Y=F===D.leftParenthesis?D.rightParenthesis:F,H;return J(F)}function H(F){if(F===Y)return $.enter(q),$.consume(F),$.exit(q),$.exit(X),G;return $.enter(V),U(F)}function U(F){if(F===Y)return $.exit(V),H(Y);if(F===D.eof)return J(F);if(E(F))return $.enter(z.lineEnding),$.consume(F),$.exit(z.lineEnding),d($,U,z.linePrefix);return $.enter(z.chunkString,{contentType:L.contentTypeString}),M(F)}function M(F){if(F===Y||F===D.eof||E(F))return $.exit(z.chunkString),U(F);return $.consume(F),F===D.backslash?Q:M}function Q(F){if(F===Y||F===D.backslash)return $.consume(F),M;return M(F)}}function o0($,G){let J;return X;function X(q){if(E(q))return $.enter(z.lineEnding),$.consume(q),$.exit(z.lineEnding),J=!0,X;if(l(q))return d($,X,J?z.linePrefix:z.lineSuffix)(q);return G(q)}}var T6={name:"definition",tokenize:tW},sW={partial:!0,tokenize:eW};function tW($,G,J){let X=this,q;return V;function V(K){return $.enter(z.definition),Y(K)}function Y(K){return R(K===D.leftSquareBracket,"expected `[`"),U5.call(X,$,W,J,z.definitionLabel,z.definitionLabelMarker,z.definitionLabelString)(K)}function W(K){if(q=F0(X.sliceSerialize(X.events[X.events.length-1][1]).slice(1,-1)),K===D.colon)return $.enter(z.definitionMarker),$.consume(K),$.exit(z.definitionMarker),H;return J(K)}function H(K){return H1(K)?o0($,U)(K):U(K)}function U(K){return H5($,M,J,z.definitionDestination,z.definitionDestinationLiteral,z.definitionDestinationLiteralMarker,z.definitionDestinationRaw,z.definitionDestinationString)(K)}function M(K){return $.attempt(sW,Q,Q)(K)}function Q(K){return l(K)?d($,F,z.whitespace)(K):F(K)}function F(K){if(K===D.eof||E(K))return $.exit(z.definition),X.parser.defined.push(q),G(K);return J(K)}}function eW($,G,J){return X;function X(W){return H1(W)?o0($,q)(W):J(W)}function q(W){return M5($,V,J,z.definitionTitle,z.definitionTitleMarker,z.definitionTitleString)(W)}function V(W){return l(W)?d($,Y,z.whitespace)(W):Y(W)}function Y(W){return W===D.eof||E(W)?G(W):J(W)}}var I6={name:"hardBreakEscape",tokenize:$H};function $H($,G,J){return X;function X(V){return R(V===D.backslash,"expected `\\`"),$.enter(z.hardBreakEscape),$.consume(V),q}function q(V){if(E(V))return $.exit(z.hardBreakEscape),G(V);return J(V)}}var E6={name:"headingAtx",resolve:GH,tokenize:JH};function GH($,G){let J=$.length-2,X=3,q,V;if($[X][1].type===z.whitespace)X+=2;if(J-2>X&&$[J][1].type===z.whitespace)J-=2;if($[J][1].type===z.atxHeadingSequence&&(X===J-1||J-4>X&&$[J-2][1].type===z.whitespace))J-=X+1===J?2:4;if(J>X)q={type:z.atxHeadingText,start:$[X][1].start,end:$[J][1].end},V={type:z.chunkText,start:$[X][1].start,end:$[J][1].end,contentType:L.contentTypeText},w1($,X,J-X+1,[["enter",q,G],["enter",V,G],["exit",V,G],["exit",q,G]]);return $}function JH($,G,J){let X=0;return q;function q(M){return $.enter(z.atxHeading),V(M)}function V(M){return R(M===D.numberSign,"expected `#`"),$.enter(z.atxHeadingSequence),Y(M)}function Y(M){if(M===D.numberSign&&X++<L.atxHeadingOpeningFenceSizeMax)return $.consume(M),Y;if(M===D.eof||H1(M))return $.exit(z.atxHeadingSequence),W(M);return J(M)}function W(M){if(M===D.numberSign)return $.enter(z.atxHeadingSequence),H(M);if(M===D.eof||E(M))return $.exit(z.atxHeading),G(M);if(l(M))return d($,W,z.whitespace)(M);return $.enter(z.atxHeadingText),U(M)}function H(M){if(M===D.numberSign)return $.consume(M),H;return $.exit(z.atxHeadingSequence),W(M)}function U(M){if(M===D.eof||M===D.numberSign||H1(M))return $.exit(z.atxHeadingText),W(M);return $.consume(M),U}}var KG=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],C6=["pre","script","style","textarea"];var S6={concrete:!0,name:"htmlFlow",resolveTo:YH,tokenize:VH},XH={partial:!0,tokenize:HH},qH={partial:!0,tokenize:WH};function YH($){let G=$.length;while(G--)if($[G][0]==="enter"&&$[G][1].type===z.htmlFlow)break;if(G>1&&$[G-2][1].type===z.linePrefix)$[G][1].start=$[G-2][1].start,$[G+1][1].start=$[G-2][1].start,$.splice(G-2,2);return $}function VH($,G,J){let X=this,q,V,Y,W,H;return U;function U(O){return M(O)}function M(O){return R(O===D.lessThan,"expected `<`"),$.enter(z.htmlFlow),$.enter(z.htmlFlowData),$.consume(O),Q}function Q(O){if(O===D.exclamationMark)return $.consume(O),F;if(O===D.slash)return $.consume(O),V=!0,N;if(O===D.questionMark)return $.consume(O),q=L.htmlInstruction,X.interrupt?G:B;if(p1(O))return R(O!==null),$.consume(O),Y=String.fromCharCode(O),P;return J(O)}function F(O){if(O===D.dash)return $.consume(O),q=L.htmlComment,K;if(O===D.leftSquareBracket)return $.consume(O),q=L.htmlCdata,W=0,j;if(p1(O))return $.consume(O),q=L.htmlDeclaration,X.interrupt?G:B;return J(O)}function K(O){if(O===D.dash)return $.consume(O),X.interrupt?G:B;return J(O)}function j(O){let h1=L.cdataOpeningString;if(O===h1.charCodeAt(W++)){if($.consume(O),W===h1.length)return X.interrupt?G:G1;return j}return J(O)}function N(O){if(p1(O))return R(O!==null),$.consume(O),Y=String.fromCharCode(O),P;return J(O)}function P(O){if(O===D.eof||O===D.slash||O===D.greaterThan||H1(O)){let h1=O===D.slash,h0=Y.toLowerCase();if(!h1&&!V&&C6.includes(h0))return q=L.htmlRaw,X.interrupt?G(O):G1(O);if(KG.includes(Y.toLowerCase())){if(q=L.htmlBasic,h1)return $.consume(O),_;return X.interrupt?G(O):G1(O)}return q=L.htmlComplete,X.interrupt&&!X.parser.lazy[X.now().line]?J(O):V?k(O):h(O)}if(O===D.dash||b1(O))return $.consume(O),Y+=String.fromCharCode(O),P;return J(O)}function _(O){if(O===D.greaterThan)return $.consume(O),X.interrupt?G:G1;return J(O)}function k(O){if(l(O))return $.consume(O),k;return X1(O)}function h(O){if(O===D.slash)return $.consume(O),X1;if(O===D.colon||O===D.underscore||p1(O))return $.consume(O),t;if(l(O))return $.consume(O),h;return X1(O)}function t(O){if(O===D.dash||O===D.dot||O===D.colon||O===D.underscore||b1(O))return $.consume(O),t;return J1(O)}function J1(O){if(O===D.equalsTo)return $.consume(O),Z;if(l(O))return $.consume(O),J1;return h(O)}function Z(O){if(O===D.eof||O===D.lessThan||O===D.equalsTo||O===D.greaterThan||O===D.graveAccent)return J(O);if(O===D.quotationMark||O===D.apostrophe)return $.consume(O),H=O,$1;if(l(O))return $.consume(O),Z;return q1(O)}function $1(O){if(O===H)return $.consume(O),H=null,s;if(O===D.eof||E(O))return J(O);return $.consume(O),$1}function q1(O){if(O===D.eof||O===D.quotationMark||O===D.apostrophe||O===D.slash||O===D.lessThan||O===D.equalsTo||O===D.greaterThan||O===D.graveAccent||H1(O))return J1(O);return $.consume(O),q1}function s(O){if(O===D.slash||O===D.greaterThan||l(O))return h(O);return J(O)}function X1(O){if(O===D.greaterThan)return $.consume(O),r1;return J(O)}function r1(O){if(O===D.eof||E(O))return G1(O);if(l(O))return $.consume(O),r1;return J(O)}function G1(O){if(O===D.dash&&q===L.htmlComment)return $.consume(O),V1;if(O===D.lessThan&&q===L.htmlRaw)return $.consume(O),D1;if(O===D.greaterThan&&q===L.htmlDeclaration)return $.consume(O),c1;if(O===D.questionMark&&q===L.htmlInstruction)return $.consume(O),B;if(O===D.rightSquareBracket&&q===L.htmlCdata)return $.consume(O),J0;if(E(O)&&(q===L.htmlBasic||q===L.htmlComplete))return $.exit(z.htmlFlowData),$.check(XH,U0,x)(O);if(O===D.eof||E(O))return $.exit(z.htmlFlowData),x(O);return $.consume(O),G1}function x(O){return $.check(qH,r,U0)(O)}function r(O){return R(E(O)),$.enter(z.lineEnding),$.consume(O),$.exit(z.lineEnding),i}function i(O){if(O===D.eof||E(O))return x(O);return $.enter(z.htmlFlowData),G1(O)}function V1(O){if(O===D.dash)return $.consume(O),B;return G1(O)}function D1(O){if(O===D.slash)return $.consume(O),Y="",d1;return G1(O)}function d1(O){if(O===D.greaterThan){let h1=Y.toLowerCase();if(C6.includes(h1))return $.consume(O),c1;return G1(O)}if(p1(O)&&Y.length<L.htmlRawSizeMax)return R(O!==null),$.consume(O),Y+=String.fromCharCode(O),d1;return G1(O)}function J0(O){if(O===D.rightSquareBracket)return $.consume(O),B;return G1(O)}function B(O){if(O===D.greaterThan)return $.consume(O),c1;if(O===D.dash&&q===L.htmlComment)return $.consume(O),B;return G1(O)}function c1(O){if(O===D.eof||E(O))return $.exit(z.htmlFlowData),U0(O);return $.consume(O),c1}function U0(O){return $.exit(z.htmlFlow),G(O)}}function WH($,G,J){let X=this;return q;function q(Y){if(E(Y))return $.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),V;return J(Y)}function V(Y){return X.parser.lazy[X.now().line]?J(Y):G(Y)}}function HH($,G,J){return X;function X(q){return R(E(q),"expected a line ending"),$.enter(z.lineEnding),$.consume(q),$.exit(z.lineEnding),$.attempt(P0,G,J)}}var b6={name:"htmlText",tokenize:UH};function UH($,G,J){let X=this,q,V,Y;return W;function W(B){return R(B===D.lessThan,"expected `<`"),$.enter(z.htmlText),$.enter(z.htmlTextData),$.consume(B),H}function H(B){if(B===D.exclamationMark)return $.consume(B),U;if(B===D.slash)return $.consume(B),J1;if(B===D.questionMark)return $.consume(B),h;if(p1(B))return $.consume(B),q1;return J(B)}function U(B){if(B===D.dash)return $.consume(B),M;if(B===D.leftSquareBracket)return $.consume(B),V=0,j;if(p1(B))return $.consume(B),k;return J(B)}function M(B){if(B===D.dash)return $.consume(B),K;return J(B)}function Q(B){if(B===D.eof)return J(B);if(B===D.dash)return $.consume(B),F;if(E(B))return Y=Q,D1(B);return $.consume(B),Q}function F(B){if(B===D.dash)return $.consume(B),K;return Q(B)}function K(B){return B===D.greaterThan?V1(B):B===D.dash?F(B):Q(B)}function j(B){let c1=L.cdataOpeningString;if(B===c1.charCodeAt(V++))return $.consume(B),V===c1.length?N:j;return J(B)}function N(B){if(B===D.eof)return J(B);if(B===D.rightSquareBracket)return $.consume(B),P;if(E(B))return Y=N,D1(B);return $.consume(B),N}function P(B){if(B===D.rightSquareBracket)return $.consume(B),_;return N(B)}function _(B){if(B===D.greaterThan)return V1(B);if(B===D.rightSquareBracket)return $.consume(B),_;return N(B)}function k(B){if(B===D.eof||B===D.greaterThan)return V1(B);if(E(B))return Y=k,D1(B);return $.consume(B),k}function h(B){if(B===D.eof)return J(B);if(B===D.questionMark)return $.consume(B),t;if(E(B))return Y=h,D1(B);return $.consume(B),h}function t(B){return B===D.greaterThan?V1(B):h(B)}function J1(B){if(p1(B))return $.consume(B),Z;return J(B)}function Z(B){if(B===D.dash||b1(B))return $.consume(B),Z;return $1(B)}function $1(B){if(E(B))return Y=$1,D1(B);if(l(B))return $.consume(B),$1;return V1(B)}function q1(B){if(B===D.dash||b1(B))return $.consume(B),q1;if(B===D.slash||B===D.greaterThan||H1(B))return s(B);return J(B)}function s(B){if(B===D.slash)return $.consume(B),V1;if(B===D.colon||B===D.underscore||p1(B))return $.consume(B),X1;if(E(B))return Y=s,D1(B);if(l(B))return $.consume(B),s;return V1(B)}function X1(B){if(B===D.dash||B===D.dot||B===D.colon||B===D.underscore||b1(B))return $.consume(B),X1;return r1(B)}function r1(B){if(B===D.equalsTo)return $.consume(B),G1;if(E(B))return Y=r1,D1(B);if(l(B))return $.consume(B),r1;return s(B)}function G1(B){if(B===D.eof||B===D.lessThan||B===D.equalsTo||B===D.greaterThan||B===D.graveAccent)return J(B);if(B===D.quotationMark||B===D.apostrophe)return $.consume(B),q=B,x;if(E(B))return Y=G1,D1(B);if(l(B))return $.consume(B),G1;return $.consume(B),r}function x(B){if(B===q)return $.consume(B),q=void 0,i;if(B===D.eof)return J(B);if(E(B))return Y=x,D1(B);return $.consume(B),x}function r(B){if(B===D.eof||B===D.quotationMark||B===D.apostrophe||B===D.lessThan||B===D.equalsTo||B===D.graveAccent)return J(B);if(B===D.slash||B===D.greaterThan||H1(B))return s(B);return $.consume(B),r}function i(B){if(B===D.slash||B===D.greaterThan||H1(B))return s(B);return J(B)}function V1(B){if(B===D.greaterThan)return $.consume(B),$.exit(z.htmlTextData),$.exit(z.htmlText),G;return J(B)}function D1(B){return R(Y,"expected return state"),R(E(B),"expected eol"),$.exit(z.htmlTextData),$.enter(z.lineEnding),$.consume(B),$.exit(z.lineEnding),d1}function d1(B){return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),l(B)?d($,J0,z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(B):J0(B)}function J0(B){return $.enter(z.htmlTextData),Y(B)}}var n0={name:"labelEnd",resolveAll:DH,resolveTo:KH,tokenize:FH},MH={tokenize:RH},zH={tokenize:BH},QH={tokenize:OH};function DH($){let G=-1,J=[];while(++G<$.length){let X=$[G][1];if(J.push($[G]),X.type===z.labelImage||X.type===z.labelLink||X.type===z.labelEnd){let q=X.type===z.labelImage?4:2;X.type=z.data,G+=q}}if($.length!==J.length)w1($,0,$.length,J);return $}function KH($,G){let J=$.length,X=0,q,V,Y,W;while(J--)if(q=$[J][1],V){if(q.type===z.link||q.type===z.labelLink&&q._inactive)break;if($[J][0]==="enter"&&q.type===z.labelLink)q._inactive=!0}else if(Y){if($[J][0]==="enter"&&(q.type===z.labelImage||q.type===z.labelLink)&&!q._balanced){if(V=J,q.type!==z.labelLink){X=2;break}}}else if(q.type===z.labelEnd)Y=J;R(V!==void 0,"`open` is supposed to be found"),R(Y!==void 0,"`close` is supposed to be found");let H={type:$[V][1].type===z.labelLink?z.link:z.image,start:{...$[V][1].start},end:{...$[$.length-1][1].end}},U={type:z.label,start:{...$[V][1].start},end:{...$[Y][1].end}},M={type:z.labelText,start:{...$[V+X+2][1].end},end:{...$[Y-2][1].start}};return W=[["enter",H,G],["enter",U,G]],W=S1(W,$.slice(V+1,V+X+3)),W=S1(W,[["enter",M,G]]),R(G.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),W=S1(W,N2(G.parser.constructs.insideSpan.null,$.slice(V+X+4,Y-3),G)),W=S1(W,[["exit",M,G],$[Y-2],$[Y-1],["exit",U,G]]),W=S1(W,$.slice(Y+1)),W=S1(W,[["exit",H,G]]),w1($,V,$.length,W),$}function FH($,G,J){let X=this,q=X.events.length,V,Y;while(q--)if((X.events[q][1].type===z.labelImage||X.events[q][1].type===z.labelLink)&&!X.events[q][1]._balanced){V=X.events[q][1];break}return W;function W(F){if(R(F===D.rightSquareBracket,"expected `]`"),!V)return J(F);if(V._inactive)return Q(F);return Y=X.parser.defined.includes(F0(X.sliceSerialize({start:V.end,end:X.now()}))),$.enter(z.labelEnd),$.enter(z.labelMarker),$.consume(F),$.exit(z.labelMarker),$.exit(z.labelEnd),H}function H(F){if(F===D.leftParenthesis)return $.attempt(MH,M,Y?M:Q)(F);if(F===D.leftSquareBracket)return $.attempt(zH,M,Y?U:Q)(F);return Y?M(F):Q(F)}function U(F){return $.attempt(QH,M,Q)(F)}function M(F){return G(F)}function Q(F){return V._balanced=!0,J(F)}}function RH($,G,J){return X;function X(Q){return R(Q===D.leftParenthesis,"expected left paren"),$.enter(z.resource),$.enter(z.resourceMarker),$.consume(Q),$.exit(z.resourceMarker),q}function q(Q){return H1(Q)?o0($,V)(Q):V(Q)}function V(Q){if(Q===D.rightParenthesis)return M(Q);return H5($,Y,W,z.resourceDestination,z.resourceDestinationLiteral,z.resourceDestinationLiteralMarker,z.resourceDestinationRaw,z.resourceDestinationString,L.linkResourceDestinationBalanceMax)(Q)}function Y(Q){return H1(Q)?o0($,H)(Q):M(Q)}function W(Q){return J(Q)}function H(Q){if(Q===D.quotationMark||Q===D.apostrophe||Q===D.leftParenthesis)return M5($,U,J,z.resourceTitle,z.resourceTitleMarker,z.resourceTitleString)(Q);return M(Q)}function U(Q){return H1(Q)?o0($,M)(Q):M(Q)}function M(Q){if(Q===D.rightParenthesis)return $.enter(z.resourceMarker),$.consume(Q),$.exit(z.resourceMarker),$.exit(z.resource),G;return J(Q)}}function BH($,G,J){let X=this;return q;function q(W){return R(W===D.leftSquareBracket,"expected left bracket"),U5.call(X,$,V,Y,z.reference,z.referenceMarker,z.referenceString)(W)}function V(W){return X.parser.defined.includes(F0(X.sliceSerialize(X.events[X.events.length-1][1]).slice(1,-1)))?G(W):J(W)}function Y(W){return J(W)}}function OH($,G,J){return X;function X(V){return R(V===D.leftSquareBracket,"expected left bracket"),$.enter(z.reference),$.enter(z.referenceMarker),$.consume(V),$.exit(z.referenceMarker),q}function q(V){if(V===D.rightSquareBracket)return $.enter(z.referenceMarker),$.consume(V),$.exit(z.referenceMarker),$.exit(z.reference),G;return J(V)}}var x6={name:"labelStartImage",resolveAll:n0.resolveAll,tokenize:AH};function AH($,G,J){let X=this;return q;function q(W){return R(W===D.exclamationMark,"expected `!`"),$.enter(z.labelImage),$.enter(z.labelImageMarker),$.consume(W),$.exit(z.labelImageMarker),V}function V(W){if(W===D.leftSquareBracket)return $.enter(z.labelMarker),$.consume(W),$.exit(z.labelMarker),$.exit(z.labelImage),Y;return J(W)}function Y(W){return W===D.caret&&"_hiddenFootnoteSupport"in X.parser.constructs?J(W):G(W)}}var v6={name:"labelStartLink",resolveAll:n0.resolveAll,tokenize:wH};function wH($,G,J){let X=this;return q;function q(Y){return R(Y===D.leftSquareBracket,"expected `[`"),$.enter(z.labelLink),$.enter(z.labelMarker),$.consume(Y),$.exit(z.labelMarker),$.exit(z.labelLink),V}function V(Y){return Y===D.caret&&"_hiddenFootnoteSupport"in X.parser.constructs?J(Y):G(Y)}}var F4={name:"lineEnding",tokenize:jH};function jH($,G){return J;function J(X){return R(E(X),"expected eol"),$.enter(z.lineEnding),$.consume(X),$.exit(z.lineEnding),d($,G,z.linePrefix)}}var a0={name:"thematicBreak",tokenize:NH};function NH($,G,J){let X=0,q;return V;function V(U){return $.enter(z.thematicBreak),Y(U)}function Y(U){return R(U===D.asterisk||U===D.dash||U===D.underscore,"expected `*`, `-`, or `_`"),q=U,W(U)}function W(U){if(U===q)return $.enter(z.thematicBreakSequence),H(U);if(X>=L.thematicBreakMarkerCountMin&&(U===D.eof||E(U)))return $.exit(z.thematicBreak),G(U);return J(U)}function H(U){if(U===q)return $.consume(U),X++,H;return $.exit(z.thematicBreakSequence),l(U)?d($,W,z.whitespace)(U):W(U)}}var _1={continuation:{tokenize:LH},exit:IH,name:"list",tokenize:PH},ZH={partial:!0,tokenize:EH},_H={partial:!0,tokenize:TH};function PH($,G,J){let X=this,q=X.events[X.events.length-1],V=q&&q[1].type===z.linePrefix?q[2].sliceSerialize(q[1],!0).length:0,Y=0;return W;function W(K){R(X.containerState,"expected state");let j=X.containerState.type||(K===D.asterisk||K===D.plusSign||K===D.dash?z.listUnordered:z.listOrdered);if(j===z.listUnordered?!X.containerState.marker||K===X.containerState.marker:z4(K)){if(!X.containerState.type)X.containerState.type=j,$.enter(j,{_container:!0});if(j===z.listUnordered)return $.enter(z.listItemPrefix),K===D.asterisk||K===D.dash?$.check(a0,J,U)(K):U(K);if(!X.interrupt||K===D.digit1)return $.enter(z.listItemPrefix),$.enter(z.listItemValue),H(K)}return J(K)}function H(K){if(R(X.containerState,"expected state"),z4(K)&&++Y<L.listItemValueSizeMax)return $.consume(K),H;if((!X.interrupt||Y<2)&&(X.containerState.marker?K===X.containerState.marker:K===D.rightParenthesis||K===D.dot))return $.exit(z.listItemValue),U(K);return J(K)}function U(K){return R(X.containerState,"expected state"),R(K!==D.eof,"eof (`null`) is not a marker"),$.enter(z.listItemMarker),$.consume(K),$.exit(z.listItemMarker),X.containerState.marker=X.containerState.marker||K,$.check(P0,X.interrupt?J:M,$.attempt(ZH,F,Q))}function M(K){return R(X.containerState,"expected state"),X.containerState.initialBlankLine=!0,V++,F(K)}function Q(K){if(l(K))return $.enter(z.listItemPrefixWhitespace),$.consume(K),$.exit(z.listItemPrefixWhitespace),F;return J(K)}function F(K){return R(X.containerState,"expected state"),X.containerState.size=V+X.sliceSerialize($.exit(z.listItemPrefix),!0).length,G(K)}}function LH($,G,J){let X=this;return R(X.containerState,"expected state"),X.containerState._closeFlow=void 0,$.check(P0,q,V);function q(W){return R(X.containerState,"expected state"),R(typeof X.containerState.size==="number","expected size"),X.containerState.furtherBlankLines=X.containerState.furtherBlankLines||X.containerState.initialBlankLine,d($,G,z.listItemIndent,X.containerState.size+1)(W)}function V(W){if(R(X.containerState,"expected state"),X.containerState.furtherBlankLines||!l(W))return X.containerState.furtherBlankLines=void 0,X.containerState.initialBlankLine=void 0,Y(W);return X.containerState.furtherBlankLines=void 0,X.containerState.initialBlankLine=void 0,$.attempt(_H,G,Y)(W)}function Y(W){return R(X.containerState,"expected state"),X.containerState._closeFlow=!0,X.interrupt=void 0,R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,$.attempt(_1,G,J),z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(W)}}function TH($,G,J){let X=this;return R(X.containerState,"expected state"),R(typeof X.containerState.size==="number","expected size"),d($,q,z.listItemIndent,X.containerState.size+1);function q(V){R(X.containerState,"expected state");let Y=X.events[X.events.length-1];return Y&&Y[1].type===z.listItemIndent&&Y[2].sliceSerialize(Y[1],!0).length===X.containerState.size?G(V):J(V)}}function IH($){R(this.containerState,"expected state"),R(typeof this.containerState.type==="string","expected type"),$.exit(this.containerState.type)}function EH($,G,J){let X=this;return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,q,z.listItemPrefixWhitespace,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize+1);function q(V){let Y=X.events[X.events.length-1];return!l(V)&&Y&&Y[1].type===z.listItemPrefixWhitespace?G(V):J(V)}}var z5={name:"setextUnderline",resolveTo:CH,tokenize:SH};function CH($,G){let J=$.length,X,q,V;while(J--)if($[J][0]==="enter"){if($[J][1].type===z.content){X=J;break}if($[J][1].type===z.paragraph)q=J}else{if($[J][1].type===z.content)$.splice(J,1);if(!V&&$[J][1].type===z.definition)V=J}R(q!==void 0,"expected a `text` index to be found"),R(X!==void 0,"expected a `text` index to be found"),R($[X][2]===G,"enter context should be same"),R($[$.length-1][2]===G,"enter context should be same");let Y={type:z.setextHeading,start:{...$[X][1].start},end:{...$[$.length-1][1].end}};if($[q][1].type=z.setextHeadingText,V)$.splice(q,0,["enter",Y,G]),$.splice(V+1,0,["exit",$[X][1],G]),$[X][1].end={...$[V][1].end};else $[X][1]=Y;return $.push(["exit",Y,G]),$}function SH($,G,J){let X=this,q;return V;function V(U){let M=X.events.length,Q;R(U===D.dash||U===D.equalsTo,"expected `=` or `-`");while(M--)if(X.events[M][1].type!==z.lineEnding&&X.events[M][1].type!==z.linePrefix&&X.events[M][1].type!==z.content){Q=X.events[M][1].type===z.paragraph;break}if(!X.parser.lazy[X.now().line]&&(X.interrupt||Q))return $.enter(z.setextHeadingLine),q=U,Y(U);return J(U)}function Y(U){return $.enter(z.setextHeadingLineSequence),W(U)}function W(U){if(U===q)return $.consume(U),W;return $.exit(z.setextHeadingLineSequence),l(U)?d($,H,z.lineSuffix)(U):H(U)}function H(U){if(U===D.eof||E(U))return $.exit(z.setextHeadingLine),G(U);return J(U)}}var FG={tokenize:bH};function bH($){let G=this,J=$.attempt(P0,X,$.attempt(this.parser.constructs.flowInitial,q,d($,$.attempt(this.parser.constructs.flow,q,$.attempt(L6,q)),z.linePrefix)));return J;function X(V){if(R(V===D.eof||E(V),"expected eol or eof"),V===D.eof){$.consume(V);return}return $.enter(z.lineEndingBlank),$.consume(V),$.exit(z.lineEndingBlank),G.currentConstruct=void 0,J}function q(V){if(R(V===D.eof||E(V),"expected eol or eof"),V===D.eof){$.consume(V);return}return $.enter(z.lineEnding),$.consume(V),$.exit(z.lineEnding),G.currentConstruct=void 0,J}}var RG={resolveAll:wG()},BG=AG("string"),OG=AG("text");function AG($){return{resolveAll:wG($==="text"?xH:void 0),tokenize:G};function G(J){let X=this,q=this.parser.constructs[$],V=J.attempt(q,Y,W);return Y;function Y(M){return U(M)?V(M):W(M)}function W(M){if(M===D.eof){J.consume(M);return}return J.enter(z.data),J.consume(M),H}function H(M){if(U(M))return J.exit(z.data),V(M);return J.consume(M),H}function U(M){if(M===D.eof)return!0;let Q=q[M],F=-1;if(Q){R(Array.isArray(Q),"expected `disable.null` to be populated");while(++F<Q.length){let K=Q[F];if(!K.previous||K.previous.call(X,X.previous))return!0}}return!1}}}function wG($){return G;function G(J,X){let q=-1,V;while(++q<=J.length)if(V===void 0){if(J[q]&&J[q][1].type===z.data)V=q,q++}else if(!J[q]||J[q][1].type!==z.data){if(q!==V+2)J[V][1].end=J[q-1][1].end,J.splice(V+2,q-V-2),q=V+2;V=void 0}return $?$(J,X):J}}function xH($,G){let J=0;while(++J<=$.length)if((J===$.length||$[J][1].type===z.lineEnding)&&$[J-1][1].type===z.data){let X=$[J-1][1],q=G.sliceStream(X),V=q.length,Y=-1,W=0,H;while(V--){let U=q[V];if(typeof U==="string"){Y=U.length;while(U.charCodeAt(Y-1)===D.space)W++,Y--;if(Y)break;Y=-1}else if(U===D.horizontalTab)H=!0,W++;else if(U===D.virtualSpace);else{V++;break}}if(G._contentTypeTextTrailing&&J===$.length)W=0;if(W){let U={type:J===$.length||H||W<L.hardBreakPrefixSizeMin?z.lineSuffix:z.hardBreakTrailing,start:{_bufferIndex:V?Y:X.start._bufferIndex+Y,_index:X.start._index+V,line:X.end.line,column:X.end.column-W,offset:X.end.offset-W},end:{...X.end}};if(X.end={...U.start},X.start.offset===X.end.offset)Object.assign(X,U);else $.splice(J,0,["enter",U,G],["exit",U,G]),J+=2}J++}return $}var k6={};m9(k6,{text:()=>mH,string:()=>yH,insideSpan:()=>fH,flowInitial:()=>gH,flow:()=>hH,document:()=>vH,disable:()=>pH,contentInitial:()=>kH,attentionMarkers:()=>uH});var vH={[D.asterisk]:_1,[D.plusSign]:_1,[D.dash]:_1,[D.digit0]:_1,[D.digit1]:_1,[D.digit2]:_1,[D.digit3]:_1,[D.digit4]:_1,[D.digit5]:_1,[D.digit6]:_1,[D.digit7]:_1,[D.digit8]:_1,[D.digit9]:_1,[D.greaterThan]:X5},kH={[D.leftSquareBracket]:T6},gH={[D.horizontalTab]:D4,[D.virtualSpace]:D4,[D.space]:D4},hH={[D.numberSign]:E6,[D.asterisk]:a0,[D.dash]:[z5,a0],[D.lessThan]:S6,[D.equalsTo]:z5,[D.underscore]:a0,[D.graveAccent]:V5,[D.tilde]:V5},yH={[D.ampersand]:Y5,[D.backslash]:q5},mH={[D.carriageReturn]:F4,[D.lineFeed]:F4,[D.carriageReturnLineFeed]:F4,[D.exclamationMark]:x6,[D.ampersand]:Y5,[D.asterisk]:Q4,[D.lessThan]:[Z6,b6],[D.leftSquareBracket]:v6,[D.backslash]:[I6,q5],[D.rightSquareBracket]:n0,[D.underscore]:Q4,[D.graveAccent]:_6},fH={null:[Q4,RG]},uH={null:[D.asterisk,D.underscore]},pH={null:[]};var gG=x4(kG(),1);var e0=gG.default("micromark");function hG($,G,J){let X={_bufferIndex:-1,_index:0,line:J&&J.line||1,column:J&&J.column||1,offset:J&&J.offset||0},q={},V=[],Y=[],W=[],H=!0,U={attempt:s($1),check:s(q1),consume:t,enter:J1,exit:Z,interrupt:s(q1,{interrupt:!0})},M={code:D.eof,containerState:{},defineSkip:_,events:[],now:P,parser:$,previous:D.eof,sliceSerialize:j,sliceStream:N,write:K},Q=G.tokenize.call(M,U),F;if(G.resolveAll)V.push(G);return M;function K(x){if(Y=S1(Y,x),k(),Y[Y.length-1]!==D.eof)return[];return X1(G,0),M.events=N2(V,M.events,M),M.events}function j(x,r){return LU(N(x),r)}function N(x){return PU(Y,x)}function P(){let{_bufferIndex:x,_index:r,line:i,column:V1,offset:D1}=X;return{_bufferIndex:x,_index:r,line:i,column:V1,offset:D1}}function _(x){q[x.line]=x.column,G1(),e0("position: define skip: `%j`",X)}function k(){let x;while(X._index<Y.length){let r=Y[X._index];if(typeof r==="string"){if(x=X._index,X._bufferIndex<0)X._bufferIndex=0;while(X._index===x&&X._bufferIndex<r.length)h(r.charCodeAt(X._bufferIndex))}else h(r)}}function h(x){R(H===!0,"expected character to be consumed"),H=void 0,e0("main: passing `%s` to %s",x,Q&&Q.name),F=x,R(typeof Q==="function","expected state"),Q=Q(x)}function t(x){if(R(x===F,"expected given code to equal expected code"),e0("consume: `%s`",x),R(H===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),R(x===null?M.events.length===0||M.events[M.events.length-1][0]==="exit":M.events[M.events.length-1][0]==="enter","expected last token to be open"),E(x))X.line++,X.column=1,X.offset+=x===D.carriageReturnLineFeed?2:1,G1(),e0("position: after eol: `%j`",X);else if(x!==D.virtualSpace)X.column++,X.offset++;if(X._bufferIndex<0)X._index++;else if(X._bufferIndex++,X._bufferIndex===Y[X._index].length)X._bufferIndex=-1,X._index++;M.previous=x,H=!0}function J1(x,r){let i=r||{};return i.type=x,i.start=P(),R(typeof x==="string","expected string type"),R(x.length>0,"expected non-empty string"),e0("enter: `%s`",x),M.events.push(["enter",i,M]),W.push(i),i}function Z(x){R(typeof x==="string","expected string type"),R(x.length>0,"expected non-empty string");let r=W.pop();return R(r,"cannot close w/o open tokens"),r.end=P(),R(x===r.type,"expected exit token to match current token"),R(!(r.start._index===r.end._index&&r.start._bufferIndex===r.end._bufferIndex),"expected non-empty token (`"+x+"`)"),e0("exit: `%s`",r.type),M.events.push(["exit",r,M]),r}function $1(x,r){X1(x,r.from)}function q1(x,r){r.restore()}function s(x,r){return i;function i(V1,D1,d1){let J0,B,c1,U0;return Array.isArray(V1)?h1(V1):("tokenize"in V1)?h1([V1]):O(V1);function O(K1){return n2;function n2(M0){let y0=M0!==null&&K1[M0],H2=M0!==null&&K1.null,u5=[...Array.isArray(y0)?y0:y0?[y0]:[],...Array.isArray(H2)?H2:H2?[H2]:[]];return h1(u5)(M0)}}function h1(K1){if(J0=K1,B=0,K1.length===0)return R(d1,"expected `bogusState` to be given"),d1;return h0(K1[B])}function h0(K1){return n2;function n2(M0){if(U0=r1(),c1=K1,!K1.partial)M.currentConstruct=K1;if(R(M.parser.constructs.disable.null,"expected `disable.null` to be populated"),K1.name&&M.parser.constructs.disable.null.includes(K1.name))return b4(M0);return K1.tokenize.call(r?Object.assign(Object.create(M),r):M,U,f5,b4)(M0)}}function f5(K1){return R(K1===F,"expected code"),H=!0,x(c1,U0),D1}function b4(K1){if(R(K1===F,"expected code"),H=!0,U0.restore(),++B<J0.length)return h0(J0[B]);return d1}}}function X1(x,r){if(x.resolveAll&&!V.includes(x))V.push(x);if(x.resolve)w1(M.events,r,M.events.length-r,x.resolve(M.events.slice(r),M));if(x.resolveTo)M.events=x.resolveTo(M.events,M);R(x.partial||M.events.length===0||M.events[M.events.length-1][0]==="exit","expected last token to end")}function r1(){let x=P(),r=M.previous,i=M.currentConstruct,V1=M.events.length,D1=Array.from(W);return{from:V1,restore:d1};function d1(){X=x,M.previous=r,M.currentConstruct=i,M.events.length=V1,W=D1,G1(),e0("position: restore: `%j`",X)}}function G1(){if(X.line in q&&X.column<2)X.column=q[X.line],X.offset+=q[X.line]-1}}function PU($,G){let J=G.start._index,X=G.start._bufferIndex,q=G.end._index,V=G.end._bufferIndex,Y;if(J===q)R(V>-1,"expected non-negative end buffer index"),R(X>-1,"expected non-negative start buffer index"),Y=[$[J].slice(X,V)];else{if(Y=$.slice(J,q),X>-1){let W=Y[0];if(typeof W==="string")Y[0]=W.slice(X);else R(X===0,"expected `startBufferIndex` to be `0`"),Y.shift()}if(V>0)Y.push($[q].slice(0,V))}return Y}function LU($,G){let J=-1,X=[],q;while(++J<$.length){let V=$[J],Y;if(typeof V==="string")Y=V;else switch(V){case D.carriageReturn:{Y=u1.cr;break}case D.lineFeed:{Y=u1.lf;break}case D.carriageReturnLineFeed:{Y=u1.cr+u1.lf;break}case D.horizontalTab:{Y=G?u1.space:u1.ht;break}case D.virtualSpace:{if(!G&&q)continue;Y=u1.space;break}default:R(typeof V==="number","expected number"),Y=String.fromCharCode(V)}q=V===D.horizontalTab,X.push(Y)}return X.join("")}function f6($){let X={constructs:JG([k6,...($||{}).extensions||[]]),content:q(HG),defined:[],document:q(MG),flow:q(FG),lazy:{},string:q(BG),text:q(OG)};return X;function q(V){return Y;function Y(W){return hG(X,V,W)}}}function u6($){while(!W5($));return $}var yG=/[\0\t\n\r]/g;function p6(){let $=1,G="",J=!0,X;return q;function q(V,Y,W){let H=[],U,M,Q,F,K;if(V=G+(typeof V==="string"?V.toString():new TextDecoder(Y||void 0).decode(V)),Q=0,G="",J){if(V.charCodeAt(0)===D.byteOrderMarker)Q++;J=void 0}while(Q<V.length){if(yG.lastIndex=Q,U=yG.exec(V),F=U&&U.index!==void 0?U.index:V.length,K=V.charCodeAt(F),!U){G=V.slice(Q);break}if(K===D.lf&&Q===F&&X)H.push(D.carriageReturnLineFeed),X=void 0;else{if(X)H.push(D.carriageReturn),X=void 0;if(Q<F)H.push(V.slice(Q,F)),$+=F-Q;switch(K){case D.nul:{H.push(D.replacementCharacter),$++;break}case D.ht:{M=Math.ceil($/L.tabSize)*L.tabSize,H.push(D.horizontalTab);while($++<M)H.push(D.virtualSpace);break}case D.lf:{H.push(D.lineFeed),$=1;break}default:X=!0,$=1}}Q=F+1}if(W){if(X)H.push(D.carriageReturn);if(G)H.push(G);H.push(D.eof)}return H}}var TU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function R5($){return $.replace(TU,IU)}function IU($,G,J){if(G)return G;if(J.charCodeAt(0)===D.numberSign){let q=J.charCodeAt(1),V=q===D.lowercaseX||q===D.uppercaseX;return J5(J.slice(V?2:1),V?L.numericBaseHexadecimal:L.numericBaseDecimal)}return w2(J)||$}function T0($){if(!$||typeof $!=="object")return"";if("position"in $||"type"in $)return mG($.position);if("start"in $||"end"in $)return mG($);if("line"in $||"column"in $)return l6($);return""}function l6($){return fG($&&$.line)+":"+fG($&&$.column)}function mG($){return l6($&&$.start)+"-"+l6($&&$.end)}function fG($){return $&&typeof $==="number"?$:1}var pG={}.hasOwnProperty;function r6($,G,J){if(G&&typeof G==="object")J=G,G=void 0;return EU(J)(u6(f6(J).document().write(p6()($,G,!0))))}function EU($){let G={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:V(h9),autolinkProtocol:s,autolinkEmail:s,atxHeading:V(v9),blockQuote:V(M0),characterEscape:s,characterReference:s,codeFenced:V(y0),codeFencedFenceInfo:Y,codeFencedFenceMeta:Y,codeIndented:V(y0,Y),codeText:V(H2,Y),codeTextData:s,data:s,codeFlowValue:s,definition:V(u5),definitionDestinationString:Y,definitionLabelString:Y,definitionTitleString:Y,emphasis:V(i3),hardBreakEscape:V(k9),hardBreakTrailing:V(k9),htmlFlow:V(g9,Y),htmlFlowData:s,htmlText:V(g9,Y),htmlTextData:s,image:V(o3),label:Y,link:V(h9),listItem:V(n3),listItemValue:F,listOrdered:V(y9,Q),listUnordered:V(y9),paragraph:V(a3),reference:O,referenceString:Y,resourceDestinationString:Y,resourceTitleString:Y,setextHeading:V(v9),strong:V(s3),thematicBreak:V(e3)},exit:{atxHeading:H(),atxHeadingSequence:J1,autolink:H(),autolinkEmail:n2,autolinkProtocol:K1,blockQuote:H(),characterEscapeValue:X1,characterReferenceMarkerHexadecimal:h0,characterReferenceMarkerNumeric:h0,characterReferenceValue:f5,characterReference:b4,codeFenced:H(P),codeFencedFence:N,codeFencedFenceInfo:K,codeFencedFenceMeta:j,codeFlowValue:X1,codeIndented:H(_),codeText:H(i),codeTextData:X1,data:X1,definition:H(),definitionDestinationString:t,definitionLabelString:k,definitionTitleString:h,emphasis:H(),hardBreakEscape:H(G1),hardBreakTrailing:H(G1),htmlFlow:H(x),htmlFlowData:X1,htmlText:H(r),htmlTextData:X1,image:H(D1),label:J0,labelText:d1,lineEnding:r1,link:H(V1),listItem:H(),listOrdered:H(),listUnordered:H(),paragraph:H(),referenceString:h1,resourceDestinationString:B,resourceTitleString:c1,resource:U0,setextHeading:H(q1),setextHeadingLineSequence:$1,setextHeadingText:Z,strong:H(),thematicBreak:H()}};lG(G,($||{}).mdastExtensions||[]);let J={};return X;function X(A){let w={type:"root",children:[]},v={stack:[w],tokenStack:[],config:G,enter:W,exit:U,buffer:Y,resume:M,data:J},n=[],e=-1;while(++e<A.length)if(A[e][1].type===z.listOrdered||A[e][1].type===z.listUnordered)if(A[e][0]==="enter")n.push(e);else{let x1=n.pop();R(typeof x1==="number","expected list to be open"),e=q(A,x1,e)}e=-1;while(++e<A.length){let x1=G[A[e][0]];if(pG.call(x1,A[e][1].type))x1[A[e][1].type].call(Object.assign({sliceSerialize:A[e][2].sliceSerialize},v),A[e][1])}if(v.tokenStack.length>0){let x1=v.tokenStack[v.tokenStack.length-1];(x1[1]||uG).call(v,void 0,x1[0])}w.position={start:I0(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:I0(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},e=-1;while(++e<G.transforms.length)w=G.transforms[e](w)||w;return w}function q(A,w,v){let n=w-1,e=-1,x1=!1,m0,z0,a2,s2;while(++n<=v){let y1=A[n];switch(y1[1].type){case z.listUnordered:case z.listOrdered:case z.blockQuote:{if(y1[0]==="enter")e++;else e--;s2=void 0;break}case z.lineEndingBlank:{if(y1[0]==="enter"){if(m0&&!s2&&!e&&!a2)a2=n;s2=void 0}break}case z.linePrefix:case z.listItemValue:case z.listItemMarker:case z.listItemPrefix:case z.listItemPrefixWhitespace:break;default:s2=void 0}if(!e&&y1[0]==="enter"&&y1[1].type===z.listItemPrefix||e===-1&&y1[0]==="exit"&&(y1[1].type===z.listUnordered||y1[1].type===z.listOrdered)){if(m0){let U2=n;z0=void 0;while(U2--){let Q0=A[U2];if(Q0[1].type===z.lineEnding||Q0[1].type===z.lineEndingBlank){if(Q0[0]==="exit")continue;if(z0)A[z0][1].type=z.lineEndingBlank,x1=!0;Q0[1].type=z.lineEnding,z0=U2}else if(Q0[1].type===z.linePrefix||Q0[1].type===z.blockQuotePrefix||Q0[1].type===z.blockQuotePrefixWhitespace||Q0[1].type===z.blockQuoteMarker||Q0[1].type===z.listItemIndent);else break}if(a2&&(!z0||a2<z0))m0._spread=!0;m0.end=Object.assign({},z0?A[z0][1].start:y1[1].end),A.splice(z0||n,0,["exit",m0,y1[2]]),n++,v++}if(y1[1].type===z.listItemPrefix){let U2={type:"listItem",_spread:!1,start:Object.assign({},y1[1].start),end:void 0};m0=U2,A.splice(n,0,["enter",U2,y1[2]]),n++,v++,a2=void 0,s2=!0}}}return A[w][1]._spread=x1,v}function V(A,w){return v;function v(n){if(W.call(this,A(n),n),w)w.call(this,n)}}function Y(){this.stack.push({type:"fragment",children:[]})}function W(A,w,v){let n=this.stack[this.stack.length-1];R(n,"expected `parent`"),R("children"in n,"expected `parent`"),n.children.push(A),this.stack.push(A),this.tokenStack.push([w,v||void 0]),A.position={start:I0(w.start),end:void 0}}function H(A){return w;function w(v){if(A)A.call(this,v);U.call(this,v)}}function U(A,w){let v=this.stack.pop();R(v,"expected `node`");let n=this.tokenStack.pop();if(!n)throw Error("Cannot close `"+A.type+"` ("+T0({start:A.start,end:A.end})+"): it\u2019s not open");else if(n[0].type!==A.type)if(w)w.call(this,A,n[0]);else(n[1]||uG).call(this,A,n[0]);R(v.type!=="fragment","unexpected fragment `exit`ed"),R(v.position,"expected `position` to be defined"),v.position.end=I0(A.end)}function M(){return i0(this.stack.pop())}function Q(){this.data.expectingFirstListItemValue=!0}function F(A){if(this.data.expectingFirstListItemValue){let w=this.stack[this.stack.length-2];R(w,"expected nodes on stack"),R(w.type==="list","expected list on stack"),w.start=Number.parseInt(this.sliceSerialize(A),L.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function K(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.lang=A}function j(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.meta=A}function N(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function P(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.value=A.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.value=A.replace(/(\r?\n|\r)$/g,"")}function k(A){let w=this.resume(),v=this.stack[this.stack.length-1];R(v,"expected node on stack"),R(v.type==="definition","expected definition on stack"),v.label=w,v.identifier=F0(this.sliceSerialize(A)).toLowerCase()}function h(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="definition","expected definition on stack"),w.title=A}function t(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="definition","expected definition on stack"),w.url=A}function J1(A){let w=this.stack[this.stack.length-1];if(R(w,"expected node on stack"),R(w.type==="heading","expected heading on stack"),!w.depth){let v=this.sliceSerialize(A).length;R(v===1||v===2||v===3||v===4||v===5||v===6,"expected `depth` between `1` and `6`"),w.depth=v}}function Z(){this.data.setextHeadingSlurpLineEnding=!0}function $1(A){let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="heading","expected heading on stack"),w.depth=this.sliceSerialize(A).codePointAt(0)===D.equalsTo?1:2}function q1(){this.data.setextHeadingSlurpLineEnding=void 0}function s(A){let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R("children"in w,"expected parent on stack");let v=w.children,n=v[v.length-1];if(!n||n.type!=="text")n=t3(),n.position={start:I0(A.start),end:void 0},v.push(n);this.stack.push(n)}function X1(A){let w=this.stack.pop();R(w,"expected a `node` to be on the stack"),R("value"in w,"expected a `literal` to be on the stack"),R(w.position,"expected `node` to have an open position"),w.value+=this.sliceSerialize(A),w.position.end=I0(A.end)}function r1(A){let w=this.stack[this.stack.length-1];if(R(w,"expected `node`"),this.data.atHardBreak){R("children"in w,"expected `parent`");let v=w.children[w.children.length-1];R(v.position,"expected tail to have a starting position"),v.position.end=I0(A.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&G.canContainEols.includes(w.type))s.call(this,A),X1.call(this,A)}function G1(){this.data.atHardBreak=!0}function x(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="html","expected html on stack"),w.value=A}function r(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="html","expected html on stack"),w.value=A}function i(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="inlineCode","expected inline code on stack"),w.value=A}function V1(){let A=this.stack[this.stack.length-1];if(R(A,"expected node on stack"),R(A.type==="link","expected link on stack"),this.data.inReference){let w=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=w,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function D1(){let A=this.stack[this.stack.length-1];if(R(A,"expected node on stack"),R(A.type==="image","expected image on stack"),this.data.inReference){let w=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=w,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function d1(A){let w=this.sliceSerialize(A),v=this.stack[this.stack.length-2];R(v,"expected ancestor on stack"),R(v.type==="image"||v.type==="link","expected image or link on stack"),v.label=R5(w),v.identifier=F0(w).toLowerCase()}function J0(){let A=this.stack[this.stack.length-1];R(A,"expected node on stack"),R(A.type==="fragment","expected fragment on stack");let w=this.resume(),v=this.stack[this.stack.length-1];if(R(v,"expected node on stack"),R(v.type==="image"||v.type==="link","expected image or link on stack"),this.data.inReference=!0,v.type==="link"){let n=A.children;v.children=n}else v.alt=w}function B(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="image"||w.type==="link","expected image or link on stack"),w.url=A}function c1(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="image"||w.type==="link","expected image or link on stack"),w.title=A}function U0(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function h1(A){let w=this.resume(),v=this.stack[this.stack.length-1];R(v,"expected node on stack"),R(v.type==="image"||v.type==="link","expected image reference or link reference on stack"),v.label=w,v.identifier=F0(this.sliceSerialize(A)).toLowerCase(),this.data.referenceType="full"}function h0(A){R(A.type==="characterReferenceMarkerNumeric"||A.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=A.type}function f5(A){let w=this.sliceSerialize(A),v=this.data.characterReferenceType,n;if(v)n=J5(w,v===z.characterReferenceMarkerNumeric?L.numericBaseDecimal:L.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{let x1=w2(w);R(x1!==!1,"expected reference to decode"),n=x1}let e=this.stack[this.stack.length-1];R(e,"expected `node`"),R("value"in e,"expected `node.value`"),e.value+=n}function b4(A){let w=this.stack.pop();R(w,"expected `node`"),R(w.position,"expected `node.position`"),w.position.end=I0(A.end)}function K1(A){X1.call(this,A);let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="link","expected link on stack"),w.url=this.sliceSerialize(A)}function n2(A){X1.call(this,A);let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="link","expected link on stack"),w.url="mailto:"+this.sliceSerialize(A)}function M0(){return{type:"blockquote",children:[]}}function y0(){return{type:"code",lang:null,meta:null,value:""}}function H2(){return{type:"inlineCode",value:""}}function u5(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function i3(){return{type:"emphasis",children:[]}}function v9(){return{type:"heading",depth:0,children:[]}}function k9(){return{type:"break"}}function g9(){return{type:"html",value:""}}function o3(){return{type:"image",title:null,url:"",alt:null}}function h9(){return{type:"link",title:null,url:"",children:[]}}function y9(A){return{type:"list",ordered:A.type==="listOrdered",start:null,spread:A._spread,children:[]}}function n3(A){return{type:"listItem",spread:A._spread,checked:null,children:[]}}function a3(){return{type:"paragraph",children:[]}}function s3(){return{type:"strong",children:[]}}function t3(){return{type:"text",value:""}}function e3(){return{type:"thematicBreak"}}}function I0($){return{line:$.line,column:$.column,offset:$.offset}}function lG($,G){let J=-1;while(++J<G.length){let X=G[J];if(Array.isArray(X))lG($,X);else CU($,X)}}function CU($,G){let J;for(J in G)if(pG.call(G,J))switch(J){case"canContainEols":{let X=G[J];if(X)$[J].push(...X);break}case"transforms":{let X=G[J];if(X)$[J].push(...X);break}case"enter":case"exit":{let X=G[J];if(X)Object.assign($[J],X);break}}}function uG($,G){if($)throw Error("Cannot close `"+$.type+"` ("+T0({start:$.start,end:$.end})+"): a different token (`"+G.type+"`, "+T0({start:G.start,end:G.end})+") is open");else throw Error("Cannot close document, a token (`"+G.type+"`, "+T0({start:G.start,end:G.end})+") is still open")}function B5($){let G=this;G.parser=J;function J(X){return r6(X,{...G.data("settings"),...$,extensions:G.data("micromarkExtensions")||[],mdastExtensions:G.data("fromMarkdownExtensions")||[]})}}var rG={}.hasOwnProperty;function dG($,G){let J=G||{};function X(q,...V){let{invalid:Y,handlers:W}=X;if(q&&rG.call(q,$)){let H=String(q[$]);Y=rG.call(W,H)?W[H]:X.unknown}if(Y)return Y.call(this,q,...V)}return X.handlers=J.handlers||{},X.invalid=J.invalid,X.unknown=J.unknown,X}var SU={}.hasOwnProperty;function d6($,G){let J=-1,X;if(G.extensions)while(++J<G.extensions.length)d6($,G.extensions[J]);for(X in G)if(SU.call(G,X))switch(X){case"extensions":break;case"unsafe":{cG($[X],G[X]);break}case"join":{cG($[X],G[X]);break}case"handlers":{bU($[X],G[X]);break}default:$.options[X]=G[X]}return $}function cG($,G){if(G)$.push(...G)}function bU($,G){if(G)Object.assign($,G)}function iG($,G,J,X){let q=J.enter("blockquote"),V=J.createTracker(X);V.move("> "),V.shift(2);let Y=J.indentLines(J.containerFlow($,V.current()),xU);return q(),Y}function xU($,G,J){return">"+(J?"":" ")+$}function O5($,G){return oG($,G.inConstruct,!0)&&!oG($,G.notInConstruct,!1)}function oG($,G,J){if(typeof G==="string")G=[G];if(!G||G.length===0)return J;let X=-1;while(++X<G.length)if($.includes(G[X]))return!0;return!1}function c6($,G,J,X){let q=-1;while(++q<J.unsafe.length)if(J.unsafe[q].character===`
|
|
59
|
+
`,cr:"\r",space:" ",exclamationMark:"!",quotationMark:'"',numberSign:"#",dollarSign:"$",percentSign:"%",ampersand:"&",apostrophe:"'",leftParenthesis:"(",rightParenthesis:")",asterisk:"*",plusSign:"+",comma:",",dash:"-",dot:".",slash:"/",digit0:"0",digit1:"1",digit2:"2",digit3:"3",digit4:"4",digit5:"5",digit6:"6",digit7:"7",digit8:"8",digit9:"9",colon:":",semicolon:";",lessThan:"<",equalsTo:"=",greaterThan:">",questionMark:"?",atSign:"@",uppercaseA:"A",uppercaseB:"B",uppercaseC:"C",uppercaseD:"D",uppercaseE:"E",uppercaseF:"F",uppercaseG:"G",uppercaseH:"H",uppercaseI:"I",uppercaseJ:"J",uppercaseK:"K",uppercaseL:"L",uppercaseM:"M",uppercaseN:"N",uppercaseO:"O",uppercaseP:"P",uppercaseQ:"Q",uppercaseR:"R",uppercaseS:"S",uppercaseT:"T",uppercaseU:"U",uppercaseV:"V",uppercaseW:"W",uppercaseX:"X",uppercaseY:"Y",uppercaseZ:"Z",leftSquareBracket:"[",backslash:"\\",rightSquareBracket:"]",caret:"^",underscore:"_",graveAccent:"`",lowercaseA:"a",lowercaseB:"b",lowercaseC:"c",lowercaseD:"d",lowercaseE:"e",lowercaseF:"f",lowercaseG:"g",lowercaseH:"h",lowercaseI:"i",lowercaseJ:"j",lowercaseK:"k",lowercaseL:"l",lowercaseM:"m",lowercaseN:"n",lowercaseO:"o",lowercaseP:"p",lowercaseQ:"q",lowercaseR:"r",lowercaseS:"s",lowercaseT:"t",lowercaseU:"u",lowercaseV:"v",lowercaseW:"w",lowercaseX:"x",lowercaseY:"y",lowercaseZ:"z",leftCurlyBrace:"{",verticalBar:"|",rightCurlyBrace:"}",tilde:"~",replacementCharacter:"\uFFFD"};function w1($,G,J,X){let q=$.length,V=0,Y;if(G<0)G=-G>q?0:q+G;else G=G>q?q:G;if(J=J>0?J:0,X.length<L.v8MaxSafeChunkSize)Y=Array.from(X),Y.unshift(G,J),$.splice(...Y);else{if(J)$.splice(G,J);while(V<X.length)Y=X.slice(V,V+L.v8MaxSafeChunkSize),Y.unshift(G,0),$.splice(...Y),V+=L.v8MaxSafeChunkSize,G+=L.v8MaxSafeChunkSize}}function S1($,G){if($.length>0)return w1($,$.length,0,G),$;return G}var GG={}.hasOwnProperty;function JG($){let G={},J=-1;while(++J<$.length)PW(G,$[J]);return G}function PW($,G){let J;for(J in G){let q=(GG.call($,J)?$[J]:void 0)||($[J]={}),V=G[J],Y;if(V)for(Y in V){if(!GG.call(q,Y))q[Y]=[];let W=V[Y];LW(q[Y],Array.isArray(W)?W:W?[W]:[])}}}function LW($,G){let J=-1,X=[];while(++J<G.length)(G[J].add==="after"?$:X).push(G[J]);w1($,0,0,X)}function J5($,G){let J=Number.parseInt($,G);if(J<D.ht||J===D.vt||J>D.cr&&J<D.space||J>D.tilde&&J<160||J>55295&&J<57344||J>64975&&J<65008||(J&65535)===65535||(J&65535)===65534||J>1114111)return u1.replacementCharacter;return String.fromCodePoint(J)}function F0($){return $.replace(/[\t\n\r ]+/g,u1.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}var p1=_0(/[A-Za-z]/),b1=_0(/[\dA-Za-z]/),XG=_0(/[#-'*+\--9=?A-Z^-~]/);function M4($){return $!==null&&($<D.space||$===D.del)}var z4=_0(/\d/),qG=_0(/[\dA-Fa-f]/),YG=_0(/[!-/:-@[-`{-~]/);function C($){return $!==null&&$<D.horizontalTab}function H1($){return $!==null&&($<D.nul||$===D.space)}function l($){return $===D.horizontalTab||$===D.virtualSpace||$===D.space}var VG=_0(/\p{P}|\p{S}/u),WG=_0(/\s/);function _0($){return G;function G(J){return J!==null&&J>-1&&$.test(String.fromCharCode(J))}}function d($,G,J,X){let q=X?X-1:Number.POSITIVE_INFINITY,V=0;return Y;function Y(H){if(l(H))return $.enter(J),W(H);return G(H)}function W(H){if(l(H)&&V++<q)return $.consume(H),W;return $.exit(J),G(H)}}var HG={tokenize:TW};function TW($){let G=$.attempt(this.parser.constructs.contentInitial,X,q),J;return G;function X(W){if(R(W===D.eof||C(W),"expected eol or eof"),W===D.eof){$.consume(W);return}return $.enter(z.lineEnding),$.consume(W),$.exit(z.lineEnding),d($,G,z.linePrefix)}function q(W){return R(W!==D.eof&&!C(W),"expected anything other than a line ending or EOF"),$.enter(z.paragraph),V(W)}function V(W){let H=$.enter(z.chunkText,{contentType:L.contentTypeText,previous:J});if(J)J.next=H;return J=H,Y(W)}function Y(W){if(W===D.eof){$.exit(z.chunkText),$.exit(z.paragraph),$.consume(W);return}if(C(W))return $.consume(W),$.exit(z.chunkText),V;return $.consume(W),Y}}var MG={tokenize:IW},UG={tokenize:EW};function IW($){let G=this,J=[],X=0,q,V,Y;return W;function W(h){if(X<J.length){let t=J[X];return G.containerState=t[1],R(t[0].continuation,"expected `continuation` to be defined on container construct"),$.attempt(t[0].continuation,H,U)(h)}return U(h)}function H(h){if(R(G.containerState,"expected `containerState` to be defined after continuation"),X++,G.containerState._closeFlow){if(G.containerState._closeFlow=void 0,q)k();let t=G.events.length,J1=t,Z;while(J1--)if(G.events[J1][0]==="exit"&&G.events[J1][1].type===z.chunkFlow){Z=G.events[J1][1].end;break}R(Z,"could not find previous flow chunk"),_(X);let $1=t;while($1<G.events.length)G.events[$1][1].end={...Z},$1++;return w1(G.events,J1+1,0,G.events.slice(t)),G.events.length=$1,U(h)}return W(h)}function U(h){if(X===J.length){if(!q)return F(h);if(q.currentConstruct&&q.currentConstruct.concrete)return j(h);G.interrupt=Boolean(q.currentConstruct&&!q._gfmTableDynamicInterruptHack)}return G.containerState={},$.check(UG,M,Q)(h)}function M(h){if(q)k();return _(X),F(h)}function Q(h){return G.parser.lazy[G.now().line]=X!==J.length,Y=G.now().offset,j(h)}function F(h){return G.containerState={},$.attempt(UG,K,j)(h)}function K(h){return R(G.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),R(G.containerState,"expected `containerState` to be defined on tokenizer"),X++,J.push([G.currentConstruct,G.containerState]),F(h)}function j(h){if(h===D.eof){if(q)k();_(0),$.consume(h);return}return q=q||G.parser.flow(G.now()),$.enter(z.chunkFlow,{_tokenizer:q,contentType:L.contentTypeFlow,previous:V}),N(h)}function N(h){if(h===D.eof){P($.exit(z.chunkFlow),!0),_(0),$.consume(h);return}if(C(h))return $.consume(h),P($.exit(z.chunkFlow)),X=0,G.interrupt=void 0,W;return $.consume(h),N}function P(h,t){R(q,"expected `childFlow` to be defined when continuing");let J1=G.sliceStream(h);if(t)J1.push(null);if(h.previous=V,V)V.next=h;if(V=h,q.defineSkip(h.start),q.write(J1),G.parser.lazy[h.start.line]){let Z=q.events.length;while(Z--)if(q.events[Z][1].start.offset<Y&&(!q.events[Z][1].end||q.events[Z][1].end.offset>Y))return;let $1=G.events.length,q1=$1,s,X1;while(q1--)if(G.events[q1][0]==="exit"&&G.events[q1][1].type===z.chunkFlow){if(s){X1=G.events[q1][1].end;break}s=!0}R(X1,"could not find previous flow chunk"),_(X),Z=$1;while(Z<G.events.length)G.events[Z][1].end={...X1},Z++;w1(G.events,q1+1,0,G.events.slice($1)),G.events.length=Z}}function _(h){let t=J.length;while(t-- >h){let J1=J[t];G.containerState=J1[1],R(J1[0].exit,"expected `exit` to be defined on container construct"),J1[0].exit.call(G,$)}J.length=h}function k(){R(G.containerState,"expected `containerState` to be defined when closing flow"),R(q,"expected `childFlow` to be defined when closing it"),q.write([D.eof]),V=void 0,q=void 0,G.containerState._closeFlow=void 0}}function EW($,G,J){return R(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,$.attempt(this.parser.constructs.document,G,J),z.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)}function j2($){if($===D.eof||H1($)||WG($))return L.characterGroupWhitespace;if(VG($))return L.characterGroupPunctuation}function N2($,G,J){let X=[],q=-1;while(++q<$.length){let V=$[q].resolveAll;if(V&&!X.includes(V))G=V(G,J),X.push(V)}return G}var Q4={name:"attention",resolveAll:CW,tokenize:SW};function CW($,G){let J=-1,X,q,V,Y,W,H,U,M;while(++J<$.length)if($[J][0]==="enter"&&$[J][1].type==="attentionSequence"&&$[J][1]._close){X=J;while(X--)if($[X][0]==="exit"&&$[X][1].type==="attentionSequence"&&$[X][1]._open&&G.sliceSerialize($[X][1]).charCodeAt(0)===G.sliceSerialize($[J][1]).charCodeAt(0)){if(($[X][1]._close||$[J][1]._open)&&($[J][1].end.offset-$[J][1].start.offset)%3&&!(($[X][1].end.offset-$[X][1].start.offset+$[J][1].end.offset-$[J][1].start.offset)%3))continue;H=$[X][1].end.offset-$[X][1].start.offset>1&&$[J][1].end.offset-$[J][1].start.offset>1?2:1;let Q={...$[X][1].end},F={...$[J][1].start};if(zG(Q,-H),zG(F,H),Y={type:H>1?z.strongSequence:z.emphasisSequence,start:Q,end:{...$[X][1].end}},W={type:H>1?z.strongSequence:z.emphasisSequence,start:{...$[J][1].start},end:F},V={type:H>1?z.strongText:z.emphasisText,start:{...$[X][1].end},end:{...$[J][1].start}},q={type:H>1?z.strong:z.emphasis,start:{...Y.start},end:{...W.end}},$[X][1].end={...Y.start},$[J][1].start={...W.end},U=[],$[X][1].end.offset-$[X][1].start.offset)U=S1(U,[["enter",$[X][1],G],["exit",$[X][1],G]]);if(U=S1(U,[["enter",q,G],["enter",Y,G],["exit",Y,G],["enter",V,G]]),R(G.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),U=S1(U,N2(G.parser.constructs.insideSpan.null,$.slice(X+1,J),G)),U=S1(U,[["exit",V,G],["enter",W,G],["exit",W,G],["exit",q,G]]),$[J][1].end.offset-$[J][1].start.offset)M=2,U=S1(U,[["enter",$[J][1],G],["exit",$[J][1],G]]);else M=0;w1($,X-1,J-X+3,U),J=X+U.length-M-2;break}}J=-1;while(++J<$.length)if($[J][1].type==="attentionSequence")$[J][1].type="data";return $}function SW($,G){let J=this.parser.constructs.attentionMarkers.null,X=this.previous,q=j2(X),V;return Y;function Y(H){return R(H===D.asterisk||H===D.underscore,"expected asterisk or underscore"),V=H,$.enter("attentionSequence"),W(H)}function W(H){if(H===V)return $.consume(H),W;let U=$.exit("attentionSequence"),M=j2(H);R(J,"expected `attentionMarkers` to be populated");let Q=!M||M===L.characterGroupPunctuation&&q||J.includes(H),F=!q||q===L.characterGroupPunctuation&&M||J.includes(X);return U._open=Boolean(V===D.asterisk?Q:Q&&(q||!F)),U._close=Boolean(V===D.asterisk?F:F&&(M||!Q)),G(H)}}function zG($,G){$.column+=G,$.offset+=G,$._bufferIndex+=G}var Z6={name:"autolink",tokenize:bW};function bW($,G,J){let X=0;return q;function q(K){return R(K===D.lessThan,"expected `<`"),$.enter(z.autolink),$.enter(z.autolinkMarker),$.consume(K),$.exit(z.autolinkMarker),$.enter(z.autolinkProtocol),V}function V(K){if(p1(K))return $.consume(K),Y;if(K===D.atSign)return J(K);return U(K)}function Y(K){if(K===D.plusSign||K===D.dash||K===D.dot||b1(K))return X=1,W(K);return U(K)}function W(K){if(K===D.colon)return $.consume(K),X=0,H;if((K===D.plusSign||K===D.dash||K===D.dot||b1(K))&&X++<L.autolinkSchemeSizeMax)return $.consume(K),W;return X=0,U(K)}function H(K){if(K===D.greaterThan)return $.exit(z.autolinkProtocol),$.enter(z.autolinkMarker),$.consume(K),$.exit(z.autolinkMarker),$.exit(z.autolink),G;if(K===D.eof||K===D.space||K===D.lessThan||M4(K))return J(K);return $.consume(K),H}function U(K){if(K===D.atSign)return $.consume(K),M;if(XG(K))return $.consume(K),U;return J(K)}function M(K){return b1(K)?Q(K):J(K)}function Q(K){if(K===D.dot)return $.consume(K),X=0,M;if(K===D.greaterThan)return $.exit(z.autolinkProtocol).type=z.autolinkEmail,$.enter(z.autolinkMarker),$.consume(K),$.exit(z.autolinkMarker),$.exit(z.autolink),G;return F(K)}function F(K){if((K===D.dash||b1(K))&&X++<L.autolinkDomainSizeMax){let j=K===D.dash?F:Q;return $.consume(K),j}return J(K)}}var P0={partial:!0,tokenize:xW};function xW($,G,J){return X;function X(V){return l(V)?d($,q,z.linePrefix)(V):q(V)}function q(V){return V===D.eof||C(V)?G(V):J(V)}}var X5={continuation:{tokenize:kW},exit:gW,name:"blockQuote",tokenize:vW};function vW($,G,J){let X=this;return q;function q(Y){if(Y===D.greaterThan){let W=X.containerState;if(R(W,"expected `containerState` to be defined in container"),!W.open)$.enter(z.blockQuote,{_container:!0}),W.open=!0;return $.enter(z.blockQuotePrefix),$.enter(z.blockQuoteMarker),$.consume(Y),$.exit(z.blockQuoteMarker),V}return J(Y)}function V(Y){if(l(Y))return $.enter(z.blockQuotePrefixWhitespace),$.consume(Y),$.exit(z.blockQuotePrefixWhitespace),$.exit(z.blockQuotePrefix),G;return $.exit(z.blockQuotePrefix),G(Y)}}function kW($,G,J){let X=this;return q;function q(Y){if(l(Y))return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,V,z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(Y);return V(Y)}function V(Y){return $.attempt(X5,G,J)(Y)}}function gW($){$.exit(z.blockQuote)}var q5={name:"characterEscape",tokenize:hW};function hW($,G,J){return X;function X(V){return R(V===D.backslash,"expected `\\`"),$.enter(z.characterEscape),$.enter(z.escapeMarker),$.consume(V),$.exit(z.escapeMarker),q}function q(V){if(YG(V))return $.enter(z.characterEscapeValue),$.consume(V),$.exit(z.characterEscapeValue),$.exit(z.characterEscape),G;return J(V)}}var Y5={name:"characterReference",tokenize:yW};function yW($,G,J){let X=this,q=0,V,Y;return W;function W(Q){return R(Q===D.ampersand,"expected `&`"),$.enter(z.characterReference),$.enter(z.characterReferenceMarker),$.consume(Q),$.exit(z.characterReferenceMarker),H}function H(Q){if(Q===D.numberSign)return $.enter(z.characterReferenceMarkerNumeric),$.consume(Q),$.exit(z.characterReferenceMarkerNumeric),U;return $.enter(z.characterReferenceValue),V=L.characterReferenceNamedSizeMax,Y=b1,M(Q)}function U(Q){if(Q===D.uppercaseX||Q===D.lowercaseX)return $.enter(z.characterReferenceMarkerHexadecimal),$.consume(Q),$.exit(z.characterReferenceMarkerHexadecimal),$.enter(z.characterReferenceValue),V=L.characterReferenceHexadecimalSizeMax,Y=qG,M;return $.enter(z.characterReferenceValue),V=L.characterReferenceDecimalSizeMax,Y=z4,M(Q)}function M(Q){if(Q===D.semicolon&&q){let F=$.exit(z.characterReferenceValue);if(Y===b1&&!w2(X.sliceSerialize(F)))return J(Q);return $.enter(z.characterReferenceMarker),$.consume(Q),$.exit(z.characterReferenceMarker),$.exit(z.characterReference),G}if(Y(Q)&&q++<V)return $.consume(Q),M;return J(Q)}}var QG={partial:!0,tokenize:fW},V5={concrete:!0,name:"codeFenced",tokenize:mW};function mW($,G,J){let X=this,q={partial:!0,tokenize:J1},V=0,Y=0,W;return H;function H(Z){return U(Z)}function U(Z){R(Z===D.graveAccent||Z===D.tilde,"expected `` ` `` or `~`");let $1=X.events[X.events.length-1];return V=$1&&$1[1].type===z.linePrefix?$1[2].sliceSerialize($1[1],!0).length:0,W=Z,$.enter(z.codeFenced),$.enter(z.codeFencedFence),$.enter(z.codeFencedFenceSequence),M(Z)}function M(Z){if(Z===W)return Y++,$.consume(Z),M;if(Y<L.codeFencedSequenceSizeMin)return J(Z);return $.exit(z.codeFencedFenceSequence),l(Z)?d($,Q,z.whitespace)(Z):Q(Z)}function Q(Z){if(Z===D.eof||C(Z))return $.exit(z.codeFencedFence),X.interrupt?G(Z):$.check(QG,N,t)(Z);return $.enter(z.codeFencedFenceInfo),$.enter(z.chunkString,{contentType:L.contentTypeString}),F(Z)}function F(Z){if(Z===D.eof||C(Z))return $.exit(z.chunkString),$.exit(z.codeFencedFenceInfo),Q(Z);if(l(Z))return $.exit(z.chunkString),$.exit(z.codeFencedFenceInfo),d($,K,z.whitespace)(Z);if(Z===D.graveAccent&&Z===W)return J(Z);return $.consume(Z),F}function K(Z){if(Z===D.eof||C(Z))return Q(Z);return $.enter(z.codeFencedFenceMeta),$.enter(z.chunkString,{contentType:L.contentTypeString}),j(Z)}function j(Z){if(Z===D.eof||C(Z))return $.exit(z.chunkString),$.exit(z.codeFencedFenceMeta),Q(Z);if(Z===D.graveAccent&&Z===W)return J(Z);return $.consume(Z),j}function N(Z){return R(C(Z),"expected eol"),$.attempt(q,t,P)(Z)}function P(Z){return R(C(Z),"expected eol"),$.enter(z.lineEnding),$.consume(Z),$.exit(z.lineEnding),_}function _(Z){return V>0&&l(Z)?d($,k,z.linePrefix,V+1)(Z):k(Z)}function k(Z){if(Z===D.eof||C(Z))return $.check(QG,N,t)(Z);return $.enter(z.codeFlowValue),h(Z)}function h(Z){if(Z===D.eof||C(Z))return $.exit(z.codeFlowValue),k(Z);return $.consume(Z),h}function t(Z){return $.exit(z.codeFenced),G(Z)}function J1(Z,$1,q1){let s=0;return X1;function X1(i){return R(C(i),"expected eol"),Z.enter(z.lineEnding),Z.consume(i),Z.exit(z.lineEnding),r1}function r1(i){return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),Z.enter(z.codeFencedFence),l(i)?d(Z,G1,z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(i):G1(i)}function G1(i){if(i===W)return Z.enter(z.codeFencedFenceSequence),x(i);return q1(i)}function x(i){if(i===W)return s++,Z.consume(i),x;if(s>=Y)return Z.exit(z.codeFencedFenceSequence),l(i)?d(Z,r,z.whitespace)(i):r(i);return q1(i)}function r(i){if(i===D.eof||C(i))return Z.exit(z.codeFencedFence),$1(i);return q1(i)}}}function fW($,G,J){let X=this;return q;function q(Y){if(Y===D.eof)return J(Y);return R(C(Y),"expected eol"),$.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),V}function V(Y){return X.parser.lazy[X.now().line]?J(Y):G(Y)}}var D4={name:"codeIndented",tokenize:pW},uW={partial:!0,tokenize:lW};function pW($,G,J){let X=this;return q;function q(U){return R(l(U)),$.enter(z.codeIndented),d($,V,z.linePrefix,L.tabSize+1)(U)}function V(U){let M=X.events[X.events.length-1];return M&&M[1].type===z.linePrefix&&M[2].sliceSerialize(M[1],!0).length>=L.tabSize?Y(U):J(U)}function Y(U){if(U===D.eof)return H(U);if(C(U))return $.attempt(uW,Y,H)(U);return $.enter(z.codeFlowValue),W(U)}function W(U){if(U===D.eof||C(U))return $.exit(z.codeFlowValue),Y(U);return $.consume(U),W}function H(U){return $.exit(z.codeIndented),G(U)}}function lW($,G,J){let X=this;return q;function q(Y){if(X.parser.lazy[X.now().line])return J(Y);if(C(Y))return $.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),q;return d($,V,z.linePrefix,L.tabSize+1)(Y)}function V(Y){let W=X.events[X.events.length-1];return W&&W[1].type===z.linePrefix&&W[2].sliceSerialize(W[1],!0).length>=L.tabSize?G(Y):C(Y)?q(Y):J(Y)}}var _6={name:"codeText",previous:DG,resolve:rW,tokenize:dW};function rW($){let G=$.length-4,J=3,X,q;if(($[J][1].type===z.lineEnding||$[J][1].type==="space")&&($[G][1].type===z.lineEnding||$[G][1].type==="space")){X=J;while(++X<G)if($[X][1].type===z.codeTextData){$[J][1].type=z.codeTextPadding,$[G][1].type=z.codeTextPadding,J+=2,G-=2;break}}X=J-1,G++;while(++X<=G)if(q===void 0){if(X!==G&&$[X][1].type!==z.lineEnding)q=X}else if(X===G||$[X][1].type===z.lineEnding){if($[q][1].type=z.codeTextData,X!==q+2)$[q][1].end=$[X-1][1].end,$.splice(q+2,X-q-2),G-=X-q-2,X=q+2;q=void 0}return $}function DG($){return $!==D.graveAccent||this.events[this.events.length-1][1].type===z.characterEscape}function dW($,G,J){let X=this,q=0,V,Y;return W;function W(F){return R(F===D.graveAccent,"expected `` ` ``"),R(DG.call(X,X.previous),"expected correct previous"),$.enter(z.codeText),$.enter(z.codeTextSequence),H(F)}function H(F){if(F===D.graveAccent)return $.consume(F),q++,H;return $.exit(z.codeTextSequence),U(F)}function U(F){if(F===D.eof)return J(F);if(F===D.space)return $.enter("space"),$.consume(F),$.exit("space"),U;if(F===D.graveAccent)return Y=$.enter(z.codeTextSequence),V=0,Q(F);if(C(F))return $.enter(z.lineEnding),$.consume(F),$.exit(z.lineEnding),U;return $.enter(z.codeTextData),M(F)}function M(F){if(F===D.eof||F===D.space||F===D.graveAccent||C(F))return $.exit(z.codeTextData),U(F);return $.consume(F),M}function Q(F){if(F===D.graveAccent)return $.consume(F),V++,Q;if(V===q)return $.exit(z.codeTextSequence),$.exit(z.codeText),G(F);return Y.type=z.codeTextData,M(F)}}class P6{constructor($){this.left=$?[...$]:[],this.right=[]}get($){if($<0||$>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+$+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if($<this.left.length)return this.left[$];return this.right[this.right.length-$+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice($,G){let J=G===null||G===void 0?Number.POSITIVE_INFINITY:G;if(J<this.left.length)return this.left.slice($,J);if($>this.left.length)return this.right.slice(this.right.length-J+this.left.length,this.right.length-$+this.left.length).reverse();return this.left.slice($).concat(this.right.slice(this.right.length-J+this.left.length).reverse())}splice($,G,J){let X=G||0;this.setCursor(Math.trunc($));let q=this.right.splice(this.right.length-X,Number.POSITIVE_INFINITY);if(J)K4(this.left,J);return q.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push($){this.setCursor(Number.POSITIVE_INFINITY),this.left.push($)}pushMany($){this.setCursor(Number.POSITIVE_INFINITY),K4(this.left,$)}unshift($){this.setCursor(0),this.right.push($)}unshiftMany($){this.setCursor(0),K4(this.right,$.reverse())}setCursor($){if($===this.left.length||$>this.left.length&&this.right.length===0||$<0&&this.left.length===0)return;if($<this.left.length){let G=this.left.splice($,Number.POSITIVE_INFINITY);K4(this.right,G.reverse())}else{let G=this.right.splice(this.left.length+this.right.length-$,Number.POSITIVE_INFINITY);K4(this.left,G.reverse())}}}function K4($,G){let J=0;if(G.length<L.v8MaxSafeChunkSize)$.push(...G);else while(J<G.length)$.push(...G.slice(J,J+L.v8MaxSafeChunkSize)),J+=L.v8MaxSafeChunkSize}function W5($){let G={},J=-1,X,q,V,Y,W,H,U,M=new P6($);while(++J<M.length){while(J in G)J=G[J];if(X=M.get(J),J&&X[1].type===z.chunkFlow&&M.get(J-1)[1].type===z.listItemPrefix){if(R(X[1]._tokenizer,"expected `_tokenizer` on subtokens"),H=X[1]._tokenizer.events,V=0,V<H.length&&H[V][1].type===z.lineEndingBlank)V+=2;if(V<H.length&&H[V][1].type===z.content)while(++V<H.length){if(H[V][1].type===z.content)break;if(H[V][1].type===z.chunkText)H[V][1]._isInFirstContentOfListItem=!0,V++}}if(X[0]==="enter"){if(X[1].contentType)Object.assign(G,cW(M,J)),J=G[J],U=!0}else if(X[1]._container){V=J,q=void 0;while(V--)if(Y=M.get(V),Y[1].type===z.lineEnding||Y[1].type===z.lineEndingBlank){if(Y[0]==="enter"){if(q)M.get(q)[1].type=z.lineEndingBlank;Y[1].type=z.lineEnding,q=V}}else if(Y[1].type===z.linePrefix||Y[1].type===z.listItemIndent);else break;if(q)X[1].end={...M.get(q)[1].start},W=M.slice(q,J),W.unshift(X),M.splice(q,J-q+1,W)}}return w1($,0,Number.POSITIVE_INFINITY,M.slice(0)),!U}function cW($,G){let J=$.get(G)[1],X=$.get(G)[2],q=G-1,V=[];R(J.contentType,"expected `contentType` on subtokens");let Y=J._tokenizer;if(!Y){if(Y=X.parser[J.contentType](J.start),J._contentTypeTextTrailing)Y._contentTypeTextTrailing=!0}let W=Y.events,H=[],U={},M,Q,F=-1,K=J,j=0,N=0,P=[N];while(K){while($.get(++q)[1]!==K);if(R(!Q||K.previous===Q,"expected previous to match"),R(!Q||Q.next===K,"expected next to match"),V.push(q),!K._tokenizer){if(M=X.sliceStream(K),!K.next)M.push(D.eof);if(Q)Y.defineSkip(K.start);if(K._isInFirstContentOfListItem)Y._gfmTasklistFirstContentOfListItem=!0;if(Y.write(M),K._isInFirstContentOfListItem)Y._gfmTasklistFirstContentOfListItem=void 0}Q=K,K=K.next}K=J;while(++F<W.length)if(W[F][0]==="exit"&&W[F-1][0]==="enter"&&W[F][1].type===W[F-1][1].type&&W[F][1].start.line!==W[F][1].end.line)R(K,"expected a current token"),N=F+1,P.push(N),K._tokenizer=void 0,K.previous=void 0,K=K.next;if(Y.events=[],K)K._tokenizer=void 0,K.previous=void 0,R(!K.next,"expected no next token");else P.pop();F=P.length;while(F--){let _=W.slice(P[F],P[F+1]),k=V.pop();R(k!==void 0,"expected a start position when splicing"),H.push([k,k+_.length-1]),$.splice(k,2,_)}H.reverse(),F=-1;while(++F<H.length)U[j+H[F][0]]=j+H[F][1],j+=H[F][1]-H[F][0]-1;return U}var L6={resolve:oW,tokenize:nW},iW={partial:!0,tokenize:aW};function oW($){return W5($),$}function nW($,G){let J;return X;function X(W){return R(W!==D.eof&&!C(W),"expected no eof or eol"),$.enter(z.content),J=$.enter(z.chunkContent,{contentType:L.contentTypeContent}),q(W)}function q(W){if(W===D.eof)return V(W);if(C(W))return $.check(iW,Y,V)(W);return $.consume(W),q}function V(W){return $.exit(z.chunkContent),$.exit(z.content),G(W)}function Y(W){return R(C(W),"expected eol"),$.consume(W),$.exit(z.chunkContent),R(J,"expected previous token"),J.next=$.enter(z.chunkContent,{contentType:L.contentTypeContent,previous:J}),J=J.next,q}}function aW($,G,J){let X=this;return q;function q(Y){return R(C(Y),"expected a line ending"),$.exit(z.chunkContent),$.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),d($,V,z.linePrefix)}function V(Y){if(Y===D.eof||C(Y))return J(Y);R(X.parser.constructs.disable.null,"expected `disable.null` to be populated");let W=X.events[X.events.length-1];if(!X.parser.constructs.disable.null.includes("codeIndented")&&W&&W[1].type===z.linePrefix&&W[2].sliceSerialize(W[1],!0).length>=L.tabSize)return G(Y);return $.interrupt(X.parser.constructs.flow,J,G)(Y)}}function H5($,G,J,X,q,V,Y,W,H){let U=H||Number.POSITIVE_INFINITY,M=0;return Q;function Q(_){if(_===D.lessThan)return $.enter(X),$.enter(q),$.enter(V),$.consume(_),$.exit(V),F;if(_===D.eof||_===D.space||_===D.rightParenthesis||M4(_))return J(_);return $.enter(X),$.enter(Y),$.enter(W),$.enter(z.chunkString,{contentType:L.contentTypeString}),N(_)}function F(_){if(_===D.greaterThan)return $.enter(V),$.consume(_),$.exit(V),$.exit(q),$.exit(X),G;return $.enter(W),$.enter(z.chunkString,{contentType:L.contentTypeString}),K(_)}function K(_){if(_===D.greaterThan)return $.exit(z.chunkString),$.exit(W),F(_);if(_===D.eof||_===D.lessThan||C(_))return J(_);return $.consume(_),_===D.backslash?j:K}function j(_){if(_===D.lessThan||_===D.greaterThan||_===D.backslash)return $.consume(_),K;return K(_)}function N(_){if(!M&&(_===D.eof||_===D.rightParenthesis||H1(_)))return $.exit(z.chunkString),$.exit(W),$.exit(Y),$.exit(X),G(_);if(M<U&&_===D.leftParenthesis)return $.consume(_),M++,N;if(_===D.rightParenthesis)return $.consume(_),M--,N;if(_===D.eof||_===D.space||_===D.leftParenthesis||M4(_))return J(_);return $.consume(_),_===D.backslash?P:N}function P(_){if(_===D.leftParenthesis||_===D.rightParenthesis||_===D.backslash)return $.consume(_),N;return N(_)}}function U5($,G,J,X,q,V){let Y=this,W=0,H;return U;function U(K){return R(K===D.leftSquareBracket,"expected `[`"),$.enter(X),$.enter(q),$.consume(K),$.exit(q),$.enter(V),M}function M(K){if(W>L.linkReferenceSizeMax||K===D.eof||K===D.leftSquareBracket||K===D.rightSquareBracket&&!H||K===D.caret&&!W&&"_hiddenFootnoteSupport"in Y.parser.constructs)return J(K);if(K===D.rightSquareBracket)return $.exit(V),$.enter(q),$.consume(K),$.exit(q),$.exit(X),G;if(C(K))return $.enter(z.lineEnding),$.consume(K),$.exit(z.lineEnding),M;return $.enter(z.chunkString,{contentType:L.contentTypeString}),Q(K)}function Q(K){if(K===D.eof||K===D.leftSquareBracket||K===D.rightSquareBracket||C(K)||W++>L.linkReferenceSizeMax)return $.exit(z.chunkString),M(K);if($.consume(K),!H)H=!l(K);return K===D.backslash?F:Q}function F(K){if(K===D.leftSquareBracket||K===D.backslash||K===D.rightSquareBracket)return $.consume(K),W++,Q;return Q(K)}}function M5($,G,J,X,q,V){let Y;return W;function W(F){if(F===D.quotationMark||F===D.apostrophe||F===D.leftParenthesis)return $.enter(X),$.enter(q),$.consume(F),$.exit(q),Y=F===D.leftParenthesis?D.rightParenthesis:F,H;return J(F)}function H(F){if(F===Y)return $.enter(q),$.consume(F),$.exit(q),$.exit(X),G;return $.enter(V),U(F)}function U(F){if(F===Y)return $.exit(V),H(Y);if(F===D.eof)return J(F);if(C(F))return $.enter(z.lineEnding),$.consume(F),$.exit(z.lineEnding),d($,U,z.linePrefix);return $.enter(z.chunkString,{contentType:L.contentTypeString}),M(F)}function M(F){if(F===Y||F===D.eof||C(F))return $.exit(z.chunkString),U(F);return $.consume(F),F===D.backslash?Q:M}function Q(F){if(F===Y||F===D.backslash)return $.consume(F),M;return M(F)}}function o0($,G){let J;return X;function X(q){if(C(q))return $.enter(z.lineEnding),$.consume(q),$.exit(z.lineEnding),J=!0,X;if(l(q))return d($,X,J?z.linePrefix:z.lineSuffix)(q);return G(q)}}var T6={name:"definition",tokenize:tW},sW={partial:!0,tokenize:eW};function tW($,G,J){let X=this,q;return V;function V(K){return $.enter(z.definition),Y(K)}function Y(K){return R(K===D.leftSquareBracket,"expected `[`"),U5.call(X,$,W,J,z.definitionLabel,z.definitionLabelMarker,z.definitionLabelString)(K)}function W(K){if(q=F0(X.sliceSerialize(X.events[X.events.length-1][1]).slice(1,-1)),K===D.colon)return $.enter(z.definitionMarker),$.consume(K),$.exit(z.definitionMarker),H;return J(K)}function H(K){return H1(K)?o0($,U)(K):U(K)}function U(K){return H5($,M,J,z.definitionDestination,z.definitionDestinationLiteral,z.definitionDestinationLiteralMarker,z.definitionDestinationRaw,z.definitionDestinationString)(K)}function M(K){return $.attempt(sW,Q,Q)(K)}function Q(K){return l(K)?d($,F,z.whitespace)(K):F(K)}function F(K){if(K===D.eof||C(K))return $.exit(z.definition),X.parser.defined.push(q),G(K);return J(K)}}function eW($,G,J){return X;function X(W){return H1(W)?o0($,q)(W):J(W)}function q(W){return M5($,V,J,z.definitionTitle,z.definitionTitleMarker,z.definitionTitleString)(W)}function V(W){return l(W)?d($,Y,z.whitespace)(W):Y(W)}function Y(W){return W===D.eof||C(W)?G(W):J(W)}}var I6={name:"hardBreakEscape",tokenize:$H};function $H($,G,J){return X;function X(V){return R(V===D.backslash,"expected `\\`"),$.enter(z.hardBreakEscape),$.consume(V),q}function q(V){if(C(V))return $.exit(z.hardBreakEscape),G(V);return J(V)}}var E6={name:"headingAtx",resolve:GH,tokenize:JH};function GH($,G){let J=$.length-2,X=3,q,V;if($[X][1].type===z.whitespace)X+=2;if(J-2>X&&$[J][1].type===z.whitespace)J-=2;if($[J][1].type===z.atxHeadingSequence&&(X===J-1||J-4>X&&$[J-2][1].type===z.whitespace))J-=X+1===J?2:4;if(J>X)q={type:z.atxHeadingText,start:$[X][1].start,end:$[J][1].end},V={type:z.chunkText,start:$[X][1].start,end:$[J][1].end,contentType:L.contentTypeText},w1($,X,J-X+1,[["enter",q,G],["enter",V,G],["exit",V,G],["exit",q,G]]);return $}function JH($,G,J){let X=0;return q;function q(M){return $.enter(z.atxHeading),V(M)}function V(M){return R(M===D.numberSign,"expected `#`"),$.enter(z.atxHeadingSequence),Y(M)}function Y(M){if(M===D.numberSign&&X++<L.atxHeadingOpeningFenceSizeMax)return $.consume(M),Y;if(M===D.eof||H1(M))return $.exit(z.atxHeadingSequence),W(M);return J(M)}function W(M){if(M===D.numberSign)return $.enter(z.atxHeadingSequence),H(M);if(M===D.eof||C(M))return $.exit(z.atxHeading),G(M);if(l(M))return d($,W,z.whitespace)(M);return $.enter(z.atxHeadingText),U(M)}function H(M){if(M===D.numberSign)return $.consume(M),H;return $.exit(z.atxHeadingSequence),W(M)}function U(M){if(M===D.eof||M===D.numberSign||H1(M))return $.exit(z.atxHeadingText),W(M);return $.consume(M),U}}var KG=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],C6=["pre","script","style","textarea"];var S6={concrete:!0,name:"htmlFlow",resolveTo:YH,tokenize:VH},XH={partial:!0,tokenize:HH},qH={partial:!0,tokenize:WH};function YH($){let G=$.length;while(G--)if($[G][0]==="enter"&&$[G][1].type===z.htmlFlow)break;if(G>1&&$[G-2][1].type===z.linePrefix)$[G][1].start=$[G-2][1].start,$[G+1][1].start=$[G-2][1].start,$.splice(G-2,2);return $}function VH($,G,J){let X=this,q,V,Y,W,H;return U;function U(O){return M(O)}function M(O){return R(O===D.lessThan,"expected `<`"),$.enter(z.htmlFlow),$.enter(z.htmlFlowData),$.consume(O),Q}function Q(O){if(O===D.exclamationMark)return $.consume(O),F;if(O===D.slash)return $.consume(O),V=!0,N;if(O===D.questionMark)return $.consume(O),q=L.htmlInstruction,X.interrupt?G:B;if(p1(O))return R(O!==null),$.consume(O),Y=String.fromCharCode(O),P;return J(O)}function F(O){if(O===D.dash)return $.consume(O),q=L.htmlComment,K;if(O===D.leftSquareBracket)return $.consume(O),q=L.htmlCdata,W=0,j;if(p1(O))return $.consume(O),q=L.htmlDeclaration,X.interrupt?G:B;return J(O)}function K(O){if(O===D.dash)return $.consume(O),X.interrupt?G:B;return J(O)}function j(O){let h1=L.cdataOpeningString;if(O===h1.charCodeAt(W++)){if($.consume(O),W===h1.length)return X.interrupt?G:G1;return j}return J(O)}function N(O){if(p1(O))return R(O!==null),$.consume(O),Y=String.fromCharCode(O),P;return J(O)}function P(O){if(O===D.eof||O===D.slash||O===D.greaterThan||H1(O)){let h1=O===D.slash,h0=Y.toLowerCase();if(!h1&&!V&&C6.includes(h0))return q=L.htmlRaw,X.interrupt?G(O):G1(O);if(KG.includes(Y.toLowerCase())){if(q=L.htmlBasic,h1)return $.consume(O),_;return X.interrupt?G(O):G1(O)}return q=L.htmlComplete,X.interrupt&&!X.parser.lazy[X.now().line]?J(O):V?k(O):h(O)}if(O===D.dash||b1(O))return $.consume(O),Y+=String.fromCharCode(O),P;return J(O)}function _(O){if(O===D.greaterThan)return $.consume(O),X.interrupt?G:G1;return J(O)}function k(O){if(l(O))return $.consume(O),k;return X1(O)}function h(O){if(O===D.slash)return $.consume(O),X1;if(O===D.colon||O===D.underscore||p1(O))return $.consume(O),t;if(l(O))return $.consume(O),h;return X1(O)}function t(O){if(O===D.dash||O===D.dot||O===D.colon||O===D.underscore||b1(O))return $.consume(O),t;return J1(O)}function J1(O){if(O===D.equalsTo)return $.consume(O),Z;if(l(O))return $.consume(O),J1;return h(O)}function Z(O){if(O===D.eof||O===D.lessThan||O===D.equalsTo||O===D.greaterThan||O===D.graveAccent)return J(O);if(O===D.quotationMark||O===D.apostrophe)return $.consume(O),H=O,$1;if(l(O))return $.consume(O),Z;return q1(O)}function $1(O){if(O===H)return $.consume(O),H=null,s;if(O===D.eof||C(O))return J(O);return $.consume(O),$1}function q1(O){if(O===D.eof||O===D.quotationMark||O===D.apostrophe||O===D.slash||O===D.lessThan||O===D.equalsTo||O===D.greaterThan||O===D.graveAccent||H1(O))return J1(O);return $.consume(O),q1}function s(O){if(O===D.slash||O===D.greaterThan||l(O))return h(O);return J(O)}function X1(O){if(O===D.greaterThan)return $.consume(O),r1;return J(O)}function r1(O){if(O===D.eof||C(O))return G1(O);if(l(O))return $.consume(O),r1;return J(O)}function G1(O){if(O===D.dash&&q===L.htmlComment)return $.consume(O),V1;if(O===D.lessThan&&q===L.htmlRaw)return $.consume(O),D1;if(O===D.greaterThan&&q===L.htmlDeclaration)return $.consume(O),c1;if(O===D.questionMark&&q===L.htmlInstruction)return $.consume(O),B;if(O===D.rightSquareBracket&&q===L.htmlCdata)return $.consume(O),J0;if(C(O)&&(q===L.htmlBasic||q===L.htmlComplete))return $.exit(z.htmlFlowData),$.check(XH,U0,x)(O);if(O===D.eof||C(O))return $.exit(z.htmlFlowData),x(O);return $.consume(O),G1}function x(O){return $.check(qH,r,U0)(O)}function r(O){return R(C(O)),$.enter(z.lineEnding),$.consume(O),$.exit(z.lineEnding),i}function i(O){if(O===D.eof||C(O))return x(O);return $.enter(z.htmlFlowData),G1(O)}function V1(O){if(O===D.dash)return $.consume(O),B;return G1(O)}function D1(O){if(O===D.slash)return $.consume(O),Y="",d1;return G1(O)}function d1(O){if(O===D.greaterThan){let h1=Y.toLowerCase();if(C6.includes(h1))return $.consume(O),c1;return G1(O)}if(p1(O)&&Y.length<L.htmlRawSizeMax)return R(O!==null),$.consume(O),Y+=String.fromCharCode(O),d1;return G1(O)}function J0(O){if(O===D.rightSquareBracket)return $.consume(O),B;return G1(O)}function B(O){if(O===D.greaterThan)return $.consume(O),c1;if(O===D.dash&&q===L.htmlComment)return $.consume(O),B;return G1(O)}function c1(O){if(O===D.eof||C(O))return $.exit(z.htmlFlowData),U0(O);return $.consume(O),c1}function U0(O){return $.exit(z.htmlFlow),G(O)}}function WH($,G,J){let X=this;return q;function q(Y){if(C(Y))return $.enter(z.lineEnding),$.consume(Y),$.exit(z.lineEnding),V;return J(Y)}function V(Y){return X.parser.lazy[X.now().line]?J(Y):G(Y)}}function HH($,G,J){return X;function X(q){return R(C(q),"expected a line ending"),$.enter(z.lineEnding),$.consume(q),$.exit(z.lineEnding),$.attempt(P0,G,J)}}var b6={name:"htmlText",tokenize:UH};function UH($,G,J){let X=this,q,V,Y;return W;function W(B){return R(B===D.lessThan,"expected `<`"),$.enter(z.htmlText),$.enter(z.htmlTextData),$.consume(B),H}function H(B){if(B===D.exclamationMark)return $.consume(B),U;if(B===D.slash)return $.consume(B),J1;if(B===D.questionMark)return $.consume(B),h;if(p1(B))return $.consume(B),q1;return J(B)}function U(B){if(B===D.dash)return $.consume(B),M;if(B===D.leftSquareBracket)return $.consume(B),V=0,j;if(p1(B))return $.consume(B),k;return J(B)}function M(B){if(B===D.dash)return $.consume(B),K;return J(B)}function Q(B){if(B===D.eof)return J(B);if(B===D.dash)return $.consume(B),F;if(C(B))return Y=Q,D1(B);return $.consume(B),Q}function F(B){if(B===D.dash)return $.consume(B),K;return Q(B)}function K(B){return B===D.greaterThan?V1(B):B===D.dash?F(B):Q(B)}function j(B){let c1=L.cdataOpeningString;if(B===c1.charCodeAt(V++))return $.consume(B),V===c1.length?N:j;return J(B)}function N(B){if(B===D.eof)return J(B);if(B===D.rightSquareBracket)return $.consume(B),P;if(C(B))return Y=N,D1(B);return $.consume(B),N}function P(B){if(B===D.rightSquareBracket)return $.consume(B),_;return N(B)}function _(B){if(B===D.greaterThan)return V1(B);if(B===D.rightSquareBracket)return $.consume(B),_;return N(B)}function k(B){if(B===D.eof||B===D.greaterThan)return V1(B);if(C(B))return Y=k,D1(B);return $.consume(B),k}function h(B){if(B===D.eof)return J(B);if(B===D.questionMark)return $.consume(B),t;if(C(B))return Y=h,D1(B);return $.consume(B),h}function t(B){return B===D.greaterThan?V1(B):h(B)}function J1(B){if(p1(B))return $.consume(B),Z;return J(B)}function Z(B){if(B===D.dash||b1(B))return $.consume(B),Z;return $1(B)}function $1(B){if(C(B))return Y=$1,D1(B);if(l(B))return $.consume(B),$1;return V1(B)}function q1(B){if(B===D.dash||b1(B))return $.consume(B),q1;if(B===D.slash||B===D.greaterThan||H1(B))return s(B);return J(B)}function s(B){if(B===D.slash)return $.consume(B),V1;if(B===D.colon||B===D.underscore||p1(B))return $.consume(B),X1;if(C(B))return Y=s,D1(B);if(l(B))return $.consume(B),s;return V1(B)}function X1(B){if(B===D.dash||B===D.dot||B===D.colon||B===D.underscore||b1(B))return $.consume(B),X1;return r1(B)}function r1(B){if(B===D.equalsTo)return $.consume(B),G1;if(C(B))return Y=r1,D1(B);if(l(B))return $.consume(B),r1;return s(B)}function G1(B){if(B===D.eof||B===D.lessThan||B===D.equalsTo||B===D.greaterThan||B===D.graveAccent)return J(B);if(B===D.quotationMark||B===D.apostrophe)return $.consume(B),q=B,x;if(C(B))return Y=G1,D1(B);if(l(B))return $.consume(B),G1;return $.consume(B),r}function x(B){if(B===q)return $.consume(B),q=void 0,i;if(B===D.eof)return J(B);if(C(B))return Y=x,D1(B);return $.consume(B),x}function r(B){if(B===D.eof||B===D.quotationMark||B===D.apostrophe||B===D.lessThan||B===D.equalsTo||B===D.graveAccent)return J(B);if(B===D.slash||B===D.greaterThan||H1(B))return s(B);return $.consume(B),r}function i(B){if(B===D.slash||B===D.greaterThan||H1(B))return s(B);return J(B)}function V1(B){if(B===D.greaterThan)return $.consume(B),$.exit(z.htmlTextData),$.exit(z.htmlText),G;return J(B)}function D1(B){return R(Y,"expected return state"),R(C(B),"expected eol"),$.exit(z.htmlTextData),$.enter(z.lineEnding),$.consume(B),$.exit(z.lineEnding),d1}function d1(B){return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),l(B)?d($,J0,z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(B):J0(B)}function J0(B){return $.enter(z.htmlTextData),Y(B)}}var n0={name:"labelEnd",resolveAll:DH,resolveTo:KH,tokenize:FH},MH={tokenize:RH},zH={tokenize:BH},QH={tokenize:OH};function DH($){let G=-1,J=[];while(++G<$.length){let X=$[G][1];if(J.push($[G]),X.type===z.labelImage||X.type===z.labelLink||X.type===z.labelEnd){let q=X.type===z.labelImage?4:2;X.type=z.data,G+=q}}if($.length!==J.length)w1($,0,$.length,J);return $}function KH($,G){let J=$.length,X=0,q,V,Y,W;while(J--)if(q=$[J][1],V){if(q.type===z.link||q.type===z.labelLink&&q._inactive)break;if($[J][0]==="enter"&&q.type===z.labelLink)q._inactive=!0}else if(Y){if($[J][0]==="enter"&&(q.type===z.labelImage||q.type===z.labelLink)&&!q._balanced){if(V=J,q.type!==z.labelLink){X=2;break}}}else if(q.type===z.labelEnd)Y=J;R(V!==void 0,"`open` is supposed to be found"),R(Y!==void 0,"`close` is supposed to be found");let H={type:$[V][1].type===z.labelLink?z.link:z.image,start:{...$[V][1].start},end:{...$[$.length-1][1].end}},U={type:z.label,start:{...$[V][1].start},end:{...$[Y][1].end}},M={type:z.labelText,start:{...$[V+X+2][1].end},end:{...$[Y-2][1].start}};return W=[["enter",H,G],["enter",U,G]],W=S1(W,$.slice(V+1,V+X+3)),W=S1(W,[["enter",M,G]]),R(G.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),W=S1(W,N2(G.parser.constructs.insideSpan.null,$.slice(V+X+4,Y-3),G)),W=S1(W,[["exit",M,G],$[Y-2],$[Y-1],["exit",U,G]]),W=S1(W,$.slice(Y+1)),W=S1(W,[["exit",H,G]]),w1($,V,$.length,W),$}function FH($,G,J){let X=this,q=X.events.length,V,Y;while(q--)if((X.events[q][1].type===z.labelImage||X.events[q][1].type===z.labelLink)&&!X.events[q][1]._balanced){V=X.events[q][1];break}return W;function W(F){if(R(F===D.rightSquareBracket,"expected `]`"),!V)return J(F);if(V._inactive)return Q(F);return Y=X.parser.defined.includes(F0(X.sliceSerialize({start:V.end,end:X.now()}))),$.enter(z.labelEnd),$.enter(z.labelMarker),$.consume(F),$.exit(z.labelMarker),$.exit(z.labelEnd),H}function H(F){if(F===D.leftParenthesis)return $.attempt(MH,M,Y?M:Q)(F);if(F===D.leftSquareBracket)return $.attempt(zH,M,Y?U:Q)(F);return Y?M(F):Q(F)}function U(F){return $.attempt(QH,M,Q)(F)}function M(F){return G(F)}function Q(F){return V._balanced=!0,J(F)}}function RH($,G,J){return X;function X(Q){return R(Q===D.leftParenthesis,"expected left paren"),$.enter(z.resource),$.enter(z.resourceMarker),$.consume(Q),$.exit(z.resourceMarker),q}function q(Q){return H1(Q)?o0($,V)(Q):V(Q)}function V(Q){if(Q===D.rightParenthesis)return M(Q);return H5($,Y,W,z.resourceDestination,z.resourceDestinationLiteral,z.resourceDestinationLiteralMarker,z.resourceDestinationRaw,z.resourceDestinationString,L.linkResourceDestinationBalanceMax)(Q)}function Y(Q){return H1(Q)?o0($,H)(Q):M(Q)}function W(Q){return J(Q)}function H(Q){if(Q===D.quotationMark||Q===D.apostrophe||Q===D.leftParenthesis)return M5($,U,J,z.resourceTitle,z.resourceTitleMarker,z.resourceTitleString)(Q);return M(Q)}function U(Q){return H1(Q)?o0($,M)(Q):M(Q)}function M(Q){if(Q===D.rightParenthesis)return $.enter(z.resourceMarker),$.consume(Q),$.exit(z.resourceMarker),$.exit(z.resource),G;return J(Q)}}function BH($,G,J){let X=this;return q;function q(W){return R(W===D.leftSquareBracket,"expected left bracket"),U5.call(X,$,V,Y,z.reference,z.referenceMarker,z.referenceString)(W)}function V(W){return X.parser.defined.includes(F0(X.sliceSerialize(X.events[X.events.length-1][1]).slice(1,-1)))?G(W):J(W)}function Y(W){return J(W)}}function OH($,G,J){return X;function X(V){return R(V===D.leftSquareBracket,"expected left bracket"),$.enter(z.reference),$.enter(z.referenceMarker),$.consume(V),$.exit(z.referenceMarker),q}function q(V){if(V===D.rightSquareBracket)return $.enter(z.referenceMarker),$.consume(V),$.exit(z.referenceMarker),$.exit(z.reference),G;return J(V)}}var x6={name:"labelStartImage",resolveAll:n0.resolveAll,tokenize:AH};function AH($,G,J){let X=this;return q;function q(W){return R(W===D.exclamationMark,"expected `!`"),$.enter(z.labelImage),$.enter(z.labelImageMarker),$.consume(W),$.exit(z.labelImageMarker),V}function V(W){if(W===D.leftSquareBracket)return $.enter(z.labelMarker),$.consume(W),$.exit(z.labelMarker),$.exit(z.labelImage),Y;return J(W)}function Y(W){return W===D.caret&&"_hiddenFootnoteSupport"in X.parser.constructs?J(W):G(W)}}var v6={name:"labelStartLink",resolveAll:n0.resolveAll,tokenize:wH};function wH($,G,J){let X=this;return q;function q(Y){return R(Y===D.leftSquareBracket,"expected `[`"),$.enter(z.labelLink),$.enter(z.labelMarker),$.consume(Y),$.exit(z.labelMarker),$.exit(z.labelLink),V}function V(Y){return Y===D.caret&&"_hiddenFootnoteSupport"in X.parser.constructs?J(Y):G(Y)}}var F4={name:"lineEnding",tokenize:jH};function jH($,G){return J;function J(X){return R(C(X),"expected eol"),$.enter(z.lineEnding),$.consume(X),$.exit(z.lineEnding),d($,G,z.linePrefix)}}var a0={name:"thematicBreak",tokenize:NH};function NH($,G,J){let X=0,q;return V;function V(U){return $.enter(z.thematicBreak),Y(U)}function Y(U){return R(U===D.asterisk||U===D.dash||U===D.underscore,"expected `*`, `-`, or `_`"),q=U,W(U)}function W(U){if(U===q)return $.enter(z.thematicBreakSequence),H(U);if(X>=L.thematicBreakMarkerCountMin&&(U===D.eof||C(U)))return $.exit(z.thematicBreak),G(U);return J(U)}function H(U){if(U===q)return $.consume(U),X++,H;return $.exit(z.thematicBreakSequence),l(U)?d($,W,z.whitespace)(U):W(U)}}var _1={continuation:{tokenize:LH},exit:IH,name:"list",tokenize:PH},ZH={partial:!0,tokenize:EH},_H={partial:!0,tokenize:TH};function PH($,G,J){let X=this,q=X.events[X.events.length-1],V=q&&q[1].type===z.linePrefix?q[2].sliceSerialize(q[1],!0).length:0,Y=0;return W;function W(K){R(X.containerState,"expected state");let j=X.containerState.type||(K===D.asterisk||K===D.plusSign||K===D.dash?z.listUnordered:z.listOrdered);if(j===z.listUnordered?!X.containerState.marker||K===X.containerState.marker:z4(K)){if(!X.containerState.type)X.containerState.type=j,$.enter(j,{_container:!0});if(j===z.listUnordered)return $.enter(z.listItemPrefix),K===D.asterisk||K===D.dash?$.check(a0,J,U)(K):U(K);if(!X.interrupt||K===D.digit1)return $.enter(z.listItemPrefix),$.enter(z.listItemValue),H(K)}return J(K)}function H(K){if(R(X.containerState,"expected state"),z4(K)&&++Y<L.listItemValueSizeMax)return $.consume(K),H;if((!X.interrupt||Y<2)&&(X.containerState.marker?K===X.containerState.marker:K===D.rightParenthesis||K===D.dot))return $.exit(z.listItemValue),U(K);return J(K)}function U(K){return R(X.containerState,"expected state"),R(K!==D.eof,"eof (`null`) is not a marker"),$.enter(z.listItemMarker),$.consume(K),$.exit(z.listItemMarker),X.containerState.marker=X.containerState.marker||K,$.check(P0,X.interrupt?J:M,$.attempt(ZH,F,Q))}function M(K){return R(X.containerState,"expected state"),X.containerState.initialBlankLine=!0,V++,F(K)}function Q(K){if(l(K))return $.enter(z.listItemPrefixWhitespace),$.consume(K),$.exit(z.listItemPrefixWhitespace),F;return J(K)}function F(K){return R(X.containerState,"expected state"),X.containerState.size=V+X.sliceSerialize($.exit(z.listItemPrefix),!0).length,G(K)}}function LH($,G,J){let X=this;return R(X.containerState,"expected state"),X.containerState._closeFlow=void 0,$.check(P0,q,V);function q(W){return R(X.containerState,"expected state"),R(typeof X.containerState.size==="number","expected size"),X.containerState.furtherBlankLines=X.containerState.furtherBlankLines||X.containerState.initialBlankLine,d($,G,z.listItemIndent,X.containerState.size+1)(W)}function V(W){if(R(X.containerState,"expected state"),X.containerState.furtherBlankLines||!l(W))return X.containerState.furtherBlankLines=void 0,X.containerState.initialBlankLine=void 0,Y(W);return X.containerState.furtherBlankLines=void 0,X.containerState.initialBlankLine=void 0,$.attempt(_H,G,Y)(W)}function Y(W){return R(X.containerState,"expected state"),X.containerState._closeFlow=!0,X.interrupt=void 0,R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,$.attempt(_1,G,J),z.linePrefix,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(W)}}function TH($,G,J){let X=this;return R(X.containerState,"expected state"),R(typeof X.containerState.size==="number","expected size"),d($,q,z.listItemIndent,X.containerState.size+1);function q(V){R(X.containerState,"expected state");let Y=X.events[X.events.length-1];return Y&&Y[1].type===z.listItemIndent&&Y[2].sliceSerialize(Y[1],!0).length===X.containerState.size?G(V):J(V)}}function IH($){R(this.containerState,"expected state"),R(typeof this.containerState.type==="string","expected type"),$.exit(this.containerState.type)}function EH($,G,J){let X=this;return R(X.parser.constructs.disable.null,"expected `disable.null` to be populated"),d($,q,z.listItemPrefixWhitespace,X.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize+1);function q(V){let Y=X.events[X.events.length-1];return!l(V)&&Y&&Y[1].type===z.listItemPrefixWhitespace?G(V):J(V)}}var z5={name:"setextUnderline",resolveTo:CH,tokenize:SH};function CH($,G){let J=$.length,X,q,V;while(J--)if($[J][0]==="enter"){if($[J][1].type===z.content){X=J;break}if($[J][1].type===z.paragraph)q=J}else{if($[J][1].type===z.content)$.splice(J,1);if(!V&&$[J][1].type===z.definition)V=J}R(q!==void 0,"expected a `text` index to be found"),R(X!==void 0,"expected a `text` index to be found"),R($[X][2]===G,"enter context should be same"),R($[$.length-1][2]===G,"enter context should be same");let Y={type:z.setextHeading,start:{...$[X][1].start},end:{...$[$.length-1][1].end}};if($[q][1].type=z.setextHeadingText,V)$.splice(q,0,["enter",Y,G]),$.splice(V+1,0,["exit",$[X][1],G]),$[X][1].end={...$[V][1].end};else $[X][1]=Y;return $.push(["exit",Y,G]),$}function SH($,G,J){let X=this,q;return V;function V(U){let M=X.events.length,Q;R(U===D.dash||U===D.equalsTo,"expected `=` or `-`");while(M--)if(X.events[M][1].type!==z.lineEnding&&X.events[M][1].type!==z.linePrefix&&X.events[M][1].type!==z.content){Q=X.events[M][1].type===z.paragraph;break}if(!X.parser.lazy[X.now().line]&&(X.interrupt||Q))return $.enter(z.setextHeadingLine),q=U,Y(U);return J(U)}function Y(U){return $.enter(z.setextHeadingLineSequence),W(U)}function W(U){if(U===q)return $.consume(U),W;return $.exit(z.setextHeadingLineSequence),l(U)?d($,H,z.lineSuffix)(U):H(U)}function H(U){if(U===D.eof||C(U))return $.exit(z.setextHeadingLine),G(U);return J(U)}}var FG={tokenize:bH};function bH($){let G=this,J=$.attempt(P0,X,$.attempt(this.parser.constructs.flowInitial,q,d($,$.attempt(this.parser.constructs.flow,q,$.attempt(L6,q)),z.linePrefix)));return J;function X(V){if(R(V===D.eof||C(V),"expected eol or eof"),V===D.eof){$.consume(V);return}return $.enter(z.lineEndingBlank),$.consume(V),$.exit(z.lineEndingBlank),G.currentConstruct=void 0,J}function q(V){if(R(V===D.eof||C(V),"expected eol or eof"),V===D.eof){$.consume(V);return}return $.enter(z.lineEnding),$.consume(V),$.exit(z.lineEnding),G.currentConstruct=void 0,J}}var RG={resolveAll:wG()},BG=AG("string"),OG=AG("text");function AG($){return{resolveAll:wG($==="text"?xH:void 0),tokenize:G};function G(J){let X=this,q=this.parser.constructs[$],V=J.attempt(q,Y,W);return Y;function Y(M){return U(M)?V(M):W(M)}function W(M){if(M===D.eof){J.consume(M);return}return J.enter(z.data),J.consume(M),H}function H(M){if(U(M))return J.exit(z.data),V(M);return J.consume(M),H}function U(M){if(M===D.eof)return!0;let Q=q[M],F=-1;if(Q){R(Array.isArray(Q),"expected `disable.null` to be populated");while(++F<Q.length){let K=Q[F];if(!K.previous||K.previous.call(X,X.previous))return!0}}return!1}}}function wG($){return G;function G(J,X){let q=-1,V;while(++q<=J.length)if(V===void 0){if(J[q]&&J[q][1].type===z.data)V=q,q++}else if(!J[q]||J[q][1].type!==z.data){if(q!==V+2)J[V][1].end=J[q-1][1].end,J.splice(V+2,q-V-2),q=V+2;V=void 0}return $?$(J,X):J}}function xH($,G){let J=0;while(++J<=$.length)if((J===$.length||$[J][1].type===z.lineEnding)&&$[J-1][1].type===z.data){let X=$[J-1][1],q=G.sliceStream(X),V=q.length,Y=-1,W=0,H;while(V--){let U=q[V];if(typeof U==="string"){Y=U.length;while(U.charCodeAt(Y-1)===D.space)W++,Y--;if(Y)break;Y=-1}else if(U===D.horizontalTab)H=!0,W++;else if(U===D.virtualSpace);else{V++;break}}if(G._contentTypeTextTrailing&&J===$.length)W=0;if(W){let U={type:J===$.length||H||W<L.hardBreakPrefixSizeMin?z.lineSuffix:z.hardBreakTrailing,start:{_bufferIndex:V?Y:X.start._bufferIndex+Y,_index:X.start._index+V,line:X.end.line,column:X.end.column-W,offset:X.end.offset-W},end:{...X.end}};if(X.end={...U.start},X.start.offset===X.end.offset)Object.assign(X,U);else $.splice(J,0,["enter",U,G],["exit",U,G]),J+=2}J++}return $}var k6={};m9(k6,{text:()=>mH,string:()=>yH,insideSpan:()=>fH,flowInitial:()=>gH,flow:()=>hH,document:()=>vH,disable:()=>pH,contentInitial:()=>kH,attentionMarkers:()=>uH});var vH={[D.asterisk]:_1,[D.plusSign]:_1,[D.dash]:_1,[D.digit0]:_1,[D.digit1]:_1,[D.digit2]:_1,[D.digit3]:_1,[D.digit4]:_1,[D.digit5]:_1,[D.digit6]:_1,[D.digit7]:_1,[D.digit8]:_1,[D.digit9]:_1,[D.greaterThan]:X5},kH={[D.leftSquareBracket]:T6},gH={[D.horizontalTab]:D4,[D.virtualSpace]:D4,[D.space]:D4},hH={[D.numberSign]:E6,[D.asterisk]:a0,[D.dash]:[z5,a0],[D.lessThan]:S6,[D.equalsTo]:z5,[D.underscore]:a0,[D.graveAccent]:V5,[D.tilde]:V5},yH={[D.ampersand]:Y5,[D.backslash]:q5},mH={[D.carriageReturn]:F4,[D.lineFeed]:F4,[D.carriageReturnLineFeed]:F4,[D.exclamationMark]:x6,[D.ampersand]:Y5,[D.asterisk]:Q4,[D.lessThan]:[Z6,b6],[D.leftSquareBracket]:v6,[D.backslash]:[I6,q5],[D.rightSquareBracket]:n0,[D.underscore]:Q4,[D.graveAccent]:_6},fH={null:[Q4,RG]},uH={null:[D.asterisk,D.underscore]},pH={null:[]};var gG=x4(kG(),1);var e0=gG.default("micromark");function hG($,G,J){let X={_bufferIndex:-1,_index:0,line:J&&J.line||1,column:J&&J.column||1,offset:J&&J.offset||0},q={},V=[],Y=[],W=[],H=!0,U={attempt:s($1),check:s(q1),consume:t,enter:J1,exit:Z,interrupt:s(q1,{interrupt:!0})},M={code:D.eof,containerState:{},defineSkip:_,events:[],now:P,parser:$,previous:D.eof,sliceSerialize:j,sliceStream:N,write:K},Q=G.tokenize.call(M,U),F;if(G.resolveAll)V.push(G);return M;function K(x){if(Y=S1(Y,x),k(),Y[Y.length-1]!==D.eof)return[];return X1(G,0),M.events=N2(V,M.events,M),M.events}function j(x,r){return LU(N(x),r)}function N(x){return PU(Y,x)}function P(){let{_bufferIndex:x,_index:r,line:i,column:V1,offset:D1}=X;return{_bufferIndex:x,_index:r,line:i,column:V1,offset:D1}}function _(x){q[x.line]=x.column,G1(),e0("position: define skip: `%j`",X)}function k(){let x;while(X._index<Y.length){let r=Y[X._index];if(typeof r==="string"){if(x=X._index,X._bufferIndex<0)X._bufferIndex=0;while(X._index===x&&X._bufferIndex<r.length)h(r.charCodeAt(X._bufferIndex))}else h(r)}}function h(x){R(H===!0,"expected character to be consumed"),H=void 0,e0("main: passing `%s` to %s",x,Q&&Q.name),F=x,R(typeof Q==="function","expected state"),Q=Q(x)}function t(x){if(R(x===F,"expected given code to equal expected code"),e0("consume: `%s`",x),R(H===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),R(x===null?M.events.length===0||M.events[M.events.length-1][0]==="exit":M.events[M.events.length-1][0]==="enter","expected last token to be open"),C(x))X.line++,X.column=1,X.offset+=x===D.carriageReturnLineFeed?2:1,G1(),e0("position: after eol: `%j`",X);else if(x!==D.virtualSpace)X.column++,X.offset++;if(X._bufferIndex<0)X._index++;else if(X._bufferIndex++,X._bufferIndex===Y[X._index].length)X._bufferIndex=-1,X._index++;M.previous=x,H=!0}function J1(x,r){let i=r||{};return i.type=x,i.start=P(),R(typeof x==="string","expected string type"),R(x.length>0,"expected non-empty string"),e0("enter: `%s`",x),M.events.push(["enter",i,M]),W.push(i),i}function Z(x){R(typeof x==="string","expected string type"),R(x.length>0,"expected non-empty string");let r=W.pop();return R(r,"cannot close w/o open tokens"),r.end=P(),R(x===r.type,"expected exit token to match current token"),R(!(r.start._index===r.end._index&&r.start._bufferIndex===r.end._bufferIndex),"expected non-empty token (`"+x+"`)"),e0("exit: `%s`",r.type),M.events.push(["exit",r,M]),r}function $1(x,r){X1(x,r.from)}function q1(x,r){r.restore()}function s(x,r){return i;function i(V1,D1,d1){let J0,B,c1,U0;return Array.isArray(V1)?h1(V1):("tokenize"in V1)?h1([V1]):O(V1);function O(K1){return n2;function n2(M0){let y0=M0!==null&&K1[M0],H2=M0!==null&&K1.null,u5=[...Array.isArray(y0)?y0:y0?[y0]:[],...Array.isArray(H2)?H2:H2?[H2]:[]];return h1(u5)(M0)}}function h1(K1){if(J0=K1,B=0,K1.length===0)return R(d1,"expected `bogusState` to be given"),d1;return h0(K1[B])}function h0(K1){return n2;function n2(M0){if(U0=r1(),c1=K1,!K1.partial)M.currentConstruct=K1;if(R(M.parser.constructs.disable.null,"expected `disable.null` to be populated"),K1.name&&M.parser.constructs.disable.null.includes(K1.name))return b4(M0);return K1.tokenize.call(r?Object.assign(Object.create(M),r):M,U,f5,b4)(M0)}}function f5(K1){return R(K1===F,"expected code"),H=!0,x(c1,U0),D1}function b4(K1){if(R(K1===F,"expected code"),H=!0,U0.restore(),++B<J0.length)return h0(J0[B]);return d1}}}function X1(x,r){if(x.resolveAll&&!V.includes(x))V.push(x);if(x.resolve)w1(M.events,r,M.events.length-r,x.resolve(M.events.slice(r),M));if(x.resolveTo)M.events=x.resolveTo(M.events,M);R(x.partial||M.events.length===0||M.events[M.events.length-1][0]==="exit","expected last token to end")}function r1(){let x=P(),r=M.previous,i=M.currentConstruct,V1=M.events.length,D1=Array.from(W);return{from:V1,restore:d1};function d1(){X=x,M.previous=r,M.currentConstruct=i,M.events.length=V1,W=D1,G1(),e0("position: restore: `%j`",X)}}function G1(){if(X.line in q&&X.column<2)X.column=q[X.line],X.offset+=q[X.line]-1}}function PU($,G){let J=G.start._index,X=G.start._bufferIndex,q=G.end._index,V=G.end._bufferIndex,Y;if(J===q)R(V>-1,"expected non-negative end buffer index"),R(X>-1,"expected non-negative start buffer index"),Y=[$[J].slice(X,V)];else{if(Y=$.slice(J,q),X>-1){let W=Y[0];if(typeof W==="string")Y[0]=W.slice(X);else R(X===0,"expected `startBufferIndex` to be `0`"),Y.shift()}if(V>0)Y.push($[q].slice(0,V))}return Y}function LU($,G){let J=-1,X=[],q;while(++J<$.length){let V=$[J],Y;if(typeof V==="string")Y=V;else switch(V){case D.carriageReturn:{Y=u1.cr;break}case D.lineFeed:{Y=u1.lf;break}case D.carriageReturnLineFeed:{Y=u1.cr+u1.lf;break}case D.horizontalTab:{Y=G?u1.space:u1.ht;break}case D.virtualSpace:{if(!G&&q)continue;Y=u1.space;break}default:R(typeof V==="number","expected number"),Y=String.fromCharCode(V)}q=V===D.horizontalTab,X.push(Y)}return X.join("")}function f6($){let X={constructs:JG([k6,...($||{}).extensions||[]]),content:q(HG),defined:[],document:q(MG),flow:q(FG),lazy:{},string:q(BG),text:q(OG)};return X;function q(V){return Y;function Y(W){return hG(X,V,W)}}}function u6($){while(!W5($));return $}var yG=/[\0\t\n\r]/g;function p6(){let $=1,G="",J=!0,X;return q;function q(V,Y,W){let H=[],U,M,Q,F,K;if(V=G+(typeof V==="string"?V.toString():new TextDecoder(Y||void 0).decode(V)),Q=0,G="",J){if(V.charCodeAt(0)===D.byteOrderMarker)Q++;J=void 0}while(Q<V.length){if(yG.lastIndex=Q,U=yG.exec(V),F=U&&U.index!==void 0?U.index:V.length,K=V.charCodeAt(F),!U){G=V.slice(Q);break}if(K===D.lf&&Q===F&&X)H.push(D.carriageReturnLineFeed),X=void 0;else{if(X)H.push(D.carriageReturn),X=void 0;if(Q<F)H.push(V.slice(Q,F)),$+=F-Q;switch(K){case D.nul:{H.push(D.replacementCharacter),$++;break}case D.ht:{M=Math.ceil($/L.tabSize)*L.tabSize,H.push(D.horizontalTab);while($++<M)H.push(D.virtualSpace);break}case D.lf:{H.push(D.lineFeed),$=1;break}default:X=!0,$=1}}Q=F+1}if(W){if(X)H.push(D.carriageReturn);if(G)H.push(G);H.push(D.eof)}return H}}var TU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function R5($){return $.replace(TU,IU)}function IU($,G,J){if(G)return G;if(J.charCodeAt(0)===D.numberSign){let q=J.charCodeAt(1),V=q===D.lowercaseX||q===D.uppercaseX;return J5(J.slice(V?2:1),V?L.numericBaseHexadecimal:L.numericBaseDecimal)}return w2(J)||$}function T0($){if(!$||typeof $!=="object")return"";if("position"in $||"type"in $)return mG($.position);if("start"in $||"end"in $)return mG($);if("line"in $||"column"in $)return l6($);return""}function l6($){return fG($&&$.line)+":"+fG($&&$.column)}function mG($){return l6($&&$.start)+"-"+l6($&&$.end)}function fG($){return $&&typeof $==="number"?$:1}var pG={}.hasOwnProperty;function r6($,G,J){if(G&&typeof G==="object")J=G,G=void 0;return EU(J)(u6(f6(J).document().write(p6()($,G,!0))))}function EU($){let G={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:V(h9),autolinkProtocol:s,autolinkEmail:s,atxHeading:V(v9),blockQuote:V(M0),characterEscape:s,characterReference:s,codeFenced:V(y0),codeFencedFenceInfo:Y,codeFencedFenceMeta:Y,codeIndented:V(y0,Y),codeText:V(H2,Y),codeTextData:s,data:s,codeFlowValue:s,definition:V(u5),definitionDestinationString:Y,definitionLabelString:Y,definitionTitleString:Y,emphasis:V(i3),hardBreakEscape:V(k9),hardBreakTrailing:V(k9),htmlFlow:V(g9,Y),htmlFlowData:s,htmlText:V(g9,Y),htmlTextData:s,image:V(o3),label:Y,link:V(h9),listItem:V(n3),listItemValue:F,listOrdered:V(y9,Q),listUnordered:V(y9),paragraph:V(a3),reference:O,referenceString:Y,resourceDestinationString:Y,resourceTitleString:Y,setextHeading:V(v9),strong:V(s3),thematicBreak:V(e3)},exit:{atxHeading:H(),atxHeadingSequence:J1,autolink:H(),autolinkEmail:n2,autolinkProtocol:K1,blockQuote:H(),characterEscapeValue:X1,characterReferenceMarkerHexadecimal:h0,characterReferenceMarkerNumeric:h0,characterReferenceValue:f5,characterReference:b4,codeFenced:H(P),codeFencedFence:N,codeFencedFenceInfo:K,codeFencedFenceMeta:j,codeFlowValue:X1,codeIndented:H(_),codeText:H(i),codeTextData:X1,data:X1,definition:H(),definitionDestinationString:t,definitionLabelString:k,definitionTitleString:h,emphasis:H(),hardBreakEscape:H(G1),hardBreakTrailing:H(G1),htmlFlow:H(x),htmlFlowData:X1,htmlText:H(r),htmlTextData:X1,image:H(D1),label:J0,labelText:d1,lineEnding:r1,link:H(V1),listItem:H(),listOrdered:H(),listUnordered:H(),paragraph:H(),referenceString:h1,resourceDestinationString:B,resourceTitleString:c1,resource:U0,setextHeading:H(q1),setextHeadingLineSequence:$1,setextHeadingText:Z,strong:H(),thematicBreak:H()}};lG(G,($||{}).mdastExtensions||[]);let J={};return X;function X(A){let w={type:"root",children:[]},v={stack:[w],tokenStack:[],config:G,enter:W,exit:U,buffer:Y,resume:M,data:J},n=[],e=-1;while(++e<A.length)if(A[e][1].type===z.listOrdered||A[e][1].type===z.listUnordered)if(A[e][0]==="enter")n.push(e);else{let x1=n.pop();R(typeof x1==="number","expected list to be open"),e=q(A,x1,e)}e=-1;while(++e<A.length){let x1=G[A[e][0]];if(pG.call(x1,A[e][1].type))x1[A[e][1].type].call(Object.assign({sliceSerialize:A[e][2].sliceSerialize},v),A[e][1])}if(v.tokenStack.length>0){let x1=v.tokenStack[v.tokenStack.length-1];(x1[1]||uG).call(v,void 0,x1[0])}w.position={start:I0(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:I0(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},e=-1;while(++e<G.transforms.length)w=G.transforms[e](w)||w;return w}function q(A,w,v){let n=w-1,e=-1,x1=!1,m0,z0,a2,s2;while(++n<=v){let y1=A[n];switch(y1[1].type){case z.listUnordered:case z.listOrdered:case z.blockQuote:{if(y1[0]==="enter")e++;else e--;s2=void 0;break}case z.lineEndingBlank:{if(y1[0]==="enter"){if(m0&&!s2&&!e&&!a2)a2=n;s2=void 0}break}case z.linePrefix:case z.listItemValue:case z.listItemMarker:case z.listItemPrefix:case z.listItemPrefixWhitespace:break;default:s2=void 0}if(!e&&y1[0]==="enter"&&y1[1].type===z.listItemPrefix||e===-1&&y1[0]==="exit"&&(y1[1].type===z.listUnordered||y1[1].type===z.listOrdered)){if(m0){let U2=n;z0=void 0;while(U2--){let Q0=A[U2];if(Q0[1].type===z.lineEnding||Q0[1].type===z.lineEndingBlank){if(Q0[0]==="exit")continue;if(z0)A[z0][1].type=z.lineEndingBlank,x1=!0;Q0[1].type=z.lineEnding,z0=U2}else if(Q0[1].type===z.linePrefix||Q0[1].type===z.blockQuotePrefix||Q0[1].type===z.blockQuotePrefixWhitespace||Q0[1].type===z.blockQuoteMarker||Q0[1].type===z.listItemIndent);else break}if(a2&&(!z0||a2<z0))m0._spread=!0;m0.end=Object.assign({},z0?A[z0][1].start:y1[1].end),A.splice(z0||n,0,["exit",m0,y1[2]]),n++,v++}if(y1[1].type===z.listItemPrefix){let U2={type:"listItem",_spread:!1,start:Object.assign({},y1[1].start),end:void 0};m0=U2,A.splice(n,0,["enter",U2,y1[2]]),n++,v++,a2=void 0,s2=!0}}}return A[w][1]._spread=x1,v}function V(A,w){return v;function v(n){if(W.call(this,A(n),n),w)w.call(this,n)}}function Y(){this.stack.push({type:"fragment",children:[]})}function W(A,w,v){let n=this.stack[this.stack.length-1];R(n,"expected `parent`"),R("children"in n,"expected `parent`"),n.children.push(A),this.stack.push(A),this.tokenStack.push([w,v||void 0]),A.position={start:I0(w.start),end:void 0}}function H(A){return w;function w(v){if(A)A.call(this,v);U.call(this,v)}}function U(A,w){let v=this.stack.pop();R(v,"expected `node`");let n=this.tokenStack.pop();if(!n)throw Error("Cannot close `"+A.type+"` ("+T0({start:A.start,end:A.end})+"): it\u2019s not open");else if(n[0].type!==A.type)if(w)w.call(this,A,n[0]);else(n[1]||uG).call(this,A,n[0]);R(v.type!=="fragment","unexpected fragment `exit`ed"),R(v.position,"expected `position` to be defined"),v.position.end=I0(A.end)}function M(){return i0(this.stack.pop())}function Q(){this.data.expectingFirstListItemValue=!0}function F(A){if(this.data.expectingFirstListItemValue){let w=this.stack[this.stack.length-2];R(w,"expected nodes on stack"),R(w.type==="list","expected list on stack"),w.start=Number.parseInt(this.sliceSerialize(A),L.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function K(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.lang=A}function j(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.meta=A}function N(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function P(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.value=A.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="code","expected code on stack"),w.value=A.replace(/(\r?\n|\r)$/g,"")}function k(A){let w=this.resume(),v=this.stack[this.stack.length-1];R(v,"expected node on stack"),R(v.type==="definition","expected definition on stack"),v.label=w,v.identifier=F0(this.sliceSerialize(A)).toLowerCase()}function h(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="definition","expected definition on stack"),w.title=A}function t(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="definition","expected definition on stack"),w.url=A}function J1(A){let w=this.stack[this.stack.length-1];if(R(w,"expected node on stack"),R(w.type==="heading","expected heading on stack"),!w.depth){let v=this.sliceSerialize(A).length;R(v===1||v===2||v===3||v===4||v===5||v===6,"expected `depth` between `1` and `6`"),w.depth=v}}function Z(){this.data.setextHeadingSlurpLineEnding=!0}function $1(A){let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="heading","expected heading on stack"),w.depth=this.sliceSerialize(A).codePointAt(0)===D.equalsTo?1:2}function q1(){this.data.setextHeadingSlurpLineEnding=void 0}function s(A){let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R("children"in w,"expected parent on stack");let v=w.children,n=v[v.length-1];if(!n||n.type!=="text")n=t3(),n.position={start:I0(A.start),end:void 0},v.push(n);this.stack.push(n)}function X1(A){let w=this.stack.pop();R(w,"expected a `node` to be on the stack"),R("value"in w,"expected a `literal` to be on the stack"),R(w.position,"expected `node` to have an open position"),w.value+=this.sliceSerialize(A),w.position.end=I0(A.end)}function r1(A){let w=this.stack[this.stack.length-1];if(R(w,"expected `node`"),this.data.atHardBreak){R("children"in w,"expected `parent`");let v=w.children[w.children.length-1];R(v.position,"expected tail to have a starting position"),v.position.end=I0(A.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&G.canContainEols.includes(w.type))s.call(this,A),X1.call(this,A)}function G1(){this.data.atHardBreak=!0}function x(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="html","expected html on stack"),w.value=A}function r(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="html","expected html on stack"),w.value=A}function i(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="inlineCode","expected inline code on stack"),w.value=A}function V1(){let A=this.stack[this.stack.length-1];if(R(A,"expected node on stack"),R(A.type==="link","expected link on stack"),this.data.inReference){let w=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=w,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function D1(){let A=this.stack[this.stack.length-1];if(R(A,"expected node on stack"),R(A.type==="image","expected image on stack"),this.data.inReference){let w=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=w,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function d1(A){let w=this.sliceSerialize(A),v=this.stack[this.stack.length-2];R(v,"expected ancestor on stack"),R(v.type==="image"||v.type==="link","expected image or link on stack"),v.label=R5(w),v.identifier=F0(w).toLowerCase()}function J0(){let A=this.stack[this.stack.length-1];R(A,"expected node on stack"),R(A.type==="fragment","expected fragment on stack");let w=this.resume(),v=this.stack[this.stack.length-1];if(R(v,"expected node on stack"),R(v.type==="image"||v.type==="link","expected image or link on stack"),this.data.inReference=!0,v.type==="link"){let n=A.children;v.children=n}else v.alt=w}function B(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="image"||w.type==="link","expected image or link on stack"),w.url=A}function c1(){let A=this.resume(),w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="image"||w.type==="link","expected image or link on stack"),w.title=A}function U0(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function h1(A){let w=this.resume(),v=this.stack[this.stack.length-1];R(v,"expected node on stack"),R(v.type==="image"||v.type==="link","expected image reference or link reference on stack"),v.label=w,v.identifier=F0(this.sliceSerialize(A)).toLowerCase(),this.data.referenceType="full"}function h0(A){R(A.type==="characterReferenceMarkerNumeric"||A.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=A.type}function f5(A){let w=this.sliceSerialize(A),v=this.data.characterReferenceType,n;if(v)n=J5(w,v===z.characterReferenceMarkerNumeric?L.numericBaseDecimal:L.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{let x1=w2(w);R(x1!==!1,"expected reference to decode"),n=x1}let e=this.stack[this.stack.length-1];R(e,"expected `node`"),R("value"in e,"expected `node.value`"),e.value+=n}function b4(A){let w=this.stack.pop();R(w,"expected `node`"),R(w.position,"expected `node.position`"),w.position.end=I0(A.end)}function K1(A){X1.call(this,A);let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="link","expected link on stack"),w.url=this.sliceSerialize(A)}function n2(A){X1.call(this,A);let w=this.stack[this.stack.length-1];R(w,"expected node on stack"),R(w.type==="link","expected link on stack"),w.url="mailto:"+this.sliceSerialize(A)}function M0(){return{type:"blockquote",children:[]}}function y0(){return{type:"code",lang:null,meta:null,value:""}}function H2(){return{type:"inlineCode",value:""}}function u5(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function i3(){return{type:"emphasis",children:[]}}function v9(){return{type:"heading",depth:0,children:[]}}function k9(){return{type:"break"}}function g9(){return{type:"html",value:""}}function o3(){return{type:"image",title:null,url:"",alt:null}}function h9(){return{type:"link",title:null,url:"",children:[]}}function y9(A){return{type:"list",ordered:A.type==="listOrdered",start:null,spread:A._spread,children:[]}}function n3(A){return{type:"listItem",spread:A._spread,checked:null,children:[]}}function a3(){return{type:"paragraph",children:[]}}function s3(){return{type:"strong",children:[]}}function t3(){return{type:"text",value:""}}function e3(){return{type:"thematicBreak"}}}function I0($){return{line:$.line,column:$.column,offset:$.offset}}function lG($,G){let J=-1;while(++J<G.length){let X=G[J];if(Array.isArray(X))lG($,X);else CU($,X)}}function CU($,G){let J;for(J in G)if(pG.call(G,J))switch(J){case"canContainEols":{let X=G[J];if(X)$[J].push(...X);break}case"transforms":{let X=G[J];if(X)$[J].push(...X);break}case"enter":case"exit":{let X=G[J];if(X)Object.assign($[J],X);break}}}function uG($,G){if($)throw Error("Cannot close `"+$.type+"` ("+T0({start:$.start,end:$.end})+"): a different token (`"+G.type+"`, "+T0({start:G.start,end:G.end})+") is open");else throw Error("Cannot close document, a token (`"+G.type+"`, "+T0({start:G.start,end:G.end})+") is still open")}function B5($){let G=this;G.parser=J;function J(X){return r6(X,{...G.data("settings"),...$,extensions:G.data("micromarkExtensions")||[],mdastExtensions:G.data("fromMarkdownExtensions")||[]})}}var rG={}.hasOwnProperty;function dG($,G){let J=G||{};function X(q,...V){let{invalid:Y,handlers:W}=X;if(q&&rG.call(q,$)){let H=String(q[$]);Y=rG.call(W,H)?W[H]:X.unknown}if(Y)return Y.call(this,q,...V)}return X.handlers=J.handlers||{},X.invalid=J.invalid,X.unknown=J.unknown,X}var SU={}.hasOwnProperty;function d6($,G){let J=-1,X;if(G.extensions)while(++J<G.extensions.length)d6($,G.extensions[J]);for(X in G)if(SU.call(G,X))switch(X){case"extensions":break;case"unsafe":{cG($[X],G[X]);break}case"join":{cG($[X],G[X]);break}case"handlers":{bU($[X],G[X]);break}default:$.options[X]=G[X]}return $}function cG($,G){if(G)$.push(...G)}function bU($,G){if(G)Object.assign($,G)}function iG($,G,J,X){let q=J.enter("blockquote"),V=J.createTracker(X);V.move("> "),V.shift(2);let Y=J.indentLines(J.containerFlow($,V.current()),xU);return q(),Y}function xU($,G,J){return">"+(J?"":" ")+$}function O5($,G){return oG($,G.inConstruct,!0)&&!oG($,G.notInConstruct,!1)}function oG($,G,J){if(typeof G==="string")G=[G];if(!G||G.length===0)return J;let X=-1;while(++X<G.length)if($.includes(G[X]))return!0;return!1}function c6($,G,J,X){let q=-1;while(++q<J.unsafe.length)if(J.unsafe[q].character===`
|
|
60
60
|
`&&O5(J.stack,J.unsafe[q]))return/[ \t]/.test(X.before)?"":" ";return"\\\n"}function nG($,G){let J=String($),X=J.indexOf(G),q=X,V=0,Y=0;if(typeof G!=="string")throw TypeError("Expected substring");while(X!==-1){if(X===q){if(++V>Y)Y=V}else V=1;q=X+G.length,X=J.indexOf(G,q)}return Y}function B4($,G){return Boolean(G.options.fences===!1&&$.value&&!$.lang&&/[^ \r\n]/.test($.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test($.value))}function aG($){let G=$.options.fence||"`";if(G!=="`"&&G!=="~")throw Error("Cannot serialize code with `"+G+"` for `options.fence`, expected `` ` `` or `~`");return G}function sG($,G,J,X){let q=aG(J),V=$.value||"",Y=q==="`"?"GraveAccent":"Tilde";if(B4($,J)){let Q=J.enter("codeIndented"),F=J.indentLines(V,vU);return Q(),F}let W=J.createTracker(X),H=q.repeat(Math.max(nG(V,q)+1,3)),U=J.enter("codeFenced"),M=W.move(H);if($.lang){let Q=J.enter(`codeFencedLang${Y}`);M+=W.move(J.safe($.lang,{before:M,after:" ",encode:["`"],...W.current()})),Q()}if($.lang&&$.meta){let Q=J.enter(`codeFencedMeta${Y}`);M+=W.move(" "),M+=W.move(J.safe($.meta,{before:M,after:`
|
|
61
61
|
`,encode:["`"],...W.current()})),Q()}if(M+=W.move(`
|
|
62
62
|
`),V)M+=W.move(V+`
|
|
@@ -85,7 +85,7 @@ return `+str.trim()+`;
|
|
|
85
85
|
`}var sU=/\r?\n|\r/g;function jJ($,G){let J=[],X=0,q=0,V;while(V=sU.exec($))Y($.slice(X,V.index)),J.push(V[0]),X=V.index+V[0].length,q++;return Y($.slice(X)),J.join("");function Y(W){J.push(G(W,q,!W))}}function ZJ($,G,J){let X=(J.before||"")+(G||"")+(J.after||""),q=[],V=[],Y={},W=-1;while(++W<$.unsafe.length){let M=$.unsafe[W];if(!O5($.stack,M))continue;let Q=$.compilePattern(M),F;while(F=Q.exec(X)){let K="before"in M||Boolean(M.atBreak),j="after"in M,N=F.index+(K?F[1].length:0);if(q.includes(N)){if(Y[N].before&&!K)Y[N].before=!1;if(Y[N].after&&!j)Y[N].after=!1}else q.push(N),Y[N]={before:K,after:j}}}q.sort(tU);let H=J.before?J.before.length:0,U=X.length-(J.after?J.after.length:0);W=-1;while(++W<q.length){let M=q[W];if(M<H||M>=U)continue;if(M+1<U&&q[W+1]===M+1&&Y[M].after&&!Y[M+1].before&&!Y[M+1].after||q[W-1]===M-1&&Y[M].before&&!Y[M-1].before&&!Y[M-1].after)continue;if(H!==M)V.push(NJ(X.slice(H,M),"\\"));if(H=M,/[!-/:-@[-`{-~]/.test(X.charAt(M))&&(!J.encode||!J.encode.includes(X.charAt(M))))V.push("\\");else V.push(l1(X.charCodeAt(M))),H++}return V.push(NJ(X.slice(H,U),J.after)),V.join("")}function tU($,G){return $-G}function NJ($,G){let J=/\\(?=[!-/:-@[-`{-~])/g,X=[],q=[],V=$+G,Y=-1,W=0,H;while(H=J.exec(V))X.push(H.index);while(++Y<X.length){if(W!==X[Y])q.push($.slice(W,X[Y]));q.push("\\"),W=X[Y]}return q.push($.slice(W)),q.join("")}function _J($){let G=$||{},J=G.now||{},X=G.lineShift||0,q=J.line||1,V=J.column||1;return{move:H,current:Y,shift:W};function Y(){return{now:{line:q,column:V},lineShift:X}}function W(U){X+=U}function H(U){let M=U||"",Q=M.split(/\r?\n|\r/g),F=Q[Q.length-1];return q+=Q.length-1,V=Q.length===1?V+F.length:1+F.length+X,M}}function Y9($,G){let J=G||{},X={associationId:BJ,containerPhrasing:JM,containerFlow:XM,createTracker:_J,compilePattern:OJ,enter:V,handlers:{...KJ},handle:void 0,indentLines:jJ,indexStack:[],join:[...FJ],options:{},safe:qM,stack:[],unsafe:[...RJ]};if(d6(X,J),X.options.tightDefinitions)X.join.push(GM);X.handle=dG("type",{invalid:eU,unknown:$M,handlers:X.handlers});let q=X.handle($,void 0,X,{before:`
|
|
86
86
|
`,after:`
|
|
87
87
|
`,now:{line:1,column:1},lineShift:0});if(q&&q.charCodeAt(q.length-1)!==10&&q.charCodeAt(q.length-1)!==13)q+=`
|
|
88
|
-
`;return q;function V(Y){return X.stack.push(Y),W;function W(){X.stack.pop()}}}function eU($){throw Error("Cannot handle value `"+$+"`, expected node")}function $M($){throw Error("Cannot handle unknown node `"+$.type+"`")}function GM($,G){if($.type==="definition"&&$.type===G.type)return 0}function JM($,G){return AJ($,this,G)}function XM($,G){return wJ($,this,G)}function qM($,G){return ZJ(this,$,G)}function _5($){let G=this;G.compiler=J;function J(X){return Y9(X,{...G.data("settings"),...$,extensions:G.data("toMarkdownExtensions")||[]})}}function V9($){if($)throw $}var E5=x4(xJ(),1);function O4($){if(typeof $!=="object"||$===null)return!1;let G=Object.getPrototypeOf($);return(G===null||G===Object.prototype||Object.getPrototypeOf(G)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}function W9(){let $=[],G={run:J,use:X};return G;function J(...q){let V=-1,Y=q.pop();if(typeof Y!=="function")throw TypeError("Expected function as last argument, not "+Y);W(null,...q);function W(H,...U){let M=$[++V],Q=-1;if(H){Y(H);return}while(++Q<q.length)if(U[Q]===null||U[Q]===void 0)U[Q]=q[Q];if(q=U,M)vJ(M,W)(...U);else Y(null,...U)}}function X(q){if(typeof q!=="function")throw TypeError("Expected `middelware` to be a function, not "+q);return $.push(q),G}}function vJ($,G){let J;return X;function X(...Y){let W=$.length>Y.length,H;if(W)Y.push(q);try{H=$.apply(this,Y)}catch(U){let M=U;if(W&&J)throw M;return q(M)}if(!W)if(H&&H.then&&typeof H.then==="function")H.then(V,q);else if(H instanceof Error)q(H);else V(H)}function q(Y,...W){if(!J)J=!0,G(Y,...W)}function V(Y){q(null,Y)}}class j1 extends Error{constructor($,G,J){super();if(typeof G==="string")J=G,G=void 0;let X="",q={},V=!1;if(G)if("line"in G&&"column"in G)q={place:G};else if("start"in G&&"end"in G)q={place:G};else if("type"in G)q={ancestors:[G],place:G.position};else q={...G};if(typeof $==="string")X=$;else if(!q.cause&&$)V=!0,X=$.message,q.cause=$;if(!q.ruleId&&!q.source&&typeof J==="string"){let W=J.indexOf(":");if(W===-1)q.ruleId=J;else q.source=J.slice(0,W),q.ruleId=J.slice(W+1)}if(!q.place&&q.ancestors&&q.ancestors){let W=q.ancestors[q.ancestors.length-1];if(W)q.place=W.position}let Y=q.place&&"start"in q.place?q.place.start:q.place;this.ancestors=q.ancestors||void 0,this.cause=q.cause||void 0,this.column=Y?Y.column:void 0,this.fatal=void 0,this.file="",this.message=X,this.line=Y?Y.line:void 0,this.name=T0(q.place)||"1:1",this.place=q.place||void 0,this.reason=this.message,this.ruleId=q.ruleId||void 0,this.source=q.source||void 0,this.stack=V&&q.cause&&typeof q.cause.stack==="string"?q.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}j1.prototype.file="";j1.prototype.name="";j1.prototype.reason="";j1.prototype.message="";j1.prototype.stack="";j1.prototype.column=void 0;j1.prototype.line=void 0;j1.prototype.ancestors=void 0;j1.prototype.cause=void 0;j1.prototype.fatal=void 0;j1.prototype.place=void 0;j1.prototype.ruleId=void 0;j1.prototype.source=void 0;import{default as a1}from"path";import{default as kJ}from"process";import{fileURLToPath as gJ}from"url";function L5($){return Boolean($!==null&&typeof $==="object"&&"href"in $&&$.href&&"protocol"in $&&$.protocol&&$.auth===void 0)}var H9=["history","path","basename","stem","extname","dirname"];class T5{constructor($){let G;if(!$)G={};else if(L5($))G={path:$};else if(typeof $==="string"||YM($))G={value:$};else G=$;this.cwd="cwd"in G?"":kJ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let J=-1;while(++J<H9.length){let q=H9[J];if(q in G&&G[q]!==void 0&&G[q]!==null)this[q]=q==="history"?[...G[q]]:G[q]}let X;for(X in G)if(!H9.includes(X))this[X]=G[X]}get basename(){return typeof this.path==="string"?a1.basename(this.path):void 0}set basename($){M9($,"basename"),U9($,"basename"),this.path=a1.join(this.dirname||"",$)}get dirname(){return typeof this.path==="string"?a1.dirname(this.path):void 0}set dirname($){hJ(this.basename,"dirname"),this.path=a1.join($||"",this.basename)}get extname(){return typeof this.path==="string"?a1.extname(this.path):void 0}set extname($){if(U9($,"extname"),hJ(this.dirname,"extname"),$){if($.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if($.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=a1.join(this.dirname,this.stem+($||""))}get path(){return this.history[this.history.length-1]}set path($){if(L5($))$=gJ($);if(M9($,"path"),this.path!==$)this.history.push($)}get stem(){return typeof this.path==="string"?a1.basename(this.path,this.extname):void 0}set stem($){M9($,"stem"),U9($,"stem"),this.path=a1.join(this.dirname||"",$+(this.extname||""))}fail($,G,J){let X=this.message($,G,J);throw X.fatal=!0,X}info($,G,J){let X=this.message($,G,J);return X.fatal=void 0,X}message($,G,J){let X=new j1($,G,J);if(this.path)X.name=this.path+":"+X.name,X.file=this.path;return X.fatal=!1,this.messages.push(X),X}toString($){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder($||void 0).decode(this.value)}}function U9($,G){if($&&$.includes(a1.sep))throw Error("`"+G+"` cannot be a path: did not expect `"+a1.sep+"`")}function M9($,G){if(!$)throw Error("`"+G+"` cannot be empty")}function hJ($,G){if(!$)throw Error("Setting `"+G+"` requires `path` to be set too")}function YM($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var yJ=function($){let X=this.constructor.prototype,q=X[$],V=function(){return q.apply(V,arguments)};return Object.setPrototypeOf(V,X),V};var VM={}.hasOwnProperty;class K9 extends yJ{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=W9()}copy(){let $=new K9,G=-1;while(++G<this.attachers.length){let J=this.attachers[G];$.use(...J)}return $.data(E5.default(!0,{},this.namespace)),$}data($,G){if(typeof $==="string"){if(arguments.length===2)return D9("data",this.frozen),this.namespace[$]=G,this;return VM.call(this.namespace,$)&&this.namespace[$]||void 0}if($)return D9("data",this.frozen),this.namespace=$,this;return this.namespace}freeze(){if(this.frozen)return this;let $=this;while(++this.freezeIndex<this.attachers.length){let[G,...J]=this.attachers[this.freezeIndex];if(J[0]===!1)continue;if(J[0]===!0)J[0]=void 0;let X=G.call($,...J);if(typeof X==="function")this.transformers.use(X)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse($){this.freeze();let G=I5($),J=this.parser||this.Parser;return z9("parse",J),J(String(G),G)}process($,G){let J=this;return this.freeze(),z9("process",this.parser||this.Parser),Q9("process",this.compiler||this.Compiler),G?X(void 0,G):new Promise(X);function X(q,V){let Y=I5($),W=J.parse(Y);J.run(W,Y,function(U,M,Q){if(U||!M||!Q)return H(U);let F=M,K=J.stringify(F,Q);if(HM(K))Q.value=K;else Q.result=K;H(U,Q)});function H(U,M){if(U||!M)V(U);else if(q)q(M);else R(G,"`done` is defined if `resolve` is not"),G(void 0,M)}}}processSync($){let G=!1,J;return this.freeze(),z9("processSync",this.parser||this.Parser),Q9("processSync",this.compiler||this.Compiler),this.process($,X),fJ("processSync","process",G),R(J,"we either bailed on an error or have a tree"),J;function X(q,V){G=!0,V9(q),J=V}}run($,G,J){mJ($),this.freeze();let X=this.transformers;if(!J&&typeof G==="function")J=G,G=void 0;return J?q(void 0,J):new Promise(q);function q(V,Y){R(typeof G!=="function","`file` can\u2019t be a `done` anymore, we checked");let W=I5(G);X.run($,W,H);function H(U,M,Q){let F=M||$;if(U)Y(U);else if(V)V(F);else R(J,"`done` is defined if `resolve` is not"),J(void 0,F,Q)}}}runSync($,G){let J=!1,X;return this.run($,G,q),fJ("runSync","run",J),R(X,"we either bailed on an error or have a tree"),X;function q(V,Y){V9(V),X=Y,J=!0}}stringify($,G){this.freeze();let J=I5(G),X=this.compiler||this.Compiler;return Q9("stringify",X),mJ($),X($,J)}use($,...G){let J=this.attachers,X=this.namespace;if(D9("use",this.frozen),$===null||$===void 0);else if(typeof $==="function")W($,G);else if(typeof $==="object")if(Array.isArray($))Y($);else V($);else throw TypeError("Expected usable value, not `"+$+"`");return this;function q(H){if(typeof H==="function")W(H,[]);else if(typeof H==="object")if(Array.isArray(H)){let[U,...M]=H;W(U,M)}else V(H);else throw TypeError("Expected usable value, not `"+H+"`")}function V(H){if(!("plugins"in H)&&!("settings"in H))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(Y(H.plugins),H.settings)X.settings=E5.default(!0,X.settings,H.settings)}function Y(H){let U=-1;if(H===null||H===void 0);else if(Array.isArray(H))while(++U<H.length){let M=H[U];q(M)}else throw TypeError("Expected a list of plugins, not `"+H+"`")}function W(H,U){let M=-1,Q=-1;while(++M<J.length)if(J[M][0]===H){Q=M;break}if(Q===-1)J.push([H,...U]);else if(U.length>0){let[F,...K]=U,j=J[Q][1];if(O4(j)&&O4(F))F=E5.default(!0,j,F);J[Q]=[H,F,...K]}}}}var F9=new K9().freeze();function z9($,G){if(typeof G!=="function")throw TypeError("Cannot `"+$+"` without `parser`")}function Q9($,G){if(typeof G!=="function")throw TypeError("Cannot `"+$+"` without `compiler`")}function D9($,G){if(G)throw Error("Cannot call `"+$+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mJ($){if(!O4($)||typeof $.type!=="string")throw TypeError("Expected node, got `"+$+"`")}function fJ($,G,J){if(!J)throw Error("`"+$+"` finished async. Use `"+G+"` instead")}function I5($){return WM($)?$:new T5($)}function WM($){return Boolean($&&typeof $==="object"&&"message"in $&&"messages"in $)}function HM($){return typeof $==="string"||UM($)}function UM($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var uJ=F9().use(B5).use(_5).freeze();var PP=uJ();/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function X3($){return typeof $>"u"||$===null}function zM($){return typeof $==="object"&&$!==null}function QM($){if(Array.isArray($))return $;else if(X3($))return[];return[$]}function DM($,G){var J,X,q,V;if(G){V=Object.keys(G);for(J=0,X=V.length;J<X;J+=1)q=V[J],$[q]=G[q]}return $}function KM($,G){var J="",X;for(X=0;X<G;X+=1)J+=$;return J}function FM($){return $===0&&Number.NEGATIVE_INFINITY===1/$}var RM=X3,BM=zM,OM=QM,AM=KM,wM=FM,jM=DM,R1={isNothing:RM,isObject:BM,toArray:OM,repeat:AM,isNegativeZero:wM,extend:jM};function q3($,G){var J="",X=$.reason||"(unknown reason)";if(!$.mark)return X;if($.mark.name)J+='in "'+$.mark.name+'" ';if(J+="("+($.mark.line+1)+":"+($.mark.column+1)+")",!G&&$.mark.snippet)J+=`
|
|
88
|
+
`;return q;function V(Y){return X.stack.push(Y),W;function W(){X.stack.pop()}}}function eU($){throw Error("Cannot handle value `"+$+"`, expected node")}function $M($){throw Error("Cannot handle unknown node `"+$.type+"`")}function GM($,G){if($.type==="definition"&&$.type===G.type)return 0}function JM($,G){return AJ($,this,G)}function XM($,G){return wJ($,this,G)}function qM($,G){return ZJ(this,$,G)}function _5($){let G=this;G.compiler=J;function J(X){return Y9(X,{...G.data("settings"),...$,extensions:G.data("toMarkdownExtensions")||[]})}}function V9($){if($)throw $}var E5=x4(xJ(),1);function O4($){if(typeof $!=="object"||$===null)return!1;let G=Object.getPrototypeOf($);return(G===null||G===Object.prototype||Object.getPrototypeOf(G)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}function W9(){let $=[],G={run:J,use:X};return G;function J(...q){let V=-1,Y=q.pop();if(typeof Y!=="function")throw TypeError("Expected function as last argument, not "+Y);W(null,...q);function W(H,...U){let M=$[++V],Q=-1;if(H){Y(H);return}while(++Q<q.length)if(U[Q]===null||U[Q]===void 0)U[Q]=q[Q];if(q=U,M)vJ(M,W)(...U);else Y(null,...U)}}function X(q){if(typeof q!=="function")throw TypeError("Expected `middelware` to be a function, not "+q);return $.push(q),G}}function vJ($,G){let J;return X;function X(...Y){let W=$.length>Y.length,H;if(W)Y.push(q);try{H=$.apply(this,Y)}catch(U){let M=U;if(W&&J)throw M;return q(M)}if(!W)if(H&&H.then&&typeof H.then==="function")H.then(V,q);else if(H instanceof Error)q(H);else V(H)}function q(Y,...W){if(!J)J=!0,G(Y,...W)}function V(Y){q(null,Y)}}class j1 extends Error{constructor($,G,J){super();if(typeof G==="string")J=G,G=void 0;let X="",q={},V=!1;if(G)if("line"in G&&"column"in G)q={place:G};else if("start"in G&&"end"in G)q={place:G};else if("type"in G)q={ancestors:[G],place:G.position};else q={...G};if(typeof $==="string")X=$;else if(!q.cause&&$)V=!0,X=$.message,q.cause=$;if(!q.ruleId&&!q.source&&typeof J==="string"){let W=J.indexOf(":");if(W===-1)q.ruleId=J;else q.source=J.slice(0,W),q.ruleId=J.slice(W+1)}if(!q.place&&q.ancestors&&q.ancestors){let W=q.ancestors[q.ancestors.length-1];if(W)q.place=W.position}let Y=q.place&&"start"in q.place?q.place.start:q.place;this.ancestors=q.ancestors||void 0,this.cause=q.cause||void 0,this.column=Y?Y.column:void 0,this.fatal=void 0,this.file="",this.message=X,this.line=Y?Y.line:void 0,this.name=T0(q.place)||"1:1",this.place=q.place||void 0,this.reason=this.message,this.ruleId=q.ruleId||void 0,this.source=q.source||void 0,this.stack=V&&q.cause&&typeof q.cause.stack==="string"?q.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}j1.prototype.file="";j1.prototype.name="";j1.prototype.reason="";j1.prototype.message="";j1.prototype.stack="";j1.prototype.column=void 0;j1.prototype.line=void 0;j1.prototype.ancestors=void 0;j1.prototype.cause=void 0;j1.prototype.fatal=void 0;j1.prototype.place=void 0;j1.prototype.ruleId=void 0;j1.prototype.source=void 0;import{default as a1}from"path";import{default as kJ}from"process";import{fileURLToPath as gJ}from"url";function L5($){return Boolean($!==null&&typeof $==="object"&&"href"in $&&$.href&&"protocol"in $&&$.protocol&&$.auth===void 0)}var H9=["history","path","basename","stem","extname","dirname"];class T5{constructor($){let G;if(!$)G={};else if(L5($))G={path:$};else if(typeof $==="string"||YM($))G={value:$};else G=$;this.cwd="cwd"in G?"":kJ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let J=-1;while(++J<H9.length){let q=H9[J];if(q in G&&G[q]!==void 0&&G[q]!==null)this[q]=q==="history"?[...G[q]]:G[q]}let X;for(X in G)if(!H9.includes(X))this[X]=G[X]}get basename(){return typeof this.path==="string"?a1.basename(this.path):void 0}set basename($){M9($,"basename"),U9($,"basename"),this.path=a1.join(this.dirname||"",$)}get dirname(){return typeof this.path==="string"?a1.dirname(this.path):void 0}set dirname($){hJ(this.basename,"dirname"),this.path=a1.join($||"",this.basename)}get extname(){return typeof this.path==="string"?a1.extname(this.path):void 0}set extname($){if(U9($,"extname"),hJ(this.dirname,"extname"),$){if($.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if($.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=a1.join(this.dirname,this.stem+($||""))}get path(){return this.history[this.history.length-1]}set path($){if(L5($))$=gJ($);if(M9($,"path"),this.path!==$)this.history.push($)}get stem(){return typeof this.path==="string"?a1.basename(this.path,this.extname):void 0}set stem($){M9($,"stem"),U9($,"stem"),this.path=a1.join(this.dirname||"",$+(this.extname||""))}fail($,G,J){let X=this.message($,G,J);throw X.fatal=!0,X}info($,G,J){let X=this.message($,G,J);return X.fatal=void 0,X}message($,G,J){let X=new j1($,G,J);if(this.path)X.name=this.path+":"+X.name,X.file=this.path;return X.fatal=!1,this.messages.push(X),X}toString($){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder($||void 0).decode(this.value)}}function U9($,G){if($&&$.includes(a1.sep))throw Error("`"+G+"` cannot be a path: did not expect `"+a1.sep+"`")}function M9($,G){if(!$)throw Error("`"+G+"` cannot be empty")}function hJ($,G){if(!$)throw Error("Setting `"+G+"` requires `path` to be set too")}function YM($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var yJ=function($){let X=this.constructor.prototype,q=X[$],V=function(){return q.apply(V,arguments)};return Object.setPrototypeOf(V,X),V};var VM={}.hasOwnProperty;class K9 extends yJ{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=W9()}copy(){let $=new K9,G=-1;while(++G<this.attachers.length){let J=this.attachers[G];$.use(...J)}return $.data(E5.default(!0,{},this.namespace)),$}data($,G){if(typeof $==="string"){if(arguments.length===2)return D9("data",this.frozen),this.namespace[$]=G,this;return VM.call(this.namespace,$)&&this.namespace[$]||void 0}if($)return D9("data",this.frozen),this.namespace=$,this;return this.namespace}freeze(){if(this.frozen)return this;let $=this;while(++this.freezeIndex<this.attachers.length){let[G,...J]=this.attachers[this.freezeIndex];if(J[0]===!1)continue;if(J[0]===!0)J[0]=void 0;let X=G.call($,...J);if(typeof X==="function")this.transformers.use(X)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse($){this.freeze();let G=I5($),J=this.parser||this.Parser;return z9("parse",J),J(String(G),G)}process($,G){let J=this;return this.freeze(),z9("process",this.parser||this.Parser),Q9("process",this.compiler||this.Compiler),G?X(void 0,G):new Promise(X);function X(q,V){let Y=I5($),W=J.parse(Y);J.run(W,Y,function(U,M,Q){if(U||!M||!Q)return H(U);let F=M,K=J.stringify(F,Q);if(HM(K))Q.value=K;else Q.result=K;H(U,Q)});function H(U,M){if(U||!M)V(U);else if(q)q(M);else R(G,"`done` is defined if `resolve` is not"),G(void 0,M)}}}processSync($){let G=!1,J;return this.freeze(),z9("processSync",this.parser||this.Parser),Q9("processSync",this.compiler||this.Compiler),this.process($,X),fJ("processSync","process",G),R(J,"we either bailed on an error or have a tree"),J;function X(q,V){G=!0,V9(q),J=V}}run($,G,J){mJ($),this.freeze();let X=this.transformers;if(!J&&typeof G==="function")J=G,G=void 0;return J?q(void 0,J):new Promise(q);function q(V,Y){R(typeof G!=="function","`file` can\u2019t be a `done` anymore, we checked");let W=I5(G);X.run($,W,H);function H(U,M,Q){let F=M||$;if(U)Y(U);else if(V)V(F);else R(J,"`done` is defined if `resolve` is not"),J(void 0,F,Q)}}}runSync($,G){let J=!1,X;return this.run($,G,q),fJ("runSync","run",J),R(X,"we either bailed on an error or have a tree"),X;function q(V,Y){V9(V),X=Y,J=!0}}stringify($,G){this.freeze();let J=I5(G),X=this.compiler||this.Compiler;return Q9("stringify",X),mJ($),X($,J)}use($,...G){let J=this.attachers,X=this.namespace;if(D9("use",this.frozen),$===null||$===void 0);else if(typeof $==="function")W($,G);else if(typeof $==="object")if(Array.isArray($))Y($);else V($);else throw TypeError("Expected usable value, not `"+$+"`");return this;function q(H){if(typeof H==="function")W(H,[]);else if(typeof H==="object")if(Array.isArray(H)){let[U,...M]=H;W(U,M)}else V(H);else throw TypeError("Expected usable value, not `"+H+"`")}function V(H){if(!("plugins"in H)&&!("settings"in H))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(Y(H.plugins),H.settings)X.settings=E5.default(!0,X.settings,H.settings)}function Y(H){let U=-1;if(H===null||H===void 0);else if(Array.isArray(H))while(++U<H.length){let M=H[U];q(M)}else throw TypeError("Expected a list of plugins, not `"+H+"`")}function W(H,U){let M=-1,Q=-1;while(++M<J.length)if(J[M][0]===H){Q=M;break}if(Q===-1)J.push([H,...U]);else if(U.length>0){let[F,...K]=U,j=J[Q][1];if(O4(j)&&O4(F))F=E5.default(!0,j,F);J[Q]=[H,F,...K]}}}}var F9=new K9().freeze();function z9($,G){if(typeof G!=="function")throw TypeError("Cannot `"+$+"` without `parser`")}function Q9($,G){if(typeof G!=="function")throw TypeError("Cannot `"+$+"` without `compiler`")}function D9($,G){if(G)throw Error("Cannot call `"+$+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mJ($){if(!O4($)||typeof $.type!=="string")throw TypeError("Expected node, got `"+$+"`")}function fJ($,G,J){if(!J)throw Error("`"+$+"` finished async. Use `"+G+"` instead")}function I5($){return WM($)?$:new T5($)}function WM($){return Boolean($&&typeof $==="object"&&"message"in $&&"messages"in $)}function HM($){return typeof $==="string"||UM($)}function UM($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var uJ=F9().use(B5).use(_5).freeze();var LP=uJ();/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function X3($){return typeof $>"u"||$===null}function zM($){return typeof $==="object"&&$!==null}function QM($){if(Array.isArray($))return $;else if(X3($))return[];return[$]}function DM($,G){var J,X,q,V;if(G){V=Object.keys(G);for(J=0,X=V.length;J<X;J+=1)q=V[J],$[q]=G[q]}return $}function KM($,G){var J="",X;for(X=0;X<G;X+=1)J+=$;return J}function FM($){return $===0&&Number.NEGATIVE_INFINITY===1/$}var RM=X3,BM=zM,OM=QM,AM=KM,wM=FM,jM=DM,R1={isNothing:RM,isObject:BM,toArray:OM,repeat:AM,isNegativeZero:wM,extend:jM};function q3($,G){var J="",X=$.reason||"(unknown reason)";if(!$.mark)return X;if($.mark.name)J+='in "'+$.mark.name+'" ';if(J+="("+($.mark.line+1)+":"+($.mark.column+1)+")",!G&&$.mark.snippet)J+=`
|
|
89
89
|
|
|
90
90
|
`+$.mark.snippet;return X+" "+J}function w4($,G){if(Error.call(this),this.name="YAMLException",this.reason=$,this.mark=G,this.message=q3(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}w4.prototype=Object.create(Error.prototype);w4.prototype.constructor=w4;w4.prototype.toString=function(G){return this.name+": "+q3(this,G)};var k1=w4;function R9($,G,J,X,q){var V="",Y="",W=Math.floor(q/2)-1;if(X-G>W)V=" ... ",G=X-W+V.length;if(J-X>W)Y=" ...",J=X+W-Y.length;return{str:V+$.slice(G,J).replace(/\t/g,"\u2192")+Y,pos:X-G+V.length}}function B9($,G){return R1.repeat(" ",G-$.length)+$}function NM($,G){if(G=Object.create(G||null),!$.buffer)return null;if(!G.maxLength)G.maxLength=79;if(typeof G.indent!=="number")G.indent=1;if(typeof G.linesBefore!=="number")G.linesBefore=3;if(typeof G.linesAfter!=="number")G.linesAfter=2;var J=/\r?\n|\r|\0/g,X=[0],q=[],V,Y=-1;while(V=J.exec($.buffer))if(q.push(V.index),X.push(V.index+V[0].length),$.position<=V.index&&Y<0)Y=X.length-2;if(Y<0)Y=X.length-1;var W="",H,U,M=Math.min($.line+G.linesAfter,q.length).toString().length,Q=G.maxLength-(G.indent+M+3);for(H=1;H<=G.linesBefore;H++){if(Y-H<0)break;U=R9($.buffer,X[Y-H],q[Y-H],$.position-(X[Y]-X[Y-H]),Q),W=R1.repeat(" ",G.indent)+B9(($.line-H+1).toString(),M)+" | "+U.str+`
|
|
91
91
|
`+W}U=R9($.buffer,X[Y],q[Y],$.position,Q),W+=R1.repeat(" ",G.indent)+B9(($.line+1).toString(),M)+" | "+U.str+`
|
|
@@ -116,7 +116,7 @@ return `+str.trim()+`;
|
|
|
116
116
|
`+$.slice(q,V),q=V+1;Y=W}if(H+=`
|
|
117
117
|
`,$.length-q>G&&Y>q)H+=$.slice(q,Y)+`
|
|
118
118
|
`+$.slice(Y+1);else H+=$.slice(q);return H.slice(1)}function PQ($){var G="",J=0,X;for(var q=0;q<$.length;J>=65536?q+=2:q++)if(J=A4($,q),X=L1[J],!X&&Z4(J)){if(G+=$[q],J>=65536)G+=$[q+1]}else G+=X||RQ(J);return G}function LQ($,G,J){var X="",q=$.tag,V,Y,W;for(V=0,Y=J.length;V<Y;V+=1){if(W=J[V],$.replacer)W=$.replacer.call(J,String(V),W);if(R0($,G,W,!1,!1)||typeof W>"u"&&R0($,G,null,!1,!1)){if(X!=="")X+=","+(!$.condenseFlow?" ":"");X+=$.dump}}$.tag=q,$.dump="["+X+"]"}function G3($,G,J,X){var q="",V=$.tag,Y,W,H;for(Y=0,W=J.length;Y<W;Y+=1){if(H=J[Y],$.replacer)H=$.replacer.call(J,String(Y),H);if(R0($,G+1,H,!0,!0,!1,!0)||typeof H>"u"&&R0($,G+1,null,!0,!0,!1,!0)){if(!X||q!=="")q+=j9($,G);if($.dump&&j4===$.dump.charCodeAt(0))q+="-";else q+="- ";q+=$.dump}}$.tag=V,$.dump=q||"[]"}function TQ($,G,J){var X="",q=$.tag,V=Object.keys(J),Y,W,H,U,M;for(Y=0,W=V.length;Y<W;Y+=1){if(M="",X!=="")M+=", ";if($.condenseFlow)M+='"';if(H=V[Y],U=J[H],$.replacer)U=$.replacer.call(J,H,U);if(!R0($,G,H,!1,!1))continue;if($.dump.length>1024)M+="? ";if(M+=$.dump+($.condenseFlow?'"':"")+":"+($.condenseFlow?"":" "),!R0($,G,U,!1,!1))continue;M+=$.dump,X+=M}$.tag=q,$.dump="{"+X+"}"}function IQ($,G,J,X){var q="",V=$.tag,Y=Object.keys(J),W,H,U,M,Q,F;if($.sortKeys===!0)Y.sort();else if(typeof $.sortKeys==="function")Y.sort($.sortKeys);else if($.sortKeys)throw new k1("sortKeys must be a boolean or a function");for(W=0,H=Y.length;W<H;W+=1){if(F="",!X||q!=="")F+=j9($,G);if(U=Y[W],M=J[U],$.replacer)M=$.replacer.call(J,U,M);if(!R0($,G+1,U,!0,!0,!0))continue;if(Q=$.tag!==null&&$.tag!=="?"||$.dump&&$.dump.length>1024,Q)if($.dump&&j4===$.dump.charCodeAt(0))F+="?";else F+="? ";if(F+=$.dump,Q)F+=j9($,G);if(!R0($,G+1,M,!0,Q))continue;if($.dump&&j4===$.dump.charCodeAt(0))F+=":";else F+=": ";F+=$.dump,q+=F}$.tag=V,$.dump=q||"{}"}function J3($,G,J){var X,q,V,Y,W,H;q=J?$.explicitTypes:$.implicitTypes;for(V=0,Y=q.length;V<Y;V+=1)if(W=q[V],(W.instanceOf||W.predicate)&&(!W.instanceOf||typeof G==="object"&&G instanceof W.instanceOf)&&(!W.predicate||W.predicate(G))){if(J)if(W.multi&&W.representName)$.tag=W.representName(G);else $.tag=W.tag;else $.tag="?";if(W.represent){if(H=$.styleMap[W.tag]||W.defaultStyle,O3.call(W.represent)==="[object Function]")X=W.represent(G,H);else if(A3.call(W.represent,H))X=W.represent[H](G,H);else throw new k1("!<"+W.tag+'> tag resolver accepts not "'+H+'" style');$.dump=X}return!0}return!1}function R0($,G,J,X,q,V,Y){if($.tag=null,$.dump=J,!J3($,J,!1))J3($,J,!0);var W=O3.call($.dump),H=X,U;if(X)X=$.flowLevel<0||$.flowLevel>G;var M=W==="[object Object]"||W==="[object Array]",Q,F;if(M)Q=$.duplicates.indexOf(J),F=Q!==-1;if($.tag!==null&&$.tag!=="?"||F||$.indent!==2&&G>0)q=!1;if(F&&$.usedDuplicates[Q])$.dump="*ref_"+Q;else{if(M&&F&&!$.usedDuplicates[Q])$.usedDuplicates[Q]=!0;if(W==="[object Object]"){if(X&&Object.keys($.dump).length!==0){if(IQ($,G,$.dump,q),F)$.dump="&ref_"+Q+$.dump}else if(TQ($,G,$.dump),F)$.dump="&ref_"+Q+" "+$.dump}else if(W==="[object Array]"){if(X&&$.dump.length!==0){if($.noArrayIndent&&!Y&&G>0)G3($,G-1,$.dump,q);else G3($,G,$.dump,q);if(F)$.dump="&ref_"+Q+$.dump}else if(LQ($,G,$.dump),F)$.dump="&ref_"+Q+" "+$.dump}else if(W==="[object String]"){if($.tag!=="?")ZQ($,$.dump,G,V,H)}else if(W==="[object Undefined]")return!1;else{if($.skipInvalid)return!1;throw new k1("unacceptable kind of an object to dump "+W)}if($.tag!==null&&$.tag!=="?"){if(U=encodeURI($.tag[0]==="!"?$.tag.slice(1):$.tag).replace(/!/g,"%21"),$.tag[0]==="!")U="!"+U;else if(U.slice(0,18)==="tag:yaml.org,2002:")U="!!"+U.slice(18);else U="!<"+U+">";$.dump=U+" "+$.dump}}return!0}function EQ($,G){var J=[],X=[],q,V;Z9($,J,X);for(q=0,V=X.length;q<V;q+=1)G.duplicates.push(J[X[q]]);G.usedDuplicates=Array(V)}function Z9($,G,J){var X,q,V;if($!==null&&typeof $==="object")if(q=G.indexOf($),q!==-1){if(J.indexOf(q)===-1)J.push(q)}else if(G.push($),Array.isArray($))for(q=0,V=$.length;q<V;q+=1)Z9($[q],G,J);else{X=Object.keys($);for(q=0,V=X.length;q<V;q+=1)Z9($[X[q]],G,J)}}function CQ($,G){G=G||{};var J=new OQ(G);if(!J.noRefs)EQ($,J);var X=$;if(J.replacer)X=J.replacer.call({"":X},"",X);if(R0(J,0,X,!0,!0))return J.dump+`
|
|
119
|
-
`;return""}var SQ=CQ,bQ={dump:SQ};function I9($,G){return function(){throw Error("Function yaml."+$+" is removed in js-yaml 4. Use yaml."+G+" instead, which is now safe by default.")}}var{load:xQ,loadAll:IP}=B3,vQ=bQ.dump;var EP=I9("safeLoad","load"),CP=I9("safeLoadAll","loadAll"),SP=I9("safeDump","dump");var b={};m9(b,{void:()=>AD,util:()=>a,unknown:()=>BD,union:()=>ZD,undefined:()=>KD,tuple:()=>LD,transformer:()=>gD,symbol:()=>DD,string:()=>h3,strictObject:()=>ND,setErrorMap:()=>yQ,set:()=>ED,record:()=>TD,quotelessJson:()=>gQ,promise:()=>kD,preprocess:()=>mD,pipeline:()=>fD,ostring:()=>uD,optional:()=>hD,onumber:()=>pD,oboolean:()=>lD,objectUtil:()=>E9,object:()=>jD,number:()=>y3,nullable:()=>yD,null:()=>FD,never:()=>OD,nativeEnum:()=>vD,nan:()=>MD,map:()=>ID,makeIssue:()=>_4,literal:()=>bD,lazy:()=>SD,late:()=>HD,isValid:()=>b0,isDirty:()=>h5,isAsync:()=>k2,isAborted:()=>g5,intersection:()=>PD,instanceof:()=>UD,getParsedType:()=>V0,getErrorMap:()=>v2,function:()=>CD,enum:()=>xD,effect:()=>gD,discriminatedUnion:()=>_D,defaultErrorMap:()=>B0,datetimeRegex:()=>v3,date:()=>QD,custom:()=>g3,coerce:()=>rD,boolean:()=>m3,bigint:()=>zD,array:()=>wD,any:()=>RD,addIssueToContext:()=>C,ZodVoid:()=>L4,ZodUnknown:()=>x0,ZodUnion:()=>u2,ZodUndefined:()=>m2,ZodType:()=>o,ZodTuple:()=>H0,ZodTransformer:()=>G0,ZodSymbol:()=>P4,ZodString:()=>s1,ZodSet:()=>V2,ZodSchema:()=>o,ZodRecord:()=>T4,ZodReadonly:()=>o2,ZodPromise:()=>W2,ZodPipeline:()=>C4,ZodParsedType:()=>I,ZodOptional:()=>e1,ZodObject:()=>Y1,ZodNumber:()=>v0,ZodNullable:()=>A0,ZodNull:()=>f2,ZodNever:()=>W0,ZodNativeEnum:()=>d2,ZodNaN:()=>E4,ZodMap:()=>I4,ZodLiteral:()=>r2,ZodLazy:()=>l2,ZodIssueCode:()=>T,ZodIntersection:()=>p2,ZodFunction:()=>h2,ZodFirstPartyTypeKind:()=>p,ZodError:()=>T1,ZodEnum:()=>g0,ZodEffects:()=>G0,ZodDiscriminatedUnion:()=>y5,ZodDefault:()=>c2,ZodDate:()=>q2,ZodCatch:()=>i2,ZodBranded:()=>m5,ZodBoolean:()=>y2,ZodBigInt:()=>k0,ZodArray:()=>t1,ZodAny:()=>Y2,Schema:()=>o,ParseStatus:()=>N1,OK:()=>I1,NEVER:()=>dD,INVALID:()=>u,EMPTY_PATH:()=>mQ,DIRTY:()=>X2,BRAND:()=>WD});var a;(function($){$.assertEqual=(q)=>{};function G(q){}$.assertIs=G;function J(q){throw Error()}$.assertNever=J,$.arrayToEnum=(q)=>{let V={};for(let Y of q)V[Y]=Y;return V},$.getValidEnumValues=(q)=>{let V=$.objectKeys(q).filter((W)=>typeof q[q[W]]!=="number"),Y={};for(let W of V)Y[W]=q[W];return $.objectValues(Y)},$.objectValues=(q)=>{return $.objectKeys(q).map(function(V){return q[V]})},$.objectKeys=typeof Object.keys==="function"?(q)=>Object.keys(q):(q)=>{let V=[];for(let Y in q)if(Object.prototype.hasOwnProperty.call(q,Y))V.push(Y);return V},$.find=(q,V)=>{for(let Y of q)if(V(Y))return Y;return},$.isInteger=typeof Number.isInteger==="function"?(q)=>Number.isInteger(q):(q)=>typeof q==="number"&&Number.isFinite(q)&&Math.floor(q)===q;function X(q,V=" | "){return q.map((Y)=>typeof Y==="string"?`'${Y}'`:Y).join(V)}$.joinValues=X,$.jsonStringifyReplacer=(q,V)=>{if(typeof V==="bigint")return V.toString();return V}})(a||(a={}));var E9;(function($){$.mergeShapes=(G,J)=>{return{...G,...J}}})(E9||(E9={}));var I=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),V0=($)=>{switch(typeof $){case"undefined":return I.undefined;case"string":return I.string;case"number":return Number.isNaN($)?I.nan:I.number;case"boolean":return I.boolean;case"function":return I.function;case"bigint":return I.bigint;case"symbol":return I.symbol;case"object":if(Array.isArray($))return I.array;if($===null)return I.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return I.promise;if(typeof Map<"u"&&$ instanceof Map)return I.map;if(typeof Set<"u"&&$ instanceof Set)return I.set;if(typeof Date<"u"&&$ instanceof Date)return I.date;return I.object;default:return I.unknown}};var T=a.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gQ=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class T1 extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(J)=>{this.issues=[...this.issues,J]},this.addIssues=(J=[])=>{this.issues=[...this.issues,...J]};let G=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,G);else this.__proto__=G;this.name="ZodError",this.issues=$}format($){let G=$||function(q){return q.message},J={_errors:[]},X=(q)=>{for(let V of q.issues)if(V.code==="invalid_union")V.unionErrors.map(X);else if(V.code==="invalid_return_type")X(V.returnTypeError);else if(V.code==="invalid_arguments")X(V.argumentsError);else if(V.path.length===0)J._errors.push(G(V));else{let Y=J,W=0;while(W<V.path.length){let H=V.path[W];if(W!==V.path.length-1)Y[H]=Y[H]||{_errors:[]};else Y[H]=Y[H]||{_errors:[]},Y[H]._errors.push(G(V));Y=Y[H],W++}}};return X(this),J}static assert($){if(!($ instanceof T1))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(G)=>G.message){let G={},J=[];for(let X of this.issues)if(X.path.length>0){let q=X.path[0];G[q]=G[q]||[],G[q].push($(X))}else J.push($(X));return{formErrors:J,fieldErrors:G}}get formErrors(){return this.flatten()}}T1.create=($)=>{return new T1($)};var hQ=($,G)=>{let J;switch($.code){case T.invalid_type:if($.received===I.undefined)J="Required";else J=`Expected ${$.expected}, received ${$.received}`;break;case T.invalid_literal:J=`Invalid literal value, expected ${JSON.stringify($.expected,a.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:J=`Unrecognized key(s) in object: ${a.joinValues($.keys,", ")}`;break;case T.invalid_union:J="Invalid input";break;case T.invalid_union_discriminator:J=`Invalid discriminator value. Expected ${a.joinValues($.options)}`;break;case T.invalid_enum_value:J=`Invalid enum value. Expected ${a.joinValues($.options)}, received '${$.received}'`;break;case T.invalid_arguments:J="Invalid function arguments";break;case T.invalid_return_type:J="Invalid function return type";break;case T.invalid_date:J="Invalid date";break;case T.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(J=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")J=`${J} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)J=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)J=`Invalid input: must end with "${$.validation.endsWith}"`;else a.assertNever($.validation);else if($.validation!=="regex")J=`Invalid ${$.validation}`;else J="Invalid";break;case T.too_small:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else J="Invalid input";break;case T.too_big:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")J=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else J="Invalid input";break;case T.custom:J="Invalid input";break;case T.invalid_intersection_types:J="Intersection results could not be merged";break;case T.not_multiple_of:J=`Number must be a multiple of ${$.multipleOf}`;break;case T.not_finite:J="Number must be finite";break;default:J=G.defaultError,a.assertNever($)}return{message:J}},B0=hQ;var E3=B0;function yQ($){E3=$}function v2(){return E3}var _4=($)=>{let{data:G,path:J,errorMaps:X,issueData:q}=$,V=[...J,...q.path||[]],Y={...q,path:V};if(q.message!==void 0)return{...q,path:V,message:q.message};let W="",H=X.filter((U)=>!!U).slice().reverse();for(let U of H)W=U(Y,{data:G,defaultError:W}).message;return{...q,path:V,message:W}},mQ=[];function C($,G){let J=v2(),X=_4({issueData:G,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,J,J===B0?void 0:B0].filter((q)=>!!q)});$.common.issues.push(X)}class N1{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,G){let J=[];for(let X of G){if(X.status==="aborted")return u;if(X.status==="dirty")$.dirty();J.push(X.value)}return{status:$.value,value:J}}static async mergeObjectAsync($,G){let J=[];for(let X of G){let q=await X.key,V=await X.value;J.push({key:q,value:V})}return N1.mergeObjectSync($,J)}static mergeObjectSync($,G){let J={};for(let X of G){let{key:q,value:V}=X;if(q.status==="aborted")return u;if(V.status==="aborted")return u;if(q.status==="dirty")$.dirty();if(V.status==="dirty")$.dirty();if(q.value!=="__proto__"&&(typeof V.value<"u"||X.alwaysSet))J[q.value]=V.value}return{status:$.value,value:J}}}var u=Object.freeze({status:"aborted"}),X2=($)=>({status:"dirty",value:$}),I1=($)=>({status:"valid",value:$}),g5=($)=>$.status==="aborted",h5=($)=>$.status==="dirty",b0=($)=>$.status==="valid",k2=($)=>typeof Promise<"u"&&$ instanceof Promise;var g;(function($){$.errToObj=(G)=>typeof G==="string"?{message:G}:G||{},$.toString=(G)=>typeof G==="string"?G:G?.message})(g||(g={}));class $0{constructor($,G,J,X){this._cachedPath=[],this.parent=$,this.data=G,this._path=J,this._key=X}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var C3=($,G)=>{if(b0(G))return{success:!0,data:G.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let J=new T1($.common.issues);return this._error=J,this._error}}}};function c($){if(!$)return{};let{errorMap:G,invalid_type_error:J,required_error:X,description:q}=$;if(G&&(J||X))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(G)return{errorMap:G,description:q};return{errorMap:(Y,W)=>{let{message:H}=$;if(Y.code==="invalid_enum_value")return{message:H??W.defaultError};if(typeof W.data>"u")return{message:H??X??W.defaultError};if(Y.code!=="invalid_type")return{message:W.defaultError};return{message:H??J??W.defaultError}},description:q}}class o{get description(){return this._def.description}_getType($){return V0($.data)}_getOrReturnCtx($,G){return G||{common:$.parent.common,data:$.data,parsedType:V0($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new N1,ctx:{common:$.parent.common,data:$.data,parsedType:V0($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let G=this._parse($);if(k2(G))throw Error("Synchronous parse encountered promise.");return G}_parseAsync($){let G=this._parse($);return Promise.resolve(G)}parse($,G){let J=this.safeParse($,G);if(J.success)return J.data;throw J.error}safeParse($,G){let J={common:{issues:[],async:G?.async??!1,contextualErrorMap:G?.errorMap},path:G?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:V0($)},X=this._parseSync({data:$,path:J.path,parent:J});return C3(J,X)}"~validate"($){let G={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:V0($)};if(!this["~standard"].async)try{let J=this._parseSync({data:$,path:[],parent:G});return b0(J)?{value:J.value}:{issues:G.common.issues}}catch(J){if(J?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;G.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:G}).then((J)=>b0(J)?{value:J.value}:{issues:G.common.issues})}async parseAsync($,G){let J=await this.safeParseAsync($,G);if(J.success)return J.data;throw J.error}async safeParseAsync($,G){let J={common:{issues:[],contextualErrorMap:G?.errorMap,async:!0},path:G?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:V0($)},X=this._parse({data:$,path:J.path,parent:J}),q=await(k2(X)?X:Promise.resolve(X));return C3(J,q)}refine($,G){let J=(X)=>{if(typeof G==="string"||typeof G>"u")return{message:G};else if(typeof G==="function")return G(X);else return G};return this._refinement((X,q)=>{let V=$(X),Y=()=>q.addIssue({code:T.custom,...J(X)});if(typeof Promise<"u"&&V instanceof Promise)return V.then((W)=>{if(!W)return Y(),!1;else return!0});if(!V)return Y(),!1;else return!0})}refinement($,G){return this._refinement((J,X)=>{if(!$(J))return X.addIssue(typeof G==="function"?G(J,X):G),!1;else return!0})}_refinement($){return new G0({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(G)=>this["~validate"](G)}}optional(){return e1.create(this,this._def)}nullable(){return A0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return t1.create(this)}promise(){return W2.create(this,this._def)}or($){return u2.create([this,$],this._def)}and($){return p2.create(this,$,this._def)}transform($){return new G0({...c(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:$}})}default($){let G=typeof $==="function"?$:()=>$;return new c2({...c(this._def),innerType:this,defaultValue:G,typeName:p.ZodDefault})}brand(){return new m5({typeName:p.ZodBranded,type:this,...c(this._def)})}catch($){let G=typeof $==="function"?$:()=>$;return new i2({...c(this._def),innerType:this,catchValue:G,typeName:p.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return C4.create(this,$)}readonly(){return o2.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var fQ=/^c[^\s-]{8,}$/i,uQ=/^[0-9a-z]+$/,pQ=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lQ=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,rQ=/^[a-z0-9_-]{21}$/i,dQ=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,cQ=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,iQ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",C9,nQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,aQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,sQ=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,tQ=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eQ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$D=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,b3="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",GD=new RegExp(`^${b3}$`);function x3($){let G="[0-5]\\d";if($.precision)G=`${G}\\.\\d{${$.precision}}`;else if($.precision==null)G=`${G}(\\.\\d+)?`;let J=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${G})${J}`}function JD($){return new RegExp(`^${x3($)}$`)}function v3($){let G=`${b3}T${x3($)}`,J=[];if(J.push($.local?"Z?":"Z"),$.offset)J.push("([+-]\\d{2}:?\\d{2})");return G=`${G}(${J.join("|")})`,new RegExp(`^${G}$`)}function XD($,G){if((G==="v4"||!G)&&nQ.test($))return!0;if((G==="v6"||!G)&&sQ.test($))return!0;return!1}function qD($,G){if(!dQ.test($))return!1;try{let[J]=$.split(".");if(!J)return!1;let X=J.replace(/-/g,"+").replace(/_/g,"/").padEnd(J.length+(4-J.length%4)%4,"="),q=JSON.parse(atob(X));if(typeof q!=="object"||q===null)return!1;if("typ"in q&&q?.typ!=="JWT")return!1;if(!q.alg)return!1;if(G&&q.alg!==G)return!1;return!0}catch{return!1}}function YD($,G){if((G==="v4"||!G)&&aQ.test($))return!0;if((G==="v6"||!G)&&tQ.test($))return!0;return!1}class s1 extends o{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==I.string){let q=this._getOrReturnCtx($);return C(q,{code:T.invalid_type,expected:I.string,received:q.parsedType}),u}let J=new N1,X=void 0;for(let q of this._def.checks)if(q.kind==="min"){if($.data.length<q.value)X=this._getOrReturnCtx($,X),C(X,{code:T.too_small,minimum:q.value,type:"string",inclusive:!0,exact:!1,message:q.message}),J.dirty()}else if(q.kind==="max"){if($.data.length>q.value)X=this._getOrReturnCtx($,X),C(X,{code:T.too_big,maximum:q.value,type:"string",inclusive:!0,exact:!1,message:q.message}),J.dirty()}else if(q.kind==="length"){let V=$.data.length>q.value,Y=$.data.length<q.value;if(V||Y){if(X=this._getOrReturnCtx($,X),V)C(X,{code:T.too_big,maximum:q.value,type:"string",inclusive:!0,exact:!0,message:q.message});else if(Y)C(X,{code:T.too_small,minimum:q.value,type:"string",inclusive:!0,exact:!0,message:q.message});J.dirty()}}else if(q.kind==="email"){if(!iQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"email",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="emoji"){if(!C9)C9=new RegExp(oQ,"u");if(!C9.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"emoji",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="uuid"){if(!lQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"uuid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="nanoid"){if(!rQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"nanoid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="cuid"){if(!fQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"cuid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="cuid2"){if(!uQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"cuid2",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="ulid"){if(!pQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"ulid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="url")try{new URL($.data)}catch{X=this._getOrReturnCtx($,X),C(X,{validation:"url",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="regex"){if(q.regex.lastIndex=0,!q.regex.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"regex",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="trim")$.data=$.data.trim();else if(q.kind==="includes"){if(!$.data.includes(q.value,q.position))X=this._getOrReturnCtx($,X),C(X,{code:T.invalid_string,validation:{includes:q.value,position:q.position},message:q.message}),J.dirty()}else if(q.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(q.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(q.kind==="startsWith"){if(!$.data.startsWith(q.value))X=this._getOrReturnCtx($,X),C(X,{code:T.invalid_string,validation:{startsWith:q.value},message:q.message}),J.dirty()}else if(q.kind==="endsWith"){if(!$.data.endsWith(q.value))X=this._getOrReturnCtx($,X),C(X,{code:T.invalid_string,validation:{endsWith:q.value},message:q.message}),J.dirty()}else if(q.kind==="datetime"){if(!v3(q).test($.data))X=this._getOrReturnCtx($,X),C(X,{code:T.invalid_string,validation:"datetime",message:q.message}),J.dirty()}else if(q.kind==="date"){if(!GD.test($.data))X=this._getOrReturnCtx($,X),C(X,{code:T.invalid_string,validation:"date",message:q.message}),J.dirty()}else if(q.kind==="time"){if(!JD(q).test($.data))X=this._getOrReturnCtx($,X),C(X,{code:T.invalid_string,validation:"time",message:q.message}),J.dirty()}else if(q.kind==="duration"){if(!cQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"duration",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="ip"){if(!XD($.data,q.version))X=this._getOrReturnCtx($,X),C(X,{validation:"ip",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="jwt"){if(!qD($.data,q.alg))X=this._getOrReturnCtx($,X),C(X,{validation:"jwt",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="cidr"){if(!YD($.data,q.version))X=this._getOrReturnCtx($,X),C(X,{validation:"cidr",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="base64"){if(!eQ.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"base64",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="base64url"){if(!$D.test($.data))X=this._getOrReturnCtx($,X),C(X,{validation:"base64url",code:T.invalid_string,message:q.message}),J.dirty()}else a.assertNever(q);return{status:J.value,value:$.data}}_regex($,G,J){return this.refinement((X)=>$.test(X),{validation:G,code:T.invalid_string,...g.errToObj(J)})}_addCheck($){return new s1({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...g.errToObj($)})}url($){return this._addCheck({kind:"url",...g.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...g.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...g.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...g.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...g.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...g.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...g.errToObj($)})}base64($){return this._addCheck({kind:"base64",...g.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...g.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...g.errToObj($)})}ip($){return this._addCheck({kind:"ip",...g.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...g.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...g.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...g.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...g.errToObj($)})}regex($,G){return this._addCheck({kind:"regex",regex:$,...g.errToObj(G)})}includes($,G){return this._addCheck({kind:"includes",value:$,position:G?.position,...g.errToObj(G?.message)})}startsWith($,G){return this._addCheck({kind:"startsWith",value:$,...g.errToObj(G)})}endsWith($,G){return this._addCheck({kind:"endsWith",value:$,...g.errToObj(G)})}min($,G){return this._addCheck({kind:"min",value:$,...g.errToObj(G)})}max($,G){return this._addCheck({kind:"max",value:$,...g.errToObj(G)})}length($,G){return this._addCheck({kind:"length",value:$,...g.errToObj(G)})}nonempty($){return this.min(1,g.errToObj($))}trim(){return new s1({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new s1({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new s1({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $}get maxLength(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $}}s1.create=($)=>{return new s1({checks:[],typeName:p.ZodString,coerce:$?.coerce??!1,...c($)})};function VD($,G){let J=($.toString().split(".")[1]||"").length,X=(G.toString().split(".")[1]||"").length,q=J>X?J:X,V=Number.parseInt($.toFixed(q).replace(".","")),Y=Number.parseInt(G.toFixed(q).replace(".",""));return V%Y/10**q}class v0 extends o{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==I.number){let q=this._getOrReturnCtx($);return C(q,{code:T.invalid_type,expected:I.number,received:q.parsedType}),u}let J=void 0,X=new N1;for(let q of this._def.checks)if(q.kind==="int"){if(!a.isInteger($.data))J=this._getOrReturnCtx($,J),C(J,{code:T.invalid_type,expected:"integer",received:"float",message:q.message}),X.dirty()}else if(q.kind==="min"){if(q.inclusive?$.data<q.value:$.data<=q.value)J=this._getOrReturnCtx($,J),C(J,{code:T.too_small,minimum:q.value,type:"number",inclusive:q.inclusive,exact:!1,message:q.message}),X.dirty()}else if(q.kind==="max"){if(q.inclusive?$.data>q.value:$.data>=q.value)J=this._getOrReturnCtx($,J),C(J,{code:T.too_big,maximum:q.value,type:"number",inclusive:q.inclusive,exact:!1,message:q.message}),X.dirty()}else if(q.kind==="multipleOf"){if(VD($.data,q.value)!==0)J=this._getOrReturnCtx($,J),C(J,{code:T.not_multiple_of,multipleOf:q.value,message:q.message}),X.dirty()}else if(q.kind==="finite"){if(!Number.isFinite($.data))J=this._getOrReturnCtx($,J),C(J,{code:T.not_finite,message:q.message}),X.dirty()}else a.assertNever(q);return{status:X.value,value:$.data}}gte($,G){return this.setLimit("min",$,!0,g.toString(G))}gt($,G){return this.setLimit("min",$,!1,g.toString(G))}lte($,G){return this.setLimit("max",$,!0,g.toString(G))}lt($,G){return this.setLimit("max",$,!1,g.toString(G))}setLimit($,G,J,X){return new v0({...this._def,checks:[...this._def.checks,{kind:$,value:G,inclusive:J,message:g.toString(X)}]})}_addCheck($){return new v0({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:g.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString($)})}multipleOf($,G){return this._addCheck({kind:"multipleOf",value:$,message:g.toString(G)})}finite($){return this._addCheck({kind:"finite",message:g.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.toString($)})}get minValue(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $}get maxValue(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&a.isInteger($.value))}get isFinite(){let $=null,G=null;for(let J of this._def.checks)if(J.kind==="finite"||J.kind==="int"||J.kind==="multipleOf")return!0;else if(J.kind==="min"){if(G===null||J.value>G)G=J.value}else if(J.kind==="max"){if($===null||J.value<$)$=J.value}return Number.isFinite(G)&&Number.isFinite($)}}v0.create=($)=>{return new v0({checks:[],typeName:p.ZodNumber,coerce:$?.coerce||!1,...c($)})};class k0 extends o{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==I.bigint)return this._getInvalidInput($);let J=void 0,X=new N1;for(let q of this._def.checks)if(q.kind==="min"){if(q.inclusive?$.data<q.value:$.data<=q.value)J=this._getOrReturnCtx($,J),C(J,{code:T.too_small,type:"bigint",minimum:q.value,inclusive:q.inclusive,message:q.message}),X.dirty()}else if(q.kind==="max"){if(q.inclusive?$.data>q.value:$.data>=q.value)J=this._getOrReturnCtx($,J),C(J,{code:T.too_big,type:"bigint",maximum:q.value,inclusive:q.inclusive,message:q.message}),X.dirty()}else if(q.kind==="multipleOf"){if($.data%q.value!==BigInt(0))J=this._getOrReturnCtx($,J),C(J,{code:T.not_multiple_of,multipleOf:q.value,message:q.message}),X.dirty()}else a.assertNever(q);return{status:X.value,value:$.data}}_getInvalidInput($){let G=this._getOrReturnCtx($);return C(G,{code:T.invalid_type,expected:I.bigint,received:G.parsedType}),u}gte($,G){return this.setLimit("min",$,!0,g.toString(G))}gt($,G){return this.setLimit("min",$,!1,g.toString(G))}lte($,G){return this.setLimit("max",$,!0,g.toString(G))}lt($,G){return this.setLimit("max",$,!1,g.toString(G))}setLimit($,G,J,X){return new k0({...this._def,checks:[...this._def.checks,{kind:$,value:G,inclusive:J,message:g.toString(X)}]})}_addCheck($){return new k0({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString($)})}multipleOf($,G){return this._addCheck({kind:"multipleOf",value:$,message:g.toString(G)})}get minValue(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $}get maxValue(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $}}k0.create=($)=>{return new k0({checks:[],typeName:p.ZodBigInt,coerce:$?.coerce??!1,...c($)})};class y2 extends o{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==I.boolean){let J=this._getOrReturnCtx($);return C(J,{code:T.invalid_type,expected:I.boolean,received:J.parsedType}),u}return I1($.data)}}y2.create=($)=>{return new y2({typeName:p.ZodBoolean,coerce:$?.coerce||!1,...c($)})};class q2 extends o{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==I.date){let q=this._getOrReturnCtx($);return C(q,{code:T.invalid_type,expected:I.date,received:q.parsedType}),u}if(Number.isNaN($.data.getTime())){let q=this._getOrReturnCtx($);return C(q,{code:T.invalid_date}),u}let J=new N1,X=void 0;for(let q of this._def.checks)if(q.kind==="min"){if($.data.getTime()<q.value)X=this._getOrReturnCtx($,X),C(X,{code:T.too_small,message:q.message,inclusive:!0,exact:!1,minimum:q.value,type:"date"}),J.dirty()}else if(q.kind==="max"){if($.data.getTime()>q.value)X=this._getOrReturnCtx($,X),C(X,{code:T.too_big,message:q.message,inclusive:!0,exact:!1,maximum:q.value,type:"date"}),J.dirty()}else a.assertNever(q);return{status:J.value,value:new Date($.data.getTime())}}_addCheck($){return new q2({...this._def,checks:[...this._def.checks,$]})}min($,G){return this._addCheck({kind:"min",value:$.getTime(),message:g.toString(G)})}max($,G){return this._addCheck({kind:"max",value:$.getTime(),message:g.toString(G)})}get minDate(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $!=null?new Date($):null}}q2.create=($)=>{return new q2({checks:[],coerce:$?.coerce||!1,typeName:p.ZodDate,...c($)})};class P4 extends o{_parse($){if(this._getType($)!==I.symbol){let J=this._getOrReturnCtx($);return C(J,{code:T.invalid_type,expected:I.symbol,received:J.parsedType}),u}return I1($.data)}}P4.create=($)=>{return new P4({typeName:p.ZodSymbol,...c($)})};class m2 extends o{_parse($){if(this._getType($)!==I.undefined){let J=this._getOrReturnCtx($);return C(J,{code:T.invalid_type,expected:I.undefined,received:J.parsedType}),u}return I1($.data)}}m2.create=($)=>{return new m2({typeName:p.ZodUndefined,...c($)})};class f2 extends o{_parse($){if(this._getType($)!==I.null){let J=this._getOrReturnCtx($);return C(J,{code:T.invalid_type,expected:I.null,received:J.parsedType}),u}return I1($.data)}}f2.create=($)=>{return new f2({typeName:p.ZodNull,...c($)})};class Y2 extends o{constructor(){super(...arguments);this._any=!0}_parse($){return I1($.data)}}Y2.create=($)=>{return new Y2({typeName:p.ZodAny,...c($)})};class x0 extends o{constructor(){super(...arguments);this._unknown=!0}_parse($){return I1($.data)}}x0.create=($)=>{return new x0({typeName:p.ZodUnknown,...c($)})};class W0 extends o{_parse($){let G=this._getOrReturnCtx($);return C(G,{code:T.invalid_type,expected:I.never,received:G.parsedType}),u}}W0.create=($)=>{return new W0({typeName:p.ZodNever,...c($)})};class L4 extends o{_parse($){if(this._getType($)!==I.undefined){let J=this._getOrReturnCtx($);return C(J,{code:T.invalid_type,expected:I.void,received:J.parsedType}),u}return I1($.data)}}L4.create=($)=>{return new L4({typeName:p.ZodVoid,...c($)})};class t1 extends o{_parse($){let{ctx:G,status:J}=this._processInputParams($),X=this._def;if(G.parsedType!==I.array)return C(G,{code:T.invalid_type,expected:I.array,received:G.parsedType}),u;if(X.exactLength!==null){let V=G.data.length>X.exactLength.value,Y=G.data.length<X.exactLength.value;if(V||Y)C(G,{code:V?T.too_big:T.too_small,minimum:Y?X.exactLength.value:void 0,maximum:V?X.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:X.exactLength.message}),J.dirty()}if(X.minLength!==null){if(G.data.length<X.minLength.value)C(G,{code:T.too_small,minimum:X.minLength.value,type:"array",inclusive:!0,exact:!1,message:X.minLength.message}),J.dirty()}if(X.maxLength!==null){if(G.data.length>X.maxLength.value)C(G,{code:T.too_big,maximum:X.maxLength.value,type:"array",inclusive:!0,exact:!1,message:X.maxLength.message}),J.dirty()}if(G.common.async)return Promise.all([...G.data].map((V,Y)=>{return X.type._parseAsync(new $0(G,V,G.path,Y))})).then((V)=>{return N1.mergeArray(J,V)});let q=[...G.data].map((V,Y)=>{return X.type._parseSync(new $0(G,V,G.path,Y))});return N1.mergeArray(J,q)}get element(){return this._def.type}min($,G){return new t1({...this._def,minLength:{value:$,message:g.toString(G)}})}max($,G){return new t1({...this._def,maxLength:{value:$,message:g.toString(G)}})}length($,G){return new t1({...this._def,exactLength:{value:$,message:g.toString(G)}})}nonempty($){return this.min(1,$)}}t1.create=($,G)=>{return new t1({type:$,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...c(G)})};function g2($){if($ instanceof Y1){let G={};for(let J in $.shape){let X=$.shape[J];G[J]=e1.create(g2(X))}return new Y1({...$._def,shape:()=>G})}else if($ instanceof t1)return new t1({...$._def,type:g2($.element)});else if($ instanceof e1)return e1.create(g2($.unwrap()));else if($ instanceof A0)return A0.create(g2($.unwrap()));else if($ instanceof H0)return H0.create($.items.map((G)=>g2(G)));else return $}class Y1 extends o{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),G=a.objectKeys($);return this._cached={shape:$,keys:G},this._cached}_parse($){if(this._getType($)!==I.object){let H=this._getOrReturnCtx($);return C(H,{code:T.invalid_type,expected:I.object,received:H.parsedType}),u}let{status:J,ctx:X}=this._processInputParams($),{shape:q,keys:V}=this._getCached(),Y=[];if(!(this._def.catchall instanceof W0&&this._def.unknownKeys==="strip")){for(let H in X.data)if(!V.includes(H))Y.push(H)}let W=[];for(let H of V){let U=q[H],M=X.data[H];W.push({key:{status:"valid",value:H},value:U._parse(new $0(X,M,X.path,H)),alwaysSet:H in X.data})}if(this._def.catchall instanceof W0){let H=this._def.unknownKeys;if(H==="passthrough")for(let U of Y)W.push({key:{status:"valid",value:U},value:{status:"valid",value:X.data[U]}});else if(H==="strict"){if(Y.length>0)C(X,{code:T.unrecognized_keys,keys:Y}),J.dirty()}else if(H==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let H=this._def.catchall;for(let U of Y){let M=X.data[U];W.push({key:{status:"valid",value:U},value:H._parse(new $0(X,M,X.path,U)),alwaysSet:U in X.data})}}if(X.common.async)return Promise.resolve().then(async()=>{let H=[];for(let U of W){let M=await U.key,Q=await U.value;H.push({key:M,value:Q,alwaysSet:U.alwaysSet})}return H}).then((H)=>{return N1.mergeObjectSync(J,H)});else return N1.mergeObjectSync(J,W)}get shape(){return this._def.shape()}strict($){return g.errToObj,new Y1({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(G,J)=>{let X=this._def.errorMap?.(G,J).message??J.defaultError;if(G.code==="unrecognized_keys")return{message:g.errToObj($).message??X};return{message:X}}}:{}})}strip(){return new Y1({...this._def,unknownKeys:"strip"})}passthrough(){return new Y1({...this._def,unknownKeys:"passthrough"})}extend($){return new Y1({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new Y1({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:p.ZodObject})}setKey($,G){return this.augment({[$]:G})}catchall($){return new Y1({...this._def,catchall:$})}pick($){let G={};for(let J of a.objectKeys($))if($[J]&&this.shape[J])G[J]=this.shape[J];return new Y1({...this._def,shape:()=>G})}omit($){let G={};for(let J of a.objectKeys(this.shape))if(!$[J])G[J]=this.shape[J];return new Y1({...this._def,shape:()=>G})}deepPartial(){return g2(this)}partial($){let G={};for(let J of a.objectKeys(this.shape)){let X=this.shape[J];if($&&!$[J])G[J]=X;else G[J]=X.optional()}return new Y1({...this._def,shape:()=>G})}required($){let G={};for(let J of a.objectKeys(this.shape))if($&&!$[J])G[J]=this.shape[J];else{let q=this.shape[J];while(q instanceof e1)q=q._def.innerType;G[J]=q}return new Y1({...this._def,shape:()=>G})}keyof(){return k3(a.objectKeys(this.shape))}}Y1.create=($,G)=>{return new Y1({shape:()=>$,unknownKeys:"strip",catchall:W0.create(),typeName:p.ZodObject,...c(G)})};Y1.strictCreate=($,G)=>{return new Y1({shape:()=>$,unknownKeys:"strict",catchall:W0.create(),typeName:p.ZodObject,...c(G)})};Y1.lazycreate=($,G)=>{return new Y1({shape:$,unknownKeys:"strip",catchall:W0.create(),typeName:p.ZodObject,...c(G)})};class u2 extends o{_parse($){let{ctx:G}=this._processInputParams($),J=this._def.options;function X(q){for(let Y of q)if(Y.result.status==="valid")return Y.result;for(let Y of q)if(Y.result.status==="dirty")return G.common.issues.push(...Y.ctx.common.issues),Y.result;let V=q.map((Y)=>new T1(Y.ctx.common.issues));return C(G,{code:T.invalid_union,unionErrors:V}),u}if(G.common.async)return Promise.all(J.map(async(q)=>{let V={...G,common:{...G.common,issues:[]},parent:null};return{result:await q._parseAsync({data:G.data,path:G.path,parent:V}),ctx:V}})).then(X);else{let q=void 0,V=[];for(let W of J){let H={...G,common:{...G.common,issues:[]},parent:null},U=W._parseSync({data:G.data,path:G.path,parent:H});if(U.status==="valid")return U;else if(U.status==="dirty"&&!q)q={result:U,ctx:H};if(H.common.issues.length)V.push(H.common.issues)}if(q)return G.common.issues.push(...q.ctx.common.issues),q.result;let Y=V.map((W)=>new T1(W));return C(G,{code:T.invalid_union,unionErrors:Y}),u}}get options(){return this._def.options}}u2.create=($,G)=>{return new u2({options:$,typeName:p.ZodUnion,...c(G)})};var O0=($)=>{if($ instanceof l2)return O0($.schema);else if($ instanceof G0)return O0($.innerType());else if($ instanceof r2)return[$.value];else if($ instanceof g0)return $.options;else if($ instanceof d2)return a.objectValues($.enum);else if($ instanceof c2)return O0($._def.innerType);else if($ instanceof m2)return[void 0];else if($ instanceof f2)return[null];else if($ instanceof e1)return[void 0,...O0($.unwrap())];else if($ instanceof A0)return[null,...O0($.unwrap())];else if($ instanceof m5)return O0($.unwrap());else if($ instanceof o2)return O0($.unwrap());else if($ instanceof i2)return O0($._def.innerType);else return[]};class y5 extends o{_parse($){let{ctx:G}=this._processInputParams($);if(G.parsedType!==I.object)return C(G,{code:T.invalid_type,expected:I.object,received:G.parsedType}),u;let J=this.discriminator,X=G.data[J],q=this.optionsMap.get(X);if(!q)return C(G,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[J]}),u;if(G.common.async)return q._parseAsync({data:G.data,path:G.path,parent:G});else return q._parseSync({data:G.data,path:G.path,parent:G})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,G,J){let X=new Map;for(let q of G){let V=O0(q.shape[$]);if(!V.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let Y of V){if(X.has(Y))throw Error(`Discriminator property ${String($)} has duplicate value ${String(Y)}`);X.set(Y,q)}}return new y5({typeName:p.ZodDiscriminatedUnion,discriminator:$,options:G,optionsMap:X,...c(J)})}}function S9($,G){let J=V0($),X=V0(G);if($===G)return{valid:!0,data:$};else if(J===I.object&&X===I.object){let q=a.objectKeys(G),V=a.objectKeys($).filter((W)=>q.indexOf(W)!==-1),Y={...$,...G};for(let W of V){let H=S9($[W],G[W]);if(!H.valid)return{valid:!1};Y[W]=H.data}return{valid:!0,data:Y}}else if(J===I.array&&X===I.array){if($.length!==G.length)return{valid:!1};let q=[];for(let V=0;V<$.length;V++){let Y=$[V],W=G[V],H=S9(Y,W);if(!H.valid)return{valid:!1};q.push(H.data)}return{valid:!0,data:q}}else if(J===I.date&&X===I.date&&+$===+G)return{valid:!0,data:$};else return{valid:!1}}class p2 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($),X=(q,V)=>{if(g5(q)||g5(V))return u;let Y=S9(q.value,V.value);if(!Y.valid)return C(J,{code:T.invalid_intersection_types}),u;if(h5(q)||h5(V))G.dirty();return{status:G.value,value:Y.data}};if(J.common.async)return Promise.all([this._def.left._parseAsync({data:J.data,path:J.path,parent:J}),this._def.right._parseAsync({data:J.data,path:J.path,parent:J})]).then(([q,V])=>X(q,V));else return X(this._def.left._parseSync({data:J.data,path:J.path,parent:J}),this._def.right._parseSync({data:J.data,path:J.path,parent:J}))}}p2.create=($,G,J)=>{return new p2({left:$,right:G,typeName:p.ZodIntersection,...c(J)})};class H0 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==I.array)return C(J,{code:T.invalid_type,expected:I.array,received:J.parsedType}),u;if(J.data.length<this._def.items.length)return C(J,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),u;if(!this._def.rest&&J.data.length>this._def.items.length)C(J,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G.dirty();let q=[...J.data].map((V,Y)=>{let W=this._def.items[Y]||this._def.rest;if(!W)return null;return W._parse(new $0(J,V,J.path,Y))}).filter((V)=>!!V);if(J.common.async)return Promise.all(q).then((V)=>{return N1.mergeArray(G,V)});else return N1.mergeArray(G,q)}get items(){return this._def.items}rest($){return new H0({...this._def,rest:$})}}H0.create=($,G)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new H0({items:$,typeName:p.ZodTuple,rest:null,...c(G)})};class T4 extends o{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==I.object)return C(J,{code:T.invalid_type,expected:I.object,received:J.parsedType}),u;let X=[],q=this._def.keyType,V=this._def.valueType;for(let Y in J.data)X.push({key:q._parse(new $0(J,Y,J.path,Y)),value:V._parse(new $0(J,J.data[Y],J.path,Y)),alwaysSet:Y in J.data});if(J.common.async)return N1.mergeObjectAsync(G,X);else return N1.mergeObjectSync(G,X)}get element(){return this._def.valueType}static create($,G,J){if(G instanceof o)return new T4({keyType:$,valueType:G,typeName:p.ZodRecord,...c(J)});return new T4({keyType:s1.create(),valueType:$,typeName:p.ZodRecord,...c(G)})}}class I4 extends o{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==I.map)return C(J,{code:T.invalid_type,expected:I.map,received:J.parsedType}),u;let X=this._def.keyType,q=this._def.valueType,V=[...J.data.entries()].map(([Y,W],H)=>{return{key:X._parse(new $0(J,Y,J.path,[H,"key"])),value:q._parse(new $0(J,W,J.path,[H,"value"]))}});if(J.common.async){let Y=new Map;return Promise.resolve().then(async()=>{for(let W of V){let H=await W.key,U=await W.value;if(H.status==="aborted"||U.status==="aborted")return u;if(H.status==="dirty"||U.status==="dirty")G.dirty();Y.set(H.value,U.value)}return{status:G.value,value:Y}})}else{let Y=new Map;for(let W of V){let{key:H,value:U}=W;if(H.status==="aborted"||U.status==="aborted")return u;if(H.status==="dirty"||U.status==="dirty")G.dirty();Y.set(H.value,U.value)}return{status:G.value,value:Y}}}}I4.create=($,G,J)=>{return new I4({valueType:G,keyType:$,typeName:p.ZodMap,...c(J)})};class V2 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==I.set)return C(J,{code:T.invalid_type,expected:I.set,received:J.parsedType}),u;let X=this._def;if(X.minSize!==null){if(J.data.size<X.minSize.value)C(J,{code:T.too_small,minimum:X.minSize.value,type:"set",inclusive:!0,exact:!1,message:X.minSize.message}),G.dirty()}if(X.maxSize!==null){if(J.data.size>X.maxSize.value)C(J,{code:T.too_big,maximum:X.maxSize.value,type:"set",inclusive:!0,exact:!1,message:X.maxSize.message}),G.dirty()}let q=this._def.valueType;function V(W){let H=new Set;for(let U of W){if(U.status==="aborted")return u;if(U.status==="dirty")G.dirty();H.add(U.value)}return{status:G.value,value:H}}let Y=[...J.data.values()].map((W,H)=>q._parse(new $0(J,W,J.path,H)));if(J.common.async)return Promise.all(Y).then((W)=>V(W));else return V(Y)}min($,G){return new V2({...this._def,minSize:{value:$,message:g.toString(G)}})}max($,G){return new V2({...this._def,maxSize:{value:$,message:g.toString(G)}})}size($,G){return this.min($,G).max($,G)}nonempty($){return this.min(1,$)}}V2.create=($,G)=>{return new V2({valueType:$,minSize:null,maxSize:null,typeName:p.ZodSet,...c(G)})};class h2 extends o{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:G}=this._processInputParams($);if(G.parsedType!==I.function)return C(G,{code:T.invalid_type,expected:I.function,received:G.parsedType}),u;function J(Y,W){return _4({data:Y,path:G.path,errorMaps:[G.common.contextualErrorMap,G.schemaErrorMap,v2(),B0].filter((H)=>!!H),issueData:{code:T.invalid_arguments,argumentsError:W}})}function X(Y,W){return _4({data:Y,path:G.path,errorMaps:[G.common.contextualErrorMap,G.schemaErrorMap,v2(),B0].filter((H)=>!!H),issueData:{code:T.invalid_return_type,returnTypeError:W}})}let q={errorMap:G.common.contextualErrorMap},V=G.data;if(this._def.returns instanceof W2){let Y=this;return I1(async function(...W){let H=new T1([]),U=await Y._def.args.parseAsync(W,q).catch((F)=>{throw H.addIssue(J(W,F)),H}),M=await Reflect.apply(V,this,U);return await Y._def.returns._def.type.parseAsync(M,q).catch((F)=>{throw H.addIssue(X(M,F)),H})})}else{let Y=this;return I1(function(...W){let H=Y._def.args.safeParse(W,q);if(!H.success)throw new T1([J(W,H.error)]);let U=Reflect.apply(V,this,H.data),M=Y._def.returns.safeParse(U,q);if(!M.success)throw new T1([X(U,M.error)]);return M.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new h2({...this._def,args:H0.create($).rest(x0.create())})}returns($){return new h2({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,G,J){return new h2({args:$?$:H0.create([]).rest(x0.create()),returns:G||x0.create(),typeName:p.ZodFunction,...c(J)})}}class l2 extends o{get schema(){return this._def.getter()}_parse($){let{ctx:G}=this._processInputParams($);return this._def.getter()._parse({data:G.data,path:G.path,parent:G})}}l2.create=($,G)=>{return new l2({getter:$,typeName:p.ZodLazy,...c(G)})};class r2 extends o{_parse($){if($.data!==this._def.value){let G=this._getOrReturnCtx($);return C(G,{received:G.data,code:T.invalid_literal,expected:this._def.value}),u}return{status:"valid",value:$.data}}get value(){return this._def.value}}r2.create=($,G)=>{return new r2({value:$,typeName:p.ZodLiteral,...c(G)})};function k3($,G){return new g0({values:$,typeName:p.ZodEnum,...c(G)})}class g0 extends o{_parse($){if(typeof $.data!=="string"){let G=this._getOrReturnCtx($),J=this._def.values;return C(G,{expected:a.joinValues(J),received:G.parsedType,code:T.invalid_type}),u}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let G=this._getOrReturnCtx($),J=this._def.values;return C(G,{received:G.data,code:T.invalid_enum_value,options:J}),u}return I1($.data)}get options(){return this._def.values}get enum(){let $={};for(let G of this._def.values)$[G]=G;return $}get Values(){let $={};for(let G of this._def.values)$[G]=G;return $}get Enum(){let $={};for(let G of this._def.values)$[G]=G;return $}extract($,G=this._def){return g0.create($,{...this._def,...G})}exclude($,G=this._def){return g0.create(this.options.filter((J)=>!$.includes(J)),{...this._def,...G})}}g0.create=k3;class d2 extends o{_parse($){let G=a.getValidEnumValues(this._def.values),J=this._getOrReturnCtx($);if(J.parsedType!==I.string&&J.parsedType!==I.number){let X=a.objectValues(G);return C(J,{expected:a.joinValues(X),received:J.parsedType,code:T.invalid_type}),u}if(!this._cache)this._cache=new Set(a.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let X=a.objectValues(G);return C(J,{received:J.data,code:T.invalid_enum_value,options:X}),u}return I1($.data)}get enum(){return this._def.values}}d2.create=($,G)=>{return new d2({values:$,typeName:p.ZodNativeEnum,...c(G)})};class W2 extends o{unwrap(){return this._def.type}_parse($){let{ctx:G}=this._processInputParams($);if(G.parsedType!==I.promise&&G.common.async===!1)return C(G,{code:T.invalid_type,expected:I.promise,received:G.parsedType}),u;let J=G.parsedType===I.promise?G.data:Promise.resolve(G.data);return I1(J.then((X)=>{return this._def.type.parseAsync(X,{path:G.path,errorMap:G.common.contextualErrorMap})}))}}W2.create=($,G)=>{return new W2({type:$,typeName:p.ZodPromise,...c(G)})};class G0 extends o{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:G,ctx:J}=this._processInputParams($),X=this._def.effect||null,q={addIssue:(V)=>{if(C(J,V),V.fatal)G.abort();else G.dirty()},get path(){return J.path}};if(q.addIssue=q.addIssue.bind(q),X.type==="preprocess"){let V=X.transform(J.data,q);if(J.common.async)return Promise.resolve(V).then(async(Y)=>{if(G.value==="aborted")return u;let W=await this._def.schema._parseAsync({data:Y,path:J.path,parent:J});if(W.status==="aborted")return u;if(W.status==="dirty")return X2(W.value);if(G.value==="dirty")return X2(W.value);return W});else{if(G.value==="aborted")return u;let Y=this._def.schema._parseSync({data:V,path:J.path,parent:J});if(Y.status==="aborted")return u;if(Y.status==="dirty")return X2(Y.value);if(G.value==="dirty")return X2(Y.value);return Y}}if(X.type==="refinement"){let V=(Y)=>{let W=X.refinement(Y,q);if(J.common.async)return Promise.resolve(W);if(W instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return Y};if(J.common.async===!1){let Y=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(Y.status==="aborted")return u;if(Y.status==="dirty")G.dirty();return V(Y.value),{status:G.value,value:Y.value}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((Y)=>{if(Y.status==="aborted")return u;if(Y.status==="dirty")G.dirty();return V(Y.value).then(()=>{return{status:G.value,value:Y.value}})})}if(X.type==="transform")if(J.common.async===!1){let V=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(!b0(V))return u;let Y=X.transform(V.value,q);if(Y instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:G.value,value:Y}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((V)=>{if(!b0(V))return u;return Promise.resolve(X.transform(V.value,q)).then((Y)=>({status:G.value,value:Y}))});a.assertNever(X)}}G0.create=($,G,J)=>{return new G0({schema:$,typeName:p.ZodEffects,effect:G,...c(J)})};G0.createWithPreprocess=($,G,J)=>{return new G0({schema:G,effect:{type:"preprocess",transform:$},typeName:p.ZodEffects,...c(J)})};class e1 extends o{_parse($){if(this._getType($)===I.undefined)return I1(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}e1.create=($,G)=>{return new e1({innerType:$,typeName:p.ZodOptional,...c(G)})};class A0 extends o{_parse($){if(this._getType($)===I.null)return I1(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}A0.create=($,G)=>{return new A0({innerType:$,typeName:p.ZodNullable,...c(G)})};class c2 extends o{_parse($){let{ctx:G}=this._processInputParams($),J=G.data;if(G.parsedType===I.undefined)J=this._def.defaultValue();return this._def.innerType._parse({data:J,path:G.path,parent:G})}removeDefault(){return this._def.innerType}}c2.create=($,G)=>{return new c2({innerType:$,typeName:p.ZodDefault,defaultValue:typeof G.default==="function"?G.default:()=>G.default,...c(G)})};class i2 extends o{_parse($){let{ctx:G}=this._processInputParams($),J={...G,common:{...G.common,issues:[]}},X=this._def.innerType._parse({data:J.data,path:J.path,parent:{...J}});if(k2(X))return X.then((q)=>{return{status:"valid",value:q.status==="valid"?q.value:this._def.catchValue({get error(){return new T1(J.common.issues)},input:J.data})}});else return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new T1(J.common.issues)},input:J.data})}}removeCatch(){return this._def.innerType}}i2.create=($,G)=>{return new i2({innerType:$,typeName:p.ZodCatch,catchValue:typeof G.catch==="function"?G.catch:()=>G.catch,...c(G)})};class E4 extends o{_parse($){if(this._getType($)!==I.nan){let J=this._getOrReturnCtx($);return C(J,{code:T.invalid_type,expected:I.nan,received:J.parsedType}),u}return{status:"valid",value:$.data}}}E4.create=($)=>{return new E4({typeName:p.ZodNaN,...c($)})};var WD=Symbol("zod_brand");class m5 extends o{_parse($){let{ctx:G}=this._processInputParams($),J=G.data;return this._def.type._parse({data:J,path:G.path,parent:G})}unwrap(){return this._def.type}}class C4 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.common.async)return(async()=>{let q=await this._def.in._parseAsync({data:J.data,path:J.path,parent:J});if(q.status==="aborted")return u;if(q.status==="dirty")return G.dirty(),X2(q.value);else return this._def.out._parseAsync({data:q.value,path:J.path,parent:J})})();else{let X=this._def.in._parseSync({data:J.data,path:J.path,parent:J});if(X.status==="aborted")return u;if(X.status==="dirty")return G.dirty(),{status:"dirty",value:X.value};else return this._def.out._parseSync({data:X.value,path:J.path,parent:J})}}static create($,G){return new C4({in:$,out:G,typeName:p.ZodPipeline})}}class o2 extends o{_parse($){let G=this._def.innerType._parse($),J=(X)=>{if(b0(X))X.value=Object.freeze(X.value);return X};return k2(G)?G.then((X)=>J(X)):J(G)}unwrap(){return this._def.innerType}}o2.create=($,G)=>{return new o2({innerType:$,typeName:p.ZodReadonly,...c(G)})};function S3($,G){let J=typeof $==="function"?$(G):typeof $==="string"?{message:$}:$;return typeof J==="string"?{message:J}:J}function g3($,G={},J){if($)return Y2.create().superRefine((X,q)=>{let V=$(X);if(V instanceof Promise)return V.then((Y)=>{if(!Y){let W=S3(G,X),H=W.fatal??J??!0;q.addIssue({code:"custom",...W,fatal:H})}});if(!V){let Y=S3(G,X),W=Y.fatal??J??!0;q.addIssue({code:"custom",...Y,fatal:W})}return});return Y2.create()}var HD={object:Y1.lazycreate},p;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(p||(p={}));var UD=($,G={message:`Input not instance of ${$.name}`})=>g3((J)=>J instanceof $,G),h3=s1.create,y3=v0.create,MD=E4.create,zD=k0.create,m3=y2.create,QD=q2.create,DD=P4.create,KD=m2.create,FD=f2.create,RD=Y2.create,BD=x0.create,OD=W0.create,AD=L4.create,wD=t1.create,jD=Y1.create,ND=Y1.strictCreate,ZD=u2.create,_D=y5.create,PD=p2.create,LD=H0.create,TD=T4.create,ID=I4.create,ED=V2.create,CD=h2.create,SD=l2.create,bD=r2.create,xD=g0.create,vD=d2.create,kD=W2.create,gD=G0.create,hD=e1.create,yD=A0.create,mD=G0.createWithPreprocess,fD=C4.create,uD=()=>h3().optional(),pD=()=>y3().optional(),lD=()=>m3().optional(),rD={string:($)=>s1.create({...$,coerce:!0}),number:($)=>v0.create({...$,coerce:!0}),boolean:($)=>y2.create({...$,coerce:!0}),bigint:($)=>k0.create({...$,coerce:!0}),date:($)=>q2.create({...$,coerce:!0})};var dD=u;var oD=b.enum(["public","shared","restricted"]),S4=b.union([oD,b.literal("private")]).optional().transform(($)=>{if($===void 0)return"public";if($==="private")return"restricted";return $});var b9=b.object({id:b.string(),entityType:b.string(),content:b.string(),created:b.string().datetime(),updated:b.string().datetime(),visibility:S4,metadata:b.record(b.string(),b.unknown()),contentHash:b.string()});var _T=b.object({id:b.string().min(1,"Entity ID is required"),entityType:b.string().min(1,"Entity type is required"),contentHash:b.string().min(1,"Content hash is required"),operation:b.enum(["create","update"])});var ET=b.object({limit:b.number().int().positive().optional().default(20),offset:b.number().int().min(0).optional().default(0),types:b.array(b.string()).optional().default([]),excludeTypes:b.array(b.string()).optional().default([]),weight:b.record(b.string(),b.number()).optional(),visibilityScope:b.enum(["public","shared","restricted"]).optional(),includeUngenerated:b.boolean().optional().default(!1)});var aD=x4(j6(),1);var xT=b.object({visibility:S4});var $K=b.object({field:b.string(),direction:b.enum(["asc","desc"]),nullsFirst:b.boolean().optional()}),cT=b.object({limit:b.number().int().positive().optional(),offset:b.number().int().min(0).optional().default(0),sortFields:b.array($K).optional(),filter:b.object({metadata:b.record(b.string(),b.unknown()).optional(),visibilityScope:b.enum(["public","shared","restricted"]).optional()}).optional(),publishedOnly:b.boolean().optional()});var QK=b.object({currentPage:b.number(),totalPages:b.number(),totalItems:b.number(),pageSize:b.number(),hasNextPage:b.boolean(),hasPrevPage:b.boolean()});function x9($,G,J){let X=Math.max(1,Math.ceil($/J));return{currentPage:G,totalPages:X,totalItems:$,pageSize:J,hasNextPage:G<X,hasPrevPage:G>1}}var r3=b.object({id:b.string().optional(),limit:b.number().optional(),page:b.number().optional(),pageSize:b.number().optional(),baseUrl:b.string().optional()}).passthrough(),d3=b.object({entityType:b.string().optional(),query:r3.optional()}).passthrough();class c3{logger;constructor($){this.logger=$}buildDetailResult($,G){throw Error(`${this.id}: buildDetailResult() not implemented. Override this method or override fetch() to handle detail views.`)}parseQuery($){let G=d3.parse($);return{entityType:G.entityType??this.config.entityType,query:G.query??{}}}async fetch($,G,J){let X=this.parseQuery($),q=J.entityService;if(X.query.id){let Y=await this.fetchDetail(X.query.id,q);return G.parse(this.buildDetailResult(Y.item,Y.navigation))}let V=await this.fetchList(X.query,q);return G.parse(this.buildListResult(V.items,V.pagination,X.query))}async fetchDetail($,G){let J=await this.lookupEntity($,G),X=this.transformEntity(J),q=null;if(this.config.enableNavigation)q=await this.resolveNavigation(J,G);return{item:X,navigation:q}}async fetchList($,G,J){let X=$.page??1,q=$.pageSize??$.limit??this.config.defaultLimit??100,V=(X-1)*q,Y=$.page!==void 0,[W,H]=await Promise.all([G.listEntities({entityType:this.config.entityType,options:{limit:q,offset:V,sortFields:this.config.defaultSort,...J}}),Y?G.countEntities({entityType:this.config.entityType,options:J?.filter?{filter:J.filter}:void 0}):Promise.resolve(0)]),U=W.map((Q)=>this.transformEntity(Q)),M=Y?x9(H,X,q):null;return{items:U,pagination:M}}async resolveNavigation($,G,J){let X=this.config.navigationLimit??1000,q=await G.listEntities({entityType:this.config.entityType,options:{limit:X,sortFields:J??this.config.defaultSort}}),V=q.findIndex((M)=>M.id===$.id),Y=V>0?q[V-1]:void 0,W=V<q.length-1?q[V+1]:void 0,H=Y?this.transformEntity(Y):null,U=W?this.transformEntity(W):null;return{prev:H,next:U}}async lookupEntity($,G){if(this.config.lookupField==="id"){let q=await G.getEntity({entityType:this.config.entityType,id:$});if(!q)throw Error(`${this.config.entityType} not found: ${$}`);return q}let X=(await G.listEntities({entityType:this.config.entityType,options:{filter:{metadata:{slug:$}},limit:1}}))[0];if(!X)throw Error(`${this.config.entityType} not found with slug: ${$}`);return X}}export{r3 as baseQuerySchema,d3 as baseInputSchema,c3 as BaseEntityDataSource};
|
|
119
|
+
`;return""}var SQ=CQ,bQ={dump:SQ};function I9($,G){return function(){throw Error("Function yaml."+$+" is removed in js-yaml 4. Use yaml."+G+" instead, which is now safe by default.")}}var{load:xQ,loadAll:EP}=B3,vQ=bQ.dump;var CP=I9("safeLoad","load"),SP=I9("safeLoadAll","loadAll"),bP=I9("safeDump","dump");var I={};m9(I,{void:()=>AD,util:()=>a,unknown:()=>BD,union:()=>ZD,undefined:()=>KD,tuple:()=>LD,transformer:()=>gD,symbol:()=>DD,string:()=>h3,strictObject:()=>ND,setErrorMap:()=>yQ,set:()=>ED,record:()=>TD,quotelessJson:()=>gQ,promise:()=>kD,preprocess:()=>mD,pipeline:()=>fD,ostring:()=>uD,optional:()=>hD,onumber:()=>pD,oboolean:()=>lD,objectUtil:()=>E9,object:()=>jD,number:()=>y3,nullable:()=>yD,null:()=>FD,never:()=>OD,nativeEnum:()=>vD,nan:()=>MD,map:()=>ID,makeIssue:()=>_4,literal:()=>bD,lazy:()=>SD,late:()=>HD,isValid:()=>b0,isDirty:()=>h5,isAsync:()=>k2,isAborted:()=>g5,intersection:()=>PD,instanceof:()=>UD,getParsedType:()=>V0,getErrorMap:()=>v2,function:()=>CD,enum:()=>xD,effect:()=>gD,discriminatedUnion:()=>_D,defaultErrorMap:()=>B0,datetimeRegex:()=>v3,date:()=>QD,custom:()=>g3,coerce:()=>rD,boolean:()=>m3,bigint:()=>zD,array:()=>wD,any:()=>RD,addIssueToContext:()=>S,ZodVoid:()=>L4,ZodUnknown:()=>x0,ZodUnion:()=>u2,ZodUndefined:()=>m2,ZodType:()=>o,ZodTuple:()=>H0,ZodTransformer:()=>G0,ZodSymbol:()=>P4,ZodString:()=>s1,ZodSet:()=>V2,ZodSchema:()=>o,ZodRecord:()=>T4,ZodReadonly:()=>o2,ZodPromise:()=>W2,ZodPipeline:()=>C4,ZodParsedType:()=>E,ZodOptional:()=>e1,ZodObject:()=>Y1,ZodNumber:()=>v0,ZodNullable:()=>A0,ZodNull:()=>f2,ZodNever:()=>W0,ZodNativeEnum:()=>d2,ZodNaN:()=>E4,ZodMap:()=>I4,ZodLiteral:()=>r2,ZodLazy:()=>l2,ZodIssueCode:()=>T,ZodIntersection:()=>p2,ZodFunction:()=>h2,ZodFirstPartyTypeKind:()=>p,ZodError:()=>T1,ZodEnum:()=>g0,ZodEffects:()=>G0,ZodDiscriminatedUnion:()=>y5,ZodDefault:()=>c2,ZodDate:()=>q2,ZodCatch:()=>i2,ZodBranded:()=>m5,ZodBoolean:()=>y2,ZodBigInt:()=>k0,ZodArray:()=>t1,ZodAny:()=>Y2,Schema:()=>o,ParseStatus:()=>N1,OK:()=>I1,NEVER:()=>dD,INVALID:()=>u,EMPTY_PATH:()=>mQ,DIRTY:()=>X2,BRAND:()=>WD});var a;(function($){$.assertEqual=(q)=>{};function G(q){}$.assertIs=G;function J(q){throw Error()}$.assertNever=J,$.arrayToEnum=(q)=>{let V={};for(let Y of q)V[Y]=Y;return V},$.getValidEnumValues=(q)=>{let V=$.objectKeys(q).filter((W)=>typeof q[q[W]]!=="number"),Y={};for(let W of V)Y[W]=q[W];return $.objectValues(Y)},$.objectValues=(q)=>{return $.objectKeys(q).map(function(V){return q[V]})},$.objectKeys=typeof Object.keys==="function"?(q)=>Object.keys(q):(q)=>{let V=[];for(let Y in q)if(Object.prototype.hasOwnProperty.call(q,Y))V.push(Y);return V},$.find=(q,V)=>{for(let Y of q)if(V(Y))return Y;return},$.isInteger=typeof Number.isInteger==="function"?(q)=>Number.isInteger(q):(q)=>typeof q==="number"&&Number.isFinite(q)&&Math.floor(q)===q;function X(q,V=" | "){return q.map((Y)=>typeof Y==="string"?`'${Y}'`:Y).join(V)}$.joinValues=X,$.jsonStringifyReplacer=(q,V)=>{if(typeof V==="bigint")return V.toString();return V}})(a||(a={}));var E9;(function($){$.mergeShapes=(G,J)=>{return{...G,...J}}})(E9||(E9={}));var E=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),V0=($)=>{switch(typeof $){case"undefined":return E.undefined;case"string":return E.string;case"number":return Number.isNaN($)?E.nan:E.number;case"boolean":return E.boolean;case"function":return E.function;case"bigint":return E.bigint;case"symbol":return E.symbol;case"object":if(Array.isArray($))return E.array;if($===null)return E.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return E.promise;if(typeof Map<"u"&&$ instanceof Map)return E.map;if(typeof Set<"u"&&$ instanceof Set)return E.set;if(typeof Date<"u"&&$ instanceof Date)return E.date;return E.object;default:return E.unknown}};var T=a.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gQ=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class T1 extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(J)=>{this.issues=[...this.issues,J]},this.addIssues=(J=[])=>{this.issues=[...this.issues,...J]};let G=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,G);else this.__proto__=G;this.name="ZodError",this.issues=$}format($){let G=$||function(q){return q.message},J={_errors:[]},X=(q)=>{for(let V of q.issues)if(V.code==="invalid_union")V.unionErrors.map(X);else if(V.code==="invalid_return_type")X(V.returnTypeError);else if(V.code==="invalid_arguments")X(V.argumentsError);else if(V.path.length===0)J._errors.push(G(V));else{let Y=J,W=0;while(W<V.path.length){let H=V.path[W];if(W!==V.path.length-1)Y[H]=Y[H]||{_errors:[]};else Y[H]=Y[H]||{_errors:[]},Y[H]._errors.push(G(V));Y=Y[H],W++}}};return X(this),J}static assert($){if(!($ instanceof T1))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(G)=>G.message){let G={},J=[];for(let X of this.issues)if(X.path.length>0){let q=X.path[0];G[q]=G[q]||[],G[q].push($(X))}else J.push($(X));return{formErrors:J,fieldErrors:G}}get formErrors(){return this.flatten()}}T1.create=($)=>{return new T1($)};var hQ=($,G)=>{let J;switch($.code){case T.invalid_type:if($.received===E.undefined)J="Required";else J=`Expected ${$.expected}, received ${$.received}`;break;case T.invalid_literal:J=`Invalid literal value, expected ${JSON.stringify($.expected,a.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:J=`Unrecognized key(s) in object: ${a.joinValues($.keys,", ")}`;break;case T.invalid_union:J="Invalid input";break;case T.invalid_union_discriminator:J=`Invalid discriminator value. Expected ${a.joinValues($.options)}`;break;case T.invalid_enum_value:J=`Invalid enum value. Expected ${a.joinValues($.options)}, received '${$.received}'`;break;case T.invalid_arguments:J="Invalid function arguments";break;case T.invalid_return_type:J="Invalid function return type";break;case T.invalid_date:J="Invalid date";break;case T.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(J=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")J=`${J} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)J=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)J=`Invalid input: must end with "${$.validation.endsWith}"`;else a.assertNever($.validation);else if($.validation!=="regex")J=`Invalid ${$.validation}`;else J="Invalid";break;case T.too_small:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else J="Invalid input";break;case T.too_big:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")J=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else J="Invalid input";break;case T.custom:J="Invalid input";break;case T.invalid_intersection_types:J="Intersection results could not be merged";break;case T.not_multiple_of:J=`Number must be a multiple of ${$.multipleOf}`;break;case T.not_finite:J="Number must be finite";break;default:J=G.defaultError,a.assertNever($)}return{message:J}},B0=hQ;var E3=B0;function yQ($){E3=$}function v2(){return E3}var _4=($)=>{let{data:G,path:J,errorMaps:X,issueData:q}=$,V=[...J,...q.path||[]],Y={...q,path:V};if(q.message!==void 0)return{...q,path:V,message:q.message};let W="",H=X.filter((U)=>!!U).slice().reverse();for(let U of H)W=U(Y,{data:G,defaultError:W}).message;return{...q,path:V,message:W}},mQ=[];function S($,G){let J=v2(),X=_4({issueData:G,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,J,J===B0?void 0:B0].filter((q)=>!!q)});$.common.issues.push(X)}class N1{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,G){let J=[];for(let X of G){if(X.status==="aborted")return u;if(X.status==="dirty")$.dirty();J.push(X.value)}return{status:$.value,value:J}}static async mergeObjectAsync($,G){let J=[];for(let X of G){let q=await X.key,V=await X.value;J.push({key:q,value:V})}return N1.mergeObjectSync($,J)}static mergeObjectSync($,G){let J={};for(let X of G){let{key:q,value:V}=X;if(q.status==="aborted")return u;if(V.status==="aborted")return u;if(q.status==="dirty")$.dirty();if(V.status==="dirty")$.dirty();if(q.value!=="__proto__"&&(typeof V.value<"u"||X.alwaysSet))J[q.value]=V.value}return{status:$.value,value:J}}}var u=Object.freeze({status:"aborted"}),X2=($)=>({status:"dirty",value:$}),I1=($)=>({status:"valid",value:$}),g5=($)=>$.status==="aborted",h5=($)=>$.status==="dirty",b0=($)=>$.status==="valid",k2=($)=>typeof Promise<"u"&&$ instanceof Promise;var g;(function($){$.errToObj=(G)=>typeof G==="string"?{message:G}:G||{},$.toString=(G)=>typeof G==="string"?G:G?.message})(g||(g={}));class $0{constructor($,G,J,X){this._cachedPath=[],this.parent=$,this.data=G,this._path=J,this._key=X}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var C3=($,G)=>{if(b0(G))return{success:!0,data:G.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let J=new T1($.common.issues);return this._error=J,this._error}}}};function c($){if(!$)return{};let{errorMap:G,invalid_type_error:J,required_error:X,description:q}=$;if(G&&(J||X))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(G)return{errorMap:G,description:q};return{errorMap:(Y,W)=>{let{message:H}=$;if(Y.code==="invalid_enum_value")return{message:H??W.defaultError};if(typeof W.data>"u")return{message:H??X??W.defaultError};if(Y.code!=="invalid_type")return{message:W.defaultError};return{message:H??J??W.defaultError}},description:q}}class o{get description(){return this._def.description}_getType($){return V0($.data)}_getOrReturnCtx($,G){return G||{common:$.parent.common,data:$.data,parsedType:V0($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new N1,ctx:{common:$.parent.common,data:$.data,parsedType:V0($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let G=this._parse($);if(k2(G))throw Error("Synchronous parse encountered promise.");return G}_parseAsync($){let G=this._parse($);return Promise.resolve(G)}parse($,G){let J=this.safeParse($,G);if(J.success)return J.data;throw J.error}safeParse($,G){let J={common:{issues:[],async:G?.async??!1,contextualErrorMap:G?.errorMap},path:G?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:V0($)},X=this._parseSync({data:$,path:J.path,parent:J});return C3(J,X)}"~validate"($){let G={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:V0($)};if(!this["~standard"].async)try{let J=this._parseSync({data:$,path:[],parent:G});return b0(J)?{value:J.value}:{issues:G.common.issues}}catch(J){if(J?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;G.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:G}).then((J)=>b0(J)?{value:J.value}:{issues:G.common.issues})}async parseAsync($,G){let J=await this.safeParseAsync($,G);if(J.success)return J.data;throw J.error}async safeParseAsync($,G){let J={common:{issues:[],contextualErrorMap:G?.errorMap,async:!0},path:G?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:V0($)},X=this._parse({data:$,path:J.path,parent:J}),q=await(k2(X)?X:Promise.resolve(X));return C3(J,q)}refine($,G){let J=(X)=>{if(typeof G==="string"||typeof G>"u")return{message:G};else if(typeof G==="function")return G(X);else return G};return this._refinement((X,q)=>{let V=$(X),Y=()=>q.addIssue({code:T.custom,...J(X)});if(typeof Promise<"u"&&V instanceof Promise)return V.then((W)=>{if(!W)return Y(),!1;else return!0});if(!V)return Y(),!1;else return!0})}refinement($,G){return this._refinement((J,X)=>{if(!$(J))return X.addIssue(typeof G==="function"?G(J,X):G),!1;else return!0})}_refinement($){return new G0({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(G)=>this["~validate"](G)}}optional(){return e1.create(this,this._def)}nullable(){return A0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return t1.create(this)}promise(){return W2.create(this,this._def)}or($){return u2.create([this,$],this._def)}and($){return p2.create(this,$,this._def)}transform($){return new G0({...c(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:$}})}default($){let G=typeof $==="function"?$:()=>$;return new c2({...c(this._def),innerType:this,defaultValue:G,typeName:p.ZodDefault})}brand(){return new m5({typeName:p.ZodBranded,type:this,...c(this._def)})}catch($){let G=typeof $==="function"?$:()=>$;return new i2({...c(this._def),innerType:this,catchValue:G,typeName:p.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return C4.create(this,$)}readonly(){return o2.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var fQ=/^c[^\s-]{8,}$/i,uQ=/^[0-9a-z]+$/,pQ=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lQ=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,rQ=/^[a-z0-9_-]{21}$/i,dQ=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,cQ=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,iQ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",C9,nQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,aQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,sQ=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,tQ=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eQ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$D=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,b3="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",GD=new RegExp(`^${b3}$`);function x3($){let G="[0-5]\\d";if($.precision)G=`${G}\\.\\d{${$.precision}}`;else if($.precision==null)G=`${G}(\\.\\d+)?`;let J=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${G})${J}`}function JD($){return new RegExp(`^${x3($)}$`)}function v3($){let G=`${b3}T${x3($)}`,J=[];if(J.push($.local?"Z?":"Z"),$.offset)J.push("([+-]\\d{2}:?\\d{2})");return G=`${G}(${J.join("|")})`,new RegExp(`^${G}$`)}function XD($,G){if((G==="v4"||!G)&&nQ.test($))return!0;if((G==="v6"||!G)&&sQ.test($))return!0;return!1}function qD($,G){if(!dQ.test($))return!1;try{let[J]=$.split(".");if(!J)return!1;let X=J.replace(/-/g,"+").replace(/_/g,"/").padEnd(J.length+(4-J.length%4)%4,"="),q=JSON.parse(atob(X));if(typeof q!=="object"||q===null)return!1;if("typ"in q&&q?.typ!=="JWT")return!1;if(!q.alg)return!1;if(G&&q.alg!==G)return!1;return!0}catch{return!1}}function YD($,G){if((G==="v4"||!G)&&aQ.test($))return!0;if((G==="v6"||!G)&&tQ.test($))return!0;return!1}class s1 extends o{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==E.string){let q=this._getOrReturnCtx($);return S(q,{code:T.invalid_type,expected:E.string,received:q.parsedType}),u}let J=new N1,X=void 0;for(let q of this._def.checks)if(q.kind==="min"){if($.data.length<q.value)X=this._getOrReturnCtx($,X),S(X,{code:T.too_small,minimum:q.value,type:"string",inclusive:!0,exact:!1,message:q.message}),J.dirty()}else if(q.kind==="max"){if($.data.length>q.value)X=this._getOrReturnCtx($,X),S(X,{code:T.too_big,maximum:q.value,type:"string",inclusive:!0,exact:!1,message:q.message}),J.dirty()}else if(q.kind==="length"){let V=$.data.length>q.value,Y=$.data.length<q.value;if(V||Y){if(X=this._getOrReturnCtx($,X),V)S(X,{code:T.too_big,maximum:q.value,type:"string",inclusive:!0,exact:!0,message:q.message});else if(Y)S(X,{code:T.too_small,minimum:q.value,type:"string",inclusive:!0,exact:!0,message:q.message});J.dirty()}}else if(q.kind==="email"){if(!iQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"email",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="emoji"){if(!C9)C9=new RegExp(oQ,"u");if(!C9.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"emoji",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="uuid"){if(!lQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"uuid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="nanoid"){if(!rQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"nanoid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="cuid"){if(!fQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"cuid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="cuid2"){if(!uQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"cuid2",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="ulid"){if(!pQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"ulid",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="url")try{new URL($.data)}catch{X=this._getOrReturnCtx($,X),S(X,{validation:"url",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="regex"){if(q.regex.lastIndex=0,!q.regex.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"regex",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="trim")$.data=$.data.trim();else if(q.kind==="includes"){if(!$.data.includes(q.value,q.position))X=this._getOrReturnCtx($,X),S(X,{code:T.invalid_string,validation:{includes:q.value,position:q.position},message:q.message}),J.dirty()}else if(q.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(q.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(q.kind==="startsWith"){if(!$.data.startsWith(q.value))X=this._getOrReturnCtx($,X),S(X,{code:T.invalid_string,validation:{startsWith:q.value},message:q.message}),J.dirty()}else if(q.kind==="endsWith"){if(!$.data.endsWith(q.value))X=this._getOrReturnCtx($,X),S(X,{code:T.invalid_string,validation:{endsWith:q.value},message:q.message}),J.dirty()}else if(q.kind==="datetime"){if(!v3(q).test($.data))X=this._getOrReturnCtx($,X),S(X,{code:T.invalid_string,validation:"datetime",message:q.message}),J.dirty()}else if(q.kind==="date"){if(!GD.test($.data))X=this._getOrReturnCtx($,X),S(X,{code:T.invalid_string,validation:"date",message:q.message}),J.dirty()}else if(q.kind==="time"){if(!JD(q).test($.data))X=this._getOrReturnCtx($,X),S(X,{code:T.invalid_string,validation:"time",message:q.message}),J.dirty()}else if(q.kind==="duration"){if(!cQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"duration",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="ip"){if(!XD($.data,q.version))X=this._getOrReturnCtx($,X),S(X,{validation:"ip",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="jwt"){if(!qD($.data,q.alg))X=this._getOrReturnCtx($,X),S(X,{validation:"jwt",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="cidr"){if(!YD($.data,q.version))X=this._getOrReturnCtx($,X),S(X,{validation:"cidr",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="base64"){if(!eQ.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"base64",code:T.invalid_string,message:q.message}),J.dirty()}else if(q.kind==="base64url"){if(!$D.test($.data))X=this._getOrReturnCtx($,X),S(X,{validation:"base64url",code:T.invalid_string,message:q.message}),J.dirty()}else a.assertNever(q);return{status:J.value,value:$.data}}_regex($,G,J){return this.refinement((X)=>$.test(X),{validation:G,code:T.invalid_string,...g.errToObj(J)})}_addCheck($){return new s1({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...g.errToObj($)})}url($){return this._addCheck({kind:"url",...g.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...g.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...g.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...g.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...g.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...g.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...g.errToObj($)})}base64($){return this._addCheck({kind:"base64",...g.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...g.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...g.errToObj($)})}ip($){return this._addCheck({kind:"ip",...g.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...g.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...g.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...g.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...g.errToObj($)})}regex($,G){return this._addCheck({kind:"regex",regex:$,...g.errToObj(G)})}includes($,G){return this._addCheck({kind:"includes",value:$,position:G?.position,...g.errToObj(G?.message)})}startsWith($,G){return this._addCheck({kind:"startsWith",value:$,...g.errToObj(G)})}endsWith($,G){return this._addCheck({kind:"endsWith",value:$,...g.errToObj(G)})}min($,G){return this._addCheck({kind:"min",value:$,...g.errToObj(G)})}max($,G){return this._addCheck({kind:"max",value:$,...g.errToObj(G)})}length($,G){return this._addCheck({kind:"length",value:$,...g.errToObj(G)})}nonempty($){return this.min(1,g.errToObj($))}trim(){return new s1({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new s1({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new s1({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $}get maxLength(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $}}s1.create=($)=>{return new s1({checks:[],typeName:p.ZodString,coerce:$?.coerce??!1,...c($)})};function VD($,G){let J=($.toString().split(".")[1]||"").length,X=(G.toString().split(".")[1]||"").length,q=J>X?J:X,V=Number.parseInt($.toFixed(q).replace(".","")),Y=Number.parseInt(G.toFixed(q).replace(".",""));return V%Y/10**q}class v0 extends o{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==E.number){let q=this._getOrReturnCtx($);return S(q,{code:T.invalid_type,expected:E.number,received:q.parsedType}),u}let J=void 0,X=new N1;for(let q of this._def.checks)if(q.kind==="int"){if(!a.isInteger($.data))J=this._getOrReturnCtx($,J),S(J,{code:T.invalid_type,expected:"integer",received:"float",message:q.message}),X.dirty()}else if(q.kind==="min"){if(q.inclusive?$.data<q.value:$.data<=q.value)J=this._getOrReturnCtx($,J),S(J,{code:T.too_small,minimum:q.value,type:"number",inclusive:q.inclusive,exact:!1,message:q.message}),X.dirty()}else if(q.kind==="max"){if(q.inclusive?$.data>q.value:$.data>=q.value)J=this._getOrReturnCtx($,J),S(J,{code:T.too_big,maximum:q.value,type:"number",inclusive:q.inclusive,exact:!1,message:q.message}),X.dirty()}else if(q.kind==="multipleOf"){if(VD($.data,q.value)!==0)J=this._getOrReturnCtx($,J),S(J,{code:T.not_multiple_of,multipleOf:q.value,message:q.message}),X.dirty()}else if(q.kind==="finite"){if(!Number.isFinite($.data))J=this._getOrReturnCtx($,J),S(J,{code:T.not_finite,message:q.message}),X.dirty()}else a.assertNever(q);return{status:X.value,value:$.data}}gte($,G){return this.setLimit("min",$,!0,g.toString(G))}gt($,G){return this.setLimit("min",$,!1,g.toString(G))}lte($,G){return this.setLimit("max",$,!0,g.toString(G))}lt($,G){return this.setLimit("max",$,!1,g.toString(G))}setLimit($,G,J,X){return new v0({...this._def,checks:[...this._def.checks,{kind:$,value:G,inclusive:J,message:g.toString(X)}]})}_addCheck($){return new v0({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:g.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString($)})}multipleOf($,G){return this._addCheck({kind:"multipleOf",value:$,message:g.toString(G)})}finite($){return this._addCheck({kind:"finite",message:g.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.toString($)})}get minValue(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $}get maxValue(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&a.isInteger($.value))}get isFinite(){let $=null,G=null;for(let J of this._def.checks)if(J.kind==="finite"||J.kind==="int"||J.kind==="multipleOf")return!0;else if(J.kind==="min"){if(G===null||J.value>G)G=J.value}else if(J.kind==="max"){if($===null||J.value<$)$=J.value}return Number.isFinite(G)&&Number.isFinite($)}}v0.create=($)=>{return new v0({checks:[],typeName:p.ZodNumber,coerce:$?.coerce||!1,...c($)})};class k0 extends o{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==E.bigint)return this._getInvalidInput($);let J=void 0,X=new N1;for(let q of this._def.checks)if(q.kind==="min"){if(q.inclusive?$.data<q.value:$.data<=q.value)J=this._getOrReturnCtx($,J),S(J,{code:T.too_small,type:"bigint",minimum:q.value,inclusive:q.inclusive,message:q.message}),X.dirty()}else if(q.kind==="max"){if(q.inclusive?$.data>q.value:$.data>=q.value)J=this._getOrReturnCtx($,J),S(J,{code:T.too_big,type:"bigint",maximum:q.value,inclusive:q.inclusive,message:q.message}),X.dirty()}else if(q.kind==="multipleOf"){if($.data%q.value!==BigInt(0))J=this._getOrReturnCtx($,J),S(J,{code:T.not_multiple_of,multipleOf:q.value,message:q.message}),X.dirty()}else a.assertNever(q);return{status:X.value,value:$.data}}_getInvalidInput($){let G=this._getOrReturnCtx($);return S(G,{code:T.invalid_type,expected:E.bigint,received:G.parsedType}),u}gte($,G){return this.setLimit("min",$,!0,g.toString(G))}gt($,G){return this.setLimit("min",$,!1,g.toString(G))}lte($,G){return this.setLimit("max",$,!0,g.toString(G))}lt($,G){return this.setLimit("max",$,!1,g.toString(G))}setLimit($,G,J,X){return new k0({...this._def,checks:[...this._def.checks,{kind:$,value:G,inclusive:J,message:g.toString(X)}]})}_addCheck($){return new k0({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString($)})}multipleOf($,G){return this._addCheck({kind:"multipleOf",value:$,message:g.toString(G)})}get minValue(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $}get maxValue(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $}}k0.create=($)=>{return new k0({checks:[],typeName:p.ZodBigInt,coerce:$?.coerce??!1,...c($)})};class y2 extends o{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==E.boolean){let J=this._getOrReturnCtx($);return S(J,{code:T.invalid_type,expected:E.boolean,received:J.parsedType}),u}return I1($.data)}}y2.create=($)=>{return new y2({typeName:p.ZodBoolean,coerce:$?.coerce||!1,...c($)})};class q2 extends o{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==E.date){let q=this._getOrReturnCtx($);return S(q,{code:T.invalid_type,expected:E.date,received:q.parsedType}),u}if(Number.isNaN($.data.getTime())){let q=this._getOrReturnCtx($);return S(q,{code:T.invalid_date}),u}let J=new N1,X=void 0;for(let q of this._def.checks)if(q.kind==="min"){if($.data.getTime()<q.value)X=this._getOrReturnCtx($,X),S(X,{code:T.too_small,message:q.message,inclusive:!0,exact:!1,minimum:q.value,type:"date"}),J.dirty()}else if(q.kind==="max"){if($.data.getTime()>q.value)X=this._getOrReturnCtx($,X),S(X,{code:T.too_big,message:q.message,inclusive:!0,exact:!1,maximum:q.value,type:"date"}),J.dirty()}else a.assertNever(q);return{status:J.value,value:new Date($.data.getTime())}}_addCheck($){return new q2({...this._def,checks:[...this._def.checks,$]})}min($,G){return this._addCheck({kind:"min",value:$.getTime(),message:g.toString(G)})}max($,G){return this._addCheck({kind:"max",value:$.getTime(),message:g.toString(G)})}get minDate(){let $=null;for(let G of this._def.checks)if(G.kind==="min"){if($===null||G.value>$)$=G.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let G of this._def.checks)if(G.kind==="max"){if($===null||G.value<$)$=G.value}return $!=null?new Date($):null}}q2.create=($)=>{return new q2({checks:[],coerce:$?.coerce||!1,typeName:p.ZodDate,...c($)})};class P4 extends o{_parse($){if(this._getType($)!==E.symbol){let J=this._getOrReturnCtx($);return S(J,{code:T.invalid_type,expected:E.symbol,received:J.parsedType}),u}return I1($.data)}}P4.create=($)=>{return new P4({typeName:p.ZodSymbol,...c($)})};class m2 extends o{_parse($){if(this._getType($)!==E.undefined){let J=this._getOrReturnCtx($);return S(J,{code:T.invalid_type,expected:E.undefined,received:J.parsedType}),u}return I1($.data)}}m2.create=($)=>{return new m2({typeName:p.ZodUndefined,...c($)})};class f2 extends o{_parse($){if(this._getType($)!==E.null){let J=this._getOrReturnCtx($);return S(J,{code:T.invalid_type,expected:E.null,received:J.parsedType}),u}return I1($.data)}}f2.create=($)=>{return new f2({typeName:p.ZodNull,...c($)})};class Y2 extends o{constructor(){super(...arguments);this._any=!0}_parse($){return I1($.data)}}Y2.create=($)=>{return new Y2({typeName:p.ZodAny,...c($)})};class x0 extends o{constructor(){super(...arguments);this._unknown=!0}_parse($){return I1($.data)}}x0.create=($)=>{return new x0({typeName:p.ZodUnknown,...c($)})};class W0 extends o{_parse($){let G=this._getOrReturnCtx($);return S(G,{code:T.invalid_type,expected:E.never,received:G.parsedType}),u}}W0.create=($)=>{return new W0({typeName:p.ZodNever,...c($)})};class L4 extends o{_parse($){if(this._getType($)!==E.undefined){let J=this._getOrReturnCtx($);return S(J,{code:T.invalid_type,expected:E.void,received:J.parsedType}),u}return I1($.data)}}L4.create=($)=>{return new L4({typeName:p.ZodVoid,...c($)})};class t1 extends o{_parse($){let{ctx:G,status:J}=this._processInputParams($),X=this._def;if(G.parsedType!==E.array)return S(G,{code:T.invalid_type,expected:E.array,received:G.parsedType}),u;if(X.exactLength!==null){let V=G.data.length>X.exactLength.value,Y=G.data.length<X.exactLength.value;if(V||Y)S(G,{code:V?T.too_big:T.too_small,minimum:Y?X.exactLength.value:void 0,maximum:V?X.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:X.exactLength.message}),J.dirty()}if(X.minLength!==null){if(G.data.length<X.minLength.value)S(G,{code:T.too_small,minimum:X.minLength.value,type:"array",inclusive:!0,exact:!1,message:X.minLength.message}),J.dirty()}if(X.maxLength!==null){if(G.data.length>X.maxLength.value)S(G,{code:T.too_big,maximum:X.maxLength.value,type:"array",inclusive:!0,exact:!1,message:X.maxLength.message}),J.dirty()}if(G.common.async)return Promise.all([...G.data].map((V,Y)=>{return X.type._parseAsync(new $0(G,V,G.path,Y))})).then((V)=>{return N1.mergeArray(J,V)});let q=[...G.data].map((V,Y)=>{return X.type._parseSync(new $0(G,V,G.path,Y))});return N1.mergeArray(J,q)}get element(){return this._def.type}min($,G){return new t1({...this._def,minLength:{value:$,message:g.toString(G)}})}max($,G){return new t1({...this._def,maxLength:{value:$,message:g.toString(G)}})}length($,G){return new t1({...this._def,exactLength:{value:$,message:g.toString(G)}})}nonempty($){return this.min(1,$)}}t1.create=($,G)=>{return new t1({type:$,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...c(G)})};function g2($){if($ instanceof Y1){let G={};for(let J in $.shape){let X=$.shape[J];G[J]=e1.create(g2(X))}return new Y1({...$._def,shape:()=>G})}else if($ instanceof t1)return new t1({...$._def,type:g2($.element)});else if($ instanceof e1)return e1.create(g2($.unwrap()));else if($ instanceof A0)return A0.create(g2($.unwrap()));else if($ instanceof H0)return H0.create($.items.map((G)=>g2(G)));else return $}class Y1 extends o{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),G=a.objectKeys($);return this._cached={shape:$,keys:G},this._cached}_parse($){if(this._getType($)!==E.object){let H=this._getOrReturnCtx($);return S(H,{code:T.invalid_type,expected:E.object,received:H.parsedType}),u}let{status:J,ctx:X}=this._processInputParams($),{shape:q,keys:V}=this._getCached(),Y=[];if(!(this._def.catchall instanceof W0&&this._def.unknownKeys==="strip")){for(let H in X.data)if(!V.includes(H))Y.push(H)}let W=[];for(let H of V){let U=q[H],M=X.data[H];W.push({key:{status:"valid",value:H},value:U._parse(new $0(X,M,X.path,H)),alwaysSet:H in X.data})}if(this._def.catchall instanceof W0){let H=this._def.unknownKeys;if(H==="passthrough")for(let U of Y)W.push({key:{status:"valid",value:U},value:{status:"valid",value:X.data[U]}});else if(H==="strict"){if(Y.length>0)S(X,{code:T.unrecognized_keys,keys:Y}),J.dirty()}else if(H==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let H=this._def.catchall;for(let U of Y){let M=X.data[U];W.push({key:{status:"valid",value:U},value:H._parse(new $0(X,M,X.path,U)),alwaysSet:U in X.data})}}if(X.common.async)return Promise.resolve().then(async()=>{let H=[];for(let U of W){let M=await U.key,Q=await U.value;H.push({key:M,value:Q,alwaysSet:U.alwaysSet})}return H}).then((H)=>{return N1.mergeObjectSync(J,H)});else return N1.mergeObjectSync(J,W)}get shape(){return this._def.shape()}strict($){return g.errToObj,new Y1({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(G,J)=>{let X=this._def.errorMap?.(G,J).message??J.defaultError;if(G.code==="unrecognized_keys")return{message:g.errToObj($).message??X};return{message:X}}}:{}})}strip(){return new Y1({...this._def,unknownKeys:"strip"})}passthrough(){return new Y1({...this._def,unknownKeys:"passthrough"})}extend($){return new Y1({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new Y1({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:p.ZodObject})}setKey($,G){return this.augment({[$]:G})}catchall($){return new Y1({...this._def,catchall:$})}pick($){let G={};for(let J of a.objectKeys($))if($[J]&&this.shape[J])G[J]=this.shape[J];return new Y1({...this._def,shape:()=>G})}omit($){let G={};for(let J of a.objectKeys(this.shape))if(!$[J])G[J]=this.shape[J];return new Y1({...this._def,shape:()=>G})}deepPartial(){return g2(this)}partial($){let G={};for(let J of a.objectKeys(this.shape)){let X=this.shape[J];if($&&!$[J])G[J]=X;else G[J]=X.optional()}return new Y1({...this._def,shape:()=>G})}required($){let G={};for(let J of a.objectKeys(this.shape))if($&&!$[J])G[J]=this.shape[J];else{let q=this.shape[J];while(q instanceof e1)q=q._def.innerType;G[J]=q}return new Y1({...this._def,shape:()=>G})}keyof(){return k3(a.objectKeys(this.shape))}}Y1.create=($,G)=>{return new Y1({shape:()=>$,unknownKeys:"strip",catchall:W0.create(),typeName:p.ZodObject,...c(G)})};Y1.strictCreate=($,G)=>{return new Y1({shape:()=>$,unknownKeys:"strict",catchall:W0.create(),typeName:p.ZodObject,...c(G)})};Y1.lazycreate=($,G)=>{return new Y1({shape:$,unknownKeys:"strip",catchall:W0.create(),typeName:p.ZodObject,...c(G)})};class u2 extends o{_parse($){let{ctx:G}=this._processInputParams($),J=this._def.options;function X(q){for(let Y of q)if(Y.result.status==="valid")return Y.result;for(let Y of q)if(Y.result.status==="dirty")return G.common.issues.push(...Y.ctx.common.issues),Y.result;let V=q.map((Y)=>new T1(Y.ctx.common.issues));return S(G,{code:T.invalid_union,unionErrors:V}),u}if(G.common.async)return Promise.all(J.map(async(q)=>{let V={...G,common:{...G.common,issues:[]},parent:null};return{result:await q._parseAsync({data:G.data,path:G.path,parent:V}),ctx:V}})).then(X);else{let q=void 0,V=[];for(let W of J){let H={...G,common:{...G.common,issues:[]},parent:null},U=W._parseSync({data:G.data,path:G.path,parent:H});if(U.status==="valid")return U;else if(U.status==="dirty"&&!q)q={result:U,ctx:H};if(H.common.issues.length)V.push(H.common.issues)}if(q)return G.common.issues.push(...q.ctx.common.issues),q.result;let Y=V.map((W)=>new T1(W));return S(G,{code:T.invalid_union,unionErrors:Y}),u}}get options(){return this._def.options}}u2.create=($,G)=>{return new u2({options:$,typeName:p.ZodUnion,...c(G)})};var O0=($)=>{if($ instanceof l2)return O0($.schema);else if($ instanceof G0)return O0($.innerType());else if($ instanceof r2)return[$.value];else if($ instanceof g0)return $.options;else if($ instanceof d2)return a.objectValues($.enum);else if($ instanceof c2)return O0($._def.innerType);else if($ instanceof m2)return[void 0];else if($ instanceof f2)return[null];else if($ instanceof e1)return[void 0,...O0($.unwrap())];else if($ instanceof A0)return[null,...O0($.unwrap())];else if($ instanceof m5)return O0($.unwrap());else if($ instanceof o2)return O0($.unwrap());else if($ instanceof i2)return O0($._def.innerType);else return[]};class y5 extends o{_parse($){let{ctx:G}=this._processInputParams($);if(G.parsedType!==E.object)return S(G,{code:T.invalid_type,expected:E.object,received:G.parsedType}),u;let J=this.discriminator,X=G.data[J],q=this.optionsMap.get(X);if(!q)return S(G,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[J]}),u;if(G.common.async)return q._parseAsync({data:G.data,path:G.path,parent:G});else return q._parseSync({data:G.data,path:G.path,parent:G})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,G,J){let X=new Map;for(let q of G){let V=O0(q.shape[$]);if(!V.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let Y of V){if(X.has(Y))throw Error(`Discriminator property ${String($)} has duplicate value ${String(Y)}`);X.set(Y,q)}}return new y5({typeName:p.ZodDiscriminatedUnion,discriminator:$,options:G,optionsMap:X,...c(J)})}}function S9($,G){let J=V0($),X=V0(G);if($===G)return{valid:!0,data:$};else if(J===E.object&&X===E.object){let q=a.objectKeys(G),V=a.objectKeys($).filter((W)=>q.indexOf(W)!==-1),Y={...$,...G};for(let W of V){let H=S9($[W],G[W]);if(!H.valid)return{valid:!1};Y[W]=H.data}return{valid:!0,data:Y}}else if(J===E.array&&X===E.array){if($.length!==G.length)return{valid:!1};let q=[];for(let V=0;V<$.length;V++){let Y=$[V],W=G[V],H=S9(Y,W);if(!H.valid)return{valid:!1};q.push(H.data)}return{valid:!0,data:q}}else if(J===E.date&&X===E.date&&+$===+G)return{valid:!0,data:$};else return{valid:!1}}class p2 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($),X=(q,V)=>{if(g5(q)||g5(V))return u;let Y=S9(q.value,V.value);if(!Y.valid)return S(J,{code:T.invalid_intersection_types}),u;if(h5(q)||h5(V))G.dirty();return{status:G.value,value:Y.data}};if(J.common.async)return Promise.all([this._def.left._parseAsync({data:J.data,path:J.path,parent:J}),this._def.right._parseAsync({data:J.data,path:J.path,parent:J})]).then(([q,V])=>X(q,V));else return X(this._def.left._parseSync({data:J.data,path:J.path,parent:J}),this._def.right._parseSync({data:J.data,path:J.path,parent:J}))}}p2.create=($,G,J)=>{return new p2({left:$,right:G,typeName:p.ZodIntersection,...c(J)})};class H0 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==E.array)return S(J,{code:T.invalid_type,expected:E.array,received:J.parsedType}),u;if(J.data.length<this._def.items.length)return S(J,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),u;if(!this._def.rest&&J.data.length>this._def.items.length)S(J,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G.dirty();let q=[...J.data].map((V,Y)=>{let W=this._def.items[Y]||this._def.rest;if(!W)return null;return W._parse(new $0(J,V,J.path,Y))}).filter((V)=>!!V);if(J.common.async)return Promise.all(q).then((V)=>{return N1.mergeArray(G,V)});else return N1.mergeArray(G,q)}get items(){return this._def.items}rest($){return new H0({...this._def,rest:$})}}H0.create=($,G)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new H0({items:$,typeName:p.ZodTuple,rest:null,...c(G)})};class T4 extends o{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==E.object)return S(J,{code:T.invalid_type,expected:E.object,received:J.parsedType}),u;let X=[],q=this._def.keyType,V=this._def.valueType;for(let Y in J.data)X.push({key:q._parse(new $0(J,Y,J.path,Y)),value:V._parse(new $0(J,J.data[Y],J.path,Y)),alwaysSet:Y in J.data});if(J.common.async)return N1.mergeObjectAsync(G,X);else return N1.mergeObjectSync(G,X)}get element(){return this._def.valueType}static create($,G,J){if(G instanceof o)return new T4({keyType:$,valueType:G,typeName:p.ZodRecord,...c(J)});return new T4({keyType:s1.create(),valueType:$,typeName:p.ZodRecord,...c(G)})}}class I4 extends o{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==E.map)return S(J,{code:T.invalid_type,expected:E.map,received:J.parsedType}),u;let X=this._def.keyType,q=this._def.valueType,V=[...J.data.entries()].map(([Y,W],H)=>{return{key:X._parse(new $0(J,Y,J.path,[H,"key"])),value:q._parse(new $0(J,W,J.path,[H,"value"]))}});if(J.common.async){let Y=new Map;return Promise.resolve().then(async()=>{for(let W of V){let H=await W.key,U=await W.value;if(H.status==="aborted"||U.status==="aborted")return u;if(H.status==="dirty"||U.status==="dirty")G.dirty();Y.set(H.value,U.value)}return{status:G.value,value:Y}})}else{let Y=new Map;for(let W of V){let{key:H,value:U}=W;if(H.status==="aborted"||U.status==="aborted")return u;if(H.status==="dirty"||U.status==="dirty")G.dirty();Y.set(H.value,U.value)}return{status:G.value,value:Y}}}}I4.create=($,G,J)=>{return new I4({valueType:G,keyType:$,typeName:p.ZodMap,...c(J)})};class V2 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.parsedType!==E.set)return S(J,{code:T.invalid_type,expected:E.set,received:J.parsedType}),u;let X=this._def;if(X.minSize!==null){if(J.data.size<X.minSize.value)S(J,{code:T.too_small,minimum:X.minSize.value,type:"set",inclusive:!0,exact:!1,message:X.minSize.message}),G.dirty()}if(X.maxSize!==null){if(J.data.size>X.maxSize.value)S(J,{code:T.too_big,maximum:X.maxSize.value,type:"set",inclusive:!0,exact:!1,message:X.maxSize.message}),G.dirty()}let q=this._def.valueType;function V(W){let H=new Set;for(let U of W){if(U.status==="aborted")return u;if(U.status==="dirty")G.dirty();H.add(U.value)}return{status:G.value,value:H}}let Y=[...J.data.values()].map((W,H)=>q._parse(new $0(J,W,J.path,H)));if(J.common.async)return Promise.all(Y).then((W)=>V(W));else return V(Y)}min($,G){return new V2({...this._def,minSize:{value:$,message:g.toString(G)}})}max($,G){return new V2({...this._def,maxSize:{value:$,message:g.toString(G)}})}size($,G){return this.min($,G).max($,G)}nonempty($){return this.min(1,$)}}V2.create=($,G)=>{return new V2({valueType:$,minSize:null,maxSize:null,typeName:p.ZodSet,...c(G)})};class h2 extends o{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:G}=this._processInputParams($);if(G.parsedType!==E.function)return S(G,{code:T.invalid_type,expected:E.function,received:G.parsedType}),u;function J(Y,W){return _4({data:Y,path:G.path,errorMaps:[G.common.contextualErrorMap,G.schemaErrorMap,v2(),B0].filter((H)=>!!H),issueData:{code:T.invalid_arguments,argumentsError:W}})}function X(Y,W){return _4({data:Y,path:G.path,errorMaps:[G.common.contextualErrorMap,G.schemaErrorMap,v2(),B0].filter((H)=>!!H),issueData:{code:T.invalid_return_type,returnTypeError:W}})}let q={errorMap:G.common.contextualErrorMap},V=G.data;if(this._def.returns instanceof W2){let Y=this;return I1(async function(...W){let H=new T1([]),U=await Y._def.args.parseAsync(W,q).catch((F)=>{throw H.addIssue(J(W,F)),H}),M=await Reflect.apply(V,this,U);return await Y._def.returns._def.type.parseAsync(M,q).catch((F)=>{throw H.addIssue(X(M,F)),H})})}else{let Y=this;return I1(function(...W){let H=Y._def.args.safeParse(W,q);if(!H.success)throw new T1([J(W,H.error)]);let U=Reflect.apply(V,this,H.data),M=Y._def.returns.safeParse(U,q);if(!M.success)throw new T1([X(U,M.error)]);return M.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new h2({...this._def,args:H0.create($).rest(x0.create())})}returns($){return new h2({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,G,J){return new h2({args:$?$:H0.create([]).rest(x0.create()),returns:G||x0.create(),typeName:p.ZodFunction,...c(J)})}}class l2 extends o{get schema(){return this._def.getter()}_parse($){let{ctx:G}=this._processInputParams($);return this._def.getter()._parse({data:G.data,path:G.path,parent:G})}}l2.create=($,G)=>{return new l2({getter:$,typeName:p.ZodLazy,...c(G)})};class r2 extends o{_parse($){if($.data!==this._def.value){let G=this._getOrReturnCtx($);return S(G,{received:G.data,code:T.invalid_literal,expected:this._def.value}),u}return{status:"valid",value:$.data}}get value(){return this._def.value}}r2.create=($,G)=>{return new r2({value:$,typeName:p.ZodLiteral,...c(G)})};function k3($,G){return new g0({values:$,typeName:p.ZodEnum,...c(G)})}class g0 extends o{_parse($){if(typeof $.data!=="string"){let G=this._getOrReturnCtx($),J=this._def.values;return S(G,{expected:a.joinValues(J),received:G.parsedType,code:T.invalid_type}),u}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let G=this._getOrReturnCtx($),J=this._def.values;return S(G,{received:G.data,code:T.invalid_enum_value,options:J}),u}return I1($.data)}get options(){return this._def.values}get enum(){let $={};for(let G of this._def.values)$[G]=G;return $}get Values(){let $={};for(let G of this._def.values)$[G]=G;return $}get Enum(){let $={};for(let G of this._def.values)$[G]=G;return $}extract($,G=this._def){return g0.create($,{...this._def,...G})}exclude($,G=this._def){return g0.create(this.options.filter((J)=>!$.includes(J)),{...this._def,...G})}}g0.create=k3;class d2 extends o{_parse($){let G=a.getValidEnumValues(this._def.values),J=this._getOrReturnCtx($);if(J.parsedType!==E.string&&J.parsedType!==E.number){let X=a.objectValues(G);return S(J,{expected:a.joinValues(X),received:J.parsedType,code:T.invalid_type}),u}if(!this._cache)this._cache=new Set(a.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let X=a.objectValues(G);return S(J,{received:J.data,code:T.invalid_enum_value,options:X}),u}return I1($.data)}get enum(){return this._def.values}}d2.create=($,G)=>{return new d2({values:$,typeName:p.ZodNativeEnum,...c(G)})};class W2 extends o{unwrap(){return this._def.type}_parse($){let{ctx:G}=this._processInputParams($);if(G.parsedType!==E.promise&&G.common.async===!1)return S(G,{code:T.invalid_type,expected:E.promise,received:G.parsedType}),u;let J=G.parsedType===E.promise?G.data:Promise.resolve(G.data);return I1(J.then((X)=>{return this._def.type.parseAsync(X,{path:G.path,errorMap:G.common.contextualErrorMap})}))}}W2.create=($,G)=>{return new W2({type:$,typeName:p.ZodPromise,...c(G)})};class G0 extends o{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:G,ctx:J}=this._processInputParams($),X=this._def.effect||null,q={addIssue:(V)=>{if(S(J,V),V.fatal)G.abort();else G.dirty()},get path(){return J.path}};if(q.addIssue=q.addIssue.bind(q),X.type==="preprocess"){let V=X.transform(J.data,q);if(J.common.async)return Promise.resolve(V).then(async(Y)=>{if(G.value==="aborted")return u;let W=await this._def.schema._parseAsync({data:Y,path:J.path,parent:J});if(W.status==="aborted")return u;if(W.status==="dirty")return X2(W.value);if(G.value==="dirty")return X2(W.value);return W});else{if(G.value==="aborted")return u;let Y=this._def.schema._parseSync({data:V,path:J.path,parent:J});if(Y.status==="aborted")return u;if(Y.status==="dirty")return X2(Y.value);if(G.value==="dirty")return X2(Y.value);return Y}}if(X.type==="refinement"){let V=(Y)=>{let W=X.refinement(Y,q);if(J.common.async)return Promise.resolve(W);if(W instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return Y};if(J.common.async===!1){let Y=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(Y.status==="aborted")return u;if(Y.status==="dirty")G.dirty();return V(Y.value),{status:G.value,value:Y.value}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((Y)=>{if(Y.status==="aborted")return u;if(Y.status==="dirty")G.dirty();return V(Y.value).then(()=>{return{status:G.value,value:Y.value}})})}if(X.type==="transform")if(J.common.async===!1){let V=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(!b0(V))return u;let Y=X.transform(V.value,q);if(Y instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:G.value,value:Y}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((V)=>{if(!b0(V))return u;return Promise.resolve(X.transform(V.value,q)).then((Y)=>({status:G.value,value:Y}))});a.assertNever(X)}}G0.create=($,G,J)=>{return new G0({schema:$,typeName:p.ZodEffects,effect:G,...c(J)})};G0.createWithPreprocess=($,G,J)=>{return new G0({schema:G,effect:{type:"preprocess",transform:$},typeName:p.ZodEffects,...c(J)})};class e1 extends o{_parse($){if(this._getType($)===E.undefined)return I1(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}e1.create=($,G)=>{return new e1({innerType:$,typeName:p.ZodOptional,...c(G)})};class A0 extends o{_parse($){if(this._getType($)===E.null)return I1(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}A0.create=($,G)=>{return new A0({innerType:$,typeName:p.ZodNullable,...c(G)})};class c2 extends o{_parse($){let{ctx:G}=this._processInputParams($),J=G.data;if(G.parsedType===E.undefined)J=this._def.defaultValue();return this._def.innerType._parse({data:J,path:G.path,parent:G})}removeDefault(){return this._def.innerType}}c2.create=($,G)=>{return new c2({innerType:$,typeName:p.ZodDefault,defaultValue:typeof G.default==="function"?G.default:()=>G.default,...c(G)})};class i2 extends o{_parse($){let{ctx:G}=this._processInputParams($),J={...G,common:{...G.common,issues:[]}},X=this._def.innerType._parse({data:J.data,path:J.path,parent:{...J}});if(k2(X))return X.then((q)=>{return{status:"valid",value:q.status==="valid"?q.value:this._def.catchValue({get error(){return new T1(J.common.issues)},input:J.data})}});else return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new T1(J.common.issues)},input:J.data})}}removeCatch(){return this._def.innerType}}i2.create=($,G)=>{return new i2({innerType:$,typeName:p.ZodCatch,catchValue:typeof G.catch==="function"?G.catch:()=>G.catch,...c(G)})};class E4 extends o{_parse($){if(this._getType($)!==E.nan){let J=this._getOrReturnCtx($);return S(J,{code:T.invalid_type,expected:E.nan,received:J.parsedType}),u}return{status:"valid",value:$.data}}}E4.create=($)=>{return new E4({typeName:p.ZodNaN,...c($)})};var WD=Symbol("zod_brand");class m5 extends o{_parse($){let{ctx:G}=this._processInputParams($),J=G.data;return this._def.type._parse({data:J,path:G.path,parent:G})}unwrap(){return this._def.type}}class C4 extends o{_parse($){let{status:G,ctx:J}=this._processInputParams($);if(J.common.async)return(async()=>{let q=await this._def.in._parseAsync({data:J.data,path:J.path,parent:J});if(q.status==="aborted")return u;if(q.status==="dirty")return G.dirty(),X2(q.value);else return this._def.out._parseAsync({data:q.value,path:J.path,parent:J})})();else{let X=this._def.in._parseSync({data:J.data,path:J.path,parent:J});if(X.status==="aborted")return u;if(X.status==="dirty")return G.dirty(),{status:"dirty",value:X.value};else return this._def.out._parseSync({data:X.value,path:J.path,parent:J})}}static create($,G){return new C4({in:$,out:G,typeName:p.ZodPipeline})}}class o2 extends o{_parse($){let G=this._def.innerType._parse($),J=(X)=>{if(b0(X))X.value=Object.freeze(X.value);return X};return k2(G)?G.then((X)=>J(X)):J(G)}unwrap(){return this._def.innerType}}o2.create=($,G)=>{return new o2({innerType:$,typeName:p.ZodReadonly,...c(G)})};function S3($,G){let J=typeof $==="function"?$(G):typeof $==="string"?{message:$}:$;return typeof J==="string"?{message:J}:J}function g3($,G={},J){if($)return Y2.create().superRefine((X,q)=>{let V=$(X);if(V instanceof Promise)return V.then((Y)=>{if(!Y){let W=S3(G,X),H=W.fatal??J??!0;q.addIssue({code:"custom",...W,fatal:H})}});if(!V){let Y=S3(G,X),W=Y.fatal??J??!0;q.addIssue({code:"custom",...Y,fatal:W})}return});return Y2.create()}var HD={object:Y1.lazycreate},p;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(p||(p={}));var UD=($,G={message:`Input not instance of ${$.name}`})=>g3((J)=>J instanceof $,G),h3=s1.create,y3=v0.create,MD=E4.create,zD=k0.create,m3=y2.create,QD=q2.create,DD=P4.create,KD=m2.create,FD=f2.create,RD=Y2.create,BD=x0.create,OD=W0.create,AD=L4.create,wD=t1.create,jD=Y1.create,ND=Y1.strictCreate,ZD=u2.create,_D=y5.create,PD=p2.create,LD=H0.create,TD=T4.create,ID=I4.create,ED=V2.create,CD=h2.create,SD=l2.create,bD=r2.create,xD=g0.create,vD=d2.create,kD=W2.create,gD=G0.create,hD=e1.create,yD=A0.create,mD=G0.createWithPreprocess,fD=C4.create,uD=()=>h3().optional(),pD=()=>y3().optional(),lD=()=>m3().optional(),rD={string:($)=>s1.create({...$,coerce:!0}),number:($)=>v0.create({...$,coerce:!0}),boolean:($)=>y2.create({...$,coerce:!0}),bigint:($)=>k0.create({...$,coerce:!0}),date:($)=>q2.create({...$,coerce:!0})};var dD=u;var oD=I.enum(["public","shared","restricted"]),S4=I.union([oD,I.literal("private")]).optional().transform(($)=>{if($===void 0)return"public";if($==="private")return"restricted";return $});var b9=I.object({id:I.string(),entityType:I.string(),content:I.string(),created:I.string().datetime(),updated:I.string().datetime(),visibility:S4,metadata:I.record(I.string(),I.unknown()),contentHash:I.string()}),nD=I.object({mediaType:I.string(),url:I.string(),downloadUrl:I.string().optional(),previewUrl:I.string().optional(),filename:I.string().optional(),sizeBytes:I.number().optional(),source:I.object({entityType:I.string().optional(),entityId:I.string().optional(),attachmentType:I.string().optional()}).optional()});var PT=I.object({id:I.string().min(1,"Entity ID is required"),entityType:I.string().min(1,"Entity type is required"),contentHash:I.string().min(1,"Content hash is required"),operation:I.enum(["create","update"])});var CT=I.object({limit:I.number().int().positive().optional().default(20),offset:I.number().int().min(0).optional().default(0),types:I.array(I.string()).optional().default([]),excludeTypes:I.array(I.string()).optional().default([]),weight:I.record(I.string(),I.number()).optional(),visibilityScope:I.enum(["public","shared","restricted"]).optional(),includeUngenerated:I.boolean().optional().default(!1)});var sD=x4(j6(),1);var vT=I.object({visibility:S4});var GK=I.object({field:I.string(),direction:I.enum(["asc","desc"]),nullsFirst:I.boolean().optional()}),iT=I.object({limit:I.number().int().positive().optional(),offset:I.number().int().min(0).optional().default(0),sortFields:I.array(GK).optional(),filter:I.object({metadata:I.record(I.string(),I.unknown()).optional(),visibilityScope:I.enum(["public","shared","restricted"]).optional()}).optional(),publishedOnly:I.boolean().optional()});var DK=I.object({currentPage:I.number(),totalPages:I.number(),totalItems:I.number(),pageSize:I.number(),hasNextPage:I.boolean(),hasPrevPage:I.boolean()});function x9($,G,J){let X=Math.max(1,Math.ceil($/J));return{currentPage:G,totalPages:X,totalItems:$,pageSize:J,hasNextPage:G<X,hasPrevPage:G>1}}var r3=I.object({id:I.string().optional(),limit:I.number().optional(),page:I.number().optional(),pageSize:I.number().optional(),baseUrl:I.string().optional()}).passthrough(),d3=I.object({entityType:I.string().optional(),query:r3.optional()}).passthrough();class c3{logger;constructor($){this.logger=$}buildDetailResult($,G){throw Error(`${this.id}: buildDetailResult() not implemented. Override this method or override fetch() to handle detail views.`)}parseQuery($){let G=d3.parse($);return{entityType:G.entityType??this.config.entityType,query:G.query??{}}}async fetch($,G,J){let X=this.parseQuery($),q=J.entityService;if(X.query.id){let Y=await this.fetchDetail(X.query.id,q);return G.parse(this.buildDetailResult(Y.item,Y.navigation))}let V=await this.fetchList(X.query,q);return G.parse(this.buildListResult(V.items,V.pagination,X.query))}async fetchDetail($,G){let J=await this.lookupEntity($,G),X=this.transformEntity(J),q=null;if(this.config.enableNavigation)q=await this.resolveNavigation(J,G);return{item:X,navigation:q}}async fetchList($,G,J){let X=$.page??1,q=$.pageSize??$.limit??this.config.defaultLimit??100,V=(X-1)*q,Y=$.page!==void 0,[W,H]=await Promise.all([G.listEntities({entityType:this.config.entityType,options:{limit:q,offset:V,sortFields:this.config.defaultSort,...J}}),Y?G.countEntities({entityType:this.config.entityType,options:J?.filter?{filter:J.filter}:void 0}):Promise.resolve(0)]),U=W.map((Q)=>this.transformEntity(Q)),M=Y?x9(H,X,q):null;return{items:U,pagination:M}}async resolveNavigation($,G,J){let X=this.config.navigationLimit??1000,q=await G.listEntities({entityType:this.config.entityType,options:{limit:X,sortFields:J??this.config.defaultSort}}),V=q.findIndex((M)=>M.id===$.id),Y=V>0?q[V-1]:void 0,W=V<q.length-1?q[V+1]:void 0,H=Y?this.transformEntity(Y):null,U=W?this.transformEntity(W):null;return{prev:H,next:U}}async lookupEntity($,G){if(this.config.lookupField==="id"){let q=await G.getEntity({entityType:this.config.entityType,id:$});if(!q)throw Error(`${this.config.entityType} not found: ${$}`);return q}let X=(await G.listEntities({entityType:this.config.entityType,options:{filter:{metadata:{slug:$}},limit:1}}))[0];if(!X)throw Error(`${this.config.entityType} not found with slug: ${$}`);return X}}export{r3 as baseQuerySchema,d3 as baseInputSchema,c3 as BaseEntityDataSource};
|
|
120
120
|
|
|
121
|
-
//# debugId=
|
|
121
|
+
//# debugId=50FE41FC703F497064756E2164756E21
|
|
122
122
|
//# sourceMappingURL=services.js.map
|