vitepress-plugin-diagrams 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # VitePress Diagrams
2
+
3
+ A VitePress plugin for generating diagrams from text (PlantUML, Mermaid, etc.)
4
+
5
+ ## Installation
6
+
package/dist/index.cjs ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const un=require("node:fs"),fn=require("node:path");function Gt(t){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const a=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(f,l,a.get?a:{enumerable:!0,get:()=>t[l]})}}return f.default=t,Object.freeze(f)}const Be=Gt(un),Le=Gt(fn),$r={},ln=Object.freeze(Object.defineProperty({__proto__:null,default:$r},Symbol.toStringTag,{value:"Module"}));var Qr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pn(t){if(t.__esModule)return t;var f=t.default;if(typeof f=="function"){var l=function a(){return this instanceof a?Reflect.construct(f,arguments,this.constructor):f.apply(this,arguments)};l.prototype=f.prototype}else l={};return Object.defineProperty(l,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var g=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(l,a,g.get?g:{enumerable:!0,get:function(){return t[a]}})}),l}var Re={exports:{}},Ue={},We,Kr;function be(){return Kr||(Kr=1,We=TypeError),We}const sn=pn(ln);var Ge,Vr;function qe(){if(Vr)return Ge;Vr=1;var t=typeof Map=="function"&&Map.prototype,f=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,l=t&&f&&typeof f.get=="function"?f.get:null,a=t&&Map.prototype.forEach,g=typeof Set=="function"&&Set.prototype,S=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,A=g&&S&&typeof S.get=="function"?S.get:null,c=g&&Set.prototype.forEach,s=typeof WeakMap=="function"&&WeakMap.prototype,d=s?WeakMap.prototype.has:null,y=typeof WeakSet=="function"&&WeakSet.prototype,h=y?WeakSet.prototype.has:null,m=typeof WeakRef=="function"&&WeakRef.prototype,u=m?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,w=Object.prototype.toString,n=Function.prototype.toString,o=String.prototype.match,i=String.prototype.slice,b=String.prototype.replace,v=String.prototype.toUpperCase,O=String.prototype.toLowerCase,E=RegExp.prototype.test,P=Array.prototype.concat,q=Array.prototype.join,$=Array.prototype.slice,_=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,L=typeof Symbol=="function"&&typeof Symbol.iterator=="object",z=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===L||!0)?Symbol.toStringTag:null,ee=Object.prototype.propertyIsEnumerable,re=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||E.call(/e/,r))return r;var F=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var T=e<0?-_(-e):_(e);if(T!==e){var N=String(T),x=i.call(r,N.length+1);return b.call(N,F,"$&_")+"."+b.call(b.call(x,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(r,F,"$&_")}var Q=sn,te=Q.custom,se=k(te)?te:null,ae={__proto__:null,double:'"',single:"'"},oe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ge=function e(r,F,T,N){var x=F||{};if(j(x,"quoteStyle")&&!j(ae,x.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(j(x,"maxStringLength")&&(typeof x.maxStringLength=="number"?x.maxStringLength<0&&x.maxStringLength!==1/0:x.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ce=j(x,"customInspect")?x.customInspect:!0;if(typeof ce!="boolean"&&ce!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(j(x,"indent")&&x.indent!==null&&x.indent!==" "&&!(parseInt(x.indent,10)===x.indent&&x.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(j(x,"numericSeparator")&&typeof x.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ye=x.numericSeparator;if(typeof r>"u")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Nr(r,x);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var K=String(r);return ye?D(r,K):K}if(typeof r=="bigint"){var pe=String(r)+"n";return ye?D(r,pe):pe}var Ie=typeof x.depth>"u"?5:x.depth;if(typeof T>"u"&&(T=0),T>=Ie&&Ie>0&&typeof r=="object")return ue(r)?"[Array]":"[Object]";var me=nn(x,T);if(typeof N>"u")N=[];else if(le(N,r)>=0)return"[Circular]";function Z(Se,Pe,on){if(Pe&&(N=$.call(N),N.push(Pe)),on){var zr={depth:x.depth};return j(x,"quoteStyle")&&(zr.quoteStyle=x.quoteStyle),e(Se,zr,T+1,N)}return e(Se,x,T+1,N)}if(typeof r=="function"&&!W(r)){var Lr=de(r),Ur=Ae(r,Z);return"[Function"+(Lr?": "+Lr:" (anonymous)")+"]"+(Ur.length>0?" { "+q.call(Ur,", ")+" }":"")}if(k(r)){var Wr=L?b.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):G.call(r);return typeof r=="object"&&!L?we(Wr):Wr}if(en(r)){for(var Oe="<"+O.call(String(r.nodeName)),Fe=r.attributes||[],Ee=0;Ee<Fe.length;Ee++)Oe+=" "+Fe[Ee].name+"="+ie(ne(Fe[Ee].value),"double",x);return Oe+=">",r.childNodes&&r.childNodes.length&&(Oe+="..."),Oe+="</"+O.call(String(r.nodeName))+">",Oe}if(ue(r)){if(r.length===0)return"[]";var $e=Ae(r,Z);return me&&!tn($e)?"["+De($e,me)+"]":"[ "+q.call($e,", ")+" ]"}if(I(r)){var Me=Ae(r,Z);return!("cause"in Error.prototype)&&"cause"in r&&!ee.call(r,"cause")?"{ ["+String(r)+"] "+q.call(P.call("[cause]: "+Z(r.cause),Me),", ")+" }":Me.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+q.call(Me,", ")+" }"}if(typeof r=="object"&&ce){if(se&&typeof r[se]=="function"&&Q)return Q(r,{depth:Ie-T});if(ce!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(Y(r)){var Gr=[];return a&&a.call(r,function(Se,Pe){Gr.push(Z(Pe,r,!0)+" => "+Z(Se,r))}),Br("Map",l.call(r),Gr,me)}if(ge(r)){var kr=[];return c&&c.call(r,function(Se){kr.push(Z(Se,r))}),Br("Set",A.call(r),kr,me)}if(ve(r))return xe("WeakMap");if(Zt(r))return xe("WeakSet");if(he(r))return xe("WeakRef");if(C(r))return we(Z(Number(r)));if(J(r))return we(Z(M.call(r)));if(U(r))return we(p.call(r));if(B(r))return we(Z(String(r)));if(typeof window<"u"&&r===window)return"{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||typeof Qr<"u"&&r===Qr)return"{ [object globalThis] }";if(!fe(r)&&!W(r)){var Ce=Ae(r,Z),Hr=re?re(r)===Object.prototype:r instanceof Object||r.constructor===Object,Te=r instanceof Object?"":"null prototype",jr=!Hr&&z&&Object(r)===r&&z in r?i.call(X(r),8,-1):Te?"Object":"",an=Hr||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",Ne=an+(jr||Te?"["+q.call(P.call([],jr||[],Te||[]),": ")+"] ":"");return Ce.length===0?Ne+"{}":me?Ne+"{"+De(Ce,me)+"}":Ne+"{ "+q.call(Ce,", ")+" }"}return String(r)};function ie(e,r,F){var T=F.quoteStyle||r,N=ae[T];return N+e+N}function ne(e){return b.call(String(e),/"/g,"&quot;")}function V(e){return!z||!(typeof e=="object"&&(z in e||typeof e[z]<"u"))}function ue(e){return X(e)==="[object Array]"&&V(e)}function fe(e){return X(e)==="[object Date]"&&V(e)}function W(e){return X(e)==="[object RegExp]"&&V(e)}function I(e){return X(e)==="[object Error]"&&V(e)}function B(e){return X(e)==="[object String]"&&V(e)}function C(e){return X(e)==="[object Number]"&&V(e)}function U(e){return X(e)==="[object Boolean]"&&V(e)}function k(e){if(L)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!G)return!1;try{return G.call(e),!0}catch{}return!1}function J(e){if(!e||typeof e!="object"||!M)return!1;try{return M.call(e),!0}catch{}return!1}var H=Object.prototype.hasOwnProperty||function(e){return e in this};function j(e,r){return H.call(e,r)}function X(e){return w.call(e)}function de(e){if(e.name)return e.name;var r=o.call(n.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function le(e,r){if(e.indexOf)return e.indexOf(r);for(var F=0,T=e.length;F<T;F++)if(e[F]===r)return F;return-1}function Y(e){if(!l||!e||typeof e!="object")return!1;try{l.call(e);try{A.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ve(e){if(!d||!e||typeof e!="object")return!1;try{d.call(e,d);try{h.call(e,h)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function he(e){if(!u||!e||typeof e!="object")return!1;try{return u.call(e),!0}catch{}return!1}function ge(e){if(!A||!e||typeof e!="object")return!1;try{A.call(e);try{l.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Zt(e){if(!h||!e||typeof e!="object")return!1;try{h.call(e,h);try{d.call(e,d)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function en(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Nr(e,r){if(e.length>r.maxStringLength){var F=e.length-r.maxStringLength,T="... "+F+" more character"+(F>1?"s":"");return Nr(i.call(e,0,r.maxStringLength),r)+T}var N=oe[r.quoteStyle||"single"];N.lastIndex=0;var x=b.call(b.call(e,N,"\\$1"),/[\x00-\x1f]/g,rn);return ie(x,"single",r)}function rn(e){var r=e.charCodeAt(0),F={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return F?"\\"+F:"\\x"+(r<16?"0":"")+v.call(r.toString(16))}function we(e){return"Object("+e+")"}function xe(e){return e+" { ? }"}function Br(e,r,F,T){var N=T?De(F,T):q.call(F,", ");return e+" ("+r+") {"+N+"}"}function tn(e){for(var r=0;r<e.length;r++)if(le(e[r],`
2
+ `)>=0)return!1;return!0}function nn(e,r){var F;if(e.indent===" ")F=" ";else if(typeof e.indent=="number"&&e.indent>0)F=q.call(Array(e.indent+1)," ");else return null;return{base:F,prev:q.call(Array(r+1),F)}}function De(e,r){if(e.length===0)return"";var F=`
3
+ `+r.prev+r.base;return F+q.call(e,","+F)+`
4
+ `+r.prev}function Ae(e,r){var F=ue(e),T=[];if(F){T.length=e.length;for(var N=0;N<e.length;N++)T[N]=j(e,N)?r(e[N],e):""}var x=typeof R=="function"?R(e):[],ce;if(L){ce={};for(var ye=0;ye<x.length;ye++)ce["$"+x[ye]]=x[ye]}for(var K in e)j(e,K)&&(F&&String(Number(K))===K&&K<e.length||L&&ce["$"+K]instanceof Symbol||(E.call(/[^\w$]/,K)?T.push(r(K,e)+": "+r(e[K],e)):T.push(K+": "+r(e[K],e))));if(typeof R=="function")for(var pe=0;pe<x.length;pe++)ee.call(e,x[pe])&&T.push("["+r(x[pe])+"]: "+r(e[x[pe]],e));return T}return Ge}var ke,Jr;function yn(){if(Jr)return ke;Jr=1;var t=qe(),f=be(),l=function(c,s,d){for(var y=c,h;(h=y.next)!=null;y=h)if(h.key===s)return y.next=h.next,d||(h.next=c.next,c.next=h),h},a=function(c,s){if(c){var d=l(c,s);return d&&d.value}},g=function(c,s,d){var y=l(c,s);y?y.value=d:c.next={key:s,next:c.next,value:d}},S=function(c,s){return c?!!l(c,s):!1},A=function(c,s){if(c)return l(c,s,!0)};return ke=function(){var s,d={assert:function(y){if(!d.has(y))throw new f("Side channel does not contain "+t(y))},delete:function(y){var h=s&&s.next,m=A(s,y);return m&&h&&h===m&&(s=void 0),!!m},get:function(y){return a(s,y)},has:function(y){return S(s,y)},set:function(y,h){s||(s={next:void 0}),g(s,y,h)}};return d},ke}var He,Xr;function kt(){return Xr||(Xr=1,He=Object),He}var je,Yr;function dn(){return Yr||(Yr=1,je=Error),je}var ze,Zr;function vn(){return Zr||(Zr=1,ze=EvalError),ze}var Qe,et;function hn(){return et||(et=1,Qe=RangeError),Qe}var Ke,rt;function gn(){return rt||(rt=1,Ke=ReferenceError),Ke}var Ve,tt;function mn(){return tt||(tt=1,Ve=SyntaxError),Ve}var Je,nt;function Sn(){return nt||(nt=1,Je=URIError),Je}var Xe,at;function bn(){return at||(at=1,Xe=Math.abs),Xe}var Ye,ot;function wn(){return ot||(ot=1,Ye=Math.floor),Ye}var Ze,it;function On(){return it||(it=1,Ze=Math.max),Ze}var er,ut;function An(){return ut||(ut=1,er=Math.min),er}var rr,ft;function En(){return ft||(ft=1,rr=Math.pow),rr}var tr,lt;function Pn(){return lt||(lt=1,tr=Math.round),tr}var nr,ct;function Rn(){return ct||(ct=1,nr=Number.isNaN||function(f){return f!==f}),nr}var ar,pt;function qn(){if(pt)return ar;pt=1;var t=Rn();return ar=function(l){return t(l)||l===0?l:l<0?-1:1},ar}var or,st;function _n(){return st||(st=1,or=Object.getOwnPropertyDescriptor),or}var ir,yt;function Ht(){if(yt)return ir;yt=1;var t=_n();if(t)try{t([],"length")}catch{t=null}return ir=t,ir}var ur,dt;function xn(){if(dt)return ur;dt=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return ur=t,ur}var fr,vt;function Dn(){return vt||(vt=1,fr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var f={},l=Symbol("test"),a=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var g=42;f[l]=g;for(var S in f)return!1;if(typeof Object.keys=="function"&&Object.keys(f).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(f).length!==0)return!1;var A=Object.getOwnPropertySymbols(f);if(A.length!==1||A[0]!==l||!Object.prototype.propertyIsEnumerable.call(f,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(f,l);if(c.value!==g||c.enumerable!==!0)return!1}return!0}),fr}var lr,ht;function In(){if(ht)return lr;ht=1;var t=typeof Symbol<"u"&&Symbol,f=Dn();return lr=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:f()},lr}var cr,gt;function jt(){return gt||(gt=1,cr=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),cr}var pr,mt;function zt(){if(mt)return pr;mt=1;var t=kt();return pr=t.getPrototypeOf||null,pr}var sr,St;function Fn(){if(St)return sr;St=1;var t="Function.prototype.bind called on incompatible ",f=Object.prototype.toString,l=Math.max,a="[object Function]",g=function(s,d){for(var y=[],h=0;h<s.length;h+=1)y[h]=s[h];for(var m=0;m<d.length;m+=1)y[m+s.length]=d[m];return y},S=function(s,d){for(var y=[],h=d,m=0;h<s.length;h+=1,m+=1)y[m]=s[h];return y},A=function(c,s){for(var d="",y=0;y<c.length;y+=1)d+=c[y],y+1<c.length&&(d+=s);return d};return sr=function(s){var d=this;if(typeof d!="function"||f.apply(d)!==a)throw new TypeError(t+d);for(var y=S(arguments,1),h,m=function(){if(this instanceof h){var o=d.apply(this,g(y,arguments));return Object(o)===o?o:this}return d.apply(s,g(y,arguments))},u=l(0,d.length-y.length),p=[],w=0;w<u;w++)p[w]="$"+w;if(h=Function("binder","return function ("+A(p,",")+"){ return binder.apply(this,arguments); }")(m),d.prototype){var n=function(){};n.prototype=d.prototype,h.prototype=new n,n.prototype=null}return h},sr}var yr,bt;function _e(){if(bt)return yr;bt=1;var t=Fn();return yr=Function.prototype.bind||t,yr}var dr,wt;function Mr(){return wt||(wt=1,dr=Function.prototype.call),dr}var vr,Ot;function Qt(){return Ot||(Ot=1,vr=Function.prototype.apply),vr}var hr,At;function $n(){return At||(At=1,hr=typeof Reflect<"u"&&Reflect&&Reflect.apply),hr}var gr,Et;function Mn(){if(Et)return gr;Et=1;var t=_e(),f=Qt(),l=Mr(),a=$n();return gr=a||t.call(l,f),gr}var mr,Pt;function Kt(){if(Pt)return mr;Pt=1;var t=_e(),f=be(),l=Mr(),a=Mn();return mr=function(S){if(S.length<1||typeof S[0]!="function")throw new f("a function is required");return a(t,l,S)},mr}var Sr,Rt;function Cn(){if(Rt)return Sr;Rt=1;var t=Kt(),f=Ht(),l;try{l=[].__proto__===Array.prototype}catch(A){if(!A||typeof A!="object"||!("code"in A)||A.code!=="ERR_PROTO_ACCESS")throw A}var a=!!l&&f&&f(Object.prototype,"__proto__"),g=Object,S=g.getPrototypeOf;return Sr=a&&typeof a.get=="function"?t([a.get]):typeof S=="function"?function(c){return S(c==null?c:g(c))}:!1,Sr}var br,qt;function Tn(){if(qt)return br;qt=1;var t=jt(),f=zt(),l=Cn();return br=t?function(g){return t(g)}:f?function(g){if(!g||typeof g!="object"&&typeof g!="function")throw new TypeError("getProto: not an object");return f(g)}:l?function(g){return l(g)}:null,br}var wr,_t;function Nn(){if(_t)return wr;_t=1;var t=Function.prototype.call,f=Object.prototype.hasOwnProperty,l=_e();return wr=l.call(t,f),wr}var Or,xt;function Cr(){if(xt)return Or;xt=1;var t,f=kt(),l=dn(),a=vn(),g=hn(),S=gn(),A=mn(),c=be(),s=Sn(),d=bn(),y=wn(),h=On(),m=An(),u=En(),p=Pn(),w=qn(),n=Function,o=function(W){try{return n('"use strict"; return ('+W+").constructor;")()}catch{}},i=Ht(),b=xn(),v=function(){throw new c},O=i?function(){try{return arguments.callee,v}catch{try{return i(arguments,"callee").get}catch{return v}}}():v,E=In()(),P=Tn(),q=zt(),$=jt(),_=Qt(),M=Mr(),R={},G=typeof Uint8Array>"u"||!P?t:P(Uint8Array),L={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":E&&P?P([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":l,"%eval%":eval,"%EvalError%":a,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":n,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&P?P(P([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!P?t:P(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":f,"%Object.getOwnPropertyDescriptor%":i,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":g,"%ReferenceError%":S,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!P?t:P(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&P?P(""[Symbol.iterator]()):t,"%Symbol%":E?Symbol:t,"%SyntaxError%":A,"%ThrowTypeError%":O,"%TypedArray%":G,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":s,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":_,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":q,"%Math.abs%":d,"%Math.floor%":y,"%Math.max%":h,"%Math.min%":m,"%Math.pow%":u,"%Math.round%":p,"%Math.sign%":w,"%Reflect.getPrototypeOf%":$};if(P)try{null.error}catch(W){var z=P(P(W));L["%Error.prototype%"]=z}var ee=function W(I){var B;if(I==="%AsyncFunction%")B=o("async function () {}");else if(I==="%GeneratorFunction%")B=o("function* () {}");else if(I==="%AsyncGeneratorFunction%")B=o("async function* () {}");else if(I==="%AsyncGenerator%"){var C=W("%AsyncGeneratorFunction%");C&&(B=C.prototype)}else if(I==="%AsyncIteratorPrototype%"){var U=W("%AsyncGenerator%");U&&P&&(B=P(U.prototype))}return L[I]=B,B},re={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},D=_e(),Q=Nn(),te=D.call(M,Array.prototype.concat),se=D.call(_,Array.prototype.splice),ae=D.call(M,String.prototype.replace),oe=D.call(M,String.prototype.slice),ie=D.call(M,RegExp.prototype.exec),ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,ue=function(I){var B=oe(I,0,1),C=oe(I,-1);if(B==="%"&&C!=="%")throw new A("invalid intrinsic syntax, expected closing `%`");if(C==="%"&&B!=="%")throw new A("invalid intrinsic syntax, expected opening `%`");var U=[];return ae(I,ne,function(k,J,H,j){U[U.length]=H?ae(j,V,"$1"):J||k}),U},fe=function(I,B){var C=I,U;if(Q(re,C)&&(U=re[C],C="%"+U[0]+"%"),Q(L,C)){var k=L[C];if(k===R&&(k=ee(C)),typeof k>"u"&&!B)throw new c("intrinsic "+I+" exists, but is not available. Please file an issue!");return{alias:U,name:C,value:k}}throw new A("intrinsic "+I+" does not exist!")};return Or=function(I,B){if(typeof I!="string"||I.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof B!="boolean")throw new c('"allowMissing" argument must be a boolean');if(ie(/^%?[^%]*%?$/,I)===null)throw new A("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var C=ue(I),U=C.length>0?C[0]:"",k=fe("%"+U+"%",B),J=k.name,H=k.value,j=!1,X=k.alias;X&&(U=X[0],se(C,te([0,1],X)));for(var de=1,le=!0;de<C.length;de+=1){var Y=C[de],ve=oe(Y,0,1),he=oe(Y,-1);if((ve==='"'||ve==="'"||ve==="`"||he==='"'||he==="'"||he==="`")&&ve!==he)throw new A("property names with quotes must have matching quotes");if((Y==="constructor"||!le)&&(j=!0),U+="."+Y,J="%"+U+"%",Q(L,J))H=L[J];else if(H!=null){if(!(Y in H)){if(!B)throw new c("base intrinsic for "+I+" exists, but the property is not available.");return}if(i&&de+1>=C.length){var ge=i(H,Y);le=!!ge,le&&"get"in ge&&!("originalValue"in ge.get)?H=ge.get:H=H[Y]}else le=Q(H,Y),H=H[Y];le&&!j&&(L[J]=H)}}return H},Or}var Ar,Dt;function Vt(){if(Dt)return Ar;Dt=1;var t=Cr(),f=Kt(),l=f([t("%String.prototype.indexOf%")]);return Ar=function(g,S){var A=t(g,!!S);return typeof A=="function"&&l(g,".prototype.")>-1?f([A]):A},Ar}var Er,It;function Jt(){if(It)return Er;It=1;var t=Cr(),f=Vt(),l=qe(),a=be(),g=t("%Map%",!0),S=f("Map.prototype.get",!0),A=f("Map.prototype.set",!0),c=f("Map.prototype.has",!0),s=f("Map.prototype.delete",!0),d=f("Map.prototype.size",!0);return Er=!!g&&function(){var h,m={assert:function(u){if(!m.has(u))throw new a("Side channel does not contain "+l(u))},delete:function(u){if(h){var p=s(h,u);return d(h)===0&&(h=void 0),p}return!1},get:function(u){if(h)return S(h,u)},has:function(u){return h?c(h,u):!1},set:function(u,p){h||(h=new g),A(h,u,p)}};return m},Er}var Pr,Ft;function Bn(){if(Ft)return Pr;Ft=1;var t=Cr(),f=Vt(),l=qe(),a=Jt(),g=be(),S=t("%WeakMap%",!0),A=f("WeakMap.prototype.get",!0),c=f("WeakMap.prototype.set",!0),s=f("WeakMap.prototype.has",!0),d=f("WeakMap.prototype.delete",!0);return Pr=S?function(){var h,m,u={assert:function(p){if(!u.has(p))throw new g("Side channel does not contain "+l(p))},delete:function(p){if(S&&p&&(typeof p=="object"||typeof p=="function")){if(h)return d(h,p)}else if(a&&m)return m.delete(p);return!1},get:function(p){return S&&p&&(typeof p=="object"||typeof p=="function")&&h?A(h,p):m&&m.get(p)},has:function(p){return S&&p&&(typeof p=="object"||typeof p=="function")&&h?s(h,p):!!m&&m.has(p)},set:function(p,w){S&&p&&(typeof p=="object"||typeof p=="function")?(h||(h=new S),c(h,p,w)):a&&(m||(m=a()),m.set(p,w))}};return u}:a,Pr}var Rr,$t;function Ln(){if($t)return Rr;$t=1;var t=be(),f=qe(),l=yn(),a=Jt(),g=Bn(),S=g||a||l;return Rr=function(){var c,s={assert:function(d){if(!s.has(d))throw new t("Side channel does not contain "+f(d))},delete:function(d){return!!c&&c.delete(d)},get:function(d){return c&&c.get(d)},has:function(d){return!!c&&c.has(d)},set:function(d,y){c||(c=S()),c.set(d,y)}};return s},Rr}var qr,Mt;function Tr(){if(Mt)return qr;Mt=1;var t=String.prototype.replace,f=/%20/g,l={RFC1738:"RFC1738",RFC3986:"RFC3986"};return qr={default:l.RFC3986,formatters:{RFC1738:function(a){return t.call(a,f,"+")},RFC3986:function(a){return String(a)}},RFC1738:l.RFC1738,RFC3986:l.RFC3986},qr}var _r,Ct;function Xt(){if(Ct)return _r;Ct=1;var t=Tr(),f=Object.prototype.hasOwnProperty,l=Array.isArray,a=function(){for(var n=[],o=0;o<256;++o)n.push("%"+((o<16?"0":"")+o.toString(16)).toUpperCase());return n}(),g=function(o){for(;o.length>1;){var i=o.pop(),b=i.obj[i.prop];if(l(b)){for(var v=[],O=0;O<b.length;++O)typeof b[O]<"u"&&v.push(b[O]);i.obj[i.prop]=v}}},S=function(o,i){for(var b=i&&i.plainObjects?{__proto__:null}:{},v=0;v<o.length;++v)typeof o[v]<"u"&&(b[v]=o[v]);return b},A=function n(o,i,b){if(!i)return o;if(typeof i!="object"&&typeof i!="function"){if(l(o))o.push(i);else if(o&&typeof o=="object")(b&&(b.plainObjects||b.allowPrototypes)||!f.call(Object.prototype,i))&&(o[i]=!0);else return[o,i];return o}if(!o||typeof o!="object")return[o].concat(i);var v=o;return l(o)&&!l(i)&&(v=S(o,b)),l(o)&&l(i)?(i.forEach(function(O,E){if(f.call(o,E)){var P=o[E];P&&typeof P=="object"&&O&&typeof O=="object"?o[E]=n(P,O,b):o.push(O)}else o[E]=O}),o):Object.keys(i).reduce(function(O,E){var P=i[E];return f.call(O,E)?O[E]=n(O[E],P,b):O[E]=P,O},v)},c=function(o,i){return Object.keys(i).reduce(function(b,v){return b[v]=i[v],b},o)},s=function(n,o,i){var b=n.replace(/\+/g," ");if(i==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},d=1024,y=function(o,i,b,v,O){if(o.length===0)return o;var E=o;if(typeof o=="symbol"?E=Symbol.prototype.toString.call(o):typeof o!="string"&&(E=String(o)),b==="iso-8859-1")return escape(E).replace(/%u[0-9a-f]{4}/gi,function(G){return"%26%23"+parseInt(G.slice(2),16)+"%3B"});for(var P="",q=0;q<E.length;q+=d){for(var $=E.length>=d?E.slice(q,q+d):E,_=[],M=0;M<$.length;++M){var R=$.charCodeAt(M);if(R===45||R===46||R===95||R===126||R>=48&&R<=57||R>=65&&R<=90||R>=97&&R<=122||O===t.RFC1738&&(R===40||R===41)){_[_.length]=$.charAt(M);continue}if(R<128){_[_.length]=a[R];continue}if(R<2048){_[_.length]=a[192|R>>6]+a[128|R&63];continue}if(R<55296||R>=57344){_[_.length]=a[224|R>>12]+a[128|R>>6&63]+a[128|R&63];continue}M+=1,R=65536+((R&1023)<<10|$.charCodeAt(M)&1023),_[_.length]=a[240|R>>18]+a[128|R>>12&63]+a[128|R>>6&63]+a[128|R&63]}P+=_.join("")}return P},h=function(o){for(var i=[{obj:{o},prop:"o"}],b=[],v=0;v<i.length;++v)for(var O=i[v],E=O.obj[O.prop],P=Object.keys(E),q=0;q<P.length;++q){var $=P[q],_=E[$];typeof _=="object"&&_!==null&&b.indexOf(_)===-1&&(i.push({obj:E,prop:$}),b.push(_))}return g(i),o},m=function(o){return Object.prototype.toString.call(o)==="[object RegExp]"},u=function(o){return!o||typeof o!="object"?!1:!!(o.constructor&&o.constructor.isBuffer&&o.constructor.isBuffer(o))},p=function(o,i){return[].concat(o,i)},w=function(o,i){if(l(o)){for(var b=[],v=0;v<o.length;v+=1)b.push(i(o[v]));return b}return i(o)};return _r={arrayToObject:S,assign:c,combine:p,compact:h,decode:s,encode:y,isBuffer:u,isRegExp:m,maybeMap:w,merge:A},_r}var xr,Tt;function Un(){if(Tt)return xr;Tt=1;var t=Ln(),f=Xt(),l=Tr(),a=Object.prototype.hasOwnProperty,g={brackets:function(n){return n+"[]"},comma:"comma",indices:function(n,o){return n+"["+o+"]"},repeat:function(n){return n}},S=Array.isArray,A=Array.prototype.push,c=function(w,n){A.apply(w,S(n)?n:[n])},s=Date.prototype.toISOString,d=l.default,y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:f.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:l.formatters[d],indices:!1,serializeDate:function(n){return s.call(n)},skipNulls:!1,strictNullHandling:!1},h=function(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="symbol"||typeof n=="bigint"},m={},u=function w(n,o,i,b,v,O,E,P,q,$,_,M,R,G,L,z,ee,re){for(var D=n,Q=re,te=0,se=!1;(Q=Q.get(m))!==void 0&&!se;){var ae=Q.get(n);if(te+=1,typeof ae<"u"){if(ae===te)throw new RangeError("Cyclic object value");se=!0}typeof Q.get(m)>"u"&&(te=0)}if(typeof $=="function"?D=$(o,D):D instanceof Date?D=R(D):i==="comma"&&S(D)&&(D=f.maybeMap(D,function(J){return J instanceof Date?R(J):J})),D===null){if(O)return q&&!z?q(o,y.encoder,ee,"key",G):o;D=""}if(h(D)||f.isBuffer(D)){if(q){var oe=z?o:q(o,y.encoder,ee,"key",G);return[L(oe)+"="+L(q(D,y.encoder,ee,"value",G))]}return[L(o)+"="+L(String(D))]}var ie=[];if(typeof D>"u")return ie;var ne;if(i==="comma"&&S(D))z&&q&&(D=f.maybeMap(D,q)),ne=[{value:D.length>0?D.join(",")||null:void 0}];else if(S($))ne=$;else{var V=Object.keys(D);ne=_?V.sort(_):V}var ue=P?String(o).replace(/\./g,"%2E"):String(o),fe=b&&S(D)&&D.length===1?ue+"[]":ue;if(v&&S(D)&&D.length===0)return fe+"[]";for(var W=0;W<ne.length;++W){var I=ne[W],B=typeof I=="object"&&I&&typeof I.value<"u"?I.value:D[I];if(!(E&&B===null)){var C=M&&P?String(I).replace(/\./g,"%2E"):String(I),U=S(D)?typeof i=="function"?i(fe,C):fe:fe+(M?"."+C:"["+C+"]");re.set(n,te);var k=t();k.set(m,re),c(ie,w(B,U,i,b,v,O,E,P,i==="comma"&&z&&S(D)?null:q,$,_,M,R,G,L,z,ee,k))}}return ie},p=function(n){if(!n)return y;if(typeof n.allowEmptyArrays<"u"&&typeof n.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof n.encodeDotInKeys<"u"&&typeof n.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(n.encoder!==null&&typeof n.encoder<"u"&&typeof n.encoder!="function")throw new TypeError("Encoder has to be a function.");var o=n.charset||y.charset;if(typeof n.charset<"u"&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=l.default;if(typeof n.format<"u"){if(!a.call(l.formatters,n.format))throw new TypeError("Unknown format option provided.");i=n.format}var b=l.formatters[i],v=y.filter;(typeof n.filter=="function"||S(n.filter))&&(v=n.filter);var O;if(n.arrayFormat in g?O=n.arrayFormat:"indices"in n?O=n.indices?"indices":"repeat":O=y.arrayFormat,"commaRoundTrip"in n&&typeof n.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof n.allowDots>"u"?n.encodeDotInKeys===!0?!0:y.allowDots:!!n.allowDots;return{addQueryPrefix:typeof n.addQueryPrefix=="boolean"?n.addQueryPrefix:y.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof n.allowEmptyArrays=="boolean"?!!n.allowEmptyArrays:y.allowEmptyArrays,arrayFormat:O,charset:o,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:y.charsetSentinel,commaRoundTrip:!!n.commaRoundTrip,delimiter:typeof n.delimiter>"u"?y.delimiter:n.delimiter,encode:typeof n.encode=="boolean"?n.encode:y.encode,encodeDotInKeys:typeof n.encodeDotInKeys=="boolean"?n.encodeDotInKeys:y.encodeDotInKeys,encoder:typeof n.encoder=="function"?n.encoder:y.encoder,encodeValuesOnly:typeof n.encodeValuesOnly=="boolean"?n.encodeValuesOnly:y.encodeValuesOnly,filter:v,format:i,formatter:b,serializeDate:typeof n.serializeDate=="function"?n.serializeDate:y.serializeDate,skipNulls:typeof n.skipNulls=="boolean"?n.skipNulls:y.skipNulls,sort:typeof n.sort=="function"?n.sort:null,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:y.strictNullHandling}};return xr=function(w,n){var o=w,i=p(n),b,v;typeof i.filter=="function"?(v=i.filter,o=v("",o)):S(i.filter)&&(v=i.filter,b=v);var O=[];if(typeof o!="object"||o===null)return"";var E=g[i.arrayFormat],P=E==="comma"&&i.commaRoundTrip;b||(b=Object.keys(o)),i.sort&&b.sort(i.sort);for(var q=t(),$=0;$<b.length;++$){var _=b[$],M=o[_];i.skipNulls&&M===null||c(O,u(M,_,E,P,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,q))}var R=O.join(i.delimiter),G=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?G+="utf8=%26%2310003%3B&":G+="utf8=%E2%9C%93&"),R.length>0?G+R:""},xr}var Dr,Nt;function Wn(){if(Nt)return Dr;Nt=1;var t=Xt(),f=Object.prototype.hasOwnProperty,l=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:t.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},g=function(m){return m.replace(/&#(\d+);/g,function(u,p){return String.fromCharCode(parseInt(p,10))})},S=function(m,u,p){if(m&&typeof m=="string"&&u.comma&&m.indexOf(",")>-1)return m.split(",");if(u.throwOnLimitExceeded&&p>=u.arrayLimit)throw new RangeError("Array limit exceeded. Only "+u.arrayLimit+" element"+(u.arrayLimit===1?"":"s")+" allowed in an array.");return m},A="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",s=function(u,p){var w={__proto__:null},n=p.ignoreQueryPrefix?u.replace(/^\?/,""):u;n=n.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=p.parameterLimit===1/0?void 0:p.parameterLimit,i=n.split(p.delimiter,p.throwOnLimitExceeded?o+1:o);if(p.throwOnLimitExceeded&&i.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(o===1?"":"s")+" allowed.");var b=-1,v,O=p.charset;if(p.charsetSentinel)for(v=0;v<i.length;++v)i[v].indexOf("utf8=")===0&&(i[v]===c?O="utf-8":i[v]===A&&(O="iso-8859-1"),b=v,v=i.length);for(v=0;v<i.length;++v)if(v!==b){var E=i[v],P=E.indexOf("]="),q=P===-1?E.indexOf("="):P+1,$,_;q===-1?($=p.decoder(E,a.decoder,O,"key"),_=p.strictNullHandling?null:""):($=p.decoder(E.slice(0,q),a.decoder,O,"key"),_=t.maybeMap(S(E.slice(q+1),p,l(w[$])?w[$].length:0),function(R){return p.decoder(R,a.decoder,O,"value")})),_&&p.interpretNumericEntities&&O==="iso-8859-1"&&(_=g(String(_))),E.indexOf("[]=")>-1&&(_=l(_)?[_]:_);var M=f.call(w,$);M&&p.duplicates==="combine"?w[$]=t.combine(w[$],_):(!M||p.duplicates==="last")&&(w[$]=_)}return w},d=function(m,u,p,w){var n=0;if(m.length>0&&m[m.length-1]==="[]"){var o=m.slice(0,-1).join("");n=Array.isArray(u)&&u[o]?u[o].length:0}for(var i=w?u:S(u,p,n),b=m.length-1;b>=0;--b){var v,O=m[b];if(O==="[]"&&p.parseArrays)v=p.allowEmptyArrays&&(i===""||p.strictNullHandling&&i===null)?[]:t.combine([],i);else{v=p.plainObjects?{__proto__:null}:{};var E=O.charAt(0)==="["&&O.charAt(O.length-1)==="]"?O.slice(1,-1):O,P=p.decodeDotInKeys?E.replace(/%2E/g,"."):E,q=parseInt(P,10);!p.parseArrays&&P===""?v={0:i}:!isNaN(q)&&O!==P&&String(q)===P&&q>=0&&p.parseArrays&&q<=p.arrayLimit?(v=[],v[q]=i):P!=="__proto__"&&(v[P]=i)}i=v}return i},y=function(u,p,w,n){if(u){var o=w.allowDots?u.replace(/\.([^.[]+)/g,"[$1]"):u,i=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,v=w.depth>0&&i.exec(o),O=v?o.slice(0,v.index):o,E=[];if(O){if(!w.plainObjects&&f.call(Object.prototype,O)&&!w.allowPrototypes)return;E.push(O)}for(var P=0;w.depth>0&&(v=b.exec(o))!==null&&P<w.depth;){if(P+=1,!w.plainObjects&&f.call(Object.prototype,v[1].slice(1,-1))&&!w.allowPrototypes)return;E.push(v[1])}if(v){if(w.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+w.depth+" and strictDepth is true");E.push("["+o.slice(v.index)+"]")}return d(E,p,w,n)}},h=function(u){if(!u)return a;if(typeof u.allowEmptyArrays<"u"&&typeof u.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof u.decodeDotInKeys<"u"&&typeof u.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(u.decoder!==null&&typeof u.decoder<"u"&&typeof u.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof u.charset<"u"&&u.charset!=="utf-8"&&u.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof u.throwOnLimitExceeded<"u"&&typeof u.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var p=typeof u.charset>"u"?a.charset:u.charset,w=typeof u.duplicates>"u"?a.duplicates:u.duplicates;if(w!=="combine"&&w!=="first"&&w!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var n=typeof u.allowDots>"u"?u.decodeDotInKeys===!0?!0:a.allowDots:!!u.allowDots;return{allowDots:n,allowEmptyArrays:typeof u.allowEmptyArrays=="boolean"?!!u.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof u.allowPrototypes=="boolean"?u.allowPrototypes:a.allowPrototypes,allowSparse:typeof u.allowSparse=="boolean"?u.allowSparse:a.allowSparse,arrayLimit:typeof u.arrayLimit=="number"?u.arrayLimit:a.arrayLimit,charset:p,charsetSentinel:typeof u.charsetSentinel=="boolean"?u.charsetSentinel:a.charsetSentinel,comma:typeof u.comma=="boolean"?u.comma:a.comma,decodeDotInKeys:typeof u.decodeDotInKeys=="boolean"?u.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof u.decoder=="function"?u.decoder:a.decoder,delimiter:typeof u.delimiter=="string"||t.isRegExp(u.delimiter)?u.delimiter:a.delimiter,depth:typeof u.depth=="number"||u.depth===!1?+u.depth:a.depth,duplicates:w,ignoreQueryPrefix:u.ignoreQueryPrefix===!0,interpretNumericEntities:typeof u.interpretNumericEntities=="boolean"?u.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof u.parameterLimit=="number"?u.parameterLimit:a.parameterLimit,parseArrays:u.parseArrays!==!1,plainObjects:typeof u.plainObjects=="boolean"?u.plainObjects:a.plainObjects,strictDepth:typeof u.strictDepth=="boolean"?!!u.strictDepth:a.strictDepth,strictNullHandling:typeof u.strictNullHandling=="boolean"?u.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof u.throwOnLimitExceeded=="boolean"?u.throwOnLimitExceeded:!1}};return Dr=function(m,u){var p=h(u);if(m===""||m===null||typeof m>"u")return p.plainObjects?{__proto__:null}:{};for(var w=typeof m=="string"?s(m,p):m,n=p.plainObjects?{__proto__:null}:{},o=Object.keys(w),i=0;i<o.length;++i){var b=o[i],v=y(b,w[b],p,typeof m=="string");n=t.merge(n,v,p)}return p.allowSparse===!0?n:t.compact(n)},Dr}var Ir,Bt;function Gn(){if(Bt)return Ir;Bt=1;var t=Un(),f=Wn(),l=Tr();return Ir={formats:l,parse:f,stringify:t},Ir}var Lt;function kn(){return Lt||(Lt=1,function(t){t.__esModule=!0;var f=Gn();function l(a,g){var S=a.split("?"),A=S[0],c=S[1],s=(c||"").split("#")[0],d=c&&c.split("#").length>1?"#"+c.split("#")[1]:"",y=f.parse(s);for(var h in g)y[h]=g[h];return s=f.stringify(y),s!==""&&(s="?"+s),A+s+d}t.default=l}(Ue)),Ue}var Fr,Ut;function Hn(){if(Ut)return Fr;Ut=1;var t=function(){function f(l,a,g,S){if(typeof l!="number")throw new TypeError("statusCode must be a number but was "+typeof l);if(a===null)throw new TypeError("headers cannot be null");if(typeof a!="object")throw new TypeError("headers must be an object but was "+typeof a);this.statusCode=l;var A={};for(var c in a)A[c.toLowerCase()]=a[c];this.headers=A,this.body=g,this.url=S}return f.prototype.isError=function(){return this.statusCode===0||this.statusCode>=400},f.prototype.getBody=function(l){if(this.statusCode===0){var a=new Error("This request to "+this.url+` resulted in a status code of 0. This usually indicates some kind of network error in a browser (e.g. CORS not being set up or the DNS failing to resolve):
5
+ `+this.body.toString());throw a.statusCode=this.statusCode,a.headers=this.headers,a.body=this.body,a.url=this.url,a}if(this.statusCode>=300){var a=new Error("Server responded to "+this.url+" with status code "+this.statusCode+`:
6
+ `+this.body.toString());throw a.statusCode=this.statusCode,a.headers=this.headers,a.body=this.body,a.url=this.url,a}return!l||typeof this.body=="string"?this.body:this.body.toString(l)},f}();return Fr=t,Fr}var Wt;function jn(){return Wt||(Wt=1,function(t,f){f.__esModule=!0;var l=kn(),a=Hn(),g=FormData;f.FormData=g;function S(A,c,s){var d=new XMLHttpRequest;if(typeof A!="string")throw new TypeError("The method must be a string.");if(c&&typeof c=="object"&&(c=c.href),typeof c!="string")throw new TypeError("The URL/path must be a string.");if(s==null&&(s={}),typeof s!="object")throw new TypeError("Options must be an object (or null).");A=A.toUpperCase(),s.headers=s.headers||{};var y,h=!!((y=/^([\w-]+:)?\/\/([^\/]+)/.exec(c))&&y[2]!=location.host);h||(s.headers["X-Requested-With"]="XMLHttpRequest"),s.qs&&(c=l.default(c,s.qs)),s.json&&(s.body=JSON.stringify(s.json),s.headers["content-type"]="application/json"),s.form&&(s.body=s.form),d.open(A,c,!1);for(var m in s.headers)d.setRequestHeader(m.toLowerCase(),""+s.headers[m]);d.send(s.body?s.body:null);var u={};return d.getAllResponseHeaders().split(`\r
7
+ `).forEach(function(p){var w=p.split(":");w.length>1&&(u[w[0].toLowerCase()]=w.slice(1).join(":").trim())}),new a(d.status,u,d.responseText,c)}f.default=S,t.exports=S,t.exports.default=S,t.exports.FormData=g}(Re,Re.exports)),Re.exports}var zn=jn();const Qn=cn(zn),Yt=["blockdiag","bpmn","bytefield","seqdiag","actdiag","nwdiag","packetdiag","rackdiag","c4","d2","dbml","ditaa","erd","excalidraw","graphviz","mermaid","nomnoml","pikchr","plantuml","structurizr","svgbob","symbolator","tikz","umlet","vega","vega-lite","wavedrom","wireviz"];function Kn(t,f){const l=t[f+1];if(l&&l.type==="html_block"){const a=l.content.match(/<!--\s*diagram-caption:(.+)-->/);return a?a[1].trim():""}return""}function Vn(t,f){const l=(void 0)("md5").update(f).digest("hex");return`${t}-${l}.svg`}function Jn(t,f,l,a={}){try{const g=t.replaceAll(`\r
8
+ `,`
9
+ `);if(!Yt.includes(f))throw new Error(`Unsupported diagram type: ${f}`);const S=a.diagramsDir?Le.resolve($r.cwd(),a.diagramsDir):Le.resolve($r.cwd(),"docs/public/diagrams");Be.mkdirSync(S,{recursive:!0});const A=Vn(f,g),c=Le.join(S,A);let s;if(!Be.existsSync(c)){const y=Qn("POST",`https://kroki.io/${f}`,{headers:{Accept:"image/svg+xml","Content-Type":"text/plain"},body:g});if(y.statusCode!==200)throw new Error(`HTTP error! status: ${y.statusCode}`);s=y.getBody("utf8"),Be.writeFileSync(c,s)}const d=a.publicPath??"diagrams";return`<figure class="vpd-diagram vpd-diagram--${f}">
10
+ <img
11
+ src="${d}/${A}"
12
+ alt="${f} Diagram"
13
+ class="vpd-diagram-image"
14
+ />
15
+ ${l?`<figcaption class="vpd-diagram-caption">
16
+ ${l}
17
+ </figcaption>`:""}
18
+ </figure>`}catch(g){const S=g instanceof Error?g.message:String(g);return console.error(`Error converting ${f} diagram:`,S),`<div class="diagram-error">Error converting diagram: ${S}</div>`}}function Xn(t,f={}){const l=t.renderer.rules.fence;t.renderer.rules.fence=(a,g,S,A,c)=>{const s=a[g],d=s.info.trim().toLowerCase();if(Yt.includes(d)){const y=s.content.trim(),h=Kn(a,g);return Jn(y,d,h,f)}return l(a,g,S,A,c)}}exports.configureDiagramsPlugin=Xn;