@topwrite/cli 1.0.71-alpha.9 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/ttx.js +3 -3
  2. package/package.json +4 -4
package/bin/ttx.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #! /usr/bin/env node
2
- "use strict";var e=require("commander"),t=require("tmp"),r=require("path"),n=require("consola"),i=require("lodash"),o=require("process"),a=require("url"),s=require("assert"),c=require("http"),u=require("https"),l=require("stream"),f=require("zlib"),h=require("cross-spawn"),p=require("fs"),d=require("vm2"),m=require("js-yaml"),g=require("canvas"),v=require("fs-extra"),y=require("pinyin-pro"),b=require("fstream-ignore"),w=require("archiver"),x=require("tar-pack"),k=require("ejs"),E=require("lookpath"),S=require("jsdom"),P=require("mime-types"),_=require("os"),A=require("constants"),C=require("util"),F=require("events"),D=require("crypto");function O(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function R(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var T=O(t),j=O(r),I=O(n),L=O(i),q=O(o),z=O(a),M=O(s),B=O(c),N=O(u),$=O(l),U=O(f),V=O(h),H=R(p),Q=O(p),G=O(m),W=O(v),K=O(b),J=O(w),Y=O(k),X=O(S),Z=O(P),ee=O(_),te=O(A),re=O(C),ne=O(F),ie=O(D);const oe=I.default.create({});var ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function se(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var ce={},ue={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(a+"|"+t(l,s,"[\\:]"))+"*");var f=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),h=r(f+"\\."+f+"\\."+f+"\\."+f),p=r(o+"{1,4}"),d=r(r(p+"\\:"+p)+"|"+h),m=r(r(p+"\\:")+"{6}"+d),g=r("\\:\\:"+r(p+"\\:")+"{5}"+d),v=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+d),y=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+d),b=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+d),w=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+d),x=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+d),k=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),E=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),S=r([m,g,v,y,b,w,x,k,E].join("|")),P=r(r(l+"|"+a)+"+");r("[vV]"+o+"+\\."+t(l,s,"[\\:]")+"+"),r(r(a+"|"+t(l,s))+"*");var _=r(a+"|"+t(l,s,"[\\:\\@]"));return r(r(a+"|"+t(l,s,"[\\@]"))+"+"),r(r(_+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},h=2147483647,p=36,d=1,m=26,g=38,v=700,y=72,b=128,w="-",x=/^xn--/,k=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=p-d,_=Math.floor,A=String.fromCharCode;function C(e){throw new RangeError(S[e])}function F(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function D(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+F((e=e.replace(E,".")).split("."),t).join(".")}function O(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var R=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},T=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},j=function(e,t,r){var n=0;for(e=r?_(e/v):e>>1,e+=_(e/t);e>P*m>>1;n+=p)e=_(e/P);return _(n+(P+1)*e/(e+g))},I=function(e){var t=[],r=e.length,n=0,i=b,o=y,a=e.lastIndexOf(w);a<0&&(a=0);for(var s=0;s<a;++s)e.charCodeAt(s)>=128&&C("not-basic"),t.push(e.charCodeAt(s));for(var c=a>0?a+1:0;c<r;){for(var u=n,l=1,f=p;;f+=p){c>=r&&C("invalid-input");var g=R(e.charCodeAt(c++));(g>=p||g>_((h-n)/l))&&C("overflow"),n+=g*l;var v=f<=o?d:f>=o+m?m:f-o;if(g<v)break;var x=p-v;l>_(h/x)&&C("overflow"),l*=x}var k=t.length+1;o=j(n-u,k,0==u),_(n/k)>h-i&&C("overflow"),i+=_(n/k),n%=k,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},L=function(e){var t=[],r=(e=O(e)).length,n=b,i=0,o=y,a=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(a=(u=l.next()).done);a=!0){var f=u.value;f<128&&t.push(A(f))}}catch(e){s=!0,c=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,v=g;for(g&&t.push(w);v<r;){var x=h,k=!0,E=!1,S=void 0;try{for(var P,F=e[Symbol.iterator]();!(k=(P=F.next()).done);k=!0){var D=P.value;D>=n&&D<x&&(x=D)}}catch(e){E=!0,S=e}finally{try{!k&&F.return&&F.return()}finally{if(E)throw S}}var R=v+1;x-n>_((h-i)/R)&&C("overflow"),i+=(x-n)*R,n=x;var I=!0,L=!1,q=void 0;try{for(var z,M=e[Symbol.iterator]();!(I=(z=M.next()).done);I=!0){var B=z.value;if(B<n&&++i>h&&C("overflow"),B==n){for(var N=i,$=p;;$+=p){var U=$<=o?d:$>=o+m?m:$-o;if(N<U)break;var V=N-U,H=p-U;t.push(A(T(U+V%H,0))),N=_(V/H)}t.push(A(T(N,0))),o=j(i,R,v==g),i=0,++v}}}catch(e){L=!0,q=e}finally{try{!I&&M.return&&M.return()}finally{if(L)throw q}}++i,++n}return t.join("")},q=function(e){return D(e,(function(e){return x.test(e)?I(e.slice(4).toLowerCase()):e}))},z=function(e){return D(e,(function(e){return k.test(e)?"xn--"+L(e):e}))},M={version:"2.1.0",ucs2:{decode:O,encode:function(e){return String.fromCodePoint.apply(String,f(e))}},decode:I,encode:L,toASCII:z,toUnicode:q},B={};function N(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function $(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function U(e,t){function r(e){var r=$(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,N).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,N).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,N).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,N).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,N).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(V).join("."):e}function Q(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),i=n[1],o=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=l(a,2),c=s[0],u=s[1],f=u?u.split(":").map(V):[],h=c.split(":").map(V),p=t.IPV4ADDRESS.test(h[h.length-1]),d=p?7:8,m=h.length-d,g=Array(d),v=0;v<d;++v)g[v]=f[v]||h[m+v]||"";p&&(g[d-1]=H(g[d-1],t));var y=g.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],w=void 0;if(b&&b.length>1){var x=g.slice(0,b.index),k=g.slice(b.index+b.length);w=x.join(":")+"::"+k.join(":")}else w=g.join(":");return o&&(w+="%"+o),w}return e}var G=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,W=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(G);if(i){W?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=Q(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=B[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)U(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=M.toASCII(r.host.replace(n.PCT_ENCODED,$).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}U(r,c)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Q(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,X=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(X))e=e.replace(X,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],i=B[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?M.toUnicode(e.host):M.toASCII(e.host.replace(r.PCT_ENCODED,$).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}U(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=J(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=te(a)),void 0===o&&(a=a.replace(/^\/\//,"/%2F")),n.push(a)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=K(re(e,r),r),t=K(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=a({scheme:"null"},r);return re(ne(K(e,n),K(t,n),n,!0),n)}function oe(e,t){return"string"==typeof e?e=re(K(e,t),t):"object"===n(e)&&(e=K(re(e,t),t)),e}function ae(e,t,r){return"string"==typeof e?e=re(K(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(K(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,N)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,$)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function fe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=fe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(fe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},pe={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},de={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ve=r(r("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+r("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+r("%"+ge+ge)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(me,"g"),ke=new RegExp(ve,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),Se=new RegExp(t("[^]",me,we),"g"),Pe=Se;function _e(e){var t=$(e);return t.match(xe)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),s=0,c=a.length;s<c;++s){var u=a[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),f=0,h=l.length;f<h;++f)n.push(l[f]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:i=!0,o[ce(u[0],t)]=ce(u[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var p=0,d=n.length;p<d;++p){var m=n[p].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=M.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=m.join("@")}return r},serialize:function(e,t){var r=e,n=o(e.to);if(n){for(var a=0,s=n.length;a<s;++a){var c=String(n[a]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(ke,_e).replace(ke,i).replace(Ee,N),f=c.slice(u+1);try{f=t.iri?M.toUnicode(f):M.toASCII(ce(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var d in h)h[d]!==de[d]&&p.push(d.replace(ke,_e).replace(ke,i).replace(Se,N)+"="+h[d].replace(ke,_e).replace(ke,i).replace(Pe,N));return p.length&&(r.query=p.join("&")),r}},Ce=/^([^\:]+)\:(.*)/,Fe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Ce),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],s=i+":"+(t.nid||o),c=B[s];n.nid=o,n.nss=a,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=B[i];o&&(e=o.serialize(e,t));var a=e,s=e.nss;return a.path=(n||t.nid)+":"+s,a}},De=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Oe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(De)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};B[ue.scheme]=ue,B[le.scheme]=le,B[he.scheme]=he,B[pe.scheme]=pe,B[Ae.scheme]=Ae,B[Fe.scheme]=Fe,B[Oe.scheme]=Oe,e.SCHEMES=B,e.pctEncChar=N,e.pctDecChars=$,e.parse=K,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=oe,e.equal=ae,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(ue.exports);var le=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r},fe={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:he,checkDataTypes:function(e,t,r){if(1===e.length)return he(e[0],t,r,!0);var n="",i=de(e);for(var o in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+he(o,t,r,!0);return n},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++){var i=t[n];(pe[i]||"array"===e&&"array"===i)&&(r[r.length]=i)}if(r.length)return r}else{if(pe[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:de,getProperty:ve,escapeQuotes:ye,equal:le,ucs2length:function(e){for(var t,r=0,n=e.length,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return r},varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var n in e)if(n!=r&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var r in e)if(!t[r])return r},toQuotedString:be,getPathExpr:function(e,t,r,n){var i=r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return ke(e,i)},getPath:function(e,t,r){var n=be(r?"/"+Ee(t):ve(t));return ke(e,n)},getData:function(e,t,r){var n,i,o,a;if(""===e)return"rootData";if("/"==e[0]){if(!we.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,o="rootData"}else{if(!(a=e.match(xe)))throw new Error("Invalid JSON-pointer: "+e);if(n=+a[1],"#"==(i=a[2])){if(n>=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(o="data"+(t-n||""),!i)return o}for(var s=o,c=i.split("/"),u=0;u<c.length;u++){var l=c[u];l&&(s+=" && "+(o+=ve(Se(l))))}return s},unescapeFragment:function(e){return Se(decodeURIComponent(e))},unescapeJsonPointer:Se,escapeFragment:function(e){return encodeURIComponent(Ee(e))},escapeJsonPointer:Ee};function he(e,t,r,n){var i=n?" !== ":" === ",o=n?" || ":" && ",a=n?"!":"",s=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+o+"typeof "+t+i+'"object"'+o+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+s+"("+t+" % 1)"+o+t+i+t+(r?o+a+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?o+a+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}var pe=de(["string","number","integer","boolean","null"]);function de(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var me=/^[a-z$_][a-z$_0-9]*$/i,ge=/'|\\/g;function ve(e){return"number"==typeof e?"["+e+"]":me.test(e)?"."+e:"['"+ye(e)+"']"}function ye(e){return e.replace(ge,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function be(e){return"'"+ye(e)+"'"}var we=/^\/(?:[^~]|~0|~1)*$/,xe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ke(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function Ee(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Se(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var Pe=fe,_e=function(e){Pe.copy(e,this)};var Ae={exports:{}},Ce=Ae.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),Fe(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function Fe(e,t,r,n,i,o,a,s,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,i,o,a,s,c,u),n){var f=n[l];if(Array.isArray(f)){if(l in Ce.arrayKeywords)for(var h=0;h<f.length;h++)Fe(e,t,r,f[h],i+"/"+l+"/"+h,o,i,l,n,h)}else if(l in Ce.propsKeywords){if(f&&"object"==typeof f)for(var p in f)Fe(e,t,r,f[p],i+"/"+l+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),o,i,l,n,p)}else(l in Ce.keywords||e.allKeys&&!(l in Ce.skipKeywords))&&Fe(e,t,r,f,i+"/"+l,o,i,l,n)}r(n,i,o,a,s,c,u)}}Ce.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},Ce.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Ce.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Ce.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var De=ue.exports,Oe=le,Re=fe,Te=_e,je=Ae.exports,Ie=Le;function Le(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return Le.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof Te)return $e(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,o,a,s=qe.call(this,t,r);return s&&(i=s.schema,t=s.root,a=s.baseId),i instanceof Te?o=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(o=$e(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),o}function qe(e,t){var r=De.parse(t),n=Qe(r),i=He(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==i){var o=We(n),a=this._refs[o];if("string"==typeof a)return ze.call(this,e,a,r);if(a instanceof Te)a.validate||this._compile(a),e=a;else{if(!((a=this._schemas[o])instanceof Te))return;if(a.validate||this._compile(a),o==We(t))return{schema:a,root:e,baseId:i};e=a}if(!e.schema)return;i=He(this._getId(e.schema))}return Be.call(this,r,i,e.schema,e)}function ze(e,t,r){var n=qe.call(this,e,t);if(n){var i=n.schema,o=n.baseId;e=n.root;var a=this._getId(i);return a&&(o=Ke(o,a)),Be.call(this,r,o,i,e)}}Le.normalizeId=We,Le.fullPath=He,Le.url=Ke,Le.ids=function(e){var t=We(this._getId(e)),r={"":t},n={"":He(t,!1)},i={},o=this;return je(e,{allKeys:!0},(function(e,t,a,s,c,u,l){if(""!==t){var f=o._getId(e),h=r[s],p=n[s]+"/"+c;if(void 0!==l&&(p+="/"+("number"==typeof l?l:Re.escapeFragment(l))),"string"==typeof f){f=h=We(h?De.resolve(h,f):f);var d=o._refs[f];if("string"==typeof d&&(d=o._refs[d]),d&&d.schema){if(!Oe(e,d.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=We(p))if("#"==f[0]){if(i[f]&&!Oe(e,i[f]))throw new Error('id "'+f+'" resolves to more than one schema');i[f]=e}else o._refs[f]=p}r[t]=h,n[t]=p}})),i},Le.inlineRef=$e,Le.schema=qe;var Me=Re.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Be(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;o<i.length;o++){var a=i[o];if(a){if(void 0===(r=r[a=Re.unescapeFragment(a)]))break;var s;if(!Me[a]&&((s=this._getId(r))&&(t=Ke(t,s)),r.$ref)){var c=Ke(t,r.$ref),u=qe.call(this,n,c);u&&(r=u.schema,n=u.root,t=u.baseId)}}}return void 0!==r&&r!==n.schema?{schema:r,root:n,baseId:t}:void 0}}var Ne=Re.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function $e(e,t){return!1!==t&&(void 0===t||!0===t?Ue(e):t?Ve(e)<=t:void 0)}function Ue(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!Ue(t))return!1}else for(var n in e){if("$ref"==n)return!1;if("object"==typeof(t=e[n])&&!Ue(t))return!1}return!0}function Ve(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(t=e[n])&&(r+=Ve(t)),r==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(Ne[i])r++;else if("object"==typeof(t=e[i])&&(r+=Ve(t)+1),r==1/0)return 1/0}return r}function He(e,t){return!1!==t&&(e=We(e)),Qe(De.parse(e))}function Qe(e){return De.serialize(e).split("#")[0]+"#"}var Ge=/#\/?$/;function We(e){return e?e.replace(Ge,""):""}function Ke(e,t){return t=We(t),De.resolve(e,t)}var Je=Ie,Ye={Validation:Ze((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:Ze(Xe)};function Xe(e,t,r){this.message=r||Xe.message(e,t),this.missingRef=Je.url(e,t),this.missingSchema=Je.normalizeId(Je.fullPath(this.missingRef))}function Ze(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Xe.message=function(e,t){return"can't resolve reference "+t+" from id "+e};var et=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]},o={key:n,value:t[n]};return e(i,o)}}}(t.cmp),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var o,a;if(Array.isArray(t)){for(a="[",o=0;o<t.length;o++)o&&(a+=","),a+=e(t[o])||"null";return a+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,c=Object.keys(t).sort(n&&n(t));for(a="",o=0;o<c.length;o++){var u=c[o],l=e(t[u]);l&&(a&&(a+=","),a+=JSON.stringify(u)+":"+l)}return i.splice(s,1),"{"+a+"}"}}(e)},tt=function(e,t,r){var n="",i=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),a=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var c="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(c);e.logger.warn(c)}}if(e.isTop&&(n+=" var validate = ",i&&(e.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(e.opts.sourceCode||e.opts.processCode)&&(n+=" /*# sourceURL="+a+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){t="false schema";var u=e.level,l=e.dataLevel,f=e.schema[t],h=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,m="data"+(l||""),g="valid"+u;if(!1===e.schema){e.isTop?d=!0:n+=" var "+g+" = false; ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'boolean schema is false' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n+=i?" return data; ":" validate.errors = null; return true; ":n+=" var "+g+" = true; ";return e.isTop&&(n+=" }; return validate; "),n}if(e.isTop){var y=e.isTop;u=e.level=0,l=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}n+=" var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data; "}else{u=e.level,m="data"+((l=e.dataLevel)||"");if(a&&(e.baseId=e.resolve.url(e.baseId,a)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+u+" = errors;"}g="valid"+u,d=!e.opts.allErrors;var w="",x="",k=e.schema.type,E=Array.isArray(k);if(k&&e.opts.nullable&&!0===e.schema.nullable&&(E?-1==k.indexOf("null")&&(k=k.concat("null")):"null"!=k&&(k=[k,"null"],E=!0)),E&&1==k.length&&(k=k[0],E=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(n+=" "+e.RULES.all.$comment.code(e,"$comment")),k){if(e.opts.coerceTypes)var S=e.util.coerceToTypes(e.opts.coerceTypes,k);var P=e.RULES.types[k];if(S||E||!0===P||P&&!Y(P)){h=e.schemaPath+".type",p=e.errSchemaPath+"/type",h=e.schemaPath+".type",p=e.errSchemaPath+"/type";var _=E?"checkDataTypes":"checkDataType";if(n+=" if ("+e.util[_](k,m,e.opts.strictNumbers,!0)+") { ",S){var A="dataType"+u,C="coerced"+u;n+=" var "+A+" = typeof "+m+"; var "+C+" = undefined; ","array"==e.opts.coerceTypes&&(n+=" if ("+A+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+A+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+C+" = "+m+"; } "),n+=" if ("+C+" !== undefined) ; ";var F=S;if(F)for(var D,O=-1,R=F.length-1;O<R;)"string"==(D=F[O+=1])?n+=" else if ("+A+" == 'number' || "+A+" == 'boolean') "+C+" = '' + "+m+"; else if ("+m+" === null) "+C+" = ''; ":"number"==D||"integer"==D?(n+=" else if ("+A+" == 'boolean' || "+m+" === null || ("+A+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==D&&(n+=" && !("+m+" % 1)"),n+=")) "+C+" = +"+m+"; "):"boolean"==D?n+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+C+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+C+" = true; ":"null"==D?n+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+C+" = null; ":"array"==e.opts.coerceTypes&&"array"==D&&(n+=" else if ("+A+" == 'string' || "+A+" == 'number' || "+A+" == 'boolean' || "+m+" == null) "+C+" = ["+m+"]; ");n+=" else { ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } if ("+C+" !== undefined) { ";var T=l?"data"+(l-1||""):"parentData";n+=" "+m+" = "+C+"; ",l||(n+="if ("+T+" !== undefined)"),n+=" "+T+"["+(l?e.dataPathArr[l]:"parentDataProperty")+"] = "+C+"; } "}else{(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } "}}if(e.schema.$ref&&!o)n+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(n+=" } if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}");else{var j=e.RULES;if(j)for(var I=-1,L=j.length-1;I<L;)if(Y(P=j[I+=1])){if(P.type&&(n+=" if ("+e.util.checkDataType(P.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==P.type&&e.schema.properties){f=e.schema.properties;var q=Object.keys(f);if(q)for(var z,M=-1,B=q.length-1;M<B;){if(void 0!==(U=f[z=q[M+=1]]).default){var N=m+e.util.getProperty(z);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+N;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+N+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+N+" === null || "+N+" === '' "),n+=" ) "+N+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}else if("array"==P.type&&Array.isArray(e.schema.items)){var $=e.schema.items;if($){O=-1;for(var U,V=$.length-1;O<V;)if(void 0!==(U=$[O+=1]).default){N=m+"["+O+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+N;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+N+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+N+" === null || "+N+" === '' "),n+=" ) "+N+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}var H=P.rules;if(H)for(var Q,G=-1,W=H.length-1;G<W;)if(X(Q=H[G+=1])){var K=Q.code(e,Q.keyword,P.type);K&&(n+=" "+K+" ",d&&(w+="}"))}if(d&&(n+=" "+w+" ",w=""),P.type&&(n+=" } ",k&&k===P.type&&!S)){n+=" else { ";var J;h=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}d&&(n+=" if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}")}}function Y(e){for(var t=e.rules,r=0;r<t.length;r++)if(X(t[r]))return!0}function X(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,n=0;n<r.length;n++)if(void 0!==e.schema[r[n]])return!0}(t)}return d&&(n+=" "+x+" "),y?(i?(n+=" if (errors === 0) return data; ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0; "),n+=" }; return validate;"):n+=" var "+g+" = errors === errs_"+u+";",n},rt=Ie,nt=fe,it=Ye,ot=et,at=tt,st=nt.ucs2length,ct=le,ut=it.Validation,lt=function e(t,r,n,i){var o=this,a=this._opts,s=[void 0],c={},u=[],l={},f=[],h={},p=[];r=r||{schema:t,refVal:s,refs:c};var d=ft.call(this,t,r,i),m=this._compilations[d.index];if(d.compiling)return m.callValidate=function e(){var t=m.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var g=this._formats,v=this.RULES;try{var y=w(t,r,n,i);m.validate=y;var b=m.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,a.sourceCode&&(b.source=y.source)),y}finally{ht.call(this,t,r,i)}function w(t,n,i,l){var h=!n||n&&n.schema==t;if(n.schema!=r.schema)return e.call(o,t,n,i,l);var d,m=!0===t.$async,y=at({isTop:!0,schema:t,isRoot:h,baseId:l,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:it.MissingRef,RULES:v,validate:at,util:nt,resolve:rt,resolveRef:x,usePattern:S,useDefault:P,useCustomRule:_,opts:a,formats:g,logger:o.logger,self:o});y=yt(s,gt)+yt(u,dt)+yt(f,mt)+yt(p,vt)+y,a.processCode&&(y=a.processCode(y,t));try{d=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(o,v,g,r,s,f,p,ct,st,ut),s[0]=d}catch(e){throw o.logger.error("Error compiling schema, function code:",y),e}return d.schema=t,d.errors=null,d.refs=c,d.refVal=s,d.root=h?d:n,m&&(d.$async=!0),!0===a.sourceCode&&(d.source={code:y,patterns:u,defaults:f}),d}function x(t,i,u){i=rt.url(t,i);var l,f,h=c[i];if(void 0!==h)return E(l=s[h],f="refVal["+h+"]");if(!u&&r.refs){var p=r.refs[i];if(void 0!==p)return E(l=r.refVal[p],f=k(i,l))}f=k(i);var d=rt.call(o,w,r,i);if(void 0===d){var m=n&&n[i];m&&(d=rt.inlineRef(m,a.inlineRefs)?m:e.call(o,m,r,n,t))}if(void 0!==d)return function(e,t){var r=c[e];s[r]=t}(i,d),E(d,f);!function(e){delete c[e]}(i)}function k(e,t){var r=s.length;return s[r]=t,c[e]=r,"refVal"+r}function E(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function S(e){var t=l[e];return void 0===t&&(t=l[e]=u.length,u[t]=e),"pattern"+t}function P(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return nt.toQuotedString(e);case"object":if(null===e)return"null";var t=ot(e),r=h[t];return void 0===r&&(r=h[t]=f.length,f[r]=e),"default"+r}}function _(e,t,r,n){if(!1!==o._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s)if(!s(t)){var c="keyword schema is invalid: "+o.errorsText(s.errors);if("log"!=o._opts.validateSchema)throw new Error(c);o.logger.error(c)}}var u,l=e.definition.compile,f=e.definition.inline,h=e.definition.macro;if(l)u=l.call(o,t,r,n);else if(h)u=h.call(o,t,r,n),!1!==a.validateSchema&&o.validateSchema(u,!0);else if(f)u=f.call(o,n,e.keyword,t,r);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var d=p.length;return p[d]=u,{code:"customRule"+d,validate:u}}};function ft(e,t,r){var n=pt.call(this,e,t,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function ht(e,t,r){var n=pt.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function pt(e,t,r){for(var n=0;n<this._compilations.length;n++){var i=this._compilations[n];if(i.schema==e&&i.root==t&&i.baseId==r)return n}return-1}function dt(e,t){return"var pattern"+e+" = new RegExp("+nt.toQuotedString(t[e])+");"}function mt(e){return"var default"+e+" = defaults["+e+"];"}function gt(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function vt(e){return"var customRule"+e+" = customRules["+e+"];"}function yt(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}var bt={exports:{}},wt=bt.exports=function(){this._cache={}};wt.prototype.put=function(e,t){this._cache[e]=t},wt.prototype.get=function(e){return this._cache[e]},wt.prototype.del=function(e){delete this._cache[e]},wt.prototype.clear=function(){this._cache={}};var xt=fe,kt=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Et=[0,31,28,31,30,31,30,31,31,30,31,30,31],St=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Pt=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,_t=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,At=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Ct=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Ft=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Dt=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Ot=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Rt=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Tt=jt;function jt(e){return e="full"==e?"full":"fast",xt.copy(jt[e])}function It(e){var t=e.match(kt);if(!t)return!1;var r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:Et[n])}function Lt(e,t){var r=e.match(St);if(!r)return!1;var n=r[1],i=r[2],o=r[3],a=r[5];return(n<=23&&i<=59&&o<=59||23==n&&59==i&&60==o)&&(!t||a)}jt.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":At,url:Ct,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Pt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Bt,uuid:Ft,"json-pointer":Dt,"json-pointer-uri-fragment":Ot,"relative-json-pointer":Rt},jt.full={date:It,time:Lt,"date-time":function(e){var t=e.split(qt);return 2==t.length&&It(t[0])&&Lt(t[1],!0)},uri:function(e){return zt.test(e)&&_t.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":At,url:Ct,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Pt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Bt,uuid:Ft,"json-pointer":Dt,"json-pointer-uri-fragment":Ot,"relative-json-pointer":Rt};var qt=/t|\s/i;var zt=/\/|:/;var Mt=/[^\\]\\Z/;function Bt(e){if(Mt.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Nt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s;var p="maximum"==t,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.$data&&m&&m.$data,v=p?"<":">",y=p?">":"<",b=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(d+" must be number or boolean");if(g){var w=e.util.getData(m.$data,a,e.dataPathArr),x="exclusive"+o,k="exclType"+o,E="exclIsNumber"+o,S="' + "+(A="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+w+"; ",i+=" var "+x+"; var "+k+" = typeof "+(w="schemaExcl"+o)+"; if ("+k+" != 'boolean' && "+k+" != 'undefined' && "+k+" != 'number') { ";var P;b=d;(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var _=i;i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+k+" == 'number' ? ( ("+x+" = "+n+" === undefined || "+w+" "+v+"= "+n+") ? "+f+" "+y+"= "+w+" : "+f+" "+y+" "+n+" ) : ( ("+x+" = "+w+" === true) ? "+f+" "+y+"= "+n+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { var op"+o+" = "+x+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=d,u=e.errSchemaPath+"/"+d,n=w,h=g)}else{S=v;if((E="number"==typeof m)&&h){var A="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+v+"= "+n+" ? "+f+" "+y+"= "+m+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { "}else{E&&void 0===s?(x=!0,b=d,u=e.errSchemaPath+"/"+d,n=m,y+="="):(E&&(n=Math[p?"min":"max"](m,s)),m===(!E||n)?(x=!0,b=d,u=e.errSchemaPath+"/"+d,y+="="):(x=!1,S+="="));A="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+" "+y+" "+n+" || "+f+" !== "+f+") { "}}b=b||t,(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+A+", limit: "+n+", exclusive: "+x+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+" ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";_=i;return i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i},$t=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Ut=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+f+".length ":i+=" ucs2length("+f+") ",i+=" "+p+" "+n+") { ";var d=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Vt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+f+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Ht={$ref:function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(s||""),h="valid"+a;if("#"==c||"#/"==c)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs){e.logger.error(d),(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),o+=" } "):o+=" {} ";var m=o;o=y.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,d);e.logger.warn(d),l&&(o+=" if (true) { ")}}else if(p.inline){var g=e.util.copy(e);g.level++;var v="valid"+g.level;g.schema=p.schema,g.schemaPath="",g.errSchemaPath=c,o+=" "+e.validate(g).replace(/validate\.schema/g,p.code)+" ",l&&(o+=" if ("+v+") { ")}else n=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var y;(y=y||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+f+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var b=o+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(o=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(o+=" var "+h+"; "),o+=" try { await "+b+"; ",l&&(o+=" "+h+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(o+=" "+h+" = false; "),o+=" } ",l&&(o+=" if ("+h+") { ")}else o+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(o+=" else { ")}return o},allOf:function(e,t,r){var n=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,c=e.util.copy(e),u="";c.level++;var l="valid"+c.level,f=c.baseId,h=!0,p=i;if(p)for(var d,m=-1,g=p.length-1;m<g;)d=p[m+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,c.schema=d,c.schemaPath=o+"["+m+"]",c.errSchemaPath=a+"/"+m,n+=" "+e.validate(c)+" ",c.baseId=f,s&&(n+=" if ("+l+") { ",u+="}"));return s&&(n+=h?" if (true) { ":" "+u.slice(0,-1)+" "),n},anyOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=a.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=p.baseId;n+=" var "+h+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=a;if(b)for(var w,x=-1,k=b.length-1;x<k;)w=b[x+=1],p.schema=w,p.schemaPath=s+"["+x+"]",p.errSchemaPath=c+"/"+x,n+=" "+e.validate(p)+" ",p.baseId=v,n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ",d+="}";e.compositeRule=p.compositeRule=y,n+=" "+d+" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else u&&(n+=" if (true) { ");return n},$comment:function(e,t,r){var n=" ",i=e.schema[t],o=e.errSchemaPath+"/"+t;e.opts.allErrors;var a=e.util.toQuotedString(i);return!0===e.opts.$comment?n+=" console.log("+a+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+a+", "+e.util.toQuotedString(o)+", validate.root.schema);"),n},const:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; "),h||(n+=" var schema"+i+" = validate.schema"+s+";"),n+="var "+f+" = equal("+l+", schema"+i+"); if (!"+f+") { ";var p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var d=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},contains:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+i,g=p.dataLevel=e.dataLevel+1,v="data"+g,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all);if(n+="var "+h+" = errors;var "+f+";",b){var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var x=l+"["+m+"]";p.dataPathArr[g]=m;var k=e.validate(p);p.baseId=y,e.util.varOccurences(k,v)<2?n+=" "+e.util.varReplace(k,v,x)+" ":n+=" var "+v+" = "+x+"; "+k+" ",n+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=w,n+=" if (!"+d+") {"}else n+=" if ("+l+".length == 0) {";var E=E||[];E.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;return n=E.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",b&&(n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n},dependencies:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m={},g={},v=e.opts.ownProperties;for(x in a)if("__proto__"!=x){var y=a[x],b=Array.isArray(y)?g:m;b[x]=y}n+="var "+f+" = errors;";var w=e.errorPath;for(var x in n+="var missing"+i+";",g)if((b=g[x]).length){if(n+=" if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),u){n+=" && ( ";var k=b;if(k)for(var E=-1,S=k.length-1;E<S;){D=k[E+=1],E&&(n+=" || "),n+=" ( ( "+(j=l+(T=e.util.getProperty(D)))+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:T)+") ) "}n+=")) { ";var P="missing"+i,_="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,P,!0):w+" + "+P);var A=A||[];A.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var C=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+C+"]); ":n+=" validate.errors = ["+C+"]; return false; ":n+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var F=b;if(F)for(var D,O=-1,R=F.length-1;O<R;){D=F[O+=1];var T=e.util.getProperty(D),j=(_=e.util.escapeQuotes(D),l+T);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,D,e.opts.jsonPointers)),n+=" if ( "+j+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",u&&(p+="}",n+=" else { ")}e.errorPath=w;var I=h.baseId;for(var x in m){y=m[x];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+d+" = true; if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),n+=") { ",h.schema=y,h.schemaPath=s+e.util.getProperty(x),h.errSchemaPath=c+"/"+e.util.escapeFragment(x),n+=" "+e.validate(h)+" ",h.baseId=I,n+=" } ",u&&(n+=" if ("+d+") { ",p+="}"))}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},enum:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="i"+i,d="schema"+i;h||(n+=" var "+d+" = validate.schema"+s+";"),n+="var "+f+";",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=f+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+l+", "+d+"["+p+"])) { "+f+" = true; break; }",h&&(n+=" } "),n+=" if (!"+f+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var g=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+g+"]); ":n+=" validate.errors = ["+g+"]; return false; ":n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},format:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var f,h=e.opts.$data&&a&&a.$data;h?(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",f="schema"+i):f=a;var p=e.opts.unknownFormats,d=Array.isArray(p);if(h){n+=" var "+(m="format"+i)+" = formats["+f+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(n+=" var async"+i+" = "+m+".async; "),n+=" "+m+" = "+m+".validate; } if ( ",h&&(n+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),n+=" (","ignore"!=p&&(n+=" ("+f+" && !"+m+" ",d&&(n+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),n+=") || "),n+=" ("+m+" && "+v+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+m+"("+l+") : "+m+"("+l+")) ":n+=" "+m+"("+l+") ",n+=" : "+m+".test("+l+"))))) {"}else{var m;if(!(m=e.formats[a])){if("ignore"==p)return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(d&&p.indexOf(a)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,v=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var y=!0===m.async;m=m.validate}if(v!=r)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(b="formats"+e.util.getProperty(a)+".validate")+"("+l+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(a);g&&(b+=".validate"),n+="function"==typeof m?" "+b+"("+l+") ":" "+b+".test("+l+") ",n+=") { "}}var w=w||[];w.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { format: ",n+=h?""+f:""+e.util.toQuotedString(a),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=h?"' + "+f+" + '":""+e.util.escapeQuotes(a),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+e.util.toQuotedString(a),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var x=n;return n=w.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+x+"]); ":n+=" validate.errors = ["+x+"]; return false; ":n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n},if:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,g=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=p.baseId;if(v||y){var w;p.createErrors=!1,p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+h+" = errors; var "+f+" = true; ";var x=e.compositeRule;e.compositeRule=p.compositeRule=!0,n+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=x,v?(n+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'then'; ":w="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+d+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'else'; ":w="'else'",n+=" } "),n+=" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { failingKeyword: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+w+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n},items:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g="i"+i,v=p.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId;if(n+="var "+h+" = errors;var "+f+";",Array.isArray(a)){var w=e.schema.additionalItems;if(!1===w){n+=" "+f+" = "+l+".length <= "+a.length+"; ";var x=c;c=e.errSchemaPath+"/additionalItems",n+=" if (!"+f+") { ";var k=k||[];k.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var E=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c=x,u&&(d+="}",n+=" else { ")}var S=a;if(S)for(var P,_=-1,A=S.length-1;_<A;)if(P=S[_+=1],e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+l+".length > "+_+") { ";var C=l+"["+_+"]";p.schema=P,p.schemaPath=s+"["+_+"]",p.errSchemaPath=c+"/"+_,p.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),p.dataPathArr[v]=_;var F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",n+=" } ",u&&(n+=" if ("+m+") { ",d+="}")}if("object"==typeof w&&(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))){p.schema=w,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+l+".length > "+a.length+") { for (var "+g+" = "+a.length+"; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=l+"["+g+"]";p.dataPathArr[v]=g;F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" } } ",u&&(n+=" if ("+m+") { ",d+="}")}}else if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=l+"["+g+"]";p.dataPathArr[v]=g;F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" }"}return u&&(n+=" "+d+" if ("+h+" == errors) {"),n},maximum:Nt,minimum:Nt,maxItems:$t,minItems:$t,maxLength:Ut,minLength:Ut,maxProperties:Vt,minProperties:Vt,multipleOf:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="var division"+o+";if (",h&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+o+" = "+f+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},not:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c,n+=" var "+f+" = errors; ";var d,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(d=h.opts.allErrors,h.opts.allErrors=!1),n+=" "+e.validate(h)+" ",h.createErrors=!0,d&&(h.opts.allErrors=d),e.compositeRule=h.compositeRule=m,n+=" if ("+p+") { ";var g=g||[];g.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var v=n;n=g.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n},oneOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=p.baseId,v="prevValid"+i,y="passingSchemas"+i;n+="var "+h+" = errors , "+v+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var w=a;if(w)for(var x,k=-1,E=w.length-1;k<E;)x=w[k+=1],(e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all))?(p.schema=x,p.schemaPath=s+"["+k+"]",p.errSchemaPath=c+"/"+k,n+=" "+e.validate(p)+" ",p.baseId=g):n+=" var "+m+" = true; ",k&&(n+=" if ("+m+" && "+v+") { "+f+" = false; "+y+" = ["+y+", "+k+"]; } else { ",d+="}"),n+=" if ("+m+") { "+f+" = "+v+" = true; "+y+" = "+k+"; }";return e.compositeRule=p.compositeRule=b,n+=d+"if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n},pattern:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(h?"(new RegExp("+n+"))":e.usePattern(s))+".test("+f+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=h?""+n:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+n+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},properties:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m="key"+i,g="idx"+i,v=h.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,w=Object.keys(a||{}).filter(T),x=e.schema.patternProperties||{},k=Object.keys(x).filter(T),E=e.schema.additionalProperties,S=w.length||k.length,P=!1===E,_="object"==typeof E&&Object.keys(E).length,A=e.opts.removeAdditional,C=P||_||A,F=e.opts.ownProperties,D=e.baseId,O=e.schema.required;if(O&&(!e.opts.$data||!O.$data)&&O.length<e.opts.loopRequired)var R=e.util.toHash(O);function T(e){return"__proto__"!==e}if(n+="var "+f+" = errors;var "+d+" = true;",F&&(n+=" var "+b+" = undefined;"),C){if(n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",S){if(n+=" var isAdditional"+i+" = !(false ",w.length)if(w.length>8)n+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var j=w;if(j)for(var I=-1,L=j.length-1;I<L;)K=j[I+=1],n+=" || "+m+" == "+e.util.toQuotedString(K)+" "}if(k.length){var q=k;if(q)for(var z=-1,M=q.length-1;z<M;)oe=q[z+=1],n+=" || "+e.usePattern(oe)+".test("+m+") "}n+=" ); if (isAdditional"+i+") { "}if("all"==A)n+=" delete "+l+"["+m+"]; ";else{var B=e.errorPath,N="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),P)if(A)n+=" delete "+l+"["+m+"]; ";else{n+=" "+d+" = false; ";var $=c;c=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+N+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,u&&(n+=" break; ")}else if(_)if("failing"==A){n+=" var "+f+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var H=l+"["+m+"]";h.dataPathArr[v]=m;var Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",n+=" if (!"+d+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+l+"["+m+"]; } ",e.compositeRule=h.compositeRule=V}else{h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; ")}e.errorPath=B}S&&(n+=" } "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}var G=e.opts.useDefaults&&!e.compositeRule;if(w.length){var W=w;if(W)for(var K,J=-1,Y=W.length-1;J<Y;){var X=a[K=W[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Z=e.util.getProperty(K),ee=(H=l+Z,G&&void 0!==X.default);h.schema=X,h.schemaPath=s+Z,h.errSchemaPath=c+"/"+e.util.escapeFragment(K),h.errorPath=e.util.getPath(e.errorPath,K,e.opts.jsonPointers),h.dataPathArr[v]=e.util.toQuotedString(K);Q=e.validate(h);if(h.baseId=D,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,H);var te=H}else{te=y;n+=" var "+y+" = "+H+"; "}if(ee)n+=" "+Q+" ";else{if(R&&R[K]){n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = false; ";B=e.errorPath,$=c;var re,ne=e.util.escapeQuotes(K);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(B,K,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+ne+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,e.errorPath=B,n+=" } else { "}else u?(n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = true; } else { "):(n+=" if ("+te+" !== undefined ",F&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=" ) { ");n+=" "+Q+" } "}}u&&(n+=" if ("+d+") { ",p+="}")}}if(k.length){var ie=k;if(ie)for(var oe,ae=-1,se=ie.length-1;ae<se;){X=x[oe=ie[ae+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){h.schema=X,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",n+=" if ("+e.usePattern(oe)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; "),n+=" } ",u&&(n+=" else "+d+" = true; "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}}}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},propertyNames:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(n+="var "+f+" = errors;",e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c;var d="key"+i,m="idx"+i,g="i"+i,v="' + "+d+" + '",y="data"+(h.dataLevel=e.dataLevel+1),b="dataProperties"+i,w=e.opts.ownProperties,x=e.baseId;w&&(n+=" var "+b+" = undefined; "),n+=w?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+d+" = "+b+"["+m+"]; ":" for (var "+d+" in "+l+") { ",n+=" var startErrs"+i+" = errors; ";var k=d,E=e.compositeRule;e.compositeRule=h.compositeRule=!0;var S=e.validate(h);h.baseId=x,e.util.varOccurences(S,y)<2?n+=" "+e.util.varReplace(S,y,k)+" ":n+=" var "+y+" = "+k+"; "+S+" ",e.compositeRule=h.compositeRule=E,n+=" if (!"+p+") { for (var "+g+"=startErrs"+i+"; "+g+"<errors; "+g+"++) { vErrors["+g+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { propertyName: '"+v+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+v+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),u&&(n+=" break; "),n+=" } }"}return u&&(n+=" if ("+f+" == errors) {"),n},required:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="schema"+i;if(!h)if(a.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],m=a;if(m)for(var g,v=-1,y=m.length-1;v<y;){g=m[v+=1];var b=e.schema.properties[g];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(d[d.length]=g)}}else d=a;if(h||d.length){var w=e.errorPath,x=h||d.length>=e.opts.loopRequired,k=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),n+=" var "+f+" = true; ",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=" for (var "+_+" = 0; "+_+" < "+p+".length; "+_+"++) { "+f+" = "+l+"["+p+"["+_+"]] !== undefined ",k&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", "+p+"["+_+"]) "),n+="; if (!"+f+") break; } ",h&&(n+=" } "),n+=" if (!"+f+") { ",(C=C||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var P=d;if(P)for(var _=-1,A=P.length-1;_<A;){O=P[_+=1],_&&(n+=" || "),n+=" ( ( "+(I=l+(j=e.util.getProperty(O)))+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:j)+") ) "}n+=") { ";var C;E="' + "+(F="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,F,!0):w+" + "+F),(C=C||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var F;E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),h&&(n+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),n+=" for (var "+_+" = 0; "+_+" < "+p+".length; "+_+"++) { if ("+l+"["+p+"["+_+"]] === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", "+p+"["+_+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(n+=" } ")}else{var D=d;if(D)for(var O,R=-1,T=D.length-1;R<T;){O=D[R+=1];var j=e.util.getProperty(O),I=(E=e.util.escapeQuotes(O),l+j);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,O,e.opts.jsonPointers)),n+=" if ( "+I+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=w}else u&&(n+=" if (true) {");return n},uniqueItems:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h="valid"+o,p=e.opts.$data&&s&&s.$data;if(p?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(i+=" var "+h+"; if ("+n+" === false || "+n+" === undefined) "+h+" = true; else if (typeof "+n+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+f+".length , "+h+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+f+"[i], "+f+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+f+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](d,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+h+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i},validate:tt},Qt=Ht,Gt=fe.toHash,Wt=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Kt=Ye.MissingRef,Jt=function e(t,r,n){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(n=r,r=void 0);var o=a(t).then((function(){var e=i._addSchema(t,void 0,r);return e.validate||s(e)}));n&&o.then((function(e){n(null,e)}),n);return o;function a(t){var r=t.$schema;return r&&!i.getSchema(r)?e.call(i,{$ref:r},!0):Promise.resolve()}function s(e){try{return i._compile(e)}catch(t){if(t instanceof Kt)return function(t){var n=t.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+t.missingRef+" cannot be resolved");var o=i._loadingSchemas[n];o||(o=i._loadingSchemas[n]=i._opts.loadSchema(n)).then(c,c);return o.then((function(e){if(!u(n))return a(e).then((function(){u(n)||i.addSchema(e,n,void 0,r)}))})).then((function(){return s(e)}));function c(){delete i._loadingSchemas[n]}function u(e){return i._refs[e]||i._schemas[e]}}(t);throw t}}};var Yt={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},Xt=Yt,Zt={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Xt.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Xt.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},er=/^[a-z_$][a-z0-9_$-]*$/i,tr=function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,h="data"+(s||""),p="valid"+a,d="errs__"+a,m=e.opts.$data&&c&&c.$data;m?(o+=" var schema"+a+" = "+e.util.getData(c.$data,s,e.dataPathArr)+"; ",i="schema"+a):i=c;var g,v,y,b,w,x=this,k="definition"+a,E=x.definition,S="";if(m&&E.$data){w="keywordValidate"+a;var P=E.validateSchema;o+=" var "+k+" = RULES.custom['"+t+"'].definition; var "+w+" = "+k+".validate;"}else{if(!(b=e.useCustomRule(x,c,e.schema,e)))return;i="validate.schema"+u,w=b.code,g=E.compile,v=E.inline,y=E.macro}var _=w+".errors",A="i"+a,C="ruleErr"+a,F=E.async;if(F&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(o+=_+" = null;"),o+="var "+d+" = errors;var "+p+";",m&&E.$data&&(S+="}",o+=" if ("+i+" === undefined) { "+p+" = true; } else { ",P&&(S+="}",o+=" "+p+" = "+k+".validateSchema("+i+"); if ("+p+") { ")),v)E.statements?o+=" "+b.validate+" ":o+=" "+p+" = "+b.validate+"; ";else if(y){var D=e.util.copy(e);S="";D.level++;var O="valid"+D.level;D.schema=b.validate,D.schemaPath="";var R=e.compositeRule;e.compositeRule=D.compositeRule=!0;var T=e.validate(D).replace(/validate\.schema/g,w);e.compositeRule=D.compositeRule=R,o+=" "+T}else{(q=q||[]).push(o),o="",o+=" "+w+".call( ",e.opts.passContext?o+="this":o+="self",g||!1===E.schema?o+=" , "+h+" ":o+=" , "+i+" , "+h+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var j=s?"data"+(s-1||""):"parentData",I=s?e.dataPathArr[s]:"parentDataProperty",L=o+=" , "+j+" , "+I+" , rootData ) ";o=q.pop(),!1===E.errors?(o+=" "+p+" = ",F&&(o+="await "),o+=L+"; "):o+=F?" var "+(_="customErrors"+a)+" = null; try { "+p+" = await "+L+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+_+" = e.errors; else throw e; } ":" "+_+" = null; "+p+" = "+L+"; "}if(E.modifying&&(o+=" if ("+j+") "+h+" = "+j+"["+I+"];"),o+=""+S,E.valid)f&&(o+=" if (true) { ");else{var q;o+=" if ( ",void 0===E.valid?(o+=" !",o+=y?""+O:""+p):o+=" "+!E.valid+" ",o+=") { ",n=x.keyword,(q=q||[]).push(o),o="",(q=q||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var z=o;o=q.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+z+"]); ":o+=" validate.errors = ["+z+"]; return false; ":o+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var M=o;o=q.pop(),v?E.errors?"full"!=E.errors&&(o+=" for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),o+=" } "):!1===E.errors?o+=" "+M+" ":(o+=" if ("+d+" == errors) { "+M+" } else { for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),o+=" } } "):y?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(e.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; ")):!1===E.errors?o+=" "+M+" ":(o+=" if (Array.isArray("+_+")) { if (vErrors === null) vErrors = "+_+"; else vErrors = vErrors.concat("+_+"); errors = vErrors.length; for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; "+C+'.schemaPath = "'+l+'"; ',e.opts.verbose&&(o+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),o+=" } } else { "+M+" } "),o+=" } ",f&&(o+=" else { ")}return o},rr=Zt,nr={add:function(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!er.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var n=t.type;if(Array.isArray(n))for(var i=0;i<n.length;i++)a(e,n[i],t);else a(e,n,t);var o=t.metaSchema;o&&(t.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(o,!0))}function a(e,t,n){for(var i,o=0;o<r.length;o++){var a=r[o];if(a.type==t){i=a;break}}i||(i={type:t,rules:[]},r.push(i));var s={keyword:e,definition:n,custom:!0,code:tr,implements:n.implements};i.rules.push(s),r.custom[e]=s}return r.keywords[e]=r.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var n=t[r].rules,i=0;i<n.length;i++)if(n[i].keyword==e){n.splice(i,1);break}return this},validate:function e(t,r){e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(rr,!0);if(n(t))return!0;if(e.errors=n.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}};var ir={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},or=lt,ar=Ie,sr=bt.exports,cr=_e,ur=et,lr=Tt,fr=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=Gt(t),e.types=Gt(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var n;if("object"==typeof r){var i=Object.keys(r)[0];n=r[i],r=i,n.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:Qt[r],implements:n}})),e.all.$comment={keyword:"$comment",code:Qt.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=Gt(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e},hr=function(e,t){for(var r=0;r<t.length;r++){e=JSON.parse(JSON.stringify(e));var n,i=t[r].split("/"),o=e;for(n=1;n<i.length;n++)o=o[i[n]];for(n=0;n<Wt.length;n++){var a=Wt[n],s=o[a];s&&(o[a]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},pr=fe,dr=wr;wr.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);!0!==r.$async&&(this.errors=r.errors);return i},wr.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},wr.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],void 0,r,n);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return _r(this,t=ar.normalizeId(t||o)),this._schemas[t]=this._addSchema(e,r,n,!0),this},wr.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},wr.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(vr)?vr:void 0,e._opts.defaultMeta}(this),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,e);if(!n&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return n},wr.prototype.getSchema=function(e){var t=xr(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=ar.schema.call(e,{schema:{}},t);if(r){var n=r.schema,i=r.root,o=r.baseId,a=or.call(e,n,i,void 0,o);return e._fragments[t]=new cr({ref:t,fragment:!0,schema:n,root:i,baseId:o,validate:a}),a}}(this,e)}},wr.prototype.removeSchema=function(e){if(e instanceof RegExp)return kr(this,this._schemas,e),kr(this,this._refs,e),this;switch(typeof e){case"undefined":return kr(this,this._schemas),kr(this,this._refs),this._cache.clear(),this;case"string":var t=xr(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,n=r?r(e):e;this._cache.del(n);var i=this._getId(e);i&&(i=ar.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},wr.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},wr.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,i="",o=0;o<e.length;o++){var a=e[o];a&&(i+=n+a.dataPath+" "+a.message+r)}return i.slice(0,-r.length)},wr.prototype._addSchema=function(e,t,r,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var i=this._opts.serialize,o=i?i(e):e,a=this._cache.get(o);if(a)return a;n=n||!1!==this._opts.addUsedSchema;var s=ar.normalizeId(this._getId(e));s&&n&&_r(this,s);var c,u=!1!==this._opts.validateSchema&&!t;u&&!(c=s&&s==ar.normalizeId(e.$schema))&&this.validateSchema(e,!0);var l=ar.ids.call(this,e),f=new cr({id:s,schema:e,localRefs:l,cacheKey:o,meta:r});"#"!=s[0]&&n&&(this._refs[s]=f);this._cache.put(o,f),u&&c&&this.validateSchema(e,!0);return f},wr.prototype._compile=function(e,t){if(e.compiling)return e.validate=i,i.schema=e.schema,i.errors=null,i.root=t||i,!0===e.schema.$async&&(i.$async=!0),i;var r,n;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{n=or.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=n,e.refs=n.refs,e.refVal=n.refVal,e.root=n.root,n;function i(){var t=e.validate,r=t.apply(this,arguments);return i.errors=t.errors,r}},wr.prototype.compileAsync=Jt;var mr=nr;wr.prototype.addKeyword=mr.add,wr.prototype.getKeyword=mr.get,wr.prototype.removeKeyword=mr.remove,wr.prototype.validateKeyword=mr.validate;var gr=Ye;wr.ValidationError=gr.Validation,wr.MissingRefError=gr.MissingRef,wr.$dataMetaSchema=hr;var vr="http://json-schema.org/draft-07/schema",yr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],br=["/properties"];function wr(e){if(!(this instanceof wr))return new wr(e);e=this._opts=pr.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:Ar,warn:Ar,error:Ar};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=lr(e.format),this._cache=e.cache||new sr,this._loadingSchemas={},this._compilations=[],this.RULES=fr(),this._getId=function(e){switch(e.schemaId){case"auto":return Pr;case"id":return Er;default:return Sr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=ur),this._metaOpts=function(e){for(var t=pr.copy(e._opts),r=0;r<yr.length;r++)delete t[yr[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;e._opts.$data&&(t=ir,e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=Yt;e._opts.$data&&(r=hr(r,br));e.addMetaSchema(r,vr,!0),e._refs["http://json-schema.org/schema"]=vr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function xr(e,t){return t=ar.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function kr(e,t,r){for(var n in t){var i=t[n];i.meta||r&&!r.test(n)||(e._cache.del(i.cacheKey),delete t[n])}}function Er(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Sr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Pr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function _r(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function Ar(){}var Cr,Fr={exports:{}},Dr={exports:{}};Dr.exports=(Cr=Cr||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==ae&&ae.crypto&&(r=ae.crypto),!r)try{r=require("crypto")}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=o.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(i,f);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new d.HMAC.init(e,r).finalize(t)}}});var d=o.algo={};return o}(Math),Cr);var Or={exports:{}};Or.exports=function(e){return function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(Dr.exports);var Rr={exports:{}};Rr.exports=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],p=e[t+2],d=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],x=e[t+10],k=e[t+11],E=e[t+12],S=e[t+13],P=e[t+14],_=e[t+15],A=o[0],C=o[1],F=o[2],D=o[3];A=u(A,C,F,D,a,7,s[0]),D=u(D,A,C,F,c,12,s[1]),F=u(F,D,A,C,p,17,s[2]),C=u(C,F,D,A,d,22,s[3]),A=u(A,C,F,D,m,7,s[4]),D=u(D,A,C,F,g,12,s[5]),F=u(F,D,A,C,v,17,s[6]),C=u(C,F,D,A,y,22,s[7]),A=u(A,C,F,D,b,7,s[8]),D=u(D,A,C,F,w,12,s[9]),F=u(F,D,A,C,x,17,s[10]),C=u(C,F,D,A,k,22,s[11]),A=u(A,C,F,D,E,7,s[12]),D=u(D,A,C,F,S,12,s[13]),F=u(F,D,A,C,P,17,s[14]),A=l(A,C=u(C,F,D,A,_,22,s[15]),F,D,c,5,s[16]),D=l(D,A,C,F,v,9,s[17]),F=l(F,D,A,C,k,14,s[18]),C=l(C,F,D,A,a,20,s[19]),A=l(A,C,F,D,g,5,s[20]),D=l(D,A,C,F,x,9,s[21]),F=l(F,D,A,C,_,14,s[22]),C=l(C,F,D,A,m,20,s[23]),A=l(A,C,F,D,w,5,s[24]),D=l(D,A,C,F,P,9,s[25]),F=l(F,D,A,C,d,14,s[26]),C=l(C,F,D,A,b,20,s[27]),A=l(A,C,F,D,S,5,s[28]),D=l(D,A,C,F,p,9,s[29]),F=l(F,D,A,C,y,14,s[30]),A=f(A,C=l(C,F,D,A,E,20,s[31]),F,D,g,4,s[32]),D=f(D,A,C,F,b,11,s[33]),F=f(F,D,A,C,k,16,s[34]),C=f(C,F,D,A,P,23,s[35]),A=f(A,C,F,D,c,4,s[36]),D=f(D,A,C,F,m,11,s[37]),F=f(F,D,A,C,y,16,s[38]),C=f(C,F,D,A,x,23,s[39]),A=f(A,C,F,D,S,4,s[40]),D=f(D,A,C,F,a,11,s[41]),F=f(F,D,A,C,d,16,s[42]),C=f(C,F,D,A,v,23,s[43]),A=f(A,C,F,D,w,4,s[44]),D=f(D,A,C,F,E,11,s[45]),F=f(F,D,A,C,_,16,s[46]),A=h(A,C=f(C,F,D,A,p,23,s[47]),F,D,a,6,s[48]),D=h(D,A,C,F,y,10,s[49]),F=h(F,D,A,C,P,15,s[50]),C=h(C,F,D,A,g,21,s[51]),A=h(A,C,F,D,E,6,s[52]),D=h(D,A,C,F,d,10,s[53]),F=h(F,D,A,C,x,15,s[54]),C=h(C,F,D,A,c,21,s[55]),A=h(A,C,F,D,b,6,s[56]),D=h(D,A,C,F,_,10,s[57]),F=h(F,D,A,C,v,15,s[58]),C=h(C,F,D,A,S,21,s[59]),A=h(A,C,F,D,m,6,s[60]),D=h(D,A,C,F,k,10,s[61]),F=h(F,D,A,C,p,15,s[62]),C=h(C,F,D,A,w,21,s[63]),o[0]=o[0]+A|0,o[1]=o[1]+C|0,o[2]=o[2]+F|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var o=t.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}r.MD5=o._createHelper(c),r.HmacMD5=o._createHmacHelper(c)}(Math),e.MD5}(Dr.exports);var Tr={exports:{}},jr={exports:{}};jr.exports=function(e){return r=(t=e).lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],c=r[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var l=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=l<<1|l>>>31}var f=(n<<5|n>>>27)+c+a[u];f+=u<20?1518500249+(i&o|~i&s):u<40?1859775393+(i^o^s):u<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,c=s,s=o,o=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s),e.SHA1;var t,r,n,i,o,a,s}(Dr.exports);var Ir={exports:{}};Ir.exports=function(e){var t,r,n;r=(t=e).lib.Base,n=t.enc.Utf8,t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,u=0;u<r;u++)s[u]^=1549556828,c[u]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}(Dr.exports),Tr.exports=function(e){return r=(t=e).lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,c=n.keySize,u=n.iterations;s.length<c;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var l=1;l<u;l++)r=o.finalize(r),o.reset();a.concat(r)}return a.sigBytes=4*c,a}}),t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)},e.EvpKDF;var t,r,n,i,o,a,s}(Dr.exports);var Lr={exports:{}};Lr.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc;s.Utf8;var c=s.Base64,u=r.algo.EvpKDF,l=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=r.mode={},h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=f.CBC=function(){var e=h.extend();function r(e,r,n){var i,o=this._iv;o?(i=o,this._iv=t):i=this._prevBlock;for(var a=0;a<n;a++)e[r+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=o}}),e}(),d=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(i);var c=o.create(a,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:d}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(r.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=o.random(8));var i=u.create({keySize:t+r}).compute(e,n),a=o.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:a,salt:n})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}()}(Dr.exports),Fr.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,o[d]=r;var m=e[r],g=e[m],v=e[g],y=257*e[d]^16843008*d;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[d]=y<<24|y>>>8,f[d]=y<<16|y>>>16,h[d]=y<<8|y>>>24,p[d]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(u=o[a-1],a%r?r>6&&a%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=d[a/r|0]<<24),o[a]=o[a-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^f[i[u>>>16&255]]^h[i[u>>>8&255]]^p[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,p,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d<c;d++){var m=n[u>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&h]^r[p++],g=n[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&u]^r[p++],v=n[f>>>24]^i[h>>>16&255]^o[u>>>8&255]^a[255&l]^r[p++],y=n[h>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&f]^r[p++];u=m,l=g,f=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^r[p++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[p++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[p++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[p++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});t.AES=r._createHelper(m)}(),e.AES}(Dr.exports);var qr={exports:{}};qr.exports=function(e){return e.enc.Utf8}(Dr.exports);const zr={}.hasOwnProperty;function Mr(e,t){const r=t||{};function n(t,...r){let i=n.invalid;const o=n.handlers;if(t&&zr.call(t,e)){const r=String(t[e]);i=zr.call(o,r)?o[r]:n.unknown}if(i)return i.call(this,t,...r)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const Br=Mr("operator",{unknown:function(e){throw new Error("Unknown operator `"+e.operator+"`")},invalid:Nr,handlers:{"=":function(e,t){return Nr(e,t)&&String(t[e.name])===e.value},"^=":function(e,t){const r=t[e.name];return Boolean(e.value&&"string"==typeof r&&r.slice(0,e.value.length)===e.value)},"$=":function(e,t){const r=t[e.name];return Boolean(e.value&&"string"==typeof r&&r.slice(-e.value.length)===e.value)},"*=":function(e,t){const r=t[e.name];return Boolean(e.value&&"string"==typeof r&&r.includes(e.value))},"~=":function(e,t){const r=t[e.name];if(null==r)return!1;if(Array.isArray(r)&&r.includes(e.value))return!0;return String(r)===e.value}}});function Nr(e,t){return null!==t[e.name]&&void 0!==t[e.name]}const $r=new Set([9,10,12,13,32]),Ur="0".charCodeAt(0),Vr="9".charCodeAt(0);var Hr={trueFunc:function(){return!0},falseFunc:function(){return!1}};function Qr(e){return function(e){const t=e[0],r=e[1]-1;if(r<0&&t<=0)return Hr.falseFunc;if(-1===t)return e=>e<=r;if(0===t)return e=>e===r;if(1===t)return r<0?Hr.trueFunc:e=>e>=r;const n=Math.abs(t),i=(r%n+n)%n;return t>1?e=>e>=r&&e%n===i:e=>e<=r&&e%n===i}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,r=0,n=o(),i=a();if(t<e.length&&"n"===e.charAt(t)&&(t++,r=n*(null!=i?i:1),s(),t<e.length?(n=o(),s(),i=a()):n=i=0),null===i||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[r,n*i];function o(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function a(){const r=t;let n=0;for(;t<e.length&&e.charCodeAt(t)>=Ur&&e.charCodeAt(t)<=Vr;)n=10*n+(e.charCodeAt(t)-Ur),t++;return t===r?null:n}function s(){for(;t<e.length&&$r.has(e.charCodeAt(t));)t++}}(e))}function Gr(e){return Array.isArray(e.children)}const Wr=Qr.default||Qr,Kr=Mr("name",{unknown:function(e){if(e.name)throw new Error("Unknown pseudo-selector `"+e.name+"`");throw new Error("Unexpected pseudo-element or empty pseudo-class")},invalid:function(){throw new Error("Invalid pseudo-selector")},handlers:{any:Xr,blank:Yr,empty:Yr,"first-child":function(e,t,r,n,i){return Zr(i,e),0===i.nodeIndex},"first-of-type":function(e,t,r,n,i){return Zr(i,e),0===i.typeIndex},has:function(e,t,r,n,i){const o={type:"root",children:Gr(t)?t.children:[]},a={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:nn(e.value)};return on(a,o),a.results.length>0},"last-child":function(e,t,r,n,i){return Zr(i,e),"number"==typeof i.nodeCount&&i.nodeIndex===i.nodeCount-1},"last-of-type":function(e,t,r,n,i){return Zr(i,e),"number"==typeof i.typeCount&&i.typeIndex===i.typeCount-1},matches:Xr,not:function(e,t,r,n,i){return!Xr(e,t,r,n,i)},"nth-child":function(e,t,r,n,i){const o=en(e);return Zr(i,e),"number"==typeof i.nodeIndex&&o(i.nodeIndex)},"nth-last-child":function(e,t,r,n,i){const o=en(e);return Zr(i,e),"number"==typeof i.nodeCount&&"number"==typeof i.nodeIndex&&o(i.nodeCount-i.nodeIndex-1)},"nth-of-type":function(e,t,r,n,i){const o=en(e);return Zr(i,e),"number"==typeof i.typeIndex&&o(i.typeIndex)},"nth-last-of-type":function(e,t,r,n,i){const o=en(e);return Zr(i,e),"number"==typeof i.typeIndex&&"number"==typeof i.typeCount&&o(i.typeCount-1-i.typeIndex)},"only-child":function(e,t,r,n,i){return Zr(i,e),1===i.nodeCount},"only-of-type":function(e,t,r,n,i){return Zr(i,e),1===i.typeCount},root:function(e,t,r,n){return t&&!n},scope:function(e,t,r,n,i){return t&&i.scopeNodes.includes(t)}}});function Jr(e,t,r,n,i){const o=e.pseudos;let a=-1;for(;++a<o.length;)if(!Kr(o[a],t,r,n,i))return!1;return!0}function Yr(e,t){return Gr(t)?0===t.children.length:!("value"in t)}function Xr(e,t,r,n,i){const o={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:nn(e.value)};return on(o,t),o.results[0]===t}function Zr(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function en(e){let t=e._cachedFn;return t||(t=Wr(e.value),e._cachedFn=t),t}function tn(e,t,r,n,i){if(e.id)throw new Error("Invalid selector: id");if(e.classNames)throw new Error("Invalid selector: class");return Boolean(t&&(!e.tagName||function(e,t){return"*"===e.tagName||e.tagName===t.type}(e,t))&&(!e.attrs||function(e,t){let r=-1;for(;++r<e.attrs.length;)if(!Br(e.attrs[r],t))return!1;return!0}(e,t))&&(!e.pseudos||Jr(e,t,r,n,i)))}Jr.needsIndex=["any","first-child","first-of-type","last-child","last-of-type","matches","not","nth-child","nth-last-child","nth-of-type","nth-last-of-type","only-child","only-of-type"];const rn=[];function nn(e){return null===e?{type:"selectors",selectors:[]}:"ruleSet"===e.type?{type:"selectors",selectors:[e]}:e}function on(e,t){t&&an(e,[],t,void 0,void 0)}function an(e,t,r,n,i){let o={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};return o=function(e,t,r,n,i){const o={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const s=t[a];if(e.one&&e.found)break;if(e.shallow&&s.rule.rule)throw new Error("Expected selector without nesting");if(tn(s.rule,r,n,i,e)){const t=s.rule.rule;if(t){const e={type:"ruleSet",rule:t};cn(o,"+"===t.nestingOperator?"adjacentSibling":"~"===t.nestingOperator?"generalSibling":">"===t.nestingOperator?"directChild":"descendant",e)}else e.found=!0,e.results.includes(r)||e.results.push(r)}null===s.rule.nestingOperator?cn(o,"descendant",s):"~"===s.rule.nestingOperator&&cn(o,"generalSibling",s)}return o}(e,sn(t,e.rootQuery.selectors),r,n,i),!Gr(r)||e.shallow||e.one&&e.found||function(e,t,r){const n=sn(t.descendant,t.directChild);let i,o=-1;const a={count:0,types:new Map},s={count:0,types:new Map};for(;++o<r.children.length;)un(a,r.children[o]);o=-1;for(;++o<r.children.length;){const t=r.children[o].type.toUpperCase();e.nodeIndex=s.count,e.typeIndex=s.types.get(t)||0,e.nodeCount=a.count,e.typeCount=a.types.get(t);const c=an(e,sn(n,i),r.children[o],o,r);if(i=sn(c.generalSibling,c.adjacentSibling),e.one&&e.found)break;un(s,r.children[o])}}(e,o,r),o}function sn(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:rn}function cn(e,t,r){const n=e[t];n?n.push(r):e[t]=[r]}function un(e,t){const r=t.type.toUpperCase(),n=(e.types.get(r)||0)+1;e.count++,e.types.set(r,n)}var ln,fn={},hn={},pn={};ln=pn,Object.defineProperty(ln,"__esModule",{value:!0}),ln.isIdentStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e},ln.isIdent=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e},ln.isHex=function(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"},ln.escapeIdentifier=function(e){for(var t=e.length,r="",n=0;n<t;){var i=e.charAt(n);if(ln.identSpecialChars[i])r+="\\"+i;else if("_"===i||"-"===i||i>="A"&&i<="Z"||i>="a"&&i<="z"||0!==n&&i>="0"&&i<="9")r+=i;else{var o=i.charCodeAt(0);if(55296==(63488&o)){var a=e.charCodeAt(n++);if(55296!=(64512&o)||56320!=(64512&a))throw Error("UCS-2(decode): illegal sequence");o=((1023&o)<<10)+(1023&a)+65536}r+="\\"+o.toString(16)+" "}n++}return r},ln.escapeStr=function(e){for(var t,r=e.length,n="",i=0;i<r;){var o=e.charAt(i);'"'===o?o='\\"':"\\"===o?o="\\\\":void 0!==(t=ln.strReplacementsRev[o])&&(o=t),n+=o,i++}return'"'+n+'"'},ln.identSpecialChars={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},ln.strReplacementsRev={"\n":"\\n","\r":"\\r","\t":"\\t","\f":"\\f","\v":"\\v"},ln.singleQuoteEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\","'":"'"},ln.doubleQuotesEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\",'"':'"'},Object.defineProperty(hn,"__esModule",{value:!0});var dn=pn;hn.parseCssSelector=function(e,t,r,n,i,o){var a=e.length,s="";function c(r,n){var i="";for(t++,s=e.charAt(t);t<a;){if(s===r)return t++,i;if("\\"===s){t++;var o=void 0;if((s=e.charAt(t))===r)i+=r;else if(void 0!==(o=n[s]))i+=o;else{if(dn.isHex(s)){var c=s;for(t++,s=e.charAt(t);dn.isHex(s);)c+=s,t++,s=e.charAt(t);" "===s&&(t++,s=e.charAt(t)),i+=String.fromCharCode(parseInt(c,16));continue}i+=s}}else i+=s;t++,s=e.charAt(t)}return i}function u(){var r="";for(s=e.charAt(t);t<a;){if(dn.isIdent(s))r+=s;else{if("\\"!==s)return r;if(++t>=a)throw Error("Expected symbol but end of file reached.");if(s=e.charAt(t),dn.identSpecialChars[s])r+=s;else{if(dn.isHex(s)){var n=s;for(t++,s=e.charAt(t);dn.isHex(s);)n+=s,t++,s=e.charAt(t);" "===s&&(t++,s=e.charAt(t)),r+=String.fromCharCode(parseInt(n,16));continue}r+=s}}t++,s=e.charAt(t)}return r}function l(){s=e.charAt(t);for(var r=!1;" "===s||"\t"===s||"\n"===s||"\r"===s||"\f"===s;)r=!0,t++,s=e.charAt(t);return r}function f(){var r=h();if(!r)return null;var n=r;for(s=e.charAt(t);","===s;){if(t++,l(),"selectors"!==n.type&&(n={type:"selectors",selectors:[r]}),!(r=h()))throw Error('Rule expected after ",".');n.selectors.push(r)}return n}function h(){l();var r={type:"ruleSet"},n=p();if(!n)return null;for(var o=r;n&&(n.type="rule",o.rule=n,o=n,l(),s=e.charAt(t),!(t>=a||","===s||")"===s));)if(i[s]){var c=s;if(t++,l(),!(n=p()))throw Error('Rule expected after "'+c+'".');n.nestingOperator=c}else(n=p())&&(n.nestingOperator=null);return r}function p(){for(var i=null;t<a;)if("*"===(s=e.charAt(t)))t++,(i=i||{}).tagName="*";else if(dn.isIdentStart(s)||"\\"===s)(i=i||{}).tagName=u();else if("."===s)t++,((i=i||{}).classNames=i.classNames||[]).push(u());else if("#"===s)t++,(i=i||{}).id=u();else if("["===s){t++,l();var h={name:u()};if(l(),"]"===s)t++;else{var p="";if(n[s]&&(p=s,t++,s=e.charAt(t)),t>=a)throw Error('Expected "=" but end of file reached.');if("="!==s)throw Error('Expected "=" but "'+s+'" found.');h.operator=p+"=",t++,l();var d="";if(h.valueType="string",'"'===s)d=c('"',dn.doubleQuotesEscapeChars);else if("'"===s)d=c("'",dn.singleQuoteEscapeChars);else if(o&&"$"===s)t++,d=u(),h.valueType="substitute";else{for(;t<a&&"]"!==s;)d+=s,t++,s=e.charAt(t);d=d.trim()}if(l(),t>=a)throw Error('Expected "]" but end of file reached.');if("]"!==s)throw Error('Expected "]" but "'+s+'" found.');t++,h.value=d}((i=i||{}).attrs=i.attrs||[]).push(h)}else{if(":"!==s)break;t++;var m=u(),g={name:m};if("("===s){t++;var v="";if(l(),"selector"===r[m])g.valueType="selector",v=f();else{if(g.valueType=r[m]||"string",'"'===s)v=c('"',dn.doubleQuotesEscapeChars);else if("'"===s)v=c("'",dn.singleQuoteEscapeChars);else if(o&&"$"===s)t++,v=u(),g.valueType="substitute";else{for(;t<a&&")"!==s;)v+=s,t++,s=e.charAt(t);v=v.trim()}l()}if(t>=a)throw Error('Expected ")" but end of file reached.');if(")"!==s)throw Error('Expected ")" but "'+s+'" found.');t++,g.value=v}((i=i||{}).pseudos=i.pseudos||[]).push(g)}return i}return function(){var r=f();if(t<a)throw Error('Rule expected but "'+e.charAt(t)+'" found.');return r}()};var mn={};Object.defineProperty(mn,"__esModule",{value:!0});var gn=pn;mn.renderEntity=function e(t){var r="";switch(t.type){case"ruleSet":for(var n=t.rule,i=[];n;)n.nestingOperator&&i.push(n.nestingOperator),i.push(e(n)),n=n.rule;r=i.join(" ");break;case"selectors":r=t.selectors.map(e).join(", ");break;case"rule":t.tagName&&(r="*"===t.tagName?"*":gn.escapeIdentifier(t.tagName)),t.id&&(r+="#"+gn.escapeIdentifier(t.id)),t.classNames&&(r+=t.classNames.map((function(e){return"."+gn.escapeIdentifier(e)})).join("")),t.attrs&&(r+=t.attrs.map((function(e){return"operator"in e?"substitute"===e.valueType?"["+gn.escapeIdentifier(e.name)+e.operator+"$"+e.value+"]":"["+gn.escapeIdentifier(e.name)+e.operator+gn.escapeStr(e.value)+"]":"["+gn.escapeIdentifier(e.name)+"]"})).join("")),t.pseudos&&(r+=t.pseudos.map((function(t){return t.valueType?"selector"===t.valueType?":"+gn.escapeIdentifier(t.name)+"("+e(t.value)+")":"substitute"===t.valueType?":"+gn.escapeIdentifier(t.name)+"($"+t.value+")":"numeric"===t.valueType?":"+gn.escapeIdentifier(t.name)+"("+t.value+")":":"+gn.escapeIdentifier(t.name)+"("+gn.escapeIdentifier(t.value)+")":":"+gn.escapeIdentifier(t.name)})).join(""));break;default:throw Error('Unknown entity type: "'+t.type+'".')}return r},Object.defineProperty(fn,"__esModule",{value:!0});var vn=hn,yn=mn,bn=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.pseudos[i]="selector"}return this},e.prototype.unregisterSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.pseudos[i]}return this},e.prototype.registerNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.pseudos[i]="numeric"}return this},e.prototype.unregisterNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.pseudos[i]}return this},e.prototype.registerNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.ruleNestingOperators[i]=!0}return this},e.prototype.unregisterNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.ruleNestingOperators[i]}return this},e.prototype.registerAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.attrEqualityMods[i]=!0}return this},e.prototype.unregisterAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.attrEqualityMods[i]}return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},e.prototype.parse=function(e){return vn.parseCssSelector(e,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},e.prototype.render=function(e){return yn.renderEntity(e).trim()},e}();const wn=new(fn.CssSelectorParser=bn);function xn(e){if("string"!=typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return wn.parse(e)}function kn(e,t){return{rootQuery:nn(xn(e)),results:[],scopeNodes:t?!Gr(t)||"RootNode"!==t.type&&"root"!==t.type?[t]:t.children:[],one:!1,shallow:!1,found:!1,typeIndex:void 0,nodeIndex:void 0,typeCount:void 0,nodeCount:void 0}}wn.registerAttrEqualityMods("~","^","$","*"),wn.registerSelectorPseudos("any","matches","not","has"),wn.registerNestingOperators(">","+","~");var En=Object.freeze({__proto__:null,matches:function(e,t){const r=kn(e,t);return r.one=!0,r.shallow=!0,on(r,t||void 0),r.results.length>0},select:function(e,t){const r=kn(e,t);return r.one=!0,on(r,t||void 0),r.results[0]||null},selectAll:function(e,t){const r=kn(e,t);return on(r,t||void 0),r.results}}),Sn=se(En);function Pn(e){if(e)throw e}
2
+ "use strict";var e=require("commander"),t=require("tmp"),r=require("path"),n=require("consola"),i=require("lodash"),o=require("process"),a=require("url"),s=require("assert"),c=require("http"),u=require("https"),l=require("stream"),f=require("zlib"),h=require("cross-spawn"),d=require("fs"),p=require("vm2"),m=require("js-yaml"),g=require("canvas"),v=require("fs-extra"),y=require("pinyin-pro"),b=require("fstream-ignore"),w=require("archiver"),x=require("tar-pack"),k=require("ejs"),E=require("lookpath"),S=require("jsdom"),P=require("mime-types"),_=require("os"),C=require("constants"),A=require("util"),F=require("events"),D=require("crypto");function R(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function T(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var O=R(t),j=R(r),I=R(n),L=R(i),q=R(o),z=R(a),M=R(s),N=R(c),B=R(u),$=R(l),U=R(f),V=R(h),H=T(d),Q=R(d),W=R(m),G=R(v),K=R(b),J=R(w),Y=R(k),X=R(S),Z=R(P),ee=R(_),te=R(C),re=R(A),ne=R(F),ie=R(D);const oe=I.default.create({});var ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function se(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var ce={},ue={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(a+"|"+t(l,s,"[\\:]"))+"*");var f=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),h=r(f+"\\."+f+"\\."+f+"\\."+f),d=r(o+"{1,4}"),p=r(r(d+"\\:"+d)+"|"+h),m=r(r(d+"\\:")+"{6}"+p),g=r("\\:\\:"+r(d+"\\:")+"{5}"+p),v=r(r(d)+"?\\:\\:"+r(d+"\\:")+"{4}"+p),y=r(r(r(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+r(d+"\\:")+"{3}"+p),b=r(r(r(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+r(d+"\\:")+"{2}"+p),w=r(r(r(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),x=r(r(r(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),k=r(r(r(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),E=r(r(r(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),S=r([m,g,v,y,b,w,x,k,E].join("|")),P=r(r(l+"|"+a)+"+");r("[vV]"+o+"+\\."+t(l,s,"[\\:]")+"+"),r(r(a+"|"+t(l,s))+"*");var _=r(a+"|"+t(l,s,"[\\:\\@]"));return r(r(a+"|"+t(l,s,"[\\@]"))+"+"),r(r(_+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},h=2147483647,d=36,p=1,m=26,g=38,v=700,y=72,b=128,w="-",x=/^xn--/,k=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=d-p,_=Math.floor,C=String.fromCharCode;function A(e){throw new RangeError(S[e])}function F(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function D(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+F((e=e.replace(E,".")).split("."),t).join(".")}function R(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var T=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},O=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},j=function(e,t,r){var n=0;for(e=r?_(e/v):e>>1,e+=_(e/t);e>P*m>>1;n+=d)e=_(e/P);return _(n+(P+1)*e/(e+g))},I=function(e){var t=[],r=e.length,n=0,i=b,o=y,a=e.lastIndexOf(w);a<0&&(a=0);for(var s=0;s<a;++s)e.charCodeAt(s)>=128&&A("not-basic"),t.push(e.charCodeAt(s));for(var c=a>0?a+1:0;c<r;){for(var u=n,l=1,f=d;;f+=d){c>=r&&A("invalid-input");var g=T(e.charCodeAt(c++));(g>=d||g>_((h-n)/l))&&A("overflow"),n+=g*l;var v=f<=o?p:f>=o+m?m:f-o;if(g<v)break;var x=d-v;l>_(h/x)&&A("overflow"),l*=x}var k=t.length+1;o=j(n-u,k,0==u),_(n/k)>h-i&&A("overflow"),i+=_(n/k),n%=k,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},L=function(e){var t=[],r=(e=R(e)).length,n=b,i=0,o=y,a=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(a=(u=l.next()).done);a=!0){var f=u.value;f<128&&t.push(C(f))}}catch(e){s=!0,c=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,v=g;for(g&&t.push(w);v<r;){var x=h,k=!0,E=!1,S=void 0;try{for(var P,F=e[Symbol.iterator]();!(k=(P=F.next()).done);k=!0){var D=P.value;D>=n&&D<x&&(x=D)}}catch(e){E=!0,S=e}finally{try{!k&&F.return&&F.return()}finally{if(E)throw S}}var T=v+1;x-n>_((h-i)/T)&&A("overflow"),i+=(x-n)*T,n=x;var I=!0,L=!1,q=void 0;try{for(var z,M=e[Symbol.iterator]();!(I=(z=M.next()).done);I=!0){var N=z.value;if(N<n&&++i>h&&A("overflow"),N==n){for(var B=i,$=d;;$+=d){var U=$<=o?p:$>=o+m?m:$-o;if(B<U)break;var V=B-U,H=d-U;t.push(C(O(U+V%H,0))),B=_(V/H)}t.push(C(O(B,0))),o=j(i,T,v==g),i=0,++v}}}catch(e){L=!0,q=e}finally{try{!I&&M.return&&M.return()}finally{if(L)throw q}}++i,++n}return t.join("")},q=function(e){return D(e,(function(e){return x.test(e)?I(e.slice(4).toLowerCase()):e}))},z=function(e){return D(e,(function(e){return k.test(e)?"xn--"+L(e):e}))},M={version:"2.1.0",ucs2:{decode:R,encode:function(e){return String.fromCodePoint.apply(String,f(e))}},decode:I,encode:L,toASCII:z,toUnicode:q},N={};function B(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function $(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function U(e,t){function r(e){var r=$(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,B).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,B).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,B).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,B).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,B).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(V).join("."):e}function Q(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),i=n[1],o=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=l(a,2),c=s[0],u=s[1],f=u?u.split(":").map(V):[],h=c.split(":").map(V),d=t.IPV4ADDRESS.test(h[h.length-1]),p=d?7:8,m=h.length-p,g=Array(p),v=0;v<p;++v)g[v]=f[v]||h[m+v]||"";d&&(g[p-1]=H(g[p-1],t));var y=g.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],w=void 0;if(b&&b.length>1){var x=g.slice(0,b.index),k=g.slice(b.index+b.length);w=x.join(":")+"::"+k.join(":")}else w=g.join(":");return o&&(w+="%"+o),w}return e}var W=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(W);if(i){G?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=Q(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=N[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)U(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=M.toASCII(r.host.replace(n.PCT_ENCODED,$).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}U(r,c)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Q(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,X=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(X))e=e.replace(X,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],i=N[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?M.toUnicode(e.host):M.toASCII(e.host.replace(r.PCT_ENCODED,$).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}U(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=J(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=te(a)),void 0===o&&(a=a.replace(/^\/\//,"/%2F")),n.push(a)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=K(re(e,r),r),t=K(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=a({scheme:"null"},r);return re(ne(K(e,n),K(t,n),n,!0),n)}function oe(e,t){return"string"==typeof e?e=re(K(e,t),t):"object"===n(e)&&(e=K(re(e,t),t)),e}function ae(e,t,r){return"string"==typeof e?e=re(K(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(K(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,B)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,$)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function fe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=fe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(fe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},pe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ve=r(r("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+r("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+r("%"+ge+ge)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(me,"g"),ke=new RegExp(ve,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),Se=new RegExp(t("[^]",me,we),"g"),Pe=Se;function _e(e){var t=$(e);return t.match(xe)?t:e}var Ce={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),s=0,c=a.length;s<c;++s){var u=a[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),f=0,h=l.length;f<h;++f)n.push(l[f]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:i=!0,o[ce(u[0],t)]=ce(u[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var d=0,p=n.length;d<p;++d){var m=n[d].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=M.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=m.join("@")}return r},serialize:function(e,t){var r=e,n=o(e.to);if(n){for(var a=0,s=n.length;a<s;++a){var c=String(n[a]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(ke,_e).replace(ke,i).replace(Ee,B),f=c.slice(u+1);try{f=t.iri?M.toUnicode(f):M.toASCII(ce(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var d=[];for(var p in h)h[p]!==pe[p]&&d.push(p.replace(ke,_e).replace(ke,i).replace(Se,B)+"="+h[p].replace(ke,_e).replace(ke,i).replace(Pe,B));return d.length&&(r.query=d.join("&")),r}},Ae=/^([^\:]+)\:(.*)/,Fe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Ae),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],s=i+":"+(t.nid||o),c=N[s];n.nid=o,n.nss=a,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=N[i];o&&(e=o.serialize(e,t));var a=e,s=e.nss;return a.path=(n||t.nid)+":"+s,a}},De=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Re={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(De)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};N[ue.scheme]=ue,N[le.scheme]=le,N[he.scheme]=he,N[de.scheme]=de,N[Ce.scheme]=Ce,N[Fe.scheme]=Fe,N[Re.scheme]=Re,e.SCHEMES=N,e.pctEncChar=B,e.pctDecChars=$,e.parse=K,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=oe,e.equal=ae,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(ue.exports);var le=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r},fe={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:he,checkDataTypes:function(e,t,r){if(1===e.length)return he(e[0],t,r,!0);var n="",i=pe(e);for(var o in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+he(o,t,r,!0);return n},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++){var i=t[n];(de[i]||"array"===e&&"array"===i)&&(r[r.length]=i)}if(r.length)return r}else{if(de[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:pe,getProperty:ve,escapeQuotes:ye,equal:le,ucs2length:function(e){for(var t,r=0,n=e.length,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return r},varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var n in e)if(n!=r&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var r in e)if(!t[r])return r},toQuotedString:be,getPathExpr:function(e,t,r,n){var i=r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return ke(e,i)},getPath:function(e,t,r){var n=be(r?"/"+Ee(t):ve(t));return ke(e,n)},getData:function(e,t,r){var n,i,o,a;if(""===e)return"rootData";if("/"==e[0]){if(!we.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,o="rootData"}else{if(!(a=e.match(xe)))throw new Error("Invalid JSON-pointer: "+e);if(n=+a[1],"#"==(i=a[2])){if(n>=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(o="data"+(t-n||""),!i)return o}for(var s=o,c=i.split("/"),u=0;u<c.length;u++){var l=c[u];l&&(s+=" && "+(o+=ve(Se(l))))}return s},unescapeFragment:function(e){return Se(decodeURIComponent(e))},unescapeJsonPointer:Se,escapeFragment:function(e){return encodeURIComponent(Ee(e))},escapeJsonPointer:Ee};function he(e,t,r,n){var i=n?" !== ":" === ",o=n?" || ":" && ",a=n?"!":"",s=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+o+"typeof "+t+i+'"object"'+o+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+s+"("+t+" % 1)"+o+t+i+t+(r?o+a+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?o+a+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}var de=pe(["string","number","integer","boolean","null"]);function pe(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var me=/^[a-z$_][a-z$_0-9]*$/i,ge=/'|\\/g;function ve(e){return"number"==typeof e?"["+e+"]":me.test(e)?"."+e:"['"+ye(e)+"']"}function ye(e){return e.replace(ge,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function be(e){return"'"+ye(e)+"'"}var we=/^\/(?:[^~]|~0|~1)*$/,xe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ke(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function Ee(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Se(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var Pe=fe,_e=function(e){Pe.copy(e,this)};var Ce={exports:{}},Ae=Ce.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),Fe(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function Fe(e,t,r,n,i,o,a,s,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,i,o,a,s,c,u),n){var f=n[l];if(Array.isArray(f)){if(l in Ae.arrayKeywords)for(var h=0;h<f.length;h++)Fe(e,t,r,f[h],i+"/"+l+"/"+h,o,i,l,n,h)}else if(l in Ae.propsKeywords){if(f&&"object"==typeof f)for(var d in f)Fe(e,t,r,f[d],i+"/"+l+"/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),o,i,l,n,d)}else(l in Ae.keywords||e.allKeys&&!(l in Ae.skipKeywords))&&Fe(e,t,r,f,i+"/"+l,o,i,l,n)}r(n,i,o,a,s,c,u)}}Ae.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},Ae.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Ae.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Ae.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var De=ue.exports,Re=le,Te=fe,Oe=_e,je=Ce.exports,Ie=Le;function Le(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return Le.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof Oe)return $e(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,o,a,s=qe.call(this,t,r);return s&&(i=s.schema,t=s.root,a=s.baseId),i instanceof Oe?o=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(o=$e(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),o}function qe(e,t){var r=De.parse(t),n=Qe(r),i=He(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==i){var o=Ge(n),a=this._refs[o];if("string"==typeof a)return ze.call(this,e,a,r);if(a instanceof Oe)a.validate||this._compile(a),e=a;else{if(!((a=this._schemas[o])instanceof Oe))return;if(a.validate||this._compile(a),o==Ge(t))return{schema:a,root:e,baseId:i};e=a}if(!e.schema)return;i=He(this._getId(e.schema))}return Ne.call(this,r,i,e.schema,e)}function ze(e,t,r){var n=qe.call(this,e,t);if(n){var i=n.schema,o=n.baseId;e=n.root;var a=this._getId(i);return a&&(o=Ke(o,a)),Ne.call(this,r,o,i,e)}}Le.normalizeId=Ge,Le.fullPath=He,Le.url=Ke,Le.ids=function(e){var t=Ge(this._getId(e)),r={"":t},n={"":He(t,!1)},i={},o=this;return je(e,{allKeys:!0},(function(e,t,a,s,c,u,l){if(""!==t){var f=o._getId(e),h=r[s],d=n[s]+"/"+c;if(void 0!==l&&(d+="/"+("number"==typeof l?l:Te.escapeFragment(l))),"string"==typeof f){f=h=Ge(h?De.resolve(h,f):f);var p=o._refs[f];if("string"==typeof p&&(p=o._refs[p]),p&&p.schema){if(!Re(e,p.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=Ge(d))if("#"==f[0]){if(i[f]&&!Re(e,i[f]))throw new Error('id "'+f+'" resolves to more than one schema');i[f]=e}else o._refs[f]=d}r[t]=h,n[t]=d}})),i},Le.inlineRef=$e,Le.schema=qe;var Me=Te.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Ne(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;o<i.length;o++){var a=i[o];if(a){if(void 0===(r=r[a=Te.unescapeFragment(a)]))break;var s;if(!Me[a]&&((s=this._getId(r))&&(t=Ke(t,s)),r.$ref)){var c=Ke(t,r.$ref),u=qe.call(this,n,c);u&&(r=u.schema,n=u.root,t=u.baseId)}}}return void 0!==r&&r!==n.schema?{schema:r,root:n,baseId:t}:void 0}}var Be=Te.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function $e(e,t){return!1!==t&&(void 0===t||!0===t?Ue(e):t?Ve(e)<=t:void 0)}function Ue(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!Ue(t))return!1}else for(var n in e){if("$ref"==n)return!1;if("object"==typeof(t=e[n])&&!Ue(t))return!1}return!0}function Ve(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(t=e[n])&&(r+=Ve(t)),r==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(Be[i])r++;else if("object"==typeof(t=e[i])&&(r+=Ve(t)+1),r==1/0)return 1/0}return r}function He(e,t){return!1!==t&&(e=Ge(e)),Qe(De.parse(e))}function Qe(e){return De.serialize(e).split("#")[0]+"#"}var We=/#\/?$/;function Ge(e){return e?e.replace(We,""):""}function Ke(e,t){return t=Ge(t),De.resolve(e,t)}var Je=Ie,Ye={Validation:Ze((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:Ze(Xe)};function Xe(e,t,r){this.message=r||Xe.message(e,t),this.missingRef=Je.url(e,t),this.missingSchema=Je.normalizeId(Je.fullPath(this.missingRef))}function Ze(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Xe.message=function(e,t){return"can't resolve reference "+t+" from id "+e};var et=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]},o={key:n,value:t[n]};return e(i,o)}}}(t.cmp),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var o,a;if(Array.isArray(t)){for(a="[",o=0;o<t.length;o++)o&&(a+=","),a+=e(t[o])||"null";return a+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,c=Object.keys(t).sort(n&&n(t));for(a="",o=0;o<c.length;o++){var u=c[o],l=e(t[u]);l&&(a&&(a+=","),a+=JSON.stringify(u)+":"+l)}return i.splice(s,1),"{"+a+"}"}}(e)},tt=function(e,t,r){var n="",i=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),a=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var c="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(c);e.logger.warn(c)}}if(e.isTop&&(n+=" var validate = ",i&&(e.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(e.opts.sourceCode||e.opts.processCode)&&(n+=" /*# sourceURL="+a+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){t="false schema";var u=e.level,l=e.dataLevel,f=e.schema[t],h=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,m="data"+(l||""),g="valid"+u;if(!1===e.schema){e.isTop?p=!0:n+=" var "+g+" = false; ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'boolean schema is false' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var v=n;n=J.pop(),!e.compositeRule&&p?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n+=i?" return data; ":" validate.errors = null; return true; ":n+=" var "+g+" = true; ";return e.isTop&&(n+=" }; return validate; "),n}if(e.isTop){var y=e.isTop;u=e.level=0,l=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}n+=" var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data; "}else{u=e.level,m="data"+((l=e.dataLevel)||"");if(a&&(e.baseId=e.resolve.url(e.baseId,a)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+u+" = errors;"}g="valid"+u,p=!e.opts.allErrors;var w="",x="",k=e.schema.type,E=Array.isArray(k);if(k&&e.opts.nullable&&!0===e.schema.nullable&&(E?-1==k.indexOf("null")&&(k=k.concat("null")):"null"!=k&&(k=[k,"null"],E=!0)),E&&1==k.length&&(k=k[0],E=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(n+=" "+e.RULES.all.$comment.code(e,"$comment")),k){if(e.opts.coerceTypes)var S=e.util.coerceToTypes(e.opts.coerceTypes,k);var P=e.RULES.types[k];if(S||E||!0===P||P&&!Y(P)){h=e.schemaPath+".type",d=e.errSchemaPath+"/type",h=e.schemaPath+".type",d=e.errSchemaPath+"/type";var _=E?"checkDataTypes":"checkDataType";if(n+=" if ("+e.util[_](k,m,e.opts.strictNumbers,!0)+") { ",S){var C="dataType"+u,A="coerced"+u;n+=" var "+C+" = typeof "+m+"; var "+A+" = undefined; ","array"==e.opts.coerceTypes&&(n+=" if ("+C+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+C+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+A+" = "+m+"; } "),n+=" if ("+A+" !== undefined) ; ";var F=S;if(F)for(var D,R=-1,T=F.length-1;R<T;)"string"==(D=F[R+=1])?n+=" else if ("+C+" == 'number' || "+C+" == 'boolean') "+A+" = '' + "+m+"; else if ("+m+" === null) "+A+" = ''; ":"number"==D||"integer"==D?(n+=" else if ("+C+" == 'boolean' || "+m+" === null || ("+C+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==D&&(n+=" && !("+m+" % 1)"),n+=")) "+A+" = +"+m+"; "):"boolean"==D?n+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+A+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+A+" = true; ":"null"==D?n+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+A+" = null; ":"array"==e.opts.coerceTypes&&"array"==D&&(n+=" else if ("+C+" == 'string' || "+C+" == 'number' || "+C+" == 'boolean' || "+m+" == null) "+A+" = ["+m+"]; ");n+=" else { ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&p?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } if ("+A+" !== undefined) { ";var O=l?"data"+(l-1||""):"parentData";n+=" "+m+" = "+A+"; ",l||(n+="if ("+O+" !== undefined)"),n+=" "+O+"["+(l?e.dataPathArr[l]:"parentDataProperty")+"] = "+A+"; } "}else{(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&p?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } "}}if(e.schema.$ref&&!o)n+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",p&&(n+=" } if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}");else{var j=e.RULES;if(j)for(var I=-1,L=j.length-1;I<L;)if(Y(P=j[I+=1])){if(P.type&&(n+=" if ("+e.util.checkDataType(P.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==P.type&&e.schema.properties){f=e.schema.properties;var q=Object.keys(f);if(q)for(var z,M=-1,N=q.length-1;M<N;){if(void 0!==(U=f[z=q[M+=1]]).default){var B=m+e.util.getProperty(z);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}else if("array"==P.type&&Array.isArray(e.schema.items)){var $=e.schema.items;if($){R=-1;for(var U,V=$.length-1;R<V;)if(void 0!==(U=$[R+=1]).default){B=m+"["+R+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}var H=P.rules;if(H)for(var Q,W=-1,G=H.length-1;W<G;)if(X(Q=H[W+=1])){var K=Q.code(e,Q.keyword,P.type);K&&(n+=" "+K+" ",p&&(w+="}"))}if(p&&(n+=" "+w+" ",w=""),P.type&&(n+=" } ",k&&k===P.type&&!S)){n+=" else { ";var J;h=e.schemaPath+".type",d=e.errSchemaPath+"/type";(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&p?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}p&&(n+=" if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}")}}function Y(e){for(var t=e.rules,r=0;r<t.length;r++)if(X(t[r]))return!0}function X(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,n=0;n<r.length;n++)if(void 0!==e.schema[r[n]])return!0}(t)}return p&&(n+=" "+x+" "),y?(i?(n+=" if (errors === 0) return data; ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0; "),n+=" }; return validate;"):n+=" var "+g+" = errors === errs_"+u+";",n},rt=Ie,nt=fe,it=Ye,ot=et,at=tt,st=nt.ucs2length,ct=le,ut=it.Validation,lt=function e(t,r,n,i){var o=this,a=this._opts,s=[void 0],c={},u=[],l={},f=[],h={},d=[];r=r||{schema:t,refVal:s,refs:c};var p=ft.call(this,t,r,i),m=this._compilations[p.index];if(p.compiling)return m.callValidate=function e(){var t=m.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var g=this._formats,v=this.RULES;try{var y=w(t,r,n,i);m.validate=y;var b=m.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,a.sourceCode&&(b.source=y.source)),y}finally{ht.call(this,t,r,i)}function w(t,n,i,l){var h=!n||n&&n.schema==t;if(n.schema!=r.schema)return e.call(o,t,n,i,l);var p,m=!0===t.$async,y=at({isTop:!0,schema:t,isRoot:h,baseId:l,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:it.MissingRef,RULES:v,validate:at,util:nt,resolve:rt,resolveRef:x,usePattern:S,useDefault:P,useCustomRule:_,opts:a,formats:g,logger:o.logger,self:o});y=yt(s,gt)+yt(u,pt)+yt(f,mt)+yt(d,vt)+y,a.processCode&&(y=a.processCode(y,t));try{p=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(o,v,g,r,s,f,d,ct,st,ut),s[0]=p}catch(e){throw o.logger.error("Error compiling schema, function code:",y),e}return p.schema=t,p.errors=null,p.refs=c,p.refVal=s,p.root=h?p:n,m&&(p.$async=!0),!0===a.sourceCode&&(p.source={code:y,patterns:u,defaults:f}),p}function x(t,i,u){i=rt.url(t,i);var l,f,h=c[i];if(void 0!==h)return E(l=s[h],f="refVal["+h+"]");if(!u&&r.refs){var d=r.refs[i];if(void 0!==d)return E(l=r.refVal[d],f=k(i,l))}f=k(i);var p=rt.call(o,w,r,i);if(void 0===p){var m=n&&n[i];m&&(p=rt.inlineRef(m,a.inlineRefs)?m:e.call(o,m,r,n,t))}if(void 0!==p)return function(e,t){var r=c[e];s[r]=t}(i,p),E(p,f);!function(e){delete c[e]}(i)}function k(e,t){var r=s.length;return s[r]=t,c[e]=r,"refVal"+r}function E(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function S(e){var t=l[e];return void 0===t&&(t=l[e]=u.length,u[t]=e),"pattern"+t}function P(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return nt.toQuotedString(e);case"object":if(null===e)return"null";var t=ot(e),r=h[t];return void 0===r&&(r=h[t]=f.length,f[r]=e),"default"+r}}function _(e,t,r,n){if(!1!==o._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s)if(!s(t)){var c="keyword schema is invalid: "+o.errorsText(s.errors);if("log"!=o._opts.validateSchema)throw new Error(c);o.logger.error(c)}}var u,l=e.definition.compile,f=e.definition.inline,h=e.definition.macro;if(l)u=l.call(o,t,r,n);else if(h)u=h.call(o,t,r,n),!1!==a.validateSchema&&o.validateSchema(u,!0);else if(f)u=f.call(o,n,e.keyword,t,r);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var p=d.length;return d[p]=u,{code:"customRule"+p,validate:u}}};function ft(e,t,r){var n=dt.call(this,e,t,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function ht(e,t,r){var n=dt.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function dt(e,t,r){for(var n=0;n<this._compilations.length;n++){var i=this._compilations[n];if(i.schema==e&&i.root==t&&i.baseId==r)return n}return-1}function pt(e,t){return"var pattern"+e+" = new RegExp("+nt.toQuotedString(t[e])+");"}function mt(e){return"var default"+e+" = defaults["+e+"];"}function gt(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function vt(e){return"var customRule"+e+" = customRules["+e+"];"}function yt(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}var bt={exports:{}},wt=bt.exports=function(){this._cache={}};wt.prototype.put=function(e,t){this._cache[e]=t},wt.prototype.get=function(e){return this._cache[e]},wt.prototype.del=function(e){delete this._cache[e]},wt.prototype.clear=function(){this._cache={}};var xt=fe,kt=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Et=[0,31,28,31,30,31,30,31,31,30,31,30,31],St=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Pt=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,_t=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Ct=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,At=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Ft=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Dt=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Rt=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Tt=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ot=jt;function jt(e){return e="full"==e?"full":"fast",xt.copy(jt[e])}function It(e){var t=e.match(kt);if(!t)return!1;var r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:Et[n])}function Lt(e,t){var r=e.match(St);if(!r)return!1;var n=r[1],i=r[2],o=r[3],a=r[5];return(n<=23&&i<=59&&o<=59||23==n&&59==i&&60==o)&&(!t||a)}jt.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Ct,url:At,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Pt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Nt,uuid:Ft,"json-pointer":Dt,"json-pointer-uri-fragment":Rt,"relative-json-pointer":Tt},jt.full={date:It,time:Lt,"date-time":function(e){var t=e.split(qt);return 2==t.length&&It(t[0])&&Lt(t[1],!0)},uri:function(e){return zt.test(e)&&_t.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":Ct,url:At,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Pt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Nt,uuid:Ft,"json-pointer":Dt,"json-pointer-uri-fragment":Rt,"relative-json-pointer":Tt};var qt=/t|\s/i;var zt=/\/|:/;var Mt=/[^\\]\\Z/;function Nt(e){if(Mt.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Bt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s;var d="maximum"==t,p=d?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],g=e.opts.$data&&m&&m.$data,v=d?"<":">",y=d?">":"<",b=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(p+" must be number or boolean");if(g){var w=e.util.getData(m.$data,a,e.dataPathArr),x="exclusive"+o,k="exclType"+o,E="exclIsNumber"+o,S="' + "+(C="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+w+"; ",i+=" var "+x+"; var "+k+" = typeof "+(w="schemaExcl"+o)+"; if ("+k+" != 'boolean' && "+k+" != 'undefined' && "+k+" != 'number') { ";var P;b=p;(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var _=i;i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+k+" == 'number' ? ( ("+x+" = "+n+" === undefined || "+w+" "+v+"= "+n+") ? "+f+" "+y+"= "+w+" : "+f+" "+y+" "+n+" ) : ( ("+x+" = "+w+" === true) ? "+f+" "+y+"= "+n+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { var op"+o+" = "+x+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=p,u=e.errSchemaPath+"/"+p,n=w,h=g)}else{S=v;if((E="number"==typeof m)&&h){var C="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+v+"= "+n+" ? "+f+" "+y+"= "+m+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { "}else{E&&void 0===s?(x=!0,b=p,u=e.errSchemaPath+"/"+p,n=m,y+="="):(E&&(n=Math[d?"min":"max"](m,s)),m===(!E||n)?(x=!0,b=p,u=e.errSchemaPath+"/"+p,y+="="):(x=!1,S+="="));C="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+" "+y+" "+n+" || "+f+" !== "+f+") { "}}b=b||t,(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+C+", limit: "+n+", exclusive: "+x+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+" ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";_=i;return i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i},$t=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var d=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Ut=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var d="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+f+".length ":i+=" ucs2length("+f+") ",i+=" "+d+" "+n+") { ";var p=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Vt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+f+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var d=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Ht={$ref:function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(s||""),h="valid"+a;if("#"==c||"#/"==c)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var d=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===d){var p=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs){e.logger.error(p),(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),o+=" } "):o+=" {} ";var m=o;o=y.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,p);e.logger.warn(p),l&&(o+=" if (true) { ")}}else if(d.inline){var g=e.util.copy(e);g.level++;var v="valid"+g.level;g.schema=d.schema,g.schemaPath="",g.errSchemaPath=c,o+=" "+e.validate(g).replace(/validate\.schema/g,d.code)+" ",l&&(o+=" if ("+v+") { ")}else n=!0===d.$async||e.async&&!1!==d.$async,i=d.code}if(i){var y;(y=y||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+f+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var b=o+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(o=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(o+=" var "+h+"; "),o+=" try { await "+b+"; ",l&&(o+=" "+h+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(o+=" "+h+" = false; "),o+=" } ",l&&(o+=" if ("+h+") { ")}else o+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(o+=" else { ")}return o},allOf:function(e,t,r){var n=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,c=e.util.copy(e),u="";c.level++;var l="valid"+c.level,f=c.baseId,h=!0,d=i;if(d)for(var p,m=-1,g=d.length-1;m<g;)p=d[m+=1],(e.opts.strictKeywords?"object"==typeof p&&Object.keys(p).length>0||!1===p:e.util.schemaHasRules(p,e.RULES.all))&&(h=!1,c.schema=p,c.schemaPath=o+"["+m+"]",c.errSchemaPath=a+"/"+m,n+=" "+e.validate(c)+" ",c.baseId=f,s&&(n+=" if ("+l+") { ",u+="}"));return s&&(n+=h?" if (true) { ":" "+u.slice(0,-1)+" "),n},anyOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,g=a.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=d.baseId;n+=" var "+h+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=d.compositeRule=!0;var b=a;if(b)for(var w,x=-1,k=b.length-1;x<k;)w=b[x+=1],d.schema=w,d.schemaPath=s+"["+x+"]",d.errSchemaPath=c+"/"+x,n+=" "+e.validate(d)+" ",d.baseId=v,n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ",p+="}";e.compositeRule=d.compositeRule=y,n+=" "+p+" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else u&&(n+=" if (true) { ");return n},$comment:function(e,t,r){var n=" ",i=e.schema[t],o=e.errSchemaPath+"/"+t;e.opts.allErrors;var a=e.util.toQuotedString(i);return!0===e.opts.$comment?n+=" console.log("+a+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+a+", "+e.util.toQuotedString(o)+", validate.root.schema);"),n},const:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; "),h||(n+=" var schema"+i+" = validate.schema"+s+";"),n+="var "+f+" = equal("+l+", schema"+i+"); if (!"+f+") { ";var d=d||[];d.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var p=n;return n=d.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+p+"]); ":n+=" validate.errors = ["+p+"]; return false; ":n+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},contains:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,d=e.util.copy(e);d.level++;var p="valid"+d.level,m="i"+i,g=d.dataLevel=e.dataLevel+1,v="data"+g,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all);if(n+="var "+h+" = errors;var "+f+";",b){var w=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.schema=a,d.schemaPath=s,d.errSchemaPath=c,n+=" var "+p+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var x=l+"["+m+"]";d.dataPathArr[g]=m;var k=e.validate(d);d.baseId=y,e.util.varOccurences(k,v)<2?n+=" "+e.util.varReplace(k,v,x)+" ":n+=" var "+v+" = "+x+"; "+k+" ",n+=" if ("+p+") break; } ",e.compositeRule=d.compositeRule=w,n+=" if (!"+p+") {"}else n+=" if ("+l+".length == 0) {";var E=E||[];E.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;return n=E.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",b&&(n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n},dependencies:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),d="";h.level++;var p="valid"+h.level,m={},g={},v=e.opts.ownProperties;for(x in a)if("__proto__"!=x){var y=a[x],b=Array.isArray(y)?g:m;b[x]=y}n+="var "+f+" = errors;";var w=e.errorPath;for(var x in n+="var missing"+i+";",g)if((b=g[x]).length){if(n+=" if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),u){n+=" && ( ";var k=b;if(k)for(var E=-1,S=k.length-1;E<S;){D=k[E+=1],E&&(n+=" || "),n+=" ( ( "+(j=l+(O=e.util.getProperty(D)))+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:O)+") ) "}n+=")) { ";var P="missing"+i,_="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,P,!0):w+" + "+P);var C=C||[];C.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var A=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+A+"]); ":n+=" validate.errors = ["+A+"]; return false; ":n+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var F=b;if(F)for(var D,R=-1,T=F.length-1;R<T;){D=F[R+=1];var O=e.util.getProperty(D),j=(_=e.util.escapeQuotes(D),l+O);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,D,e.opts.jsonPointers)),n+=" if ( "+j+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",u&&(d+="}",n+=" else { ")}e.errorPath=w;var I=h.baseId;for(var x in m){y=m[x];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+p+" = true; if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),n+=") { ",h.schema=y,h.schemaPath=s+e.util.getProperty(x),h.errSchemaPath=c+"/"+e.util.escapeFragment(x),n+=" "+e.validate(h)+" ",h.baseId=I,n+=" } ",u&&(n+=" if ("+p+") { ",d+="}"))}return u&&(n+=" "+d+" if ("+f+" == errors) {"),n},enum:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var d="i"+i,p="schema"+i;h||(n+=" var "+p+" = validate.schema"+s+";"),n+="var "+f+";",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=f+" = false;for (var "+d+"=0; "+d+"<"+p+".length; "+d+"++) if (equal("+l+", "+p+"["+d+"])) { "+f+" = true; break; }",h&&(n+=" } "),n+=" if (!"+f+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var g=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+g+"]); ":n+=" validate.errors = ["+g+"]; return false; ":n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},format:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var f,h=e.opts.$data&&a&&a.$data;h?(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",f="schema"+i):f=a;var d=e.opts.unknownFormats,p=Array.isArray(d);if(h){n+=" var "+(m="format"+i)+" = formats["+f+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(n+=" var async"+i+" = "+m+".async; "),n+=" "+m+" = "+m+".validate; } if ( ",h&&(n+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),n+=" (","ignore"!=d&&(n+=" ("+f+" && !"+m+" ",p&&(n+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),n+=") || "),n+=" ("+m+" && "+v+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+m+"("+l+") : "+m+"("+l+")) ":n+=" "+m+"("+l+") ",n+=" : "+m+".test("+l+"))))) {"}else{var m;if(!(m=e.formats[a])){if("ignore"==d)return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(p&&d.indexOf(a)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,v=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var y=!0===m.async;m=m.validate}if(v!=r)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(b="formats"+e.util.getProperty(a)+".validate")+"("+l+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(a);g&&(b+=".validate"),n+="function"==typeof m?" "+b+"("+l+") ":" "+b+".test("+l+") ",n+=") { "}}var w=w||[];w.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { format: ",n+=h?""+f:""+e.util.toQuotedString(a),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=h?"' + "+f+" + '":""+e.util.escapeQuotes(a),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+e.util.toQuotedString(a),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var x=n;return n=w.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+x+"]); ":n+=" validate.errors = ["+x+"]; return false; ":n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n},if:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,d=e.util.copy(e);d.level++;var p="valid"+d.level,m=e.schema.then,g=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=d.baseId;if(v||y){var w;d.createErrors=!1,d.schema=a,d.schemaPath=s,d.errSchemaPath=c,n+=" var "+h+" = errors; var "+f+" = true; ";var x=e.compositeRule;e.compositeRule=d.compositeRule=!0,n+=" "+e.validate(d)+" ",d.baseId=b,d.createErrors=!0,n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=d.compositeRule=x,v?(n+=" if ("+p+") { ",d.schema=e.schema.then,d.schemaPath=e.schemaPath+".then",d.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(d)+" ",d.baseId=b,n+=" "+f+" = "+p+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'then'; ":w="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+p+") { ",y&&(d.schema=e.schema.else,d.schemaPath=e.schemaPath+".else",d.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(d)+" ",d.baseId=b,n+=" "+f+" = "+p+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'else'; ":w="'else'",n+=" } "),n+=" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { failingKeyword: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+w+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n},items:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,g="i"+i,v=d.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId;if(n+="var "+h+" = errors;var "+f+";",Array.isArray(a)){var w=e.schema.additionalItems;if(!1===w){n+=" "+f+" = "+l+".length <= "+a.length+"; ";var x=c;c=e.errSchemaPath+"/additionalItems",n+=" if (!"+f+") { ";var k=k||[];k.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var E=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c=x,u&&(p+="}",n+=" else { ")}var S=a;if(S)for(var P,_=-1,C=S.length-1;_<C;)if(P=S[_+=1],e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+l+".length > "+_+") { ";var A=l+"["+_+"]";d.schema=P,d.schemaPath=s+"["+_+"]",d.errSchemaPath=c+"/"+_,d.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),d.dataPathArr[v]=_;var F=e.validate(d);d.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,A)+" ":n+=" var "+y+" = "+A+"; "+F+" ",n+=" } ",u&&(n+=" if ("+m+") { ",p+="}")}if("object"==typeof w&&(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))){d.schema=w,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+l+".length > "+a.length+") { for (var "+g+" = "+a.length+"; "+g+" < "+l+".length; "+g+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);A=l+"["+g+"]";d.dataPathArr[v]=g;F=e.validate(d);d.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,A)+" ":n+=" var "+y+" = "+A+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" } } ",u&&(n+=" if ("+m+") { ",p+="}")}}else if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){d.schema=a,d.schemaPath=s,d.errSchemaPath=c,n+=" for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);A=l+"["+g+"]";d.dataPathArr[v]=g;F=e.validate(d);d.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,A)+" ":n+=" var "+y+" = "+A+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" }"}return u&&(n+=" "+p+" if ("+h+" == errors) {"),n},maximum:Bt,minimum:Bt,maxItems:$t,minItems:$t,maxLength:Ut,minLength:Ut,maxProperties:Vt,minProperties:Vt,multipleOf:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="var division"+o+";if (",h&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+o+" = "+f+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var p=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},not:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var d="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c,n+=" var "+f+" = errors; ";var p,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(p=h.opts.allErrors,h.opts.allErrors=!1),n+=" "+e.validate(h)+" ",h.createErrors=!0,p&&(h.opts.allErrors=p),e.compositeRule=h.compositeRule=m,n+=" if ("+d+") { ";var g=g||[];g.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var v=n;n=g.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n},oneOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,g=d.baseId,v="prevValid"+i,y="passingSchemas"+i;n+="var "+h+" = errors , "+v+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=d.compositeRule=!0;var w=a;if(w)for(var x,k=-1,E=w.length-1;k<E;)x=w[k+=1],(e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all))?(d.schema=x,d.schemaPath=s+"["+k+"]",d.errSchemaPath=c+"/"+k,n+=" "+e.validate(d)+" ",d.baseId=g):n+=" var "+m+" = true; ",k&&(n+=" if ("+m+" && "+v+") { "+f+" = false; "+y+" = ["+y+", "+k+"]; } else { ",p+="}"),n+=" if ("+m+") { "+f+" = "+v+" = true; "+y+" = "+k+"; }";return e.compositeRule=d.compositeRule=b,n+=p+"if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n},pattern:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(h?"(new RegExp("+n+"))":e.usePattern(s))+".test("+f+") ) { ";var d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=h?""+n:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+n+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var p=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},properties:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),d="";h.level++;var p="valid"+h.level,m="key"+i,g="idx"+i,v=h.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,w=Object.keys(a||{}).filter(O),x=e.schema.patternProperties||{},k=Object.keys(x).filter(O),E=e.schema.additionalProperties,S=w.length||k.length,P=!1===E,_="object"==typeof E&&Object.keys(E).length,C=e.opts.removeAdditional,A=P||_||C,F=e.opts.ownProperties,D=e.baseId,R=e.schema.required;if(R&&(!e.opts.$data||!R.$data)&&R.length<e.opts.loopRequired)var T=e.util.toHash(R);function O(e){return"__proto__"!==e}if(n+="var "+f+" = errors;var "+p+" = true;",F&&(n+=" var "+b+" = undefined;"),A){if(n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",S){if(n+=" var isAdditional"+i+" = !(false ",w.length)if(w.length>8)n+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var j=w;if(j)for(var I=-1,L=j.length-1;I<L;)K=j[I+=1],n+=" || "+m+" == "+e.util.toQuotedString(K)+" "}if(k.length){var q=k;if(q)for(var z=-1,M=q.length-1;z<M;)oe=q[z+=1],n+=" || "+e.usePattern(oe)+".test("+m+") "}n+=" ); if (isAdditional"+i+") { "}if("all"==C)n+=" delete "+l+"["+m+"]; ";else{var N=e.errorPath,B="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),P)if(C)n+=" delete "+l+"["+m+"]; ";else{n+=" "+p+" = false; ";var $=c;c=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+B+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,u&&(n+=" break; ")}else if(_)if("failing"==C){n+=" var "+f+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var H=l+"["+m+"]";h.dataPathArr[v]=m;var Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",n+=" if (!"+p+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+l+"["+m+"]; } ",e.compositeRule=h.compositeRule=V}else{h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+p+") break; ")}e.errorPath=N}S&&(n+=" } "),n+=" } ",u&&(n+=" if ("+p+") { ",d+="}")}var W=e.opts.useDefaults&&!e.compositeRule;if(w.length){var G=w;if(G)for(var K,J=-1,Y=G.length-1;J<Y;){var X=a[K=G[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Z=e.util.getProperty(K),ee=(H=l+Z,W&&void 0!==X.default);h.schema=X,h.schemaPath=s+Z,h.errSchemaPath=c+"/"+e.util.escapeFragment(K),h.errorPath=e.util.getPath(e.errorPath,K,e.opts.jsonPointers),h.dataPathArr[v]=e.util.toQuotedString(K);Q=e.validate(h);if(h.baseId=D,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,H);var te=H}else{te=y;n+=" var "+y+" = "+H+"; "}if(ee)n+=" "+Q+" ";else{if(T&&T[K]){n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+p+" = false; ";N=e.errorPath,$=c;var re,ne=e.util.escapeQuotes(K);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(N,K,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+ne+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,e.errorPath=N,n+=" } else { "}else u?(n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+p+" = true; } else { "):(n+=" if ("+te+" !== undefined ",F&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=" ) { ");n+=" "+Q+" } "}}u&&(n+=" if ("+p+") { ",d+="}")}}if(k.length){var ie=k;if(ie)for(var oe,ae=-1,se=ie.length-1;ae<se;){X=x[oe=ie[ae+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){h.schema=X,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",n+=" if ("+e.usePattern(oe)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+p+") break; "),n+=" } ",u&&(n+=" else "+p+" = true; "),n+=" } ",u&&(n+=" if ("+p+") { ",d+="}")}}}return u&&(n+=" "+d+" if ("+f+" == errors) {"),n},propertyNames:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var d="valid"+h.level;if(n+="var "+f+" = errors;",e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c;var p="key"+i,m="idx"+i,g="i"+i,v="' + "+p+" + '",y="data"+(h.dataLevel=e.dataLevel+1),b="dataProperties"+i,w=e.opts.ownProperties,x=e.baseId;w&&(n+=" var "+b+" = undefined; "),n+=w?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+p+" = "+b+"["+m+"]; ":" for (var "+p+" in "+l+") { ",n+=" var startErrs"+i+" = errors; ";var k=p,E=e.compositeRule;e.compositeRule=h.compositeRule=!0;var S=e.validate(h);h.baseId=x,e.util.varOccurences(S,y)<2?n+=" "+e.util.varReplace(S,y,k)+" ":n+=" var "+y+" = "+k+"; "+S+" ",e.compositeRule=h.compositeRule=E,n+=" if (!"+d+") { for (var "+g+"=startErrs"+i+"; "+g+"<errors; "+g+"++) { vErrors["+g+"].propertyName = "+p+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { propertyName: '"+v+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+v+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),u&&(n+=" break; "),n+=" } }"}return u&&(n+=" if ("+f+" == errors) {"),n},required:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var d="schema"+i;if(!h)if(a.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var p=[],m=a;if(m)for(var g,v=-1,y=m.length-1;v<y;){g=m[v+=1];var b=e.schema.properties[g];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(p[p.length]=g)}}else p=a;if(h||p.length){var w=e.errorPath,x=h||p.length>=e.opts.loopRequired,k=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",x){h||(n+=" var "+d+" = validate.schema"+s+"; ");var E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),n+=" var "+f+" = true; ",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=" for (var "+_+" = 0; "+_+" < "+d+".length; "+_+"++) { "+f+" = "+l+"["+d+"["+_+"]] !== undefined ",k&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", "+d+"["+_+"]) "),n+="; if (!"+f+") break; } ",h&&(n+=" } "),n+=" if (!"+f+") { ",(A=A||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var P=p;if(P)for(var _=-1,C=P.length-1;_<C;){R=P[_+=1],_&&(n+=" || "),n+=" ( ( "+(I=l+(j=e.util.getProperty(R)))+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(R)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?R:j)+") ) "}n+=") { ";var A;E="' + "+(F="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,F,!0):w+" + "+F),(A=A||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";S=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(x){h||(n+=" var "+d+" = validate.schema"+s+"; ");var F;E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),h&&(n+=" if ("+d+" && !Array.isArray("+d+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+d+" !== undefined) { "),n+=" for (var "+_+" = 0; "+_+" < "+d+".length; "+_+"++) { if ("+l+"["+d+"["+_+"]] === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", "+d+"["+_+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(n+=" } ")}else{var D=p;if(D)for(var R,T=-1,O=D.length-1;T<O;){R=D[T+=1];var j=e.util.getProperty(R),I=(E=e.util.escapeQuotes(R),l+j);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,R,e.opts.jsonPointers)),n+=" if ( "+I+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(R)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=w}else u&&(n+=" if (true) {");return n},uniqueItems:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h="valid"+o,d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,(s||d)&&!1!==e.opts.uniqueItems){d&&(i+=" var "+h+"; if ("+n+" === false || "+n+" === undefined) "+h+" = true; else if (typeof "+n+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+f+".length , "+h+" = true , j; if (i > 1) { ";var p=e.schema.items&&e.schema.items.type,m=Array.isArray(p);if(!p||"object"==p||"array"==p||m&&(p.indexOf("object")>=0||p.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+f+"[i], "+f+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+f+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](p,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",d&&(i+=" } "),i+=" if (!"+h+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i},validate:tt},Qt=Ht,Wt=fe.toHash,Gt=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Kt=Ye.MissingRef,Jt=function e(t,r,n){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(n=r,r=void 0);var o=a(t).then((function(){var e=i._addSchema(t,void 0,r);return e.validate||s(e)}));n&&o.then((function(e){n(null,e)}),n);return o;function a(t){var r=t.$schema;return r&&!i.getSchema(r)?e.call(i,{$ref:r},!0):Promise.resolve()}function s(e){try{return i._compile(e)}catch(t){if(t instanceof Kt)return function(t){var n=t.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+t.missingRef+" cannot be resolved");var o=i._loadingSchemas[n];o||(o=i._loadingSchemas[n]=i._opts.loadSchema(n)).then(c,c);return o.then((function(e){if(!u(n))return a(e).then((function(){u(n)||i.addSchema(e,n,void 0,r)}))})).then((function(){return s(e)}));function c(){delete i._loadingSchemas[n]}function u(e){return i._refs[e]||i._schemas[e]}}(t);throw t}}};var Yt={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},Xt=Yt,Zt={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Xt.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Xt.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},er=/^[a-z_$][a-z0-9_$-]*$/i,tr=function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,h="data"+(s||""),d="valid"+a,p="errs__"+a,m=e.opts.$data&&c&&c.$data;m?(o+=" var schema"+a+" = "+e.util.getData(c.$data,s,e.dataPathArr)+"; ",i="schema"+a):i=c;var g,v,y,b,w,x=this,k="definition"+a,E=x.definition,S="";if(m&&E.$data){w="keywordValidate"+a;var P=E.validateSchema;o+=" var "+k+" = RULES.custom['"+t+"'].definition; var "+w+" = "+k+".validate;"}else{if(!(b=e.useCustomRule(x,c,e.schema,e)))return;i="validate.schema"+u,w=b.code,g=E.compile,v=E.inline,y=E.macro}var _=w+".errors",C="i"+a,A="ruleErr"+a,F=E.async;if(F&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(o+=_+" = null;"),o+="var "+p+" = errors;var "+d+";",m&&E.$data&&(S+="}",o+=" if ("+i+" === undefined) { "+d+" = true; } else { ",P&&(S+="}",o+=" "+d+" = "+k+".validateSchema("+i+"); if ("+d+") { ")),v)E.statements?o+=" "+b.validate+" ":o+=" "+d+" = "+b.validate+"; ";else if(y){var D=e.util.copy(e);S="";D.level++;var R="valid"+D.level;D.schema=b.validate,D.schemaPath="";var T=e.compositeRule;e.compositeRule=D.compositeRule=!0;var O=e.validate(D).replace(/validate\.schema/g,w);e.compositeRule=D.compositeRule=T,o+=" "+O}else{(q=q||[]).push(o),o="",o+=" "+w+".call( ",e.opts.passContext?o+="this":o+="self",g||!1===E.schema?o+=" , "+h+" ":o+=" , "+i+" , "+h+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var j=s?"data"+(s-1||""):"parentData",I=s?e.dataPathArr[s]:"parentDataProperty",L=o+=" , "+j+" , "+I+" , rootData ) ";o=q.pop(),!1===E.errors?(o+=" "+d+" = ",F&&(o+="await "),o+=L+"; "):o+=F?" var "+(_="customErrors"+a)+" = null; try { "+d+" = await "+L+"; } catch (e) { "+d+" = false; if (e instanceof ValidationError) "+_+" = e.errors; else throw e; } ":" "+_+" = null; "+d+" = "+L+"; "}if(E.modifying&&(o+=" if ("+j+") "+h+" = "+j+"["+I+"];"),o+=""+S,E.valid)f&&(o+=" if (true) { ");else{var q;o+=" if ( ",void 0===E.valid?(o+=" !",o+=y?""+R:""+d):o+=" "+!E.valid+" ",o+=") { ",n=x.keyword,(q=q||[]).push(o),o="",(q=q||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var z=o;o=q.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+z+"]); ":o+=" validate.errors = ["+z+"]; return false; ":o+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var M=o;o=q.pop(),v?E.errors?"full"!=E.errors&&(o+=" for (var "+C+"="+p+"; "+C+"<errors; "+C+"++) { var "+A+" = vErrors["+C+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+A+".schema = "+i+"; "+A+".data = "+h+"; "),o+=" } "):!1===E.errors?o+=" "+M+" ":(o+=" if ("+p+" == errors) { "+M+" } else { for (var "+C+"="+p+"; "+C+"<errors; "+C+"++) { var "+A+" = vErrors["+C+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+A+".schema = "+i+"; "+A+".data = "+h+"; "),o+=" } } "):y?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(e.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; ")):!1===E.errors?o+=" "+M+" ":(o+=" if (Array.isArray("+_+")) { if (vErrors === null) vErrors = "+_+"; else vErrors = vErrors.concat("+_+"); errors = vErrors.length; for (var "+C+"="+p+"; "+C+"<errors; "+C+"++) { var "+A+" = vErrors["+C+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; "+A+'.schemaPath = "'+l+'"; ',e.opts.verbose&&(o+=" "+A+".schema = "+i+"; "+A+".data = "+h+"; "),o+=" } } else { "+M+" } "),o+=" } ",f&&(o+=" else { ")}return o},rr=Zt,nr={add:function(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!er.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var n=t.type;if(Array.isArray(n))for(var i=0;i<n.length;i++)a(e,n[i],t);else a(e,n,t);var o=t.metaSchema;o&&(t.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(o,!0))}function a(e,t,n){for(var i,o=0;o<r.length;o++){var a=r[o];if(a.type==t){i=a;break}}i||(i={type:t,rules:[]},r.push(i));var s={keyword:e,definition:n,custom:!0,code:tr,implements:n.implements};i.rules.push(s),r.custom[e]=s}return r.keywords[e]=r.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var n=t[r].rules,i=0;i<n.length;i++)if(n[i].keyword==e){n.splice(i,1);break}return this},validate:function e(t,r){e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(rr,!0);if(n(t))return!0;if(e.errors=n.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}};var ir={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},or=lt,ar=Ie,sr=bt.exports,cr=_e,ur=et,lr=Ot,fr=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=Wt(t),e.types=Wt(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var n;if("object"==typeof r){var i=Object.keys(r)[0];n=r[i],r=i,n.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:Qt[r],implements:n}})),e.all.$comment={keyword:"$comment",code:Qt.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=Wt(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e},hr=function(e,t){for(var r=0;r<t.length;r++){e=JSON.parse(JSON.stringify(e));var n,i=t[r].split("/"),o=e;for(n=1;n<i.length;n++)o=o[i[n]];for(n=0;n<Gt.length;n++){var a=Gt[n],s=o[a];s&&(o[a]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},dr=fe,pr=wr;wr.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);!0!==r.$async&&(this.errors=r.errors);return i},wr.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},wr.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],void 0,r,n);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return _r(this,t=ar.normalizeId(t||o)),this._schemas[t]=this._addSchema(e,r,n,!0),this},wr.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},wr.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(vr)?vr:void 0,e._opts.defaultMeta}(this),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,e);if(!n&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return n},wr.prototype.getSchema=function(e){var t=xr(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=ar.schema.call(e,{schema:{}},t);if(r){var n=r.schema,i=r.root,o=r.baseId,a=or.call(e,n,i,void 0,o);return e._fragments[t]=new cr({ref:t,fragment:!0,schema:n,root:i,baseId:o,validate:a}),a}}(this,e)}},wr.prototype.removeSchema=function(e){if(e instanceof RegExp)return kr(this,this._schemas,e),kr(this,this._refs,e),this;switch(typeof e){case"undefined":return kr(this,this._schemas),kr(this,this._refs),this._cache.clear(),this;case"string":var t=xr(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,n=r?r(e):e;this._cache.del(n);var i=this._getId(e);i&&(i=ar.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},wr.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},wr.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,i="",o=0;o<e.length;o++){var a=e[o];a&&(i+=n+a.dataPath+" "+a.message+r)}return i.slice(0,-r.length)},wr.prototype._addSchema=function(e,t,r,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var i=this._opts.serialize,o=i?i(e):e,a=this._cache.get(o);if(a)return a;n=n||!1!==this._opts.addUsedSchema;var s=ar.normalizeId(this._getId(e));s&&n&&_r(this,s);var c,u=!1!==this._opts.validateSchema&&!t;u&&!(c=s&&s==ar.normalizeId(e.$schema))&&this.validateSchema(e,!0);var l=ar.ids.call(this,e),f=new cr({id:s,schema:e,localRefs:l,cacheKey:o,meta:r});"#"!=s[0]&&n&&(this._refs[s]=f);this._cache.put(o,f),u&&c&&this.validateSchema(e,!0);return f},wr.prototype._compile=function(e,t){if(e.compiling)return e.validate=i,i.schema=e.schema,i.errors=null,i.root=t||i,!0===e.schema.$async&&(i.$async=!0),i;var r,n;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{n=or.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=n,e.refs=n.refs,e.refVal=n.refVal,e.root=n.root,n;function i(){var t=e.validate,r=t.apply(this,arguments);return i.errors=t.errors,r}},wr.prototype.compileAsync=Jt;var mr=nr;wr.prototype.addKeyword=mr.add,wr.prototype.getKeyword=mr.get,wr.prototype.removeKeyword=mr.remove,wr.prototype.validateKeyword=mr.validate;var gr=Ye;wr.ValidationError=gr.Validation,wr.MissingRefError=gr.MissingRef,wr.$dataMetaSchema=hr;var vr="http://json-schema.org/draft-07/schema",yr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],br=["/properties"];function wr(e){if(!(this instanceof wr))return new wr(e);e=this._opts=dr.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:Cr,warn:Cr,error:Cr};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=lr(e.format),this._cache=e.cache||new sr,this._loadingSchemas={},this._compilations=[],this.RULES=fr(),this._getId=function(e){switch(e.schemaId){case"auto":return Pr;case"id":return Er;default:return Sr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=ur),this._metaOpts=function(e){for(var t=dr.copy(e._opts),r=0;r<yr.length;r++)delete t[yr[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;e._opts.$data&&(t=ir,e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=Yt;e._opts.$data&&(r=hr(r,br));e.addMetaSchema(r,vr,!0),e._refs["http://json-schema.org/schema"]=vr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function xr(e,t){return t=ar.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function kr(e,t,r){for(var n in t){var i=t[n];i.meta||r&&!r.test(n)||(e._cache.del(i.cacheKey),delete t[n])}}function Er(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Sr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Pr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function _r(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function Cr(){}var Ar,Fr={exports:{}},Dr={exports:{}};Dr.exports=(Ar=Ar||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==ae&&ae.crypto&&(r=ae.crypto),!r)try{r=require("crypto")}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=o.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(i,f);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=d.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=o.algo={};return o}(Math),Ar);var Rr={exports:{}};Rr.exports=function(e){return function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(Dr.exports);var Tr={exports:{}};Tr.exports=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],x=e[t+10],k=e[t+11],E=e[t+12],S=e[t+13],P=e[t+14],_=e[t+15],C=o[0],A=o[1],F=o[2],D=o[3];C=u(C,A,F,D,a,7,s[0]),D=u(D,C,A,F,c,12,s[1]),F=u(F,D,C,A,d,17,s[2]),A=u(A,F,D,C,p,22,s[3]),C=u(C,A,F,D,m,7,s[4]),D=u(D,C,A,F,g,12,s[5]),F=u(F,D,C,A,v,17,s[6]),A=u(A,F,D,C,y,22,s[7]),C=u(C,A,F,D,b,7,s[8]),D=u(D,C,A,F,w,12,s[9]),F=u(F,D,C,A,x,17,s[10]),A=u(A,F,D,C,k,22,s[11]),C=u(C,A,F,D,E,7,s[12]),D=u(D,C,A,F,S,12,s[13]),F=u(F,D,C,A,P,17,s[14]),C=l(C,A=u(A,F,D,C,_,22,s[15]),F,D,c,5,s[16]),D=l(D,C,A,F,v,9,s[17]),F=l(F,D,C,A,k,14,s[18]),A=l(A,F,D,C,a,20,s[19]),C=l(C,A,F,D,g,5,s[20]),D=l(D,C,A,F,x,9,s[21]),F=l(F,D,C,A,_,14,s[22]),A=l(A,F,D,C,m,20,s[23]),C=l(C,A,F,D,w,5,s[24]),D=l(D,C,A,F,P,9,s[25]),F=l(F,D,C,A,p,14,s[26]),A=l(A,F,D,C,b,20,s[27]),C=l(C,A,F,D,S,5,s[28]),D=l(D,C,A,F,d,9,s[29]),F=l(F,D,C,A,y,14,s[30]),C=f(C,A=l(A,F,D,C,E,20,s[31]),F,D,g,4,s[32]),D=f(D,C,A,F,b,11,s[33]),F=f(F,D,C,A,k,16,s[34]),A=f(A,F,D,C,P,23,s[35]),C=f(C,A,F,D,c,4,s[36]),D=f(D,C,A,F,m,11,s[37]),F=f(F,D,C,A,y,16,s[38]),A=f(A,F,D,C,x,23,s[39]),C=f(C,A,F,D,S,4,s[40]),D=f(D,C,A,F,a,11,s[41]),F=f(F,D,C,A,p,16,s[42]),A=f(A,F,D,C,v,23,s[43]),C=f(C,A,F,D,w,4,s[44]),D=f(D,C,A,F,E,11,s[45]),F=f(F,D,C,A,_,16,s[46]),C=h(C,A=f(A,F,D,C,d,23,s[47]),F,D,a,6,s[48]),D=h(D,C,A,F,y,10,s[49]),F=h(F,D,C,A,P,15,s[50]),A=h(A,F,D,C,g,21,s[51]),C=h(C,A,F,D,E,6,s[52]),D=h(D,C,A,F,p,10,s[53]),F=h(F,D,C,A,x,15,s[54]),A=h(A,F,D,C,c,21,s[55]),C=h(C,A,F,D,b,6,s[56]),D=h(D,C,A,F,_,10,s[57]),F=h(F,D,C,A,v,15,s[58]),A=h(A,F,D,C,S,21,s[59]),C=h(C,A,F,D,m,6,s[60]),D=h(D,C,A,F,k,10,s[61]),F=h(F,D,C,A,d,15,s[62]),A=h(A,F,D,C,w,21,s[63]),o[0]=o[0]+C|0,o[1]=o[1]+A|0,o[2]=o[2]+F|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var o=t.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}r.MD5=o._createHelper(c),r.HmacMD5=o._createHmacHelper(c)}(Math),e.MD5}(Dr.exports);var Or={exports:{}},jr={exports:{}};jr.exports=function(e){return r=(t=e).lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],c=r[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var l=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=l<<1|l>>>31}var f=(n<<5|n>>>27)+c+a[u];f+=u<20?1518500249+(i&o|~i&s):u<40?1859775393+(i^o^s):u<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,c=s,s=o,o=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s),e.SHA1;var t,r,n,i,o,a,s}(Dr.exports);var Ir={exports:{}};Ir.exports=function(e){var t,r,n;r=(t=e).lib.Base,n=t.enc.Utf8,t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,u=0;u<r;u++)s[u]^=1549556828,c[u]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}(Dr.exports),Or.exports=function(e){return r=(t=e).lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,c=n.keySize,u=n.iterations;s.length<c;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var l=1;l<u;l++)r=o.finalize(r),o.reset();a.concat(r)}return a.sigBytes=4*c,a}}),t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)},e.EvpKDF;var t,r,n,i,o,a,s}(Dr.exports);var Lr={exports:{}};Lr.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc;s.Utf8;var c=s.Base64,u=r.algo.EvpKDF,l=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=r.mode={},h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=f.CBC=function(){var e=h.extend();function r(e,r,n){var i,o=this._iv;o?(i=o,this._iv=t):i=this._prevBlock;for(var a=0;a<n;a++)e[r+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=o}}),e}(),p=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(i);var c=o.create(a,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:p}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(r.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=o.random(8));var i=u.create({keySize:t+r}).compute(e,n),a=o.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:a,salt:n})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}()}(Dr.exports),Fr.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var m=e[r],g=e[m],v=e[g],y=257*e[p]^16843008*p;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(u=o[a-1],a%r?r>6&&a%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[a/r|0]<<24),o[a]=o[a-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^f[i[u>>>16&255]]^h[i[u>>>8&255]]^d[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,d,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],d=4,p=1;p<c;p++){var m=n[u>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&h]^r[d++],g=n[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&u]^r[d++],v=n[f>>>24]^i[h>>>16&255]^o[u>>>8&255]^a[255&l]^r[d++],y=n[h>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&f]^r[d++];u=m,l=g,f=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^r[d++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[d++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[d++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[d++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});t.AES=r._createHelper(m)}(),e.AES}(Dr.exports);var qr={exports:{}};qr.exports=function(e){return e.enc.Utf8}(Dr.exports);const zr={},Mr={};function Nr(e,t){let r=t;for(let t=0;t<e.length;t++){const n=t===e.length-1,i=e.charAt(t),o=r[i]||(r[i]={chars:{}});n&&(o.self=e),r=o.chars}}function Br(e){if(0===e.length)return zr;const t={};for(const r of e)Nr(r,t);return t}function $r(e){if(0===e.length)return Mr;const t={};for(const r of e)t[r]=!0;return t}const Ur={},Vr={type:"String",optional:!0};function Hr(e){const t={optional:!1};function r(e){if(t.type&&t.type!==e)throw new Error(`Conflicting pseudo-class argument type: "${t.type}" vs "${e}".`);t.type=e}for(const n of e)"NoArgument"===n&&(t.optional=!0),"Formula"===n&&r("Formula"),"FormulaOfSelector"===n&&(r("Formula"),t.ofSelector=!0),"String"===n&&r("String"),"Selector"===n&&r("Selector");return t}function Qr(e){const t=function(e){const t={};for(const r of Object.keys(e)){const n=e[r];if(n)for(const e of n)(t[e]||(t[e]=[])).push(r)}return t}(e),r={};for(const e of Object.keys(t)){const n=t[e];n&&(r[e]=Hr(n))}return r}const Wr={},Gr={wildcard:!0};function Kr(e){return e?"boolean"==typeof e?Gr:e:Wr}function Jr(e,t){const r={...e};if("tag"in t)if(t.tag){r.tag={...Kr(e.tag)};const n=Kr(t.tag);"wildcard"in n&&(r.tag.wildcard=n.wildcard)}else r.tag=void 0;if("ids"in t&&(r.ids=t.ids),"classNames"in t&&(r.classNames=t.classNames),"namespace"in t)if(t.namespace){r.namespace={...Kr(e.namespace)};const n=Kr(t.namespace);"wildcard"in n&&(r.namespace.wildcard=n.wildcard)}else r.namespace=void 0;if("combinators"in t&&(t.combinators?r.combinators=r.combinators?r.combinators.concat(t.combinators):t.combinators:r.combinators=void 0),"attributes"in t&&(t.attributes?(r.attributes={...e.attributes},"unknownCaseSensitivityModifiers"in t.attributes&&(r.attributes.unknownCaseSensitivityModifiers=t.attributes.unknownCaseSensitivityModifiers),"operators"in t.attributes&&(r.attributes.operators=t.attributes.operators?r.attributes.operators?r.attributes.operators.concat(t.attributes.operators):t.attributes.operators:void 0),"caseSensitivityModifiers"in t.attributes&&(r.attributes.caseSensitivityModifiers=t.attributes.caseSensitivityModifiers?r.attributes.caseSensitivityModifiers?r.attributes.caseSensitivityModifiers.concat(t.attributes.caseSensitivityModifiers):t.attributes.caseSensitivityModifiers:void 0)):r.attributes=void 0),"pseudoElements"in t&&(t.pseudoElements?(r.pseudoElements={...e.pseudoElements},"unknown"in t.pseudoElements&&(r.pseudoElements.unknown=t.pseudoElements.unknown),"notation"in t.pseudoElements&&(r.pseudoElements.notation=t.pseudoElements.notation),"definitions"in t.pseudoElements&&(r.pseudoElements.definitions=t.pseudoElements.definitions?r.pseudoElements.definitions?r.pseudoElements.definitions.concat(t.pseudoElements.definitions):t.pseudoElements.definitions:void 0)):r.pseudoElements=void 0),"pseudoClasses"in t)if(t.pseudoClasses){if(r.pseudoClasses={...e.pseudoClasses},"unknown"in t.pseudoClasses&&(r.pseudoClasses.unknown=t.pseudoClasses.unknown),"definitions"in t.pseudoClasses){const e=t.pseudoClasses.definitions;if(e){r.pseudoClasses.definitions={...r.pseudoClasses.definitions};const t=r.pseudoClasses.definitions;for(const r of Object.keys(e)){const n=e[r],i=t[r];t[r]=n?i?i.concat(n):n:void 0}}else r.pseudoClasses.definitions=void 0}}else r.pseudoClasses=void 0;return r}const Yr={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},Xr=Jr(Yr,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),Zr=Jr(Xr,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),en=Jr(Zr,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has"]}}}),tn={css1:Yr,css2:Xr,css3:Zr,"selectors-3":Zr,"selectors-4":en,latest:en,progressive:Jr(en,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}})};function rn(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e}function nn(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}const on={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\"},an={" ":!0,"\t":!0,"\n":!0,"\r":!0,"\f":!0},sn={'"':!0,"'":!0},cn={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},un="css-selector-parser parse error: ";const ln=function(e={}){const{syntax:t="latest",substitutes:r,strict:n=!0}=e;let i="string"==typeof t?tn[t]:t;i.baseSyntax&&(i=Jr(tn[i.baseSyntax],i));const[o,a]=i.tag?[!0,Boolean(Kr(i.tag).wildcard)]:[!1,!1],s=Boolean(i.ids),c=Boolean(i.classNames),u=Boolean(i.namespace),l=i.namespace&&(!0===i.namespace||!0===i.namespace.wildcard);if(u&&!o)throw new Error(`${un}Namespaces cannot be enabled while tags are disabled.`);const f=Boolean(r),h=i.combinators?Br(i.combinators):zr,[d,p,m,g]=i.attributes?[!0,i.attributes.operators?Br(i.attributes.operators):zr,i.attributes.caseSensitivityModifiers?$r(i.attributes.caseSensitivityModifiers):Mr,"accept"===i.attributes.unknownCaseSensitivityModifiers]:[!1,zr,Mr,!1],v=g||Object.keys(m).length>0,[y,b,w]=i.pseudoClasses?[!0,i.pseudoClasses.definitions?Qr(i.pseudoClasses.definitions):Ur,"accept"===i.pseudoClasses.unknown]:[!1,Ur,!1],[x,k,E,S,P]=i.pseudoElements?[!0,"singleColon"===i.pseudoElements.notation||"both"===i.pseudoElements.notation,!i.pseudoElements.notation||"doubleColon"===i.pseudoElements.notation||"both"===i.pseudoElements.notation,i.pseudoElements.definitions?$r(i.pseudoElements.definitions):Mr,"accept"===i.pseudoElements.unknown]:[!1,!1,!1,Mr,!1];let _="",C=_.length,A=0,F="";const D=e=>F===e,R=()=>D("*")||rn(F)||D("\\"),T=e=>{A=e,F=_.charAt(A)},O=()=>{A++,F=_.charAt(A)},j=()=>{const e=F;return A++,F=_.charAt(A),e};function I(e){const t=Math.min(C-1,A),r=new Error(`${un}${e} Pos: ${t}.`);throw r.position=t,r.name="ParserError",r}function L(e,t){if(!e)return I(t)}const q=()=>{L(A<C,"Unexpected end of input.")},z=()=>A>=C,M=e=>{L(A<C,`Expected "${e}" but end of input reached.`),L(F===e,`Expected "${e}" but "${F}" found.`),A++,F=_.charAt(A)};function N(e){const t=B(e,A);if(t)return A+=t.length,F=_.charAt(A),t}function B(e,t){const r=e[_.charAt(t)];if(r){const e=B(r.chars,t+1);if(e)return e;if(r.self)return r.self}}function $(){let e=j();for(;nn(F);)e+=j();return D(" ")&&O(),String.fromCharCode(parseInt(e,16))}function U(e){let t="";for(M(e);A<C;){if(D(e))return O(),t;if(D("\\")){let r;if(O(),D(e))t+=e;else if(void 0!==(r=on[F]))t+=r;else{if(nn(F)){t+=$();continue}t+=F}}else t+=F;O()}return t}function V(){let e="";for(;A<C;)if((t=F)>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"-"===t||"_"===t)e+=j();else{if(!D("\\"))return e;O(),q(),nn(F)?e+=$():e+=j()}var t;return e}function H(){let e="";for(;A<C&&!D(")");)if(D("\\")){if(O(),z()&&!n)return(e+"\\").trim();q(),nn(F)?e+=$():e+=j()}else e+=j();return e.trim()}function Q(){for(;an[F];)O()}function W(e=!1){Q();const t=[ee(e)];for(;D(",");)O(),Q(),t.push(ee(e));return{type:"Selector",rules:t}}function G(){let e;if(M("["),Q(),D("|"))L(u,"Namespaces are not enabled."),O(),e={type:"Attribute",name:V(),namespace:{type:"NoNamespace"}};else if(D("*"))L(u,"Namespaces are not enabled."),L(l,"Wildcard namespace is not enabled."),O(),M("|"),e={type:"Attribute",name:V(),namespace:{type:"WildcardNamespace"}};else{const t=V();if(e={type:"Attribute",name:t},D("|")){const r=A;O(),rn(F)||D("\\")?(L(u,"Namespaces are not enabled."),e={type:"Attribute",name:V(),namespace:{type:"NamespaceName",name:t}}):T(r)}}if(L(e.name,"Expected attribute name."),Q(),z()&&!n)return e;if(D("]"))O();else{if(e.operator=N(p),L(e.operator,"Expected a valid attribute selector operator."),Q(),q(),sn[F]?e.value={type:"String",value:U(F)}:f&&D("$")?(O(),e.value={type:"Substitution",name:V()},L(e.value.name,"Expected substitute name.")):(e.value={type:"String",value:V()},L(e.value.value,"Expected attribute value.")),Q(),z()&&!n)return e;if(!D("]")&&(e.caseSensitivityModifier=V(),L(e.caseSensitivityModifier,"Expected end of attribute selector."),L(v,"Attribute case sensitivity modifiers are not enabled."),L(g||m[e.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),Q(),z()&&!n))return e;M("]")}return e}function K(){let e="";for(;cn[F];)e+=j();return L(""!==e,"Formula parse error."),parseInt(e)}const J=()=>D("-")||D("+")||cn[F];function Y(e){const t={type:"PseudoClass",name:e};let r=b[e];if(!r&&w&&(r=Vr),L(r,`Unknown pseudo-class: "${e}".`),D("(")){if(O(),Q(),f&&D("$"))O(),t.argument={type:"Substitution",name:V()},L(t.argument.name,"Expected substitute name.");else if("String"===r.type)t.argument={type:"String",value:H()},L(t.argument.value,"Expected pseudo-class argument value.");else if("Selector"===r.type)t.argument=W(!0);else{if("Formula"!==r.type)return I("Invalid pseudo-class signature.");{const[e,n]=function(){if(D("e")||D("o")){const e=V();if("even"===e)return Q(),[2,0];if("odd"===e)return Q(),[2,1]}let e,t=null,r=1;if(D("-")&&(O(),r=-1),J()&&(D("+")&&O(),t=K(),!D("\\")&&!D("n")))return[0,t*r];if(null===t&&(t=1),t*=r,D("\\")?(O(),e=nn(F)?$():j()):e=j(),L("n"===e,'Formula parse error: expected "n".'),Q(),D("+")||D("-")){const e=D("+")?1:-1;return O(),Q(),[t,e*K()]}return[t,0]}();if(t.argument={type:"Formula",a:e,b:n},r.ofSelector&&(Q(),D("o")||D("\\"))){L("of"===V(),"Formula of selector parse error."),Q(),t.argument={type:"FormulaOfSelector",a:e,b:n,selector:ee()}}}}if(Q(),z()&&!n)return t;M(")")}else L(r.optional,`Argument is required for pseudo-class "${e}".`);return t}function X(){return D("*")?(L(a,"Wildcard tag name is not enabled."),O(),{type:"WildcardTag"}):rn(F)||D("\\")?(L(o,"Tag names are not enabled."),{type:"TagName",name:V()}):I("Expected tag name.")}function Z(){if(D("*")){const e=A;if(O(),!D("|"))return T(e),X();if(O(),!R())return T(e),X();L(u,"Namespaces are not enabled."),L(l,"Wildcard namespace is not enabled.");const t=X();return t.namespace={type:"WildcardNamespace"},t}if(D("|")){L(u,"Namespaces are not enabled."),O();const e=X();return e.namespace={type:"NoNamespace"},e}if(rn(F)||D("\\")){const e=V();if(!D("|"))return L(o,"Tag names are not enabled."),{type:"TagName",name:e};const t=A;if(O(),!R())return T(t),{type:"TagName",name:e};L(u,"Namespaces are not enabled.");const r=X();return r.namespace={type:"NamespaceName",name:e},r}return I("Expected tag name.")}function ee(e=!1){const t={};let r=!0;if(e){const e=N(h);e&&(t.combinator=e,Q())}for(;A<C;){if(R())L(r,"Unexpected tag/namespace start."),t.tag=Z();else if(D("|")){const e=A;if(O(),!R()){T(e);break}L(r,"Unexpected tag/namespace start."),T(e),t.tag=Z()}else if(D(".")){L(c,"Class names are not enabled."),O();const e=V();L(e,"Expected class name."),(t.classNames=t.classNames||[]).push(e)}else if(D("#")){L(s,"IDs are not enabled."),O();const e=V();L(e,"Expected ID name."),(t.ids=t.ids||[]).push(e)}else if(D("["))L(d,"Attributes are not enabled."),(t.attributes=t.attributes||[]).push(G());else{if(!D(":"))break;{let e=!1,r=!1;O(),D(":")&&(L(x,"Pseudo elements are not enabled."),L(E,"Pseudo elements double colon notation is not enabled."),e=!0,O());const n=V();if(L(e||n,"Expected pseudo-class name."),L(!e||n,"Expected pseudo-element name."),L(!e||P||S[n],`Unknown pseudo-element "${n}".`),r=x&&(e||!e&&k&&S[n]),r){if(t.pseudoElement=n,!(an[F]||D(",")||D(")")||z()))return I("Pseudo-element should be the last component of a CSS selector rule.")}else L(y,"Pseudo classes are not enabled."),(t.pseudoClasses=t.pseudoClasses||[]).push(Y(n))}}r=!1}if(r)return z()?I("Expected rule but end of input reached."):I(`Expected rule but "${F}" found.`);if(t.type="Rule",Q(),!z()&&!D(",")&&!D(")")){const e=N(h);Q(),t.nestedRule=ee(),t.nestedRule.combinator=e}return t}return e=>{if("string"!=typeof e)throw new Error(`${un}Expected string input.`);return _=e,C=_.length,A=0,F=_.charAt(0),W()}}({syntax:"selectors-4"});function fn(e){if("string"!=typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return ln(e)}function hn(e){return Array.isArray(e.children)}const dn={}.hasOwnProperty;function pn(e,t){const r=t||{};function n(t,...r){let i=n.invalid;const o=n.handlers;if(t&&dn.call(t,e)){const r=String(t[e]);i=dn.call(o,r)?o[r]:n.unknown}if(i)return i.call(this,t,...r)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const mn=pn("operator",{unknown:function(e){throw new Error("Unknown operator `"+e.operator+"`")},invalid:gn,handlers:{"=":function(e,t){const r=vn(e);return gn(e,t)&&String(t[e.name])===r},"^=":function(e,t){const r=t[e.name],n=vn(e);return Boolean(e.value&&"string"==typeof r&&r.slice(0,n.length)===n)},"$=":function(e,t){const r=t[e.name],n=vn(e);return Boolean(e.value&&"string"==typeof r&&r.slice(-n.length)===n)},"*=":function(e,t){const r=t[e.name],n=vn(e);return Boolean("string"==typeof r&&n&&r.includes(n))},"~=":function(e,t){const r=t[e.name];if(null==r)return!1;const n=vn(e);if(Array.isArray(r)&&r.includes(n))return!0;return String(r)===n}}});function gn(e,t){return null!==t[e.name]&&void 0!==t[e.name]}function vn(e){const t=e.value;return t.type,t.value}const yn=new Set([9,10,12,13,32]),bn="0".charCodeAt(0),wn="9".charCodeAt(0);var xn={trueFunc:function(){return!0},falseFunc:function(){return!1}};function kn(e){return function(e){const t=e[0],r=e[1]-1;if(r<0&&t<=0)return xn.falseFunc;if(-1===t)return e=>e<=r;if(0===t)return e=>e===r;if(1===t)return r<0?xn.trueFunc:e=>e>=r;const n=Math.abs(t),i=(r%n+n)%n;return t>1?e=>e>=r&&e%n===i:e=>e<=r&&e%n===i}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,r=0,n=o(),i=a();if(t<e.length&&"n"===e.charAt(t)&&(t++,r=n*(null!=i?i:1),s(),t<e.length?(n=o(),s(),i=a()):n=i=0),null===i||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[r,n*i];function o(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function a(){const r=t;let n=0;for(;t<e.length&&e.charCodeAt(t)>=bn&&e.charCodeAt(t)<=wn;)n=10*n+(e.charCodeAt(t)-bn),t++;return t===r?null:n}function s(){for(;t<e.length&&yn.has(e.charCodeAt(t));)t++}}(e))}const En=kn.default||kn,Sn=pn("name",{unknown:function(e){throw new Error("Unknown pseudo-selector `"+e.name+"`")},invalid:function(){throw new Error("Invalid pseudo-selector")},handlers:{is:Cn,blank:_n,empty:_n,"first-child":function(e,t,r,n,i){return An(i,e),0===i.nodeIndex},"first-of-type":function(e,t,r,n,i){return An(i,e),0===i.typeIndex},has:function(e,t,r,n,i){const o=e.argument;!o||o.type;const a={type:"root",children:hn(t)?t.children:[]},s={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:o};return Tn(s,a),s.results.length>0},"last-child":function(e,t,r,n,i){return An(i,e),"number"==typeof i.nodeCount&&i.nodeIndex===i.nodeCount-1},"last-of-type":function(e,t,r,n,i){return An(i,e),"number"==typeof i.typeCount&&i.typeIndex===i.typeCount-1},not:function(e,t,r,n,i){return!Cn(e,t,r,n,i)},"nth-child":function(e,t,r,n,i){const o=Fn(e);return An(i,e),"number"==typeof i.nodeIndex&&o(i.nodeIndex)},"nth-last-child":function(e,t,r,n,i){const o=Fn(e);return An(i,e),"number"==typeof i.nodeCount&&"number"==typeof i.nodeIndex&&o(i.nodeCount-i.nodeIndex-1)},"nth-of-type":function(e,t,r,n,i){const o=Fn(e);return An(i,e),"number"==typeof i.typeIndex&&o(i.typeIndex)},"nth-last-of-type":function(e,t,r,n,i){const o=Fn(e);return An(i,e),"number"==typeof i.typeIndex&&"number"==typeof i.typeCount&&o(i.typeCount-1-i.typeIndex)},"only-child":function(e,t,r,n,i){return An(i,e),1===i.nodeCount},"only-of-type":function(e,t,r,n,i){return An(i,e),1===i.typeCount},root:function(e,t,r,n){return t&&!n},scope:function(e,t,r,n,i){return t&&i.scopeNodes.includes(t)}}});function Pn(e,t,r,n,i){let o=-1;if(e.pseudoClasses)for(;++o<e.pseudoClasses.length;)if(!Sn(e.pseudoClasses[o],t,r,n,i))return!1;return!0}function _n(e,t){return hn(t)?0===t.children.length:!("value"in t)}function Cn(e,t,r,n,i){const o=e.argument;!o||o.type;const a={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:o};return Tn(a,t),a.results[0]===t}function An(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function Fn(e){let t=e._cachedFn;if(!t){const r=e.argument;!r||r.type,t=En(r.a+"n+"+r.b),e._cachedFn=t}return t}function Dn(e,t,r,n,i){if(e.ids)throw new Error("Invalid selector: id");if(e.classNames)throw new Error("Invalid selector: class");if(e.pseudoElement)throw new Error("Invalid selector: `::"+e.pseudoElement+"`");return Boolean(t&&(!e.tag||"WildcardTag"===e.tag.type||e.tag.name===t.type)&&(!e.attributes||function(e,t){let r=-1;if(e.attributes)for(;++r<e.attributes.length;)if(!mn(e.attributes[r],t))return!1;return!0}(e,t))&&(!e.pseudoClasses||Pn(e,t,r,n,i)))}Pn.needsIndex=["any","first-child","first-of-type","last-child","last-of-type","is","not","nth-child","nth-last-child","nth-of-type","nth-last-of-type","only-child","only-of-type"];const Rn=[];function Tn(e,t){t&&On(e,[],t,void 0,void 0,t)}function On(e,t,r,n,i,o){let a={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0},s=e.rootQuery.rules;return i&&i!==o&&(s=e.rootQuery.rules.filter((e=>void 0===e.combinator||">"===e.combinator&&i===o))),a=function(e,t,r,n,i){const o={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const s=t[a];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(Dn(s,r,n,i,e)){const t=s.nestedRule;if(t){In(o,"+"===t.combinator?"adjacentSibling":"~"===t.combinator?"generalSibling":">"===t.combinator?"directChild":"descendant",t)}else e.found=!0,e.results.includes(r)||e.results.push(r)}void 0===s.combinator?In(o,"descendant",s):"~"===s.combinator&&In(o,"generalSibling",s)}return o}(e,jn(t,s),r,n,i),!hn(r)||e.shallow||e.one&&e.found||function(e,t,r,n){const i=jn(t.descendant,t.directChild);let o,a=-1;const s={count:0,types:new Map},c={count:0,types:new Map};for(;++a<r.children.length;)Ln(s,r.children[a]);a=-1;for(;++a<r.children.length;){const t=r.children[a].type.toUpperCase();e.nodeIndex=c.count,e.typeIndex=c.types.get(t)||0,e.nodeCount=s.count,e.typeCount=s.types.get(t);const u=On(e,jn(i,o),r.children[a],a,r,n);if(o=jn(u.generalSibling,u.adjacentSibling),e.one&&e.found)break;Ln(c,r.children[a])}}(e,a,r,o),a}function jn(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:Rn}function In(e,t,r){const n=e[t];n?n.push(r):e[t]=[r]}function Ln(e,t){const r=t.type.toUpperCase(),n=(e.types.get(r)||0)+1;e.count++,e.types.set(r,n)}function qn(e,t){return{rootQuery:fn(e),results:[],scopeNodes:t?!hn(t)||"RootNode"!==t.type&&"root"!==t.type?[t]:t.children:[],one:!1,shallow:!1,found:!1,typeIndex:void 0,nodeIndex:void 0,typeCount:void 0,nodeCount:void 0}}var zn=Object.freeze({__proto__:null,matches:function(e,t){const r=qn(e,t);return r.one=!0,r.shallow=!0,Tn(r,t||void 0),r.results.length>0},select:function(e,t){const r=qn(e,t);return r.one=!0,Tn(r,t||void 0),r.results[0]},selectAll:function(e,t){const r=qn(e,t);return Tn(r,t||void 0),r.results}}),Mn=se(zn);function Nn(e){if(e)throw e}
3
3
  /*!
4
4
  * Determine if an object is a Buffer
5
5
  *
6
6
  * @author Feross Aboukhadijeh <https://feross.org>
7
7
  * @license MIT
8
- */var _n=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},An=Object.prototype.hasOwnProperty,Cn=Object.prototype.toString,Fn=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor,On=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Cn.call(e)},Rn=function(e){if(!e||"[object Object]"!==Cn.call(e))return!1;var t,r=An.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&An.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||An.call(e,t)},Tn=function(e,t){Fn&&"__proto__"===t.name?Fn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},jn=function(e,t){if("__proto__"===t){if(!An.call(e,t))return;if(Dn)return Dn(e,t).value}return e[t]},In=function e(){var t,r,n,i,o,a,s=arguments[0],c=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},c=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});c<u;++c)if(null!=(t=arguments[c]))for(r in t)n=jn(s,r),s!==(i=jn(t,r))&&(l&&i&&(Rn(i)||(o=On(i)))?(o?(o=!1,a=n&&On(n)?n:[]):a=n&&Rn(n)?n:{},Tn(s,{name:r,newValue:e(l,a,i)})):void 0!==i&&Tn(s,{name:r,newValue:i}));return s};function Ln(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function qn(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(o,...a){const s=e[++r];let c=-1;if(o)n(o);else{for(;++c<t.length;)null!==a[c]&&void 0!==a[c]||(a[c]=t[c]);t=a,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let a;n&&t.push(i);try{a=e.apply(this,t)}catch(e){if(n&&r)throw e;return i(e)}n||(a instanceof Promise?a.then(o,i):a instanceof Error?i(a):o(a))}function i(e,...n){r||(r=!0,t(e,...n))}function o(e){i(null,e)}}(s,i)(...a):n(null,...a)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}function zn(e){return e&&"object"==typeof e?"position"in e||"type"in e?Bn(e.position):"start"in e||"end"in e?Bn(e):"line"in e||"column"in e?Mn(e):"":""}function Mn(e){return Nn(e&&e.line)+":"+Nn(e&&e.column)}function Bn(e){return Mn(e&&e.start)+"-"+Mn(e&&e.end)}function Nn(e){return e&&"number"==typeof e?e:1}class $n extends Error{constructor(e,t,r){const n=[null,null];let i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(r=t,t=void 0),"string"==typeof r){const e=r.indexOf(":");-1===e?n[1]=r:(n[0]=r.slice(0,e),n[1]=r.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(i=t.position):"start"in t||"end"in t?i=t:("line"in t||"column"in t)&&(i.start=t)),this.name=zn(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=n[0],this.ruleId=n[1],this.file,this.actual,this.expected,this.url,this.note}}function Un(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}$n.prototype.file="",$n.prototype.name="",$n.prototype.reason="",$n.prototype.message="",$n.prototype.stack="",$n.prototype.fatal=null,$n.prototype.column=null,$n.prototype.line=null,$n.prototype.source=null,$n.prototype.ruleId=null,$n.prototype.position=null;const Vn=["history","path","basename","stem","extname","dirname"];class Hn{constructor(e){let t;t=e?"string"==typeof e||function(e){return _n(e)}(e)?{value:e}:Un(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=q.default.cwd(),this.value,this.stored,this.result,this.map;let r,n=-1;for(;++n<Vn.length;){const e=Vn[n];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Vn.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){Un(e)&&(e=a.fileURLToPath(e)),Gn(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?j.default.dirname(this.path):void 0}set dirname(e){Wn(this.basename,"dirname"),this.path=j.default.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?j.default.basename(this.path):void 0}set basename(e){Gn(e,"basename"),Qn(e,"basename"),this.path=j.default.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?j.default.extname(this.path):void 0}set extname(e){if(Qn(e,"extname"),Wn(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=j.default.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?j.default.basename(this.path,this.extname):void 0}set stem(e){Gn(e,"stem"),Qn(e,"stem"),this.path=j.default.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,r){const n=new $n(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=null,n}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}}function Qn(e,t){if(e&&e.includes(j.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+j.default.sep+"`")}function Gn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Wn(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Kn=function e(){const t=qn(),r=[];let n,i={},o=-1;return a.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(ei("data",n),i[e]=t,a):Jn.call(i,e)&&i[e]||null;if(e)return ei("data",n),i=e,a;return i},a.Parser=void 0,a.Compiler=void 0,a.freeze=function(){if(n)return a;for(;++o<r.length;){const[e,...n]=r[o];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const i=e.call(a,...n);"function"==typeof i&&t.use(i)}return n=!0,o=Number.POSITIVE_INFINITY,a},a.attachers=r,a.use=function(e,...t){let o;if(ei("use",n),null==e);else if("function"==typeof e)l(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?u(e):c(e)}o&&(i.settings=Object.assign(i.settings||{},o));return a;function s(e){if("function"==typeof e)l(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;l(t,...r)}else c(e)}}function c(e){u(e.plugins),e.settings&&(o=Object.assign(o||{},e.settings))}function u(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){s(e[t])}}}function l(e,t){let n,i=-1;for(;++i<r.length;)if(r[i][0]===e){n=r[i];break}n?(Ln(n[1])&&Ln(t)&&(t=In(!0,n[1],t)),n[1]=t):r.push([...arguments])}},a.parse=function(e){a.freeze();const t=ni(e),r=a.Parser;if(Xn("parse",r),Yn(r,"parse"))return new r(String(t),t).parse();return r(String(t),t)},a.stringify=function(e,t){a.freeze();const r=ni(t),n=a.Compiler;if(Zn("stringify",n),ti(e),Yn(n,"compile"))return new n(e,r).compile();return n(e,r)},a.run=function(e,r,n){ti(e),a.freeze(),n||"function"!=typeof r||(n=r,r=void 0);if(!n)return new Promise(i);function i(i,o){function a(t,r,a){r=r||e,t?o(t):i?i(r):n(null,r,a)}t.run(e,ni(r),a)}i(null,n)},a.runSync=function(e,t){let r,n;return a.run(e,t,i),ri("runSync","run",n),r;function i(e,t){Pn(e),r=t,n=!0}},a.process=function(e,t){if(a.freeze(),Xn("process",a.Parser),Zn("process",a.Compiler),!t)return new Promise(r);function r(r,n){const i=ni(e);function o(e,i){e||!i?n(e):r?r(i):t(null,i)}a.run(a.parse(i),i,((e,t,r)=>{if(!e&&t&&r){const n=a.stringify(t,r);null==n||(!function(e){return"string"==typeof e||_n(e)}(n)?r.result=n:r.value=n),o(e,r)}else o(e)}))}r(null,t)},a.processSync=function(e){let t;a.freeze(),Xn("processSync",a.Parser),Zn("processSync",a.Compiler);const r=ni(e);return a.process(r,n),ri("processSync","process",t),r;function n(e){t=!0,Pn(e)}},a;function a(){const t=e();let n=-1;for(;++n<r.length;)t.use(...r[n]);return t.data(In(!0,{},i)),t}}().freeze(),Jn={}.hasOwnProperty;function Yn(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(Jn.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function Xn(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function Zn(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function ei(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ti(e){if(!Ln(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ri(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ni(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Hn(e)}var ii=se(Object.freeze({__proto__:null,unified:Kn}));function oi(e,t){const r=(t||{}).includeImageAlt;return ai(e,"boolean"!=typeof r||r)}function ai(e,t){return function(e){return Boolean(e&&"object"==typeof e)}(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&si(e.children,t))||Array.isArray(e)&&si(e,t)||""}function si(e,t){const r=[];let n=-1;for(;++n<e.length;)r[n]=ai(e[n],t);return r.join("")}function ci(e,t,r,n){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),[].splice.apply(e,o);else for(r&&[].splice.apply(e,[t,r]);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),[].splice.apply(e,o),a+=1e4,t+=1e4}function ui(e,t){return e.length>0?(ci(e,e.length,0,t),e):t}const li={}.hasOwnProperty;function fi(e){const t={};let r=-1;for(;++r<e.length;)hi(t,e[r]);return t}function hi(e,t){let r;for(r in t){const n=(li.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let o;for(o in i){li.call(n,o)||(n[o]=[]);const e=i[o];pi(n[o],Array.isArray(e)?e:e?[e]:[])}}}function pi(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);ci(e,0,0,n)}const di=_i(/[A-Za-z]/),mi=_i(/\d/),gi=_i(/[\dA-Fa-f]/),vi=_i(/[\dA-Za-z]/),yi=_i(/[!-/:-@[-`{-~]/),bi=_i(/[#-'*+\--9=?A-Z^-~]/);function wi(e){return null!==e&&(e<32||127===e)}function xi(e){return null!==e&&(e<0||32===e)}function ki(e){return null!==e&&e<-2}function Ei(e){return-2===e||-1===e||32===e}const Si=_i(/\s/),Pi=_i(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/);function _i(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}var Ai=Object.freeze({__proto__:null,asciiAlpha:di,asciiDigit:mi,asciiHexDigit:gi,asciiAlphanumeric:vi,asciiPunctuation:yi,asciiAtext:bi,asciiControl:wi,markdownLineEndingOrSpace:xi,markdownLineEnding:ki,markdownSpace:Ei,unicodeWhitespace:Si,unicodePunctuation:Pi});function Ci(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let o=0;return function(n){if(Ei(n))return e.enter(r),a(n);return t(n)};function a(n){return Ei(n)&&o++<i?(e.consume(n),a):(e.exit(r),t(n))}}var Fi=Object.freeze({__proto__:null,factorySpace:Ci});const Di={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ci(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),n(t)}));let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):ki(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const Oi={tokenize:function(e){const t=this,r=[];let n,i,o,a=0;return s;function s(n){if(a<r.length){const i=r[a];return t.containerState=i[1],e.attempt(i[0].continuation,c,u)(n)}return u(n)}function c(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,o=r;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}v(a);let s=r;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return ci(t.events,o+1,0,t.events.slice(r)),t.events.length=s,u(e)}return s(e)}function u(i){if(a===r.length){if(!n)return h(i);if(n.currentConstruct&&n.currentConstruct.concrete)return d(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ri,l,f)(i)}function l(e){return n&&y(),v(a),h(e)}function f(e){return t.parser.lazy[t.now().line]=a!==r.length,o=t.now().offset,d(e)}function h(r){return t.containerState={},e.attempt(Ri,p,d)(r)}function p(e){return a++,r.push([t.currentConstruct,t.containerState]),h(e)}function d(r){return null===r?(n&&y(),v(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),m(r))}function m(r){return null===r?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(r)):ki(r)?(e.consume(r),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(r),m)}function g(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<o&&(!n.events[e][1].end||n.events[e][1].end.offset>o))return;const r=t.events.length;let i,s,c=r;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){s=t.events[c][1].end;break}i=!0}for(v(a),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;ci(t.events,c+1,0,t.events.slice(r)),t.events.length=e}}function v(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Ri={tokenize:function(e,t,r){return Ci(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Ti(e){return null===e||xi(e)||Si(e)?1:Pi(e)?2:void 0}function ji(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}const Ii={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ti(n);let o;return function(t){return e.enter("attentionSequence"),o=t,a(t)};function a(s){if(s===o)return e.consume(s),a;const c=e.exit("attentionSequence"),u=Ti(s),l=!u||2===u&&i||r.includes(s),f=!i||2===i&&u||r.includes(n);return c._open=Boolean(42===o?l:l&&(i||!f)),c._close=Boolean(42===o?f:f&&(u||!l)),t(s)}},resolveAll:function(e,t){let r,n,i,o,a,s,c,u,l=-1;for(;++l<e.length;)if("enter"===e[l][0]&&"attentionSequence"===e[l][1].type&&e[l][1]._close)for(r=l;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[l][1].start);Li(f,-s),Li(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},o.start),e[l][1].start=Object.assign({},a.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ui(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ui(c,[["enter",n,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=ui(c,ji(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),c=ui(c,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(u=2,c=ui(c,[["enter",e[l][1],t],["exit",e[l][1],t]])):u=0,ci(e,r-1,l-r+3,c),l=r+c.length-u-2;break}l=-1;for(;++l<e.length;)"attentionSequence"===e[l][1].type&&(e[l][1].type="data");return e}};function Li(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qi={name:"autolink",tokenize:function(e,t,r){let n=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return di(t)?(e.consume(t),o):bi(t)?c(t):r(t)}function o(e){return 43===e||45===e||46===e||vi(e)?a(e):c(e)}function a(t){return 58===t?(e.consume(t),s):(43===t||45===t||46===t||vi(t))&&n++<32?(e.consume(t),a):c(t)}function s(t){return 62===t?(e.exit("autolinkProtocol"),h(t)):null===t||32===t||60===t||wi(t)?r(t):(e.consume(t),s)}function c(t){return 64===t?(e.consume(t),n=0,u):bi(t)?(e.consume(t),c):r(t)}function u(e){return vi(e)?l(e):r(e)}function l(t){return 46===t?(e.consume(t),n=0,u):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",h(t)):f(t)}function f(t){return(45===t||vi(t))&&n++<63?(e.consume(t),45===t?f:l):r(t)}function h(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};const zi={tokenize:function(e,t,r){return Ci(e,(function(e){return null===e||ki(e)?t(e):r(e)}),"linePrefix")},partial:!0};const Mi={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return Ei(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return Ci(e,e.attempt(Mi,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};const Bi={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return yi(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const Ni={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},$i={}.hasOwnProperty;function Ui(e){return!!$i.call(Ni,e)&&Ni[e]}const Vi={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,o=vi,u(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=gi,u):(e.enter("characterReferenceValue"),i=7,o=mi,u(t))}function u(s){let c;return 59===s&&a?(c=e.exit("characterReferenceValue"),o!==vi||Ui(n.sliceSerialize(c))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):o(s)&&a++<i?(e.consume(s),u):r(s)}}};const Hi={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let n=0;return Ci(e,i,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),o(t)}function o(t){return t===c?(e.consume(t),n++,o):n<u?r(t):(e.exit("codeFencedFenceSequence"),Ci(e,a,"whitespace")(t))}function a(n){return null===n||ki(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0},o={tokenize:function(e,t,r){const n=this;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o}function o(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},a=this.events[this.events.length-1],s=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0;let c,u=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c=t,l(t)};function l(t){return t===c?(e.consume(t),u++,l):(e.exit("codeFencedFenceSequence"),u<3?r(t):Ci(e,f,"whitespace")(t))}function f(t){return null===t||ki(t)?m(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||xi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ci(e,p,"whitespace")(t)):96===t&&t===c?r(t):(e.consume(t),h)}function p(t){return null===t||ki(t)?m(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||ki(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(t)):96===t&&t===c?r(t):(e.consume(t),d)}function m(r){return e.exit("codeFencedFence"),n.interrupt?t(r):g(r)}function g(t){return null===t?y(t):ki(t)?e.attempt(o,e.attempt(i,y,s?Ci(e,g,"linePrefix",s+1):g),y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||ki(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const Qi={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),Ci(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):r(e)}function o(t){return null===t?s(t):ki(t)?e.attempt(Gi,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||ki(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(r){return e.exit("codeIndented"),t(r)}}},Gi={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):ki(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Ci(e,o,"linePrefix",5)(t)}function o(e){const o=n.events[n.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):ki(e)?i(e):r(e)}},partial:!0};const Wi={name:"codeText",tokenize:function(e,t,r){let n,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):ki(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||ki(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function u(r){return 96===r?(e.consume(r),n++,u):n===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",c(r))}},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Ki(e){const t={};let r,n,i,o,a,s,c,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(r=e[u],u&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[u-1][1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,Ji(e,u)),u=t[u],c=!0);else if(r[1]._container){for(i=u,n=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(n&&(e[n][1].type="lineEndingBlank"),o[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),a=e.slice(n,u),a.unshift(r),ci(e,n,u-n+1,a))}}return!c}function Ji(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const o=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,c=[],u={};let l,f,h=-1,p=r,d=0,m=0;const g=[m];for(;p;){for(;e[++i][1]!==p;);o.push(i),p._tokenizer||(l=n.sliceStream(p),p.next||l.push(null),f&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(l),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),r=o.pop();c.unshift([r,r+t.length-1]),ci(e,r,2,t)}for(h=-1;++h<c.length;)u[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return u}const Yi={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):ki(t)?e.check(Xi,o,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function o(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return Ki(e),e}},Xi={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ci(e,i,"linePrefix")};function i(i){if(null===i||ki(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};function Zi(e,t,r,n,i,o,a,s,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||41===t||wi(t))return r(t);return e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(o),e.consume(r),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||ki(t)?r(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function d(i){return 40===i?++l>u?r(i):(e.consume(i),d):41===i?l--?(e.consume(i),d):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(i)):null===i||xi(i)?l?r(i):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(i)):wi(i)?r(i):(e.consume(i),92===i?m:d)}function m(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}var eo=Object.freeze({__proto__:null,factoryDestination:Zi});function to(e,t,r,n,i,o){const a=this;let s,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(f){return null===f||91===f||93===f&&!s||94===f&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs||c>999?r(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):ki(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(t){return null===t||91===t||93===t||ki(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s=s||!Ei(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,l):l(t)}}var ro=Object.freeze({__proto__:null,factoryLabel:to});function no(e,t,r,n,i,o){let a;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s};function s(r){return r===a?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),c(r))}function c(t){return t===a?(e.exit(o),s(a)):null===t?r(t):ki(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ci(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||ki(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return t===a||92===t?(e.consume(t),u):u(t)}}var io=Object.freeze({__proto__:null,factoryTitle:no});function oo(e,t){let r;return function n(i){if(ki(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(Ei(i))return Ci(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}var ao=Object.freeze({__proto__:null,factoryWhitespace:oo});function so(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var co=Object.freeze({__proto__:null,normalizeIdentifier:so});const uo={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),to.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return i=so(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),oo(e,Zi(e,e.attempt(lo,Ci(e,a,"whitespace"),Ci(e,a,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function a(o){return null===o||ki(o)?(e.exit("definition"),n.parser.defined.includes(i)||n.parser.defined.push(i),t(o)):r(o)}}},lo={tokenize:function(e,t,r){return function(t){return xi(t)?oo(e,n)(t):r(t)};function n(t){return 34===t||39===t||40===t?no(e,Ci(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||ki(e)?t(e):r(e)}},partial:!0};const fo={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),n};function n(n){return ki(n)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(n)):r(n)}}};const ho={name:"headingAtx",tokenize:function(e,t,r){const n=this;let i=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(s){return 35===s&&i++<6?(e.consume(s),o):null===s||xi(s)?(e.exit("atxHeadingSequence"),n.interrupt?t(s):a(s)):r(s)}function a(r){return 35===r?(e.enter("atxHeadingSequence"),s(r)):null===r||ki(r)?(e.exit("atxHeading"),t(r)):Ei(r)?Ci(e,a,"whitespace")(r):(e.enter("atxHeadingText"),c(r))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),a(t))}function c(t){return null===t||35===t||xi(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),c)}},resolve:function(e,t){let r,n,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},n={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},ci(e,o,i-o+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const po=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],mo=["pre","script","style","textarea"],go={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,o,a,s,c;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u};function u(s){return 33===s?(e.consume(s),l):47===s?(e.consume(s),p):63===s?(e.consume(s),i=3,n.interrupt?t:j):di(s)?(e.consume(s),a=String.fromCharCode(s),o=!0,d):r(s)}function l(o){return 45===o?(e.consume(o),i=2,f):91===o?(e.consume(o),i=5,a="CDATA[",s=0,h):di(o)?(e.consume(o),i=4,n.interrupt?t:j):r(o)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:j):r(i)}function h(i){return i===a.charCodeAt(s++)?(e.consume(i),s===a.length?n.interrupt?t:_:h):r(i)}function p(t){return di(t)?(e.consume(t),a=String.fromCharCode(t),d):r(t)}function d(s){return null===s||47===s||62===s||xi(s)?47!==s&&o&&mo.includes(a.toLowerCase())?(i=1,n.interrupt?t(s):_(s)):po.includes(a.toLowerCase())?(i=6,47===s?(e.consume(s),m):n.interrupt?t(s):_(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):o?v(s):g(s)):45===s||vi(s)?(e.consume(s),a+=String.fromCharCode(s),d):r(s)}function m(i){return 62===i?(e.consume(i),n.interrupt?t:_):r(i)}function g(t){return Ei(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||di(t)?(e.consume(t),y):Ei(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||vi(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):Ei(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,x):Ei(t)?(e.consume(t),w):(c=null,k(t))}function x(t){return null===t||ki(t)?r(t):t===c?(e.consume(t),E):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||xi(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||Ei(e)?v(e):r(e)}function S(t){return 62===t?(e.consume(t),P):r(t)}function P(t){return Ei(t)?(e.consume(t),P):null===t||ki(t)?_(t):r(t)}function _(t){return 45===t&&2===i?(e.consume(t),D):60===t&&1===i?(e.consume(t),O):62===t&&4===i?(e.consume(t),I):63===t&&3===i?(e.consume(t),j):93===t&&5===i?(e.consume(t),T):!ki(t)||6!==i&&7!==i?null===t||ki(t)?A(t):(e.consume(t),_):e.check(vo,I,A)(t)}function A(t){return e.exit("htmlFlowData"),C(t)}function C(t){return null===t?L(t):ki(t)?e.attempt({tokenize:F,partial:!0},C,L)(t):(e.enter("htmlFlowData"),_(t))}function F(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}function D(t){return 45===t?(e.consume(t),j):_(t)}function O(t){return 47===t?(e.consume(t),a="",R):_(t)}function R(t){return 62===t&&mo.includes(a.toLowerCase())?(e.consume(t),I):di(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),R):_(t)}function T(t){return 93===t?(e.consume(t),j):_(t)}function j(t){return 62===t?(e.consume(t),I):45===t&&2===i?(e.consume(t),j):_(t)}function I(t){return null===t||ki(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),I)}function L(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},vo={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(zi,t,r)}},partial:!0};const yo={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,o,a,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),c};function c(t){return 33===t?(e.consume(t),u):47===t?(e.consume(t),k):63===t?(e.consume(t),w):di(t)?(e.consume(t),P):r(t)}function u(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),o="CDATA[",a=0,m):di(t)?(e.consume(t),b):r(t)}function l(t){return 45===t?(e.consume(t),f):r(t)}function f(t){return null===t||62===t?r(t):45===t?(e.consume(t),h):p(t)}function h(e){return null===e||62===e?r(e):p(e)}function p(t){return null===t?r(t):45===t?(e.consume(t),d):ki(t)?(s=p,T(t)):(e.consume(t),p)}function d(t){return 45===t?(e.consume(t),I):p(t)}function m(t){return t===o.charCodeAt(a++)?(e.consume(t),a===o.length?g:m):r(t)}function g(t){return null===t?r(t):93===t?(e.consume(t),v):ki(t)?(s=g,T(t)):(e.consume(t),g)}function v(t){return 93===t?(e.consume(t),y):g(t)}function y(t){return 62===t?I(t):93===t?(e.consume(t),y):g(t)}function b(t){return null===t||62===t?I(t):ki(t)?(s=b,T(t)):(e.consume(t),b)}function w(t){return null===t?r(t):63===t?(e.consume(t),x):ki(t)?(s=w,T(t)):(e.consume(t),w)}function x(e){return 62===e?I(e):w(e)}function k(t){return di(t)?(e.consume(t),E):r(t)}function E(t){return 45===t||vi(t)?(e.consume(t),E):S(t)}function S(t){return ki(t)?(s=S,T(t)):Ei(t)?(e.consume(t),S):I(t)}function P(t){return 45===t||vi(t)?(e.consume(t),P):47===t||62===t||xi(t)?_(t):r(t)}function _(t){return 47===t?(e.consume(t),I):58===t||95===t||di(t)?(e.consume(t),A):ki(t)?(s=_,T(t)):Ei(t)?(e.consume(t),_):I(t)}function A(t){return 45===t||46===t||58===t||95===t||vi(t)?(e.consume(t),A):C(t)}function C(t){return 61===t?(e.consume(t),F):ki(t)?(s=C,T(t)):Ei(t)?(e.consume(t),C):_(t)}function F(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,D):ki(t)?(s=F,T(t)):Ei(t)?(e.consume(t),F):(e.consume(t),i=void 0,R)}function D(t){return t===i?(e.consume(t),O):null===t?r(t):ki(t)?(s=D,T(t)):(e.consume(t),D)}function O(e){return 62===e||47===e||xi(e)?_(e):r(e)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||xi(t)?_(t):(e.consume(t),R)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ci(e,j,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function j(t){return e.enter("htmlTextData"),s(t)}function I(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};const bo={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if(("labelImage"===n.events[a][1].type||"labelLink"===n.events[a][1].type)&&!n.events[a][1]._balanced){i=n.events[a][1];break}return function(t){if(!i)return r(t);return i._inactive?c(t):(o=n.parser.defined.includes(so(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s)};function s(r){return 40===r?e.attempt(wo,t,o?t:c)(r):91===r?e.attempt(xo,t,o?e.attempt(ko,t,c):c)(r):o?t(r):c(r)}function c(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,o,a=e.length,s=0;for(;a--;)if(r=e[a][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[a][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=a,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=a);const c={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},l={type:"labelText",start:Object.assign({},e[n+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",c,t],["enter",u,t]],o=ui(o,e.slice(n+1,n+s+3)),o=ui(o,[["enter",l,t]]),o=ui(o,ji(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),o=ui(o,[["exit",l,t],e[i-2],e[i-1],["exit",u,t]]),o=ui(o,e.slice(i+1)),o=ui(o,[["exit",c,t]]),ci(e,n,e.length,o),e},resolveAll:function(e){let t,r=-1;for(;++r<e.length;)t=e[r][1],"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(r+1,"labelImage"===t.type?4:2),t.type="data",r++);return e}},wo={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),oo(e,n)};function n(t){return 41===t?a(t):Zi(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return xi(t)?oo(e,o)(t):a(t)}function o(t){return 34===t||39===t||40===t?no(e,oo(e,a),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):a(t)}function a(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},xo={tokenize:function(e,t,r){const n=this;return function(t){return to.call(n,e,i,r,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(so(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}}},ko={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const Eo={name:"labelStartImage",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):r(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:bo.resolveAll};const So={name:"labelStartLink",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:bo.resolveAll};const Po={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ci(e,t,"linePrefix")}}};const _o={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),n=t,o(t)};function o(s){return s===n?(e.enter("thematicBreakSequence"),a(s)):Ei(s)?Ci(e,o,"whitespace")(s):i<3||null!==s&&!ki(s)?r(s):(e.exit("thematicBreak"),t(s))}function a(t){return t===n?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),o(t))}}};const Ao={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:mi(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(_o,r,c)(t):c(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return mi(t)&&++a<10?(e.consume(t),s):(!n.interrupt||a<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):r(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(zi,n.interrupt?r:u,e.attempt(Co,f,l))}function u(e){return n.containerState.initialBlankLine=!0,o++,f(e)}function l(t){return Ei(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(zi,i,o);function i(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ci(e,t,"listItemIndent",n.containerState.size+1)(r)}function o(r){return n.containerState.furtherBlankLines||!Ei(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Fo,t,a)(r))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ci(e,e.attempt(Ao,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},Co={tokenize:function(e,t,r){const n=this;return Ci(e,(function(e){const i=n.events[n.events.length-1];return!Ei(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Fo={tokenize:function(e,t,r){const n=this;return Ci(e,(function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const Do={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if("lineEnding"!==n.events[a][1].type&&"linePrefix"!==n.events[a][1].type&&"content"!==n.events[a][1].type){o="paragraph"===n.events[a][1].type;break}return function(t){if(!n.parser.lazy[n.now().line]&&(n.interrupt||o))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,s(t);return r(t)};function s(t){return t===i?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),Ci(e,c,"lineSuffix")(t))}function c(n){return null===n||ki(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a;return e.push(["exit",a,t]),e}};var Oo=Object.freeze({__proto__:null,attention:Ii,autolink:qi,blankLine:zi,blockQuote:Mi,characterEscape:Bi,characterReference:Vi,codeFenced:Hi,codeIndented:Qi,codeText:Wi,content:Yi,definition:uo,hardBreakEscape:fo,headingAtx:ho,htmlFlow:go,htmlText:yo,labelEnd:bo,labelStartImage:Eo,labelStartLink:So,lineEnding:Po,list:Ao,setextUnderline:Do,thematicBreak:_o});const Ro={tokenize:function(e){const t=this,r=e.attempt(zi,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,Ci(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Yi,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const To={resolveAll:qo()},jo=Lo("string"),Io=Lo("text");function Lo(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,o,a);return o;function o(e){return c(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function c(e){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}},resolveAll:qo("text"===e?zo:void 0)}}function qo(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function zo(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let o,a=i.length,s=-1,c=0;for(;a--;){const e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)c++,s--;if(s)break;s=-1}else if(-2===e)o=!0,c++;else if(-1!==e){a++;break}}if(c){const i={type:r===e.length||o||c<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-c,offset:n.end.offset-c,_index:n.start._index+a,_bufferIndex:a?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},i.start),n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function Mo(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const c={consume:function(e){ki(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++));u.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=h(),u.events.push(["enter",r,u]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=h(),u.events.push(["exit",t,u]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const o=e[r];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,n.push(a)}return n.join("")}(f(e),t)},now:h,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(a=ui(a,e),p(),null!==a[a.length-1])return[];return v(t,0),u.events=ji(o,u.events,u),u.events}};let l=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function f(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;r===i?a=[e[r].slice(n,o)]:(a=e.slice(r,i),n>-1&&(a[0]=a[0].slice(n)),o>0&&a.push(e[i].slice(0,o)));return a}(a,e)}function h(){return Object.assign({},n)}function p(){let e;for(;n._index<a.length;){const t=a[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)d(t.charCodeAt(n._bufferIndex));else d(t)}}function d(e){l=l(e)}function m(e,t){t.restore()}function g(e,t){return function(r,i,o){let a,l,f,p;return Array.isArray(r)?d(r):"tokenize"in r?d([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return d([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function d(e){return a=e,l=0,0===e.length?o:m(e[l])}function m(e){return function(r){p=function(){const e=h(),t=u.previous,r=u.currentConstruct,i=u.events.length,o=Array.from(s);return{restore:a,from:i};function a(){n=e,u.previous=t,u.currentConstruct=r,u.events.length=i,s=o,y()}}(),f=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,g,v)(r)}}function g(t){return e(f,p),i}function v(e){return p.restore(),++l<a.length?m(a[l]):o}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&ci(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function y(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const Bo={42:Ao,43:Ao,45:Ao,48:Ao,49:Ao,50:Ao,51:Ao,52:Ao,53:Ao,54:Ao,55:Ao,56:Ao,57:Ao,62:Mi},No={91:uo},$o={[-2]:Qi,[-1]:Qi,32:Qi},Uo={35:ho,42:_o,45:[Do,_o],60:go,61:Do,95:_o,96:Hi,126:Hi},Vo={38:Vi,92:Bi},Ho={[-5]:Po,[-4]:Po,[-3]:Po,33:Eo,38:Vi,42:Ii,60:[qi,yo],91:So,92:[fo,Bi],93:bo,95:Ii,96:Wi},Qo={null:[Ii,To]};var Go=Object.freeze({__proto__:null,document:Bo,contentInitial:No,flowInitial:$o,flow:Uo,string:Vo,text:Ho,insideSpan:Qo,attentionMarkers:{null:[42,95]},disable:{null:[]}});const Wo=/[\0\t\n\r]/g;function Ko(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535==(65535&r)||65534==(65535&r)||r>1114111?"�":String.fromCharCode(r)}const Jo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Yo(e){return e.replace(Jo,Xo)}function Xo(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return Ko(r.slice(t?2:1),t?16:10)}return Ui(r)||e}const Zo={}.hasOwnProperty,ea=function(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(re),autolinkProtocol:A,autolinkEmail:A,atxHeading:s(X),blockQuote:s(G),characterEscape:A,characterReference:A,codeFenced:s(W),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(W,c),codeText:s(K,c),codeTextData:A,data:A,codeFlowValue:A,definition:s(J),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Y),hardBreakEscape:s(Z),hardBreakTrailing:s(Z),htmlFlow:s(ee,c),htmlFlowData:A,htmlText:s(ee,c),htmlTextData:A,image:s(te),label:c,link:s(re),listItem:s(ie),listItemValue:d,listOrdered:s(ne,p),listUnordered:s(ne),paragraph:s(oe),reference:N,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(X),strong:s(ae),thematicBreak:s(ce)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:Q,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:V,codeFenced:l(y),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:C,codeIndented:l(b),codeText:l(T),codeTextData:C,data:C,definition:l(),definitionDestinationString:k,definitionLabelString:w,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(D),hardBreakTrailing:l(D),htmlFlow:l(O),htmlFlowData:C,htmlText:l(R),htmlTextData:C,image:l(I),label:q,labelText:L,lineEnding:F,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:$,resourceDestinationString:z,resourceTitleString:M,resource:B,setextHeading:l(_),setextHeadingLineSequence:P,setextHeadingText:S,strong:l(),thematicBreak:l()}};ra(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let r={type:"root",children:[]};const n={stack:[r],tokenStack:[],config:t,enter:u,exit:f,buffer:c,resume:h,setData:o,getData:a},s=[];let l=-1;for(;++l<e.length;)if("listOrdered"===e[l][1].type||"listUnordered"===e[l][1].type)if("enter"===e[l][0])s.push(l);else{l=i(e,s.pop(),l)}for(l=-1;++l<e.length;){const r=t[e[l][0]];Zo.call(r,e[l][1].type)&&r[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},n),e[l][1])}if(n.tokenStack.length>0){const e=n.tokenStack[n.tokenStack.length-1];(e[1]||ia).call(n,void 0,e[0])}for(r.position={start:ta(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ta(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<t.transforms.length;)r=t.transforms[l](r)||r;return r}function i(e,t,r){let n,i,o,a,s=t-1,c=-1,u=!1;for(;++s<=r;){const t=e[s];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?c++:c--,a=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!n||a||c||o||(o=s),a=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(a=void 0),!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let a=s;for(i=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}"listItemPrefix"===t[1].type&&(n={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(s,0,["enter",n,t[2]]),s++,r++,o=void 0,a=!0)}}return e[t][1]._spread=u,r}function o(e,t){r[e]=t}function a(e){return r[e]}function s(e,t){return r;function r(r){u.call(this,e(r),r),t&&t.call(this,r)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(e,t,r){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:ta(t.start)},e}function l(e){return t;function t(t){e&&e.call(this,t),f.call(this,t)}}function f(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+zn({start:e.start,end:e.end})+"): it’s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||ia).call(this,e,n[0])}return r.position.end=ta(e.end),r}function h(){return oi(this.stack.pop())}function p(){o("expectingFirstListItemValue",!0)}function d(e){if(a("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),o("expectingFirstListItemValue")}}function m(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function v(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function w(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=so(this.sliceSerialize(e)).toLowerCase()}function x(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function E(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function S(){o("setextHeadingSlurpLineEnding",!0)}function P(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function _(){o("setextHeadingSlurpLineEnding")}function A(e){const t=this.stack[this.stack.length-1];let r=t.children[t.children.length-1];r&&"text"===r.type||(r=se(),r.position={start:ta(e.start)},t.children.push(r)),this.stack.push(r)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ta(e.end)}function F(e){const r=this.stack[this.stack.length-1];if(a("atHardBreak")){return r.children[r.children.length-1].position.end=ta(e.end),void o("atHardBreak")}!a("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(r.type)&&(A.call(this,e),C.call(this,e))}function D(){o("atHardBreak",!0)}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function I(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function L(e){const t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=Yo(t),r.identifier=so(t).toLowerCase()}function q(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(o("inReference",!0),"link"===r.type){const t=e.children;r.children=t}else r.alt=t}function z(){const e=this.resume();this.stack[this.stack.length-1].url=e}function M(){const e=this.resume();this.stack[this.stack.length-1].title=e}function B(){o("inReference")}function N(){o("referenceType","collapsed")}function $(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=so(this.sliceSerialize(e)).toLowerCase(),o("referenceType","full")}function U(e){o("characterReferenceType",e.type)}function V(e){const t=this.sliceSerialize(e),r=a("characterReferenceType");let n;if(r)n=Ko(t,"characterReferenceMarkerNumeric"===r?10:16),o("characterReferenceType");else{n=Ui(t)}const i=this.stack.pop();i.value+=n,i.position.end=ta(e.end)}function H(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function Q(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function J(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Y(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:void 0,children:[]}}function Z(){return{type:"break"}}function ee(){return{type:"html",value:""}}function te(){return{type:"image",title:null,url:"",alt:null}}function re(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ie(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}(r)(function(e){for(;!Ki(e););return e}(function(e={}){const t={defined:[],lazy:{},constructs:fi([Go].concat(e.extensions||[])),content:r(Di),document:r(Oi),flow:r(Ro),string:r(jo),text:r(Io)};return t;function r(e){return function(r){return Mo(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,o,a){const s=[];let c,u,l,f,h;for(i=r+i.toString(o),l=0,r="",n&&(65279===i.charCodeAt(0)&&l++,n=void 0);l<i.length;){if(Wo.lastIndex=l,c=Wo.exec(i),f=c&&void 0!==c.index?c.index:i.length,h=i.charCodeAt(f),!c){r=i.slice(l);break}if(10===h&&l===f&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<f&&(s.push(i.slice(l,f)),t+=f-l),h){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=f+1}return a&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))};function ta(e){return{line:e.line,column:e.column,offset:e.offset}}function ra(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?ra(e,n):na(e,n)}}function na(e,t){let r;for(r in t)if(Zo.call(t,r))if("canContainEols"===r){const n=t[r];n&&e[r].push(...n)}else if("transforms"===r){const n=t[r];n&&e[r].push(...n)}else if("enter"===r||"exit"===r){const n=t[r];n&&Object.assign(e[r],n)}}function ia(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+zn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+zn({start:t.start,end:t.end})+") is still open")}var oa=se(Object.freeze({__proto__:null,default:function(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return ea(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}}));const aa={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return 87===t||119===t?(e.consume(t),i):r(t)}function i(t){return 87===t||119===t?(e.consume(t),o):r(t)}function o(t){return 46===t?(e.consume(t),a):r(t)}function a(e){return null===e||ki(e)?r(e):t(e)}},partial:!0},sa={tokenize:function(e,t,r){let n,i;return o;function o(t){return 38===t?e.check(la,s,a)(t):46===t||95===t?e.check(ua,s,a)(t):null===t||wi(t)||Si(t)||45!==t&&Pi(t)?s(t):(e.consume(t),o)}function a(t){return 46===t?(i=n,n=void 0,e.consume(t),o):(95===t&&(n=!0),e.consume(t),o)}function s(e){return i||n?r(e):t(e)}},partial:!0},ca={tokenize:function(e,t){let r=0;return n;function n(a){return 38===a?e.check(la,t,i)(a):(40===a&&r++,41===a?e.check(ua,o,i)(a):ya(a)?t(a):va(a)?e.check(ua,t,i)(a):(e.consume(a),n))}function i(t){return e.consume(t),n}function o(e){return r--,r<0?t(e):i(e)}},partial:!0},ua={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(i){return va(i)?(e.consume(i),n):ya(i)?t(i):r(i)}},partial:!0},la={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return di(t)?(e.consume(t),n):59===t?(e.consume(t),i):r(t)}function i(e){return ya(e)?t(e):r(e)}},partial:!0},fa={tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!wa(n.previous)||Ea(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aa,e.attempt(sa,e.attempt(ca,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:wa},ha={tokenize:function(e,t,r){const n=this;return function(t){if(72!==t&&104!==t||!xa(n.previous)||Ea(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),i};function i(t){return 84===t||116===t?(e.consume(t),o):r(t)}function o(t){return 84===t||116===t?(e.consume(t),a):r(t)}function a(t){return 80===t||112===t?(e.consume(t),s):r(t)}function s(t){return 83===t||115===t?(e.consume(t),c):c(t)}function c(t){return 58===t?(e.consume(t),u):r(t)}function u(t){return 47===t?(e.consume(t),l):r(t)}function l(t){return 47===t?(e.consume(t),f):r(t)}function f(t){return null===t||wi(t)||Si(t)||Pi(t)?r(t):e.attempt(sa,e.attempt(ca,h),r)(t)}function h(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:xa},pa={tokenize:function(e,t,r){const n=this;let i,o;return function(t){if(!ba(t)||!ka(n.previous)||Ea(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return ba(t)?(e.consume(t),a):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(ua,f,c)(t):45===t||95===t?e.check(ua,r,u)(t):vi(t)?(!o&&mi(t)&&(o=!0),e.consume(t),s):f(t)}function c(t){return e.consume(t),i=!0,o=void 0,s}function u(t){return e.consume(t),l}function l(t){return 46===t?e.check(ua,r,c)(t):s(t)}function f(n){return i&&!o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:ka},da={},ma={text:da};let ga=48;for(;ga<123;)da[ga]=pa,ga++,58===ga?ga=65:91===ga&&(ga=97);function va(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function ya(e){return null===e||60===e||xi(e)}function ba(e){return 43===e||45===e||46===e||95===e||vi(e)}function wa(e){return null===e||40===e||42===e||95===e||126===e||xi(e)}function xa(e){return null===e||!di(e)}function ka(e){return 47!==e&&xa(e)}function Ea(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}da[43]=pa,da[45]=pa,da[46]=pa,da[95]=pa,da[72]=[pa,ha],da[104]=[pa,ha],da[87]=[pa,fa],da[119]=[pa,fa];const Sa={tokenize:function(e,t,r){const n=this;return Ci(e,(function(e){const i=n.events[n.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Pa(e,t,r){const n=this;let i=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;i--;){const e=n.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return r(i);const s=so(n.sliceSerialize({start:a.end,end:n.now()}));if(94!==s.charCodeAt(0)||!o.includes(s.slice(1)))return r(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function _a(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function Aa(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){let l;return null===s||91===s||a++>999?r(s):93===s?o?(e.exit("chunkString"),l=e.exit("gfmFootnoteCallString"),i.includes(so(n.sliceSerialize(l)))?function(r){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}(s):r(s)):r(s):(e.consume(s),xi(s)||(o=!0),92===s?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}}function Ca(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),u):r(t)}function u(t){let i;return null===t||91===t||s>999?r(t):93===t?a?(i=e.exit("gfmFootnoteDefinitionLabelString"),o=so(n.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h):r(t):ki(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s++,u):(e.enter("chunkString").contentType="string",l(t))}function l(t){return null===t||ki(t)||91===t||93===t||s>999?(e.exit("chunkString"),u(t)):(xi(t)||(a=!0),s++,e.consume(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),Ci(e,p,"gfmFootnoteDefinitionWhitespace")):r(t)}function p(e){return i.includes(o)||i.push(o),t(e)}}function Fa(e,t,r){return e.check(zi,t,e.attempt(Sa,t,r))}function Da(e){e.exit("gfmFootnoteDefinition")}function Oa(e={}){let t=e.singleTilde;const r={tokenize:function(e,r,n){const i=this.previous,o=this.events;let a=0;return function(t){if(126===i&&"characterEscape"!==o[o.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const c=Ti(i);if(126===o)return a>1?n(o):(e.consume(o),a++,s);if(a<2&&!t)return n(o);const u=e.exit("strikethroughSequenceTemporary"),l=Ti(o);return u._open=!l||2===l&&Boolean(c),u._close=!c||2===c&&Boolean(l),r(o)}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},o={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},a=[["enter",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",o,t]];ci(a,a.length,0,ji(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),ci(a,a.length,0,[["exit",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",i,t]]),ci(e,n-1,r-n+3,a),r=n+a.length-2;break}}r=-1;for(;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}const Ra={flow:{null:{tokenize:function(e,t,r){const n=this,i=[];let o,a,s=0;return function(t){if(e.enter("table")._align=i,e.enter("tableHead"),e.enter("tableRow"),124===t)return c(t);return s++,e.enter("temporaryTableCellContent"),f(t)};function c(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,u}function u(t){return null===t||ki(t)?function(t){if(null===t)return r(t);e.exit("tableRow"),e.exit("tableHead");const i=n.interrupt;return n.interrupt=!0,e.attempt({tokenize:C,partial:!0},(function(t){return n.interrupt=i,e.enter("tableDelimiterRow"),p(t)}),(function(e){return n.interrupt=i,r(e)}))(t)}(t):Ei(t)?(e.enter("whitespace"),e.consume(t),l):(o&&(o=void 0,s++),124===t?c(t):(e.enter("temporaryTableCellContent"),f(t)))}function l(t){return Ei(t)?(e.consume(t),l):(e.exit("whitespace"),u(t))}function f(t){return null===t||124===t||xi(t)?(e.exit("temporaryTableCellContent"),u(t)):(e.consume(t),92===t?h:f)}function h(t){return 92===t||124===t?(e.consume(t),f):f(t)}function p(t){return null===t||ki(t)?y(t):Ei(t)?(e.enter("whitespace"),e.consume(t),d):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),a=!0,i.push("none"),m):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i.push("left"),g):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):r(t)}function d(t){return Ei(t)?(e.consume(t),d):(e.exit("whitespace"),p(t))}function m(t){return 45===t?(e.consume(t),m):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i[i.length-1]="left"===i[i.length-1]?"center":"right",v):p(t))}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),a=!0,m):r(t)}function v(t){return null===t||ki(t)?y(t):Ei(t)?(e.enter("whitespace"),e.consume(t),d):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):r(t)}function y(t){return e.exit("tableDelimiterRow"),a&&s===i.length?null===t?b(t):e.check(Ta,b,e.attempt({tokenize:C,partial:!0},Ci(e,w,"linePrefix",4),b))(t):r(t)}function b(r){return e.exit("table"),t(r)}function w(t){return e.enter("tableBody"),x(t)}function x(t){return e.enter("tableRow"),124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function k(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),E}function E(t){return null===t||ki(t)?function(t){if(e.exit("tableRow"),null===t)return A(t);return e.check(Ta,A,e.attempt({tokenize:C,partial:!0},Ci(e,x,"linePrefix",4),A))(t)}(t):Ei(t)?(e.enter("whitespace"),e.consume(t),S):124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function S(t){return Ei(t)?(e.consume(t),S):(e.exit("whitespace"),E(t))}function P(t){return null===t||124===t||xi(t)?(e.exit("temporaryTableCellContent"),E(t)):(e.consume(t),92===t?_:P)}function _(t){return 92===t||124===t?(e.consume(t),P):P(t)}function A(t){return e.exit("tableBody"),b(t)}function C(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ci(e,i,"linePrefix")};function i(i){if(n.parser.lazy[n.now().line]||null===i||ki(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):(n._gfmTableDynamicInterruptHack=!0,e.check(n.parser.constructs.flow,(function(e){return n._gfmTableDynamicInterruptHack=!1,r(e)}),(function(e){return n._gfmTableDynamicInterruptHack=!1,t(e)}))(i))}}},resolve:function(e,t){let r,n,i,o,a,s,c,u=-1;for(;++u<e.length;){const l=e[u][1];if(i&&("temporaryTableCellContent"===l.type&&(o=o||u,a=u),("tableCellDivider"===l.type||"tableRow"===l.type)&&a)){const r={type:"tableContent",start:e[o][1].start,end:e[a][1].end},n={type:"chunkText",start:r.start,end:r.end,contentType:"text"};e.splice(o,a-o+1,["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]),u-=a-o-3,o=void 0,a=void 0}if("exit"===e[u][0]&&void 0!==s&&s+(c?0:1)<u&&("tableCellDivider"===l.type||"tableRow"===l.type&&(s+3<u||"whitespace"!==e[s][1].type))){const i={type:n?"tableDelimiter":r?"tableHeader":"tableData",start:e[s][1].start,end:e[u][1].end};e.splice(u+("tableCellDivider"===l.type?1:0),0,["exit",i,t]),e.splice(s,0,["enter",i,t]),u+=2,s=u+1,c=!0}"tableRow"===l.type&&(i="enter"===e[u][0],i&&(s=u+1,c=!1)),"tableDelimiterRow"===l.type&&(n="enter"===e[u][0],n&&(s=u+1,c=!1)),"tableHead"===l.type&&(r="enter"===e[u][0])}return e}}}},Ta={tokenize:function(e,t,r){let n=0;return function(t){return e.enter("check"),e.consume(t),i};function i(o){return-1===o||32===o?(e.consume(o),n++,4===n?t:i):null===o||xi(o)?t(o):r(o)}},partial:!0};const ja={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return xi(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):r(t)}function o(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:La},t,r)):r(n)}}},Ia={text:{91:ja}};function La(e,t,r){const n=this;return Ci(e,(function(e){const i=n.events[n.events.length-1];return(i&&"whitespace"===i[1].type||ki(e))&&null!==e?t(e):r(e)}),"whitespace")}function qa(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;-1!==i;)n++,i=r.indexOf(t,i+t.length);return n}function za(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Ma=function(e){if(null==e)return Na;if("string"==typeof e)return function(e){return Ba(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Ma(e[r]);return Ba(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].call(this,...e))return!0;return!1}}(e):function(e){return Ba(t);function t(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}(e);if("function"==typeof e)return Ba(e);throw new Error("Expected function, string, or object as test")};function Ba(e){return function(t,...r){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...r)))}}function Na(){return!0}var $a=Object.freeze({__proto__:null,is:function e(t,r,n,i,o){const a=Ma(r);if(null!=n&&("number"!=typeof n||n<0||n===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(!(null==i||e(i)&&i.children))throw new Error("Expected parent node");if(null==i!=(null==n))throw new Error("Expected both parent and index");return!(!t||!t.type||"string"!=typeof t.type)&&Boolean(a.call(o,t,n,i))},convert:Ma});const Ua=!0,Va=!1,Ha="skip",Qa=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=Ma(t),o=n?-1:1;!function e(a,s,c){const u=a&&"object"==typeof a?a:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l=a.type+(e?"<"+e+">":""),""+l+")")})}var l;return f;function f(){let u,l,f,h=[];if((!t||i(a,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Ua,e];return[e]}(r(a,c)),h[0]===Va))return h;if(a.children&&h[0]!==Ha)for(l=(n?a.children.length:-1)+o,f=c.concat(a);l>-1&&l<a.children.length;){if(u=e(a.children[l],l,f)(),u[0]===Va)return u;l="number"==typeof u[1]?u[1]:l+o}return h}}(e,void 0,[])()};const Ga={}.hasOwnProperty,Wa=function(e,t,r,n){let i,o;"string"==typeof t||t instanceof RegExp?(o=[[t,r]],i=n):(o=t,i=r),i||(i={});const a=Ma(i.ignore||[]),s=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let r=-1;for(;++r<e.length;)t.push([Ka(e[r][0]),Ja(e[r][1])])}else{let r;for(r in e)Ga.call(e,r)&&t.push([Ka(r),Ja(e[r])])}return t}(o);let c=-1;for(;++c<s.length;)Qa(e,"text",u);return e;function u(e,t){let r,n=-1;for(;++n<t.length;){const e=t[n];if(a(e,r?r.children.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=t[t.length-1],n=s[c][0],i=s[c][1];let o=0;const a=r.children.indexOf(e);let u=!1,l=[];n.lastIndex=0;let f=n.exec(e.value);for(;f;){const r=f.index,a={index:f.index,input:f.input,stack:[...t,e]};let s=i(...f,a);if("string"==typeof s&&(s=s.length>0?{type:"text",value:s}:void 0),!1!==s&&(o!==r&&l.push({type:"text",value:e.value.slice(o,r)}),Array.isArray(s)?l.push(...s):s&&l.push(s),o=r+f[0].length,u=!0),!n.global)break;f=n.exec(e.value)}u?(o<e.value.length&&l.push({type:"text",value:e.value.slice(o)}),r.children.splice(a,1,...l)):l=[e];return a+l.length}(e,t)}};function Ka(e){return"string"==typeof e?new RegExp(za(e),"g"):e}function Ja(e){return"function"==typeof e?e:()=>e}const Ya="phrasing",Xa=["autolink","link","image","label"],Za={transforms:[function(e){Wa(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rs],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,ns]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:ts,literalAutolinkHttp:ts,literalAutolinkWww:ts},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}}},es={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ya,notInConstruct:Xa},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ya,notInConstruct:Xa},{character:":",before:"[ps]",after:"\\/",inConstruct:Ya,notInConstruct:Xa}]};function ts(e){this.config.enter.autolinkProtocol.call(this,e)}function rs(e,t,r,n,i){let o="";if(!is(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=qa(e,"(");let o=qa(e,")");for(;-1!==n&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}(r+n);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function ns(e,t,r,n){return!(!is(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function is(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||Si(r)||Pi(r))&&(!t||47!==r)}function os(e){return e.label||!e.identifier?e.label||"":Yo(e.identifier)}function as(e,t,r){const n=t.indexStack,i=e.children||[],o=t.createTracker(r),a=[];let s=-1;for(n.push(-1);++s<i.length;){const r=i[s];n[n.length-1]=s,a.push(o.move(t.handle(r,e,t,{before:"\n",after:"\n",...o.current()}))),"list"!==r.type&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(ss(r,i[s+1],e,t)))}return n.pop(),a.join("")}function ss(e,t,r,n){let i=n.join.length;for(;i--;){const o=n.join[i](e,t,r,n);if(!0===o||1===o)break;if("number"==typeof o)return"\n".repeat(1+o);if(!1===o)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const cs=/\r?\n|\r/g;function us(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function ls(e,t){return fs(e,t.inConstruct,!0)&&!fs(e,t.notInConstruct,!1)}function fs(e,t,r){if("string"==typeof t&&(t=[t]),!t||0===t.length)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function hs(e,t,r){const n=(r.before||"")+(t||"")+(r.after||""),i=[],o=[],a={};let s=-1;for(;++s<e.unsafe.length;){const t=e.unsafe[s];if(!ls(e.stack,t))continue;const r=us(t);let o;for(;o=r.exec(n);){const e="before"in t||Boolean(t.atBreak),r="after"in t,n=o.index+(e?o[1].length:0);i.includes(n)?(a[n].before&&!e&&(a[n].before=!1),a[n].after&&!r&&(a[n].after=!1)):(i.push(n),a[n]={before:e,after:r})}}i.sort(ps);let c=r.before?r.before.length:0;const u=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){const e=i[s];e<c||e>=u||(e+1<u&&i[s+1]===e+1&&a[e].after&&!a[e+1].before&&!a[e+1].after||i[s-1]===e-1&&a[e].before&&!a[e-1].before&&!a[e-1].after||(c!==e&&o.push(ds(n.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||r.encode&&r.encode.includes(n.charAt(e))?(o.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),c++):o.push("\\")))}return o.push(ds(n.slice(c,u),r.after)),o.join("")}function ps(e,t){return e-t}function ds(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=e+t;let a,s=-1,c=0;for(;a=r.exec(o);)n.push(a.index);for(;++s<n.length;)c!==n[s]&&i.push(e.slice(c,n[s])),i.push("\\"),c=n[s];return i.push(e.slice(c)),i.join("")}function ms(e){const t=e||{},r=t.now||{};let n=t.lineShift||0,i=r.line||1,o=r.column||1;return{move:function(e){const t=e||"",r=t.split(/\r?\n|\r/g),a=r[r.length-1];return i+=r.length-1,o=1===r.length?o+a.length:1+a.length+n,t},current:function(){return{now:{line:i,column:o},lineShift:n}},shift:function(e){n+=e}}}function gs(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vs(){this.buffer()}function ys(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=so(this.sliceSerialize(e)).toLowerCase()}function bs(e){this.exit(e)}function ws(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function xs(){this.buffer()}function ks(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=so(this.sliceSerialize(e)).toLowerCase()}function Es(e){this.exit(e)}function Ss(e,t,r,n){const i=ms(n);let o=i.move("[^");const a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(hs(r,os(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Ps(e,t,r,n){const i=ms(n);let o=i.move("[^");const a=r.enter("footnoteDefinition"),s=r.enter("label");return o+=i.move(hs(r,os(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(function(e,t){const r=[];let n,i=0,o=0;for(;n=cs.exec(e);)a(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,o++;return a(e.slice(i)),r.join("");function a(e){r.push(t(e,o,!e))}}(as(e,r,i.current()),_s)),a(),o}function _s(e,t,r){return 0===t?e:(r?"":" ")+e}function As(e,t,r){const n=t.indexStack,i=e.children||[],o=[];let a=-1,s=r.before;n.push(-1);let c=t.createTracker(r);for(;++a<i.length;){const u=i[a];let l;if(n[n.length-1]=a,a+1<i.length){let r=t.handle.handlers[i[a+1].type];r&&r.peek&&(r=r.peek),l=r?r(i[a+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else l=r.after;o.length>0&&("\r"===s||"\n"===s)&&"html"===u.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",c=t.createTracker(r),c.move(o.join(""))),o.push(c.move(t.handle(u,e,t,{...c.current(),before:s,after:l}))),s=o[o.length-1].slice(-1)}return n.pop(),o.join("")}Ss.peek=function(){return"["};Ds.peek=function(){return"~"};const Cs={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},Fs={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{delete:Ds}};function Ds(e,t,r,n){const i=ms(n),o=r.enter("strikethrough");let a=i.move("~~");return a+=As(e,r,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Os(e,t,r){let n=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<r.unsafe.length;){const e=r.unsafe[o],t=us(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function Rs(e){return null==e?"":String(e)}function Ts(e){return e.length}function js(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Os.peek=function(){return"`"};const Is={enter:{table:function(e){const t=e._align;this.enter({type:"table",align:t.map((e=>"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)},tableData:qs,tableHeader:qs,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,zs));const r=this.stack[this.stack.length-1];r.value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:Ls,tableHeader:Ls,tableRow:Ls}};function Ls(e){this.exit(e)}function qs(e){this.enter({type:"tableCell",children:[]},e)}function zs(e,t){return"|"===t?t:e}function Ms(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,r,n){return s(function(e,t,r){const n=e.children;let i=-1;const o=[],a=t.enter("table");for(;++i<n.length;)o[i]=c(n[i],t,r);return a(),o}(e,r,n),e.align)},tableRow:function(e,t,r,n){const i=c(e,r,n),o=s([i]);return o.slice(0,o.indexOf("\n"))},tableCell:a,inlineCode:function(e,t,r){let n=Os(e,0,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n}}};function a(e,t,r,n){const i=r.enter("tableCell"),a=r.enter("phrasing"),s=As(e,r,{...n,before:o,after:o});return a(),i(),s}function s(e,t){return function(e,t={}){const r=(t.align||[]).concat(),n=t.stringLength||Ts,i=[],o=[],a=[],s=[];let c=0,u=-1;for(;++u<e.length;){const r=[],i=[];let l=-1;for(e[u].length>c&&(c=e[u].length);++l<e[u].length;){const o=Rs(e[u][l]);if(!1!==t.alignDelimiters){const e=n(o);i[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}r.push(o)}o[u]=r,a[u]=i}let l=-1;if("object"==typeof r&&"length"in r)for(;++l<c;)i[l]=js(r[l]);else{const e=js(r);for(;++l<c;)i[l]=e}l=-1;const f=[],h=[];for(;++l<c;){const e=i[l];let r="",n="";99===e?(r=":",n=":"):108===e?r=":":114===e&&(n=":");let o=!1===t.alignDelimiters?1:Math.max(1,s[l]-r.length-n.length);const a=r+"-".repeat(o)+n;!1!==t.alignDelimiters&&(o=r.length+o+n.length,o>s[l]&&(s[l]=o),h[l]=o),f[l]=a}o.splice(1,0,f),a.splice(1,0,h),u=-1;const p=[];for(;++u<o.length;){const e=o[u],r=a[u];l=-1;const n=[];for(;++l<c;){const o=e[l]||"";let a="",u="";if(!1!==t.alignDelimiters){const e=s[l]-(r[l]||0),t=i[l];114===t?a=" ".repeat(e):99===t?e%2?(a=" ".repeat(e/2+.5),u=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),u=a):u=" ".repeat(e)}!1===t.delimiterStart||l||n.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===o||!1===t.delimiterStart&&!l||n.push(" "),!1!==t.alignDelimiters&&n.push(a),n.push(o),!1!==t.alignDelimiters&&n.push(u),!1!==t.padding&&n.push(" "),!1===t.delimiterEnd&&l===c-1||n.push("|")}p.push(!1===t.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function c(e,t,r){const n=e.children;let i=-1;const o=[],s=t.enter("tableRow");for(;++i<n.length;)o[i]=a(n[i],0,t,r);return s(),o}}function Bs(e,t,r,n){const i=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let o=r.bulletCurrent||function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(r);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=r.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);const c=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),(function(e,t,r){if(t)return(r?"":" ".repeat(a))+e;return(r?o:o+" ".repeat(a-o.length))+e}));return c(),u}const Ns={exit:{taskListCheckValueChecked:Us,taskListCheckValueUnchecked:Us,paragraph:function(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1],r=e.children[0];if(r&&"text"===r.type){const n=t.children;let i,o=-1;for(;++o<n.length;){const e=n[o];if("paragraph"===e.type){i=e;break}}i===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}}},$s={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(e,t,r,n){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=ms(n);o&&s.move(a);let c=Bs(e,t,r,{...n,...s.current()});o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a})));return c}}};function Us(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}var Vs=Object.freeze({__proto__:null,default:function(e={}){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){return fi([ma,{document:{91:{tokenize:Ca,continuation:{tokenize:Fa},exit:Da}},text:{91:{tokenize:Aa},93:{add:"after",tokenize:Pa,resolveTo:_a}}},Oa(e),Ra,Ia])}(e)),r("fromMarkdownExtensions",[Za,{enter:{gfmFootnoteDefinition:gs,gfmFootnoteDefinitionLabelString:vs,gfmFootnoteCall:ws,gfmFootnoteCallString:xs},exit:{gfmFootnoteDefinition:bs,gfmFootnoteDefinitionLabelString:ys,gfmFootnoteCall:Es,gfmFootnoteCallString:ks}},Cs,Is,Ns]),r("toMarkdownExtensions",function(e){return{extensions:[es,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Ps,footnoteReference:Ss}},Fs,Ms(e),$s]}}(e))}}),Hs=se(Vs);const Qs=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),Qa(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)};var Gs=Object.freeze({__proto__:null,CONTINUE:Ua,EXIT:Va,SKIP:Ha,visit:Qs});const Ws=/[\t ]*(?:\r?\n|\r)/g;var Ks=Object.freeze({__proto__:null,default:function(){return e=>{Qs(e,"text",((e,t,r)=>{const n=[];let i=0;Ws.lastIndex=0;let o=Ws.exec(e.value);for(;o;){const t=o.index;i!==t&&n.push({type:"text",value:e.value.slice(i,t)}),n.push({type:"break"}),i=t+o[0].length,o=Ws.exec(e.value)}if(n.length>0&&r&&"number"==typeof t)return i<e.value.length&&n.push({type:"text",value:e.value.slice(i)}),r.children.splice(t,1,...n),t+n.length}))}}}),Js=se(Ks),Ys={},Xs={};function Zs(e,t,r){var n,i,o,a,s,c="";for("string"!=typeof t&&(r=t,t=Zs.defaultChars),void 0===r&&(r=!0),s=function(e){var t,r,n=Xs[e];if(n)return n;for(n=Xs[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}(t),n=0,i=e.length;n<i;n++)if(o=e.charCodeAt(n),r&&37===o&&n+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(n+1,n+3)))c+=e.slice(n,n+3),n+=2;else if(o<128)c+=s[o];else if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1<i&&(a=e.charCodeAt(n+1))>=56320&&a<=57343){c+=encodeURIComponent(e[n]+e[n+1]),n++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[n]);return c}Zs.defaultChars=";/?:@&=+$,-_.!~*'()#",Zs.componentChars="-_.!~*'()";var ec=Zs,tc={};function rc(e,t){var r;return"string"!=typeof t&&(t=rc.defaultChars),r=function(e){var t,r,n=tc[e];if(n)return n;for(n=tc[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)n[r=e.charCodeAt(t)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,i,o,a,s,c,u="";for(t=0,n=e.length;t<n;t+=3)(i=parseInt(e.slice(t+1,t+3),16))<128?u+=r[i]:192==(224&i)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(u+=(c=i<<6&1984|63&o)<128?"��":String.fromCharCode(c),t+=3):224==(240&i)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&a))?(u+=(c=i<<12&61440|o<<6&4032|63&a)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&i)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&a)&&128==(192&s))?((c=i<<18&1835008|o<<12&258048|a<<6&4032|63&s)<65536||c>1114111?u+="����":(c-=65536,u+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),t+=9):u+="�";return u}))}rc.defaultChars=";/?:@&=+$,#",rc.componentChars="";var nc=rc;function ic(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var oc=/^([a-z0-9.+-]+:)/i,ac=/:[0-9]*$/,sc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,cc=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),uc=["'"].concat(cc),lc=["%","/","?",";","#"].concat(uc),fc=["/","?","#"],hc=/^[+a-z0-9A-Z_-]{0,63}$/,pc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,dc={javascript:!0,"javascript:":!0},mc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};ic.prototype.parse=function(e,t){var r,n,i,o,a,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var c=sc.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var u=oc.exec(s);if(u&&(i=(u=u[0]).toLowerCase(),this.protocol=u,s=s.substr(u.length)),(t||u||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(a="//"===s.substr(0,2))||u&&dc[u]||(s=s.substr(2),this.slashes=!0)),!dc[u]&&(a||u&&!mc[u])){var l,f,h=-1;for(r=0;r<fc.length;r++)-1!==(o=s.indexOf(fc[r]))&&(-1===h||o<h)&&(h=o);for(-1!==(f=-1===h?s.lastIndexOf("@"):s.lastIndexOf("@",h))&&(l=s.slice(0,f),s=s.slice(f+1),this.auth=l),h=-1,r=0;r<lc.length;r++)-1!==(o=s.indexOf(lc[r]))&&(-1===h||o<h)&&(h=o);-1===h&&(h=s.length),":"===s[h-1]&&h--;var p=s.slice(0,h);s=s.slice(h),this.parseHost(p),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d){var m=this.hostname.split(/\./);for(r=0,n=m.length;r<n;r++){var g=m[r];if(g&&!g.match(hc)){for(var v="",y=0,b=g.length;y<b;y++)g.charCodeAt(y)>127?v+="x":v+=g[y];if(!v.match(hc)){var w=m.slice(0,r),x=m.slice(r+1),k=g.match(pc);k&&(w.push(k[1]),x.unshift(k[2])),x.length&&(s=x.join(".")+s),this.hostname=w.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var E=s.indexOf("#");-1!==E&&(this.hash=s.substr(E),s=s.slice(0,E));var S=s.indexOf("?");return-1!==S&&(this.search=s.substr(S),s=s.slice(0,S)),s&&(this.pathname=s),mc[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},ic.prototype.parseHost=function(e){var t=ac.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var gc=function(e,t){if(e&&e instanceof ic)return e;var r=new ic;return r.parse(e,t),r};function vc(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yc(e,t,r,n){const i=vc(r),o='"'===i?"Quote":"Apostrophe",a=r.enter("image");let s=r.enter("label");const c=r.createTracker(n);let u=c.move("![");return u+=c.move(r.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=r.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(r.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),u+=c.move(")"),a(),u}Ys.encode=ec,Ys.decode=nc,Ys.format=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},Ys.parse=gc,yc.peek=function(){return"!"};var bc=se(Object.freeze({__proto__:null,image:yc})),wc=se(Oo);var xc=se(Object.freeze({__proto__:null,types:{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"}}));const kc={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 Ec=se(Object.freeze({__proto__:null,codes:kc}));var Sc=se(Object.freeze({__proto__:null,constants:{attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4}})),Pc=se(co),_c=se(ao),Ac=se(eo),Cc=se(Ai),Fc=se(ro),Dc=se(io),Oc=se(Gs);var Rc=Object.freeze({__proto__:null,paragraph:function(e,t,r,n){const i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a}}),Tc=se(Rc);var jc=Object.freeze({__proto__:null,heading:function(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(n);if(function(e,t){let r=!1;return Qs(e,(e=>{if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,Va})),Boolean((!e.depth||e.depth<3)&&oi(e)&&(t.options.setext||r))}(e,r)){const t=r.enter("headingSetext"),n=r.enter("phrasing"),a=r.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return n(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=r.enter("headingAtx"),c=r.enter("phrasing");o.move(a+" ");let u=r.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),s(),u}}),Ic=se(jc),Lc=se(Fi);function qc(e,t,r){return">"+(r?"":" ")+e}var zc,Mc=Object.freeze({__proto__:null,blockquote:function(e,t,r,n){const i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);const a=r.indentLines(r.containerFlow(e,o.current()),qc);return i(),a}}),Bc=se(Mc),Nc={exports:{}};zc=Nc,function(){var e;function t(e){for(var t,r,n,i,o=1,a=[].slice.call(arguments),s=0,c=e.length,u="",l=!1,f=!1,h=function(){return a[o++]},p=function(){for(var r="";/\d/.test(e[s]);)r+=e[s++],t=e[s];return r.length>0?parseInt(r):null};s<c;++s)if(t=e[s],l)switch(l=!1,"."==t?(f=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(f=!0,t=e[s+=2]):f=!0,i=p(),t){case"b":u+=parseInt(h(),10).toString(2);break;case"c":u+="string"==typeof(r=h())||r instanceof String?r:String.fromCharCode(parseInt(r,10));break;case"d":u+=parseInt(h(),10);break;case"f":n=String(parseFloat(h()).toFixed(i||6)),u+=f?n:n.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(e=zc.exports=t).format=t,e.vsprintf=function(e,r){return t.apply(null,[e].concat(r))},"undefined"!=typeof console&&"function"==typeof console.log&&(e.printf=function(){console.log(t.apply(null,arguments))})}();var $c=Nc.exports;const Uc=Object.assign(Vc(Error),{eval:Vc(EvalError),range:Vc(RangeError),reference:Vc(ReferenceError),syntax:Vc(SyntaxError),type:Vc(TypeError),uri:Vc(URIError)});function Vc(e){return t.displayName=e.displayName||e.name,t;function t(t,...r){const n=t?$c(t,...r):t;return new e(n)}}const Hc={}.hasOwnProperty,Qc={yaml:"-",toml:"+"};function Gc(e="yaml"){const t=[];let r=-1;for(Array.isArray(e)||(e=[e]);++r<e.length;)t[r]=Wc(e[r]);return t}function Wc(e){let t=e;if("string"==typeof t){if(!Hc.call(Qc,t))throw Uc("Missing matter definition for `%s`",t);t={type:t,marker:Qc[t]}}else if("object"!=typeof t)throw Uc("Expected matter to be an object, not `%j`",t);if(!Hc.call(t,"type"))throw Uc("Missing `type` in matter `%j`",t);if(!Hc.call(t,"fence")&&!Hc.call(t,"marker"))throw Uc("Missing `marker` or `fence` in matter `%j`",t);return t}function Kc(e){const t=e.type,r=e.anywhere,n=t+"Value",i=t+"Fence",o=i+"Sequence",a={tokenize:function(e,t,r){let n=0;return function(t){if(t===s.charCodeAt(n))return e.enter(i),e.enter(o),a(t);return r(t)};function a(t){return n===s.length?(e.exit(o),Ei(t)?(e.enter("whitespace"),c(t)):u(t)):t===s.charCodeAt(n++)?(e.consume(t),a):r(t)}function c(t){return Ei(t)?(e.consume(t),c):(e.exit("whitespace"),u(t))}function u(n){return null===n||ki(n)?(e.exit(i),t(n)):r(n)}},partial:!0};let s;return{tokenize:function(i,o,c){const u=this;return function(n){const o=u.now();if(1!==o.column||!r&&1!==o.line)return c(n);return i.enter(t),s=Jc(e,"open"),i.attempt(a,l,c)(n)};function l(t){return s=Jc(e,"close"),p(t)}function f(e){return null===e||ki(e)?p(e):(i.enter(n),h(e))}function h(e){return null===e||ki(e)?(i.exit(n),p(e)):(i.consume(e),h)}function p(e){return null===e?c(e):(i.enter("lineEnding"),i.consume(e),i.exit("lineEnding"),i.attempt(a,d,f))}function d(e){return i.exit(t),o(e)}},concrete:!0}}function Jc(e,t){return e.marker?Yc(e.marker,t).repeat(3):Yc(e.fence,t)}function Yc(e,t){return"string"==typeof e?e:e[t]}function Xc(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function Zc(e){const t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function eu(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function tu(e){const t=ru(e,"open"),r=ru(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+r}}function ru(e,t){return e.marker?nu(e.marker,t).repeat(3):nu(e.fence,t)}function nu(e,t){return"string"==typeof e?e:e[t]}var iu=Object.freeze({__proto__:null,default:function(e="yaml"){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){const t=Gc(e),r={};let n=-1;for(;++n<t.length;){const e=t[n],i=Jc(e,"open").charCodeAt(0);i in r?r[i].push(Kc(e)):r[i]=[Kc(e)]}return{flow:r}}(e)),r("fromMarkdownExtensions",function(e){const t=Gc(e),r={},n={};let i=-1;for(;++i<t.length;){const e=t[i];r[e.type]=Xc(e),n[e.type]=Zc,n[e.type+"Value"]=eu}return{enter:r,exit:n}}(e)),r("toMarkdownExtensions",function(e){const t=[],r={},n=Gc(e);let i=-1;for(;++i<n.length;){const e=n[i];r[e.type]=tu(e),t.push({atBreak:!0,character:ru(e,"open").charAt(0)})}return{unsafe:t,handlers:r}}(e))}}),ou=se(iu);function au(e,t,r,n,i,o,a,s,c,u,l,f,h,p,d){let m,g;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),v};function v(t){return 35===t?(m=a,y(t)):46===t?(m=s,y(t)):58===t||95===t||di(t)?(e.enter(o),e.enter(c),e.consume(t),x):d&&Ei(t)?Ci(e,v,"whitespace")(t):!d&&xi(t)?oo(e,v)(t):F(t)}function y(t){return e.enter(o),e.enter(m),e.enter(m+"Marker"),e.consume(t),e.exit(m+"Marker"),b}function b(t){return null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||xi(t)?r(t):(e.enter(m+"Value"),e.consume(t),w)}function w(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):35===t||46===t||125===t||xi(t)?(e.exit(m+"Value"),e.exit(m),e.exit(o),v(t)):(e.consume(t),w)}function x(t){return 45===t||46===t||58===t||95===t||vi(t)?(e.consume(t),x):(e.exit(c),d&&Ei(t)?Ci(e,k,"whitespace")(t):!d&&xi(t)?oo(e,k)(t):k(t))}function k(t){return 61===t?(e.enter(u),e.consume(t),e.exit(u),E):(e.exit(o),v(t))}function E(t){return null===t||60===t||61===t||62===t||96===t||125===t||d&&ki(t)?r(t):34===t||39===t?(e.enter(l),e.enter(h),e.consume(t),e.exit(h),g=t,P):d&&Ei(t)?Ci(e,E,"whitespace")(t):!d&&xi(t)?oo(e,E)(t):(e.enter(f),e.enter(p),e.consume(t),g=void 0,S)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):125===t||xi(t)?(e.exit(p),e.exit(f),e.exit(o),v(t)):(e.consume(t),S)}function P(t){return t===g?(e.enter(h),e.consume(t),e.exit(h),e.exit(l),e.exit(o),C):(e.enter(f),_(t))}function _(t){return t===g?(e.exit(f),P(t)):null===t?r(t):ki(t)?d?r(t):oo(e,_)(t):(e.enter(p),e.consume(t),A)}function A(t){return t===g||null===t||ki(t)?(e.exit(p),_(t)):(e.consume(t),A)}function C(e){return 125===e||xi(e)?v(e):F(e)}function F(o){return 125===o?(e.enter(i),e.consume(o),e.exit(i),e.exit(n),t):r(o)}}function su(e,t,r,n,i,o,a){let s,c=0,u=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),l};function l(r){return 93===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),f(r))}function f(t){if(93===t&&!u)return d(t);const r=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=r),s=r,h(t)}function h(t){return null===t||c>999||91===t&&++u>32?r(t):93!==t||u--?ki(t)?a?r(t):(e.consume(t),e.exit("chunkText"),f):(e.consume(t),92===t?p:h):(e.exit("chunkText"),d(t))}function p(t){return 91===t||92===t||93===t?(e.consume(t),c++,h):h(t)}function d(r){return e.exit(o),e.enter(i),e.consume(r),e.exit(i),e.exit(n),t}}function cu(e,t,r,n){const i=this;return function(t){if(di(t))return e.enter(n),e.consume(t),o;return r(t)};function o(a){return 45===a||95===a||vi(a)?(e.consume(a),o):(e.exit(n),45===i.previous||95===i.previous?r(a):t(a))}}const uu={tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0;let a,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),c(t)};function c(t){return 58===t?(e.consume(t),s++,c):s<3?r(t):(e.exit("directiveContainerSequence"),cu.call(n,e,u,r,"directiveContainerName")(t))}function u(t){return 91===t?e.attempt(lu,l,l)(t):l(t)}function l(t){return 123===t?e.attempt(fu,f,f)(t):f(t)}function f(t){return Ci(e,h,"whitespace")(t)}function h(i){return e.exit("directiveContainerFence"),null===i?p(i):ki(i)?n.interrupt?t(i):e.attempt(hu,d,p)(i):r(i)}function p(r){return e.exit("directiveContainer"),t(r)}function d(r){return null===r?(e.exit("directiveContainer"),t(r)):(e.enter("directiveContainerContent"),m(r))}function m(t){return null===t?w(t):e.attempt({tokenize:x,partial:!0},w,o?Ci(e,g,"linePrefix",o+1):g)(t)}function g(t){if(null===t)return w(t);const r=e.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=r),a=r,v(t)}function v(t){if(null===t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}return ki(t)?e.check(hu,y,b)(t):(e.consume(t),v)}function y(t){e.consume(t);const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,m}function b(t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}function w(r){return e.exit("directiveContainerContent"),e.exit("directiveContainer"),t(r)}function x(e,t,r){let n=0;return Ci(e,(function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)}),"linePrefix",4);function i(t){return 58===t?(e.consume(t),n++,i):n<s?r(t):(e.exit("directiveContainerSequence"),Ci(e,o,"whitespace")(t))}function o(n){return null===n||ki(n)?(e.exit("directiveContainerFence"),t(n)):r(n)}}},concrete:!0},lu={tokenize:function(e,t,r){return su(e,t,r,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},fu={tokenize:function(e,t,r){return au(e,t,r,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},hu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const pu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),i};function i(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),cu.call(n,e,o,r,"directiveLeafName")):r(t)}function o(t){return 91===t?e.attempt(du,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(mu,s,s)(t):s(t)}function s(t){return Ci(e,c,"whitespace")(t)}function c(n){return null===n||ki(n)?(e.exit("directiveLeaf"),t(n)):r(n)}}},du={tokenize:function(e,t,r){return su(e,t,r,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},mu={tokenize:function(e,t,r){return au(e,t,r,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0};const gu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),cu.call(n,e,i,r,"directiveTextName")};function i(t){return 58===t?r(t):91===t?e.attempt(vu,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(yu,a,a)(t):a(t)}function a(r){return e.exit("directiveText"),t(r)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},vu={tokenize:function(e,t,r){return su(e,t,r,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},yu={tokenize:function(e,t,r){return au(e,t,r,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};const bu=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],wu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function xu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function ku(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Eu(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||xu(e)}const Su=String.fromCharCode,Pu=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function _u(e,t={}){const r="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,n=[];let i,o,a=0,s=-1,c="";t.position&&("start"in t.position||"indent"in t.position?(o=t.position.indent,i=t.position.start):i=t.position);let u,l=(i?i.line:0)||1,f=(i?i.column:0)||1,h=p();for(a--;++a<=e.length;)if(10===u&&(f=(o?o[s]:0)||1),u=e.charCodeAt(a),38===u){const i=e.charCodeAt(a+1);if(9===i||10===i||12===i||32===i||38===i||60===i||Number.isNaN(i)||r&&i===r){c+=Su(u),f++;continue}const o=a+1;let s,l=o,g=o;if(35===i){g=++l;const t=e.charCodeAt(g);88===t||120===t?(s="hexadecimal",g=++l):s="decimal"}else s="named";let v="",y="",b="";const w="named"===s?Eu:"decimal"===s?xu:ku;for(g--;++g<=e.length;){const t=e.charCodeAt(g);if(!w(t))break;b+=Su(t),"named"===s&&bu.includes(b)&&(v=b,y=Ui(b))}let x=59===e.charCodeAt(g);if(x){g++;const e="named"===s&&Ui(b);e&&(v=b,y=e)}let k=1+g-o,E="";if(x||!1!==t.nonTerminated)if(b)if("named"===s){if(x&&!y)d(5,1);else if(v!==b&&(g=l+v.length,k=1+g-l,x=!1),!x){const r=v?1:3;if(t.attribute){const t=e.charCodeAt(g);61===t?(d(r,k),y=""):Eu(t)?y="":d(r,k)}else d(r,k)}E=y}else{x||d(2,k);let e=Number.parseInt(b,"hexadecimal"===s?16:10);if(Au(e))d(7,k),E=Su(65533);else if(e in wu)d(6,k),E=wu[e];else{let t="";Cu(e)&&d(6,k),e>65535&&(e-=65536,t+=Su(e>>>10|55296),e=56320|1023&e),E=t+Su(e)}}else"named"!==s&&d(4,k);else;if(E){m(),h=p(),a=g-1,f+=g-o+1,n.push(E);const r=p();r.offset++,t.reference&&t.reference.call(t.referenceContext,E,{start:h,end:r},e.slice(o-1,g)),h=r}else b=e.slice(o-1,g),c+=b,f+=b.length,a=g-1}else 10===u&&(l++,s++,f=0),Number.isNaN(u)?m():(c+=Su(u),f++);return n.join("");function p(){return{line:l,column:f,offset:a+((i?i.offset:0)||0)}}function d(e,r){let n;t.warning&&(n=p(),n.column+=r,n.offset+=r,t.warning.call(t.warningContext,Pu[e],n,e))}function m(){c&&(n.push(c),t.text&&t.text.call(t.textContext,c,{start:h,end:p()}),c="")}}function Au(e){return e>=55296&&e<=57343||e>1114111}function Cu(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}function Fu(e,t){return e=e.replace(t.subset?function(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly?e:e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,r,n){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charCodeAt(r+2),t)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function r(e,r,n){return t.format(e.charCodeAt(0),n.charCodeAt(r+1),t)}}function Du(e){return"&#x"+e.toString(16).toUpperCase()+";"}const Ou={}.hasOwnProperty,Ru=/^[^\t\n\r "#'.<=>`}]+$/;Vu.peek=function(){return":"};const Tu={canContainEols:["textDirective"],enter:{directiveContainer:function(e){Iu.call(this,"containerDirective",e)},directiveContainerAttributes:qu,directiveContainerLabel:function(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)},directiveLeaf:function(e){Iu.call(this,"leafDirective",e)},directiveLeafAttributes:qu,directiveText:function(e){Iu.call(this,"textDirective",e)},directiveTextAttributes:qu},exit:{directiveContainer:Uu,directiveContainerAttributeClassValue:Mu,directiveContainerAttributeIdValue:zu,directiveContainerAttributeName:Nu,directiveContainerAttributeValue:Bu,directiveContainerAttributes:$u,directiveContainerLabel:function(e){this.exit(e)},directiveContainerName:Lu,directiveLeaf:Uu,directiveLeafAttributeClassValue:Mu,directiveLeafAttributeIdValue:zu,directiveLeafAttributeName:Nu,directiveLeafAttributeValue:Bu,directiveLeafAttributes:$u,directiveLeafName:Lu,directiveText:Uu,directiveTextAttributeClassValue:Mu,directiveTextAttributeIdValue:zu,directiveTextAttributeName:Nu,directiveTextAttributeValue:Bu,directiveTextAttributes:$u,directiveTextName:Lu}},ju={unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:"\n",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}],handlers:{containerDirective:Vu,leafDirective:Vu,textDirective:Vu}};function Iu(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function Lu(e){this.stack[this.stack.length-1].name=this.sliceSerialize(e)}function qu(){this.setData("directiveAttributes",[]),this.buffer()}function zu(e){this.getData("directiveAttributes").push(["id",_u(this.sliceSerialize(e),{attribute:!0})])}function Mu(e){this.getData("directiveAttributes").push(["class",_u(this.sliceSerialize(e),{attribute:!0})])}function Bu(e){const t=this.getData("directiveAttributes");t[t.length-1][1]=_u(this.sliceSerialize(e),{attribute:!0})}function Nu(e){this.getData("directiveAttributes").push([this.sliceSerialize(e),""])}function $u(){const e=this.getData("directiveAttributes"),t={};let r=-1;for(;++r<e.length;){const n=e[r];"class"===n[0]&&t.class?t.class+=" "+n[1]:t[n[0]]=n[1]}this.setData("directiveAttributes"),this.resume();this.stack[this.stack.length-1].attributes=t}function Uu(e){this.exit(e)}function Vu(e,t,r,n){const i=ms(n),o=function(e){let t=0;"containerDirective"===e.type?(Qa(e,(function(e,r){if("containerDirective"===e.type){let e=r.length,n=0;for(;e--;)"containerDirective"===r[e].type&&n++;n>t&&(t=n)}})),t+=3):t="leafDirective"===e.type?2:1;return":".repeat(t)}(e),a=r.enter(e.type);let s,c=i.move(o+(e.name||""));if("containerDirective"===e.type){const t=(e.children||[])[0];s=Hu(t)?t:void 0}else s=e;if(s&&s.children&&s.children.length>0){const t=r.enter("label"),n=`${e.type}Label`,o=r.enter(n);c+=i.move("["),c+=i.move(As(s,r,{...i.current(),before:c,after:"]"})),c+=i.move("]"),o(),t()}if(c+=i.move(function(e,t){const r=vc(t),n="textDirective"===e.type?[r]:[r,"\n","\r"],i=e.attributes||{},o=[];let a,s,c,u;for(u in i)if(Ou.call(i,u)&&void 0!==i[u]&&null!==i[u]){const e=String(i[u]);if("id"===u)c=Ru.test(e)?"#"+e:l("id",e);else if("class"===u){const t=e.split(/[\t\n\r ]+/g),r=[],n=[];let i=-1;for(;++i<t.length;)(Ru.test(t[i])?n:r).push(t[i]);a=r.length>0?l("class",r.join(" ")):"",s=n.length>0?"."+n.join("."):""}else o.push(l(u,e))}a&&o.unshift(a);s&&o.unshift(s);c&&o.unshift(c);return o.length>0?"{"+o.join(" ")+"}":"";function l(e,t){return e+(t?"="+r+function(e,t){return Fu(e,Object.assign({format:Du},t))}(t,{subset:n})+r:"")}}(e,r)),"containerDirective"===e.type){let t=e;Hu((e.children||[])[0])&&(t=Object.assign({},e,{children:e.children.slice(1)})),t&&t.children&&t.children.length>0&&(c+=i.move("\n"),c+=i.move(as(t,r,i.current()))),c+=i.move("\n"+o)}return a(),c}function Hu(e){return Boolean(e&&"paragraph"===e.type&&e.data&&e.data.directiveLabel)}var Qu=Object.freeze({__proto__:null,default:function(){const e=this.data();function t(t,r){(e[t]?e[t]:e[t]=[]).push(r)}t("micromarkExtensions",{text:{58:gu},flow:{58:[uu,pu]}}),t("fromMarkdownExtensions",Tu),t("toMarkdownExtensions",ju)}}),Gu=se(Qu);var Wu=Object.freeze({__proto__:null,remarkHeadingId:function(){const e=this.data();function t(t,r){(e[t]||(e[t]=[])).push(r)}return t("micromarkExtensions",function(){const e={text:{[kc.leftCurlyBrace]:{name:"headingIdMaybeStart",tokenize:(e,t,r)=>function(n){return e.attempt({tokenize(e,t,r){return function(t){if(t!==kc.leftCurlyBrace)throw new Error(`Unexpected code ${t}`);return e.enter("id"),e.enter("idMarker"),e.consume(t),n};function n(t){return t!==kc.numberSign?r(t):(e.consume(t),e.exit("idMarker"),e.enter("idString"),e.enter("chunkString",{contentType:"string"}),i)}function i(n){return[kc.carriageReturn,kc.lineFeed,kc.carriageReturnLineFeed,null,kc.backslash,kc.leftCurlyBrace].includes(n)?r(n):n===kc.rightCurlyBrace?(e.exit("chunkString"),e.exit("idString"),e.enter("idMarker"),e.consume(n),e.exit("idMarker"),e.exit("id"),t):(e.consume(n),i)}}},t,r)(n)}}}};return e}()),t("fromMarkdownExtensions",{enter:{idString(e){this.enter({type:"idString",value:null},e),this.buffer()}},exit:{idString(e){const t=this.resume();this.exit(e).value=t}}}),function(e){Qs(e,"idString",((e,t,r)=>{if(!r)throw new Error("Unexpected idString under no parent.");if("heading"!==r.type)throw new Error(`Unexpected node ${e} under ${r}`)})),Qs(e,"heading",(e=>{const t=e.children.filter((e=>"idString"===e.type));if(0==t.length)return;if(t.length>1)throw new Error(`Found ${t.length} ids under heading ${e}.`);const r=t[0];if(r.value&&r.value.length>0){e.data||(e.data={}),e.data.hProperties||(e.data.hProperties={}),e.data.id=e.data.hProperties.id=r.value,r.value="";const t=e.children.indexOf(r);if(t>=1){const r=e.children[t-1];"text"===r.type&&(r.value=r.value.trimEnd())}e.children.splice(t,1)}}))}}}),Ku=se(Wu),Ju=se($a),Yu={exports:{}},Xu=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},Zu=Xu,el=Object.prototype.toString;function tl(e){return Array.isArray(e)}function rl(e){return void 0===e}function nl(e){return"[object ArrayBuffer]"===el.call(e)}function il(e){return null!==e&&"object"==typeof e}function ol(e){if("[object Object]"!==el.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function al(e){return"[object Function]"===el.call(e)}function sl(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),tl(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var cl={isArray:tl,isArrayBuffer:nl,isBuffer:function(e){return null!==e&&!rl(e)&&null!==e.constructor&&!rl(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===el.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&nl(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:il,isPlainObject:ol,isUndefined:rl,isDate:function(e){return"[object Date]"===el.call(e)},isFile:function(e){return"[object File]"===el.call(e)},isBlob:function(e){return"[object Blob]"===el.call(e)},isFunction:al,isStream:function(e){return il(e)&&al(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===el.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:sl,merge:function e(){var t={};function r(r,n){ol(t[n])&&ol(r)?t[n]=e(t[n],r):ol(r)?t[n]=e({},r):tl(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)sl(arguments[n],r);return t},extend:function(e,t,r){return sl(t,(function(t,n){e[n]=r&&"function"==typeof t?Zu(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},ul=cl;function ll(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var fl=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(ul.isURLSearchParams(t))n=t.toString();else{var i=[];ul.forEach(t,(function(e,t){null!=e&&(ul.isArray(e)?t+="[]":e=[e],ul.forEach(e,(function(e){ul.isDate(e)?e=e.toISOString():ul.isObject(e)&&(e=JSON.stringify(e)),i.push(ll(t)+"="+ll(e))})))})),n=i.join("&")}if(n){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},hl=cl;function pl(){this.handlers=[]}pl.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},pl.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},pl.prototype.forEach=function(e){hl.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var dl=pl,ml=cl,gl=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},vl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yl=gl,bl=function(e,t,r,n,i){var o=new Error(e);return yl(o,t,r,n,i)},wl=bl,xl=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(wl("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},kl=cl,El=kl.isStandardBrowserEnv()?{write:function(e,t,r,n,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),kl.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),kl.isString(n)&&a.push("path="+n),kl.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Sl=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Pl=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},_l=function(e,t){return e&&!Sl(t)?Pl(e,t):t},Al=cl,Cl=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Fl=cl,Dl=Fl.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=Fl.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function Ol(e){this.message=e}Ol.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Ol.prototype.__CANCEL__=!0;var Rl,Tl=Ol,jl=cl,Il=xl,Ll=El,ql=fl,zl=_l,Ml=function(e){var t,r,n,i={};return e?(Al.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=Al.trim(e.substr(0,n)).toLowerCase(),r=Al.trim(e.substr(n+1)),t){if(i[t]&&Cl.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i},Bl=Dl,Nl=bl,$l=vl,Ul=Tl,Vl=function(e){return new Promise((function(t,r){var n,i=e.data,o=e.headers,a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}jl.isFormData(i)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(u+":"+l)}var f=zl(e.baseURL,e.url);function h(){if(c){var n="getAllResponseHeaders"in c?Ml(c.getAllResponseHeaders()):null,i={data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c};Il((function(e){t(e),s()}),(function(e){r(e),s()}),i),c=null}}if(c.open(e.method.toUpperCase(),ql(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(h)},c.onabort=function(){c&&(r(Nl("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){r(Nl("Network Error",e,null,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||$l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(Nl(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},jl.isStandardBrowserEnv()){var p=(e.withCredentials||Bl(f))&&e.xsrfCookieName?Ll.read(e.xsrfCookieName):void 0;p&&(o[e.xsrfHeaderName]=p)}"setRequestHeader"in c&&jl.forEach(o,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete o[t]:c.setRequestHeader(t,e)})),jl.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){c&&(r(!e||e&&e.type?new Ul("canceled"):e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),i||(i=null),c.send(i)}))},Hl={exports:{}},Ql=z.default,Gl=Ql.URL,Wl=B.default,Kl=N.default,Jl=$.default.Writable,Yl=M.default,Xl=function(){if(!Rl){try{Rl=require("debug")("follow-redirects")}catch(e){}"function"!=typeof Rl&&(Rl=function(){})}Rl.apply(null,arguments)},Zl=["abort","aborted","connect","error","socket","timeout"],ef=Object.create(null);Zl.forEach((function(e){ef[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var tf=hf("ERR_INVALID_URL","Invalid URL",TypeError),rf=hf("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),nf=hf("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),of=hf("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),af=hf("ERR_STREAM_WRITE_AFTER_END","write after end");function sf(e,t){Jl.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function cf(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",o=r[i]=e[n],a=t[n]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,n,o){if(df(e)){var a;try{a=lf(new Gl(e))}catch(t){a=Ql.parse(e)}if(!df(a.protocol))throw new tf({input:e});e=a}else Gl&&e instanceof Gl?e=lf(e):(o=n,n=e,e={protocol:i});return mf(n)&&(o=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,df(n.host)||df(n.hostname)||(n.hostname="::1"),Yl.equal(n.protocol,i,"protocol mismatch"),Xl("options",n),new sf(n,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=a.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function uf(){}function lf(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function ff(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function hf(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function pf(e){for(var t of Zl)e.removeListener(t,ef[t]);e.on("error",uf),e.abort()}function df(e){return"string"==typeof e||e instanceof String}function mf(e){return"function"==typeof e}sf.prototype=Object.create(Jl.prototype),sf.prototype.abort=function(){pf(this._currentRequest),this.emit("abort")},sf.prototype.write=function(e,t,r){if(this._ending)throw new af;if(!df(e)&&!function(e){return"object"==typeof e&&"length"in e}(e))throw new TypeError("data should be a string, Buffer or Uint8Array");mf(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new of),this.abort()):r&&r()},sf.prototype.end=function(e,t,r){if(mf(e)?(r=e,e=t=null):mf(t)&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},sf.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},sf.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},sf.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),o()}),e),n(t)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){sf.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(sf.prototype,e,{get:function(){return this._currentRequest[e]}})})),sf.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},sf.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(n._redirectable=this,Zl))n.on(i,ef[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ql.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function e(t){if(n===a._currentRequest)if(t)a.emit("error",t);else if(o<s.length){var r=s[o++];n.finished||n.write(r.data,r.encoding,e)}else a._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},sf.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(pf(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new nf);else{var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ff(/^content-/i,this._options.headers));var a,s=ff(/^host$/i,this._options.headers),c=Ql.parse(this._currentUrl),u=s||c.host,l=/^\w+:/.test(r)?this._currentUrl:Ql.format(Object.assign(c,{host:u}));try{a=Ql.resolve(l,r)}catch(e){return void this.emit("error",new rf({cause:e}))}Xl("redirecting to",a),this._isRedirect=!0;var f=Ql.parse(a);if(Object.assign(this._options,f),(f.protocol!==c.protocol&&"https:"!==f.protocol||f.host!==u&&!function(e,t){Yl(df(e)&&df(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(f.host,u))&&ff(/^(?:authorization|cookie)$/i,this._options.headers),mf(i)){var h={headers:e.headers,statusCode:t},p={url:l,method:o,headers:n};try{i(this._options,h,p)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new rf({cause:e}))}}},Hl.exports=cf({http:Wl,https:Kl}),Hl.exports.wrap=cf;var gf="0.26.1",vf=cl,yf=xl,bf=_l,wf=fl,xf=B.default,kf=N.default,Ef=Hl.exports.http,Sf=Hl.exports.https,Pf=z.default,_f=U.default,Af=gf,Cf=bl,Ff=gl,Df=vl,Of=Tl,Rf=/https:?/;function Tf(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,Tf(e,t,e.href)}}var jf=function(e){return new Promise((function(t,r){var n;function i(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}var o=function(e){i(),t(e)},a=!1,s=function(e){i(),a=!0,r(e)},c=e.data,u=e.headers,l={};if(Object.keys(u).forEach((function(e){l[e.toLowerCase()]=e})),"user-agent"in l?u[l["user-agent"]]||delete u[l["user-agent"]]:u["User-Agent"]="axios/"+Af,c&&!vf.isStream(c)){if(Buffer.isBuffer(c));else if(vf.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else{if(!vf.isString(c))return s(Cf("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c=Buffer.from(c,"utf-8")}if(e.maxBodyLength>-1&&c.length>e.maxBodyLength)return s(Cf("Request body larger than maxBodyLength limit",e));l["content-length"]||(u["Content-Length"]=c.length)}var f=void 0;e.auth&&(f=(e.auth.username||"")+":"+(e.auth.password||""));var h=bf(e.baseURL,e.url),p=Pf.parse(h),d=p.protocol||"http:";if(!f&&p.auth){var m=p.auth.split(":");f=(m[0]||"")+":"+(m[1]||"")}f&&l.authorization&&delete u[l.authorization];var g=Rf.test(d),v=g?e.httpsAgent:e.httpAgent;try{wf(p.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){var y=new Error(t.message);y.config=e,y.url=e.url,y.exists=!0,s(y)}var b={path:wf(p.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:u,agent:v,agents:{http:e.httpAgent,https:e.httpsAgent},auth:f};e.socketPath?b.socketPath=e.socketPath:(b.hostname=p.hostname,b.port=p.port);var w,x=e.proxy;if(!x&&!1!==x){var k=d.slice(0,-1)+"_proxy",E=process.env[k]||process.env[k.toUpperCase()];if(E){var S=Pf.parse(E),P=process.env.no_proxy||process.env.NO_PROXY,_=!0;if(P){var A=P.split(",").map((function(e){return e.trim()}));_=!A.some((function(e){return!!e&&("*"===e||("."===e[0]&&p.hostname.substr(p.hostname.length-e.length)===e||p.hostname===e))}))}if(_&&(x={host:S.hostname,port:S.port,protocol:S.protocol},S.auth)){var C=S.auth.split(":");x.auth={username:C[0],password:C[1]}}}}x&&(b.headers.host=p.hostname+(p.port?":"+p.port:""),Tf(b,x,d+"//"+p.hostname+(p.port?":"+p.port:"")+b.path));var F=g&&(!x||Rf.test(x.protocol));e.transport?w=e.transport:0===e.maxRedirects?w=F?kf:xf:(e.maxRedirects&&(b.maxRedirects=e.maxRedirects),w=F?Sf:Ef),e.maxBodyLength>-1&&(b.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(b.insecureHTTPParser=e.insecureHTTPParser);var D=w.request(b,(function(t){if(!D.aborted){var r=t,n=t.req||D;if(204!==t.statusCode&&"HEAD"!==n.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(_f.createUnzip()),delete t.headers["content-encoding"]}var i={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:n};if("stream"===e.responseType)i.data=r,yf(o,s,i);else{var c=[],u=0;r.on("data",(function(t){c.push(t),u+=t.length,e.maxContentLength>-1&&u>e.maxContentLength&&(a=!0,r.destroy(),s(Cf("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,n)))})),r.on("aborted",(function(){a||(r.destroy(),s(Cf("error request aborted",e,"ERR_REQUEST_ABORTED",n)))})),r.on("error",(function(t){D.aborted||s(Ff(t,e,null,n))})),r.on("end",(function(){try{var t=1===c.length?c[0]:Buffer.concat(c);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=vf.stripBOM(t))),i.data=t}catch(t){s(Ff(t,e,t.code,i.request,i))}yf(o,s,i)}))}}}));if(D.on("error",(function(t){D.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||s(Ff(t,e,null,D))})),D.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){var O=parseInt(e.timeout,10);if(isNaN(O))return void s(Cf("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",D));D.setTimeout(O,(function(){D.abort();var t="";t=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";var r=e.transitional||Df;s(Cf(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",D))}))}(e.cancelToken||e.signal)&&(n=function(e){D.aborted||(D.abort(),s(!e||e&&e.type?new Of("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),vf.isStream(c)?c.on("error",(function(t){s(Ff(t,e,null,D))})).pipe(D):D.end(c)}))},If=cl,Lf=function(e,t){ml.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},qf=gl,zf={"Content-Type":"application/x-www-form-urlencoded"};function Mf(e,t){!If.isUndefined(e)&&If.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Bf,Nf={transitional:vl,adapter:("undefined"!=typeof XMLHttpRequest?Bf=Vl:"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(Bf=jf),Bf),transformRequest:[function(e,t){return Lf(t,"Accept"),Lf(t,"Content-Type"),If.isFormData(e)||If.isArrayBuffer(e)||If.isBuffer(e)||If.isStream(e)||If.isFile(e)||If.isBlob(e)?e:If.isArrayBufferView(e)?e.buffer:If.isURLSearchParams(e)?(Mf(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):If.isObject(e)||t&&"application/json"===t["Content-Type"]?(Mf(t,"application/json"),function(e,t,r){if(If.isString(e))try{return(t||JSON.parse)(e),If.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Nf.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&If.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw qf(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};If.forEach(["delete","get","head"],(function(e){Nf.headers[e]={}})),If.forEach(["post","put","patch"],(function(e){Nf.headers[e]=If.merge(zf)}));var $f=Nf,Uf=cl,Vf=$f,Hf=function(e){return!(!e||!e.__CANCEL__)},Qf=cl,Gf=function(e,t,r){var n=this||Vf;return Uf.forEach(r,(function(r){e=r.call(n,e,t)})),e},Wf=Hf,Kf=$f,Jf=Tl;function Yf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jf("canceled")}var Xf=cl,Zf=function(e,t){t=t||{};var r={};function n(e,t){return Xf.isPlainObject(e)&&Xf.isPlainObject(t)?Xf.merge(e,t):Xf.isPlainObject(t)?Xf.merge({},t):Xf.isArray(t)?t.slice():t}function i(r){return Xf.isUndefined(t[r])?Xf.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function o(e){if(!Xf.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return Xf.isUndefined(t[r])?Xf.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function s(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return Xf.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,n=t(e);Xf.isUndefined(n)&&t!==s||(r[e]=n)})),r},eh=gf,th={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){th[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var rh={};th.transitional=function(e,t,r){function n(e,t){return"[Axios v"+eh+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,o){if(!1===e)throw new Error(n(i," has been removed"+(t?" in "+t:"")));return t&&!rh[i]&&(rh[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var nh={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],c=void 0===s||a(s,o,e);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:th},ih=cl,oh=fl,ah=dl,sh=function(e){return Yf(e),e.headers=e.headers||{},e.data=Gf.call(e,e.data,e.headers,e.transformRequest),e.headers=Qf.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Qf.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Kf.adapter)(e).then((function(t){return Yf(e),t.data=Gf.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Wf(t)||(Yf(e),t&&t.response&&(t.response.data=Gf.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ch=Zf,uh=nh,lh=uh.validators;function fh(e){this.defaults=e,this.interceptors={request:new ah,response:new ah}}fh.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=ch(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&uh.assertOptions(r,{silentJSONParsing:lh.transitional(lh.boolean),forcedJSONParsing:lh.transitional(lh.boolean),clarifyTimeoutError:lh.transitional(lh.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!i){var s=[sh,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),o=Promise.resolve(t);s.length;)o=o.then(s.shift(),s.shift());return o}for(var c=t;n.length;){var u=n.shift(),l=n.shift();try{c=u(c)}catch(e){l(e);break}}try{o=sh(c)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},fh.prototype.getUri=function(e){return e=ch(this.defaults,e),oh(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ih.forEach(["delete","get","head","options"],(function(e){fh.prototype[e]=function(t,r){return this.request(ch(r||{},{method:e,url:t,data:(r||{}).data}))}})),ih.forEach(["post","put","patch"],(function(e){fh.prototype[e]=function(t,r,n){return this.request(ch(n||{},{method:e,url:t,data:r}))}}));var hh=fh,ph=Tl;function dh(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new ph(e),t(r.reason))}))}dh.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},dh.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},dh.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},dh.source=function(){var e;return{token:new dh((function(t){e=t})),cancel:e}};var mh=dh,gh=cl,vh=cl,yh=Xu,bh=hh,wh=Zf;var xh=function e(t){var r=new bh(t),n=yh(bh.prototype.request,r);return vh.extend(n,bh.prototype,r),vh.extend(n,r),n.create=function(r){return e(wh(t,r))},n}($f);xh.Axios=bh,xh.Cancel=Tl,xh.CancelToken=mh,xh.isCancel=Hf,xh.VERSION=gf,xh.all=function(e){return Promise.all(e)},xh.spread=function(e){return function(t){return e.apply(null,t)}},xh.isAxiosError=function(e){return gh.isObject(e)&&!0===e.isAxiosError},Yu.exports=xh,Yu.exports.default=xh;var kh=Yu.exports;function Eh(e){return e}function Sh(e){var t=[];if(e)return Array.isArray(e)?e:("object"==typeof e&&Object.keys(e).forEach((function(r){"number"==typeof r&&(t[r]=e[r])})),t)}function Ph(e){if(kh.isCancel(e))return Promise.reject(e);var t=Ah(e)||{};if(t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry="number"==typeof t.retry?t.retry:3,t.retryDelay="number"==typeof t.retryDelay?t.retryDelay:100,t.instance=t.instance||kh,t.backoffType=t.backoffType||"exponential",t.httpMethodsToRetry=Sh(t.httpMethodsToRetry)||["GET","HEAD","PUT","OPTIONS","DELETE"],t.noResponseRetries="number"==typeof t.noResponseRetries?t.noResponseRetries:2,t.checkRetryAfter="boolean"!=typeof t.checkRetryAfter||t.checkRetryAfter,t.maxRetryAfter="number"==typeof t.maxRetryAfter?t.maxRetryAfter:3e5,t.statusCodesToRetry=Sh(t.statusCodesToRetry)||[[100,199],[429,429],[500,599]],e.config=e.config||{},e.config.raxConfig=Object.assign({},t),!(t.shouldRetry||_h)(e))return Promise.reject(e);var r=new Promise((function(r,n){var i=0;if(t.checkRetryAfter&&e.response&&e.response.headers["retry-after"]){var o=function(e){var t=Number(e);if(!Number.isNaN(t))return 1e3*t;var r=Date.parse(e);return Number.isNaN(r)?void 0:r-Date.now()}(e.response.headers["retry-after"]);if(!(o&&o>0&&o<=t.maxRetryAfter))return n(e);i=o}e.config.raxConfig.currentRetryAttempt+=1;var a=e.config.raxConfig.currentRetryAttempt;0===i&&(i="linear"===t.backoffType?1e3*a:"static"===t.backoffType?t.retryDelay:(Math.pow(2,a)-1)/2*1e3,"number"==typeof t.maxRetryDelay&&(i=Math.min(i,t.maxRetryDelay))),setTimeout(r,i)})),n=t.onRetryAttempt?Promise.resolve(t.onRetryAttempt(e)):Promise.resolve();return Promise.resolve().then((function(){return r})).then((function(){return n})).then((function(){return t.instance.request(e.config)}))}function _h(e){var t=e.config.raxConfig;if(!t||0===t.retry)return!1;if(!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries)return!1;if(!e.config.method||t.httpMethodsToRetry.indexOf(e.config.method.toUpperCase())<0)return!1;if(e.response&&e.response.status){for(var r=!1,n=0,i=t.statusCodesToRetry;n<i.length;n+=1){var o=i[n],a=e.response.status;if(a>=o[0]&&a<=o[1]){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}function Ah(e){if(e&&e.config)return e.config.raxConfig}var Ch=Object.freeze({__proto__:null,attach:function(e){return(e=e||kh).interceptors.response.use(Eh,Ph)},detach:function(e,t){(t=t||kh).interceptors.response.eject(e)},shouldRetryRequest:_h,getConfig:Ah}),Fh=se(Ch);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=L.default,r=dr,n=Fr.exports,i=qr.exports,o=j.default,a=Sn,s=ii,c=oa,u=Hs,l=Js,f=Ys,h=bc,p=wc,d=xc,m=Ec,g=Sc,v=M.default,y=Pc,b=_c,w=Ac,x=Cc,k=Fc,E=Dc,S=Oc,P=Tc,_=Ic,A=Lc,C=Bc,F=ou,D=Gu,O=Ku,R=Ju,T=kh,I=Fh,q=Rr.exports;function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var B=z(r),N=z(n),$=z(i),U=z(o),V=z(c),H=z(u),Q=z(l),G=z(v),W=z(F),K=z(D),J=z(T),Y=z(I),X=z(q);class Z{constructor(e,t,r,n){this.id=void 0,this.sha=void 0,this.summary=void 0,this._config=void 0,this.id=e,this.sha=n,this.summary=r,this.config=t}get config(){return this._config}set config(e){e.setKey(`${this.id}:config`),this._config=e}}Z.style=".topwrite/style.css",Z.logo="logo.png",Z.readme="README.md";function ee(e){return"string"==typeof e&&e.startsWith("@encrypted:")}function te(e,t){return N.default.encrypt(e,t).toString()}function re(e,t){try{return N.default.decrypt(e,t).toString($.default)}catch{return""}}var ne=Object.freeze({__proto__:null,encrypt:te,decrypt:re});class ie{constructor(e,t,r){this.key=void 0,this.values=void 0,this.schema=void 0,this.values=e,this.schema=t,this.key=r}setKey(e){this.key=e}getValues(){return this.values}setValues(e){const r=new B.default({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:"ignore"}).compile(this.schema);if(!r(e=t.cloneDeep(e)))for(const n of r.errors)e=t.omit(e,n.dataPath.substr(1).split("/"));this.values=e}getValue(e,r){return t.get(this.values,e,r)}setValue(e,r){return t.set(this.values,e,r)}toObject(){const e=new B.default({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:"ignore"});e.removeKeyword("default"),e.addKeyword("default",{validate:(e,r,n,i,o,a,s)=>(t.isEqual(e,r)&&(delete o[a],t.isEmpty(o)&&function(e,r){const n=[];let i=e;for(let e=0;e<r.length-1;e++)n.push(i),i=i[r[e]];for(let e=r.length-2;e>=0;e--)t.isEmpty(n[e][r[e]])&&delete n[e][r[e]]}(s,t.toPath(i.substr(1)))),!0),modifying:!0,errors:!1}),e.addKeyword("encrypt",{validate:(e,r,n,i,o,a)=>(this.key&&e&&!ee(r)&&o&&a&&t.set(o,a,`@encrypted:${te(r,this.key)}`),!0),modifying:!0,errors:!1});const r=e.compile(this.schema),n=t.cloneDeep(this.values);return r(n),n}static createFromObject(e,r,n){const i=new B.default({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:"ignore"});i.addKeyword("encrypt",{validate:(e,r,i,o,a,s)=>(n&&e&&ee(r)&&a&&s&&t.set(a,s,re(r.substr(11),n)),!0),modifying:!0,errors:!1});const o=i.compile(r);if(!o(e))for(const r of o.errors)e=t.omit(e,r.dataPath.substr(1).split("/"));return new this(e,r,n)}}class oe extends ie{constructor(){super(...arguments),this.pluginsConfig={},this.presetPlugins={}}setPresetPlugins(e){this.presetPlugins=e}getPlugins(){return Array.from(new Set([...this.getValue("plugins"),...Object.keys(this.presetPlugins)]))}getPluginConfig(e,r){if(!this.pluginsConfig[e]){const n=this.presetPlugins[e]?this.presetPlugins[e]:this.getValue(["pluginsConfig",e],{});this.pluginsConfig[e]=ie.createFromObject(t.cloneDeep(n),r,`${this.key}:${e}`)}return this.pluginsConfig[e]}setPluginConfig(e,r){const n=r.toObject();t.isEmpty(n)?t.unset(this.values,["pluginsConfig",e]):this.setValue(["pluginsConfig",e],n),delete this.pluginsConfig[e]}static createFromObject(e){return super.createFromObject(e,oe.schema)}}oe.file="book.json",oe.schema={title:"TopWrite Configuration",type:"object",properties:{root:{type:"string",title:"Path from the root folder containing the book's content"},title:{type:"string",title:"Title of the book"},author:{type:"object",title:"attr of the author",properties:{name:{type:"string"},email:{type:"string"},home:{type:"string"}}},theme:{type:"string",title:"Name of the theme",default:"default"},themeConfig:{type:"object",title:"Configuration for theme",properties:{defaultMode:{type:"string",title:"Default mode",default:"light"},primaryColor:{type:"string",title:"Primary Color",format:"color",default:"#3c60ff"},expandLevel:{type:"integer",title:"Expand level",default:0},navs:{type:"array",title:"Nav configures",items:{type:"object",properties:{title:{title:"Label",type:"string"},url:{title:"Link",type:"string"}},required:["title","url"],additionalProperties:!1},default:[]}},default:{}},plugins:{type:"array",items:{type:"string"},default:[]},pluginsConfig:{type:"object",title:"Configuration for plugins",default:{}},pdf:{type:"object",title:"PDF specific configurations",properties:{fontFamily:{type:"string",default:"Microsoft Yahei",title:"Font family for the PDF output"},margin:{type:"object",title:"Margins (unit: pt)",properties:{right:{type:"integer",title:"Right Margin",minimum:0,maximum:100,default:30},left:{type:"integer",title:"Left Margin",minimum:0,maximum:100,default:30},top:{type:"integer",title:"Top Margin",minimum:0,maximum:100,default:40},bottom:{type:"integer",title:"Bottom Margin",minimum:0,maximum:100,default:40}},default:{}},paperSize:{type:"string",enum:["a0","a1","a2","a3","a4","a5","a6","b0","b1","b2","b3","b4","b5","b6","legal","letter"],default:"a4",title:"Paper size for the PDF"},chapterMark:{type:"string",enum:["pagebreak","rule","both","none"],default:"pagebreak",title:"How to mark detected chapters"},pageBreaksBefore:{type:"string",default:"/",title:'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'},pageNumbers:{type:"boolean",default:!0,title:"Add page numbers to the bottom of every page"}},default:{}},release:{type:"object",title:"Release specific configurations",properties:{pathEncode:{type:"boolean",title:"Whether to encode the chapter path",default:!0}},default:{}}},required:[]};class ae{constructor(e){void 0===e&&(e=[]),this.data=void 0,this.data="string"==typeof e?e.split(".").map((e=>parseInt(e,10))):e}getRoot(){return new ae(this.data.slice(0,1))}getParent(){return new ae(this.data.slice(0,-1))}createChild(e){return new ae(this.data.concat(e))}isDescendant(e){return e.toString().startsWith(`${this.toString()}.`)}getNext(){const e=[...this.data];return e[e.length-1]++,new ae(e)}getDepth(){return this.data.length-1}eq(e){return this.toString()===e.toString()}getLeafIndex(){return this.data[this.data.length-1]-1}toString(e){return e?this.data.slice(e.data.length).join("."):this.data.join(".")}static compare(e,t){for(let r=0;r<Math.max(e.data.length,t.data.length);r++){let n=e.data[r]||0,i=t.data[r]||0;if(n>i)return 1;if(i>n)return-1}return 0}}class se{constructor(e){let{title:t,ref:r="",path:n,children:i=[],metadata:a}=e;this.level=void 0,this.title=void 0,this.ref=void 0,this.path=void 0,this.children=void 0,this.metadata=void 0,this.hasPath=!1,this.title=t,this.ref=r,n?(this.hasPath=!0,this.path=n):this.path=r?o.posix.format({...o.posix.parse(r),ext:".html",base:""}):"",this.children=i,this.level=new ae,this.metadata=a}getMetadata(e,r){return this.metadata?t.get(this.metadata,e,r):r}getLevel(){return this.level}getTitle(){return this.title}getRef(){return this.ref}getPath(){return this.path}getArticles(){return this.children}getDescendants(){const e=[];return se.findArticle(this,(t=>(e.push(t),!1))),e}getDepth(){return this.getLevel().getDepth()}createChildLevel(){return this.level.createChild(this.children.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.children.entries())r.indexLevels(e.createChild(t+1))}toObject(){const e=this.children.map((function(e){return e.toObject()}));return{title:this.title,ref:this.ref,path:this.hasPath?this.path:void 0,metadata:this.metadata,children:t.isEmpty(e)?void 0:e}}static findArticle(e,t){return e.getArticles().reduce(((e,r)=>e||(t(r)?r:se.findArticle(r,t))),void 0)}static createFromObject(e){const t=e.children?.filter((e=>!!e.title)).map((e=>se.createFromObject(e)));return new se({...e,children:t})}}class ce{constructor(e,t,r){void 0===t&&(t=[]),this.level=void 0,this.title=void 0,this.articles=void 0,this.metadata=void 0,this.level=new ae,this.title=e,this.articles=t,this.metadata=r}getMetadata(e,r){return this.metadata?t.get(this.metadata,e,r):r}getLevel(){return this.level}getTitle(){return this.title}getArticles(){return this.articles}getFirstArticle(){return se.findArticle(this,(()=>!0))}getDescendants(){const e=[];return se.findArticle(this,(t=>(e.push(t),!1))),e}createChildLevel(){return this.level.createChild(this.articles.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.articles.entries())r.indexLevels(e.createChild(t+1))}toObject(){const e=this.articles.map((function(e){return e.toObject()}));return{title:this.title,metadata:this.metadata,articles:t.isEmpty(e)?void 0:e}}static createFromObject(e){const t=e.articles?.filter((e=>!!e.title)).map((e=>se.createFromObject(e)));return new ce(e.title,t,e.metadata)}}const ue={tokenize:function(e,t,r){function n(t){return t===m.codes.rightParenthesis?f(t):w.factoryDestination(e,i,r,d.types.resourceDestination,d.types.resourceDestinationLiteral,d.types.resourceDestinationLiteralMarker,d.types.resourceDestinationRaw,d.types.resourceDestinationString,g.constants.linkResourceDestinationBalanceMax)(t)}function i(t){return x.markdownLineEndingOrSpace(t)?b.factoryWhitespace(e,o)(t):f(t)}function o(t){return t===m.codes.quotationMark||t===m.codes.apostrophe||t===m.codes.leftParenthesis?E.factoryTitle(e,b.factoryWhitespace(e,a),r,d.types.resourceTitle,d.types.resourceTitleMarker,d.types.resourceTitleString)(t):a(t)}function a(t){return t===m.codes.equalsTo?(e.enter("resourceSize"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),s):f(t)}function s(t){return t===m.codes.lowercaseX?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),u):t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeWidth"),e.enter(d.types.chunkString,{contentType:"string"}),c(t))}function c(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("resourceSizeWidth"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):t===m.codes.lowercaseX?(e.exit(d.types.chunkString),e.exit("resourceSizeWidth"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),u):(e.consume(t),c)}function u(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeHeight"),e.enter(d.types.chunkString,{contentType:"string"}),l(t))}function l(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("resourceSizeHeight"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.consume(t),l)}function f(n){return n===m.codes.rightParenthesis?(e.enter(d.types.resourceMarker),e.consume(n),e.exit(d.types.resourceMarker),e.exit(d.types.resource),t):r(n)}return function(t){return e.enter(d.types.resource),e.enter(d.types.resourceMarker),e.consume(t),e.exit(d.types.resourceMarker),b.factoryWhitespace(e,n)}}},le={tokenize:function(e,t,r){const n=this;function i(e){return n.parser.defined.includes(y.normalizeIdentifier(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}return function(t){return G.default.strictEqual(t,m.codes.leftSquareBracket,"expected left bracket"),k.factoryLabel.call(n,e,i,r,d.types.reference,d.types.referenceMarker,d.types.referenceString)(t)}}},fe={tokenize:function(e,t,r){function n(n){return 93===n?(e.enter(d.types.referenceMarker),e.consume(n),e.exit(d.types.referenceMarker),e.exit(d.types.reference),t):r(n)}return function(t){return e.enter(d.types.reference),e.enter(d.types.referenceMarker),e.consume(t),e.exit(d.types.referenceMarker),n}}};var he={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if((n.events[a][1].type===d.types.labelImage||n.events[a][1].type===d.types.labelLink)&&!n.events[a][1]._balanced){i=n.events[a][1];break}function s(e){return i._balanced=!0,r(e)}function c(r){return r===m.codes.leftParenthesis?e.attempt(ue,t,o?t:s)(r):r===m.codes.leftSquareBracket?e.attempt(le,t,o?e.attempt(fe,t,s):s)(r):o?t(r):s(r)}return function(t){return G.default(t===m.codes.rightSquareBracket,"expected `]`"),i?i._inactive?s(t):(o=n.parser.defined.indexOf(y.normalizeIdentifier(n.sliceSerialize({start:i.end,end:n.now()})))>-1,e.enter(d.types.labelEnd),e.enter(d.types.labelMarker),e.consume(t),e.exit(d.types.labelMarker),e.exit(d.types.labelEnd),c):r(t)}},resolveTo:p.labelEnd.resolveTo,resolveAll:p.labelEnd.resolveAll};const pe=(e,t,r,n)=>{const i=h.image(e,t,r,n);return e.width||e.height?i.replace(/\)$/,` =${e.width||""}${e.height?`x${e.height}`:""})`):i};pe.peek=h.image.peek;const de=e=>{let t;switch(e){case"right":t="--: ";break;case"center":t=":-: ";break;default:t=""}return t},me={tokenize:function(e,t,r){function n(t){return t===m.codes.rightSquareBracket?r(t):(e.enter("blockQuoteType"),e.enter(d.types.chunkString,{contentType:"string"}),i(t))}function i(t){return t===m.codes.rightSquareBracket?(e.exit(d.types.chunkString),e.exit("blockQuoteType"),e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),o):x.markdownLineEndingOrSpace(t)||!x.asciiAlpha(t)?r(t):(e.consume(t),i)}function o(e){return e===m.codes.leftParenthesis?r(e):t(e)}return function(t){return e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),n}},partial:!0},ge={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(t===m.codes.greaterThan){const r=n.containerState;return G.default(r,"expected `containerState` to be defined in container"),r.open||(e.enter(d.types.blockQuote,{_container:!0}),r.open=!0),e.enter(d.types.blockQuotePrefix),e.enter(d.types.blockQuoteMarker),e.consume(t),e.exit(d.types.blockQuoteMarker),A.factorySpace(e,i,d.types.whitespace)}return r(t)};function i(t){return t===m.codes.leftSquareBracket?e.attempt(me,o,o)(t):o(t)}function o(r){return x.markdownSpace(r)?(e.enter(d.types.blockQuotePrefixWhitespace),e.consume(r),e.exit(d.types.blockQuotePrefixWhitespace),e.exit(d.types.blockQuotePrefix),t):(e.exit(d.types.blockQuotePrefix),t(r))}},continuation:{tokenize:function(e,t,r){return A.factorySpace(e,e.attempt(ge,t,r),d.types.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:g.constants.tabSize)}},exit:p.blockQuote.exit},ve="blankLine",ye="blankLineSequence",be={name:"blankLine",tokenize:(e,t,r)=>{let n;const i=t=>t===n?(e.consume(t),i):(e.exit(ye),o(t)),o=a=>a===n?(e.enter(ye),i(a)):x.markdownSpace(a)?A.factorySpace(e,o,d.types.whitespace)(a):a===m.codes.eof||x.markdownLineEnding(a)?(e.exit(ve),t(a)):r(a);return t=>(G.default(t===m.codes.caret,"expected `^`"),e.enter(ve),n=t,o(t))}},we=function(e,t){void 0===t&&(t="text");let r="";return S.visit(e,t,(function(e){r+=e.value})),r},xe=/^\[toc(?:=(\d)(?:,(\d))?)?]$/im,ke=s.unified().use(V.default).use((function(){const e=this.data();e.micromarkExtensions=[],e.fromMarkdownExtensions=[],e.toMarkdownExtensions=[],e.toHastExtensions=[]})).use(K.default).use(W.default,["yaml"]).use(H.default).use(Q.default).use(O.remarkHeadingId).use((function(){return this.data().toHastExtensions.push({xBlock:(e,t)=>e({},"x-block",{name:t.name,value:t.value,parameter:t.parameter}),xInline:(e,t)=>e({},"x-inline",{name:t.name,value:t.value})}),function(e){S.visit(e,((e,t,r)=>{if(null!==t&&null!==r)if((e=>"code"===e.type)(e)&&e.lang){const n=/\[([\w-_]+)(:([\w-_]+))?]/g.exec(e.lang);if(n){const i={type:"xBlock",name:n[1],parameter:n[3]||"",value:e.value,position:e.position};r.children.splice(t,1,i)}}else if((e=>"inlineCode"===e.type)(e)){const n=/^([^\s]+)\s(.*?)\s\1$/.exec(e.value);if(n){const i={type:"xInline",name:n[1],value:n[2],position:e.position};r.children.splice(t,1,i)}}}))}})).use((function(){const e=this.data();e.micromarkExtensions.push({text:{[m.codes.rightSquareBracket]:he}}),e.fromMarkdownExtensions.push({enter:{resourceSizeWidth:function(){this.buffer()},resourceSizeHeight:function(){this.buffer()}},exit:{resourceSizeWidth:function(){const e=this.resume();this.stack[this.stack.length-1].width=e},resourceSizeHeight:function(){const e=this.resume();this.stack[this.stack.length-1].height=e}}}),e.toMarkdownExtensions.push({handlers:{image:pe}}),e.toHastExtensions.push({image:(e,t)=>{const r={src:f.encode(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(r.title=t.title),r.width=t.width,r.height=t.height,e(t,"img",r)}})})).use((function(){return this.data().toMarkdownExtensions.push({handlers:{paragraph:(e,t,r,n)=>{const i=P.paragraph(e,t,r,n);return de(e.align)+i},heading:(e,t,r,n)=>_.heading(e,t,r,n).replace(/^#+\s/,`$&${de(e.align)}`)}}),function(e){S.visit(e,((e,t,r)=>{if((e=>"paragraph"===e.type||"heading"===e.type)(e)){const t=a.select("text",e);if(t){const n=t.value;n.startsWith("--: ")?e.align="right":n.startsWith(":-: ")?e.align="center":n.startsWith(":-- ")&&(e.align="left"),e.align&&(t.value=n.substr(4),r&&"listItem"===r.type?r.data={...r.data,hProperties:{className:`align-${e.align}`}}:e.data={...e.data,hProperties:{className:`align-${e.align}`}})}}}))}})).use((function(){const e=this.data();return e.toMarkdownExtensions.push({handlers:{blockquote:(e,t,r,n)=>{const i=C.blockquote(e,t,r,n);return e.variant?i.replace(/(^|\s+)>\s/,`$1> [${e.variant}] `):i}}}),e.micromarkExtensions.push({document:{[m.codes.greaterThan]:ge}}),e.fromMarkdownExtensions.push({enter:{blockQuoteType:function(){this.buffer()}},exit:{blockQuoteType:function(){const e=this.resume();this.stack[this.stack.length-1].variant=e}}}),function(e){S.visit(e,"blockquote",(e=>{e.variant&&(e.data={...e.data,hProperties:{className:e.variant}})}))}})).use((function(){const e=this.data();e.toHastExtensions.push({blankLine:e=>e({},"p",[e({},"br")])}),e.micromarkExtensions.push({flow:{[m.codes.caret]:be}}),e.toMarkdownExtensions.push({handlers:{blankLine:()=>"^"}}),e.fromMarkdownExtensions.push({enter:{blankLine:function(e){this.enter({type:"blankLine"},e)}},exit:{blankLine:function(e){this.exit(e)}}})})).use((function(){return function(e){S.visit(e,((e,t,r)=>{if(r&&"root"===r.type&&null!==t&&we(e).match(xe))return r.children.splice(t,1),[S.SKIP,t]}))}}));function Ee(e){const t=[];for(const r of e.children){const e=r.children,n=a.select("paragraph:first-child>*",r);if(!n)continue;const i=we(n);if(!i)continue;let o="";n.url&&(o=decodeURI(n.url),o.match(/[\\:*?"<>|]/)&&(o=""));let s={title:i,ref:o};if(e.length>1){const t=e[e.length-1];R.is(t,"list")&&(s.children=Ee(t))}t.push(s)}return t}const Se=ke();class Pe{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=!1),this.parts=void 0,this.json=void 0,this.parts=e,this.json=t,this.indexLevels()}hasMetadata(){let e=!1;return this.getArticle((r=>!!e||!t.isEmpty(r.metadata)&&(e=!0,!0)),(r=>(t.isEmpty(r.metadata)||(e=!0),!0))),e}isJson(){return this.json}getParts(){return this.parts}getPart(e){return this.parts[e]}getLastPart(){return this.parts[this.parts.length-1]}getArticles(){const e=[];return this.getArticle((t=>(e.push(t),!1))),e}getArticle(e,t){return this.parts.reduce(((r,n)=>r||(!t||t(n)?se.findArticle(n,e):void 0)),void 0)}getArticlePart(e){const t=e.getLevel().getRoot();return this.getByLevel(t)}getFirstPath(){const e=this.getArticle((e=>!!e.getPath()));if(e)return e.getPath()}getByLevel(e){const t=t=>t.getLevel().eq(e);return this.parts.reduce(((e,r)=>e||(t(r)?r:se.findArticle(r,t))),void 0)}getFirstArticle(){return this.getArticle((()=>!0))}getNextArticle(e){const t=e instanceof se?e.getLevel():e;let r=!1;return this.getArticle((e=>!!r||(r=e.getLevel()==t,!1)))}getPrevArticle(e){const t=e instanceof se?e.getLevel():e;let r;return this.getArticle((e=>e.getLevel()==t||(r=e,!1))),r}getParent(e){const t=(e instanceof se?e.getLevel():e).getParent();if(t)return this.getByLevel(t)}indexLevels(){for(const[e,t]of this.parts.entries()){const r=new ae(String(e+1));t.indexLevels(r)}}isSinglePart(){return 1===this.parts.length&&!this.parts[0].title}isEmpty(){return this.isSinglePart()?0===this.parts[0].articles.length:0===this.parts.length}toObject(){return this.parts.map((function(e){return e.toObject()}))}static createFromObject(e){return new Pe(e.map((e=>ce.createFromObject(e))),!0)}static createFromText(e){const t=function(e){const t=Se.parse(e),r=[];let n;for(const e of t.children)if(R.is(e,"heading")&&[2,3].includes(e.depth)&&(n&&r.push(n),n={title:we(e).trim()}),R.is(e,"list")){const t=Ee(e);n?n.articles=(n.articles||[]).concat(t):n={title:"",articles:t}}return n?r.push(n):r.push({title:""}),r}(e);return new Pe(t.map((e=>ce.createFromObject(e))))}static create(e){return"object"==typeof e?Pe.createFromObject(e):Pe.createFromText(e)}}Pe.file={json:"SUMMARY.json",markdown:"SUMMARY.md"};class _e{constructor(e){let{host:t,preset:r}=e;this.host=void 0,this.preset=void 0,this.host=t,this.preset=r}getBuyUrl(e,t){return`${this.host}/api/buy?book=${e.id}&plugin=${t.name}`}async bought(e,t){try{return await J.default.get(`${this.host}/api/bought?book=${e.id}&plugin=${t.name}`),!0}catch{return!1}}async trial(e,t){try{const{data:r}=await J.default.get(`${this.host}/api/trial?book=${e.id}&plugin=${t.name}`);return r}catch{return!1}}async queryPlugins(e){let{page:t=1,...r}=e;const{data:n}=await J.default.get(`${this.host}/api/query`,{params:{...r,page:t}});return n}async getInstalled(e){const{config:t}=e,r=[`theme-${t.getValue("theme")}`,...t.getValue("plugins")];this.preset&&(r.push(...Object.keys(this.preset)),t.setPresetPlugins(this.preset));const{data:n}=await J.default.get(`${this.host}/api/installed`,{params:{book:e.id,plugins:r.join(",")}}).catch((e=>{throw new Error("Plugins Check Failed:"+e.message)}));return n.flatMap((e=>!e.builtin||this.preset?.[e.name]?(e.preset=!!this.preset?.[e.name],[e]):[]))}}e.pluginCenter=void 0;class Ae{constructor(e,t,r){this.flatColors=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#f39c12","#d35400","#c0392b"],this.letter=void 0,this.size=void 0,this.canvas=void 0,this.letter=e,this.size=t,this.canvas=r,this.generate()}toDataUrl(){return this.canvas.toDataURL()}generate(){const e=this.canvas.getContext("2d");if(!e)throw new Error("getContext failed");const t=this.size/10;if(e.beginPath(),e.arc(this.size-t,this.size-t,t,0,Math.PI/2),e.lineTo(t,this.size),e.arc(t,this.size-t,t,Math.PI/2,Math.PI),e.lineTo(0,t),e.arc(t,t,t,Math.PI,3*Math.PI/2),e.lineTo(this.size-t,0),e.arc(this.size-t,t,t,3*Math.PI/2,2*Math.PI),e.lineTo(this.size,this.size-t),e.closePath(),this.letter.length>0){const t=this.letter[0].toUpperCase();e.fillStyle=this.flatColors[t.charCodeAt(0)%this.flatColors.length],e.fill(),e.restore(),e.font=Math.round(this.size/2)+"px Roboto",e.textAlign="center",e.fillStyle="#FFFFFF",e.fillText(this.letter[0].toUpperCase(),this.size/2,this.size/1.5)}else e.fillStyle=this.flatColors[0],e.fill()}static create(e,t,r){return r||(r=function(e){const t=window.document.createElement("canvas");return t.width=e,t.height=e,t}(t)),new Ae(e,t,r)}}const Ce=/^(?:\w+:)?\/\/(\S+)$/,Fe=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,De=/^[^\s\.]+\.\S{2,}$/;Y.default.attach(),J.default.defaults.raxConfig={retryDelay:2e3,backoffType:"static",shouldRetry:e=>{let{config:t,response:r}=e;const n=t.raxConfig||{};return!(n?.retryDecider&&!n.retryDecider()||!t.method||!n.httpMethodsToRetry?.includes(t.method.toUpperCase())||449!==r?.status)}},J.default.defaults.maxContentLength=1/0,J.default.defaults.maxBodyLength=1/0;const Oe=J.default.isAxiosError;Object.defineProperty(e,"request",{enumerable:!0,get:function(){return J.default}}),e.BaseConfig=ie,e.Book=Z,e.Config=oe,e.File=class{constructor(e){let{path:t,content:r,meta:n={}}=e;this.path=void 0,this.content=void 0,this.meta=void 0,this.path=t,this.content=r,this.meta=n}getMeta(e,r){return t.get(this.meta,e,r)}relative(e){const t="/"===e.slice(-1);return(e=U.default.posix.relative(U.default.posix.dirname(this.path),e)||".")+(t?"/":"")}resolve(e){return U.default.posix.join(U.default.posix.dirname(this.path),e)}},e.LetterAvatar=Ae,e.Level=ae,e.Summary=Pe,e.SummaryArticle=se,e.SummaryPart=ce,e.aes=ne,e.createPluginCenter=function(t){return e.pluginCenter=new _e(t)},e.isEncryptedData=ee,e.isRequestError=Oe,e.isUrl=function(e){const t=e.match(Ce);if(!t)return!1;const r=t[1];return!!r&&(Fe.test(r)||De.test(r))},e.markdown=ke,e.md5=function(e){return X.default(e).toString()}}(ce);class Dh{name;version;path;hooks;config;constructor({name:e,version:t,path:r,hooks:n,config:i}){this.name=e,this.version=t,this.path=r,this.hooks=n,this.config=i}getHook(e){return this.hooks[e]}getContext(e){return{...e,getConfig:()=>e.book.config.getPluginConfig(this.name,this.config)}}}async function Oh(e,t){oe.info(`installing plugin "${e.name}"`);const r=`npm install ${e.host}.tgz`,{error:n}=V.default.sync(r,{stdio:["inherit"],cwd:t,shell:!0});if(n)throw n;const i=j.default.join(t,"node_modules","topwrite-plugin-"+e.name),o=j.default.join(i,"dist","hooks.js");let a={};if(H.existsSync(o)){a=new d.NodeVM({require:{builtin:["path/posix","crypto"]},sandbox:{URL:URL,URLSearchParams:URLSearchParams}}).runFile(o)}const s=j.default.join(i,"config.json");let c={};return H.existsSync(s)&&(c=require(s)),oe.info(`plugin "${e.name}@${e.version}" installed with success`),new Dh({name:e.name,version:e.version,path:i,hooks:a,config:c})}const Rh=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/;class Th{book;sourceFS;tmpFS;dest;version;options;plugins=[];constructor(e,t,r,n,i,o){this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i,this.version=o}getContext(){return{book:this.book,sourceFS:this.sourceFS,tmpFS:this.tmpFS,request:ce.request,logger:oe,format:this.format}}async generate(){await this.initLfs(),await this.initPlugins(),await this.onInit(),await this.callHook("init"),await this.checkStyle(),await this.generateLogo(),await this.onReadme(),await this.callHook("readme"),await this.generateArticles(),await this.callHook("articles"),await this.onSummary(),await this.callHook("summary"),await this.callHook("beforeFinish")&&(await this.onFinish(),await this.callHook("finish")),oe.success("generation finished with success!")}async checkStyle(){this.tmpFS.exist(ce.Book.style)||await this.tmpFS.writeFile(ce.Book.style,"")}async initLfs(){if(this.options.lfs){oe.info("generate lfs files...");let e="git lfs ls-files -l";const{config:t}=this.book,r=t.getValue("root","");r&&(e+=` --include ${r}`);const{error:n,stdout:i}=V.default.sync(e,{stdio:["inherit"],encoding:"utf8",cwd:this.sourceFS.root,shell:!0}),o={};n||i.trim().split("\n").forEach((e=>{if(e){const[t,n]=e.trim().split(/\s[-*]\s/);if(t&&n){let e=n.trim();r&&(e=j.default.relative(r,e)),o[e]=t.trim(),this.tmpFS.unlink(e)}}})),this.options.lfs.files=o,oe.info(`found ${Object.keys(o).length} files`)}}async initPlugins(){this.plugins=await async function(e,t,r){const n=ce.createPluginCenter(r),i=await n.getInstalled(e),o=[];oe.info(`installing ${i.length} plugins from registry`);for(let e of i){if(e.disabled)throw new Error('plugin "'+e.name+'" has been disabled');o.push(await Oh(e,t))}return o}(this.book,this.tmpFS.root,this.options.plugins)}async generateLogo(){if(!this.tmpFS.exist(ce.Book.logo)){const e=this.book.config.getValue("title","Untitled"),t=g.createCanvas(60,60);ce.LetterAvatar.create(e,60,t);const r=t.toBuffer("image/png");await this.tmpFS.writeFile(ce.Book.logo,r)}}async generateArticles(){oe.info("generate articles ...");const e=this.book.summary.getArticles();oe.info(`found ${e.length} articles`);for(const t of e)if(t.ref){oe.info('generate article "'+t.getRef()+'"');try{await this.onArticle(t),await this.callHook("article",t)}catch(e){"ENOENT"===e.code?oe.warn(`article file [${t.ref}] not exist`):oe.warn(`generate article [${t.ref}] failed: ${e.message}`)}}}async callHook(e,...t){return oe.debug('calling hook "'+e+'"'),await(async(e,t)=>{for(let r of e)if(!await t(r))return!1;return!0})(this.plugins,(async r=>{const n=r.getHook(e);return!n||await n.apply(r.getContext(this.getContext()),t)}))}async makeFile(e){const t=await this.tmpFS.readAsString(e.ref),r=this.parseFileMeta(e.ref,t);return new ce.File({path:e.path,...r})}parseFileMeta(e,t){const r=t.match(Rh);let n={};if(r){if(void 0!==r[2])try{n=G.default.load(r[2])||{}}catch{}t=void 0!==r[3]?r[3]:""}const i=j.default.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(i),{meta:n,content:t}}}class jh extends Th{format="json";scripts=[];async onInit(){this.processSummary(),await this.installCommonAssets(),await this.installReader(),await this.copyPluginsAssets()}processSummary(){this.book.summary.getArticle((e=>(this.book.config.getValue(["release","pathEncode"],!0)&&(e.path=y.pinyin(e.path,{toneType:"none",nonZh:"consecutive",type:"array",v:!0}).join("")),e.hasPath=!0,!1)))}async installCommonAssets(){oe.info("installing common assets ..."),await this.installPackage("lodash","lodash.min.js","lodash/lodash.min.js"),await this.installPackage("react","umd/react.production.min.js","react/react.production.min.js"),await this.installPackage("react-dom","umd/react-dom.production.min.js","react-dom/react-dom.production.min.js"),oe.info("common assets installed with success")}async installReader(){oe.info("installing package @topwrite/reader ...");const e=await this.installPackage("@topwrite/reader","dist/","reader");oe.info(`package @topwrite/reader@${e.version} installed with success`)}async installPackage(e,t,r){const n=require.resolve(`${e}/package.json`),i=require(n);if(this.useCdn())t.endsWith("/")&&(t=`${t}index.js`),this.scripts.push(`https://jsdelivr.topthink.com/npm/${e}@${i.version}/${t}`);else{const e=j.default.join(j.default.dirname(n),t),o=j.default.join(this.tmpFS.root,"asset",r);await W.default.copy(e,o),t.endsWith("/")&&(r=`${r}/index.js`),this.scripts.push(`asset/${r}?v=${i.version}`)}return i}async copyPluginsAssets(){for(const e of this.plugins)if(this.useCdn()){const t=this.options.plugins.host;this.scripts.push(`${t}/plugins/${e.name}/${e.version}/dist/index.js`)}else await W.default.copy(j.default.join(e.path,"dist"),j.default.join(this.tmpFS.root,"asset","plugins",e.name)),this.scripts.push(`asset/plugins/${e.name}/index.js?v=${e.version}`)}useCdn(){return"cdn"===this.options.asset}async onReadme(){const e=await this.makeFile({path:"index.html",ref:"README.md"});await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html.json",this.stringify(e))}async onArticle(e){const t=e.path+".json";if(!this.tmpFS.exist(t)){const r=await this.makeFile(e);e.metadata={...r.meta,...e.metadata},await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(t,this.stringify(r))}}async onSummary(){const e=this.book.summary;await this.tmpFS.unlink(ce.Summary.file.json),await this.tmpFS.unlink(ce.Summary.file.markdown),await this.tmpFS.writeFile(ce.Summary.file.json,this.stringify(e.toObject()));const t={id:this.book.id,sha:this.book.sha,lfs:this.options.lfs,scripts:this.scripts,poweredBy:this.options.poweredBy,mtime:this.sourceFS.readFileMTime()};await this.tmpFS.writeFile("context.json",this.stringify(t))}async onFinish(){await this.packBook()}async packBook(){oe.info("pack book ...");const e=W.default.createWriteStream(this.dest);await this.tmpFS.archive(e,"tar")}stringify(e){return JSON.stringify(e,null,4)}}class Ih{root;constructor(e){this.root=e}readFileMTime(e=""){const t=`git log --pretty=format:%cI -1 -- ${e}`,{error:r,stdout:n}=V.default.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0});if(!r)return n}createReadStream(e,t){return W.default.createReadStream(this.resolve(e),t)}async readFile(e){return await W.default.readFile(this.resolve(e))}async readAsObject(e,t={}){try{return await W.default.readJSON(this.resolve(e))}catch{return t}}async readAsString(e){try{return await W.default.readFile(this.resolve(e),"utf-8")}catch{return""}}async writeFile(e,t){return e=this.resolve(e),W.default.ensureDirSync(j.default.dirname(e)),W.default.writeFile(e,t)}createWriteStream(e,t){return e=this.resolve(e),W.default.ensureDirSync(j.default.dirname(e)),W.default.createWriteStream(e,t)}async appendFile(e,t){return W.default.appendFile(this.resolve(e),t)}exist(e){return W.default.pathExistsSync(this.resolve(e))}async unlink(e){try{await W.default.unlink(this.resolve(e))}catch{}}async readDir(e=""){const t=[];return new Promise((r=>{K.default({path:this.resolve(e),ignoreFiles:[".gitignore",".bookignore"]}).on("child",(function(e){t.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(()=>{r(t)}))}))}resolve(...e){return j.default.join(this.root,...e)}async archive(e,t="tar"){if("tar"==t)return new Promise(((t,r)=>{x.pack(this.root,{fromBase:!0,ignoreFiles:[".gitignore",".bookignore"]}).pipe(e).on("error",(e=>{r(e)})).on("close",(()=>{t()}))}));{const r=await this.readDir();return new Promise(((n,i)=>{e.on("error",(e=>{i(e)})),e.on("close",(()=>{n()}));const o=J.default(t,{gzip:!0,gzipOptions:{level:9},zlib:{level:9}});o.pipe(e);for(const e of r)"File"===e.type&&o.append(this.createReadStream(e.path),{name:e.path});o.finalize()}))}}}class Lh extends jh{template;format="html";async onInit(){await super.onInit(),await this.initTemplate()}async initTemplate(){const e=await W.default.readFile(j.default.resolve(__dirname,"../templates/html.ejs"),"utf-8");this.template=Y.default.compile(e)}useCdn(){return!1}async onReadme(){const e=await this.makeFile({path:"index.html",ref:"README.md"}),t=await this.renderFile(e);await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html",t)}async onArticle(e){if(!this.tmpFS.exist(e.path)){const t=await this.makeFile(e);e.metadata={...t.meta,...e.metadata};const r=await this.renderFile(t,e.title);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(e.path,r)}}async onSummary(){await this.tmpFS.unlink(ce.Summary.file.json),await this.tmpFS.unlink(ce.Summary.file.markdown)}async renderFile(e,t){const r={id:this.book.id,sha:this.book.sha,summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:e,lfs:this.options.lfs,options:{poweredBy:this.options.poweredBy}},n=this.scripts.map((t=>ce.isUrl(t)?t:e.relative(t))),i=this.book.config.getValue("title","Untitled"),o=e.getMeta("title",t);return this.template({title:(o?`${o} - `:"")+i,keywords:e.getMeta("keywords"),description:e.getMeta("description"),scripts:n,payload:JSON.stringify(r).replace(/\//g,"\\/")})}}const qh=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));class zh extends X.default.ResourceLoader{async fetch(e,t){const{element:r}=t;return r&&"IMG"===r.nodeName?null:super.fetch(e,t)}}const Mh=/\s+at.*[(\s](.*)\)?/,Bh=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Nh=void 0===ee.default.homedir?"":ee.default.homedir().replace(/\\/g,"/");class $h extends Error{#e;name="AggregateError";constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t=(e=e.map((e=>e instanceof Error?e:null!==e&&"object"==typeof e?Object.assign(new Error(e.message),e):new Error(e)))).map((e=>{return"string"==typeof e.stack&&e.stack.length>0?(t=function(e,{pretty:t=!1,basePath:r}={}){const n=r&&new RegExp(`(at | \\()${za(r.replace(/\\/g,"/"))}`,"g");if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(Mh);if(null===t||!t[1])return!0;const r=t[1];return!(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")||r.includes("node_modules/electron/dist/resources/electron.asar")||r.includes("node_modules/electron/dist/resources/default_app.asar")||Bh.test(r))})).filter((e=>""!==e.trim())).map((e=>(n&&(e=e.replace(n,"$1")),t&&(e=e.replace(Mh,((e,t)=>e.replace(t,t.replace(Nh,"~"))))),e))).join("\n")}(e.stack),t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"")):String(e);var t})).join("\n");t="\n"+function(e,t=1,r={}){const{indent:n=" ",includeEmptyLines:i=!1}=r;if("string"!=typeof e)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if("number"!=typeof t)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if("string"!=typeof n)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(0===t)return e;const o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,n.repeat(t))}(t,4),super(t),this.#e=e}get errors(){return this.#e.slice()}}class Uh extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Vh=e=>void 0===globalThis.DOMException?new Uh(e):new DOMException(e),Hh=e=>{const t=void 0===e.reason?Vh("This operation was aborted."):e.reason;return t instanceof Error?t:Vh(t)};const Qh=Symbol("skip");function Gh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Wh=te.default,Kh=process.cwd,Jh=null,Yh=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Jh||(Jh=Kh.call(process)),Jh};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Xh=process.chdir;process.chdir=function(e){Jh=null,Xh.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Xh)}var Zh=function(e){Wh.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,Wh.O_WRONLY|Wh.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,Wh.O_WRONLY|Wh.O_SYMLINK,r),o=!0;try{n=e.fchmodSync(i,r),o=!1}finally{if(o)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){Wh.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,n,i){e.open(t,Wh.O_SYMLINK,(function(t,o){t?i&&i(t):e.futimes(o,r,n,(function(t){e.close(o,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,o=e.openSync(t,Wh.O_SYMLINK),a=!0;try{i=e.futimesSync(o,r,n),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}):e.futimes&&(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=n(e.chown),e.fchown=n(e.fchown),e.lchown=n(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=a(e.statSync),e.fstatSync=a(e.fstatSync),e.lstatSync=a(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===Yh&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,n,i){var o=Date.now(),a=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(n,(function(e,o){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),a),void(a<100&&(a+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename));function t(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){s(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function r(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!s(e))throw e}}:t}function n(t){return t?function(r,n,i,o){return t.call(e,r,n,i,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function i(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(r,n,i){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,o):t.call(e,r,o)}:t}function a(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function r(r,n,i,o,a,s){var c;if(s&&"function"==typeof s){var u=0;c=function(l,f,h){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,r,n,i,o,a,c);s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,r,n,i,o){for(var a=0;;)try{return c.call(e,t,r,n,i,o)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}});var c};var ep=$.default.Stream,tp=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);ep.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var o=Object.keys(n),a=0,s=o.length;a<s;a++){var c=o[a];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);ep.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),o=0,a=i.length;o<a;o++){var s=i[o];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var rp=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:np(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},np=Object.getPrototypeOf||function(e){return e.__proto__};var ip,op,ap=Q.default,sp=Zh,cp=tp,up=rp,lp=re.default;function fp(e,t){Object.defineProperty(e,ip,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(ip=Symbol.for("graceful-fs.queue"),op=Symbol.for("graceful-fs.previous")):(ip="___graceful-fs.queue",op="___graceful-fs.previous");var hp=function(){};if(lp.debuglog?hp=lp.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(hp=function(){var e=lp.format.apply(lp,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!ap[ip]){var pp=ae[ip]||[];fp(ap,pp),ap.close=function(e){function t(t,r){return e.call(ap,t,(function(e){e||yp(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,op,{value:e}),t}(ap.close),ap.closeSync=function(e){function t(t){e.apply(ap,arguments),yp()}return Object.defineProperty(t,op,{value:e}),t}(ap.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){hp(ap[ip]),M.default.equal(ap[ip].length,0)}))}ae[ip]||fp(ae,ap[ip]);var dp,mp=gp(up(ap));function gp(e){sp(e),e.gracefulify=gp,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,o){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):vp([e,[r,n,i],t,o||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,o,a){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):vp([e,[t,n,i,o],r,a||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,o,a){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):vp([e,[t,r,i,o],n,a||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,o,a){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof o&&o.apply(this,arguments):vp([e,[t,r,n,o],i,a||Date.now(),Date.now()])}))}(e,t,r,n)});var o=e.readdir;e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);var n=a.test(process.version)?function(e,t,r,n){return o(e,i(e,t,r,n))}:function(e,t,r,n){return o(e,t,i(e,t,r,n))};return n(e,t,r);function i(e,t,r,i){return function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(a&&a.sort&&a.sort(),"function"==typeof r&&r.call(this,o,a)):vp([n,[e,t,r],o,i||Date.now(),Date.now()])}}};var a=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=cp(e);h=s.ReadStream,p=s.WriteStream}var c=e.ReadStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var u=e.WriteStream;u&&(p.prototype=Object.create(u.prototype),p.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var l=h;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=p;function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function p(e,t){return this instanceof p?(u.apply(this,arguments),this):p.apply(Object.create(p.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var d=e.open;function m(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,o){return d(t,r,n,(function(a,s){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof i&&i.apply(this,arguments):vp([e,[t,r,n,i],a,o||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=m,e}function vp(e){hp("ENQUEUE",e[0].name,e[1]),ap[ip].push(e),bp()}function yp(){for(var e=Date.now(),t=0;t<ap[ip].length;++t)ap[ip][t].length>2&&(ap[ip][t][3]=e,ap[ip][t][4]=e);bp()}function bp(){if(clearTimeout(dp),dp=void 0,0!==ap[ip].length){var e=ap[ip].shift(),t=e[0],r=e[1],n=e[2],i=e[3],o=e[4];if(void 0===i)hp("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){hp("TIMEOUT",t.name,r);var a=r.pop();"function"==typeof a&&a.call(null,n)}else{var s=Date.now()-o,c=Math.max(o-i,1);s>=Math.min(1.2*c,100)?(hp("RETRY",t.name,r),t.apply(null,r.concat([i]))):ap[ip].push(e)}void 0===dp&&(dp=setTimeout(bp,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ap.__patched&&(mp=gp(ap),ap.__patched=!0);var wp=mp;const xp=ee.default.homedir(),{env:kp}=process,Ep=kp.XDG_DATA_HOME||(xp?j.default.join(xp,".local","share"):void 0),Sp=kp.XDG_CONFIG_HOME||(xp?j.default.join(xp,".config"):void 0);kp.XDG_STATE_HOME||xp&&j.default.join(xp,".local","state"),kp.XDG_CACHE_HOME||xp&&j.default.join(xp,".cache"),kp.XDG_RUNTIME_DIR;const Pp=(kp.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");Ep&&Pp.unshift(Ep);const _p=(kp.XDG_CONFIG_DIRS||"/etc/xdg").split(":");Sp&&_p.unshift(Sp);var Ap={exports:{}},Cp={exports:{}};
8
+ */var Bn=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},$n=Object.prototype.hasOwnProperty,Un=Object.prototype.toString,Vn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,Qn=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Un.call(e)},Wn=function(e){if(!e||"[object Object]"!==Un.call(e))return!1;var t,r=$n.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&$n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||$n.call(e,t)},Gn=function(e,t){Vn&&"__proto__"===t.name?Vn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Kn=function(e,t){if("__proto__"===t){if(!$n.call(e,t))return;if(Hn)return Hn(e,t).value}return e[t]},Jn=function e(){var t,r,n,i,o,a,s=arguments[0],c=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},c=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});c<u;++c)if(null!=(t=arguments[c]))for(r in t)n=Kn(s,r),s!==(i=Kn(t,r))&&(l&&i&&(Wn(i)||(o=Qn(i)))?(o?(o=!1,a=n&&Qn(n)?n:[]):a=n&&Wn(n)?n:{},Gn(s,{name:r,newValue:e(l,a,i)})):void 0!==i&&Gn(s,{name:r,newValue:i}));return s};function Yn(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Xn(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(o,...a){const s=e[++r];let c=-1;if(o)n(o);else{for(;++c<t.length;)null!==a[c]&&void 0!==a[c]||(a[c]=t[c]);t=a,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let a;n&&t.push(i);try{a=e.apply(this,t)}catch(e){if(n&&r)throw e;return i(e)}n||(a instanceof Promise?a.then(o,i):a instanceof Error?i(a):o(a))}function i(e,...n){r||(r=!0,t(e,...n))}function o(e){i(null,e)}}(s,i)(...a):n(null,...a)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}function Zn(e){return e&&"object"==typeof e?"position"in e||"type"in e?ti(e.position):"start"in e||"end"in e?ti(e):"line"in e||"column"in e?ei(e):"":""}function ei(e){return ri(e&&e.line)+":"+ri(e&&e.column)}function ti(e){return ei(e&&e.start)+"-"+ei(e&&e.end)}function ri(e){return e&&"number"==typeof e?e:1}class ni extends Error{constructor(e,t,r){const n=[null,null];let i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(r=t,t=void 0),"string"==typeof r){const e=r.indexOf(":");-1===e?n[1]=r:(n[0]=r.slice(0,e),n[1]=r.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(i=t.position):"start"in t||"end"in t?i=t:("line"in t||"column"in t)&&(i.start=t)),this.name=Zn(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=n[0],this.ruleId=n[1],this.file,this.actual,this.expected,this.url,this.note}}function ii(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}ni.prototype.file="",ni.prototype.name="",ni.prototype.reason="",ni.prototype.message="",ni.prototype.stack="",ni.prototype.fatal=null,ni.prototype.column=null,ni.prototype.line=null,ni.prototype.source=null,ni.prototype.ruleId=null,ni.prototype.position=null;const oi=["history","path","basename","stem","extname","dirname"];class ai{constructor(e){let t;t=e?"string"==typeof e||function(e){return Bn(e)}(e)?{value:e}:ii(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=q.default.cwd(),this.value,this.stored,this.result,this.map;let r,n=-1;for(;++n<oi.length;){const e=oi[n];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)oi.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){ii(e)&&(e=a.fileURLToPath(e)),ci(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?j.default.dirname(this.path):void 0}set dirname(e){ui(this.basename,"dirname"),this.path=j.default.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?j.default.basename(this.path):void 0}set basename(e){ci(e,"basename"),si(e,"basename"),this.path=j.default.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?j.default.extname(this.path):void 0}set extname(e){if(si(e,"extname"),ui(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=j.default.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?j.default.basename(this.path,this.extname):void 0}set stem(e){ci(e,"stem"),si(e,"stem"),this.path=j.default.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,r){const n=new ni(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=null,n}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}}function si(e,t){if(e&&e.includes(j.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+j.default.sep+"`")}function ci(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ui(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const li=function e(){const t=Xn(),r=[];let n,i={},o=-1;return a.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(mi("data",n),i[e]=t,a):fi.call(i,e)&&i[e]||null;if(e)return mi("data",n),i=e,a;return i},a.Parser=void 0,a.Compiler=void 0,a.freeze=function(){if(n)return a;for(;++o<r.length;){const[e,...n]=r[o];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const i=e.call(a,...n);"function"==typeof i&&t.use(i)}return n=!0,o=Number.POSITIVE_INFINITY,a},a.attachers=r,a.use=function(e,...t){let o;if(mi("use",n),null==e);else if("function"==typeof e)l(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?u(e):c(e)}o&&(i.settings=Object.assign(i.settings||{},o));return a;function s(e){if("function"==typeof e)l(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;l(t,...r)}else c(e)}}function c(e){u(e.plugins),e.settings&&(o=Object.assign(o||{},e.settings))}function u(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){s(e[t])}}}function l(e,t){let n,i=-1;for(;++i<r.length;)if(r[i][0]===e){n=r[i];break}n?(Yn(n[1])&&Yn(t)&&(t=Jn(!0,n[1],t)),n[1]=t):r.push([...arguments])}},a.parse=function(e){a.freeze();const t=yi(e),r=a.Parser;if(di("parse",r),hi(r,"parse"))return new r(String(t),t).parse();return r(String(t),t)},a.stringify=function(e,t){a.freeze();const r=yi(t),n=a.Compiler;if(pi("stringify",n),gi(e),hi(n,"compile"))return new n(e,r).compile();return n(e,r)},a.run=function(e,r,n){gi(e),a.freeze(),n||"function"!=typeof r||(n=r,r=void 0);if(!n)return new Promise(i);function i(i,o){function a(t,r,a){r=r||e,t?o(t):i?i(r):n(null,r,a)}t.run(e,yi(r),a)}i(null,n)},a.runSync=function(e,t){let r,n;return a.run(e,t,i),vi("runSync","run",n),r;function i(e,t){Nn(e),r=t,n=!0}},a.process=function(e,t){if(a.freeze(),di("process",a.Parser),pi("process",a.Compiler),!t)return new Promise(r);function r(r,n){const i=yi(e);function o(e,i){e||!i?n(e):r?r(i):t(null,i)}a.run(a.parse(i),i,((e,t,r)=>{if(!e&&t&&r){const n=a.stringify(t,r);null==n||(!function(e){return"string"==typeof e||Bn(e)}(n)?r.result=n:r.value=n),o(e,r)}else o(e)}))}r(null,t)},a.processSync=function(e){let t;a.freeze(),di("processSync",a.Parser),pi("processSync",a.Compiler);const r=yi(e);return a.process(r,n),vi("processSync","process",t),r;function n(e){t=!0,Nn(e)}},a;function a(){const t=e();let n=-1;for(;++n<r.length;)t.use(...r[n]);return t.data(Jn(!0,{},i)),t}}().freeze(),fi={}.hasOwnProperty;function hi(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(fi.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function di(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function pi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function mi(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gi(e){if(!Yn(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function vi(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yi(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ai(e)}var bi=se(Object.freeze({__proto__:null,unified:li}));function wi(e,t){const r=(t||{}).includeImageAlt;return xi(e,"boolean"!=typeof r||r)}function xi(e,t){return function(e){return Boolean(e&&"object"==typeof e)}(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&ki(e.children,t))||Array.isArray(e)&&ki(e,t)||""}function ki(e,t){const r=[];let n=-1;for(;++n<e.length;)r[n]=xi(e[n],t);return r.join("")}function Ei(e,t,r,n){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),[].splice.apply(e,o);else for(r&&[].splice.apply(e,[t,r]);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),[].splice.apply(e,o),a+=1e4,t+=1e4}function Si(e,t){return e.length>0?(Ei(e,e.length,0,t),e):t}const Pi={}.hasOwnProperty;function _i(e){const t={};let r=-1;for(;++r<e.length;)Ci(t,e[r]);return t}function Ci(e,t){let r;for(r in t){const n=(Pi.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let o;for(o in i){Pi.call(n,o)||(n[o]=[]);const e=i[o];Ai(n[o],Array.isArray(e)?e:e?[e]:[])}}}function Ai(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);Ei(e,0,0,n)}const Fi=Bi(/[A-Za-z]/),Di=Bi(/\d/),Ri=Bi(/[\dA-Fa-f]/),Ti=Bi(/[\dA-Za-z]/),Oi=Bi(/[!-/:-@[-`{-~]/),ji=Bi(/[#-'*+\--9=?A-Z^-~]/);function Ii(e){return null!==e&&(e<32||127===e)}function Li(e){return null!==e&&(e<0||32===e)}function qi(e){return null!==e&&e<-2}function zi(e){return-2===e||-1===e||32===e}const Mi=Bi(/\s/),Ni=Bi(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/);function Bi(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}var $i=Object.freeze({__proto__:null,asciiAlpha:Fi,asciiDigit:Di,asciiHexDigit:Ri,asciiAlphanumeric:Ti,asciiPunctuation:Oi,asciiAtext:ji,asciiControl:Ii,markdownLineEndingOrSpace:Li,markdownLineEnding:qi,markdownSpace:zi,unicodeWhitespace:Mi,unicodePunctuation:Ni});function Ui(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let o=0;return function(n){if(zi(n))return e.enter(r),a(n);return t(n)};function a(n){return zi(n)&&o++<i?(e.consume(n),a):(e.exit(r),t(n))}}var Vi=Object.freeze({__proto__:null,factorySpace:Ui});const Hi={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ui(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),n(t)}));let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):qi(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const Qi={tokenize:function(e){const t=this,r=[];let n,i,o,a=0;return s;function s(n){if(a<r.length){const i=r[a];return t.containerState=i[1],e.attempt(i[0].continuation,c,u)(n)}return u(n)}function c(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,o=r;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}v(a);let s=r;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return Ei(t.events,o+1,0,t.events.slice(r)),t.events.length=s,u(e)}return s(e)}function u(i){if(a===r.length){if(!n)return h(i);if(n.currentConstruct&&n.currentConstruct.concrete)return p(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Wi,l,f)(i)}function l(e){return n&&y(),v(a),h(e)}function f(e){return t.parser.lazy[t.now().line]=a!==r.length,o=t.now().offset,p(e)}function h(r){return t.containerState={},e.attempt(Wi,d,p)(r)}function d(e){return a++,r.push([t.currentConstruct,t.containerState]),h(e)}function p(r){return null===r?(n&&y(),v(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),m(r))}function m(r){return null===r?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(r)):qi(r)?(e.consume(r),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(r),m)}function g(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<o&&(!n.events[e][1].end||n.events[e][1].end.offset>o))return;const r=t.events.length;let i,s,c=r;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){s=t.events[c][1].end;break}i=!0}for(v(a),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;Ei(t.events,c+1,0,t.events.slice(r)),t.events.length=e}}function v(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Wi={tokenize:function(e,t,r){return Ui(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Gi(e){return null===e||Li(e)||Mi(e)?1:Ni(e)?2:void 0}function Ki(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}const Ji={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Gi(n);let o;return function(t){return e.enter("attentionSequence"),o=t,a(t)};function a(s){if(s===o)return e.consume(s),a;const c=e.exit("attentionSequence"),u=Gi(s),l=!u||2===u&&i||r.includes(s),f=!i||2===i&&u||r.includes(n);return c._open=Boolean(42===o?l:l&&(i||!f)),c._close=Boolean(42===o?f:f&&(u||!l)),t(s)}},resolveAll:function(e,t){let r,n,i,o,a,s,c,u,l=-1;for(;++l<e.length;)if("enter"===e[l][0]&&"attentionSequence"===e[l][1].type&&e[l][1]._close)for(r=l;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[l][1].start);Yi(f,-s),Yi(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},o.start),e[l][1].start=Object.assign({},a.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Si(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Si(c,[["enter",n,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=Si(c,Ki(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),c=Si(c,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(u=2,c=Si(c,[["enter",e[l][1],t],["exit",e[l][1],t]])):u=0,Ei(e,r-1,l-r+3,c),l=r+c.length-u-2;break}l=-1;for(;++l<e.length;)"attentionSequence"===e[l][1].type&&(e[l][1].type="data");return e}};function Yi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Xi={name:"autolink",tokenize:function(e,t,r){let n=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Fi(t)?(e.consume(t),o):ji(t)?c(t):r(t)}function o(e){return 43===e||45===e||46===e||Ti(e)?a(e):c(e)}function a(t){return 58===t?(e.consume(t),s):(43===t||45===t||46===t||Ti(t))&&n++<32?(e.consume(t),a):c(t)}function s(t){return 62===t?(e.exit("autolinkProtocol"),h(t)):null===t||32===t||60===t||Ii(t)?r(t):(e.consume(t),s)}function c(t){return 64===t?(e.consume(t),n=0,u):ji(t)?(e.consume(t),c):r(t)}function u(e){return Ti(e)?l(e):r(e)}function l(t){return 46===t?(e.consume(t),n=0,u):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",h(t)):f(t)}function f(t){return(45===t||Ti(t))&&n++<63?(e.consume(t),45===t?f:l):r(t)}function h(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};const Zi={tokenize:function(e,t,r){return Ui(e,(function(e){return null===e||qi(e)?t(e):r(e)}),"linePrefix")},partial:!0};const eo={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return zi(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return Ui(e,e.attempt(eo,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};const to={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return Oi(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const ro={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},no={}.hasOwnProperty;function io(e){return!!no.call(ro,e)&&ro[e]}const oo={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,o=Ti,u(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=Ri,u):(e.enter("characterReferenceValue"),i=7,o=Di,u(t))}function u(s){let c;return 59===s&&a?(c=e.exit("characterReferenceValue"),o!==Ti||io(n.sliceSerialize(c))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):o(s)&&a++<i?(e.consume(s),u):r(s)}}};const ao={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let n=0;return Ui(e,i,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),o(t)}function o(t){return t===c?(e.consume(t),n++,o):n<u?r(t):(e.exit("codeFencedFenceSequence"),Ui(e,a,"whitespace")(t))}function a(n){return null===n||qi(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0},o={tokenize:function(e,t,r){const n=this;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o}function o(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},a=this.events[this.events.length-1],s=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0;let c,u=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c=t,l(t)};function l(t){return t===c?(e.consume(t),u++,l):(e.exit("codeFencedFenceSequence"),u<3?r(t):Ui(e,f,"whitespace")(t))}function f(t){return null===t||qi(t)?m(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||Li(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ui(e,d,"whitespace")(t)):96===t&&t===c?r(t):(e.consume(t),h)}function d(t){return null===t||qi(t)?m(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||qi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(t)):96===t&&t===c?r(t):(e.consume(t),p)}function m(r){return e.exit("codeFencedFence"),n.interrupt?t(r):g(r)}function g(t){return null===t?y(t):qi(t)?e.attempt(o,e.attempt(i,y,s?Ui(e,g,"linePrefix",s+1):g),y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||qi(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const so={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),Ui(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):r(e)}function o(t){return null===t?s(t):qi(t)?e.attempt(co,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||qi(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(r){return e.exit("codeIndented"),t(r)}}},co={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Ui(e,o,"linePrefix",5)(t)}function o(e){const o=n.events[n.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):qi(e)?i(e):r(e)}},partial:!0};const uo={name:"codeText",tokenize:function(e,t,r){let n,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||qi(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function u(r){return 96===r?(e.consume(r),n++,u):n===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",c(r))}},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function lo(e){const t={};let r,n,i,o,a,s,c,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(r=e[u],u&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[u-1][1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,fo(e,u)),u=t[u],c=!0);else if(r[1]._container){for(i=u,n=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(n&&(e[n][1].type="lineEndingBlank"),o[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),a=e.slice(n,u),a.unshift(r),Ei(e,n,u-n+1,a))}}return!c}function fo(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const o=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,c=[],u={};let l,f,h=-1,d=r,p=0,m=0;const g=[m];for(;d;){for(;e[++i][1]!==d;);o.push(i),d._tokenizer||(l=n.sliceStream(d),d.next||l.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(l),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=r;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),r=o.pop();c.unshift([r,r+t.length-1]),Ei(e,r,2,t)}for(h=-1;++h<c.length;)u[p+c[h][0]]=p+c[h][1],p+=c[h][1]-c[h][0]-1;return u}const ho={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):qi(t)?e.check(po,o,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function o(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return lo(e),e}},po={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ui(e,i,"linePrefix")};function i(i){if(null===i||qi(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};function mo(e,t,r,n,i,o,a,s,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||41===t||Ii(t))return r(t);return e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),p(t)};function f(r){return 62===r?(e.enter(o),e.consume(r),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||qi(t)?r(t):(e.consume(t),92===t?d:h)}function d(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function p(i){return 40===i?++l>u?r(i):(e.consume(i),p):41===i?l--?(e.consume(i),p):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(i)):null===i||Li(i)?l?r(i):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(i)):Ii(i)?r(i):(e.consume(i),92===i?m:p)}function m(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}var go=Object.freeze({__proto__:null,factoryDestination:mo});function vo(e,t,r,n,i,o){const a=this;let s,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(f){return null===f||91===f||93===f&&!s||94===f&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs||c>999?r(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):qi(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(t){return null===t||91===t||93===t||qi(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s=s||!zi(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,l):l(t)}}var yo=Object.freeze({__proto__:null,factoryLabel:vo});function bo(e,t,r,n,i,o){let a;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s};function s(r){return r===a?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),c(r))}function c(t){return t===a?(e.exit(o),s(a)):null===t?r(t):qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ui(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||qi(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return t===a||92===t?(e.consume(t),u):u(t)}}var wo=Object.freeze({__proto__:null,factoryTitle:bo});function xo(e,t){let r;return function n(i){if(qi(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(zi(i))return Ui(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}var ko=Object.freeze({__proto__:null,factoryWhitespace:xo});function Eo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var So=Object.freeze({__proto__:null,normalizeIdentifier:Eo});const Po={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),vo.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return i=Eo(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),xo(e,mo(e,e.attempt(_o,Ui(e,a,"whitespace"),Ui(e,a,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function a(o){return null===o||qi(o)?(e.exit("definition"),n.parser.defined.includes(i)||n.parser.defined.push(i),t(o)):r(o)}}},_o={tokenize:function(e,t,r){return function(t){return Li(t)?xo(e,n)(t):r(t)};function n(t){return 34===t||39===t||40===t?bo(e,Ui(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||qi(e)?t(e):r(e)}},partial:!0};const Co={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),n};function n(n){return qi(n)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(n)):r(n)}}};const Ao={name:"headingAtx",tokenize:function(e,t,r){const n=this;let i=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(s){return 35===s&&i++<6?(e.consume(s),o):null===s||Li(s)?(e.exit("atxHeadingSequence"),n.interrupt?t(s):a(s)):r(s)}function a(r){return 35===r?(e.enter("atxHeadingSequence"),s(r)):null===r||qi(r)?(e.exit("atxHeading"),t(r)):zi(r)?Ui(e,a,"whitespace")(r):(e.enter("atxHeadingText"),c(r))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),a(t))}function c(t){return null===t||35===t||Li(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),c)}},resolve:function(e,t){let r,n,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},n={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},Ei(e,o,i-o+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const Fo=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Do=["pre","script","style","textarea"],Ro={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,o,a,s,c;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u};function u(s){return 33===s?(e.consume(s),l):47===s?(e.consume(s),d):63===s?(e.consume(s),i=3,n.interrupt?t:j):Fi(s)?(e.consume(s),a=String.fromCharCode(s),o=!0,p):r(s)}function l(o){return 45===o?(e.consume(o),i=2,f):91===o?(e.consume(o),i=5,a="CDATA[",s=0,h):Fi(o)?(e.consume(o),i=4,n.interrupt?t:j):r(o)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:j):r(i)}function h(i){return i===a.charCodeAt(s++)?(e.consume(i),s===a.length?n.interrupt?t:_:h):r(i)}function d(t){return Fi(t)?(e.consume(t),a=String.fromCharCode(t),p):r(t)}function p(s){return null===s||47===s||62===s||Li(s)?47!==s&&o&&Do.includes(a.toLowerCase())?(i=1,n.interrupt?t(s):_(s)):Fo.includes(a.toLowerCase())?(i=6,47===s?(e.consume(s),m):n.interrupt?t(s):_(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):o?v(s):g(s)):45===s||Ti(s)?(e.consume(s),a+=String.fromCharCode(s),p):r(s)}function m(i){return 62===i?(e.consume(i),n.interrupt?t:_):r(i)}function g(t){return zi(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||Fi(t)?(e.consume(t),y):zi(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||Ti(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):zi(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,x):zi(t)?(e.consume(t),w):(c=null,k(t))}function x(t){return null===t||qi(t)?r(t):t===c?(e.consume(t),E):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||Li(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||zi(e)?v(e):r(e)}function S(t){return 62===t?(e.consume(t),P):r(t)}function P(t){return zi(t)?(e.consume(t),P):null===t||qi(t)?_(t):r(t)}function _(t){return 45===t&&2===i?(e.consume(t),D):60===t&&1===i?(e.consume(t),R):62===t&&4===i?(e.consume(t),I):63===t&&3===i?(e.consume(t),j):93===t&&5===i?(e.consume(t),O):!qi(t)||6!==i&&7!==i?null===t||qi(t)?C(t):(e.consume(t),_):e.check(To,I,C)(t)}function C(t){return e.exit("htmlFlowData"),A(t)}function A(t){return null===t?L(t):qi(t)?e.attempt({tokenize:F,partial:!0},A,L)(t):(e.enter("htmlFlowData"),_(t))}function F(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}function D(t){return 45===t?(e.consume(t),j):_(t)}function R(t){return 47===t?(e.consume(t),a="",T):_(t)}function T(t){return 62===t&&Do.includes(a.toLowerCase())?(e.consume(t),I):Fi(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):_(t)}function O(t){return 93===t?(e.consume(t),j):_(t)}function j(t){return 62===t?(e.consume(t),I):45===t&&2===i?(e.consume(t),j):_(t)}function I(t){return null===t||qi(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),I)}function L(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},To={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(Zi,t,r)}},partial:!0};const Oo={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,o,a,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),c};function c(t){return 33===t?(e.consume(t),u):47===t?(e.consume(t),k):63===t?(e.consume(t),w):Fi(t)?(e.consume(t),P):r(t)}function u(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),o="CDATA[",a=0,m):Fi(t)?(e.consume(t),b):r(t)}function l(t){return 45===t?(e.consume(t),f):r(t)}function f(t){return null===t||62===t?r(t):45===t?(e.consume(t),h):d(t)}function h(e){return null===e||62===e?r(e):d(e)}function d(t){return null===t?r(t):45===t?(e.consume(t),p):qi(t)?(s=d,O(t)):(e.consume(t),d)}function p(t){return 45===t?(e.consume(t),I):d(t)}function m(t){return t===o.charCodeAt(a++)?(e.consume(t),a===o.length?g:m):r(t)}function g(t){return null===t?r(t):93===t?(e.consume(t),v):qi(t)?(s=g,O(t)):(e.consume(t),g)}function v(t){return 93===t?(e.consume(t),y):g(t)}function y(t){return 62===t?I(t):93===t?(e.consume(t),y):g(t)}function b(t){return null===t||62===t?I(t):qi(t)?(s=b,O(t)):(e.consume(t),b)}function w(t){return null===t?r(t):63===t?(e.consume(t),x):qi(t)?(s=w,O(t)):(e.consume(t),w)}function x(e){return 62===e?I(e):w(e)}function k(t){return Fi(t)?(e.consume(t),E):r(t)}function E(t){return 45===t||Ti(t)?(e.consume(t),E):S(t)}function S(t){return qi(t)?(s=S,O(t)):zi(t)?(e.consume(t),S):I(t)}function P(t){return 45===t||Ti(t)?(e.consume(t),P):47===t||62===t||Li(t)?_(t):r(t)}function _(t){return 47===t?(e.consume(t),I):58===t||95===t||Fi(t)?(e.consume(t),C):qi(t)?(s=_,O(t)):zi(t)?(e.consume(t),_):I(t)}function C(t){return 45===t||46===t||58===t||95===t||Ti(t)?(e.consume(t),C):A(t)}function A(t){return 61===t?(e.consume(t),F):qi(t)?(s=A,O(t)):zi(t)?(e.consume(t),A):_(t)}function F(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,D):qi(t)?(s=F,O(t)):zi(t)?(e.consume(t),F):(e.consume(t),i=void 0,T)}function D(t){return t===i?(e.consume(t),R):null===t?r(t):qi(t)?(s=D,O(t)):(e.consume(t),D)}function R(e){return 62===e||47===e||Li(e)?_(e):r(e)}function T(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||Li(t)?_(t):(e.consume(t),T)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ui(e,j,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function j(t){return e.enter("htmlTextData"),s(t)}function I(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};const jo={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if(("labelImage"===n.events[a][1].type||"labelLink"===n.events[a][1].type)&&!n.events[a][1]._balanced){i=n.events[a][1];break}return function(t){if(!i)return r(t);return i._inactive?c(t):(o=n.parser.defined.includes(Eo(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s)};function s(r){return 40===r?e.attempt(Io,t,o?t:c)(r):91===r?e.attempt(Lo,t,o?e.attempt(qo,t,c):c)(r):o?t(r):c(r)}function c(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,o,a=e.length,s=0;for(;a--;)if(r=e[a][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[a][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=a,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=a);const c={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},l={type:"labelText",start:Object.assign({},e[n+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",c,t],["enter",u,t]],o=Si(o,e.slice(n+1,n+s+3)),o=Si(o,[["enter",l,t]]),o=Si(o,Ki(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),o=Si(o,[["exit",l,t],e[i-2],e[i-1],["exit",u,t]]),o=Si(o,e.slice(i+1)),o=Si(o,[["exit",c,t]]),Ei(e,n,e.length,o),e},resolveAll:function(e){let t,r=-1;for(;++r<e.length;)t=e[r][1],"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(r+1,"labelImage"===t.type?4:2),t.type="data",r++);return e}},Io={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),xo(e,n)};function n(t){return 41===t?a(t):mo(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return Li(t)?xo(e,o)(t):a(t)}function o(t){return 34===t||39===t||40===t?bo(e,xo(e,a),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):a(t)}function a(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},Lo={tokenize:function(e,t,r){const n=this;return function(t){return vo.call(n,e,i,r,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(Eo(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}}},qo={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const zo={name:"labelStartImage",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):r(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:jo.resolveAll};const Mo={name:"labelStartLink",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:jo.resolveAll};const No={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ui(e,t,"linePrefix")}}};const Bo={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),n=t,o(t)};function o(s){return s===n?(e.enter("thematicBreakSequence"),a(s)):zi(s)?Ui(e,o,"whitespace")(s):i<3||null!==s&&!qi(s)?r(s):(e.exit("thematicBreak"),t(s))}function a(t){return t===n?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),o(t))}}};const $o={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:Di(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Bo,r,c)(t):c(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return Di(t)&&++a<10?(e.consume(t),s):(!n.interrupt||a<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):r(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(Zi,n.interrupt?r:u,e.attempt(Uo,f,l))}function u(e){return n.containerState.initialBlankLine=!0,o++,f(e)}function l(t){return zi(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Zi,i,o);function i(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ui(e,t,"listItemIndent",n.containerState.size+1)(r)}function o(r){return n.containerState.furtherBlankLines||!zi(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Vo,t,a)(r))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ui(e,e.attempt($o,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},Uo={tokenize:function(e,t,r){const n=this;return Ui(e,(function(e){const i=n.events[n.events.length-1];return!zi(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Vo={tokenize:function(e,t,r){const n=this;return Ui(e,(function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const Ho={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if("lineEnding"!==n.events[a][1].type&&"linePrefix"!==n.events[a][1].type&&"content"!==n.events[a][1].type){o="paragraph"===n.events[a][1].type;break}return function(t){if(!n.parser.lazy[n.now().line]&&(n.interrupt||o))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,s(t);return r(t)};function s(t){return t===i?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),Ui(e,c,"lineSuffix")(t))}function c(n){return null===n||qi(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a;return e.push(["exit",a,t]),e}};var Qo=Object.freeze({__proto__:null,attention:Ji,autolink:Xi,blankLine:Zi,blockQuote:eo,characterEscape:to,characterReference:oo,codeFenced:ao,codeIndented:so,codeText:uo,content:ho,definition:Po,hardBreakEscape:Co,headingAtx:Ao,htmlFlow:Ro,htmlText:Oo,labelEnd:jo,labelStartImage:zo,labelStartLink:Mo,lineEnding:No,list:$o,setextUnderline:Ho,thematicBreak:Bo});const Wo={tokenize:function(e){const t=this,r=e.attempt(Zi,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,Ui(e,e.attempt(this.parser.constructs.flow,n,e.attempt(ho,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const Go={resolveAll:Xo()},Ko=Yo("string"),Jo=Yo("text");function Yo(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,o,a);return o;function o(e){return c(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function c(e){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}},resolveAll:Xo("text"===e?Zo:void 0)}}function Xo(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function Zo(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let o,a=i.length,s=-1,c=0;for(;a--;){const e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)c++,s--;if(s)break;s=-1}else if(-2===e)o=!0,c++;else if(-1!==e){a++;break}}if(c){const i={type:r===e.length||o||c<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-c,offset:n.end.offset-c,_index:n.start._index+a,_bufferIndex:a?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},i.start),n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function ea(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const c={consume:function(e){qi(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++));u.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=h(),u.events.push(["enter",r,u]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=h(),u.events.push(["exit",t,u]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const o=e[r];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,n.push(a)}return n.join("")}(f(e),t)},now:h,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(a=Si(a,e),d(),null!==a[a.length-1])return[];return v(t,0),u.events=Ki(o,u.events,u),u.events}};let l=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function f(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;r===i?a=[e[r].slice(n,o)]:(a=e.slice(r,i),n>-1&&(a[0]=a[0].slice(n)),o>0&&a.push(e[i].slice(0,o)));return a}(a,e)}function h(){return Object.assign({},n)}function d(){let e;for(;n._index<a.length;){const t=a[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)p(t.charCodeAt(n._bufferIndex));else p(t)}}function p(e){l=l(e)}function m(e,t){t.restore()}function g(e,t){return function(r,i,o){let a,l,f,d;return Array.isArray(r)?p(r):"tokenize"in r?p([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return p([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function p(e){return a=e,l=0,0===e.length?o:m(e[l])}function m(e){return function(r){d=function(){const e=h(),t=u.previous,r=u.currentConstruct,i=u.events.length,o=Array.from(s);return{restore:a,from:i};function a(){n=e,u.previous=t,u.currentConstruct=r,u.events.length=i,s=o,y()}}(),f=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,g,v)(r)}}function g(t){return e(f,d),i}function v(e){return d.restore(),++l<a.length?m(a[l]):o}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Ei(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function y(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const ta={42:$o,43:$o,45:$o,48:$o,49:$o,50:$o,51:$o,52:$o,53:$o,54:$o,55:$o,56:$o,57:$o,62:eo},ra={91:Po},na={[-2]:so,[-1]:so,32:so},ia={35:Ao,42:Bo,45:[Ho,Bo],60:Ro,61:Ho,95:Bo,96:ao,126:ao},oa={38:oo,92:to},aa={[-5]:No,[-4]:No,[-3]:No,33:zo,38:oo,42:Ji,60:[Xi,Oo],91:Mo,92:[Co,to],93:jo,95:Ji,96:uo},sa={null:[Ji,Go]};var ca=Object.freeze({__proto__:null,document:ta,contentInitial:ra,flowInitial:na,flow:ia,string:oa,text:aa,insideSpan:sa,attentionMarkers:{null:[42,95]},disable:{null:[]}});const ua=/[\0\t\n\r]/g;function la(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535==(65535&r)||65534==(65535&r)||r>1114111?"�":String.fromCharCode(r)}const fa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ha(e){return e.replace(fa,da)}function da(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return la(r.slice(t?2:1),t?16:10)}return io(r)||e}const pa={}.hasOwnProperty,ma=function(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(re),autolinkProtocol:C,autolinkEmail:C,atxHeading:s(X),blockQuote:s(W),characterEscape:C,characterReference:C,codeFenced:s(G),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(G,c),codeText:s(K,c),codeTextData:C,data:C,codeFlowValue:C,definition:s(J),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Y),hardBreakEscape:s(Z),hardBreakTrailing:s(Z),htmlFlow:s(ee,c),htmlFlowData:C,htmlText:s(ee,c),htmlTextData:C,image:s(te),label:c,link:s(re),listItem:s(ie),listItemValue:p,listOrdered:s(ne,d),listUnordered:s(ne),paragraph:s(oe),reference:B,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(X),strong:s(ae),thematicBreak:s(ce)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:Q,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:V,codeFenced:l(y),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:A,codeIndented:l(b),codeText:l(O),codeTextData:A,data:A,definition:l(),definitionDestinationString:k,definitionLabelString:w,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(D),hardBreakTrailing:l(D),htmlFlow:l(R),htmlFlowData:A,htmlText:l(T),htmlTextData:A,image:l(I),label:q,labelText:L,lineEnding:F,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:$,resourceDestinationString:z,resourceTitleString:M,resource:N,setextHeading:l(_),setextHeadingLineSequence:P,setextHeadingText:S,strong:l(),thematicBreak:l()}};va(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let r={type:"root",children:[]};const n={stack:[r],tokenStack:[],config:t,enter:u,exit:f,buffer:c,resume:h,setData:o,getData:a},s=[];let l=-1;for(;++l<e.length;)if("listOrdered"===e[l][1].type||"listUnordered"===e[l][1].type)if("enter"===e[l][0])s.push(l);else{l=i(e,s.pop(),l)}for(l=-1;++l<e.length;){const r=t[e[l][0]];pa.call(r,e[l][1].type)&&r[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},n),e[l][1])}if(n.tokenStack.length>0){const e=n.tokenStack[n.tokenStack.length-1];(e[1]||ba).call(n,void 0,e[0])}for(r.position={start:ga(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ga(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<t.transforms.length;)r=t.transforms[l](r)||r;return r}function i(e,t,r){let n,i,o,a,s=t-1,c=-1,u=!1;for(;++s<=r;){const t=e[s];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?c++:c--,a=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!n||a||c||o||(o=s),a=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(a=void 0),!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let a=s;for(i=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}"listItemPrefix"===t[1].type&&(n={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(s,0,["enter",n,t[2]]),s++,r++,o=void 0,a=!0)}}return e[t][1]._spread=u,r}function o(e,t){r[e]=t}function a(e){return r[e]}function s(e,t){return r;function r(r){u.call(this,e(r),r),t&&t.call(this,r)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(e,t,r){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:ga(t.start)},e}function l(e){return t;function t(t){e&&e.call(this,t),f.call(this,t)}}function f(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+Zn({start:e.start,end:e.end})+"): it’s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||ba).call(this,e,n[0])}return r.position.end=ga(e.end),r}function h(){return wi(this.stack.pop())}function d(){o("expectingFirstListItemValue",!0)}function p(e){if(a("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),o("expectingFirstListItemValue")}}function m(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function v(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function w(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Eo(this.sliceSerialize(e)).toLowerCase()}function x(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function E(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function S(){o("setextHeadingSlurpLineEnding",!0)}function P(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function _(){o("setextHeadingSlurpLineEnding")}function C(e){const t=this.stack[this.stack.length-1];let r=t.children[t.children.length-1];r&&"text"===r.type||(r=se(),r.position={start:ga(e.start)},t.children.push(r)),this.stack.push(r)}function A(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ga(e.end)}function F(e){const r=this.stack[this.stack.length-1];if(a("atHardBreak")){return r.children[r.children.length-1].position.end=ga(e.end),void o("atHardBreak")}!a("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(r.type)&&(C.call(this,e),A.call(this,e))}function D(){o("atHardBreak",!0)}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function I(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function L(e){const t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=ha(t),r.identifier=Eo(t).toLowerCase()}function q(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(o("inReference",!0),"link"===r.type){const t=e.children;r.children=t}else r.alt=t}function z(){const e=this.resume();this.stack[this.stack.length-1].url=e}function M(){const e=this.resume();this.stack[this.stack.length-1].title=e}function N(){o("inReference")}function B(){o("referenceType","collapsed")}function $(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Eo(this.sliceSerialize(e)).toLowerCase(),o("referenceType","full")}function U(e){o("characterReferenceType",e.type)}function V(e){const t=this.sliceSerialize(e),r=a("characterReferenceType");let n;if(r)n=la(t,"characterReferenceMarkerNumeric"===r?10:16),o("characterReferenceType");else{n=io(t)}const i=this.stack.pop();i.value+=n,i.position.end=ga(e.end)}function H(e){A.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function Q(e){A.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function G(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function J(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Y(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:void 0,children:[]}}function Z(){return{type:"break"}}function ee(){return{type:"html",value:""}}function te(){return{type:"image",title:null,url:"",alt:null}}function re(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ie(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}(r)(function(e){for(;!lo(e););return e}(function(e={}){const t={defined:[],lazy:{},constructs:_i([ca].concat(e.extensions||[])),content:r(Hi),document:r(Qi),flow:r(Wo),string:r(Ko),text:r(Jo)};return t;function r(e){return function(r){return ea(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,o,a){const s=[];let c,u,l,f,h;for(i=r+i.toString(o),l=0,r="",n&&(65279===i.charCodeAt(0)&&l++,n=void 0);l<i.length;){if(ua.lastIndex=l,c=ua.exec(i),f=c&&void 0!==c.index?c.index:i.length,h=i.charCodeAt(f),!c){r=i.slice(l);break}if(10===h&&l===f&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<f&&(s.push(i.slice(l,f)),t+=f-l),h){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=f+1}return a&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))};function ga(e){return{line:e.line,column:e.column,offset:e.offset}}function va(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?va(e,n):ya(e,n)}}function ya(e,t){let r;for(r in t)if(pa.call(t,r))if("canContainEols"===r){const n=t[r];n&&e[r].push(...n)}else if("transforms"===r){const n=t[r];n&&e[r].push(...n)}else if("enter"===r||"exit"===r){const n=t[r];n&&Object.assign(e[r],n)}}function ba(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zn({start:t.start,end:t.end})+") is still open")}var wa=se(Object.freeze({__proto__:null,default:function(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return ma(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}}));const xa={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return 87===t||119===t?(e.consume(t),i):r(t)}function i(t){return 87===t||119===t?(e.consume(t),o):r(t)}function o(t){return 46===t?(e.consume(t),a):r(t)}function a(e){return null===e||qi(e)?r(e):t(e)}},partial:!0},ka={tokenize:function(e,t,r){let n,i;return o;function o(t){return 38===t?e.check(Pa,s,a)(t):46===t||95===t?e.check(Sa,s,a)(t):null===t||Ii(t)||Mi(t)||45!==t&&Ni(t)?s(t):(e.consume(t),o)}function a(t){return 46===t?(i=n,n=void 0,e.consume(t),o):(95===t&&(n=!0),e.consume(t),o)}function s(e){return i||n?r(e):t(e)}},partial:!0},Ea={tokenize:function(e,t){let r=0;return n;function n(a){return 38===a?e.check(Pa,t,i)(a):(40===a&&r++,41===a?e.check(Sa,o,i)(a):Oa(a)?t(a):Ta(a)?e.check(Sa,t,i)(a):(e.consume(a),n))}function i(t){return e.consume(t),n}function o(e){return r--,r<0?t(e):i(e)}},partial:!0},Sa={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(i){return Ta(i)?(e.consume(i),n):Oa(i)?t(i):r(i)}},partial:!0},Pa={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return Fi(t)?(e.consume(t),n):59===t?(e.consume(t),i):r(t)}function i(e){return Oa(e)?t(e):r(e)}},partial:!0},_a={tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!Ia(n.previous)||za(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(xa,e.attempt(ka,e.attempt(Ea,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:Ia},Ca={tokenize:function(e,t,r){const n=this;return function(t){if(72!==t&&104!==t||!La(n.previous)||za(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),i};function i(t){return 84===t||116===t?(e.consume(t),o):r(t)}function o(t){return 84===t||116===t?(e.consume(t),a):r(t)}function a(t){return 80===t||112===t?(e.consume(t),s):r(t)}function s(t){return 83===t||115===t?(e.consume(t),c):c(t)}function c(t){return 58===t?(e.consume(t),u):r(t)}function u(t){return 47===t?(e.consume(t),l):r(t)}function l(t){return 47===t?(e.consume(t),f):r(t)}function f(t){return null===t||Ii(t)||Mi(t)||Ni(t)?r(t):e.attempt(ka,e.attempt(Ea,h),r)(t)}function h(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:La},Aa={tokenize:function(e,t,r){const n=this;let i,o;return function(t){if(!ja(t)||!qa(n.previous)||za(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return ja(t)?(e.consume(t),a):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(Sa,f,c)(t):45===t||95===t?e.check(Sa,r,u)(t):Ti(t)?(!o&&Di(t)&&(o=!0),e.consume(t),s):f(t)}function c(t){return e.consume(t),i=!0,o=void 0,s}function u(t){return e.consume(t),l}function l(t){return 46===t?e.check(Sa,r,c)(t):s(t)}function f(n){return i&&!o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:qa},Fa={},Da={text:Fa};let Ra=48;for(;Ra<123;)Fa[Ra]=Aa,Ra++,58===Ra?Ra=65:91===Ra&&(Ra=97);function Ta(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function Oa(e){return null===e||60===e||Li(e)}function ja(e){return 43===e||45===e||46===e||95===e||Ti(e)}function Ia(e){return null===e||40===e||42===e||95===e||126===e||Li(e)}function La(e){return null===e||!Fi(e)}function qa(e){return 47!==e&&La(e)}function za(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}Fa[43]=Aa,Fa[45]=Aa,Fa[46]=Aa,Fa[95]=Aa,Fa[72]=[Aa,Ca],Fa[104]=[Aa,Ca],Fa[87]=[Aa,_a],Fa[119]=[Aa,_a];const Ma={tokenize:function(e,t,r){const n=this;return Ui(e,(function(e){const i=n.events[n.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Na(e,t,r){const n=this;let i=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;i--;){const e=n.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return r(i);const s=Eo(n.sliceSerialize({start:a.end,end:n.now()}));if(94!==s.charCodeAt(0)||!o.includes(s.slice(1)))return r(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function Ba(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function $a(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){let l;return null===s||91===s||a++>999?r(s):93===s?o?(e.exit("chunkString"),l=e.exit("gfmFootnoteCallString"),i.includes(Eo(n.sliceSerialize(l)))?function(r){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}(s):r(s)):r(s):(e.consume(s),Li(s)||(o=!0),92===s?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}}function Ua(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),u):r(t)}function u(t){let i;return null===t||91===t||s>999?r(t):93===t?a?(i=e.exit("gfmFootnoteDefinitionLabelString"),o=Eo(n.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h):r(t):qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s++,u):(e.enter("chunkString").contentType="string",l(t))}function l(t){return null===t||qi(t)||91===t||93===t||s>999?(e.exit("chunkString"),u(t)):(Li(t)||(a=!0),s++,e.consume(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),Ui(e,d,"gfmFootnoteDefinitionWhitespace")):r(t)}function d(e){return i.includes(o)||i.push(o),t(e)}}function Va(e,t,r){return e.check(Zi,t,e.attempt(Ma,t,r))}function Ha(e){e.exit("gfmFootnoteDefinition")}function Qa(e={}){let t=e.singleTilde;const r={tokenize:function(e,r,n){const i=this.previous,o=this.events;let a=0;return function(t){if(126===i&&"characterEscape"!==o[o.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const c=Gi(i);if(126===o)return a>1?n(o):(e.consume(o),a++,s);if(a<2&&!t)return n(o);const u=e.exit("strikethroughSequenceTemporary"),l=Gi(o);return u._open=!l||2===l&&Boolean(c),u._close=!c||2===c&&Boolean(l),r(o)}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},o={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},a=[["enter",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",o,t]];Ei(a,a.length,0,Ki(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),Ei(a,a.length,0,[["exit",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",i,t]]),Ei(e,n-1,r-n+3,a),r=n+a.length-2;break}}r=-1;for(;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}const Wa={flow:{null:{tokenize:function(e,t,r){const n=this,i=[];let o,a,s=0;return function(t){if(e.enter("table")._align=i,e.enter("tableHead"),e.enter("tableRow"),124===t)return c(t);return s++,e.enter("temporaryTableCellContent"),f(t)};function c(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,u}function u(t){return null===t||qi(t)?function(t){if(null===t)return r(t);e.exit("tableRow"),e.exit("tableHead");const i=n.interrupt;return n.interrupt=!0,e.attempt({tokenize:A,partial:!0},(function(t){return n.interrupt=i,e.enter("tableDelimiterRow"),d(t)}),(function(e){return n.interrupt=i,r(e)}))(t)}(t):zi(t)?(e.enter("whitespace"),e.consume(t),l):(o&&(o=void 0,s++),124===t?c(t):(e.enter("temporaryTableCellContent"),f(t)))}function l(t){return zi(t)?(e.consume(t),l):(e.exit("whitespace"),u(t))}function f(t){return null===t||124===t||Li(t)?(e.exit("temporaryTableCellContent"),u(t)):(e.consume(t),92===t?h:f)}function h(t){return 92===t||124===t?(e.consume(t),f):f(t)}function d(t){return null===t||qi(t)?y(t):zi(t)?(e.enter("whitespace"),e.consume(t),p):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),a=!0,i.push("none"),m):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i.push("left"),g):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),d):r(t)}function p(t){return zi(t)?(e.consume(t),p):(e.exit("whitespace"),d(t))}function m(t){return 45===t?(e.consume(t),m):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i[i.length-1]="left"===i[i.length-1]?"center":"right",v):d(t))}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),a=!0,m):r(t)}function v(t){return null===t||qi(t)?y(t):zi(t)?(e.enter("whitespace"),e.consume(t),p):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),d):r(t)}function y(t){return e.exit("tableDelimiterRow"),a&&s===i.length?null===t?b(t):e.check(Ga,b,e.attempt({tokenize:A,partial:!0},Ui(e,w,"linePrefix",4),b))(t):r(t)}function b(r){return e.exit("table"),t(r)}function w(t){return e.enter("tableBody"),x(t)}function x(t){return e.enter("tableRow"),124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function k(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),E}function E(t){return null===t||qi(t)?function(t){if(e.exit("tableRow"),null===t)return C(t);return e.check(Ga,C,e.attempt({tokenize:A,partial:!0},Ui(e,x,"linePrefix",4),C))(t)}(t):zi(t)?(e.enter("whitespace"),e.consume(t),S):124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function S(t){return zi(t)?(e.consume(t),S):(e.exit("whitespace"),E(t))}function P(t){return null===t||124===t||Li(t)?(e.exit("temporaryTableCellContent"),E(t)):(e.consume(t),92===t?_:P)}function _(t){return 92===t||124===t?(e.consume(t),P):P(t)}function C(t){return e.exit("tableBody"),b(t)}function A(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ui(e,i,"linePrefix")};function i(i){if(n.parser.lazy[n.now().line]||null===i||qi(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):(n._gfmTableDynamicInterruptHack=!0,e.check(n.parser.constructs.flow,(function(e){return n._gfmTableDynamicInterruptHack=!1,r(e)}),(function(e){return n._gfmTableDynamicInterruptHack=!1,t(e)}))(i))}}},resolve:function(e,t){let r,n,i,o,a,s,c,u=-1;for(;++u<e.length;){const l=e[u][1];if(i&&("temporaryTableCellContent"===l.type&&(o=o||u,a=u),("tableCellDivider"===l.type||"tableRow"===l.type)&&a)){const r={type:"tableContent",start:e[o][1].start,end:e[a][1].end},n={type:"chunkText",start:r.start,end:r.end,contentType:"text"};e.splice(o,a-o+1,["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]),u-=a-o-3,o=void 0,a=void 0}if("exit"===e[u][0]&&void 0!==s&&s+(c?0:1)<u&&("tableCellDivider"===l.type||"tableRow"===l.type&&(s+3<u||"whitespace"!==e[s][1].type))){const i={type:n?"tableDelimiter":r?"tableHeader":"tableData",start:e[s][1].start,end:e[u][1].end};e.splice(u+("tableCellDivider"===l.type?1:0),0,["exit",i,t]),e.splice(s,0,["enter",i,t]),u+=2,s=u+1,c=!0}"tableRow"===l.type&&(i="enter"===e[u][0],i&&(s=u+1,c=!1)),"tableDelimiterRow"===l.type&&(n="enter"===e[u][0],n&&(s=u+1,c=!1)),"tableHead"===l.type&&(r="enter"===e[u][0])}return e}}}},Ga={tokenize:function(e,t,r){let n=0;return function(t){return e.enter("check"),e.consume(t),i};function i(o){return-1===o||32===o?(e.consume(o),n++,4===n?t:i):null===o||Li(o)?t(o):r(o)}},partial:!0};const Ka={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return Li(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):r(t)}function o(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:Ya},t,r)):r(n)}}},Ja={text:{91:Ka}};function Ya(e,t,r){const n=this;return Ui(e,(function(e){const i=n.events[n.events.length-1];return(i&&"whitespace"===i[1].type||qi(e))&&null!==e?t(e):r(e)}),"whitespace")}function Xa(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;-1!==i;)n++,i=r.indexOf(t,i+t.length);return n}function Za(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const es=function(e){if(null==e)return rs;if("string"==typeof e)return function(e){return ts(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=es(e[r]);return ts(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].call(this,...e))return!0;return!1}}(e):function(e){return ts(t);function t(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}(e);if("function"==typeof e)return ts(e);throw new Error("Expected function, string, or object as test")};function ts(e){return function(t,...r){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...r)))}}function rs(){return!0}var ns=Object.freeze({__proto__:null,is:function e(t,r,n,i,o){const a=es(r);if(null!=n&&("number"!=typeof n||n<0||n===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(!(null==i||e(i)&&i.children))throw new Error("Expected parent node");if(null==i!=(null==n))throw new Error("Expected both parent and index");return!(!t||!t.type||"string"!=typeof t.type)&&Boolean(a.call(o,t,n,i))},convert:es});const is=!0,os=!1,as="skip",ss=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=es(t),o=n?-1:1;!function e(a,s,c){const u=a&&"object"==typeof a?a:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l=a.type+(e?"<"+e+">":""),""+l+")")})}var l;return f;function f(){let u,l,f,h=[];if((!t||i(a,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[is,e];return[e]}(r(a,c)),h[0]===os))return h;if(a.children&&h[0]!==as)for(l=(n?a.children.length:-1)+o,f=c.concat(a);l>-1&&l<a.children.length;){if(u=e(a.children[l],l,f)(),u[0]===os)return u;l="number"==typeof u[1]?u[1]:l+o}return h}}(e,void 0,[])()};const cs={}.hasOwnProperty,us=function(e,t,r,n){let i,o;"string"==typeof t||t instanceof RegExp?(o=[[t,r]],i=n):(o=t,i=r),i||(i={});const a=es(i.ignore||[]),s=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let r=-1;for(;++r<e.length;)t.push([ls(e[r][0]),fs(e[r][1])])}else{let r;for(r in e)cs.call(e,r)&&t.push([ls(r),fs(e[r])])}return t}(o);let c=-1;for(;++c<s.length;)ss(e,"text",u);return e;function u(e,t){let r,n=-1;for(;++n<t.length;){const e=t[n];if(a(e,r?r.children.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=t[t.length-1],n=s[c][0],i=s[c][1];let o=0;const a=r.children.indexOf(e);let u=!1,l=[];n.lastIndex=0;let f=n.exec(e.value);for(;f;){const r=f.index,a={index:f.index,input:f.input,stack:[...t,e]};let s=i(...f,a);if("string"==typeof s&&(s=s.length>0?{type:"text",value:s}:void 0),!1!==s&&(o!==r&&l.push({type:"text",value:e.value.slice(o,r)}),Array.isArray(s)?l.push(...s):s&&l.push(s),o=r+f[0].length,u=!0),!n.global)break;f=n.exec(e.value)}u?(o<e.value.length&&l.push({type:"text",value:e.value.slice(o)}),r.children.splice(a,1,...l)):l=[e];return a+l.length}(e,t)}};function ls(e){return"string"==typeof e?new RegExp(Za(e),"g"):e}function fs(e){return"function"==typeof e?e:()=>e}const hs="phrasing",ds=["autolink","link","image","label"],ps={transforms:[function(e){us(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vs],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,ys]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:gs,literalAutolinkHttp:gs,literalAutolinkWww:gs},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}}},ms={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hs,notInConstruct:ds},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hs,notInConstruct:ds},{character:":",before:"[ps]",after:"\\/",inConstruct:hs,notInConstruct:ds}]};function gs(e){this.config.enter.autolinkProtocol.call(this,e)}function vs(e,t,r,n,i){let o="";if(!bs(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Xa(e,"(");let o=Xa(e,")");for(;-1!==n&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}(r+n);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function ys(e,t,r,n){return!(!bs(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function bs(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||Mi(r)||Ni(r))&&(!t||47!==r)}function ws(e){return e.label||!e.identifier?e.label||"":ha(e.identifier)}function xs(e,t,r){const n=t.indexStack,i=e.children||[],o=t.createTracker(r),a=[];let s=-1;for(n.push(-1);++s<i.length;){const r=i[s];n[n.length-1]=s,a.push(o.move(t.handle(r,e,t,{before:"\n",after:"\n",...o.current()}))),"list"!==r.type&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(ks(r,i[s+1],e,t)))}return n.pop(),a.join("")}function ks(e,t,r,n){let i=n.join.length;for(;i--;){const o=n.join[i](e,t,r,n);if(!0===o||1===o)break;if("number"==typeof o)return"\n".repeat(1+o);if(!1===o)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const Es=/\r?\n|\r/g;function Ss(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Ps(e,t){return _s(e,t.inConstruct,!0)&&!_s(e,t.notInConstruct,!1)}function _s(e,t,r){if("string"==typeof t&&(t=[t]),!t||0===t.length)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Cs(e,t,r){const n=(r.before||"")+(t||"")+(r.after||""),i=[],o=[],a={};let s=-1;for(;++s<e.unsafe.length;){const t=e.unsafe[s];if(!Ps(e.stack,t))continue;const r=Ss(t);let o;for(;o=r.exec(n);){const e="before"in t||Boolean(t.atBreak),r="after"in t,n=o.index+(e?o[1].length:0);i.includes(n)?(a[n].before&&!e&&(a[n].before=!1),a[n].after&&!r&&(a[n].after=!1)):(i.push(n),a[n]={before:e,after:r})}}i.sort(As);let c=r.before?r.before.length:0;const u=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){const e=i[s];e<c||e>=u||(e+1<u&&i[s+1]===e+1&&a[e].after&&!a[e+1].before&&!a[e+1].after||i[s-1]===e-1&&a[e].before&&!a[e-1].before&&!a[e-1].after||(c!==e&&o.push(Fs(n.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||r.encode&&r.encode.includes(n.charAt(e))?(o.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),c++):o.push("\\")))}return o.push(Fs(n.slice(c,u),r.after)),o.join("")}function As(e,t){return e-t}function Fs(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=e+t;let a,s=-1,c=0;for(;a=r.exec(o);)n.push(a.index);for(;++s<n.length;)c!==n[s]&&i.push(e.slice(c,n[s])),i.push("\\"),c=n[s];return i.push(e.slice(c)),i.join("")}function Ds(e){const t=e||{},r=t.now||{};let n=t.lineShift||0,i=r.line||1,o=r.column||1;return{move:function(e){const t=e||"",r=t.split(/\r?\n|\r/g),a=r[r.length-1];return i+=r.length-1,o=1===r.length?o+a.length:1+a.length+n,t},current:function(){return{now:{line:i,column:o},lineShift:n}},shift:function(e){n+=e}}}function Rs(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ts(){this.buffer()}function Os(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Eo(this.sliceSerialize(e)).toLowerCase()}function js(e){this.exit(e)}function Is(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ls(){this.buffer()}function qs(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Eo(this.sliceSerialize(e)).toLowerCase()}function zs(e){this.exit(e)}function Ms(e,t,r,n){const i=Ds(n);let o=i.move("[^");const a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(Cs(r,ws(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function Ns(e,t,r,n){const i=Ds(n);let o=i.move("[^");const a=r.enter("footnoteDefinition"),s=r.enter("label");return o+=i.move(Cs(r,ws(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(function(e,t){const r=[];let n,i=0,o=0;for(;n=Es.exec(e);)a(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,o++;return a(e.slice(i)),r.join("");function a(e){r.push(t(e,o,!e))}}(xs(e,r,i.current()),Bs)),a(),o}function Bs(e,t,r){return 0===t?e:(r?"":" ")+e}function $s(e,t,r){const n=t.indexStack,i=e.children||[],o=[];let a=-1,s=r.before;n.push(-1);let c=t.createTracker(r);for(;++a<i.length;){const u=i[a];let l;if(n[n.length-1]=a,a+1<i.length){let r=t.handle.handlers[i[a+1].type];r&&r.peek&&(r=r.peek),l=r?r(i[a+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else l=r.after;o.length>0&&("\r"===s||"\n"===s)&&"html"===u.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",c=t.createTracker(r),c.move(o.join(""))),o.push(c.move(t.handle(u,e,t,{...c.current(),before:s,after:l}))),s=o[o.length-1].slice(-1)}return n.pop(),o.join("")}Ms.peek=function(){return"["};Hs.peek=function(){return"~"};const Us={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},Vs={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{delete:Hs}};function Hs(e,t,r,n){const i=Ds(n),o=r.enter("strikethrough");let a=i.move("~~");return a+=$s(e,r,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Qs(e,t,r){let n=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<r.unsafe.length;){const e=r.unsafe[o],t=Ss(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function Ws(e){return null==e?"":String(e)}function Gs(e){return e.length}function Ks(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Qs.peek=function(){return"`"};const Js={enter:{table:function(e){const t=e._align;this.enter({type:"table",align:t.map((e=>"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)},tableData:Xs,tableHeader:Xs,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Zs));const r=this.stack[this.stack.length-1];r.value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:Ys,tableHeader:Ys,tableRow:Ys}};function Ys(e){this.exit(e)}function Xs(e){this.enter({type:"tableCell",children:[]},e)}function Zs(e,t){return"|"===t?t:e}function ec(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,r,n){return s(function(e,t,r){const n=e.children;let i=-1;const o=[],a=t.enter("table");for(;++i<n.length;)o[i]=c(n[i],t,r);return a(),o}(e,r,n),e.align)},tableRow:function(e,t,r,n){const i=c(e,r,n),o=s([i]);return o.slice(0,o.indexOf("\n"))},tableCell:a,inlineCode:function(e,t,r){let n=Qs(e,0,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n}}};function a(e,t,r,n){const i=r.enter("tableCell"),a=r.enter("phrasing"),s=$s(e,r,{...n,before:o,after:o});return a(),i(),s}function s(e,t){return function(e,t={}){const r=(t.align||[]).concat(),n=t.stringLength||Gs,i=[],o=[],a=[],s=[];let c=0,u=-1;for(;++u<e.length;){const r=[],i=[];let l=-1;for(e[u].length>c&&(c=e[u].length);++l<e[u].length;){const o=Ws(e[u][l]);if(!1!==t.alignDelimiters){const e=n(o);i[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}r.push(o)}o[u]=r,a[u]=i}let l=-1;if("object"==typeof r&&"length"in r)for(;++l<c;)i[l]=Ks(r[l]);else{const e=Ks(r);for(;++l<c;)i[l]=e}l=-1;const f=[],h=[];for(;++l<c;){const e=i[l];let r="",n="";99===e?(r=":",n=":"):108===e?r=":":114===e&&(n=":");let o=!1===t.alignDelimiters?1:Math.max(1,s[l]-r.length-n.length);const a=r+"-".repeat(o)+n;!1!==t.alignDelimiters&&(o=r.length+o+n.length,o>s[l]&&(s[l]=o),h[l]=o),f[l]=a}o.splice(1,0,f),a.splice(1,0,h),u=-1;const d=[];for(;++u<o.length;){const e=o[u],r=a[u];l=-1;const n=[];for(;++l<c;){const o=e[l]||"";let a="",u="";if(!1!==t.alignDelimiters){const e=s[l]-(r[l]||0),t=i[l];114===t?a=" ".repeat(e):99===t?e%2?(a=" ".repeat(e/2+.5),u=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),u=a):u=" ".repeat(e)}!1===t.delimiterStart||l||n.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===o||!1===t.delimiterStart&&!l||n.push(" "),!1!==t.alignDelimiters&&n.push(a),n.push(o),!1!==t.alignDelimiters&&n.push(u),!1!==t.padding&&n.push(" "),!1===t.delimiterEnd&&l===c-1||n.push("|")}d.push(!1===t.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return d.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function c(e,t,r){const n=e.children;let i=-1;const o=[],s=t.enter("tableRow");for(;++i<n.length;)o[i]=a(n[i],0,t,r);return s(),o}}function tc(e,t,r,n){const i=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let o=r.bulletCurrent||function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(r);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=r.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);const c=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),(function(e,t,r){if(t)return(r?"":" ".repeat(a))+e;return(r?o:o+" ".repeat(a-o.length))+e}));return c(),u}const rc={exit:{taskListCheckValueChecked:ic,taskListCheckValueUnchecked:ic,paragraph:function(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1],r=e.children[0];if(r&&"text"===r.type){const n=t.children;let i,o=-1;for(;++o<n.length;){const e=n[o];if("paragraph"===e.type){i=e;break}}i===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}}},nc={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(e,t,r,n){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=Ds(n);o&&s.move(a);let c=tc(e,t,r,{...n,...s.current()});o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a})));return c}}};function ic(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}var oc=Object.freeze({__proto__:null,default:function(e={}){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){return _i([Da,{document:{91:{tokenize:Ua,continuation:{tokenize:Va},exit:Ha}},text:{91:{tokenize:$a},93:{add:"after",tokenize:Na,resolveTo:Ba}}},Qa(e),Wa,Ja])}(e)),r("fromMarkdownExtensions",[ps,{enter:{gfmFootnoteDefinition:Rs,gfmFootnoteDefinitionLabelString:Ts,gfmFootnoteCall:Is,gfmFootnoteCallString:Ls},exit:{gfmFootnoteDefinition:js,gfmFootnoteDefinitionLabelString:Os,gfmFootnoteCall:zs,gfmFootnoteCallString:qs}},Us,Js,rc]),r("toMarkdownExtensions",function(e){return{extensions:[ms,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Ns,footnoteReference:Ms}},Vs,ec(e),nc]}}(e))}}),ac=se(oc);const sc=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),ss(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)};var cc=Object.freeze({__proto__:null,CONTINUE:is,EXIT:os,SKIP:as,visit:sc});const uc=/[\t ]*(?:\r?\n|\r)/g;var lc=Object.freeze({__proto__:null,default:function(){return e=>{sc(e,"text",((e,t,r)=>{const n=[];let i=0;uc.lastIndex=0;let o=uc.exec(e.value);for(;o;){const t=o.index;i!==t&&n.push({type:"text",value:e.value.slice(i,t)}),n.push({type:"break"}),i=t+o[0].length,o=uc.exec(e.value)}if(n.length>0&&r&&"number"==typeof t)return i<e.value.length&&n.push({type:"text",value:e.value.slice(i)}),r.children.splice(t,1,...n),t+n.length}))}}}),fc=se(lc),hc={},dc={};function pc(e,t,r){var n,i,o,a,s,c="";for("string"!=typeof t&&(r=t,t=pc.defaultChars),void 0===r&&(r=!0),s=function(e){var t,r,n=dc[e];if(n)return n;for(n=dc[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}(t),n=0,i=e.length;n<i;n++)if(o=e.charCodeAt(n),r&&37===o&&n+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(n+1,n+3)))c+=e.slice(n,n+3),n+=2;else if(o<128)c+=s[o];else if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1<i&&(a=e.charCodeAt(n+1))>=56320&&a<=57343){c+=encodeURIComponent(e[n]+e[n+1]),n++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[n]);return c}pc.defaultChars=";/?:@&=+$,-_.!~*'()#",pc.componentChars="-_.!~*'()";var mc=pc,gc={};function vc(e,t){var r;return"string"!=typeof t&&(t=vc.defaultChars),r=function(e){var t,r,n=gc[e];if(n)return n;for(n=gc[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)n[r=e.charCodeAt(t)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,i,o,a,s,c,u="";for(t=0,n=e.length;t<n;t+=3)(i=parseInt(e.slice(t+1,t+3),16))<128?u+=r[i]:192==(224&i)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(u+=(c=i<<6&1984|63&o)<128?"��":String.fromCharCode(c),t+=3):224==(240&i)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&a))?(u+=(c=i<<12&61440|o<<6&4032|63&a)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&i)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&a)&&128==(192&s))?((c=i<<18&1835008|o<<12&258048|a<<6&4032|63&s)<65536||c>1114111?u+="����":(c-=65536,u+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),t+=9):u+="�";return u}))}vc.defaultChars=";/?:@&=+$,#",vc.componentChars="";var yc=vc;function bc(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var wc=/^([a-z0-9.+-]+:)/i,xc=/:[0-9]*$/,kc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ec=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Sc=["'"].concat(Ec),Pc=["%","/","?",";","#"].concat(Sc),_c=["/","?","#"],Cc=/^[+a-z0-9A-Z_-]{0,63}$/,Ac=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Fc={javascript:!0,"javascript:":!0},Dc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};bc.prototype.parse=function(e,t){var r,n,i,o,a,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var c=kc.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var u=wc.exec(s);if(u&&(i=(u=u[0]).toLowerCase(),this.protocol=u,s=s.substr(u.length)),(t||u||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(a="//"===s.substr(0,2))||u&&Fc[u]||(s=s.substr(2),this.slashes=!0)),!Fc[u]&&(a||u&&!Dc[u])){var l,f,h=-1;for(r=0;r<_c.length;r++)-1!==(o=s.indexOf(_c[r]))&&(-1===h||o<h)&&(h=o);for(-1!==(f=-1===h?s.lastIndexOf("@"):s.lastIndexOf("@",h))&&(l=s.slice(0,f),s=s.slice(f+1),this.auth=l),h=-1,r=0;r<Pc.length;r++)-1!==(o=s.indexOf(Pc[r]))&&(-1===h||o<h)&&(h=o);-1===h&&(h=s.length),":"===s[h-1]&&h--;var d=s.slice(0,h);s=s.slice(h),this.parseHost(d),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p){var m=this.hostname.split(/\./);for(r=0,n=m.length;r<n;r++){var g=m[r];if(g&&!g.match(Cc)){for(var v="",y=0,b=g.length;y<b;y++)g.charCodeAt(y)>127?v+="x":v+=g[y];if(!v.match(Cc)){var w=m.slice(0,r),x=m.slice(r+1),k=g.match(Ac);k&&(w.push(k[1]),x.unshift(k[2])),x.length&&(s=x.join(".")+s),this.hostname=w.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var E=s.indexOf("#");-1!==E&&(this.hash=s.substr(E),s=s.slice(0,E));var S=s.indexOf("?");return-1!==S&&(this.search=s.substr(S),s=s.slice(0,S)),s&&(this.pathname=s),Dc[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},bc.prototype.parseHost=function(e){var t=xc.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Rc=function(e,t){if(e&&e instanceof bc)return e;var r=new bc;return r.parse(e,t),r};function Tc(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Oc(e,t,r,n){const i=Tc(r),o='"'===i?"Quote":"Apostrophe",a=r.enter("image");let s=r.enter("label");const c=r.createTracker(n);let u=c.move("![");return u+=c.move(r.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=r.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(r.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),u+=c.move(")"),a(),u}hc.encode=mc,hc.decode=yc,hc.format=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},hc.parse=Rc,Oc.peek=function(){return"!"};var jc=se(Object.freeze({__proto__:null,image:Oc})),Ic=se(Qo);var Lc=se(Object.freeze({__proto__:null,types:{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"}}));const qc={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 zc=se(Object.freeze({__proto__:null,codes:qc}));var Mc=se(Object.freeze({__proto__:null,constants:{attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4}})),Nc=se(So),Bc=se(ko),$c=se(go),Uc=se($i),Vc=se(yo),Hc=se(wo),Qc=se(cc);var Wc=Object.freeze({__proto__:null,paragraph:function(e,t,r,n){const i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a}}),Gc=se(Wc);var Kc=Object.freeze({__proto__:null,heading:function(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(n);if(function(e,t){let r=!1;return sc(e,(e=>{if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,os})),Boolean((!e.depth||e.depth<3)&&wi(e)&&(t.options.setext||r))}(e,r)){const t=r.enter("headingSetext"),n=r.enter("phrasing"),a=r.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return n(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=r.enter("headingAtx"),c=r.enter("phrasing");o.move(a+" ");let u=r.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),s(),u}}),Jc=se(Kc),Yc=se(Vi);function Xc(e,t,r){return">"+(r?"":" ")+e}var Zc,eu=Object.freeze({__proto__:null,blockquote:function(e,t,r,n){const i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);const a=r.indentLines(r.containerFlow(e,o.current()),Xc);return i(),a}}),tu=se(eu),ru={exports:{}};Zc=ru,function(){var e;function t(e){for(var t,r,n,i,o=1,a=[].slice.call(arguments),s=0,c=e.length,u="",l=!1,f=!1,h=function(){return a[o++]},d=function(){for(var r="";/\d/.test(e[s]);)r+=e[s++],t=e[s];return r.length>0?parseInt(r):null};s<c;++s)if(t=e[s],l)switch(l=!1,"."==t?(f=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(f=!0,t=e[s+=2]):f=!0,i=d(),t){case"b":u+=parseInt(h(),10).toString(2);break;case"c":u+="string"==typeof(r=h())||r instanceof String?r:String.fromCharCode(parseInt(r,10));break;case"d":u+=parseInt(h(),10);break;case"f":n=String(parseFloat(h()).toFixed(i||6)),u+=f?n:n.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(e=Zc.exports=t).format=t,e.vsprintf=function(e,r){return t.apply(null,[e].concat(r))},"undefined"!=typeof console&&"function"==typeof console.log&&(e.printf=function(){console.log(t.apply(null,arguments))})}();var nu=ru.exports;const iu=Object.assign(ou(Error),{eval:ou(EvalError),range:ou(RangeError),reference:ou(ReferenceError),syntax:ou(SyntaxError),type:ou(TypeError),uri:ou(URIError)});function ou(e){return t.displayName=e.displayName||e.name,t;function t(t,...r){const n=t?nu(t,...r):t;return new e(n)}}const au={}.hasOwnProperty,su={yaml:"-",toml:"+"};function cu(e="yaml"){const t=[];let r=-1;for(Array.isArray(e)||(e=[e]);++r<e.length;)t[r]=uu(e[r]);return t}function uu(e){let t=e;if("string"==typeof t){if(!au.call(su,t))throw iu("Missing matter definition for `%s`",t);t={type:t,marker:su[t]}}else if("object"!=typeof t)throw iu("Expected matter to be an object, not `%j`",t);if(!au.call(t,"type"))throw iu("Missing `type` in matter `%j`",t);if(!au.call(t,"fence")&&!au.call(t,"marker"))throw iu("Missing `marker` or `fence` in matter `%j`",t);return t}function lu(e){const t=e.type,r=e.anywhere,n=t+"Value",i=t+"Fence",o=i+"Sequence",a={tokenize:function(e,t,r){let n=0;return function(t){if(t===s.charCodeAt(n))return e.enter(i),e.enter(o),a(t);return r(t)};function a(t){return n===s.length?(e.exit(o),zi(t)?(e.enter("whitespace"),c(t)):u(t)):t===s.charCodeAt(n++)?(e.consume(t),a):r(t)}function c(t){return zi(t)?(e.consume(t),c):(e.exit("whitespace"),u(t))}function u(n){return null===n||qi(n)?(e.exit(i),t(n)):r(n)}},partial:!0};let s;return{tokenize:function(i,o,c){const u=this;return function(n){const o=u.now();if(1!==o.column||!r&&1!==o.line)return c(n);return i.enter(t),s=fu(e,"open"),i.attempt(a,l,c)(n)};function l(t){return s=fu(e,"close"),d(t)}function f(e){return null===e||qi(e)?d(e):(i.enter(n),h(e))}function h(e){return null===e||qi(e)?(i.exit(n),d(e)):(i.consume(e),h)}function d(e){return null===e?c(e):(i.enter("lineEnding"),i.consume(e),i.exit("lineEnding"),i.attempt(a,p,f))}function p(e){return i.exit(t),o(e)}},concrete:!0}}function fu(e,t){return e.marker?hu(e.marker,t).repeat(3):hu(e.fence,t)}function hu(e,t){return"string"==typeof e?e:e[t]}function du(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function pu(e){const t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function mu(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function gu(e){const t=vu(e,"open"),r=vu(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+r}}function vu(e,t){return e.marker?yu(e.marker,t).repeat(3):yu(e.fence,t)}function yu(e,t){return"string"==typeof e?e:e[t]}var bu=Object.freeze({__proto__:null,default:function(e="yaml"){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){const t=cu(e),r={};let n=-1;for(;++n<t.length;){const e=t[n],i=fu(e,"open").charCodeAt(0);i in r?r[i].push(lu(e)):r[i]=[lu(e)]}return{flow:r}}(e)),r("fromMarkdownExtensions",function(e){const t=cu(e),r={},n={};let i=-1;for(;++i<t.length;){const e=t[i];r[e.type]=du(e),n[e.type]=pu,n[e.type+"Value"]=mu}return{enter:r,exit:n}}(e)),r("toMarkdownExtensions",function(e){const t=[],r={},n=cu(e);let i=-1;for(;++i<n.length;){const e=n[i];r[e.type]=gu(e),t.push({atBreak:!0,character:vu(e,"open").charAt(0)})}return{unsafe:t,handlers:r}}(e))}}),wu=se(bu);function xu(e,t,r,n,i,o,a,s,c,u,l,f,h,d,p){let m,g;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),v};function v(t){return 35===t?(m=a,y(t)):46===t?(m=s,y(t)):58===t||95===t||Fi(t)?(e.enter(o),e.enter(c),e.consume(t),x):p&&zi(t)?Ui(e,v,"whitespace")(t):!p&&Li(t)?xo(e,v)(t):F(t)}function y(t){return e.enter(o),e.enter(m),e.enter(m+"Marker"),e.consume(t),e.exit(m+"Marker"),b}function b(t){return null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||Li(t)?r(t):(e.enter(m+"Value"),e.consume(t),w)}function w(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):35===t||46===t||125===t||Li(t)?(e.exit(m+"Value"),e.exit(m),e.exit(o),v(t)):(e.consume(t),w)}function x(t){return 45===t||46===t||58===t||95===t||Ti(t)?(e.consume(t),x):(e.exit(c),p&&zi(t)?Ui(e,k,"whitespace")(t):!p&&Li(t)?xo(e,k)(t):k(t))}function k(t){return 61===t?(e.enter(u),e.consume(t),e.exit(u),E):(e.exit(o),v(t))}function E(t){return null===t||60===t||61===t||62===t||96===t||125===t||p&&qi(t)?r(t):34===t||39===t?(e.enter(l),e.enter(h),e.consume(t),e.exit(h),g=t,P):p&&zi(t)?Ui(e,E,"whitespace")(t):!p&&Li(t)?xo(e,E)(t):(e.enter(f),e.enter(d),e.consume(t),g=void 0,S)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):125===t||Li(t)?(e.exit(d),e.exit(f),e.exit(o),v(t)):(e.consume(t),S)}function P(t){return t===g?(e.enter(h),e.consume(t),e.exit(h),e.exit(l),e.exit(o),A):(e.enter(f),_(t))}function _(t){return t===g?(e.exit(f),P(t)):null===t?r(t):qi(t)?p?r(t):xo(e,_)(t):(e.enter(d),e.consume(t),C)}function C(t){return t===g||null===t||qi(t)?(e.exit(d),_(t)):(e.consume(t),C)}function A(e){return 125===e||Li(e)?v(e):F(e)}function F(o){return 125===o?(e.enter(i),e.consume(o),e.exit(i),e.exit(n),t):r(o)}}function ku(e,t,r,n,i,o,a){let s,c=0,u=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),l};function l(r){return 93===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),f(r))}function f(t){if(93===t&&!u)return p(t);const r=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=r),s=r,h(t)}function h(t){return null===t||c>999||91===t&&++u>32?r(t):93!==t||u--?qi(t)?a?r(t):(e.consume(t),e.exit("chunkText"),f):(e.consume(t),92===t?d:h):(e.exit("chunkText"),p(t))}function d(t){return 91===t||92===t||93===t?(e.consume(t),c++,h):h(t)}function p(r){return e.exit(o),e.enter(i),e.consume(r),e.exit(i),e.exit(n),t}}function Eu(e,t,r,n){const i=this;return function(t){if(Fi(t))return e.enter(n),e.consume(t),o;return r(t)};function o(a){return 45===a||95===a||Ti(a)?(e.consume(a),o):(e.exit(n),45===i.previous||95===i.previous?r(a):t(a))}}const Su={tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0;let a,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),c(t)};function c(t){return 58===t?(e.consume(t),s++,c):s<3?r(t):(e.exit("directiveContainerSequence"),Eu.call(n,e,u,r,"directiveContainerName")(t))}function u(t){return 91===t?e.attempt(Pu,l,l)(t):l(t)}function l(t){return 123===t?e.attempt(_u,f,f)(t):f(t)}function f(t){return Ui(e,h,"whitespace")(t)}function h(i){return e.exit("directiveContainerFence"),null===i?d(i):qi(i)?n.interrupt?t(i):e.attempt(Cu,p,d)(i):r(i)}function d(r){return e.exit("directiveContainer"),t(r)}function p(r){return null===r?(e.exit("directiveContainer"),t(r)):(e.enter("directiveContainerContent"),m(r))}function m(t){return null===t?w(t):e.attempt({tokenize:x,partial:!0},w,o?Ui(e,g,"linePrefix",o+1):g)(t)}function g(t){if(null===t)return w(t);const r=e.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=r),a=r,v(t)}function v(t){if(null===t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}return qi(t)?e.check(Cu,y,b)(t):(e.consume(t),v)}function y(t){e.consume(t);const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,m}function b(t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}function w(r){return e.exit("directiveContainerContent"),e.exit("directiveContainer"),t(r)}function x(e,t,r){let n=0;return Ui(e,(function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)}),"linePrefix",4);function i(t){return 58===t?(e.consume(t),n++,i):n<s?r(t):(e.exit("directiveContainerSequence"),Ui(e,o,"whitespace")(t))}function o(n){return null===n||qi(n)?(e.exit("directiveContainerFence"),t(n)):r(n)}}},concrete:!0},Pu={tokenize:function(e,t,r){return ku(e,t,r,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},_u={tokenize:function(e,t,r){return xu(e,t,r,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},Cu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const Au={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),i};function i(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),Eu.call(n,e,o,r,"directiveLeafName")):r(t)}function o(t){return 91===t?e.attempt(Fu,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(Du,s,s)(t):s(t)}function s(t){return Ui(e,c,"whitespace")(t)}function c(n){return null===n||qi(n)?(e.exit("directiveLeaf"),t(n)):r(n)}}},Fu={tokenize:function(e,t,r){return ku(e,t,r,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},Du={tokenize:function(e,t,r){return xu(e,t,r,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0};const Ru={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),Eu.call(n,e,i,r,"directiveTextName")};function i(t){return 58===t?r(t):91===t?e.attempt(Tu,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(Ou,a,a)(t):a(t)}function a(r){return e.exit("directiveText"),t(r)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},Tu={tokenize:function(e,t,r){return ku(e,t,r,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},Ou={tokenize:function(e,t,r){return xu(e,t,r,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};const ju=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Iu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Lu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function qu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function zu(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Lu(e)}const Mu=String.fromCharCode,Nu=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Bu(e,t={}){const r="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,n=[];let i,o,a=0,s=-1,c="";t.position&&("start"in t.position||"indent"in t.position?(o=t.position.indent,i=t.position.start):i=t.position);let u,l=(i?i.line:0)||1,f=(i?i.column:0)||1,h=d();for(a--;++a<=e.length;)if(10===u&&(f=(o?o[s]:0)||1),u=e.charCodeAt(a),38===u){const i=e.charCodeAt(a+1);if(9===i||10===i||12===i||32===i||38===i||60===i||Number.isNaN(i)||r&&i===r){c+=Mu(u),f++;continue}const o=a+1;let s,l=o,g=o;if(35===i){g=++l;const t=e.charCodeAt(g);88===t||120===t?(s="hexadecimal",g=++l):s="decimal"}else s="named";let v="",y="",b="";const w="named"===s?zu:"decimal"===s?Lu:qu;for(g--;++g<=e.length;){const t=e.charCodeAt(g);if(!w(t))break;b+=Mu(t),"named"===s&&ju.includes(b)&&(v=b,y=io(b))}let x=59===e.charCodeAt(g);if(x){g++;const e="named"===s&&io(b);e&&(v=b,y=e)}let k=1+g-o,E="";if(x||!1!==t.nonTerminated)if(b)if("named"===s){if(x&&!y)p(5,1);else if(v!==b&&(g=l+v.length,k=1+g-l,x=!1),!x){const r=v?1:3;if(t.attribute){const t=e.charCodeAt(g);61===t?(p(r,k),y=""):zu(t)?y="":p(r,k)}else p(r,k)}E=y}else{x||p(2,k);let e=Number.parseInt(b,"hexadecimal"===s?16:10);if($u(e))p(7,k),E=Mu(65533);else if(e in Iu)p(6,k),E=Iu[e];else{let t="";Uu(e)&&p(6,k),e>65535&&(e-=65536,t+=Mu(e>>>10|55296),e=56320|1023&e),E=t+Mu(e)}}else"named"!==s&&p(4,k);else;if(E){m(),h=d(),a=g-1,f+=g-o+1,n.push(E);const r=d();r.offset++,t.reference&&t.reference.call(t.referenceContext,E,{start:h,end:r},e.slice(o-1,g)),h=r}else b=e.slice(o-1,g),c+=b,f+=b.length,a=g-1}else 10===u&&(l++,s++,f=0),Number.isNaN(u)?m():(c+=Mu(u),f++);return n.join("");function d(){return{line:l,column:f,offset:a+((i?i.offset:0)||0)}}function p(e,r){let n;t.warning&&(n=d(),n.column+=r,n.offset+=r,t.warning.call(t.warningContext,Nu[e],n,e))}function m(){c&&(n.push(c),t.text&&t.text.call(t.textContext,c,{start:h,end:d()}),c="")}}function $u(e){return e>=55296&&e<=57343||e>1114111}function Uu(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}function Vu(e,t){return e=e.replace(t.subset?function(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly?e:e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,r,n){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charCodeAt(r+2),t)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function r(e,r,n){return t.format(e.charCodeAt(0),n.charCodeAt(r+1),t)}}function Hu(e){return"&#x"+e.toString(16).toUpperCase()+";"}const Qu={}.hasOwnProperty,Wu=/^[^\t\n\r "#'.<=>`}]+$/;ol.peek=function(){return":"};const Gu={canContainEols:["textDirective"],enter:{directiveContainer:function(e){Ju.call(this,"containerDirective",e)},directiveContainerAttributes:Xu,directiveContainerLabel:function(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)},directiveLeaf:function(e){Ju.call(this,"leafDirective",e)},directiveLeafAttributes:Xu,directiveText:function(e){Ju.call(this,"textDirective",e)},directiveTextAttributes:Xu},exit:{directiveContainer:il,directiveContainerAttributeClassValue:el,directiveContainerAttributeIdValue:Zu,directiveContainerAttributeName:rl,directiveContainerAttributeValue:tl,directiveContainerAttributes:nl,directiveContainerLabel:function(e){this.exit(e)},directiveContainerName:Yu,directiveLeaf:il,directiveLeafAttributeClassValue:el,directiveLeafAttributeIdValue:Zu,directiveLeafAttributeName:rl,directiveLeafAttributeValue:tl,directiveLeafAttributes:nl,directiveLeafName:Yu,directiveText:il,directiveTextAttributeClassValue:el,directiveTextAttributeIdValue:Zu,directiveTextAttributeName:rl,directiveTextAttributeValue:tl,directiveTextAttributes:nl,directiveTextName:Yu}},Ku={unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:"\n",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}],handlers:{containerDirective:ol,leafDirective:ol,textDirective:ol}};function Ju(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function Yu(e){this.stack[this.stack.length-1].name=this.sliceSerialize(e)}function Xu(){this.setData("directiveAttributes",[]),this.buffer()}function Zu(e){this.getData("directiveAttributes").push(["id",Bu(this.sliceSerialize(e),{attribute:!0})])}function el(e){this.getData("directiveAttributes").push(["class",Bu(this.sliceSerialize(e),{attribute:!0})])}function tl(e){const t=this.getData("directiveAttributes");t[t.length-1][1]=Bu(this.sliceSerialize(e),{attribute:!0})}function rl(e){this.getData("directiveAttributes").push([this.sliceSerialize(e),""])}function nl(){const e=this.getData("directiveAttributes"),t={};let r=-1;for(;++r<e.length;){const n=e[r];"class"===n[0]&&t.class?t.class+=" "+n[1]:t[n[0]]=n[1]}this.setData("directiveAttributes"),this.resume();this.stack[this.stack.length-1].attributes=t}function il(e){this.exit(e)}function ol(e,t,r,n){const i=Ds(n),o=function(e){let t=0;"containerDirective"===e.type?(ss(e,(function(e,r){if("containerDirective"===e.type){let e=r.length,n=0;for(;e--;)"containerDirective"===r[e].type&&n++;n>t&&(t=n)}})),t+=3):t="leafDirective"===e.type?2:1;return":".repeat(t)}(e),a=r.enter(e.type);let s,c=i.move(o+(e.name||""));if("containerDirective"===e.type){const t=(e.children||[])[0];s=al(t)?t:void 0}else s=e;if(s&&s.children&&s.children.length>0){const t=r.enter("label"),n=`${e.type}Label`,o=r.enter(n);c+=i.move("["),c+=i.move($s(s,r,{...i.current(),before:c,after:"]"})),c+=i.move("]"),o(),t()}if(c+=i.move(function(e,t){const r=Tc(t),n="textDirective"===e.type?[r]:[r,"\n","\r"],i=e.attributes||{},o=[];let a,s,c,u;for(u in i)if(Qu.call(i,u)&&void 0!==i[u]&&null!==i[u]){const e=String(i[u]);if("id"===u)c=Wu.test(e)?"#"+e:l("id",e);else if("class"===u){const t=e.split(/[\t\n\r ]+/g),r=[],n=[];let i=-1;for(;++i<t.length;)(Wu.test(t[i])?n:r).push(t[i]);a=r.length>0?l("class",r.join(" ")):"",s=n.length>0?"."+n.join("."):""}else o.push(l(u,e))}a&&o.unshift(a);s&&o.unshift(s);c&&o.unshift(c);return o.length>0?"{"+o.join(" ")+"}":"";function l(e,t){return e+(t?"="+r+function(e,t){return Vu(e,Object.assign({format:Hu},t))}(t,{subset:n})+r:"")}}(e,r)),"containerDirective"===e.type){let t=e;al((e.children||[])[0])&&(t=Object.assign({},e,{children:e.children.slice(1)})),t&&t.children&&t.children.length>0&&(c+=i.move("\n"),c+=i.move(xs(t,r,i.current()))),c+=i.move("\n"+o)}return a(),c}function al(e){return Boolean(e&&"paragraph"===e.type&&e.data&&e.data.directiveLabel)}var sl=Object.freeze({__proto__:null,default:function(){const e=this.data();function t(t,r){(e[t]?e[t]:e[t]=[]).push(r)}t("micromarkExtensions",{text:{58:Ru},flow:{58:[Su,Au]}}),t("fromMarkdownExtensions",Gu),t("toMarkdownExtensions",Ku)}}),cl=se(sl);var ul=Object.freeze({__proto__:null,remarkHeadingId:function(){const e=this.data();function t(t,r){(e[t]||(e[t]=[])).push(r)}return t("micromarkExtensions",function(){const e={text:{[qc.leftCurlyBrace]:{name:"headingIdMaybeStart",tokenize:(e,t,r)=>function(n){return e.attempt({tokenize(e,t,r){return function(t){if(t!==qc.leftCurlyBrace)throw new Error(`Unexpected code ${t}`);return e.enter("id"),e.enter("idMarker"),e.consume(t),n};function n(t){return t!==qc.numberSign?r(t):(e.consume(t),e.exit("idMarker"),e.enter("idString"),e.enter("chunkString",{contentType:"string"}),i)}function i(n){return[qc.carriageReturn,qc.lineFeed,qc.carriageReturnLineFeed,null,qc.backslash,qc.leftCurlyBrace].includes(n)?r(n):n===qc.rightCurlyBrace?(e.exit("chunkString"),e.exit("idString"),e.enter("idMarker"),e.consume(n),e.exit("idMarker"),e.exit("id"),t):(e.consume(n),i)}}},t,r)(n)}}}};return e}()),t("fromMarkdownExtensions",{enter:{idString(e){this.enter({type:"idString",value:null},e),this.buffer()}},exit:{idString(e){const t=this.resume();this.exit(e).value=t}}}),function(e){sc(e,"idString",((e,t,r)=>{if(!r)throw new Error("Unexpected idString under no parent.");if("heading"!==r.type)throw new Error(`Unexpected node ${e} under ${r}`)})),sc(e,"heading",(e=>{const t=e.children.filter((e=>"idString"===e.type));if(0==t.length)return;if(t.length>1)throw new Error(`Found ${t.length} ids under heading ${e}.`);const r=t[0];if(r.value&&r.value.length>0){e.data||(e.data={}),e.data.hProperties||(e.data.hProperties={}),e.data.id=e.data.hProperties.id=r.value,r.value="";const t=e.children.indexOf(r);if(t>=1){const r=e.children[t-1];"text"===r.type&&(r.value=r.value.trimEnd())}e.children.splice(t,1)}}))}}}),ll=se(ul),fl=se(ns),hl={exports:{}},dl=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},pl=dl,ml=Object.prototype.toString;function gl(e){return Array.isArray(e)}function vl(e){return void 0===e}function yl(e){return"[object ArrayBuffer]"===ml.call(e)}function bl(e){return null!==e&&"object"==typeof e}function wl(e){if("[object Object]"!==ml.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function xl(e){return"[object Function]"===ml.call(e)}function kl(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),gl(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var El={isArray:gl,isArrayBuffer:yl,isBuffer:function(e){return null!==e&&!vl(e)&&null!==e.constructor&&!vl(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===ml.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&yl(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:bl,isPlainObject:wl,isUndefined:vl,isDate:function(e){return"[object Date]"===ml.call(e)},isFile:function(e){return"[object File]"===ml.call(e)},isBlob:function(e){return"[object Blob]"===ml.call(e)},isFunction:xl,isStream:function(e){return bl(e)&&xl(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===ml.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:kl,merge:function e(){var t={};function r(r,n){wl(t[n])&&wl(r)?t[n]=e(t[n],r):wl(r)?t[n]=e({},r):gl(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)kl(arguments[n],r);return t},extend:function(e,t,r){return kl(t,(function(t,n){e[n]=r&&"function"==typeof t?pl(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},Sl=El;function Pl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var _l=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(Sl.isURLSearchParams(t))n=t.toString();else{var i=[];Sl.forEach(t,(function(e,t){null!=e&&(Sl.isArray(e)?t+="[]":e=[e],Sl.forEach(e,(function(e){Sl.isDate(e)?e=e.toISOString():Sl.isObject(e)&&(e=JSON.stringify(e)),i.push(Pl(t)+"="+Pl(e))})))})),n=i.join("&")}if(n){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},Cl=El;function Al(){this.handlers=[]}Al.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},Al.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Al.prototype.forEach=function(e){Cl.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var Fl=Al,Dl=El,Rl=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},Tl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ol=Rl,jl=function(e,t,r,n,i){var o=new Error(e);return Ol(o,t,r,n,i)},Il=jl,Ll=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(Il("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},ql=El,zl=ql.isStandardBrowserEnv()?{write:function(e,t,r,n,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),ql.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ql.isString(n)&&a.push("path="+n),ql.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Ml=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Nl=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},Bl=function(e,t){return e&&!Ml(t)?Nl(e,t):t},$l=El,Ul=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Vl=El,Hl=Vl.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=Vl.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function Ql(e){this.message=e}Ql.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Ql.prototype.__CANCEL__=!0;var Wl,Gl=Ql,Kl=El,Jl=Ll,Yl=zl,Xl=_l,Zl=Bl,ef=function(e){var t,r,n,i={};return e?($l.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=$l.trim(e.substr(0,n)).toLowerCase(),r=$l.trim(e.substr(n+1)),t){if(i[t]&&Ul.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i},tf=Hl,rf=jl,nf=Tl,of=Gl,af=function(e){return new Promise((function(t,r){var n,i=e.data,o=e.headers,a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}Kl.isFormData(i)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(u+":"+l)}var f=Zl(e.baseURL,e.url);function h(){if(c){var n="getAllResponseHeaders"in c?ef(c.getAllResponseHeaders()):null,i={data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c};Jl((function(e){t(e),s()}),(function(e){r(e),s()}),i),c=null}}if(c.open(e.method.toUpperCase(),Xl(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(h)},c.onabort=function(){c&&(r(rf("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){r(rf("Network Error",e,null,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||nf;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(rf(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Kl.isStandardBrowserEnv()){var d=(e.withCredentials||tf(f))&&e.xsrfCookieName?Yl.read(e.xsrfCookieName):void 0;d&&(o[e.xsrfHeaderName]=d)}"setRequestHeader"in c&&Kl.forEach(o,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete o[t]:c.setRequestHeader(t,e)})),Kl.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){c&&(r(!e||e&&e.type?new of("canceled"):e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),i||(i=null),c.send(i)}))},sf={exports:{}},cf=z.default,uf=cf.URL,lf=N.default,ff=B.default,hf=$.default.Writable,df=M.default,pf=function(){if(!Wl){try{Wl=require("debug")("follow-redirects")}catch(e){}"function"!=typeof Wl&&(Wl=function(){})}Wl.apply(null,arguments)},mf=["abort","aborted","connect","error","socket","timeout"],gf=Object.create(null);mf.forEach((function(e){gf[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var vf=Cf("ERR_INVALID_URL","Invalid URL",TypeError),yf=Cf("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),bf=Cf("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),wf=Cf("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),xf=Cf("ERR_STREAM_WRITE_AFTER_END","write after end");function kf(e,t){hf.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function Ef(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",o=r[i]=e[n],a=t[n]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,n,o){if(Ff(e)){var a;try{a=Pf(new uf(e))}catch(t){a=cf.parse(e)}if(!Ff(a.protocol))throw new vf({input:e});e=a}else uf&&e instanceof uf?e=Pf(e):(o=n,n=e,e={protocol:i});return Df(n)&&(o=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,Ff(n.host)||Ff(n.hostname)||(n.hostname="::1"),df.equal(n.protocol,i,"protocol mismatch"),pf("options",n),new kf(n,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=a.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function Sf(){}function Pf(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function _f(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function Cf(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function Af(e){for(var t of mf)e.removeListener(t,gf[t]);e.on("error",Sf),e.abort()}function Ff(e){return"string"==typeof e||e instanceof String}function Df(e){return"function"==typeof e}kf.prototype=Object.create(hf.prototype),kf.prototype.abort=function(){Af(this._currentRequest),this.emit("abort")},kf.prototype.write=function(e,t,r){if(this._ending)throw new xf;if(!Ff(e)&&!function(e){return"object"==typeof e&&"length"in e}(e))throw new TypeError("data should be a string, Buffer or Uint8Array");Df(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new wf),this.abort()):r&&r()},kf.prototype.end=function(e,t,r){if(Df(e)?(r=e,e=t=null):Df(t)&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},kf.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},kf.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},kf.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),o()}),e),n(t)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){kf.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(kf.prototype,e,{get:function(){return this._currentRequest[e]}})})),kf.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},kf.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(n._redirectable=this,mf))n.on(i,gf[i]);if(this._currentUrl=/^\//.test(this._options.path)?cf.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function e(t){if(n===a._currentRequest)if(t)a.emit("error",t);else if(o<s.length){var r=s[o++];n.finished||n.write(r.data,r.encoding,e)}else a._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},kf.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(Af(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new bf);else{var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_f(/^content-/i,this._options.headers));var a,s=_f(/^host$/i,this._options.headers),c=cf.parse(this._currentUrl),u=s||c.host,l=/^\w+:/.test(r)?this._currentUrl:cf.format(Object.assign(c,{host:u}));try{a=cf.resolve(l,r)}catch(e){return void this.emit("error",new yf({cause:e}))}pf("redirecting to",a),this._isRedirect=!0;var f=cf.parse(a);if(Object.assign(this._options,f),(f.protocol!==c.protocol&&"https:"!==f.protocol||f.host!==u&&!function(e,t){df(Ff(e)&&Ff(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(f.host,u))&&_f(/^(?:authorization|cookie)$/i,this._options.headers),Df(i)){var h={headers:e.headers,statusCode:t},d={url:l,method:o,headers:n};try{i(this._options,h,d)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new yf({cause:e}))}}},sf.exports=Ef({http:lf,https:ff}),sf.exports.wrap=Ef;var Rf="0.26.1",Tf=El,Of=Ll,jf=Bl,If=_l,Lf=N.default,qf=B.default,zf=sf.exports.http,Mf=sf.exports.https,Nf=z.default,Bf=U.default,$f=Rf,Uf=jl,Vf=Rl,Hf=Tl,Qf=Gl,Wf=/https:?/;function Gf(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,Gf(e,t,e.href)}}var Kf=function(e){return new Promise((function(t,r){var n;function i(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}var o=function(e){i(),t(e)},a=!1,s=function(e){i(),a=!0,r(e)},c=e.data,u=e.headers,l={};if(Object.keys(u).forEach((function(e){l[e.toLowerCase()]=e})),"user-agent"in l?u[l["user-agent"]]||delete u[l["user-agent"]]:u["User-Agent"]="axios/"+$f,c&&!Tf.isStream(c)){if(Buffer.isBuffer(c));else if(Tf.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else{if(!Tf.isString(c))return s(Uf("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c=Buffer.from(c,"utf-8")}if(e.maxBodyLength>-1&&c.length>e.maxBodyLength)return s(Uf("Request body larger than maxBodyLength limit",e));l["content-length"]||(u["Content-Length"]=c.length)}var f=void 0;e.auth&&(f=(e.auth.username||"")+":"+(e.auth.password||""));var h=jf(e.baseURL,e.url),d=Nf.parse(h),p=d.protocol||"http:";if(!f&&d.auth){var m=d.auth.split(":");f=(m[0]||"")+":"+(m[1]||"")}f&&l.authorization&&delete u[l.authorization];var g=Wf.test(p),v=g?e.httpsAgent:e.httpAgent;try{If(d.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){var y=new Error(t.message);y.config=e,y.url=e.url,y.exists=!0,s(y)}var b={path:If(d.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:u,agent:v,agents:{http:e.httpAgent,https:e.httpsAgent},auth:f};e.socketPath?b.socketPath=e.socketPath:(b.hostname=d.hostname,b.port=d.port);var w,x=e.proxy;if(!x&&!1!==x){var k=p.slice(0,-1)+"_proxy",E=process.env[k]||process.env[k.toUpperCase()];if(E){var S=Nf.parse(E),P=process.env.no_proxy||process.env.NO_PROXY,_=!0;if(P){var C=P.split(",").map((function(e){return e.trim()}));_=!C.some((function(e){return!!e&&("*"===e||("."===e[0]&&d.hostname.substr(d.hostname.length-e.length)===e||d.hostname===e))}))}if(_&&(x={host:S.hostname,port:S.port,protocol:S.protocol},S.auth)){var A=S.auth.split(":");x.auth={username:A[0],password:A[1]}}}}x&&(b.headers.host=d.hostname+(d.port?":"+d.port:""),Gf(b,x,p+"//"+d.hostname+(d.port?":"+d.port:"")+b.path));var F=g&&(!x||Wf.test(x.protocol));e.transport?w=e.transport:0===e.maxRedirects?w=F?qf:Lf:(e.maxRedirects&&(b.maxRedirects=e.maxRedirects),w=F?Mf:zf),e.maxBodyLength>-1&&(b.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(b.insecureHTTPParser=e.insecureHTTPParser);var D=w.request(b,(function(t){if(!D.aborted){var r=t,n=t.req||D;if(204!==t.statusCode&&"HEAD"!==n.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(Bf.createUnzip()),delete t.headers["content-encoding"]}var i={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:n};if("stream"===e.responseType)i.data=r,Of(o,s,i);else{var c=[],u=0;r.on("data",(function(t){c.push(t),u+=t.length,e.maxContentLength>-1&&u>e.maxContentLength&&(a=!0,r.destroy(),s(Uf("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,n)))})),r.on("aborted",(function(){a||(r.destroy(),s(Uf("error request aborted",e,"ERR_REQUEST_ABORTED",n)))})),r.on("error",(function(t){D.aborted||s(Vf(t,e,null,n))})),r.on("end",(function(){try{var t=1===c.length?c[0]:Buffer.concat(c);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=Tf.stripBOM(t))),i.data=t}catch(t){s(Vf(t,e,t.code,i.request,i))}Of(o,s,i)}))}}}));if(D.on("error",(function(t){D.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||s(Vf(t,e,null,D))})),D.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){var R=parseInt(e.timeout,10);if(isNaN(R))return void s(Uf("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",D));D.setTimeout(R,(function(){D.abort();var t="";t=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";var r=e.transitional||Hf;s(Uf(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",D))}))}(e.cancelToken||e.signal)&&(n=function(e){D.aborted||(D.abort(),s(!e||e&&e.type?new Qf("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),Tf.isStream(c)?c.on("error",(function(t){s(Vf(t,e,null,D))})).pipe(D):D.end(c)}))},Jf=El,Yf=function(e,t){Dl.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},Xf=Rl,Zf={"Content-Type":"application/x-www-form-urlencoded"};function eh(e,t){!Jf.isUndefined(e)&&Jf.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var th,rh={transitional:Tl,adapter:("undefined"!=typeof XMLHttpRequest?th=af:"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(th=Kf),th),transformRequest:[function(e,t){return Yf(t,"Accept"),Yf(t,"Content-Type"),Jf.isFormData(e)||Jf.isArrayBuffer(e)||Jf.isBuffer(e)||Jf.isStream(e)||Jf.isFile(e)||Jf.isBlob(e)?e:Jf.isArrayBufferView(e)?e.buffer:Jf.isURLSearchParams(e)?(eh(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Jf.isObject(e)||t&&"application/json"===t["Content-Type"]?(eh(t,"application/json"),function(e,t,r){if(Jf.isString(e))try{return(t||JSON.parse)(e),Jf.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||rh.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&Jf.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw Xf(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Jf.forEach(["delete","get","head"],(function(e){rh.headers[e]={}})),Jf.forEach(["post","put","patch"],(function(e){rh.headers[e]=Jf.merge(Zf)}));var nh=rh,ih=El,oh=nh,ah=function(e){return!(!e||!e.__CANCEL__)},sh=El,ch=function(e,t,r){var n=this||oh;return ih.forEach(r,(function(r){e=r.call(n,e,t)})),e},uh=ah,lh=nh,fh=Gl;function hh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fh("canceled")}var dh=El,ph=function(e,t){t=t||{};var r={};function n(e,t){return dh.isPlainObject(e)&&dh.isPlainObject(t)?dh.merge(e,t):dh.isPlainObject(t)?dh.merge({},t):dh.isArray(t)?t.slice():t}function i(r){return dh.isUndefined(t[r])?dh.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function o(e){if(!dh.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return dh.isUndefined(t[r])?dh.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function s(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return dh.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,n=t(e);dh.isUndefined(n)&&t!==s||(r[e]=n)})),r},mh=Rf,gh={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){gh[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var vh={};gh.transitional=function(e,t,r){function n(e,t){return"[Axios v"+mh+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,o){if(!1===e)throw new Error(n(i," has been removed"+(t?" in "+t:"")));return t&&!vh[i]&&(vh[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var yh={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],c=void 0===s||a(s,o,e);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:gh},bh=El,wh=_l,xh=Fl,kh=function(e){return hh(e),e.headers=e.headers||{},e.data=ch.call(e,e.data,e.headers,e.transformRequest),e.headers=sh.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),sh.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||lh.adapter)(e).then((function(t){return hh(e),t.data=ch.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return uh(t)||(hh(e),t&&t.response&&(t.response.data=ch.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Eh=ph,Sh=yh,Ph=Sh.validators;function _h(e){this.defaults=e,this.interceptors={request:new xh,response:new xh}}_h.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Eh(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Sh.assertOptions(r,{silentJSONParsing:Ph.transitional(Ph.boolean),forcedJSONParsing:Ph.transitional(Ph.boolean),clarifyTimeoutError:Ph.transitional(Ph.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!i){var s=[kh,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),o=Promise.resolve(t);s.length;)o=o.then(s.shift(),s.shift());return o}for(var c=t;n.length;){var u=n.shift(),l=n.shift();try{c=u(c)}catch(e){l(e);break}}try{o=kh(c)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},_h.prototype.getUri=function(e){return e=Eh(this.defaults,e),wh(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},bh.forEach(["delete","get","head","options"],(function(e){_h.prototype[e]=function(t,r){return this.request(Eh(r||{},{method:e,url:t,data:(r||{}).data}))}})),bh.forEach(["post","put","patch"],(function(e){_h.prototype[e]=function(t,r,n){return this.request(Eh(n||{},{method:e,url:t,data:r}))}}));var Ch=_h,Ah=Gl;function Fh(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new Ah(e),t(r.reason))}))}Fh.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Fh.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},Fh.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},Fh.source=function(){var e;return{token:new Fh((function(t){e=t})),cancel:e}};var Dh=Fh,Rh=El,Th=El,Oh=dl,jh=Ch,Ih=ph;var Lh=function e(t){var r=new jh(t),n=Oh(jh.prototype.request,r);return Th.extend(n,jh.prototype,r),Th.extend(n,r),n.create=function(r){return e(Ih(t,r))},n}(nh);Lh.Axios=jh,Lh.Cancel=Gl,Lh.CancelToken=Dh,Lh.isCancel=ah,Lh.VERSION=Rf,Lh.all=function(e){return Promise.all(e)},Lh.spread=function(e){return function(t){return e.apply(null,t)}},Lh.isAxiosError=function(e){return Rh.isObject(e)&&!0===e.isAxiosError},hl.exports=Lh,hl.exports.default=Lh;var qh=hl.exports;function zh(e){return e}function Mh(e){var t=[];if(e)return Array.isArray(e)?e:("object"==typeof e&&Object.keys(e).forEach((function(r){"number"==typeof r&&(t[r]=e[r])})),t)}function Nh(e){if(qh.isCancel(e))return Promise.reject(e);var t=$h(e)||{};if(t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry="number"==typeof t.retry?t.retry:3,t.retryDelay="number"==typeof t.retryDelay?t.retryDelay:100,t.instance=t.instance||qh,t.backoffType=t.backoffType||"exponential",t.httpMethodsToRetry=Mh(t.httpMethodsToRetry)||["GET","HEAD","PUT","OPTIONS","DELETE"],t.noResponseRetries="number"==typeof t.noResponseRetries?t.noResponseRetries:2,t.checkRetryAfter="boolean"!=typeof t.checkRetryAfter||t.checkRetryAfter,t.maxRetryAfter="number"==typeof t.maxRetryAfter?t.maxRetryAfter:3e5,t.statusCodesToRetry=Mh(t.statusCodesToRetry)||[[100,199],[429,429],[500,599]],e.config=e.config||{},e.config.raxConfig=Object.assign({},t),!(t.shouldRetry||Bh)(e))return Promise.reject(e);var r=new Promise((function(r,n){var i=0;if(t.checkRetryAfter&&e.response&&e.response.headers["retry-after"]){var o=function(e){var t=Number(e);if(!Number.isNaN(t))return 1e3*t;var r=Date.parse(e);return Number.isNaN(r)?void 0:r-Date.now()}(e.response.headers["retry-after"]);if(!(o&&o>0&&o<=t.maxRetryAfter))return n(e);i=o}e.config.raxConfig.currentRetryAttempt+=1;var a=e.config.raxConfig.currentRetryAttempt;0===i&&(i="linear"===t.backoffType?1e3*a:"static"===t.backoffType?t.retryDelay:(Math.pow(2,a)-1)/2*1e3,"number"==typeof t.maxRetryDelay&&(i=Math.min(i,t.maxRetryDelay))),setTimeout(r,i)})),n=t.onRetryAttempt?Promise.resolve(t.onRetryAttempt(e)):Promise.resolve();return Promise.resolve().then((function(){return r})).then((function(){return n})).then((function(){return t.instance.request(e.config)}))}function Bh(e){var t=e.config.raxConfig;if(!t||0===t.retry)return!1;if(!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries)return!1;if(!e.config.method||t.httpMethodsToRetry.indexOf(e.config.method.toUpperCase())<0)return!1;if(e.response&&e.response.status){for(var r=!1,n=0,i=t.statusCodesToRetry;n<i.length;n+=1){var o=i[n],a=e.response.status;if(a>=o[0]&&a<=o[1]){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}function $h(e){if(e&&e.config)return e.config.raxConfig}var Uh=Object.freeze({__proto__:null,attach:function(e){return(e=e||qh).interceptors.response.use(zh,Nh)},detach:function(e,t){(t=t||qh).interceptors.response.eject(e)},shouldRetryRequest:Bh,getConfig:$h}),Vh=se(Uh);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=L.default,r=pr,n=Fr.exports,i=qr.exports,o=j.default,a=Mn,s=bi,c=wa,u=ac,l=fc,f=hc,h=jc,d=Ic,p=Lc,m=zc,g=Mc,v=M.default,y=Nc,b=Bc,w=$c,x=Uc,k=Vc,E=Hc,S=Qc,P=Gc,_=Jc,C=Yc,A=tu,F=wu,D=cl,R=ll,T=fl,O=qh,I=Vh,q=Tr.exports;function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var N=z(r),B=z(n),$=z(i),U=z(o),V=z(c),H=z(u),Q=z(l),W=z(v),G=z(F),K=z(D),J=z(O),Y=z(I),X=z(q);class Z{constructor(e,t,r,n){this.id=void 0,this.sha=void 0,this.summary=void 0,this._config=void 0,this.id=e,this.sha=n,this.summary=r,this.config=t}get config(){return this._config}set config(e){e.setKey(`${this.id}:config`),this._config=e}}Z.style=".topwrite/style.css",Z.logo="logo.png",Z.readme="README.md";function ee(e){return"string"==typeof e&&e.startsWith("@encrypted:")}function te(e,t){return B.default.encrypt(e,t).toString()}function re(e,t){try{return B.default.decrypt(e,t).toString($.default)}catch{return""}}var ne=Object.freeze({__proto__:null,encrypt:te,decrypt:re});class ie{constructor(e,t,r){this.key=void 0,this.values=void 0,this.schema=void 0,this.values=e,this.schema=t,this.key=r}setKey(e){this.key=e}getValues(){return this.values}setValues(e){const r=new N.default({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:"ignore"}).compile(this.schema);if(!r(e=t.cloneDeep(e)))for(const n of r.errors)e=t.omit(e,n.dataPath.substr(1).split("/"));this.values=e}getValue(e,r){return t.get(this.values,e,r)}setValue(e,r){return t.set(this.values,e,r)}toObject(){const e=new N.default({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:["color"]});e.removeKeyword("default"),e.addKeyword("default",{validate:(e,r,n,i,o,a,s)=>(t.isEqual(e,r)&&(delete o[a],t.isEmpty(o)&&function(e,r){const n=[];let i=e;for(let e=0;e<r.length-1;e++)n.push(i),i=i[r[e]];for(let e=r.length-2;e>=0;e--)t.isEmpty(n[e][r[e]])&&delete n[e][r[e]]}(s,t.toPath(i.substring(1)))),!0),modifying:!0,errors:!1}),e.addKeyword("encrypt",{validate:(e,r,n,i,o,a)=>(this.key&&e&&!ee(r)&&o&&a&&t.set(o,a,`@encrypted:${te(r,this.key)}`),!0),modifying:!0,errors:!1});const r=e.compile(this.schema),n=t.cloneDeep(this.values);return r(n),n}static createFromObject(e,r,n){const i=new N.default({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:["color"]});i.addKeyword("encrypt",{validate:(e,r,i,o,a,s)=>(n&&e&&ee(r)&&a&&s&&t.set(a,s,re(r.substring(11),n)),!0),modifying:!0,errors:!1});const o=i.compile(r);if(!o(e))for(const r of o.errors)e=t.omit(e,r.dataPath.substring(1).split("/"));return new this(e,r,n)}}class oe extends ie{constructor(){super(...arguments),this.pluginsConfig={},this.presetPlugins={}}setPresetPlugins(e){this.presetPlugins=e}getPlugins(){return Array.from(new Set([...this.getValue("plugins"),...Object.keys(this.presetPlugins)]))}getPluginConfig(e,r){if(!this.pluginsConfig[e]){const n=this.presetPlugins[e]?this.presetPlugins[e]:this.getValue(["pluginsConfig",e],{});this.pluginsConfig[e]=ie.createFromObject(t.cloneDeep(n),r,`${this.key}:${e}`)}return this.pluginsConfig[e]}setPluginConfig(e,r){const n=r.toObject();t.isEmpty(n)?t.unset(this.values,["pluginsConfig",e]):this.setValue(["pluginsConfig",e],n),delete this.pluginsConfig[e]}static createFromObject(e){return super.createFromObject(e,oe.schema)}}oe.file="book.json",oe.schema={title:"TopWrite Configuration",type:"object",properties:{root:{type:"string",title:"Path from the root folder containing the book's content"},title:{type:"string",title:"Title of the book"},author:{type:"object",title:"attr of the author",properties:{name:{type:"string"},email:{type:"string"},home:{type:"string"}}},theme:{type:"string",title:"Name of the theme",default:"default"},themeConfig:{type:"object",title:"Configuration for theme",properties:{defaultMode:{type:"string",title:"Default mode",default:"light"},primaryColor:{type:"string",title:"Primary Color",format:"color",default:"#3c60ff"},expandLevel:{type:"integer",title:"Expand level",default:0},navs:{type:"array",title:"Nav configures",items:{type:"object",properties:{title:{title:"Label",type:"string"},url:{title:"Link",type:"string"}},required:["title","url"],additionalProperties:!1},default:[]}},default:{}},plugins:{type:"array",items:{type:"string"},default:[]},pluginsConfig:{type:"object",title:"Configuration for plugins",default:{}},pdf:{type:"object",title:"PDF specific configurations",properties:{fontFamily:{type:"string",default:"Microsoft Yahei",title:"Font family for the PDF output"},margin:{type:"object",title:"Margins (unit: pt)",properties:{right:{type:"integer",title:"Right Margin",minimum:0,maximum:100,default:30},left:{type:"integer",title:"Left Margin",minimum:0,maximum:100,default:30},top:{type:"integer",title:"Top Margin",minimum:0,maximum:100,default:40},bottom:{type:"integer",title:"Bottom Margin",minimum:0,maximum:100,default:40}},default:{}},paperSize:{type:"string",enum:["a0","a1","a2","a3","a4","a5","a6","b0","b1","b2","b3","b4","b5","b6","legal","letter"],default:"a4",title:"Paper size for the PDF"},chapterMark:{type:"string",enum:["pagebreak","rule","both","none"],default:"pagebreak",title:"How to mark detected chapters"},pageBreaksBefore:{type:"string",default:"/",title:'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'},pageNumbers:{type:"boolean",default:!0,title:"Add page numbers to the bottom of every page"}},default:{}},release:{type:"object",title:"Release specific configurations",properties:{pathEncode:{type:"boolean",title:"Whether to encode the chapter path",default:!0}},default:{}}},required:[]};class ae{constructor(e){void 0===e&&(e=[]),this.data=void 0,this.data="string"==typeof e?e.split(".").map((e=>parseInt(e,10))):e}getRoot(){return new ae(this.data.slice(0,1))}getParent(){return new ae(this.data.slice(0,-1))}createChild(e){return new ae(this.data.concat(e))}isDescendant(e){return e.toString().startsWith(`${this.toString()}.`)}getNext(){const e=[...this.data];return e[e.length-1]++,new ae(e)}getDepth(){return this.data.length-1}eq(e){return this.toString()===e.toString()}getLeafIndex(){return this.data[this.data.length-1]-1}toString(e){return e?this.data.slice(e.data.length).join("."):this.data.join(".")}static compare(e,t){for(let r=0;r<Math.max(e.data.length,t.data.length);r++){let n=e.data[r]||0,i=t.data[r]||0;if(n>i)return 1;if(i>n)return-1}return 0}}class se{constructor(e){let{title:t,ref:r="",path:n,children:i=[],metadata:a}=e;this.level=void 0,this.title=void 0,this.ref=void 0,this.path=void 0,this.children=void 0,this.metadata=void 0,this.hasPath=!1,this.title=t,this.ref=r,n?(this.hasPath=!0,this.path=n):this.path=r?o.posix.format({...o.posix.parse(r),ext:".html",base:""}):"",this.children=i,this.level=new ae,this.metadata=a}getMetadata(e,r){return this.metadata?t.get(this.metadata,e,r):r}getLevel(){return this.level}getTitle(){return this.title}getRef(){return this.ref}getPath(){return this.path}getArticles(){return this.children}getDescendants(){const e=[];return se.findArticle(this,(t=>(e.push(t),!1))),e}getDepth(){return this.getLevel().getDepth()}createChildLevel(){return this.level.createChild(this.children.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.children.entries())r.indexLevels(e.createChild(t+1))}toObject(){const e=this.children.map((function(e){return e.toObject()}));return{title:this.title,ref:this.ref,path:this.hasPath?this.path:void 0,metadata:this.metadata,children:t.isEmpty(e)?void 0:e}}static findArticle(e,t){return e.getArticles().reduce(((e,r)=>e||(t(r)?r:se.findArticle(r,t))),void 0)}static createFromObject(e){const t=e.children?.filter((e=>!!e.title)).map((e=>se.createFromObject(e)));return new se({...e,children:t})}}class ce{constructor(e,t,r){void 0===t&&(t=[]),this.level=void 0,this.title=void 0,this.articles=void 0,this.metadata=void 0,this.level=new ae,this.title=e,this.articles=t,this.metadata=r}getMetadata(e,r){return this.metadata?t.get(this.metadata,e,r):r}getLevel(){return this.level}getTitle(){return this.title}getArticles(){return this.articles}getFirstArticle(){return se.findArticle(this,(()=>!0))}getDescendants(){const e=[];return se.findArticle(this,(t=>(e.push(t),!1))),e}createChildLevel(){return this.level.createChild(this.articles.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.articles.entries())r.indexLevels(e.createChild(t+1))}toObject(){const e=this.articles.map((function(e){return e.toObject()}));return{title:this.title,metadata:this.metadata,articles:t.isEmpty(e)?void 0:e}}static createFromObject(e){const t=e.articles?.filter((e=>!!e.title)).map((e=>se.createFromObject(e)));return new ce(e.title,t,e.metadata)}}const ue={tokenize:function(e,t,r){function n(t){return t===m.codes.rightParenthesis?f(t):w.factoryDestination(e,i,r,p.types.resourceDestination,p.types.resourceDestinationLiteral,p.types.resourceDestinationLiteralMarker,p.types.resourceDestinationRaw,p.types.resourceDestinationString,g.constants.linkResourceDestinationBalanceMax)(t)}function i(t){return x.markdownLineEndingOrSpace(t)?b.factoryWhitespace(e,o)(t):f(t)}function o(t){return t===m.codes.quotationMark||t===m.codes.apostrophe||t===m.codes.leftParenthesis?E.factoryTitle(e,b.factoryWhitespace(e,a),r,p.types.resourceTitle,p.types.resourceTitleMarker,p.types.resourceTitleString)(t):a(t)}function a(t){return t===m.codes.equalsTo?(e.enter("resourceSize"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),s):f(t)}function s(t){return t===m.codes.lowercaseX?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),u):t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeWidth"),e.enter(p.types.chunkString,{contentType:"string"}),c(t))}function c(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(p.types.chunkString),e.exit("resourceSizeWidth"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):t===m.codes.lowercaseX?(e.exit(p.types.chunkString),e.exit("resourceSizeWidth"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),u):(e.consume(t),c)}function u(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeHeight"),e.enter(p.types.chunkString,{contentType:"string"}),l(t))}function l(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(p.types.chunkString),e.exit("resourceSizeHeight"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.consume(t),l)}function f(n){return n===m.codes.rightParenthesis?(e.enter(p.types.resourceMarker),e.consume(n),e.exit(p.types.resourceMarker),e.exit(p.types.resource),t):r(n)}return function(t){return e.enter(p.types.resource),e.enter(p.types.resourceMarker),e.consume(t),e.exit(p.types.resourceMarker),b.factoryWhitespace(e,n)}}},le={tokenize:function(e,t,r){const n=this;function i(e){return n.parser.defined.includes(y.normalizeIdentifier(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}return function(t){return W.default.strictEqual(t,m.codes.leftSquareBracket,"expected left bracket"),k.factoryLabel.call(n,e,i,r,p.types.reference,p.types.referenceMarker,p.types.referenceString)(t)}}},fe={tokenize:function(e,t,r){function n(n){return 93===n?(e.enter(p.types.referenceMarker),e.consume(n),e.exit(p.types.referenceMarker),e.exit(p.types.reference),t):r(n)}return function(t){return e.enter(p.types.reference),e.enter(p.types.referenceMarker),e.consume(t),e.exit(p.types.referenceMarker),n}}};var he={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if((n.events[a][1].type===p.types.labelImage||n.events[a][1].type===p.types.labelLink)&&!n.events[a][1]._balanced){i=n.events[a][1];break}function s(e){return i._balanced=!0,r(e)}function c(r){return r===m.codes.leftParenthesis?e.attempt(ue,t,o?t:s)(r):r===m.codes.leftSquareBracket?e.attempt(le,t,o?e.attempt(fe,t,s):s)(r):o?t(r):s(r)}return function(t){return W.default(t===m.codes.rightSquareBracket,"expected `]`"),i?i._inactive?s(t):(o=n.parser.defined.indexOf(y.normalizeIdentifier(n.sliceSerialize({start:i.end,end:n.now()})))>-1,e.enter(p.types.labelEnd),e.enter(p.types.labelMarker),e.consume(t),e.exit(p.types.labelMarker),e.exit(p.types.labelEnd),c):r(t)}},resolveTo:d.labelEnd.resolveTo,resolveAll:d.labelEnd.resolveAll};const de=(e,t,r,n)=>{const i=h.image(e,t,r,n);return e.width||e.height?i.replace(/\)$/,` =${e.width||""}${e.height?`x${e.height}`:""})`):i};de.peek=h.image.peek;const pe=e=>{let t;switch(e){case"right":t="--: ";break;case"center":t=":-: ";break;default:t=""}return t},me={tokenize:function(e,t,r){function n(t){return t===m.codes.rightSquareBracket?r(t):(e.enter("blockQuoteType"),e.enter(p.types.chunkString,{contentType:"string"}),i(t))}function i(t){return t===m.codes.rightSquareBracket?(e.exit(p.types.chunkString),e.exit("blockQuoteType"),e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),o):x.markdownLineEndingOrSpace(t)||!x.asciiAlpha(t)?r(t):(e.consume(t),i)}function o(e){return e===m.codes.leftParenthesis?r(e):t(e)}return function(t){return e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),n}},partial:!0},ge={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(t===m.codes.greaterThan){const r=n.containerState;return W.default(r,"expected `containerState` to be defined in container"),r.open||(e.enter(p.types.blockQuote,{_container:!0}),r.open=!0),e.enter(p.types.blockQuotePrefix),e.enter(p.types.blockQuoteMarker),e.consume(t),e.exit(p.types.blockQuoteMarker),C.factorySpace(e,i,p.types.whitespace)}return r(t)};function i(t){return t===m.codes.leftSquareBracket?e.attempt(me,o,o)(t):o(t)}function o(r){return x.markdownSpace(r)?(e.enter(p.types.blockQuotePrefixWhitespace),e.consume(r),e.exit(p.types.blockQuotePrefixWhitespace),e.exit(p.types.blockQuotePrefix),t):(e.exit(p.types.blockQuotePrefix),t(r))}},continuation:{tokenize:function(e,t,r){return C.factorySpace(e,e.attempt(ge,t,r),p.types.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:g.constants.tabSize)}},exit:d.blockQuote.exit},ve="blankLine",ye="blankLineSequence",be={name:"blankLine",tokenize:(e,t,r)=>{let n;const i=t=>t===n?(e.consume(t),i):(e.exit(ye),o(t)),o=a=>a===n?(e.enter(ye),i(a)):x.markdownSpace(a)?C.factorySpace(e,o,p.types.whitespace)(a):a===m.codes.eof||x.markdownLineEnding(a)?(e.exit(ve),t(a)):r(a);return t=>(W.default(t===m.codes.caret,"expected `^`"),e.enter(ve),n=t,o(t))}},we=function(e,t){void 0===t&&(t="text");let r="";return S.visit(e,t,(function(e){r+=e.value})),r},xe=/^\[toc(?:=(\d)(?:,(\d))?)?]$/im,ke=s.unified().use(V.default).use((function(){const e=this.data();e.micromarkExtensions=[],e.fromMarkdownExtensions=[],e.toMarkdownExtensions=[],e.toHastExtensions=[]})).use(K.default).use(G.default,["yaml"]).use(H.default).use(Q.default).use(R.remarkHeadingId).use((function(){return this.data().toHastExtensions.push({xBlock:(e,t)=>e({},"x-block",{name:t.name,value:t.value,parameter:t.parameter}),xInline:(e,t)=>e({},"x-inline",{name:t.name,value:t.value})}),function(e){S.visit(e,((e,t,r)=>{if(null!==t&&null!==r)if((e=>"code"===e.type)(e)&&e.lang){const n=/\[([\w-_]+)(:([\w-_]+))?]/g.exec(e.lang);if(n){const i={type:"xBlock",name:n[1],parameter:n[3]||"",value:e.value,position:e.position};r.children.splice(t,1,i)}}else if((e=>"inlineCode"===e.type)(e)){const n=/^([^\s]+)\s(.*?)\s\1$/.exec(e.value);if(n){const i={type:"xInline",name:n[1],value:n[2],position:e.position};r.children.splice(t,1,i)}}}))}})).use((function(){const e=this.data();e.micromarkExtensions.push({text:{[m.codes.rightSquareBracket]:he}}),e.fromMarkdownExtensions.push({enter:{resourceSizeWidth:function(){this.buffer()},resourceSizeHeight:function(){this.buffer()}},exit:{resourceSizeWidth:function(){const e=this.resume();this.stack[this.stack.length-1].width=e},resourceSizeHeight:function(){const e=this.resume();this.stack[this.stack.length-1].height=e}}}),e.toMarkdownExtensions.push({handlers:{image:de}}),e.toHastExtensions.push({image:(e,t)=>{const r={src:f.encode(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(r.title=t.title),r.width=t.width,r.height=t.height,e(t,"img",r)}})})).use((function(){return this.data().toMarkdownExtensions.push({handlers:{paragraph:(e,t,r,n)=>{const i=P.paragraph(e,t,r,n);return pe(e.align)+i},heading:(e,t,r,n)=>_.heading(e,t,r,n).replace(/^#+\s/,`$&${pe(e.align)}`)}}),function(e){S.visit(e,((e,t,r)=>{if((e=>"paragraph"===e.type||"heading"===e.type)(e)){const t=a.select("text",e);if(t){const n=t.value;n.startsWith("--: ")?e.align="right":n.startsWith(":-: ")?e.align="center":n.startsWith(":-- ")&&(e.align="left"),e.align&&(t.value=n.substr(4),r&&"listItem"===r.type?r.data={...r.data,hProperties:{className:`align-${e.align}`}}:e.data={...e.data,hProperties:{className:`align-${e.align}`}})}}}))}})).use((function(){const e=this.data();return e.toMarkdownExtensions.push({handlers:{blockquote:(e,t,r,n)=>{const i=A.blockquote(e,t,r,n);return e.variant?i.replace(/(^|\s+)>\s/,`$1> [${e.variant}] `):i}}}),e.micromarkExtensions.push({document:{[m.codes.greaterThan]:ge}}),e.fromMarkdownExtensions.push({enter:{blockQuoteType:function(){this.buffer()}},exit:{blockQuoteType:function(){const e=this.resume();this.stack[this.stack.length-1].variant=e}}}),function(e){S.visit(e,"blockquote",(e=>{e.variant&&(e.data={...e.data,hProperties:{className:e.variant}})}))}})).use((function(){const e=this.data();e.toHastExtensions.push({blankLine:e=>e({},"p",[e({},"br")])}),e.micromarkExtensions.push({flow:{[m.codes.caret]:be}}),e.toMarkdownExtensions.push({handlers:{blankLine:()=>"^"}}),e.fromMarkdownExtensions.push({enter:{blankLine:function(e){this.enter({type:"blankLine"},e)}},exit:{blankLine:function(e){this.exit(e)}}})})).use((function(){return function(e){S.visit(e,((e,t,r)=>{if(r&&"root"===r.type&&null!==t&&we(e).match(xe))return r.children.splice(t,1),[S.SKIP,t]}))}}));function Ee(e){const t=[];for(const r of e.children){const e=r.children,n=a.select("paragraph:first-child>*",r);if(!n)continue;const i=we(n);if(!i)continue;let o="";n.url&&(o=decodeURI(n.url),o.match(/[\\:*?"<>|]/)&&(o=""));let s={title:i,ref:o};if(e.length>1){const t=e[e.length-1];T.is(t,"list")&&(s.children=Ee(t))}t.push(s)}return t}const Se=ke();class Pe{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=!1),this.parts=void 0,this.json=void 0,this.parts=e,this.json=t,this.indexLevels()}hasMetadata(){let e=!1;return this.getArticle((r=>!!e||!t.isEmpty(r.metadata)&&(e=!0,!0)),(r=>(t.isEmpty(r.metadata)||(e=!0),!0))),e}isJson(){return this.json}getParts(){return this.parts}getPart(e){return this.parts[e]}getLastPart(){return this.parts[this.parts.length-1]}getArticles(){const e=[];return this.getArticle((t=>(e.push(t),!1))),e}getArticle(e,t){return this.parts.reduce(((r,n)=>r||(!t||t(n)?se.findArticle(n,e):void 0)),void 0)}getArticlePart(e){const t=e.getLevel().getRoot();return this.getByLevel(t)}getFirstPath(){const e=this.getArticle((e=>!!e.getPath()));if(e)return e.getPath()}getByLevel(e){const t=t=>t.getLevel().eq(e);return this.parts.reduce(((e,r)=>e||(t(r)?r:se.findArticle(r,t))),void 0)}getFirstArticle(){return this.getArticle((()=>!0))}getNextArticle(e){const t=e instanceof se?e.getLevel():e;let r=!1;return this.getArticle((e=>!!r||(r=e.getLevel()==t,!1)))}getPrevArticle(e){const t=e instanceof se?e.getLevel():e;let r;return this.getArticle((e=>e.getLevel()==t||(r=e,!1))),r}getParent(e){const t=(e instanceof se?e.getLevel():e).getParent();if(t)return this.getByLevel(t)}indexLevels(){for(const[e,t]of this.parts.entries()){const r=new ae(String(e+1));t.indexLevels(r)}}isSinglePart(){return 1===this.parts.length&&!this.parts[0].title}isEmpty(){return this.isSinglePart()?0===this.parts[0].articles.length:0===this.parts.length}toObject(){return this.parts.map((function(e){return e.toObject()}))}static createFromObject(e){return new Pe(e.map((e=>ce.createFromObject(e))),!0)}static createFromText(e){const t=function(e){const t=Se.parse(e),r=[];let n;for(const e of t.children)if(T.is(e,"heading")&&[2,3].includes(e.depth)&&(n&&r.push(n),n={title:we(e).trim()}),T.is(e,"list")){const t=Ee(e);n?n.articles=(n.articles||[]).concat(t):n={title:"",articles:t}}return n?r.push(n):r.push({title:""}),r}(e);return new Pe(t.map((e=>ce.createFromObject(e))))}static create(e){return"object"==typeof e?Pe.createFromObject(e):Pe.createFromText(e)}}Pe.file={json:"SUMMARY.json",markdown:"SUMMARY.md"};class _e{constructor(e){let{host:t,preset:r}=e;this.host=void 0,this.preset=void 0,this.host=t,this.preset=r}getBuyUrl(e,t){return`${this.host}/api/buy?book=${e.id}&plugin=${t.name}`}async bought(e,t){try{return await J.default.get(`${this.host}/api/bought?book=${e.id}&plugin=${t.name}`),!0}catch{return!1}}async trial(e,t){try{const{data:r}=await J.default.get(`${this.host}/api/trial?book=${e.id}&plugin=${t.name}`);return r}catch{return!1}}async queryPlugins(e){let{page:t=1,...r}=e;const{data:n}=await J.default.get(`${this.host}/api/query`,{params:{...r,page:t}});return n}async getInstalled(e){const{config:t}=e,r=[`theme-${t.getValue("theme")}`,...t.getValue("plugins")];this.preset&&(r.push(...Object.keys(this.preset)),t.setPresetPlugins(this.preset));const{data:n}=await J.default.get(`${this.host}/api/installed`,{params:{book:e.id,plugins:r.join(",")}}).catch((e=>{throw new Error("Plugins Check Failed:"+e.message)}));return n.flatMap((e=>!e.builtin||this.preset?.[e.name]?(e.preset=!!this.preset?.[e.name],[e]):[]))}}e.pluginCenter=void 0;class Ce{constructor(e,t,r){this.flatColors=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#f39c12","#d35400","#c0392b"],this.letter=void 0,this.size=void 0,this.canvas=void 0,this.letter=e,this.size=t,this.canvas=r,this.generate()}toDataUrl(){return this.canvas.toDataURL()}generate(){const e=this.canvas.getContext("2d");if(!e)throw new Error("getContext failed");const t=this.size/10;if(e.beginPath(),e.arc(this.size-t,this.size-t,t,0,Math.PI/2),e.lineTo(t,this.size),e.arc(t,this.size-t,t,Math.PI/2,Math.PI),e.lineTo(0,t),e.arc(t,t,t,Math.PI,3*Math.PI/2),e.lineTo(this.size-t,0),e.arc(this.size-t,t,t,3*Math.PI/2,2*Math.PI),e.lineTo(this.size,this.size-t),e.closePath(),this.letter.length>0){const t=this.letter[0].toUpperCase();e.fillStyle=this.flatColors[t.charCodeAt(0)%this.flatColors.length],e.fill(),e.restore(),e.font=Math.round(this.size/2)+"px Roboto",e.textAlign="center",e.fillStyle="#FFFFFF",e.fillText(this.letter[0].toUpperCase(),this.size/2,this.size/1.5)}else e.fillStyle=this.flatColors[0],e.fill()}static create(e,t,r){return r||(r=function(e){const t=window.document.createElement("canvas");return t.width=e,t.height=e,t}(t)),new Ce(e,t,r)}}const Ae=/^(?:\w+:)?\/\/(\S+)$/,Fe=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,De=/^[^\s\.]+\.\S{2,}$/;Y.default.attach(),J.default.defaults.raxConfig={retryDelay:2e3,backoffType:"static",shouldRetry:e=>{let{config:t,response:r}=e;const n=t.raxConfig||{};return!(n?.retryDecider&&!n.retryDecider()||!t.method||!n.httpMethodsToRetry?.includes(t.method.toUpperCase())||449!==r?.status)}},J.default.defaults.maxContentLength=1/0,J.default.defaults.maxBodyLength=1/0;const Re=J.default.isAxiosError;Object.defineProperty(e,"request",{enumerable:!0,get:function(){return J.default}}),e.BaseConfig=ie,e.Book=Z,e.Config=oe,e.File=class{constructor(e){let{path:t,content:r,meta:n={}}=e;this.path=void 0,this.content=void 0,this.meta=void 0,this.path=t,this.content=r,this.meta=n}getMeta(e,r){return t.get(this.meta,e,r)}relative(e){const t="/"===e.slice(-1);return(e=U.default.posix.relative(U.default.posix.dirname(this.path),e)||".")+(t?"/":"")}resolve(e){return U.default.posix.join(U.default.posix.dirname(this.path),e)}},e.LetterAvatar=Ce,e.Level=ae,e.Summary=Pe,e.SummaryArticle=se,e.SummaryPart=ce,e.aes=ne,e.createPluginCenter=function(t){return e.pluginCenter=new _e(t)},e.isEncryptedData=ee,e.isRequestError=Re,e.isUrl=function(e){const t=e.match(Ae);if(!t)return!1;const r=t[1];return!!r&&(Fe.test(r)||De.test(r))},e.markdown=ke,e.md5=function(e){return X.default(e).toString()}}(ce);class Hh{name;version;path;hooks;config;constructor({name:e,version:t,path:r,hooks:n,config:i}){this.name=e,this.version=t,this.path=r,this.hooks=n,this.config=i}getHook(e){return this.hooks[e]}getContext(e){return{...e,getConfig:()=>e.book.config.getPluginConfig(this.name,this.config)}}}async function Qh(e,t){oe.info(`installing plugin "${e.name}"`);const r=`npm install ${e.host}.tgz`,{error:n}=V.default.sync(r,{stdio:["inherit"],cwd:t,shell:!0});if(n)throw n;const i=j.default.join(t,"node_modules","topwrite-plugin-"+e.name),o=j.default.join(i,"dist","hooks.js");let a={};if(H.existsSync(o)){a=new p.NodeVM({require:{builtin:["path/posix","crypto"]},sandbox:{URL:URL,URLSearchParams:URLSearchParams}}).runFile(o)}const s=j.default.join(i,"config.json");let c={};return H.existsSync(s)&&(c=require(s)),oe.info(`plugin "${e.name}@${e.version}" installed with success`),new Hh({name:e.name,version:e.version,path:i,hooks:a,config:c})}const Wh=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/;class Gh{book;sourceFS;tmpFS;dest;version;options;plugins=[];constructor(e,t,r,n,i,o){this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i,this.version=o}getContext(){return{book:this.book,sourceFS:this.sourceFS,tmpFS:this.tmpFS,request:ce.request,logger:oe,format:this.format}}async generate(){await this.initLfs(),await this.initPlugins(),await this.onInit(),await this.callHook("init"),await this.checkStyle(),await this.generateLogo(),await this.onReadme(),await this.callHook("readme"),await this.generateArticles(),await this.callHook("articles"),await this.onSummary(),await this.callHook("summary"),await this.callHook("beforeFinish")&&(await this.onFinish(),await this.callHook("finish")),oe.success("generation finished with success!")}async checkStyle(){this.tmpFS.exist(ce.Book.style)||await this.tmpFS.writeFile(ce.Book.style,"")}async initLfs(){if(this.options.lfs){oe.info("generate lfs files...");let e="git lfs ls-files -l";const{config:t}=this.book,r=t.getValue("root","");r&&(e+=` --include ${r}`);const{error:n,stdout:i}=V.default.sync(e,{stdio:["inherit"],encoding:"utf8",cwd:this.sourceFS.root,shell:!0}),o={};n||i.trim().split("\n").forEach((e=>{if(e){const[t,n]=e.trim().split(/\s[-*]\s/);if(t&&n){let e=n.trim();r&&(e=j.default.relative(r,e)),o[e]=t.trim(),this.tmpFS.unlink(e)}}})),this.options.lfs.files=o,oe.info(`found ${Object.keys(o).length} files`)}}async initPlugins(){this.plugins=await async function(e,t,r){const n=ce.createPluginCenter(r),i=await n.getInstalled(e),o=[],a=e.config.getValue("theme");oe.info(`installing ${i.length} plugins from registry`);for(let e of i){if(e.disabled)throw new Error('plugin "'+e.name+'" has been disabled');"theme"===e.type||"ebook"!==a||e.ebook?o.push(await Qh(e,t)):oe.info(`plugin "${e.name}" ignored in ebook`)}return o}(this.book,this.tmpFS.root,this.options.plugins)}async generateLogo(){if(!this.tmpFS.exist(ce.Book.logo)){const e=this.book.config.getValue("title","Untitled"),t=g.createCanvas(60,60);ce.LetterAvatar.create(e,60,t);const r=t.toBuffer("image/png");await this.tmpFS.writeFile(ce.Book.logo,r)}}async generateArticles(){oe.info("generate articles ...");const e=this.book.summary.getArticles();oe.info(`found ${e.length} articles`);for(const t of e)if(t.ref){oe.info('generate article "'+t.getRef()+'"');try{await this.onArticle(t),await this.callHook("article",t)}catch(e){"ENOENT"===e.code?oe.warn(`article file [${t.ref}] not exist`):oe.warn(`generate article [${t.ref}] failed: ${e.message}`)}}}async callHook(e,...t){return oe.debug('calling hook "'+e+'"'),await(async(e,t)=>{for(let r of e)if(!await t(r))return!1;return!0})(this.plugins,(async r=>{const n=r.getHook(e);return!n||await n.apply(r.getContext(this.getContext()),t)}))}async makeFile(e){const t=await this.tmpFS.readAsString(e.ref),r=this.parseFileMeta(e.ref,t);return new ce.File({path:e.path,...r})}parseFileMeta(e,t){const r=t.match(Wh);let n={};if(r){if(void 0!==r[2])try{n=W.default.load(r[2])||{}}catch{}t=void 0!==r[3]?r[3]:""}const i=j.default.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(i),{meta:n,content:t}}}class Kh extends Gh{format="json";scripts=[];async onInit(){this.processSummary(),await this.installCommonAssets(),await this.installReader(),await this.copyPluginsAssets()}processSummary(){this.book.summary.getArticle((e=>(this.book.config.getValue(["release","pathEncode"],!0)&&(e.path=y.pinyin(e.path,{toneType:"none",nonZh:"consecutive",type:"array",v:!0}).join("")),e.hasPath=!0,!1)))}async installCommonAssets(){oe.info("installing common assets ..."),await this.installPackage("lodash","lodash.min.js","lodash/lodash.min.js"),await this.installPackage("react","umd/react.production.min.js","react/react.production.min.js"),await this.installPackage("react-dom","umd/react-dom.production.min.js","react-dom/react-dom.production.min.js"),oe.info("common assets installed with success")}async installReader(){oe.info("installing package @topwrite/reader ...");const e=await this.installPackage("@topwrite/reader","dist/","reader");oe.info(`package @topwrite/reader@${e.version} installed with success`)}async installPackage(e,t,r){const n=require.resolve(`${e}/package.json`),i=require(n);if(this.useCdn())t.endsWith("/")&&(t=`${t}index.js`),this.scripts.push(`https://jsdelivr.topthink.com/npm/${e}@${i.version}/${t}`);else{const e=j.default.join(j.default.dirname(n),t),o=j.default.join(this.tmpFS.root,"asset",r);await G.default.copy(e,o),t.endsWith("/")&&(r=`${r}/index.js`),this.scripts.push(`asset/${r}?v=${i.version}`)}return i}async copyPluginsAssets(){for(const e of this.plugins)if(this.useCdn()){const t=this.options.plugins.host;this.scripts.push(`${t}/plugins/${e.name}/${e.version}/dist/index.js`)}else await G.default.copy(j.default.join(e.path,"dist"),j.default.join(this.tmpFS.root,"asset","plugins",e.name)),this.scripts.push(`asset/plugins/${e.name}/index.js?v=${e.version}`)}useCdn(){return"cdn"===this.options.asset}async onReadme(){const e=await this.makeFile({path:"index.html",ref:"README.md"});await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html.json",this.stringify(e))}async onArticle(e){const t=e.path+".json";if(!this.tmpFS.exist(t)){const r=await this.makeFile(e);e.metadata={...r.meta,...e.metadata},await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(t,this.stringify(r))}}async onSummary(){const e=this.book.summary;await this.tmpFS.unlink(ce.Summary.file.json),await this.tmpFS.unlink(ce.Summary.file.markdown),await this.tmpFS.writeFile(ce.Summary.file.json,this.stringify(e.toObject()));const t={id:this.book.id,sha:this.book.sha,lfs:this.options.lfs,scripts:this.scripts,poweredBy:this.options.poweredBy,mtime:this.sourceFS.readFileMTime()};await this.tmpFS.writeFile("context.json",this.stringify(t))}async onFinish(){await this.packBook()}async packBook(){oe.info("pack book ...");const e=G.default.createWriteStream(this.dest);await this.tmpFS.archive(e,"tar")}stringify(e){return JSON.stringify(e,null,4)}}class Jh{root;constructor(e){this.root=e}readFileMTime(e=""){const t=`git log --pretty=format:%cI -1 -- ${e}`,{error:r,stdout:n}=V.default.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0});if(!r)return n||void 0}createReadStream(e,t){return G.default.createReadStream(this.resolve(e),t)}async readFile(e){return await G.default.readFile(this.resolve(e))}async readAsObject(e,t={}){try{return await G.default.readJSON(this.resolve(e))}catch{return t}}async readAsString(e){try{return await G.default.readFile(this.resolve(e),"utf-8")}catch{return""}}async writeFile(e,t){return e=this.resolve(e),G.default.ensureDirSync(j.default.dirname(e)),G.default.writeFile(e,t)}createWriteStream(e,t){return e=this.resolve(e),G.default.ensureDirSync(j.default.dirname(e)),G.default.createWriteStream(e,t)}async appendFile(e,t){return G.default.appendFile(this.resolve(e),t)}exist(e){return G.default.pathExistsSync(this.resolve(e))}async unlink(e){try{await G.default.unlink(this.resolve(e))}catch{}}async readDir(e=""){const t=[];return new Promise((r=>{K.default({path:this.resolve(e),ignoreFiles:[".gitignore",".bookignore"]}).on("child",(function(e){t.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(()=>{r(t)}))}))}resolve(...e){return j.default.join(this.root,...e)}async archive(e,t="tar"){if("tar"==t)return new Promise(((t,r)=>{x.pack(this.root,{fromBase:!0,ignoreFiles:[".gitignore",".bookignore"]}).pipe(e).on("error",(e=>{r(e)})).on("close",(()=>{t()}))}));{const r=await this.readDir();return new Promise(((n,i)=>{e.on("error",(e=>{i(e)})),e.on("close",(()=>{n()}));const o=J.default(t,{gzip:!0,gzipOptions:{level:9},zlib:{level:9}});o.pipe(e);for(const e of r)"File"===e.type&&o.append(this.createReadStream(e.path),{name:e.path});o.finalize()}))}}}class Yh extends Kh{template;format="html";async onInit(){await super.onInit(),await this.initTemplate()}async initTemplate(){const e=await G.default.readFile(j.default.resolve(__dirname,"../templates/html.ejs"),"utf-8");this.template=Y.default.compile(e)}useCdn(){return!1}async onReadme(){const e=await this.makeFile({path:"index.html",ref:"README.md"}),t=await this.renderFile(e);await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html",t)}async onArticle(e){if(!this.tmpFS.exist(e.path)){const t=await this.makeFile(e);e.metadata={...t.meta,...e.metadata};const r=await this.renderFile(t,e.title);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(e.path,r)}}async onSummary(){await this.tmpFS.unlink(ce.Summary.file.json),await this.tmpFS.unlink(ce.Summary.file.markdown)}async renderFile(e,t){const r={id:this.book.id,sha:this.book.sha,summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:e,lfs:this.options.lfs,options:{poweredBy:this.options.poweredBy}},n=this.scripts.map((t=>ce.isUrl(t)?t:e.relative(t))),i=this.book.config.getValue("title","Untitled"),o=e.getMeta("title",t);return this.template({title:(o?`${o} - `:"")+i,keywords:e.getMeta("keywords"),description:e.getMeta("description"),scripts:n,payload:JSON.stringify(r).replace(/\//g,"\\/")})}}const Xh=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));class Zh extends X.default.ResourceLoader{async fetch(e,t){const{element:r}=t;return r&&"IMG"===r.nodeName?null:super.fetch(e,t)}}const ed=/\s+at.*[(\s](.*)\)?/,td=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,rd=void 0===ee.default.homedir?"":ee.default.homedir().replace(/\\/g,"/");class nd extends Error{#e;name="AggregateError";constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t=(e=e.map((e=>e instanceof Error?e:null!==e&&"object"==typeof e?Object.assign(new Error(e.message),e):new Error(e)))).map((e=>{return"string"==typeof e.stack&&e.stack.length>0?(t=function(e,{pretty:t=!1,basePath:r}={}){const n=r&&new RegExp(`(at | \\()${Za(r.replace(/\\/g,"/"))}`,"g");if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(ed);if(null===t||!t[1])return!0;const r=t[1];return!(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")||r.includes("node_modules/electron/dist/resources/electron.asar")||r.includes("node_modules/electron/dist/resources/default_app.asar")||td.test(r))})).filter((e=>""!==e.trim())).map((e=>(n&&(e=e.replace(n,"$1")),t&&(e=e.replace(ed,((e,t)=>e.replace(t,t.replace(rd,"~"))))),e))).join("\n")}(e.stack),t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"")):String(e);var t})).join("\n");t="\n"+function(e,t=1,r={}){const{indent:n=" ",includeEmptyLines:i=!1}=r;if("string"!=typeof e)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if("number"!=typeof t)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if("string"!=typeof n)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(0===t)return e;const o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,n.repeat(t))}(t,4),super(t),this.#e=e}get errors(){return this.#e.slice()}}class id extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const od=e=>void 0===globalThis.DOMException?new id(e):new DOMException(e),ad=e=>{const t=void 0===e.reason?od("This operation was aborted."):e.reason;return t instanceof Error?t:od(t)};const sd=Symbol("skip");function cd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var ud=te.default,ld=process.cwd,fd=null,hd=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return fd||(fd=ld.call(process)),fd};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var dd=process.chdir;process.chdir=function(e){fd=null,dd.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,dd)}var pd=function(e){ud.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,ud.O_WRONLY|ud.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,ud.O_WRONLY|ud.O_SYMLINK,r),o=!0;try{n=e.fchmodSync(i,r),o=!1}finally{if(o)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){ud.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,n,i){e.open(t,ud.O_SYMLINK,(function(t,o){t?i&&i(t):e.futimes(o,r,n,(function(t){e.close(o,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,o=e.openSync(t,ud.O_SYMLINK),a=!0;try{i=e.futimesSync(o,r,n),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}):e.futimes&&(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=n(e.chown),e.fchown=n(e.fchown),e.lchown=n(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=a(e.statSync),e.fstatSync=a(e.fstatSync),e.lstatSync=a(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===hd&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,n,i){var o=Date.now(),a=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(n,(function(e,o){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),a),void(a<100&&(a+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename));function t(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){s(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function r(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!s(e))throw e}}:t}function n(t){return t?function(r,n,i,o){return t.call(e,r,n,i,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function i(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(r,n,i){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,o):t.call(e,r,o)}:t}function a(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function r(r,n,i,o,a,s){var c;if(s&&"function"==typeof s){var u=0;c=function(l,f,h){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,r,n,i,o,a,c);s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,r,n,i,o){for(var a=0;;)try{return c.call(e,t,r,n,i,o)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}});var c};var md=$.default.Stream,gd=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);md.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var o=Object.keys(n),a=0,s=o.length;a<s;a++){var c=o[a];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);md.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),o=0,a=i.length;o<a;o++){var s=i[o];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var vd=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:yd(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},yd=Object.getPrototypeOf||function(e){return e.__proto__};var bd,wd,xd=Q.default,kd=pd,Ed=gd,Sd=vd,Pd=re.default;function _d(e,t){Object.defineProperty(e,bd,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(bd=Symbol.for("graceful-fs.queue"),wd=Symbol.for("graceful-fs.previous")):(bd="___graceful-fs.queue",wd="___graceful-fs.previous");var Cd=function(){};if(Pd.debuglog?Cd=Pd.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Cd=function(){var e=Pd.format.apply(Pd,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!xd[bd]){var Ad=ae[bd]||[];_d(xd,Ad),xd.close=function(e){function t(t,r){return e.call(xd,t,(function(e){e||Od(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,wd,{value:e}),t}(xd.close),xd.closeSync=function(e){function t(t){e.apply(xd,arguments),Od()}return Object.defineProperty(t,wd,{value:e}),t}(xd.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Cd(xd[bd]),M.default.equal(xd[bd].length,0)}))}ae[bd]||_d(ae,xd[bd]);var Fd,Dd=Rd(Sd(xd));function Rd(e){kd(e),e.gracefulify=Rd,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,o){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):Td([e,[r,n,i],t,o||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,o,a){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):Td([e,[t,n,i,o],r,a||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,o,a){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):Td([e,[t,r,i,o],n,a||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,o,a){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof o&&o.apply(this,arguments):Td([e,[t,r,n,o],i,a||Date.now(),Date.now()])}))}(e,t,r,n)});var o=e.readdir;e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);var n=a.test(process.version)?function(e,t,r,n){return o(e,i(e,t,r,n))}:function(e,t,r,n){return o(e,t,i(e,t,r,n))};return n(e,t,r);function i(e,t,r,i){return function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(a&&a.sort&&a.sort(),"function"==typeof r&&r.call(this,o,a)):Td([n,[e,t,r],o,i||Date.now(),Date.now()])}}};var a=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=Ed(e);h=s.ReadStream,d=s.WriteStream}var c=e.ReadStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var u=e.WriteStream;u&&(d.prototype=Object.create(u.prototype),d.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var l=h;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=d;function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function d(e,t){return this instanceof d?(u.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var p=e.open;function m(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,o){return p(t,r,n,(function(a,s){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof i&&i.apply(this,arguments):Td([e,[t,r,n,i],a,o||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=m,e}function Td(e){Cd("ENQUEUE",e[0].name,e[1]),xd[bd].push(e),jd()}function Od(){for(var e=Date.now(),t=0;t<xd[bd].length;++t)xd[bd][t].length>2&&(xd[bd][t][3]=e,xd[bd][t][4]=e);jd()}function jd(){if(clearTimeout(Fd),Fd=void 0,0!==xd[bd].length){var e=xd[bd].shift(),t=e[0],r=e[1],n=e[2],i=e[3],o=e[4];if(void 0===i)Cd("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){Cd("TIMEOUT",t.name,r);var a=r.pop();"function"==typeof a&&a.call(null,n)}else{var s=Date.now()-o,c=Math.max(o-i,1);s>=Math.min(1.2*c,100)?(Cd("RETRY",t.name,r),t.apply(null,r.concat([i]))):xd[bd].push(e)}void 0===Fd&&(Fd=setTimeout(jd,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!xd.__patched&&(Dd=Rd(xd),xd.__patched=!0);var Id=Dd;const Ld=ee.default.homedir(),{env:qd}=process,zd=qd.XDG_DATA_HOME||(Ld?j.default.join(Ld,".local","share"):void 0),Md=qd.XDG_CONFIG_HOME||(Ld?j.default.join(Ld,".config"):void 0);qd.XDG_STATE_HOME||Ld&&j.default.join(Ld,".local","state"),qd.XDG_CACHE_HOME||Ld&&j.default.join(Ld,".cache"),qd.XDG_RUNTIME_DIR;const Nd=(qd.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");zd&&Nd.unshift(zd);const Bd=(qd.XDG_CONFIG_DIRS||"/etc/xdg").split(":");Md&&Bd.unshift(Md);var $d={exports:{}},Ud={exports:{}};
9
9
  /**
10
10
  * @preserve
11
11
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
@@ -17,4 +17,4 @@
17
17
  * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
18
18
  * @see http://sites.google.com/site/murmurhash/
19
19
  */
20
- !function(e){!function(){var t;function r(e,n){var i=this instanceof r?this:t;if(i.reset(n),"string"==typeof e&&e.length>0&&i.hash(e),i!==this)return i}r.prototype.hash=function(e){var t,r,n,i,o;switch(o=e.length,this.len+=o,r=this.k1,n=0,this.rem){case 0:r^=o>n?65535&e.charCodeAt(n++):0;case 1:r^=o>n?(65535&e.charCodeAt(n++))<<8:0;case 2:r^=o>n?(65535&e.charCodeAt(n++))<<16:0;case 3:r^=o>n?(255&e.charCodeAt(n))<<24:0,r^=o>n?(65280&e.charCodeAt(n++))>>8:0}if(this.rem=o+this.rem&3,(o-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=r=13715*(r=(r=11601*r+3432906752*(65535&r)&4294967295)<<15|r>>>17)+461832192*(65535&r)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(n>=o);)r=65535&e.charCodeAt(n++)^(65535&e.charCodeAt(n++))<<8^(65535&e.charCodeAt(n++))<<16,r^=(255&(i=e.charCodeAt(n++)))<<24^(65280&i)>>8;switch(r=0,this.rem){case 3:r^=(65535&e.charCodeAt(n+2))<<16;case 2:r^=(65535&e.charCodeAt(n+1))<<8;case 1:r^=65535&e.charCodeAt(n)}this.h1=t}return this.k1=r,this},r.prototype.result=function(){var e,t;return e=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},r.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r}()}(Cp);var Fp={exports:{}},Dp={exports:{}};!function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Dp);var Op=ae.process;const Rp=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(Rp(Op)){var Tp,jp=M.default,Ip=Dp.exports,Lp=/^win/i.test(Op.platform),qp=ne.default;"function"!=typeof qp&&(qp=qp.EventEmitter),Op.__signal_exit_emitter__?Tp=Op.__signal_exit_emitter__:((Tp=Op.__signal_exit_emitter__=new qp).count=0,Tp.emitted={}),Tp.infinite||(Tp.setMaxListeners(1/0),Tp.infinite=!0),Fp.exports=function(e,t){if(!Rp(ae.process))return function(){};jp.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Np&&$p();var r="exit";t&&t.alwaysLast&&(r="afterexit");return Tp.on(r,e),function(){Tp.removeListener(r,e),0===Tp.listeners("exit").length&&0===Tp.listeners("afterexit").length&&zp()}};var zp=function(){Np&&Rp(ae.process)&&(Np=!1,Ip.forEach((function(e){try{Op.removeListener(e,Bp[e])}catch(e){}})),Op.emit=Hp,Op.reallyExit=Up,Tp.count-=1)};Fp.exports.unload=zp;var Mp=function(e,t,r){Tp.emitted[e]||(Tp.emitted[e]=!0,Tp.emit(e,t,r))},Bp={};Ip.forEach((function(e){Bp[e]=function(){Rp(ae.process)&&(Op.listeners(e).length===Tp.count&&(zp(),Mp("exit",null,e),Mp("afterexit",null,e),Lp&&"SIGHUP"===e&&(e="SIGINT"),Op.kill(Op.pid,e)))}})),Fp.exports.signals=function(){return Ip};var Np=!1,$p=function(){!Np&&Rp(ae.process)&&(Np=!0,Tp.count+=1,Ip=Ip.filter((function(e){try{return Op.on(e,Bp[e]),!0}catch(e){return!1}})),Op.emit=Qp,Op.reallyExit=Vp)};Fp.exports.load=$p;var Up=Op.reallyExit,Vp=function(e){Rp(ae.process)&&(Op.exitCode=e||0,Mp("exit",Op.exitCode,null),Mp("afterexit",Op.exitCode,null),Up.call(Op,Op.exitCode))},Hp=Op.emit,Qp=function(e,t){if("exit"===e&&Rp(ae.process)){void 0!==t&&(Op.exitCode=t);var r=Hp.apply(this,arguments);return Mp("exit",Op.exitCode,null),Mp("afterexit",Op.exitCode,null),r}return Hp.apply(this,arguments)}}else Fp.exports=function(){return function(){}};var Gp=Jp;Jp.strict=Yp,Jp.loose=Xp;var Wp=Object.prototype.toString,Kp={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function Jp(e){return Yp(e)||Xp(e)}function Yp(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function Xp(e){return Kp[Wp.call(e)]}var Zp=Gp.strict;Ap.exports=function(e,t,r,n){r instanceof Function&&(n=r,r={});const i=async function(e,t,r={}){"string"==typeof r&&(r={encoding:r});let n,i;const o=rd(fd((()=>i))),a=nd.resolve(e);try{await function(e){return new Promise((t=>{sd[e]||(sd[e]=[]),sd[e].push(t),1===sd[e].length&&t()}))}(a);const o=await ad(ed.realpath)(e).catch((()=>e));if(i=ld(o),!r.mode||!r.chown){const e=await ad(ed.stat)(o).catch((()=>{}));e&&(null==r.mode&&(r.mode=e.mode),null==r.chown&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}n=await ad(ed.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),id(t)&&(t=od(t)),Buffer.isBuffer(t)?await ad(ed.write)(n,t,0,t.length,0):null!=t&&await ad(ed.write)(n,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&await ad(ed.fsync)(n),await ad(ed.close)(n),n=null,r.chown&&await ad(ed.chown)(i,r.chown.uid,r.chown.gid).catch((e=>{if(!hd(e))throw e})),r.mode&&await ad(ed.chmod)(i,r.mode).catch((e=>{if(!hd(e))throw e})),await ad(ed.rename)(i,o)}finally{n&&await ad(ed.close)(n).catch((()=>{})),o(),await ad(ed.unlink)(i).catch((()=>{})),sd[a].shift(),sd[a].length>0?sd[a][0]():delete sd[a]}}(e,t,r);n&&i.then(n,n);return i},Ap.exports.sync=function(e,t,r){"string"==typeof r?r={encoding:r}:r||(r={});try{e=ed.realpathSync(e)}catch(e){}const n=ld(e);if(!r.mode||!r.chown)try{const t=ed.statSync(e);(r=Object.assign({},r)).mode||(r.mode=t.mode),!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch(e){}let i;const o=fd(n),a=rd(o);let s=!0;try{if(i=ed.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),id(t)&&(t=od(t)),Buffer.isBuffer(t)?ed.writeSync(i,t,0,t.length,0):null!=t&&ed.writeSync(i,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&ed.fsyncSync(i),ed.closeSync(i),i=null,r.chown)try{ed.chownSync(n,r.chown.uid,r.chown.gid)}catch(e){if(!hd(e))throw e}if(r.mode)try{ed.chmodSync(n,r.mode)}catch(e){if(!hd(e))throw e}ed.renameSync(n,e),s=!1}finally{if(i)try{ed.closeSync(i)}catch(e){}a(),s&&o()}},Ap.exports._getTmpname=ld,Ap.exports._cleanupOnExit=fd;const ed=Q.default,td=Cp.exports,rd=Fp.exports,nd=j.default,id=Gp,od=function(e){if(Zp(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)},{promisify:ad}=re.default,sd={},cd=function(){try{return require("worker_threads").threadId}catch(e){return 0}}();let ud=0;function ld(e){return e+"."+td(__filename).hash(String(process.pid)).hash(String(cd)).hash(String(++ud)).result()}function fd(e){return()=>{try{ed.unlinkSync("function"==typeof e?e():e)}catch(e){}}}function hd(e){if("ENOSYS"===e.code)return!0;return!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var pd=Ap.exports;const dd=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},md=new Set(["__proto__","prototype","constructor"]),gd=e=>!e.some((e=>md.has(e)));function vd(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];r.push(n)}return gd(r)?r:[]}var yd={get(e,t,r){if(!dd(e)||"string"!=typeof t)return void 0===r?e:r;const n=vd(t);if(0!==n.length){for(let t=0;t<n.length;t++)if(null==(e=e[n[t]])){if(t!==n.length-1)return r;break}return void 0===e?r:e}},set(e,t,r){if(!dd(e)||"string"!=typeof t)return e;const n=e,i=vd(t);for(let t=0;t<i.length;t++){const n=i[t];dd(e[n])||(e[n]={}),t===i.length-1&&(e[n]=r),e=e[n]}return n},delete(e,t){if(!dd(e)||"string"!=typeof t)return!1;const r=vd(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return delete e[n],!0;if(e=e[n],!dd(e))return!1}},has(e,t){if(!dd(e)||"string"!=typeof t)return!1;const r=vd(t);if(0===r.length)return!1;for(let t=0;t<r.length;t++){if(!dd(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}};const bd=C.promisify(ie.default.randomBytes),wd="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),xd="0123456789".split(""),kd="CDEHKMPRTUWXY012458".split(""),Ed="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""),Sd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),Pd=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),_d=(e,t)=>({length:r,type:n,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==n&&void 0!==i)throw new TypeError("Expected either `type` or `characters`");if(void 0!==i&&"string"!=typeof i)throw new TypeError("Expected `characters` to be string");if(!Pd.has(n))throw new TypeError(`Unknown type: ${n}`);if(void 0===n&&void 0===i&&(n="hex"),"hex"===n||void 0===n&&void 0===i)return t(Math.ceil(.5*r),"hex",r);if("base64"===n)return t(Math.ceil(.75*r),"base64",r);if("url-safe"===n)return e(r,wd);if("numeric"===n)return e(r,xd);if("distinguishable"===n)return e(r,kd);if("ascii-printable"===n)return e(r,Ed);if("alphanumeric"===n)return e(r,Sd);if(0===i.length)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i.split(""))},Ad=_d(((e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=ie.default.randomBytes(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),((e,t,r)=>ie.default.randomBytes(e).toString(t).slice(0,r)));Ad.async=_d((async(e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=await bd(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),(async(e,t,r)=>(await bd(e)).toString(t).slice(0,r)));const Cd=Sp||j.default.join(ee.default.tmpdir(),Ad({length:32})),Fd="You don't have access to this file.",Dd={mode:448,recursive:!0},Od={mode:384};const Rd=new class{constructor(e,t,r={}){const n=r.globalConfigPath?j.default.join(e,"config.json"):j.default.join("configstore",`${e}.json`);this._path=r.configPath||j.default.join(Cd,n),t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse(wp.readFileSync(this._path,"utf8"))}catch(e){if("ENOENT"===e.code)return{};if("EACCES"===e.code&&(e.message=`${e.message}\n${Fd}\n`),"SyntaxError"===e.name)return pd.sync(this._path,"",Od),{};throw e}}set all(e){try{wp.mkdirSync(j.default.dirname(this._path),Dd),pd.sync(this._path,JSON.stringify(e,void 0,"\t"),Od)}catch(e){throw"EACCES"===e.code&&(e.message=`${e.message}\n${Fd}\n`),e}}get size(){return Object.keys(this.all||{}).length}get(e){return yd.get(this.all,e)}set(e,t){const r=this.all;if(1===arguments.length)for(const t of Object.keys(e))yd.set(r,t,e[t]);else yd.set(r,e,t);this.all=r}has(e){return yd.has(this.all,e)}delete(e){const t=this.all;yd.delete(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}}("ttx",{plugins_host:"https://plugins.x.topthink.com"});function Td(e){return e?Rd.get(e):Rd.all}const jd={json:jh,html:Lh,ebook:class extends Lh{format="ebook";async initPlugins(){this.book.config.setValue("theme","ebook"),this.options.plugins.preset["theme-ebook"]={},await super.initPlugins()}async createDOM(e,t){const r=new zh,n=new S.VirtualConsole;n.sendTo(oe,{omitJSDOMErrors:!0});let i=!1,o=0;const a=new S.JSDOM(e,{virtualConsole:n,url:`file:///${this.tmpFS.resolve(t.path)}`,runScripts:"dangerously",resources:r,pretendToBeVisual:!0,beforeParse(e){e.SC_DISABLE_SPEEDY=!0;const{document:t}=e,r={attributes:!0,childList:!0,subtree:!0};e.addEventListener("load",(()=>{const n=new e.MutationObserver((function(e){for(const t of e)"childList"===t.type&&t.addedNodes.forEach((e=>{if("SCRIPT"===e.nodeName){++o;e.addEventListener("load",(()=>{--o}))}}))}));n.observe(t.head,r)})),e.addEventListener("bootstrapped",(()=>{i=!0}))}});return await function(e,t){const{tryEvery:r,stopAfter:n}=t,i=Date.now(),o=(t,a)=>{setTimeout((async()=>{try{const r=await e();t(r)}catch(e){Date.now()-i>n?a(e):o(t,a)}}),r)};return new Promise(o)}((()=>{if(!i||o>0)throw new Error("render html timeout")}),{stopAfter:5e3,tryEvery:100}),a}async renderFile(e,t){const r=await super.renderFile(e,t),n=await this.createDOM(r,e);await async function(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise(((o,a)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if("function"!=typeof t)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(r)&&r!==Number.POSITIVE_INFINITY||!(r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const s=[],c=[],u=new Map;let l=!1,f=!1,h=!1,p=0,d=0;const m=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=e=>{l=!0,f=!0,a(e)};i&&(i.aborted&&g(Hh(i)),i.addEventListener("abort",(()=>{g(Hh(i))})));const v=async()=>{if(f)return;const e=await m.next(),r=d;if(d++,e.done){if(h=!0,0===p&&!f){if(!n&&c.length>0)return void g(new $h(c));if(f=!0,0===u.size)return void o(s);const e=[];for(const[t,r]of s.entries())u.get(t)!==Qh&&e.push(r);o(e)}}else p++,(async()=>{try{const n=await e.value;if(f)return;const i=await t(n,r);i===Qh&&u.set(r,i),s[r]=i,p--,await v()}catch(e){if(n)g(e);else{c.push(e),p--;try{await v()}catch(e){g(e)}}}})()};(async()=>{for(let e=0;e<r;e++){try{await v()}catch(e){g(e);break}if(h||l)break}})()}))}(Array.from(n.window.document.images),(async(t,r)=>{if(t.src){const n=a.parse(t.src);if(n.protocol?.startsWith("http"))try{oe.info(`fetch image#${r}: ${t.src}`),t.src=await this.fetchImage(e,t.src),oe.info(`image#${r} fetch succeed`)}catch{oe.warn(`image#${r} ${t.src} fetch failed`)}}}),{concurrency:3});for(const e of Array.from(n.window.document.scripts))e.remove();return n.serialize()}async fetchImage(e,t){const r=await ce.request.get(t,{responseType:"stream",timeout:5e3,headers:{"User-Agent":`TopWriteBuilder/${this.version}`}});let n=`_images/${ce.md5(t)}`;const i=Z.default.extension(r.headers["content-type"]);i&&(n+=`.${i}`);const o=this.tmpFS.createWriteStream(n);return new Promise(((t,i)=>{r.data.pipe(o),o.on("error",(e=>{o.close(),i(e)})),o.on("close",(()=>{t(e.relative(n))}))}))}async getConvertOptions(e){const{config:t}=this.book,r={title:t.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-chapter')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level1-toc')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level2-toc')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level3-toc')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0};switch(e){case"docx":r["docx-no-toc"]=!0;break;case"epub":r["dont-split-on-page-breaks"]=!0;break;case"pdf":const e={poweredBy:this.options.poweredBy},n=await Y.default.renderFile(j.default.resolve(__dirname,"../templates/pdf-header.ejs"),e,{rmWhitespace:!0}),i=await Y.default.renderFile(j.default.resolve(__dirname,"../templates/pdf-footer.ejs"),e,{rmWhitespace:!0});r["chapter-mark"]=t.getValue(["pdf","chapterMark"]),r["page-breaks-before"]=t.getValue(["pdf","pageBreaksBefore"]),r["pdf-page-margin-left"]=t.getValue(["pdf","margin","left"]),r["pdf-page-margin-right"]=t.getValue(["pdf","margin","right"]),r["pdf-page-margin-top"]=t.getValue(["pdf","margin","top"]),r["pdf-page-margin-bottom"]=t.getValue(["pdf","margin","bottom"]),r["pdf-serif-family"]=t.getValue(["pdf","fontFamily"]),r["paper-size"]=t.getValue(["pdf","paperSize"]),r["pdf-custom-size"]=t.getValue(["pdf","customSize"]),r.unit="millimeter",r["pdf-page-numbers"]=t.getValue(["pdf","pageNumbers"]),r["preserve-cover-aspect-ratio"]=!0,r["pdf-header-template"]=n,r["pdf-footer-template"]=i}return r}async packBook(){const e=j.default.extname(this.dest).substr(1);if(!["pdf","docx","epub"].includes(e))return super.packBook();const t=await E.lookpath("ebook-convert");if(!t)throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");const r=function(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const o=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",o=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+o,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},a=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=o;if((!Array.isArray(t.excludes)||!qh(t.excludes,r))&&(!Array.isArray(t.includes)||qh(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=a),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}(await this.getConvertOptions(e)),n=this.tmpFS.resolve("index.html");return r.unshift(n,this.dest),new Promise(((e,i)=>{oe.info("convert book ...");const o=V.default(t,r,{stdio:["inherit"],cwd:this.tmpFS.root}),a=["^Conversion options ","^ \\w+: ","^Blocking URL ","^Ignoring CSS ","^Ignoring internal ","^CSSStyleDeclaration: ","^CSSStylesheet: ","^PropertyValue: ","^CSSVariable: ",Gh(n),Gh(this.dest)].map((e=>`(${e})`)).join("|"),s=new RegExp(`(${a})`);o.stdout?.on("data",(e=>{e.toString().replace(/[\r\n]*$/,"").split("\n").forEach((e=>{if(e){const t=e.trim();e.match(s)?oe.debug({message:t,type:"log"}):oe.log(t)}}))})),o.stderr?.on("data",(e=>{oe.error(e.toString().trimEnd())})),o.on("close",(t=>{0!==t?i("Convert failed"):e()}))}))}}};const Id=require("../package.json"),Ld=new e.Command;Ld.version(Id.version),Ld.name("ttx"),Ld.option("-d, --debug","output extra debugging"),Ld.on("option:debug",(function(){oe.level=n.LogLevel.Debug})),Ld.command("build <dir> <format> [dest]").option("--sha <sha>","book hash value").option("--no-clean","not clean").description("build book").action((async function(e,t,r,n){n.clean&&T.default.setGracefulCleanup(),oe.info(`cli version ${Id.version}`);const i=j.default.resolve(e);r=r?j.default.resolve(r):j.default.join(i,"book.tar.gz");try{const i=await async function(e,t,r,n,i){if(void 0===jd[t])throw new Error("unsupported format: "+t);const o=jd[t],a=new Ih(e),s=await a.readAsObject("ttxconfig.json");oe.debug("read options form ttxconfig.json"),oe.debug(s);const c=ce.Config.createFromObject(await a.readAsObject(ce.Config.file)),u=a.resolve(c.getValue("root","")),l=T.default.dirSync({unsafeCleanup:!0}).name,f=new Ih(l);await W.default.copy(u,l),await W.default.copy(j.default.resolve(__dirname,"../templates/.bookignore"),f.resolve(".bookignore"));const h={plugins:{host:Td("plugins_host"),preset:{},...s.plugins},poweredBy:{name:"顶想云",link:"https://www.topthink.com"},asset:s.asset||"local"};void 0!==s.poweredBy&&(h.poweredBy=s.poweredBy),s.lfs&&(h.lfs={url:s.lfs,files:{}});const p=s.id||"unknown";let d;d=f.exist(ce.Summary.file.json)?await f.readAsObject(ce.Summary.file.json,[]):await f.readAsString(ce.Summary.file.markdown);const m=ce.Summary.create(d);return new o(new ce.Book(p,c,m,i),a,f,h,r,n)}(e,t,r,Id.version,n.sha);await i.generate(),process.exit(0)}catch(e){oe.error(e),process.exit(1)}}));const qd=Ld.command("config");qd.command("list").action((function(){console.log(Td())})),qd.command("set <key> <value>").action((function(e,t){!function(e,t){Rd.set(e,t)}(e,t)})),Ld.parse(process.argv);
20
+ !function(e){!function(){var t;function r(e,n){var i=this instanceof r?this:t;if(i.reset(n),"string"==typeof e&&e.length>0&&i.hash(e),i!==this)return i}r.prototype.hash=function(e){var t,r,n,i,o;switch(o=e.length,this.len+=o,r=this.k1,n=0,this.rem){case 0:r^=o>n?65535&e.charCodeAt(n++):0;case 1:r^=o>n?(65535&e.charCodeAt(n++))<<8:0;case 2:r^=o>n?(65535&e.charCodeAt(n++))<<16:0;case 3:r^=o>n?(255&e.charCodeAt(n))<<24:0,r^=o>n?(65280&e.charCodeAt(n++))>>8:0}if(this.rem=o+this.rem&3,(o-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=r=13715*(r=(r=11601*r+3432906752*(65535&r)&4294967295)<<15|r>>>17)+461832192*(65535&r)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(n>=o);)r=65535&e.charCodeAt(n++)^(65535&e.charCodeAt(n++))<<8^(65535&e.charCodeAt(n++))<<16,r^=(255&(i=e.charCodeAt(n++)))<<24^(65280&i)>>8;switch(r=0,this.rem){case 3:r^=(65535&e.charCodeAt(n+2))<<16;case 2:r^=(65535&e.charCodeAt(n+1))<<8;case 1:r^=65535&e.charCodeAt(n)}this.h1=t}return this.k1=r,this},r.prototype.result=function(){var e,t;return e=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},r.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r}()}(Ud);var Vd={exports:{}},Hd={exports:{}};!function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Hd);var Qd=ae.process;const Wd=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(Wd(Qd)){var Gd,Kd=M.default,Jd=Hd.exports,Yd=/^win/i.test(Qd.platform),Xd=ne.default;"function"!=typeof Xd&&(Xd=Xd.EventEmitter),Qd.__signal_exit_emitter__?Gd=Qd.__signal_exit_emitter__:((Gd=Qd.__signal_exit_emitter__=new Xd).count=0,Gd.emitted={}),Gd.infinite||(Gd.setMaxListeners(1/0),Gd.infinite=!0),Vd.exports=function(e,t){if(!Wd(ae.process))return function(){};Kd.equal(typeof e,"function","a callback must be provided for exit handler"),!1===rp&&np();var r="exit";t&&t.alwaysLast&&(r="afterexit");return Gd.on(r,e),function(){Gd.removeListener(r,e),0===Gd.listeners("exit").length&&0===Gd.listeners("afterexit").length&&Zd()}};var Zd=function(){rp&&Wd(ae.process)&&(rp=!1,Jd.forEach((function(e){try{Qd.removeListener(e,tp[e])}catch(e){}})),Qd.emit=ap,Qd.reallyExit=ip,Gd.count-=1)};Vd.exports.unload=Zd;var ep=function(e,t,r){Gd.emitted[e]||(Gd.emitted[e]=!0,Gd.emit(e,t,r))},tp={};Jd.forEach((function(e){tp[e]=function(){Wd(ae.process)&&(Qd.listeners(e).length===Gd.count&&(Zd(),ep("exit",null,e),ep("afterexit",null,e),Yd&&"SIGHUP"===e&&(e="SIGINT"),Qd.kill(Qd.pid,e)))}})),Vd.exports.signals=function(){return Jd};var rp=!1,np=function(){!rp&&Wd(ae.process)&&(rp=!0,Gd.count+=1,Jd=Jd.filter((function(e){try{return Qd.on(e,tp[e]),!0}catch(e){return!1}})),Qd.emit=sp,Qd.reallyExit=op)};Vd.exports.load=np;var ip=Qd.reallyExit,op=function(e){Wd(ae.process)&&(Qd.exitCode=e||0,ep("exit",Qd.exitCode,null),ep("afterexit",Qd.exitCode,null),ip.call(Qd,Qd.exitCode))},ap=Qd.emit,sp=function(e,t){if("exit"===e&&Wd(ae.process)){void 0!==t&&(Qd.exitCode=t);var r=ap.apply(this,arguments);return ep("exit",Qd.exitCode,null),ep("afterexit",Qd.exitCode,null),r}return ap.apply(this,arguments)}}else Vd.exports=function(){return function(){}};var cp=fp;fp.strict=hp,fp.loose=dp;var up=Object.prototype.toString,lp={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function fp(e){return hp(e)||dp(e)}function hp(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function dp(e){return lp[up.call(e)]}var pp=cp.strict;$d.exports=function(e,t,r,n){r instanceof Function&&(n=r,r={});const i=async function(e,t,r={}){"string"==typeof r&&(r={encoding:r});let n,i;const o=vp(_p((()=>i))),a=yp.resolve(e);try{await function(e){return new Promise((t=>{kp[e]||(kp[e]=[]),kp[e].push(t),1===kp[e].length&&t()}))}(a);const o=await xp(mp.realpath)(e).catch((()=>e));if(i=Pp(o),!r.mode||!r.chown){const e=await xp(mp.stat)(o).catch((()=>{}));e&&(null==r.mode&&(r.mode=e.mode),null==r.chown&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}n=await xp(mp.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),bp(t)&&(t=wp(t)),Buffer.isBuffer(t)?await xp(mp.write)(n,t,0,t.length,0):null!=t&&await xp(mp.write)(n,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&await xp(mp.fsync)(n),await xp(mp.close)(n),n=null,r.chown&&await xp(mp.chown)(i,r.chown.uid,r.chown.gid).catch((e=>{if(!Cp(e))throw e})),r.mode&&await xp(mp.chmod)(i,r.mode).catch((e=>{if(!Cp(e))throw e})),await xp(mp.rename)(i,o)}finally{n&&await xp(mp.close)(n).catch((()=>{})),o(),await xp(mp.unlink)(i).catch((()=>{})),kp[a].shift(),kp[a].length>0?kp[a][0]():delete kp[a]}}(e,t,r);n&&i.then(n,n);return i},$d.exports.sync=function(e,t,r){"string"==typeof r?r={encoding:r}:r||(r={});try{e=mp.realpathSync(e)}catch(e){}const n=Pp(e);if(!r.mode||!r.chown)try{const t=mp.statSync(e);(r=Object.assign({},r)).mode||(r.mode=t.mode),!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch(e){}let i;const o=_p(n),a=vp(o);let s=!0;try{if(i=mp.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),bp(t)&&(t=wp(t)),Buffer.isBuffer(t)?mp.writeSync(i,t,0,t.length,0):null!=t&&mp.writeSync(i,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&mp.fsyncSync(i),mp.closeSync(i),i=null,r.chown)try{mp.chownSync(n,r.chown.uid,r.chown.gid)}catch(e){if(!Cp(e))throw e}if(r.mode)try{mp.chmodSync(n,r.mode)}catch(e){if(!Cp(e))throw e}mp.renameSync(n,e),s=!1}finally{if(i)try{mp.closeSync(i)}catch(e){}a(),s&&o()}},$d.exports._getTmpname=Pp,$d.exports._cleanupOnExit=_p;const mp=Q.default,gp=Ud.exports,vp=Vd.exports,yp=j.default,bp=cp,wp=function(e){if(pp(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)},{promisify:xp}=re.default,kp={},Ep=function(){try{return require("worker_threads").threadId}catch(e){return 0}}();let Sp=0;function Pp(e){return e+"."+gp(__filename).hash(String(process.pid)).hash(String(Ep)).hash(String(++Sp)).result()}function _p(e){return()=>{try{mp.unlinkSync("function"==typeof e?e():e)}catch(e){}}}function Cp(e){if("ENOSYS"===e.code)return!0;return!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var Ap=$d.exports;const Fp=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},Dp=new Set(["__proto__","prototype","constructor"]),Rp=e=>!e.some((e=>Dp.has(e)));function Tp(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];r.push(n)}return Rp(r)?r:[]}var Op={get(e,t,r){if(!Fp(e)||"string"!=typeof t)return void 0===r?e:r;const n=Tp(t);if(0!==n.length){for(let t=0;t<n.length;t++)if(null==(e=e[n[t]])){if(t!==n.length-1)return r;break}return void 0===e?r:e}},set(e,t,r){if(!Fp(e)||"string"!=typeof t)return e;const n=e,i=Tp(t);for(let t=0;t<i.length;t++){const n=i[t];Fp(e[n])||(e[n]={}),t===i.length-1&&(e[n]=r),e=e[n]}return n},delete(e,t){if(!Fp(e)||"string"!=typeof t)return!1;const r=Tp(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return delete e[n],!0;if(e=e[n],!Fp(e))return!1}},has(e,t){if(!Fp(e)||"string"!=typeof t)return!1;const r=Tp(t);if(0===r.length)return!1;for(let t=0;t<r.length;t++){if(!Fp(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}};const jp=A.promisify(ie.default.randomBytes),Ip="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),Lp="0123456789".split(""),qp="CDEHKMPRTUWXY012458".split(""),zp="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""),Mp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),Np=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),Bp=(e,t)=>({length:r,type:n,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==n&&void 0!==i)throw new TypeError("Expected either `type` or `characters`");if(void 0!==i&&"string"!=typeof i)throw new TypeError("Expected `characters` to be string");if(!Np.has(n))throw new TypeError(`Unknown type: ${n}`);if(void 0===n&&void 0===i&&(n="hex"),"hex"===n||void 0===n&&void 0===i)return t(Math.ceil(.5*r),"hex",r);if("base64"===n)return t(Math.ceil(.75*r),"base64",r);if("url-safe"===n)return e(r,Ip);if("numeric"===n)return e(r,Lp);if("distinguishable"===n)return e(r,qp);if("ascii-printable"===n)return e(r,zp);if("alphanumeric"===n)return e(r,Mp);if(0===i.length)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i.split(""))},$p=Bp(((e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=ie.default.randomBytes(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),((e,t,r)=>ie.default.randomBytes(e).toString(t).slice(0,r)));$p.async=Bp((async(e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=await jp(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),(async(e,t,r)=>(await jp(e)).toString(t).slice(0,r)));const Up=Md||j.default.join(ee.default.tmpdir(),$p({length:32})),Vp="You don't have access to this file.",Hp={mode:448,recursive:!0},Qp={mode:384};const Wp=new class{constructor(e,t,r={}){const n=r.globalConfigPath?j.default.join(e,"config.json"):j.default.join("configstore",`${e}.json`);this._path=r.configPath||j.default.join(Up,n),t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse(Id.readFileSync(this._path,"utf8"))}catch(e){if("ENOENT"===e.code)return{};if("EACCES"===e.code&&(e.message=`${e.message}\n${Vp}\n`),"SyntaxError"===e.name)return Ap.sync(this._path,"",Qp),{};throw e}}set all(e){try{Id.mkdirSync(j.default.dirname(this._path),Hp),Ap.sync(this._path,JSON.stringify(e,void 0,"\t"),Qp)}catch(e){throw"EACCES"===e.code&&(e.message=`${e.message}\n${Vp}\n`),e}}get size(){return Object.keys(this.all||{}).length}get(e){return Op.get(this.all,e)}set(e,t){const r=this.all;if(1===arguments.length)for(const t of Object.keys(e))Op.set(r,t,e[t]);else Op.set(r,e,t);this.all=r}has(e){return Op.has(this.all,e)}delete(e){const t=this.all;Op.delete(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}}("ttx",{plugins_host:"https://plugins.x.topthink.com"});function Gp(e){return e?Wp.get(e):Wp.all}const Kp={json:Kh,html:Yh,ebook:class extends Yh{format="ebook";async initPlugins(){this.book.config.setValue("theme","ebook"),this.options.plugins.preset["theme-ebook"]={},await super.initPlugins()}async createDOM(e,t){const r=new Zh,n=new S.VirtualConsole;n.on("error",(e=>{oe.error(e)}));let i=!1,o=0;const a=new S.JSDOM(e,{virtualConsole:n,url:`file:///${this.tmpFS.resolve(t.path)}`,runScripts:"dangerously",resources:r,pretendToBeVisual:!0,beforeParse(e){e.SC_DISABLE_SPEEDY=!0;const{document:t}=e,r={attributes:!0,childList:!0,subtree:!0};e.addEventListener("load",(()=>{const n=new e.MutationObserver((function(e){for(const t of e)"childList"===t.type&&t.addedNodes.forEach((e=>{if("SCRIPT"===e.nodeName){++o;e.addEventListener("load",(()=>{--o}))}}))}));n.observe(t.head,r)})),e.addEventListener("bootstrapped",(()=>{i=!0}))}});return await function(e,t){const{tryEvery:r,stopAfter:n}=t,i=Date.now(),o=(t,a)=>{setTimeout((async()=>{try{const r=await e();t(r)}catch(e){Date.now()-i>n?a(e):o(t,a)}}),r)};return new Promise(o)}((()=>{if(!i||o>0)throw new Error("render html timeout")}),{stopAfter:5e3,tryEvery:100}),a}async renderFile(e,t){const r=await super.renderFile(e,t),n=await this.createDOM(r,e);await async function(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise(((o,a)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if("function"!=typeof t)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(r)&&r!==Number.POSITIVE_INFINITY||!(r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const s=[],c=[],u=new Map;let l=!1,f=!1,h=!1,d=0,p=0;const m=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=e=>{l=!0,f=!0,a(e)};i&&(i.aborted&&g(ad(i)),i.addEventListener("abort",(()=>{g(ad(i))})));const v=async()=>{if(f)return;const e=await m.next(),r=p;if(p++,e.done){if(h=!0,0===d&&!f){if(!n&&c.length>0)return void g(new nd(c));if(f=!0,0===u.size)return void o(s);const e=[];for(const[t,r]of s.entries())u.get(t)!==sd&&e.push(r);o(e)}}else d++,(async()=>{try{const n=await e.value;if(f)return;const i=await t(n,r);i===sd&&u.set(r,i),s[r]=i,d--,await v()}catch(e){if(n)g(e);else{c.push(e),d--;try{await v()}catch(e){g(e)}}}})()};(async()=>{for(let e=0;e<r;e++){try{await v()}catch(e){g(e);break}if(h||l)break}})()}))}(Array.from(n.window.document.images),(async(t,r)=>{if(t.src){const n=a.parse(t.src);if(n.protocol?.startsWith("http"))try{oe.info(`fetch image#${r}: ${t.src}`),t.src=await this.fetchImage(e,t.src),oe.info(`image#${r} fetch succeed`)}catch{oe.warn(`image#${r} ${t.src} fetch failed`)}}}),{concurrency:3});for(const e of Array.from(n.window.document.scripts))e.remove();return n.serialize()}async fetchImage(e,t){const r=await ce.request.get(t,{responseType:"stream",timeout:5e3,headers:{"User-Agent":`TopWriteBuilder/${this.version}`}});let n=`_images/${ce.md5(t)}`;const i=Z.default.extension(r.headers["content-type"]);i&&(n+=`.${i}`);const o=this.tmpFS.createWriteStream(n);return new Promise(((t,i)=>{r.data.pipe(o),o.on("error",(e=>{o.close(),i(e)})),o.on("close",(()=>{t(e.relative(n))}))}))}async getConvertOptions(e){const{config:t}=this.book,r={title:t.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-chapter')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level1-toc')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level2-toc')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level3-toc')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0};switch(e){case"docx":r["docx-no-toc"]=!0;break;case"epub":r["dont-split-on-page-breaks"]=!0;break;case"pdf":const e={poweredBy:this.options.poweredBy},n=await Y.default.renderFile(j.default.resolve(__dirname,"../templates/pdf-header.ejs"),e,{rmWhitespace:!0}),i=await Y.default.renderFile(j.default.resolve(__dirname,"../templates/pdf-footer.ejs"),e,{rmWhitespace:!0});r["chapter-mark"]=t.getValue(["pdf","chapterMark"]),r["page-breaks-before"]=t.getValue(["pdf","pageBreaksBefore"]),r["pdf-page-margin-left"]=t.getValue(["pdf","margin","left"]),r["pdf-page-margin-right"]=t.getValue(["pdf","margin","right"]),r["pdf-page-margin-top"]=t.getValue(["pdf","margin","top"]),r["pdf-page-margin-bottom"]=t.getValue(["pdf","margin","bottom"]),r["pdf-serif-family"]=t.getValue(["pdf","fontFamily"]),r["paper-size"]=t.getValue(["pdf","paperSize"]),r["pdf-custom-size"]=t.getValue(["pdf","customSize"]),r.unit="millimeter",r["pdf-page-numbers"]=t.getValue(["pdf","pageNumbers"]),r["preserve-cover-aspect-ratio"]=!0,r["pdf-header-template"]=n,r["pdf-footer-template"]=i}return r}async packBook(){const e=j.default.extname(this.dest).substr(1);if(!["pdf","docx","epub"].includes(e))return super.packBook();const t=await E.lookpath("ebook-convert");if(!t)throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");const r=function(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const o=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",o=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+o,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},a=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=o;if((!Array.isArray(t.excludes)||!Xh(t.excludes,r))&&(!Array.isArray(t.includes)||Xh(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=a),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}(await this.getConvertOptions(e)),n=this.tmpFS.resolve("index.html");return r.unshift(n,this.dest),new Promise(((e,i)=>{oe.info("convert book ...");const o=V.default(t,r,{stdio:["inherit"],cwd:this.tmpFS.root}),a=["^Conversion options ","^ \\w+: ","^Blocking URL ","^Ignoring CSS ","^Ignoring internal ","^CSSStyleDeclaration: ","^CSSStylesheet: ","^PropertyValue: ","^CSSVariable: ",cd(n),cd(this.dest)].map((e=>`(${e})`)).join("|"),s=new RegExp(`(${a})`);o.stdout?.on("data",(e=>{e.toString().replace(/[\r\n]*$/,"").split("\n").forEach((e=>{if(e){const t=e.trim();e.match(s)?oe.debug({message:t,type:"log"}):oe.log(t)}}))})),o.stderr?.on("data",(e=>{oe.error(e.toString().trimEnd())})),o.on("close",(t=>{0!==t?i("Convert failed"):e()}))}))}}};const Jp=require("../package.json"),Yp=new e.Command;Yp.version(Jp.version),Yp.name("ttx"),Yp.option("-d, --debug","output extra debugging"),Yp.on("option:debug",(function(){oe.level=n.LogLevel.Debug})),Yp.command("build <dir> <format> [dest]").option("--sha <sha>","book hash value").option("--no-clean","not clean").description("build book").action((async function(e,t,r,n){n.clean&&O.default.setGracefulCleanup(),oe.info(`cli version ${Jp.version}`);const i=j.default.resolve(e);r=r?j.default.resolve(r):j.default.join(i,"book.tar.gz");try{const i=await async function(e,t,r,n,i){if(void 0===Kp[t])throw new Error("unsupported format: "+t);const o=Kp[t],a=new Jh(e),s=await a.readAsObject("ttxconfig.json");oe.debug("read options form ttxconfig.json"),oe.debug(s);const c=ce.Config.createFromObject(await a.readAsObject(ce.Config.file)),u=a.resolve(c.getValue("root","")),l=O.default.dirSync({unsafeCleanup:!0}).name,f=new Jh(l);await G.default.copy(u,l),await G.default.copy(j.default.resolve(__dirname,"../templates/.bookignore"),f.resolve(".bookignore"));const h={plugins:{host:Gp("plugins_host"),preset:{},...s.plugins},poweredBy:{name:"顶想云",link:"https://www.topthink.com"},asset:s.asset||"local"};void 0!==s.poweredBy&&(h.poweredBy=s.poweredBy),s.lfs&&(h.lfs={url:s.lfs,files:{}});const d=s.id||"unknown";let p;p=f.exist(ce.Summary.file.json)?await f.readAsObject(ce.Summary.file.json,[]):await f.readAsString(ce.Summary.file.markdown);const m=ce.Summary.create(p);return new o(new ce.Book(d,c,m,i),a,f,h,r,n)}(e,t,r,Jp.version,n.sha);await i.generate(),process.exit(0)}catch(e){oe.error(e),process.exit(1)}}));const Xp=Yp.command("config");Xp.command("list").action((function(){console.log(Gp())})),Xp.command("set <key> <value>").action((function(e,t){!function(e,t){Wp.set(e,t)}(e,t)})),Yp.parse(process.argv);