@mintlify/cli 4.1.92 → 4.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cli-DeJQBeq6.js → cli-BZ7NuW3R.js} +1 -1
- package/dist/{live-DyuIovPE.js → live-9n9BQVZs.js} +1 -1
- package/dist/live-D4XDHt1T.js +19 -0
- package/dist/{multi-repo-command-PpDZ2HkP.js → multi-repo-command-B8Mjapc9.js} +1 -1
- package/dist/{multi-repo-command-DWcqnTBc.js → multi-repo-command-BOkrmEqj.js} +1 -1
- package/dist/start.js +1 -1
- package/package.json +9 -9
- package/dist/live-B98Hesfx.js +0 -19
|
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
import{i as e,o as t,t as n}from"./rolldown-runtime-CEAe2Uac.js";import{B as r,C as i,D as a,G as o,J as s,L as c,N as l,R as u,V as d,W as f,Y as p,a as m,b as h,d as g,et as _,f as v,g as y,m as b,nt as x,p as S,q as C,r as w,t as T,v as E,y as D}from"./dist-Crde1L1h.js";import{$t as O,Bn as k,Cn as A,Fn as ee,Gt as j,Hn as te,In as ne,Ln as re,Mn as ie,Nn as ae,Qt as oe,Rn as se,St as ce,Tt as le,Vn as ue,Vt as de,Y as fe,Yn as pe,Zn as me,ir as he,it as ge,jn as _e,kn as ve,lr as ye,m as be,nt as xe,or as Se,ot as Ce,s as we,tr as Te,tt as Ee,wt as De,zt as Oe}from"./dist-ClUwKwwU.js";import{g as ke,h as M,m as Ae}from"./build-dp785b-C.js";import{a as je,i as Me,n as Ne}from"./multi-repo-command-PpDZ2HkP.js";import{c as Pe,l as Fe,n as Ie,t as Le,u as Re}from"./agent-Da2kI1tZ.js";import{A as ze,C as Be,D as Ve,E as He,F as Ue,I as We,L as N,M as Ge,N as Ke,O as qe,P as Je,R as Ye,S as Xe,T as Ze,_ as Qe,a as $e,b as et,c as tt,d as nt,f as rt,g as it,h as at,i as ot,j as st,k as ct,l as lt,m as ut,n as dt,o as ft,p as pt,r as mt,s as ht,t as gt,u as _t,v as vt,w as yt,x as bt,y as xt,z as St}from"./config-C5B1ZX2K.js";import{n as Ct,t as wt}from"./client-DXQ6Tgw0.js";import{_ as Tt,a as Et,b as Dt,c as Ot,d as kt,f as At,g as jt,h as Mt,i as Nt,l as Pt,m as Ft,n as It,o as Lt,p as Rt,r as zt,s as Bt,t as Vt,u as Ht,v as Ut}from"./esm-Bzf2rZuk.js";import{C as Wt,S as Gt,_ as Kt,a as qt,b as Jt,c as Yt,d as Xt,f as Zt,g as Qt,h as $t,i as en,l as tn,m as nn,o as rn,p as an,r as on,s as sn,u as cn,v as ln,x as un,y as dn}from"./live-B98Hesfx.js";import{P as fn,dt as pn,tt as mn}from"./utils-BUq37nH_.js";import{n as hn}from"./remark-utils-CV-HGimg.js";import{_ as gn,a as _n,c as vn,d as yn,f as bn,l as xn,m as Sn,o as Cn,p as wn,s as Tn,u as En,v as Dn}from"./schemas-CVKidklE.js";import{n as On,t as kn}from"./currencyMath-Bm2NMq0k.js";import{createRequire as An}from"node:module";import jn from"path";import{existsSync as Mn,readFileSync as Nn,readdirSync as Pn}from"node:fs";import{execFile as Fn,spawn as In}from"node:child_process";import Ln from"node:os";import Rn from"node:path";import{createHash as zn,randomUUID as Bn}from"node:crypto";import{fileURLToPath as Vn}from"node:url";import{format as Hn,stripVTControlCharacters as Un}from"node:util";import Wn,{mkdir as Gn,mkdtemp as Kn,readFile as qn,writeFile as Jn}from"node:fs/promises";import Yn from"node:process";import Xn,{promises as Zn}from"fs";import Qn from"crypto";import{createRequire as $n}from"module";import er from"os";import{setTimeout as tr}from"node:timers/promises";var P=x();const nr=(e,t)=>{let n=t.a+e.a-t.a*e.a;if(n===0)return{r:0,g:0,b:0,a:0};let r=t.a/n,i=(e,t)=>Math.round((1-r)*e+r*t);return{r:i(e.r,t.r),g:i(e.g,t.g),b:i(e.b,t.b),a:n}},rr=e=>{let t=/^#?([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e)?.[1];if(!t)throw TypeError(`Expected a valid hex string, got ${e}`);let n=t.length<6?[...t].map(e=>e+e).join(``):t,r=Number.parseInt(n.slice(0,6),16);return{red:r>>16,green:r>>8&255,blue:r&255,alpha:n.length===8?Number.parseInt(n.slice(6,8),16)/255:1}},ir=e=>{try{let t=rr(e);return`${t.red} ${t.green} ${t.blue}`}catch{return`0 0 0`}},ar=e=>`${e.r} ${e.g} ${e.b}`,or=e=>`#${e.r.toString(16).padStart(2,`0`)}${e.g.toString(16).padStart(2,`0`)}${e.b.toString(16).padStart(2,`0`)}`,sr=(e,t,n)=>{if(t)return n?t:ir(t);let r=cr(`#09090b`,1,e,.02);return n?or(r):ar(r)},cr=(e,t,n,r)=>{let i=rr(e),a=rr(n);return nr({r:i.red,g:i.green,b:i.blue,a:t},{r:a.red,g:a.green,b:a.blue,a:r})},lr=`#4ADE80`,ur=(e=lr)=>({light:`#ffffff`,dark:sr(e,void 0,!0)});function dr(e){let t=e?.colors.primary||`#16A34A`,n=e?.colors.light??lr;e?.theme===`linden`&&(e.background=Object.assign(Object.assign({},e.background),{color:{light:e.background?.color?.light||or(cr(`#FFFFFF`,1,t,.03)),dark:e.background?.color?.dark||or(cr(`#09090B`,1,n,.03))}}));let r=e?.background?.color?.light??`#ffffff`;return{light:ir(r),dark:sr(n,e?.background?.color?.dark),lightHex:r,darkHex:sr(n,e?.background?.color?.dark,!0),background:e?.thumbnails?.background}}var F=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},fr=/([A-Z])/g,pr=e=>e.replace(fr,`-$1`).toLowerCase(),mr={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},hr=/[&><"']/g,gr=e=>String(e).replace(hr,e=>mr[e]),_r=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?_r(e.body[0]):e:e.type===`font`?_r(e.body):e,vr=/* @__PURE__ */ new Set([`mathord`,`textord`,`atom`]),yr=e=>vr.has(_r(e).type),br=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},xr={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function Sr(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Cr(e){return e.default===void 0?Sr(Array.isArray(e.type)?e.type[0]:e.type):e.default}function wr(e,t,n,r){var i=n[t];e[t]=i===void 0?Cr(r):r.processor?r.processor(i):i}var Tr=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(xr)){var n=xr[t];n&&wr(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new F(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=br(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},Er=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Fr[Ir[this.id]]}sub(){return Fr[Lr[this.id]]}fracNum(){return Fr[Rr[this.id]]}fracDen(){return Fr[zr[this.id]]}cramp(){return Fr[Br[this.id]]}text(){return Fr[Vr[this.id]]}isTight(){return this.size>=2}},Dr=0,Or=1,kr=2,Ar=3,jr=4,Mr=5,Nr=6,Pr=7,Fr=[new Er(Dr,0,!1),new Er(Or,0,!0),new Er(kr,1,!1),new Er(Ar,1,!0),new Er(jr,2,!1),new Er(Mr,2,!0),new Er(Nr,3,!1),new Er(Pr,3,!0)],Ir=[jr,Mr,jr,Mr,Nr,Pr,Nr,Pr],Lr=[Mr,Mr,Mr,Mr,Pr,Pr,Pr,Pr],Rr=[kr,Ar,jr,Mr,Nr,Pr,Nr,Pr],zr=[Ar,Ar,Mr,Mr,Pr,Pr,Pr,Pr],Br=[Or,Or,Ar,Ar,Mr,Mr,Pr,Pr],Vr=[Dr,Or,kr,Ar,kr,Ar,kr,Ar],Hr={DISPLAY:Fr[Dr],TEXT:Fr[kr],SCRIPT:Fr[jr],SCRIPTSCRIPT:Fr[Nr]},Ur=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function Wr(e){for(var t=0;t<Ur.length;t++)for(var n=Ur[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var Gr=[];Ur.forEach(e=>e.blocks.forEach(e=>Gr.push(...e)));function Kr(e){for(var t=0;t<Gr.length;t+=2)if(e>=Gr[t]&&e<=Gr[t+1])return!0;return!1}var qr=e=>e+` `+e,Jr=80,Yr=function(e,t){return`M95,`+(622+e+t)+`
|
|
7
|
+
import{i as e,o as t,t as n}from"./rolldown-runtime-CEAe2Uac.js";import{B as r,C as i,D as a,G as o,J as s,L as c,N as l,R as u,V as d,W as f,Y as p,a as m,b as h,d as g,et as _,f as v,g as y,m as b,nt as x,p as S,q as C,r as w,t as T,v as E,y as D}from"./dist-Crde1L1h.js";import{$t as O,Bn as k,Cn as A,Fn as ee,Gt as j,Hn as te,In as ne,Ln as re,Mn as ie,Nn as ae,Qt as oe,Rn as se,St as ce,Tt as le,Vn as ue,Vt as de,Y as fe,Yn as pe,Zn as me,ir as he,it as ge,jn as _e,kn as ve,lr as ye,m as be,nt as xe,or as Se,ot as Ce,s as we,tr as Te,tt as Ee,wt as De,zt as Oe}from"./dist-ClUwKwwU.js";import{g as ke,h as M,m as Ae}from"./build-dp785b-C.js";import{a as je,i as Me,n as Ne}from"./multi-repo-command-B8Mjapc9.js";import{c as Pe,l as Fe,n as Ie,t as Le,u as Re}from"./agent-Da2kI1tZ.js";import{A as ze,C as Be,D as Ve,E as He,F as Ue,I as We,L as N,M as Ge,N as Ke,O as qe,P as Je,R as Ye,S as Xe,T as Ze,_ as Qe,a as $e,b as et,c as tt,d as nt,f as rt,g as it,h as at,i as ot,j as st,k as ct,l as lt,m as ut,n as dt,o as ft,p as pt,r as mt,s as ht,t as gt,u as _t,v as vt,w as yt,x as bt,y as xt,z as St}from"./config-C5B1ZX2K.js";import{n as Ct,t as wt}from"./client-DXQ6Tgw0.js";import{_ as Tt,a as Et,b as Dt,c as Ot,d as kt,f as At,g as jt,h as Mt,i as Nt,l as Pt,m as Ft,n as It,o as Lt,p as Rt,r as zt,s as Bt,t as Vt,u as Ht,v as Ut}from"./esm-Bzf2rZuk.js";import{C as Wt,S as Gt,_ as Kt,a as qt,b as Jt,c as Yt,d as Xt,f as Zt,g as Qt,h as $t,i as en,l as tn,m as nn,o as rn,p as an,r as on,s as sn,u as cn,v as ln,x as un,y as dn}from"./live-D4XDHt1T.js";import{P as fn,dt as pn,tt as mn}from"./utils-BUq37nH_.js";import{n as hn}from"./remark-utils-CV-HGimg.js";import{_ as gn,a as _n,c as vn,d as yn,f as bn,l as xn,m as Sn,o as Cn,p as wn,s as Tn,u as En,v as Dn}from"./schemas-CVKidklE.js";import{n as On,t as kn}from"./currencyMath-Bm2NMq0k.js";import{createRequire as An}from"node:module";import jn from"path";import{existsSync as Mn,readFileSync as Nn,readdirSync as Pn}from"node:fs";import{execFile as Fn,spawn as In}from"node:child_process";import Ln from"node:os";import Rn from"node:path";import{createHash as zn,randomUUID as Bn}from"node:crypto";import{fileURLToPath as Vn}from"node:url";import{format as Hn,stripVTControlCharacters as Un}from"node:util";import Wn,{mkdir as Gn,mkdtemp as Kn,readFile as qn,writeFile as Jn}from"node:fs/promises";import Yn from"node:process";import Xn,{promises as Zn}from"fs";import Qn from"crypto";import{createRequire as $n}from"module";import er from"os";import{setTimeout as tr}from"node:timers/promises";var P=x();const nr=(e,t)=>{let n=t.a+e.a-t.a*e.a;if(n===0)return{r:0,g:0,b:0,a:0};let r=t.a/n,i=(e,t)=>Math.round((1-r)*e+r*t);return{r:i(e.r,t.r),g:i(e.g,t.g),b:i(e.b,t.b),a:n}},rr=e=>{let t=/^#?([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e)?.[1];if(!t)throw TypeError(`Expected a valid hex string, got ${e}`);let n=t.length<6?[...t].map(e=>e+e).join(``):t,r=Number.parseInt(n.slice(0,6),16);return{red:r>>16,green:r>>8&255,blue:r&255,alpha:n.length===8?Number.parseInt(n.slice(6,8),16)/255:1}},ir=e=>{try{let t=rr(e);return`${t.red} ${t.green} ${t.blue}`}catch{return`0 0 0`}},ar=e=>`${e.r} ${e.g} ${e.b}`,or=e=>`#${e.r.toString(16).padStart(2,`0`)}${e.g.toString(16).padStart(2,`0`)}${e.b.toString(16).padStart(2,`0`)}`,sr=(e,t,n)=>{if(t)return n?t:ir(t);let r=cr(`#09090b`,1,e,.02);return n?or(r):ar(r)},cr=(e,t,n,r)=>{let i=rr(e),a=rr(n);return nr({r:i.red,g:i.green,b:i.blue,a:t},{r:a.red,g:a.green,b:a.blue,a:r})},lr=`#4ADE80`,ur=(e=lr)=>({light:`#ffffff`,dark:sr(e,void 0,!0)});function dr(e){let t=e?.colors.primary||`#16A34A`,n=e?.colors.light??lr;e?.theme===`linden`&&(e.background=Object.assign(Object.assign({},e.background),{color:{light:e.background?.color?.light||or(cr(`#FFFFFF`,1,t,.03)),dark:e.background?.color?.dark||or(cr(`#09090B`,1,n,.03))}}));let r=e?.background?.color?.light??`#ffffff`;return{light:ir(r),dark:sr(n,e?.background?.color?.dark),lightHex:r,darkHex:sr(n,e?.background?.color?.dark,!0),background:e?.thumbnails?.background}}var F=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},fr=/([A-Z])/g,pr=e=>e.replace(fr,`-$1`).toLowerCase(),mr={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},hr=/[&><"']/g,gr=e=>String(e).replace(hr,e=>mr[e]),_r=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?_r(e.body[0]):e:e.type===`font`?_r(e.body):e,vr=/* @__PURE__ */ new Set([`mathord`,`textord`,`atom`]),yr=e=>vr.has(_r(e).type),br=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},xr={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function Sr(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Cr(e){return e.default===void 0?Sr(Array.isArray(e.type)?e.type[0]:e.type):e.default}function wr(e,t,n,r){var i=n[t];e[t]=i===void 0?Cr(r):r.processor?r.processor(i):i}var Tr=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(xr)){var n=xr[t];n&&wr(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new F(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=br(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},Er=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Fr[Ir[this.id]]}sub(){return Fr[Lr[this.id]]}fracNum(){return Fr[Rr[this.id]]}fracDen(){return Fr[zr[this.id]]}cramp(){return Fr[Br[this.id]]}text(){return Fr[Vr[this.id]]}isTight(){return this.size>=2}},Dr=0,Or=1,kr=2,Ar=3,jr=4,Mr=5,Nr=6,Pr=7,Fr=[new Er(Dr,0,!1),new Er(Or,0,!0),new Er(kr,1,!1),new Er(Ar,1,!0),new Er(jr,2,!1),new Er(Mr,2,!0),new Er(Nr,3,!1),new Er(Pr,3,!0)],Ir=[jr,Mr,jr,Mr,Nr,Pr,Nr,Pr],Lr=[Mr,Mr,Mr,Mr,Pr,Pr,Pr,Pr],Rr=[kr,Ar,jr,Mr,Nr,Pr,Nr,Pr],zr=[Ar,Ar,Mr,Mr,Pr,Pr,Pr,Pr],Br=[Or,Or,Ar,Ar,Mr,Mr,Pr,Pr],Vr=[Dr,Or,kr,Ar,kr,Ar,kr,Ar],Hr={DISPLAY:Fr[Dr],TEXT:Fr[kr],SCRIPT:Fr[jr],SCRIPTSCRIPT:Fr[Nr]},Ur=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function Wr(e){for(var t=0;t<Ur.length;t++)for(var n=Ur[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var Gr=[];Ur.forEach(e=>e.blocks.forEach(e=>Gr.push(...e)));function Kr(e){for(var t=0;t<Gr.length;t+=2)if(e>=Gr[t]&&e<=Gr[t+1])return!0;return!1}var qr=e=>e+` `+e,Jr=80,Yr=function(e,t){return`M95,`+(622+e+t)+`
|
|
8
8
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
9
9
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
10
10
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
export{t as DIAGNOSTICS_DIR,n as reportPathOf,r as watchComponentUsage}from"./live-
|
|
7
|
+
export{t as DIAGNOSTICS_DIR,n as reportPathOf,r as watchComponentUsage}from"./live-D4XDHt1T.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createRequire as __mintCreateRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __mintFileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __mintDirname } from 'node:path';
|
|
4
|
+
const require = __mintCreateRequire(import.meta.url);
|
|
5
|
+
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __mintDirname(__filename);
|
|
7
|
+
import{o as e}from"./rolldown-runtime-CEAe2Uac.js";import{$ as t,A as n,O as r,Q as i,T as a,X as o,Y as s,Z as c,_ as l,et as u,n as d,nt as f,q as p,y as m}from"./dist-Crde1L1h.js";import{$t as h,Bt as g,C as _,Cn as v,Dn as ee,E as y,Et as te,Gt as b,Ht as ne,On as x,Q as S,Qt as re,Rt as C,St as w,U as T,Un as E,Vt as ie,X as ae,Yt as oe,Z as se,Zn as ce,Zt as le,_n as ue,a as de,bt as fe,er as pe,et as me,it as he,k as ge,nr as _e,o as ve,ot as ye,rn as be,st as xe,tr as Se,ur as Ce,vn as we,w as Te,wn as Ee,wt as De,yn as Oe,yt as ke,zt as Ae}from"./dist-ClUwKwwU.js";import{B as je,M as Me,P as Ne,Q as Pe,X as Fe,Z as Ie,_ as D,_t as Le,b as Re,c as ze,d as Be,r as Ve,s as He,st as Ue,t as We,tt as O,u as Ge,w as Ke,x as qe,y as Je}from"./utils-BUq37nH_.js";import{a as Ye,c as Xe,i as Ze,n as Qe,o as $e,r as et,s as tt,t as k}from"./remark-utils-CV-HGimg.js";import{n as nt,t as rt}from"./currencyMath-Bm2NMq0k.js";import{t as it}from"./watcher-CrrSXFeO.js";import at,{basename as ot,dirname as st,join as A,normalize as ct,parse as j,resolve as lt}from"path";import ut,{readFileSync as dt,watch as ft}from"node:fs";import pt from"node:os";import M from"node:path";import{createHash as mt}from"node:crypto";import ht from"node:fs/promises";import{existsSync as gt}from"fs";import{sep as _t}from"path/win32";function vt(e,t){let n=t>0?`_${t}`:``;return oe(`param-${e}${n}`,{decamelize:!0,separator:`-`})}function yt(e){return(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`)&&e.name===`Variation`}function bt(e){let t=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`is`);if(!t)return{kind:`missing`};if(typeof t.value==`string`){let e=t.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(!t.value)return{kind:`invalid`};let n=t.value.data?.estree,r=n?.body[0],i=r?.type===`ExpressionStatement`?r.expression:void 0;if(i?.type===`Literal`&&typeof i.value==`string`){let e=i.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`TemplateLiteral`&&i.expressions.length===0){let e=(i.quasis[0]?.value.cooked)?.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`ArrayExpression`){let e=[];for(let t of i.elements){if(t?.type!==`Literal`||typeof t.value!=`string`)return{kind:`invalid`};let n=t.value.trim();if(!n)return{kind:`invalid`};e.push(n)}return e.length>0?{kind:`valid`,ids:[...new Set(e)]}:{kind:`invalid`}}if(n)return{kind:`invalid`};let a=t.value.value.trim().match(/^(["'`])([\s\S]*)\1$/);return(a?.[2])?.trim()?{kind:`valid`,ids:[a[2].trim()]}:{kind:`invalid`}}const xt=[`h1`,`h2`,`h3`,`h4`],St=[`Accordion`,`AccordionGroup`,`Expandable`,`Update`,`Prompt`];function N(e,t){let n=e.find(e=>`name`in e&&e.name===t);if(n&&`value`in n&&typeof n.value==`string`)return n.value}const Ct=e=>e&&[...e].sort(),wt=e=>{if(typeof e==`string`)return e;let t=Ue(Xe(e.groups));return JSON.stringify([Ct(t?.includes),Ct(t?.excludes)])},Tt=(e,t)=>{if(t===void 0)return!0;let n=new Set(e?.map(wt));return t.every(e=>n.has(wt(e)))},Et=(e,t)=>{let n=i();return r=>{let i=[],a=!1,c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map,f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Set,m=s.includes(t?.mode??``);O(r,e=>{if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`)for(let t of e.data?.islandHeadings??[])n.reserve(t.slug);e.type===`mdxJsxFlowElement`&&e.name&&St.includes(e.name)&&O(e,t=>{t!==e&&p.add(t)});let t=e;if(Ye(t)){let n=$e(t),r=tt(n);Ze(n)?O(e,t=>{t!==e&&p.add(t)}):r&&O(e,t=>{t!==e&&d.set(t,[...d.get(t)??[],r])})}if(e.type===`mdxJsxFlowElement`&&e.name===`Steps`){let t=N(e.attributes,`titleSize`);if(t){let n=e=>{for(let r of e)r.type===`mdxJsxFlowElement`&&(r.name===`Step`?f.set(r,t):Be(r)&&n(r.children))};n(e.children)}}if(e.type===`mdxJsxFlowElement`&&e.name===`Tab`){let t=N(e.attributes,`id`),n=N(e.attributes,`title`),r=t??(n?h(et(e,n)):void 0);r&&O(e,e=>{c.set(e,r)})}if(e.type===`mdxJsxFlowElement`&&e.name===`View`){let t=N(e.attributes,`title`);t&&O(e,e=>{l.set(e,t)})}let r=e;if(yt(r)){let t=bt(r),n=t.kind===`valid`?t.ids:[];O(e,e=>{let t=u.get(e);u.set(e,t?t.filter(e=>n.includes(e)):n)})}});let g=(e,t)=>{if(!e.title.trim())return;if(t!==void 0&&Number(t)<=2){a=!0,i.push(e);return}let n=i;if(a){let t=i.at(-1);t&&!(t.depth>2&&t.depth>=e.depth)&&(t.tabId===void 0||t.tabId===e.tabId)&&(t.viewId===void 0||t.viewId===e.viewId)&&(t.variationIds===void 0||e.variationIds!==void 0&&e.variationIds.every(e=>t.variationIds?.includes(e)))&&Tt(e.authRules,t.authRules)&&(n=t.children)}n.push(e)};O(r,e=>{if(p.has(e))return;let t=c.get(e),r=l.get(e),i=u.get(e),a=d.get(e);if(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`){let o=e.data?.tableOfContents;if(!o?.length)return;let s=e=>{for(let t of e)n.reserve(t.slug),s(t.children)};s(o);for(let e of o)g(Object.assign(Object.assign({},e),{tabId:t,viewId:r,variationIds:i,authRules:a||e.authRules?[...a??[],...e.authRules??[]]:void 0}),e.depth);return}if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`){if(m)return;for(let{title:n,slug:o,depth:s}of e.data?.islandHeadings??[])g({title:n,slug:o,depth:s,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},s);return}let s=e.type===`heading`&&o.includes(e.depth),_=e.type===`mdxJsxFlowElement`&&xt.includes(e.name??``),v=e.type===`mdxJsxFlowElement`&&e.name===`Heading`,ee=e.type===`mdxJsxFlowElement`&&e.name===`Update`&&e.attributes.some(e=>`name`in e&&e.name===`label`),y=e.type===`mdxJsxFlowElement`&&e.name===`Step`?N(e.attributes,`titleSize`)??f.get(e):void 0,te=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`noAnchor`&&(e.value==null||e.value===`true`||typeof e.value==`object`&&e.value.value===`true`)),b=e.type===`mdxJsxFlowElement`&&e.name===`Step`?et(e,N(e.attributes,`title`)??``):void 0,ne=e.type===`mdxJsxFlowElement`&&e.name===`Step`&&!te&&[`h2`,`h3`].includes(y??``)&&b?.trim()!==``,x=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`id`);if(!s&&!_&&!v&&!ee&&!ne||m&&(s||_))return;let S;if(`name`in e&&e.name===`Update`)S=1,e.depth=1;else if(`name`in e&&e.name===`Step`)S={h2:2,h3:3,h4:4}[y??``]??3,e.depth=S;else if(`depth`in e)S=e.depth;else if(`name`in e&&e.name===`Heading`){let t=e.attributes.find(e=>`name`in e&&e.name===`level`);t&&`value`in t&&typeof t.value==`number`&&(S=t.value)}else if(`name`in e&&e.name?.[1]){let t=Number(e.name[1]);S=isNaN(t)?void 0:t,S!==void 0&&(e.depth=S)}let C=b??Qe(e),w,T=`name`in e&&(e.name===`Heading`||e.name===`Step`||e.name===`Update`)||x?N(e.attributes,`id`):void 0;w=T?n.claim(re(T)||h(C)):n.claim(h(C));let E;if(`name`in e&&e.name===`Update`){let t=N(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Step`){let t=N(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Heading`)E=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;else if(S!==void 0&&x){let t=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;E=[k(`level`,S),...t]}else S!==void 0&&!x&&(E=[k(`level`,S),k(`id`,w)],_&&e.attributes.length>0&&E.push(...e.attributes));e.attributes=E,e.type=`mdxJsxFlowElement`,e.name=e.name===`Update`?`Update`:e.name===`Step`?`Step`:`Heading`;let ie=e.depth;g({title:C,slug:w,depth:ie,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},S)}),e&&(e.tableOfContents=i)}},Dt=/* @__PURE__ */ new Set([`codeFenced`,`codeText`,`yaml`,`toml`]),Ot=[Me([`yaml`,`toml`]),je(),{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}],kt=e=>{let t=+!!e.startsWith(``),n=Ie(Pe({extensions:Ot}).document().write(Fe()(e.slice(t),void 0,!0))),r=[];for(let[e,i]of n)e===`enter`&&Dt.has(i.type)&&r.push([i.start.offset+t,i.end.offset+t]);return r},At=/* @__PURE__ */ new Set(/* @__PURE__ */ `Info.Warning.Note.Tip.Check.Danger.Callout.AccordionGroup.Card.CardGroup.Tabs.CodeGroup.Column.Columns.CustomCode.CustomComponent.DynamicCustomComponent.Expandable.Frame.GitHub.Github.Icon.Latex.Mermaid.Panel.Popup.Prompt.List.Quote.RequestExample.ResponseExample.SnippetGroup.Steps.Tile.Tooltip.Tree.FileTree.Variation.Visibility.MDX.Badge.Color.ZoomImage`.split(`.`)),jt=/* @__PURE__ */ new Set([`Heading`,`Step`,`Update`]),Mt=[`Example`,`Snippet`],Nt=e=>We.includes(e)||Mt.includes(e),Pt=[];function P(e){let t=-1;if(!e||!Array.isArray(e)&&!e.type)throw Error("Expected node, not `"+e+"`");if(`value`in e)return e.value;let n=(Array.isArray(e)?e:e.children)||Pt,r=[];for(;++t<n.length;)r[t]=P(n[t]);return r.join(``)}const Ft={}.hasOwnProperty;function It(e,t,n){let r=-1;if(!e)throw Error(`Iterate requires that |this| not be `+e);if(!Ft.call(e,`length`))throw Error("Iterate requires that |this| has a `length`");if(typeof t!=`function`)throw TypeError("`callback` must be a function");for(;++r<e.length;){if(!(r in e))continue;let i=t.call(n,e[r],r,e);typeof i==`number`&&(i<0&&(r=0),r=i-1)}}function F(e){return t;function t(e){if(!e||!e.children)throw Error("Missing children in `parent` for `modifier`");It(e.children,n,e)}function n(t,n){return e(t,n,this)}}const Lt=F(function(e,t,n){let r=n.children[t-1];if(r&&`children`in r&&`children`in e&&e.children.length>0){let i=-1;for(;e.children[++i];){let a=e.children[i];if(a.type===`WordNode`)return;if(a.type===`SymbolNode`||a.type===`PunctuationNode`){let i=P(a);return i!==`,`&&i!==`;`?void 0:(r.children.push(...e.children),r.position&&e.position&&(r.position.end=e.position.end),n.children.splice(t,1),t)}}}}),Rt=/^([!"').?\u0F3B\u0F3D\u169C\u2019\u201D\u2026\u203A\u203D\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00BB\]}])\1*$/,zt=/^[ \t]*((\r?\n|\r)[\t ]*)+$/,Bt=/^([!.?\u2026\u203D]+)$/,Vt=/^([&'\-.:=?@\u00AD\u00B7\u2010\u2011\u2019\u2027]|_+)$/,Ht=/^(?:[\d\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])+$/,Ut=/^\d/,Wt=/^(?:[a-z\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5F\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C1\uA7C3\uA7C8\uA7CA\uA7D1\uA7D3\uA7D5\uA7D7\uA7D9\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E\uDF25-\uDF2A]|\uD83A[\uDD22-\uDD43])/,Gt=/[\uD800-\uDFFF]/,Kt=/[!"'-),-/:;?[-\]_{}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\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\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u201F\u2022-\u2027\u2032-\u203A\u203C-\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-\u2E5D\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,qt=/[\dA-Za-z\u00AA\u00B2\u00B3\u00B5\u00B9\u00BA\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE6\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEFD-\uDF27\uDF30-\uDF54\uDF70-\uDF85\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC52-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF]/,Jt=/[\t-\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Yt=F(function(e,t,n){if(`children`in e&&e.children.length>0&&t>0){let r=n.children[t-1],i=e.children[0],a=e.children[1];if(r&&r.type===`SentenceNode`&&(i.type===`SymbolNode`||i.type===`PunctuationNode`)&&Rt.test(P(i)))return e.children.shift(),r.children.push(i),i.position&&r.position&&(r.position.end=i.position.end),a&&a.position&&e.position&&(e.position.start=a.position.start),t-1}}),Xt=F(function(e,t,n){if(e.type!==`SentenceNode`)return;let r=e.children,i=0;for(;++i<r.length-1;){let a=r[i];if(a.type!==`WhiteSpaceNode`||P(a).split(/\r\n|\r|\n/).length<3)continue;e.children=r.slice(0,i);let o={type:`SentenceNode`,children:r.slice(i+1)},s=r[i-1],c=r[i+1];if(n.children.splice(t+1,0,a,o),e.position&&s.position&&c.position){let t=e.position.end;e.position.end=s.position.end,o.position={start:c.position.start,end:t}}return t+1}}),Zt=F(function(e,t,n){if(`children`in e){let r=e.children[e.children.length-1];if(r&&r.type===`WhiteSpaceNode`){e.children.pop(),n.children.splice(t+1,0,r);let i=e.children[e.children.length-1];return i&&i.position&&e.position&&(e.position.end=i.position.end),t}}});function Qt(e){return t;function t(t){let n=t&&t.children,r=-1;if(!n)throw Error("Missing children in `parent` for `visit`");for(;++r in n;)e(n[r],r,t)}}const $t=Qt(function(e,t,n){if(`children`in e&&e.children){let r=e.children[0];if(r&&r.type===`WhiteSpaceNode`){e.children.shift(),n.children.splice(t,0,r);let i=e.children[0];i&&i.position&&e.position&&(e.position.start=i.position.start)}}}),en=F(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&P(e)===`-`){let r=n.children,i=r[t-1],a=r[t+1];if((!a||a.type!==`WordNode`)&&i&&i.type===`WordNode`)return r.splice(t,1),i.children.push(e),i.position&&e.position&&(i.position.end=e.position.end),t}}),tn=F(function(e,t,n){let r=n.children[t-1];if(r&&r.type===`SentenceNode`&&e.type===`SentenceNode`){let i=e.children[0];if(i&&i.type===`WordNode`&&Ut.test(P(i)))return r.children.push(...e.children),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t}}),nn=F(function(e,t,n){if(e.type===`SentenceNode`&&t>0){let r=n.children[t-1],i=e.children;if(i.length>0&&r.type===`SentenceNode`){let a=-1;for(;i[++a];){let o=i[a];if(o.type===`WordNode`)return Wt.test(P(o))?(r.children.push(...i),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t):void 0;if(o.type===`SymbolNode`||o.type===`PunctuationNode`)return}}}}),rn=F(function(e,t,n){if(e.type!==`SymbolNode`&&e.type!==`PunctuationNode`||P(e)!==`&`)return;let r=n.children,i=r[t+1];if(!(t>0&&r[t-1].type===`WordNode`||!(i&&i.type===`WordNode`)))return r.splice(t,1),i.children.unshift(e),i.position&&e.position&&(i.position.start=e.position.start),t-1}),an=F(function(e,t,n){if(t>0&&e.type===`PunctuationNode`&&P(e)===`.`){let r=n.children[t-1];if(r.type===`WordNode`&&r.children&&r.children.length!==1&&r.children.length%2!=0){let i=r.children.length,a=!0;for(;r.children[--i];){let e=r.children[i],t=P(e);if(i%2==0){if(t.length>1)return;Ht.test(t)||(a=!1)}else if(t!==`.`){if(i<r.children.length-2)break;return}}if(!a)return n.children.splice(t,1),r.children.push(e),r.position&&e.position&&(r.position.end=e.position.end),t}}}),on=F(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)){let e=n.children,r=e[t-1];if(r&&r.type===`WordNode`){let n=t-1,i=[],a=[];for(;e[++n];){let t=e[n];if(t.type===`WordNode`)i.push(...a,...t.children),a=[];else if((t.type===`SymbolNode`||t.type===`PunctuationNode`)&&Vt.test(P(t)))a.push(t);else break}if(i.length>0){a.length>0&&(n-=a.length),e.splice(t,n-t),r.children.push(...i);let o=i[i.length-1];return r.position&&o.position&&(r.position.end=o.position.end),t}}}}),sn=F(function(e,t,n){let r=n.children,i=r[t-1];if(i&&i.type===`WordNode`&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&P(e)===`/`){let n=P(i),a=e,o=[e],s=1,c=``,l=r[t+1];if(l&&l.type===`WordNode`&&(c=P(l),a=l,o.push(...l.children),s++),n.length<3&&(!c||c.length<3))return i.children.push(...o),r.splice(t,s),i.position&&a.position&&(i.position.end=a.position.end),t}}),cn=F(function(e,t,n){if(`children`in e){let r=-1;for(;e.children[++r];)if(e.children[r].type===`WordNode`)return;let i=n.children[t-1];if(i&&`children`in i)return i.children.push(...e.children),n.children.splice(t,1),i.position&&e.position&&(i.position.end=e.position.end),t;let a=n.children[t+1];a&&`children`in a&&(a.children.unshift(...e.children),a.position&&e.position&&(a.position.start=e.position.start),n.children.splice(t,1))}}),ln=/* @__PURE__ */ RegExp(`^([0-9]{1,3}|[a-z]|al|ca|cap|cca|cent|cf|cit|con|cp|cwt|ead|etc|ff|fl|ibid|id|nem|op|pro|seq|sic|stat|tem|viz)$`),un=F(function(e,t,n){if(`children`in e&&e.children.length>1){let r=e.children[e.children.length-1];if(r&&(r.type===`PunctuationNode`||r.type===`SymbolNode`)&&P(r)===`.`){let i=e.children[e.children.length-2];if(i&&i.type===`WordNode`&&ln.test(P(i).toLowerCase())){i.children.push(r),e.children.pop(),r.position&&i.position&&(i.position.end=r.position.end);let a=n.children[t+1];if(a&&a.type===`SentenceNode`)return e.children.push(...a.children),n.children.splice(t+1,1),a.position&&e.position&&(e.position.end=a.position.end),t-1}}}}),dn=Qt(function(e,t,n){if(`children`in e){let t=e.children.length,n=!1;for(;e.children[--t];){let r=e.children[t];if(r.type!==`SymbolNode`&&r.type!==`PunctuationNode`){r.type===`WordNode`&&(n=!0);continue}if(!Bt.test(P(r)))continue;if(!n){n=!0;continue}if(P(r)!==`.`)continue;let i=e.children[t-1],a=e.children[t+1];if(i&&i.type===`WordNode`){let n=e.children[t+2];if(a&&n&&a.type===`WhiteSpaceNode`&&P(n)===`.`)continue;e.children.splice(t,1),i.children.push(r),r.position&&i.position&&(i.position.end=r.position.end),t--}else a&&a.type===`WordNode`&&(e.children.splice(t,1),a.children.unshift(r),r.position&&a.position&&(a.position.start=r.position.start))}}}),fn=F(function(e,t,n){if(`children`in e&&e.children.length===0)return n.children.splice(t,1),t}),pn=Qt(function(e,t,n){let r=n.children;e.position&&t<1&&(!n.position||!n.position.start)&&(mn(n),n.position.start=e.position.start),!e.position||t!==r.length-1||n.position&&n.position.end||(mn(n),n.position.end=e.position.end)});function mn(e){e.position||={}}var hn=class{constructor(e,t){let n=t||e;this.doc=n?String(n):void 0,this.tokenizeRootPlugins=[...this.tokenizeRootPlugins],this.tokenizeParagraphPlugins=[...this.tokenizeParagraphPlugins],this.tokenizeSentencePlugins=[...this.tokenizeSentencePlugins]}parse(e){return this.tokenizeRoot(e||this.doc)}tokenizeRoot(e){let t={type:`RootNode`,children:gn(this.tokenizeParagraph(e),`WhiteSpaceNode`,zt)},n=-1;for(;this.tokenizeRootPlugins[++n];)this.tokenizeRootPlugins[n](t);return t}tokenizeParagraph(e){let t={type:`ParagraphNode`,children:gn(this.tokenizeSentence(e),`PunctuationNode`,Bt)},n=-1;for(;this.tokenizeParagraphPlugins[++n];)this.tokenizeParagraphPlugins[n](t);return t}tokenizeSentence(e){let t={type:`SentenceNode`,children:this.tokenize(e)},n=-1;for(;this.tokenizeSentencePlugins[++n];)this.tokenizeSentencePlugins[n](t);return t}tokenize(e){let t=[];if(!e)return t;let n={line:1,column:1,offset:0},r=0,i=0,a={...n},o,s;for(;i<e.length;){let l=e.charAt(i),u=Jt.test(l)?`WhiteSpaceNode`:Kt.test(l)?`PunctuationNode`:qt.test(l)?`WordNode`:`SymbolNode`;r<i&&o&&u&&(o!==u||o!==`WordNode`&&o!==`WhiteSpaceNode`&&l!==s&&!Gt.test(l))&&(t.push(c(o,e.slice(r,i))),r=i,a={...n}),l===`\r`||l===`
|
|
8
|
+
`&&s!==`\r`?(n.line++,n.column=1):l!==`
|
|
9
|
+
`&&n.column++,n.offset++,o=u,s=l,i++}return o&&r<i&&t.push(c(o,e.slice(r,i))),t;function c(e,t){return e===`WordNode`?{type:`WordNode`,children:[{type:`TextNode`,value:t,position:{start:a,end:{...n}}}],position:{start:a,end:{...n}}}:{type:e,value:t,position:{start:a,end:{...n}}}}}};hn.prototype.tokenizeSentencePlugins=[rn,en,on,sn,an,pn],hn.prototype.tokenizeParagraphPlugins=[cn,Yt,nn,tn,un,Lt,dn,$t,Zt,Xt,fn,pn],hn.prototype.tokenizeRootPlugins=[$t,Zt,fn,pn];function gn(e,t,n){let r=[],i=-1,a=0;for(;++i<e.children.length;){let o=e.children[i];if(i===e.children.length-1||o.type===t&&n.test(P(o))){let t={type:e.type,children:e.children.slice(a,i+1)},n=e.children[a],s=o;n.position&&s.position&&(t.position={start:n.position.start,end:s.position.end}),r.push(t),a=i+1}}return r}function _n(){let e=this;e.parser=t;function t(t){let n=new hn;return vn(n.tokenizeParagraphPlugins,e.data(`nlcstParagraphExtensions`)),vn(n.tokenizeRootPlugins,e.data(`nlcstRootExtensions`)),vn(n.tokenizeSentencePlugins,e.data(`nlcstSentenceExtensions`)),n.parse(t)}}function vn(e,t){t&&e.unshift(...t)}function yn(){let e=this;e.compiler=bn}function bn(e){return P(e)}var xn=f(),Sn=/* @__PURE__ */ e(xe(),1);const Cn=Ne().use(_n).use(yn).freeze(),wn=[`”`,`’`],Tn=[`“`,`‘`],En={};function Dn(e){let t=e||En,n=[];if(t.quotes!==!1&&n.push(In),t.ellipses===`spaced`?n.push(Pn):t.ellipses===`unspaced`?n.push(Fn):t.ellipses!==!1&&n.push(Nn),t.backticks===`all`){if(t.quotes!==!1)throw Error("Cannot accept `backticks: 'all'` with `quotes: true`");n.push(On)}else t.backticks!==!1&&n.push(kn);t.dashes===`inverted`?n.push(jn):t.dashes===`oldschool`?n.push(Mn):t.dashes!==!1&&n.push(An);let r={close:t.closingQuotes?[t.closingQuotes.double,t.closingQuotes.single]:wn,open:t.openingQuotes?[t.openingQuotes.double,t.openingQuotes.single]:Tn};return function(e){O(e,function(e,t,i){let a=-1;if(i&&t!==void 0&&(e.type===`PunctuationNode`||e.type===`SymbolNode`)){for(;++a<n.length;)if(n[a](r,e,t,i)===!0)return console.log(`drop`,e),i.children.splice(t,1),t}})}}function On(e,t,n,r){kn(e,t,n,r),t.value==="`"?t.value=`‘`:t.value===`'`&&(t.value=`’`)}function kn(e,t){t.value==="``"?t.value=`“`:t.value===`''`&&(t.value=`”`)}function An(e,t){t.value===`--`&&(t.value=`—`)}function jn(e,t,n,r){let i=r.children[n+1];if(t.value===`—`&&i&&i.type===`PunctuationNode`&&i.value===`-`)return i.value=`–`,!0;t.value===`---`?t.value=`–`:t.value===`--`&&(t.value=`—`)}function Mn(e,t,n,r){let i=r.children[n+1];if(t.value===`–`&&i&&i.type===`PunctuationNode`&&i.value===`-`)return i.value=`—`,!0;t.value===`---`?t.value=`—`:t.value===`--`&&(t.value=`–`)}function Nn(e,t,n,r){Pn(e,t,n,r),Fn(e,t,n,r)}function Pn(e,t,n,r){let i=t.value,a=r.children;if(!/^\.+$/.test(i))return;let o=[],s=n,c=1;for(;--s>0;){let e=a[s];if(e.type!==`WhiteSpaceNode`)break;let t=e;if(e=a[--s],e&&(e.type===`PunctuationNode`||e.type===`SymbolNode`)&&/^\.+$/.test(e.value))o.push(t,e),c++;else break}c<3||(a.splice(n-o.length,o.length),t.value=`…`)}function Fn(e,t){/^\.{3,}$/.test(t.value)&&(t.value=`…`)}function In(e,t,n,r){let i=r.children,a=t.value;if(a!==`"`&&a!==`'`)return;let o=a===`"`?0:1,s=i[n-1],c=i[n+1],l=i[n+2],u=c?P(c):``;c&&(c.type===`PunctuationNode`||c.type===`SymbolNode`)&&(!l||l.type!==`WordNode`)?t.value=e.close[o]:c&&(c.type===`PunctuationNode`||c.type===`SymbolNode`)&&(u===`"`||u===`'`)&&l&&l.type===`WordNode`?(t.value=e.open[o],c.value=e.open[u===`"`?0:1]):t.value=c&&/^\d\ds$/.test(u)?e.close[o]:s&&(s.type===`WhiteSpaceNode`||s.type===`PunctuationNode`||s.type===`SymbolNode`)&&c&&c.type===`WordNode`?e.open[o]:s&&s.type!==`WhiteSpaceNode`&&s.type!==`SymbolNode`&&s.type!==`PunctuationNode`||!c||c.type===`WhiteSpaceNode`||a===`'`&&u===`s`?e.close[o]:e.open[o]}const Ln=/* @__PURE__ */ new Set([`text`,`inlineCode`,`paragraph`]),Rn=/* @__PURE__ */ new Set([`style`,`script`]),zn=(e,t,n)=>n&&(n.type!==`mdxJsxTextElement`||`name`in n&&typeof n.name==`string`&&!Rn.has(n.name))&&Ln.has(e.type)&&(Vn(e)||Hn(e)),Bn=e=>{let t=Cn().use(Dn,{...e,ellipses:!1,dashes:!1,backticks:!1}),n=Cn().use(Dn,{...e,quotes:!1});return e=>{let r=``,i=0,a=[];O(e,zn,e=>{Vn(e)?r+=e.type===`text`?e.value:`A`.repeat(e.value.length):Hn(e)&&(r+=` `),a.push(e)}),/["']/.test(r)&&(r=t.processSync(r).toString());for(let e of a)if(Vn(e)){let t=i+e.value.length;if(e.type===`text`){let a=r.slice(i,t);e.value=/\.[\s\u0085]*\.|--|``|''/.test(a)?n.processSync(a).toString():a}i=t}else Hn(e)&&(i+=1)}};function Vn(e){return`value`in e&&typeof e.value==`string`}function Hn(e){return e.type===`paragraph`}const Un=(function(e){if(e==null)return Jn;if(typeof e==`string`)return Kn(e);if(typeof e==`object`)return Array.isArray(e)?Wn(e):Gn(e);if(typeof e==`function`)return qn(e);throw Error(`Expected function, string, or object as test`)});function Wn(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Un(e[n]);return qn(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}function Gn(e){return qn(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function Kn(e){return qn(t);function t(t){return t&&t.type===e}}function qn(e){return t;function t(t,...n){return!!(t&&typeof t==`object`&&`type`in t&&e.call(this,t,...n))}}function Jn(){return!0}function Yn(e){return`\x1B[33m`+e+`\x1B[39m`}const Xn=(function(e,t,n,r){typeof t==`function`&&typeof n!=`function`&&(r=n,n=t,t=null);let i=Un(t),a=r?-1:1;o(e,void 0,[])();function o(e,s,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Yn(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=[],u,d,f;if((!t||i(e,s,c[c.length-1]||null))&&(l=Zn(n(e,c)),l[0]===!1))return l;if(e.children&&l[0]!==`skip`)for(d=(r?e.children.length:-1)+a,f=c.concat(e);d>-1&&d<e.children.length;){if(u=o(e.children[d],d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+a}return l}}});function Zn(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:[e]}const Qn=(function(e,t,n,r){typeof t==`function`&&typeof n!=`function`&&(r=n,n=t,t=null),Xn(e,t,i,r);function i(e,t){let r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}}),$n=[`.mdx`,`.md`],er=[`.jpeg`,`.jpg`,`.jfif`,`.pjpeg`,`.pjp`,`.png`,`.svg`,`.svgz`,`.ico`,`.webp`,`.gif`,`.apng`,`.avif`,`.bmp`,`.mp4`,`.css`,`.xml`],tr=e=>!(e.dir===`node_modules`||e.dir.startsWith(`node_modules/`)),nr=e=>!(e.dir===`.github`||e.dir.startsWith(`.github/`)),rr=e=>$n.includes(e.ext),ir=e=>er.includes(e.ext),ar=e=>rr(e)||ir(e),or=e=>e.map(I).map(j).filter(tr),sr=e=>or(e).filter(rr).filter(nr),cr=e=>or(e).filter(ar).filter(nr),lr=e=>A(e.dir,e.base),ur=e=>A(e.dir,e.name),dr=e=>e.split(`#`)[0].split(`?`)[0],fr=(e,t=[])=>sr(ke(e,e,t)).map(lr),pr=(e,t=[])=>cr(ke(e,e,t)).map(lr),I=e=>ct(mr(e)),mr=e=>e.startsWith(`/`)?e.slice(1):e,L=e=>Buffer.from(e).toString();var R;(function(e){e.INTERNAL=`internal`,e.EXTERNAL=`external`,e.DATA=`data`})(R||={});const hr=e=>{try{return decodeURIComponent(e)}catch{return e}},gr=e=>/[:*]/.test(e);var z;(function(e){e.MD=`md`,e.SRC=`src`,e.HREF=`href`,e.CARD=`card`,e.IMPORT=`import`,e.DEFINITION=`definition`})(z||={});var _r;(function(e){e.CONTENT=`content`,e.NAVIGATION=`navigation`})(_r||={});var vr=class e{static getPathType(e){let t;return t=URL.canParse(e)?R.EXTERNAL:e.startsWith(`data:`)?R.DATA:R.INTERNAL,t}constructParsedPath(){let t=e.getPathType(this.originalPath),n,r;if(t===R.INTERNAL){let e=new URL(`mintlify:/`);e.pathname=`/${this.relativeDir}/${this.filename}`.replaceAll(_t,`/`),n=new URL(this.originalPath.replaceAll(_t,`/`),e);let t=hr(n.pathname).slice(1);t.endsWith(`/`)&&(t=t.slice(0,-1)),t===``&&(t=`.`),r=j(t)}else try{n=new URL(this.originalPath),r=n}catch{throw Error(`Failed to parse path as URL: ${this.originalPath}. If this is a purposefully malformed path, please wrap it in backticks, i.e \`${this.originalPath}\` `)}let i=n.hash?t===R.INTERNAL?hr(n.hash):n.hash:void 0,a=n.search?new URLSearchParams(n.search):void 0;return{path:r,pathType:t,anchorLink:i,queryParams:a}}constructor(e,t=``,n=``,r,i){this.originalPath=e,this.relativeDir=t,this.filename=n,this.wrapper=r,this.line=i,this.pagePaths=[],this.relativeDir=I(t);let{path:a,pathType:o,anchorLink:s,queryParams:c}=this.constructParsedPath();this.path=a,this.pathType=o,this.anchorLink=s,this.queryParams=c}toString(){if(this.pathType===R.INTERNAL){let e=this.path;return A(e.dir,e.base)}return this.path.toString()}getResolvedFiles(e,t){if(this.pathType!==R.INTERNAL||this.path instanceof URL)return[];let{dir:n,name:r,base:i}=j(this.toString()),a=[];return gt(lt(t,this.toString()))&&a.push(A(n,i)),a.push(...e.lookup(n,r,i)),a}keepsMdxExtension(){let e=this.wrapper===z.DEFINITION?this.originalPath:this.wrapper===z.MD||this.wrapper===z.HREF?t(A(this.relativeDir,this.filename),this.originalPath,!0):void 0;return e!==void 0&&/\.mdx$/i.test(dr(e))}resolvesTo(e,t,n){return this.pathType===R.INTERNAL&&!!(this.toString()===e.toString()||this.getResolvedFiles(t,n).includes(e.toString()))}static filterMapInternalPaths(t){return t.map(t=>new e(t)).filter(({pathType:e})=>e===R.INTERNAL).map(e=>e.toString())}},yr=class e{constructor(t){this.byDirAndName=/* @__PURE__ */ new Map,t.forEach((t,n)=>{let r=t.startsWith(`/`)?t.slice(1):t,{dir:i,name:a}=j(r),o=e.key(i,a),s=[n,r],c=this.byDirAndName.get(o);c?c.push(s):this.byDirAndName.set(o,[s])})}static key(e,t){return`${e}\0${t}`}lookup(t,n,r){let i=this.byDirAndName.get(e.key(t,n))??[],a=r===n?[]:this.byDirAndName.get(e.key(t,r))??[];return[...i,...a].sort(([e],[t])=>e-t).map(([,e])=>e)}},br=class{constructor(e,t=[]){this.label=e,this.paths=t,this.edges=[],this.headingSlugs=null,this.relativeDir=I(st(e)),this.filename=ot(e),this.label=A(this.relativeDir,this.filename)}toString(){return this.label}equals(e){return this.label===e.label}addPath(e,t,n){let r=new vr(e,this.relativeDir,this.filename,t,n);this.paths.push(r)}addOutgoingEdge(e){let t=this.edges.find(t=>t.equals(e));t?t.incrementCount():this.edges.push(e)}getChildNodes(e=1){let t=[];for(let n of this.edges){let r=n.target;t.push(r),e>1&&t.push(...r.getChildNodes(e-1))}return t}},xr=class{constructor(e,t,n){this.source=e,this.target=t,this.edgeType=n,this.count=0,this.count++}incrementCount(){this.count++}getCount(){return this.count}equals(e){return this.source.equals(e.source)&&this.target.equals(e.target)&&this.edgeType===e.edgeType}},Sr=class{constructor(e,t=[]){this.baseDir=e,this.nodes=Object.create(null),this.edges=[],this.fileResolutionMap=/* @__PURE__ */ new Map,this.redirectMap=/* @__PURE__ */ new Map,this.wildcardRedirects=[],this.configRedirects=[],this.mintIgnoreGlobs=[],this.virtualNodes=/* @__PURE__ */ new Set,this.snippetReferencesByFile=/* @__PURE__ */ new Map,this.baseDir=lt(e),this.mintIgnoreGlobs=t,this.mintIgnoreMatcher=w(t)}addNode(e){return this.nodes[e]||(this.nodes[e]=new br(e)),this.nodes[e]}addNodes(e){for(let t of e)this.addNode(t)}addVirtualNodes(e){for(let t of e)this.addNode(t),this.virtualNodes.add(new br(t).toString())}setRedirects(e){this.configRedirects=e,this.redirectMap.clear();for(let t of e){let e=I(t.source);this.redirectMap.has(e)||this.redirectMap.set(e,I(t.destination))}this.wildcardRedirects=[...this.redirectMap].filter(([e])=>gr(e))}matchesWildcardPattern(e,t){let n=`^${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/:(\w+)/g,`(?<$1>[^/]+)`).replace(/\\\*/g,`(.*)`)}$`;return new RegExp(n).test(e)}applyWildcardRedirect(e,t,n){let r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=[],a=r.replace(/:(\w+)/g,(e,t)=>(i.push({type:`param`,name:t}),`(?<${t}>[^/]+)`)).replace(/\\\*/g,()=>(i.push({type:`wildcard`}),`(.*)`)),o=RegExp(`^${a}$`),s=e.match(o);if(!s)return n;let c=n,l=s.groups||{};for(let[e,t]of Object.entries(l))c=c.replace(RegExp(`:${e}`,`g`),t);let u=s.slice(1),d=0,f=u.filter((e,t)=>i[t]&&i[t].type===`wildcard`);return c=c.replace(/\*/g,()=>f[d++]||``),c}addAliasNodes(){let e=vr.filterMapInternalPaths(fe(this.baseDir,this.baseDir,this.mintIgnoreGlobs)).filter(e=>!De(e,this.mintIgnoreMatcher));this.addNodes(e)}getNode(e){return this.nodes[e]}getAnchorTargetFiles(e){this.fileResolutionMap.size===0&&this.precomputeFileResolutions();let t=new Set(Object.keys(this.nodes)),n=/* @__PURE__ */ new Set;for(let r of Object.values(this.nodes))for(let i of r.paths.flatMap(e=>[e,...e.pagePaths]))if(i.pathType===R.INTERNAL&&i.anchorLink&&e.has(A(i.relativeDir,i.filename)))for(let e of this.getHeadingSlugCandidates(i.toString(),t)){let t=this.nodes[e];if(t&&(n.add(e),t.headingSlugs!==null))break}return n}addEdge(e,t,n=_r.CONTENT){let r=new xr(e,t,n);return this.edges.find(e=>e.equals(r)?(e.incrementCount(),!0):!1)||(this.edges.push(r),r)}addEdgesBetweenNodes(){let e=new yr(pr(this.baseDir,this.mintIgnoreGlobs));for(let t of Object.values(this.nodes))for(let n of t.paths)if(n.pathType===R.INTERNAL){let r=Object.values(this.nodes).find(t=>n.resolvesTo(t,e,this.baseDir));if(r){let e=this.addEdge(t,r);t.addOutgoingEdge(e)}}}precomputeFileResolutions(){let e=new yr(pr(this.baseDir,this.mintIgnoreGlobs)),t=/* @__PURE__ */ new Set;Object.values(this.nodes).forEach(n=>{n.paths.flatMap(e=>[e,...e.pagePaths]).filter(e=>e.pathType===R.INTERNAL).forEach(n=>{let r=n.toString();if(t.has(r))return;t.add(r);let i=n.getResolvedFiles(e,this.baseDir);this.fileResolutionMap.set(r,new Set(i))})})}getHeadingSlugCandidates(e,t){let n=[...this.fileResolutionMap.get(e)??[]].filter(e=>t.has(e)),r=A(e,`index.mdx`),i=this.nodes[r]?r:A(e,`index.md`);return[...n,e,i]}getHeadingSlugsForPath(e,t){for(let n of this.getHeadingSlugCandidates(e,t)){let e=this.nodes[n];if(e&&e.headingSlugs!==null)return e.headingSlugs}}getBrokenInternalLinks(e){this.fileResolutionMap.size===0&&this.precomputeFileResolutions();let t=/* @__PURE__ */ new Set,n=new Set(Object.values(this.nodes).map(e=>e.toString()));for(let r of Object.values(this.nodes))for(let i of r.paths.flatMap(e=>[e,...e.pagePaths]))if(i.pathType===R.INTERNAL){let r=i.toString(),a=this.fileResolutionMap.get(r),o=r===`.`||a&&[...a].some(e=>n.has(e))||this.virtualNodes.has(r);if(i.keepsMdxExtension()&&!this.redirectsToPage(r)||!o&&!this.reachesPage(r))t.add(i);else if(e?.checkAnchors&&i.anchorLink){let e=re(i.anchorLink.slice(1)),a=this.getHeadingSlugsForPath(r,n);a&&!a.has(e)&&t.add(i)}}return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>t.has(e)&&(e.pagePaths.length===0||e.pagePaths.some(e=>t.has(e))))}getLinksTo(e){let t=this.getPageRoute(e.toString()),n=n=>n.pathType===R.INTERNAL&&!n.originalPath.startsWith(`#`)&&this.getPageRoute(n.toString())===t&&(!e.anchorLink||n.anchorLink===e.anchorLink);return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>n(e)||e.pagePaths.some(n))}getPageRoute(e){let t=[...this.getPageCandidates(e),e].find(e=>this.nodes[e])??e,n=j(t),r=rr(n)?ur(n):t;return ot(r)===`index`?st(r):r}getPageCandidates(e){return e===`.`?[`index.mdx`,`index.md`]:[`${e}.mdx`,`${e}.md`,A(e,`index.mdx`),A(e,`index.md`)]}isPageRoute(e){return this.getPageCandidates(e).some(e=>this.nodes[e])||this.virtualNodes.has(e)}resolvesToValidPath(e,t=/* @__PURE__ */ new Set){if(URL.canParse(e))return!0;let n=dr(e);return!n||gr(n)?!0:this.reachesPage(I(n),t)}redirectsToPage(e){let t=this.getRedirectTarget(e);return t!==void 0&&this.resolvesToValidPath(t,/* @__PURE__ */ new Set([e]))}reachesPage(e,t=/* @__PURE__ */ new Set){if(t.has(e))return!1;t.add(e);let n=this.getExactRedirectTarget(e);if(n!==void 0)return this.resolvesToValidPath(n,t);if(e!==`.`&&this.nodes[e]||this.isPageRoute(e))return!0;let r=this.getRedirectTarget(e);return r!==void 0&&this.resolvesToValidPath(r,t)}getExactRedirectTarget(e){return this.redirectMap.get(e)}getRedirectTarget(e){let t=this.getExactRedirectTarget(e);if(t!==void 0)return t;for(let[t,n]of this.wildcardRedirects)if(this.matchesWildcardPattern(e,t))return this.applyWildcardRedirect(e,t,n)}getBrokenRedirects(){let e=[],t=/* @__PURE__ */ new Set;for(let{source:n,destination:r}of this.configRedirects){let i=I(n);t.has(i)||(t.add(i),URL.canParse(r)||gr(dr(r))||this.resolvesToValidPath(r)||e.push({source:n,destination:r}))}return e}getExternalPathsByNode(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(this.nodes)){let r=n.paths.filter(e=>e.pathType===R.EXTERNAL);r.length>0&&e.set(t,r)}return e}getAllInternalPaths(){return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>e.pathType===R.INTERNAL).map(e=>e.originalPath+` => `+e.toString())}},Cr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const wr=e=>Cr(void 0,void 0,void 0,function*(){for(let t of[`docs.json`,`mint.json`]){let n=at.join(e,t);if(Sn.default.existsSync(n))try{let r=yield Sn.default.readJSON(n),{resolved:i}=yield ye(r,e);if(i&&typeof i==`object`&&!Array.isArray(i))return{configFile:t,json:i}}catch(e){console.warn(`Warning: Failed to read or resolve ${t}: ${e}`)}}return null}),Tr=e=>Cr(void 0,void 0,void 0,function*(){let t=yield wr(e);return t?t.configFile===`docs.json`?Se(pe(t.json)):_e(t.json):null}),Er=e=>Cr(void 0,void 0,void 0,function*(){let t=yield wr(e);if(!t||t.configFile!==`docs.json`)return null;let n=Se(pe(t.json));return n.success?n.data:null});var Dr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Or=e=>Dr(void 0,void 0,void 0,function*(){let t=yield Er(e);if(!t)return[];let{generatedRoutes:n}=yield y(t,t=>ge(t,e),{onSourceError:(e,t)=>console.warn(`Warning: Failed to load GraphQL schema ${e}: ${t}`)});return n});var kr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Ar=e=>typeof e==`string`&&e!==``&&E(e)===void 0&&te(e)===void 0,jr=e=>{if(typeof e!=`object`||!e)return[];if(Array.isArray(e))return e.flatMap(jr);let t=e,n=[];if(typeof t.href==`string`&&n.push(t.href),Ar(t.root)&&n.push(t.root.startsWith(`/`)?t.root:`/${t.root}`),Array.isArray(t.pages))for(let e of t.pages)Ar(e)&&n.push(e.startsWith(`/`)?e:`/${e}`);for(let e of Object.values(t))n.push(...jr(e));return n},Mr=e=>kr(void 0,void 0,void 0,function*(){let t=yield wr(e);if(t&&t.json.navigation)return{hrefs:jr(t.json.navigation),configFile:t.configFile}});var Nr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Pr=(e,t)=>Nr(void 0,void 0,void 0,function*(){let n=[];try{let r=yield Er(e),i=r?ce(r):void 0,a=yield de(e,{explicitOverlays:i,fetchRemoteDocument:t?.fetchRemoteDocument});if(r){let o=yield ve(e,{explicitOverlays:i,fetchRemoteDocument:t?.fetchRemoteDocument}),s=yield Fr(r,o,t?.fetchRemoteDocument),c=[...a,...s],l={};try{yield _(r.navigation,c,l,{writeFiles:!1,overlayRegistry:o,fetchRemoteDocument:t?.fetchRemoteDocument})}catch(e){console.warn(`Warning: Failed to extract OpenAPI pages from navigation: ${e}`)}n.push(...Object.keys(l))}for(let e of a)try{let{pagesAcc:t}=yield T(e.spec,{openApiFilePath:e.originalFileLocation,writeFiles:!1,outDir:`api-reference`});n.push(...Object.keys(t))}catch(t){console.warn(`Warning: Failed to extract pages from OpenAPI spec ${e.originalFileLocation}: ${t}`)}}catch(e){console.warn(`Warning: Failed to categorize files for OpenAPI extraction: ${e}`)}return[...new Set(n)]}),Fr=(e,t,n)=>Nr(void 0,void 0,void 0,function*(){try{return yield Te(`docs`,e,void 0,t,n)}catch(e){return console.warn(`Warning: Failed to fetch URL-based OpenAPI specs: ${e}`),[]}});var Ir=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Lr=e=>Ir(void 0,void 0,void 0,function*(){let t=[],n=yield Tr(e);return n&&n.success&&`redirects`in n.data&&n.data.redirects&&t.push(...n.data.redirects),t}),Rr=[`ImportDefaultSpecifier`,`ImportNamespaceSpecifier`],zr=e=>{let t=[],n=[],r=[],i=/* @__PURE__ */ new Set;Qn(e,e=>{if(ze(e)&&Ve(e)){for(let n of e.data.estree.body){if(!He(n)||typeof n.source.value!=`string`)continue;let e=L(n.source.value);t.push(e);for(let t of n.specifiers)Rr.includes(t.type)&&r.push({source:e,name:t.local.name})}return}if(!Ge(e)||!e.name||(i.add(e.name),e.name!==`Snippet`))return;let a=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`file`)?.value;typeof a==`string`&&n.push(`/_snippets/`+mr(L(a)))});for(let{source:e,name:t}of r)i.has(t)&&n.push(e);return{imported:t,rendered:n}},Br=[`snippets/`,`_snippets/`],B=e=>e.replaceAll(_t,`/`),Vr=({originalPath:e,pathType:t,wrapper:n})=>n!==z.IMPORT&&t===R.INTERNAL&&!e.startsWith(`/`),Hr=(e,t)=>{var n;let r=new Map([...t.keys()].map(e=>[B(e),e])),i=(e,t)=>e.flatMap(e=>{let n=Oe(e,B(t)),i=n&&r.get(mr(n));return i?[i]:[]}),a=/* @__PURE__ */ new Set;for(let[e,{imported:n}]of t){let t=B(e).toLowerCase();Br.some(e=>t.startsWith(e))&&a.add(e);for(let t of i(n,e))a.add(t)}let o=(e,n)=>{let r=t.get(e)?.rendered??[];for(let t of i(r,e))!n.has(t)&&a.has(t)&&(n.add(t),o(t,n));return n},s=/* @__PURE__ */ new Map;for(let e of t.keys())a.has(e)||s.set(e,o(e,/* @__PURE__ */ new Set));for(let[t,r]of s){let i=e.getNode(t);if(i)for(let t of r){let r=e.getNode(t);for(let e of r?.paths.filter(Vr)??[])e.pagePaths.push(new vr(e.originalPath,i.relativeDir,i.filename,e.wrapper));for(let e of r?.headingSlugs??[])(n=i.headingSlugs)==null||n.add(e)}}},Ur=(e,t,n)=>{let r=/* @__PURE__ */ new Set;if(!n.checkAnchors&&!n.checkSnippets)return r;let i=n.checkAnchors?[...e.getAnchorTargetFiles(t)]:[];for(let e of i)r.add(B(e));let a=new Map([...e.snippetReferencesByFile.keys()].map(e=>[B(e),e])),o=/* @__PURE__ */ new Set,s=t=>{if(o.has(t))return;o.add(t);let n=a.get(t),i=n?e.snippetReferencesByFile.get(n)?.rendered??[]:[];for(let e of i){let n=Oe(e,t);if(!n)continue;let i=mr(n);r.add(i),s(i)}};for(let e of[...t,...i])s(B(e));return r};var Wr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Gr=e=>{let t=/* @__PURE__ */ new Set;for(let n of e){t.add(le(n.slug));for(let e of Gr(n.children))t.add(e)}return t},Kr=/* @__PURE__ */ new Set([`ParamField`,`Param`,`ResponseField`]),qr=/* @__PURE__ */ new Set([`query`,`path`,`body`,`header`,`name`]),Jr=e=>{let t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map;return Qn(e,`mdxJsxFlowElement`,e=>{if(Kr.has(e.name??``)){let r=e.attributes.find(e=>`name`in e&&qr.has(e.name));if(r&&typeof r.value==`string`&&r.value){let e=n.get(r.value)??0;n.set(r.value,e+1),t.add(vt(r.value,e))}return}if(At.has(e.name??``))return;let r=e.attributes.find(e=>`name`in e&&e.name===`id`);if(r&&typeof r.value==`string`&&r.value){let n=jt.has(e.name??``)?le(r.value):r.value;t.add(n)}}),t},Yr=e=>{if(typeof e==`string`)return e;let t=(e?.data?.estree)?.body[0],n=t?.type===`ExpressionStatement`?t.expression:void 0;if(n?.type===`Literal`&&typeof n.value==`string`)return n.value;if(n?.type===`TemplateLiteral`&&n.expressions.length===0)return n.quasis[0]?.value.cooked??void 0},Xr=(e,t,n)=>Wr(void 0,void 0,void 0,function*(){let r={},i=()=>t=>{let n=/* @__PURE__ */ new Set;return Qn(t,[`linkReference`,`imageReference`],e=>{`identifier`in e&&n.add(e.identifier)}),Qn(t,t=>{let r=t.position?.start.line,i=r===void 0?void 0:s[r-1];if(t.type===`link`||t.type===`image`){e.addPath(L(t.url),z.MD,i);return}if(t.type===`definition`){n.delete(t.identifier)&&e.addPath(L(t.url),z.DEFINITION,i);return}let a=t;if(a.name===`img`||a.name===`source`){let t=a.attributes.findIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`src`),n=Yr(a.attributes[t]?.value);if(typeof n==`string`){e.addPath(L(n),z.SRC,i);return}}else if(a.name===`a`||a.name===`Card`){let t=a.attributes.findIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`href`),n=Yr(a.attributes[t]?.value);if(typeof n==`string`){e.addPath(L(n),z.HREF,i);return}}}),t},a=ee(t),o=Ke(a),s=qe(a),l=v().use(Bn).use(i).use(c).use(Et,r),u=l.parse(o),d=zr(u);if(n?.checkSnippets)for(let t of d.imported)e.addPath(t,z.IMPORT);yield l.run(u);let f=r.tableOfContents?Gr(r.tableOfContents):/* @__PURE__ */ new Set,p=Jr(u);return e.headingSlugs=/* @__PURE__ */ new Set([...f,...p]),d}),Zr=(e,t)=>Wr(void 0,void 0,void 0,function*(){let n=e||process.cwd(),r=yield he(n),i=w(r),a=new Sr(n,r),o=pr(n,r).filter(e=>!De(e,i));a.addNodes(o);let s=yield Lr(n);a.setRedirects(s),a.addAliasNodes();try{let e=yield Pr(n,{fetchRemoteDocument:t?.fetchRemoteDocument});a.addVirtualNodes(e)}catch(e){console.warn(`Warning: Failed to extract OpenAPI page paths: ${e}`)}try{let e=yield Or(n);a.addVirtualNodes(e)}catch(e){console.warn(`Warning: Failed to extract GraphQL page paths: ${e}`)}let c=yield Mr(n);if(c){let e=a.addNode(c.configFile);for(let t of c.hrefs){let n=t===`/`||t===``?`/index`:t.replace(/^\/#/,`/index#`);e.addPath(n)}}let l=fr(n,r).filter(e=>!De(e,i)),u=/* @__PURE__ */ new Map,d=0,f=performance.now();return yield Promise.all(Array.from({length:Math.min(8,l.length)},()=>Wr(void 0,void 0,void 0,function*(){for(;d<l.length;){performance.now()-f>50&&(yield new Promise(e=>setImmediate(e)),f=performance.now());let e=l[d++];if(e===void 0)continue;let r=a.getNode(e);if(!r)continue;let i=Sn.default.readFileSync(at.join(n,e)).toString();try{let n=yield Xr(r,i,{checkSnippets:t?.checkSnippets});u.set(e,n)}catch(n){let r=/* @__PURE__ */ Error(`Syntax error - Unable to parse ${e} - ${n}`);if(!t?.onParseError)throw r;t.onParseError(e,r)}}}))),Hr(a,u),a.snippetReferencesByFile=u,a});var V=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Qr=e=>{try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}},$r=(e,t)=>V(void 0,void 0,void 0,function*(){let n=new AbortController,r=setTimeout(()=>n.abort(),1e4);try{let r=yield fetch(e,{method:t,signal:n.signal,headers:{"User-Agent":`Mintlify-LinkChecker/1.0`},redirect:`follow`});return yield r.body?.cancel().catch(()=>void 0),r.status}finally{clearTimeout(r)}}),ei=/* @__PURE__ */ new Set([404,405]),ti=e=>V(void 0,void 0,void 0,function*(){try{let t=yield $r(e,`HEAD`),n=ei.has(t)?yield $r(e,`GET`).catch(()=>t):t;return{ok:n!==404,status:n}}catch(e){return{ok:!1,status:null,error:e instanceof Error?e.message:`unknown error`}}}),ni=(e,t,n)=>V(void 0,void 0,void 0,function*(){let r=[],i=0,a=()=>V(void 0,void 0,void 0,function*(){for(;i<e.length;){let n=i++;r[n]=yield t(e[n])}}),o=Array.from({length:Math.min(n,e.length)},()=>a());return yield Promise.all(o),r}),ri=(e,t)=>V(void 0,void 0,void 0,function*(){let n=/* @__PURE__ */ new Map;for(let[r,i]of e.getExternalPathsByNode())if(!t?.sourceFiles||t.sourceFiles.has(r)){for(let e of i)if(Qr(e.originalPath)){let t=e.originalPath,i=n.get(t),a={file:r,originalPath:e.originalPath};i?i.push(a):n.set(t,[a])}}let r=[...n.keys()];return(yield ni(r,e=>V(void 0,void 0,void 0,function*(){let t=yield ti(e);if(t.ok)return null;let r={url:e,status:t.status,sources:n.get(e)};return t.error&&(r.error=t.error),r}),5)).filter(e=>e!==null)});var ii=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const ai=new RegExp(Re.source,`gm`),oi=/^(?:import|export)(?=[\s{*])/,si=/<[A-Za-z][\w.:-]*(?:"[^"]*"|'[^']*'|\{[^{}]*\}|[^<>"'{}])*>/g,ci=/"[^"]*"|'[^']*'|\{[^{}]*\}/g,li=e=>/\{\s*#[^}]+?\s*\}\s*$/.test(e),ui=e=>{let t=e.replace(ai,(e,t,n,r)=>{let i=e.indexOf(r,t.length+n.length)+r.length;return e.slice(0,i).padEnd(e.length,` `)});return v().parse(t)},di=(e,t)=>{let n=``,r=0;for(let[i,a]of[...t].sort((e,t)=>e[0]-t[0])){let t=Math.max(i,r);a<=t||(n+=e.slice(r,t)+e.slice(t,a).replace(/[^\n]/g,` `),r=a)}return n+e.slice(r)},fi=(e,t)=>t.reduce((e,t)=>di(e,t(e)),e),pi=e=>{try{return x.parse(e,{ecmaVersion:`latest`,sourceType:`module`}),!0}catch(t){let n=t.pos;return typeof n!=`number`||n<e.trimEnd().length}},mi=e=>{let t=g.exec(e);return t?[[t.index,t.index+t[0].length]]:[]},hi=(e,t)=>{let n,r=!0,i=[],a=0;for(let o of e.split(`
|
|
10
|
+
`)){let e=o.trim()===``,s=r;r=e,n?e&&pi(n.join(`
|
|
11
|
+
`))?n=void 0:(n.push(o),i.push([a,a+o.length])):s&&oi.test(o)&&!t.some(([e,t])=>e<=a&&a<t)&&(n=[o],i.push([a,a+o.length])),a+=o.length+1}return i},gi=e=>di(e,mi(e)),_i=(e,{keepEsm:t=!1}={})=>{let n=kt(e);return di(e,[...mi(e),...n,...t?[]:hi(e,n)])},vi=/* @__PURE__ */ new Set([`{`,"${"]),yi=(e,t)=>{let n=[],r=0;try{let i=x.tokenizer(e.slice(t),{ecmaVersion:`latest`,onComment:(e,r,i,a)=>n.push([t+i+2,t+a-(e?2:0)])});for(let a of i){let i=a.type.label;if(i===`template`)n.push([t+a.start,t+a.end]);else if(i===`string`)n.push([t+a.start+1,t+a.end-1]);else if(i===`regexp`){let r=e.slice(t+a.start,t+a.end);n.push([t+a.start+1,t+a.start+r.lastIndexOf(`/`)])}else if(vi.has(i))r++;else if(i===`}`&&r--===0)return{ranges:n,end:t+a.end}}}catch(r){if(!(r instanceof SyntaxError&&`pos`in r&&typeof r.pos==`number`))return{ranges:n,end:e.length};let i=t+r.pos;if(!r.message.startsWith(`Unterminated string`))return{ranges:n,end:i};let a=e.indexOf(`
|
|
12
|
+
`,i);n.push([i+1,a===-1?e.length:a])}return{ranges:n,end:e.length}},bi=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(r===`\\`)n++;else if(r===`{`){let r=yi(e,n+1);t.push(...r.ranges),n=r.end-1}}return t},xi=e=>[...e.matchAll(si)].flatMap(({index:e,0:t})=>[...t.matchAll(ci)].map(({index:t,0:n})=>[e+t+1,e+t+n.length-1])),Si=e=>[...e.matchAll(/\\[\s\S]/g)].flatMap(({index:e,0:t})=>t===`\\<`?[[e+1,e+2]]:[]),Ci=e=>fi(_i(e),[xi,Si,bi]),wi=e=>{let t=e.map((e,t)=>({edit:e,index:t})).sort((e,t)=>t.edit.start-e.edit.start||t.edit.end-e.edit.end||t.index-e.index),n=[],r=1/0;for(let{edit:e}of t)e.end>r||(n.push(e),r=e.start);return n},Ti=(e,t)=>wi(t).reduce((e,t)=>e.slice(0,t.start)+t.text+e.slice(t.end),e),Ei=(e,t,n=1)=>{let r=0;for(let n=1;n<t;n++){let t=e.indexOf(`
|
|
13
|
+
`,r);if(t===-1)break;r=t+1}return r+n-1},H=(e,t)=>{let n=e.slice(0,t).split(`
|
|
14
|
+
`);return{line:n.length,column:(n.pop()?.length??0)+1}},Di=(e,t)=>e.start-t.start;function Oi(e,t,n){let r=0;for(let i of e){let e=i.start+r;if(n===`snap`?t<e:t<=e)break;if(t<e+i.text.length)return n===`snap`?i.start:void 0;r+=i.text.length-(i.end-i.start)}return t-r}const ki=(e,t,n)=>{let{start:r,end:i}=n;for(let{edits:n}of e.slice(0,t).reverse()){let e=[...n].sort(Di),t=Oi(e,r,`reject`),a=Oi(e,i,`reject`);if(t===void 0||a===void 0||e.some(e=>e.start<a&&e.end>t))return;r=t,i=a}return{start:r,end:i,text:n.text}},Ai=(e,t,n)=>{let r=e[t],i=e[0];if(!r||!i||n.line===void 0)return{};let a=e.slice(0,t).reduceRight((e,{edits:t})=>Oi([...t].sort(Di),e,`snap`),Ei(r.content,n.line,n.column)),o=H(i.content,a);return n.column===void 0?{line:o.line}:o},ji=e=>u(C(e)).replace(/^\.$/,``),Mi=(e,t)=>ii(void 0,void 0,void 0,function*(){let n=new br(e);try{yield Xr(n,t)}catch{return[]}return n.paths.flatMap(e=>e.pathType===R.INTERNAL&&e.anchorLink?[`${ji(Ae(e.toString()))}#${re(e.anchorLink.slice(1))}`]:[])}),Ni=(e,t,n)=>{let r=`${ji(t)}#`;for(let t of e??[]){if(!t.startsWith(r))continue;let e=t.slice(r.length),i=e.startsWith(`${n}-`)&&/^\d/.test(e.slice(n.length+1));if(e===n||i)return e}},Pi={id:`parse-error`,group:`content`,severity:`error`,description:`files MDX can't parse; other checks skip them`};var Fi=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Ii=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Li=/* @__PURE__ */ new Set([`page`,`snippet`,`snippet-v2`]),Ri=(e,t)=>[...new Set([...t].flatMap(t=>{let n=Oe(t,`/${e.replace(/^\//,``)}`);return n?[n.toLowerCase()]:[]}))].sort().join(`
|
|
15
|
+
`),zi=e=>Fi(void 0,void 0,void 0,function*(){let{mdxCandidates:t}=yield S(e,yield he(e)),{snippets:n,snippetsV2:r,fileImportsMap:i}=yield ae(e,t),a=/* @__PURE__ */ new Set([...n,...r]),o=new Map(t.map(e=>[e.replace(/^\//,``),[...i.get(e.toLowerCase())??[]].sort().join(`
|
|
16
|
+
`)]));return{files:t.filter(e=>/\.mdx?$/.test(e)&&Li.has(ne(e))).map(e=>({file:e.replace(/^\//,``),kind:a.has(e)?`snippet`:`page`})),imports:o}}),Bi=e=>{try{let{attributes:t}=ie(e);return t&&typeof t==`object`?Object.assign({},t):{}}catch{return{}}},Vi=/\s*\(\d+:\d+(?:-\d+:\d+)?\)$/,Hi=/* @__PURE__ */ new Set([`unexpected-character`,`unexpected-eof`]),Ui=(e,t,n)=>{let{source:r,ruleId:i}=e??{};return r===`micromark-extension-mdx-jsx`&&typeof i==`string`&&Hi.has(i)&&n?.line!=null&&n.column!=null&&t[Ei(t,n.line,n.column)-1]===`<`},Wi=(e,t=``)=>{let n=e?.reason,r=e instanceof Error?e.message:`could not parse this file`,i=typeof n==`string`?n:r,a=e&&typeof e==`object`?me(e):null,o=Ui(e,t,a)?`; if this < isn't a tag, escape it as \\<`:``;return Object.assign(Object.assign(Object.assign({},a?.line!=null&&{line:a.line}),a?.column!=null&&{column:a.column}),{message:i.replace(Vi,``)+o})},Gi=(e,t)=>Object.assign(Object.assign({},t),{rule:Pi.id,group:Pi.group,severity:Pi.severity,file:e,message:`${t.message} (other checks were skipped for this file)`}),Ki=e=>{try{return ui(e)}catch{return}},qi=(e,t,n,r={})=>{let i=Object.assign({file:e,content:t,baseDir:n,frontmatter:Bi(t)},r),a=Ki(t);if(a)return{context:Object.assign(Object.assign({},i),{tree:a}),approximate:!1};try{return{context:Object.assign(Object.assign({},i),{tree:Ee(t,e)}),approximate:!0}}catch(e){return{error:Wi(e,t)}}},Ji={type:`root`,children:[]},Yi=/\{\{\s*([\w.\-]+)\s*\}\}/g,Xi=(e,t={})=>[...e.matchAll(Yi)].filter(e=>e[1]!==void 0&&t[e[1]]!==void 0).map(e=>({start:e.index,end:e.index+e[0].length,text:b(e[0],t)})),Zi=(e,t,n,r,i)=>{var{edit:a}=n,o=Ii(n,[`edit`]);let s=a&&ki(r,i,a);return Object.assign(Object.assign(Object.assign(Object.assign({},o),Ai(r,i,o)),{rule:e.id,group:e.group,severity:e.severity,file:t}),s&&{fix:Object.assign({file:t},s)})},Qi=(e,{file:t,kind:n},r,i,a,o)=>{let s=n===`snippet`?e.filter(e=>!e.pagesOnly):e,c=s.filter(e=>e.raw),l=s.filter(e=>!e.raw),u=n===`snippet`?Xi(r,o):[],d=Ti(r,u),f={file:t,content:d,baseDir:i,frontmatter:{},tree:Ji,variables:o},p=c.flatMap(e=>e.check(f).map(t=>({rule:e,finding:t}))),m=wi(p.flatMap(({finding:e})=>e.edit?[e.edit]:[])),h=Ti(d,m),g=[{content:r,edits:u},{content:d,edits:m},{content:h,edits:[]}],_=p.map(({rule:e,finding:n})=>Zi(e,t,n,g,1)),v=qi(t,h,i,Object.assign(Object.assign({},a),{variables:o}));if(`error`in v)return _.unshift(Gi(t,Object.assign(Object.assign({},v.error),Ai(g,2,v.error)))),_;for(let e of l)for(let n of e.check(v.context)){let r=v.approximate?Object.assign(Object.assign({},n),{edit:void 0}):n;_.push(Zi(e,t,r,g,2))}return _},$i=e=>Fi(void 0,void 0,void 0,function*(){let t=yield Promise.all(e.files.map(({file:t})=>Mi(t,e.read(t)??``)));return new Set(t.flat())}),ea=(e,t)=>Fi(void 0,void 0,void 0,function*(){let n=new Set(t.filter(e=>e.needsAnchorLinks).map(({id:e})=>e)),r=e.files.filter(({file:t})=>!e.selected||e.selected.has(t)),i=(n,r)=>{let i=e.read(n.file);return i===void 0?[Gi(n.file,{message:`could not read this file`})]:Qi(t,n,i,e.baseDir,r,e.variables)},a=e=>e.some(({rule:e})=>n.has(e)),o={readFile:e.read,themeVersion:e.themeVersion,latex:e.latex},s=r.map(e=>i(e,o));if(!s.some(a))return s.flat();let c=Object.assign(Object.assign({},o),{anchorLinks:yield $i(e)});return r.flatMap((e,t)=>{let n=s[t]??[];return a(n)?i(e,c):n})}),ta=[`humans`,`agents`,`signed-in`,`signed-out`],na={wide:"The page keeps the default width and still hides the table of contents; without `mode` the table of contents shows.",center:"The page keeps the default layout and still hides the table of contents; without `mode` the table of contents shows.",frame:"The page uses the default layout, but its headings still get no anchor ids and no table of contents; without `mode` they do."},ra=[`children`,`className`,`id`,`key`,`style`],ia=[`right`,`left`,`none`],aa=[`grey`,`violet`,`sky`,`teal`,`plum`,`crimson`,`info`,`success`,`warning`,`destructive`],oa=[`inline`,`base`],sa=[`default`,`color`],ca=[`dot`,`number`,`box`],la=[`timeline`,`divided`],ua=[`box`,`circle`,`dot`,`number`],da=[`solid`,`dashed`],fa=[`h2`,`h3`,`h4`],pa=[`rule`,`card`,`plain`],ma=[`background`,`plain`,`separator`],ha=[`compact`,`table`],ga=[`minimal`,`grid`],_a=[`equal`,`auto`],va=[`start`,`center`,`end`],ya=[`subtle`,`strong`],U=(e,{legacy:t={},invalid:n}={})=>Object.assign({values:e,legacy:t},n!==void 0&&{invalid:n}),ba=e=>e,W={icon:{kind:`icon`},iconType:{kind:`iconType`}},G={kind:`flag`},K={kind:`any`},q={status:`supported`,props:W,removedProps:{color:{note:`It is ignored. Style the callout with custom CSS on [data-component-item="alert"].`}}},xa={status:`pending`,anyProps:!0},Sa={type:K,typeHref:K,location:K,default:K,required:G,deprecated:G,hidden:G,pre:K,post:K},Ca={status:`supported`,within:[`Table`],anyProps:!0},wa=Object.assign(Object.assign({},Ca),{props:{align:U(va)}}),Ta={status:`supported`,props:{cols:{kind:`integer`,min:1,max:4},joined:G,variant:U(ma)}},Ea={status:`supported`,props:Object.assign(Object.assign({},W),{filename:K,language:K,lang:K,lines:G,wrap:G,expandable:G,nocopy:G,inline:G})},Da={status:`supported`},Oa={status:`supported`,within:[`Tree`,`FileTree`],props:{name:K,highlight:G}},ka=Object.assign(Object.assign({},Oa),{props:Object.assign(Object.assign({},Oa.props),{defaultOpen:G,openable:G})}),Aa=Object.assign({},xa),ja=`A tooltip holds text only. Put the link in the text next to the tooltip, or make the trigger itself a link.`,Ma={status:`removed`,note:"Written directly, it renders nothing of its own. Remove the tag; `twoslash` code fences still show hovers."},Na=ba({Accordion:{status:`supported`,props:Object.assign(Object.assign({},W),{title:K,description:K,defaultOpen:G})},AccordionGroup:{status:`supported`,children:[`Accordion`]},ApiPlayground:{status:`removed`,note:`Nothing renders in its place. Generate the API playground from OpenAPI or AsyncAPI.`},Badge:{status:`supported`,props:Object.assign(Object.assign({},W),{color:U(aa,{legacy:{gray:`grey`,blue:[`sky`,`info`],green:[`teal`,`success`],orange:`warning`,yellow:`warning`,red:[`crimson`,`destructive`],purple:`violet`,white:null,surface:null,"white-destructive":`destructive`,"surface-destructive":`destructive`}}),size:U(oa,{legacy:{xs:`inline`,sm:`inline`,md:`inline`,lg:`base`}}),type:U(sa)}),removedProps:{shape:{note:`The badge has one shape.`,remove:!0},stroke:{note:`The badge has no outline.`,remove:!0},disabled:{note:`The badge has no disabled state.`,remove:!0}}},Callout:q,Card:{status:`supported`,props:Object.assign(Object.assign({},W),{title:K,color:K,horizontal:G,href:K,img:K,disabled:G,cta:K,variant:U(ma)}),removedProps:{arrow:{note:"The card has no corner icon. Add a `cta` instead: it shows a chevron when the card links within the site."},type:{note:`It is ignored.`,remove:!0}}},CardGroup:Object.assign(Object.assign({},Ta),{status:`deprecated`,replacement:`Columns`}),Check:q,CodeBlock:Ea,CodeGroup:{status:`supported`,props:{dropdown:G,report:G}},Color:{status:`supported`,props:{variant:U(ha)}},"Color.Row":{status:`supported`,within:[`Color`],props:{title:K}},"Color.Item":{status:`supported`,within:[`Color`],required:[{props:[`value`],note:`Without it the item does not render.`}],props:{name:K,value:{kind:`text`}}},Column:{status:`supported`,within:[`Columns`,`CardGroup`]},Columns:Ta,CustomCode:{status:`supported`,anyProps:!0},CustomComponent:{status:`supported`,anyProps:!0},Danger:q,DynamicCustomComponent:{status:`supported`,anyProps:!0},Expandable:{status:`supported`,props:{title:K,defaultOpen:G},removedProps:{lazy:{note:`It is ignored.`,remove:!0},uniqueParamId:{note:`It is ignored.`,remove:!0}}},FileTree:Da,Frame:{status:`supported`,props:{caption:K,hint:K,containerClassName:K},removedProps:{as:{note:`It is ignored.`,remove:!0}}},GitHub:Aa,"GitHub.Repo":Aa,Github:Aa,"Github.Repo":Aa,Heading:{status:`supported`,anyProps:!0},Icon:{status:`supported`,props:Object.assign(Object.assign({},W),{src:K,library:K,color:K,size:K,title:K,"aria-label":K})},Info:q,Latex:{status:`supported`},Link:{status:`supported`,anyProps:!0,props:{iconPosition:U(ia)}},List:{status:`supported`,props:{marker:U(ca),start:{kind:`integer`}}},MDX:{status:`supported`},MDXContentController:{status:`supported`,anyProps:!0},Mermaid:{status:`supported`,props:{chart:K,title:K,actions:K},removedProps:{placement:{note:`It is ignored.`,remove:!0}}},Note:q,OptimizedVideo:{status:`supported`,anyProps:!0},Panel:{status:`supported`,anyProps:!0},Param:{status:`removed`,replacement:`ParamField`,note:`Only its description renders.`},ParamField:{status:`supported`,required:[{props:[`query`,`path`,`body`,`header`],note:`It names the parameter and where it goes; without one the field does not render.`}],props:Object.assign(Object.assign({},Sa),{query:K,path:K,body:K,header:K,placeholder:K,enum:K})},Popup:Ma,PopupContent:Ma,PopupTrigger:Ma,Prompt:{status:`supported`,props:{description:K,actions:K},removedProps:{icon:{note:`It is ignored.`,remove:!0},iconType:{note:`It is ignored.`,remove:!0}}},Quote:{status:`supported`,props:{variant:U(pa),author:K,img:K,icon:K}},RequestExample:{status:`supported`,props:{dropdown:G}},ResponseExample:{status:`supported`,props:{dropdown:G}},ResponseField:{status:`supported`,required:[{props:[`name`],note:`Without it the field does not render.`}],props:Object.assign(Object.assign({},Sa),{name:K})},SnippetGroup:{status:`removed`,replacement:`CodeGroup`,note:`Its code blocks render without the group.`},Step:{status:`supported`,within:[`Steps`],props:Object.assign(Object.assign({},W),{title:K,description:K,stepNumber:K,titleSize:U(fa),noAnchor:G})},Steps:{status:`supported`,children:[`Step`],props:{titleSize:U(fa),variant:U(la),marker:U(ua),line:U(da),background:G,start:{kind:`integer`}}},Tab:{status:`supported`,within:[`Tabs`],required:[{props:[`title`],note:`Without it the tab is labelled "Tab Title".`}],props:Object.assign(Object.assign({},W),{title:K})},Table:{status:`supported`,props:{variant:U(ga),layout:U(_a),"aria-label":K}},"Table.Body":Ca,"Table.Cell":Object.assign(Object.assign({},wa),{props:Object.assign(Object.assign({},wa.props),{variant:U(ya)})}),"Table.Header":Ca,"Table.HeaderCell":wa,"Table.Row":Ca,"Table.RowHeader":wa,Tabs:{status:`supported`,children:[`Tab`],props:{defaultTabIndex:{kind:`integer`,min:0},borderBottom:G,sync:G}},Tile:xa,Tip:Object.assign(Object.assign({},q),{status:`deprecated`,replacement:`Check`}),Tooltip:{status:`supported`,required:[{props:[`tip`,`headline`],note:`Without either one the trigger renders as plain text, with no tooltip.`}],linksOnlyWhole:!0,props:{tip:K,headline:K,triggerAriaLabel:K,iconPosition:U(ia)},removedProps:{cta:{note:ja},href:{note:ja}}},Tree:Da,"Tree.File":Oa,"Tree.Folder":ka,Update:{status:`supported`,required:[{props:[`label`],note:`Without it the entry has no date, no link and no table of contents item.`}],props:{label:K,description:K,tags:K,rss:K}},Variation:xa,View:{status:`deprecated`,note:`Use Tabs for alternatives within a section or CodeGroup for code samples.`,required:[{props:[`title`],note:`Without it readers can never pick this view.`}],props:Object.assign(Object.assign({},W),{title:K})},Visibility:{status:`supported`,required:[{props:[`for`],note:`Without it readers see nothing.`}],props:{for:U(ta,{invalid:`Readers see nothing.`})}},Warning:q,ZoomImage:{status:`supported`,anyProps:!0}}),J=e=>{let t=/* @__PURE__ */ new Set;return O(e.tree,`mdxjsEsm`,e=>{for(let n of e.data?.estree?.body??[])if(n.type===`ImportDeclaration`)for(let e of n.specifiers)D(e.local,t);else if(n.type===`ExportNamedDeclaration`){let e=n.declaration;if(e?.type===`VariableDeclaration`)for(let n of e.declarations)D(n.id,t);else e&&D(e.id,t);for(let e of n.specifiers)D(e.local,t),D(e.exported,t)}else if(n.type===`ExportDefaultDeclaration`){let e=n.declaration;(e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`)&&D(e.id,t)}}),t},Pa=e=>(e.tree.children.find(e=>[`yaml`,`toml`].includes(e.type))?.position)?.end.offset??0,Fa=(e,t,n)=>{let r;try{r=be(Ee(e,t))}catch{return}return r.has(n)?`{ ${n} }`:r.has(`default`)?n:void 0},Ia={id:`unknown-component`,group:`content`,severity:`error`,scope:`file`,description:`JSX components that are not built in, imported or exported`,pagesOnly:!0,check:e=>{let t=J(e),n=/* @__PURE__ */ new Set,r=[],i=Pa(e),a=i===0?``:`
|
|
17
|
+
|
|
18
|
+
`,o=/^\n*/.exec(e.content.slice(i))?.[0].length??0,s=`
|
|
19
|
+
`.repeat(Math.max(0,2-o)),c=(o,c)=>{let l=o?.split(`.`)[0];if(!o||!l||!/^[A-Z]/.test(l)||t.has(l)||n.has(o)||Nt(o)||e.themeVersion===2&&Object.prototype.hasOwnProperty.call(Na,o))return;n.add(o);let u=we.map(e=>`snippets/${l}${e}`).find(t=>e.readFile?.call(e,t)!==void 0),d=u&&e.readFile?.call(e,u),f=u&&d!==void 0&&o===l?Fa(d,u,l):void 0;r.push({line:c?.line,column:c?.column,message:`<${o}> is not built in, imported or exported on this page`,edit:f?{start:i,end:i,text:`${a}import ${f} from "/${u}";${s}`}:void 0})},l=(e,t)=>Je(e,/* @__PURE__ */ new Set,{reference:e=>{if(e.type!==`JSXIdentifier`)return;let n=e.loc;c(String(e.name),n?.start??t)}});return O(e.tree,e=>{if(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`){c(e.name,e.position?.start);for(let t of e.attributes){let n=t.type===`mdxJsxAttribute`?t.value:t;n&&typeof n==`object`&&l(n.data?.estree,e.position?.start)}}else(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`)&&l(e.data?.estree,e.position?.start)}),r}},La=Na,Ra=new Set(ra),Y=e=>e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`,za=e=>e&&Object.prototype.hasOwnProperty.call(La,e)?La[e]:void 0,Ba=e=>(e.children??[]).flatMap(e=>Y(e)&&e.name?[e]:Ba(e)),Va=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(r!==void 0&&t(r))return n}return-1},Ha=e=>e?.split(`.`)[0]??``,X=(e,t)=>{let n=J(e),r=(e,i,a)=>{let o=i;if(Y(e)){let r=n.has(Ha(e.name))?void 0:za(e.name);r&&t(e,r,i,a),o=[...i,e]}let s=[...a,e];for(let t of e.children??[])r(t,o,s)};r(e.tree,[],[])},Ua=e=>e.data?.estree,Wa=e=>{let t=/* @__PURE__ */ new Set,n=e=>{if(Array.isArray(e)){for(let t of e)n(t);return}if(typeof e!=`object`||!e)return;let{type:r,name:i}=e;if(r===`JSXClosingElement`){let e=i;for(;e?.type===`JSXMemberExpression`;)e=e.object;t.add(e)}for(let[t,r]of Object.entries(e))t!==`loc`&&t!==`range`&&typeof r==`object`&&n(r)};return n(e),t},Ga=(e,t)=>{let n=J(e),r=e=>{let r=Wa(e);Je(e,/* @__PURE__ */ new Set,{reference:e=>{if(e.type!==`JSXIdentifier`||r.has(e))return;let i=String(e.name),a=n.has(i)?void 0:za(i),o=e.loc?.start;a&&t({name:i,spec:a,position:o?{line:o.line,column:o.column+1}:{}})}})},i=e=>{if(Y(e)){let i=n.has(Ha(e.name))?void 0:za(e.name);i&&e.name&&t({name:e.name,spec:i,position:Q(e),element:e});for(let t of e.attributes){let e=t.type===`mdxJsxAttribute`?t.value:t;e&&typeof e==`object`&&r(Ua(e))}}else(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`)&&r(Ua(e));for(let t of e.children??[])i(t)};i(e.tree)},Z=(e,t)=>Object.assign(Object.assign({},e),{scope:`file`,group:`content`,severity:`warning`,theme:2,check:e=>{let n=[];return t(e,e=>n.push(e)),n}}),Q=e=>({line:e.position?.start.line,column:e.position?.start.column}),Ka=e=>e.map(e=>`"${e}"`).join(`, `),qa=e=>e.map(e=>`<${e}>`).join(` or `),Ja=(e,t)=>{let n=e.toLowerCase(),r=t.toLowerCase(),i=Array.from({length:n.length+1},(e,t)=>Array.from({length:r.length+1},(e,n)=>t===0?n:n===0?t:0)),a=(e,t)=>i[e]?.[t]??0;for(let e=1;e<=n.length;e++)for(let t=1;t<=r.length;t++){let o=n[e-1]===r[t-1]?0:1,s=Math.min(a(e-1,t)+1,a(e,t-1)+1,a(e-1,t-1)+o);e>1&&t>1&&n[e-1]===r[t-2]&&n[e-2]===r[t-1]&&(s=Math.min(s,a(e-2,t-2)+1));let c=i[e];c&&(c[t]=s)}return a(n.length,r.length)},Ya=(e,t)=>{let n=Math.max(1,Math.floor(e.length/3));return t.map(t=>({candidate:t,score:Ja(e,t)})).filter(({score:e})=>e<=n).sort((e,t)=>e.score-t.score)[0]?.candidate},Xa=(e,t)=>{let n=Ya(e,t);return n?` Did you mean "${n}"?`:``},Za=e=>{if(e!==null)return typeof e==`string`?`"${e}"`:Ka(e).replace(/, (?=[^,]*$)/,` or `)},Qa=e=>e.attributes.filter(e=>e.type===`mdxJsxAttribute`),$a=/[^\s=/>{}"']+/y,eo=e=>e.attributes.flatMap(e=>{let t=e.type===`mdxJsxAttribute`?e.value:e,n=t&&typeof t==`object`?Ua(t):void 0;return typeof n?.start==`number`&&typeof n.end==`number`?[{start:n.start,end:n.end}]:[]}),to=(e,t,n)=>{let r=/* @__PURE__ */ new Map,i=t=>{let r=n.find(({start:e})=>e===t+1);if(!r)return;let i=r.end;for(;i<e.length&&/[\s>]/.test(e[i]??``);)i++;return e[i]===`}`?i+1:void 0},a=t,o=()=>{for(;a<e.length&&/\s/.test(e[a]??``);)a++};for(;;){o();let t=e[a];if(t===void 0||t===`>`||t===`/`)break;if(t===`{`){let e=i(a);if(e===void 0)break;a=e;continue}$a.lastIndex=a;let n=$a.exec(e)?.[0];if(!n)break;let s=a;a+=n.length;let c=a;if(o(),e[a]===`=`){a++,o();let t=e[a];if(t===`"`||t===`'`){let n=e.indexOf(t,a+1);a=n===-1?e.length:n+1}else if(t===`{`){let e=i(a);if(e===void 0)break;a=e}}else a=c;r.set(n,[...r.get(n)??[],{start:s,end:a}])}return r},no=(e,t)=>{let n=Qa(t),r=t.position?.start.offset;if(r===void 0||!t.name)return n.map(e=>({attribute:e}));let{content:i}=e,a=to(i,r+t.name.length+1,eo(t)),o=/* @__PURE__ */ new Map;return n.map(e=>{let t=o.get(e.name)??0;o.set(e.name,t+1);let n=a.get(e.name)?.[t];return n?Object.assign(Object.assign({attribute:e},n),{source:i.slice(n.start,n.end)}):{attribute:e}})},ro=(e,t,n)=>t===void 0?Q(n):H(e.content,t),io={known:!1},ao=e=>{let t=e;if(t.type===`Literal`)return{known:!0,value:t.value};if(t.type===`TemplateLiteral`&&t.expressions?.length===0)return{known:!0,value:(t.quasis?.[0])?.value.cooked};if(t.type===`UnaryExpression`&&t.operator===`-`){let e=ao(t.argument);return e.known&&typeof e.value==`number`?{known:!0,value:-e.value}:io}return io},oo=e=>{let{value:t}=e;if(typeof t!=`object`||!t)return;let[n]=Ua(t)?.body??[];return n?.type===`ExpressionStatement`?n.expression:void 0},so=e=>{let{value:t}=e;return t==null?{known:!0,value:!0}:typeof t==`string`?{known:!0,value:t}:ao(oo(e))},co=e=>{let t=so(e);if(!t.known)return;let{value:n}=t;return typeof n==`string`||typeof n==`number`?String(n):void 0},lo=(e,t)=>{let n=`values`in e||e.kind===`integer`||e.kind===`iconType`,r=so(t);return n&&r.known&&typeof r.value==`boolean`?String(r.value):void 0},uo=e=>{let t=oo(e)?.type;return t===`ObjectExpression`||t===`ArrayExpression`},fo=e=>e===``||e===!1||e==null,po=e=>{let t=so(e);return!t.known||!fo(t.value)},mo=({start:e,end:t},n)=>e===void 0||t===void 0?void 0:{start:e,end:t,text:n},ho=(e,{start:t,end:n})=>{if(t===void 0||n===void 0)return;let r=t;for(;r>0&&/[ \t]/.test(e.content[r-1]??``);)r--;return{start:r,end:n,text:``}},go=e=>e.replace(/\./g,`\\.`),_o=(e,t,n)=>{let r=t.position?.start.offset,i=t.position?.end.offset,a=t.name;if(r===void 0||i===void 0||!a)return;let o=e.content.slice(r,i),s=go(a),c=RegExp(`^<\\s*${s}(?![\\w.:-])`).exec(o);if(!c)return;let l=RegExp(`</\\s*${s}\\s*>$`).exec(o);if(l||o.endsWith(`/>`))return{start:r,end:i,text:`<${n}${o.slice(c[0].length,l?l.index:o.length)}${l?`</${n}>`:``}`}},vo=Z({id:`removed-component`,description:`Components that no longer render`},(e,t)=>Ga(e,({name:e,spec:n,position:r})=>{if(n.status!==`removed`)return;let i=n.replacement?` Use <${n.replacement}> instead.`:``;t(Object.assign(Object.assign({},r),{message:`<${e}> is removed. ${n.note??``}${i}`.trim()}))})),yo=Z({id:`deprecated-component`,description:`Components that still render but are on their way out`},(e,t)=>{let n=J(e);Ga(e,({name:r,spec:i,position:a,element:o})=>{let{replacement:s}=i;if(i.status!==`deprecated`)return;if(!s){t(Object.assign(Object.assign({},a),{message:`<${r}> is deprecated. ${i.note??``}`.trim()}));return}let c=n.has(s);t(Object.assign(Object.assign({},a),{message:c?`<${r}> is deprecated. Use the built-in <${s}>, which takes the same props; this page declares its own <${s}>, so rename that first.`:`<${r}> is deprecated. Use <${s}>, which takes the same props.`,edit:o&&!c?_o(e,o,s):void 0}))})}),bo=Z({id:`pending-component`,description:`Components that do not render yet`},(e,t)=>Ga(e,({name:e,spec:n,position:r})=>{n.status===`pending`&&t(Object.assign(Object.assign({},r),{message:`<${e}> is not supported yet. It renders only its content, without its own styling.`}))})),xo=Z({id:`removed-prop`,description:`Props that are no longer read`},(e,t)=>X(e,(n,r)=>{for(let i of no(e,n)){let{attribute:a}=i,o=r.removedProps?.[a.name];if(o===void 0)continue;let s=o.remove?` Remove the prop.`:``;t(Object.assign(Object.assign({},ro(e,i.start,n)),{message:`\`${a.name}\` on <${n.name}> is removed. ${o.note}${s}`,edit:o.remove?ho(e,i):void 0}))}})),So=Z({id:`unknown-prop`,description:`Props a component does not take`},(e,t)=>X(e,(n,r)=>{if(r.anyProps||r.status===`removed`||r.status===`pending`)return;let i=Object.keys(r.props??{});for(let a of no(e,n)){let{name:o}=a.attribute;if(Ra.has(o)||i.includes(o)||r.removedProps?.[o]!==void 0||o.startsWith(`data-`)||o.startsWith(`aria-`))continue;let s=i.length>0?` It takes ${Ka(i)}.`:` It takes no props.`;t(Object.assign(Object.assign({},ro(e,a.start,n)),{message:`<${n.name}> has no \`${o}\` prop, so it is ignored.${Xa(o,i)}${s}`}))}})),Co=(e,t)=>Object.prototype.hasOwnProperty.call(e.legacy,t)?e.legacy[t]:void 0,wo=(e,t,n,r)=>{let i=`\`${t.source??`${t.attribute.name}="${r}"`}\` on <${e.name}>`;if(`values`in n){if(n.values.includes(r))return;let e=Co(n,r);if(e!==void 0){let t=Za(e);return{message:t?`${i} is an old value. Use ${t}.`:`${i} is an old value with no replacement. Remove it to get the default.`}}return{message:`${i} is not a supported value${n.invalid?`. ${n.invalid}`:`, so the default is used.`}${Xa(r,n.values)} Allowed: ${Ka(n.values)}.`}}if(n.kind===`iconType`)return Le.includes(r)?void 0:{message:`${i} is not an icon type, so the icon is not drawn.${Xa(r,Le)} Allowed: ${Ka(Le)}.`};if(n.kind===`integer`){let e=Number(r);return Number.isInteger(e)&&(n.min===void 0||e>=n.min)&&(n.max===void 0||e<=n.max)?void 0:{message:`${i} must be a whole number${n.min!==void 0&&n.max!==void 0?` from ${n.min} to ${n.max}`:n.min===void 0?``:` of at least ${n.min}`}.`}}},To=Z({id:`invalid-value`,description:`Prop values a component does not support`},(e,t)=>X(e,(n,r)=>{for(let i of no(e,n)){let{attribute:a}=i,o=r.props?.[a.name];if(o&&`kind`in o&&o.kind===`text`){let r=so(a);(uo(a)||r.known&&typeof r.value!=`string`)&&t(Object.assign(Object.assign({},ro(e,i.start,n)),{message:`\`${i.source??a.name}\` on <${n.name}> must be one plain string. Any other value does not render.`}));continue}if(!o)continue;let s=co(a)??lo(o,a);if(s===void 0)continue;let c=wo(n,i,o,s);if(!c)continue;let l=`values`in o?Co(o,s):void 0;t(Object.assign(Object.assign(Object.assign({},ro(e,i.start,n)),c),{edit:typeof l==`string`?mo(i,`${a.name}="${l}"`):void 0}))}})),Eo=e=>e.type===`text`&&!e.value?.trim(),Do=e=>Y(e)&&!e.name||e.type===`paragraph`&&e.children.every(e=>Eo(e)||e.type===`mdxJsxTextElement`||e.type===`mdxTextExpression`),Oo=Z({id:`component-placement`,description:`Components used outside the component they belong in`,pagesOnly:!0},(e,t)=>X(e,(e,n,r,i)=>{let{within:a}=n;if(!a)return;let o=Va(i,e=>Y(e)&&a.includes(e.name??``)),s=i[o];if(!s||!Y(s)){t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> only works inside ${qa(a)}. Here it renders without the layout that component gives it.`}));return}if(!(za(s.name)?.children)?.includes(e.name??``))return;let c=i.slice(o+1).find(e=>!Do(e));if(!c)return;let l=Y(c)?`<${c.name}>`:`a ${c.type}`;t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> must be a direct child of <${s.name}>; only a fragment may wrap it. Here it is inside ${l}, so <${s.name}> drops it.`}))})),ko=Z({id:`dropped-child`,description:`Children a component does not render`},(e,t)=>{let n=J(e);X(e,(e,r)=>{if(r.children)for(let i of Ba(e)){let a=i.name??``;r.children.includes(a)||!za(a)||n.has(Ha(a))||t(Object.assign(Object.assign({},Q(i)),{message:`<${e.name}> holds only ${qa(r.children)}. This <${a}> is dropped.`}))}})}),Ao=e=>e.map(e=>`\`${e}\``).join(` or `),jo=Z({id:`missing-prop`,description:`Props a component needs to render its main part`},(e,t)=>X(e,(e,n)=>{let{attributes:r}=e,i=e=>{let t=Va(r,t=>t.type===`mdxJsxAttribute`&&t.name===e),n=r.slice(t+1).some(({type:e})=>e===`mdxJsxExpressionAttribute`),i=r[t];return n||i?.type===`mdxJsxAttribute`&&po(i)};for(let{props:r,note:a}of n.required??[])r.some(i)||t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> needs ${Ao(r)}. ${a}`}))})),Mo=e=>{let t=/* @__PURE__ */ new Set,n=e=>{e.type===`definition`&&t.add(String(e.identifier).toLowerCase());for(let t of e.children??[])n(t)};return n(e),t},No=(e,t)=>e.type===`link`||e.type===`linkReference`&&t.has(String(e.identifier).toLowerCase())||Y(e)&&(e.name===`a`||e.name===`Link`||e.name===`button`),Po=(e,t)=>No(e,t)||(e.children??[]).some(e=>Po(e,t)),Fo=e=>e.flatMap(e=>e.type===`paragraph`?Fo(e.children):e.type===`text`&&!e.value?.trim()?[]:[e]),Io=[vo,yo,bo,xo,So,To,jo,Oo,ko,Z({id:`nested-link`,description:`Links inside a component that only works when the link is its whole content`},(e,t)=>{let n=Mo(e.tree);X(e,(e,r)=>{if(!r.linksOnlyWhole)return;let i=Fo(e.children),[a]=i;i.length===1&&a&&No(a,n)||i.some(e=>Po(e,n))&&t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> around text that contains a link shows no tooltip. Make the whole trigger the link, or move the link out of it.`}))})}),Z({id:`removed-page-mode`,description:`Page modes that no longer exist`,pagesOnly:!0},(e,t)=>{let{mode:n}=e.frontmatter,r=na;if(typeof n!=`string`||!Object.prototype.hasOwnProperty.call(r,n))return;let i=e.content.search(/^mode\s*:/m);t(Object.assign(Object.assign({},i===-1?{}:H(e.content,i)),{message:`\`mode: ${n}\` in the frontmatter is deprecated. ${r[n]} Use custom CSS for a different layout.`}))})],Lo=e=>`type`in e&&e.type===`JSXOpeningElement`&&`name`in e&&typeof e.name==`object`&&e.name!==null&&`name`in e.name&&e.name.name===`Latex`,Ro=e=>Array.isArray(e)?e.some(Ro):typeof e!=`object`||!e?!1:Lo(e)?!0:Object.entries(e).some(([e,t])=>e!==`loc`&&e!==`range`&&typeof t==`object`&&Ro(t)),zo=e=>typeof e==`object`&&e&&`data`in e&&typeof e.data==`object`&&e.data!==null&&`estree`in e.data?e.data.estree:void 0,Bo=e=>{if(e.type===`math`||e.type===`inlineMath`)return!0;if(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`)return Ro(zo(e));if(e.type!==`mdxJsxFlowElement`&&e.type!==`mdxJsxTextElement`)return!1;if(`name`in e&&e.name===`Latex`)return!0;let t=`attributes`in e?e.attributes:void 0;return Array.isArray(t)&&t.some(e=>Ro(zo(e))||typeof e==`object`&&!!e&&`value`in e&&Ro(zo(e.value)))},Vo={id:`latex-disabled`,group:`content`,severity:`warning`,theme:2,scope:`file`,description:`math on a site whose docs.json turns LaTeX off`,check:({tree:e,content:t,latex:n})=>{if(n!==!1)return[];let r=[];return O(e,e=>{if(r.length>0)return!1;Bo(e)&&(e.type!==`inlineMath`||!rt(e,t)&&!nt(e.value))&&r.push({line:e.position?.start.line,column:e.position?.start.column,message:`This page uses LaTeX math, but docs.json sets "styling": { "latex": false }, so it shows as plain text. Set "latex" to true to render it.`})}),r}};var Ho=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Uo=({styling:e})=>{let t=e&&typeof e==`object`&&`latex`in e?e.latex:void 0;return typeof t==`boolean`?t:void 0},Wo=e=>{try{let t=JSON.parse(e);return t&&typeof t==`object`?t:{}}catch{return{}}},Go=Ce,Ko=({theme:e,themeVersion:t})=>{let n=Go[typeof e==`string`?e:`mint`]??1;return typeof t==`number`&&Number.isInteger(t)&&t>=1&&t<=n?t:1},qo=e=>ut.existsSync(M.join(e,`docs.json`))?`docs.json`:`mint.json`,Jo=e=>{try{return Ko(Wo(ut.readFileSync(M.join(e,qo(e)),`utf-8`)))}catch{return Ko({})}},Yo=(e,t)=>Ho(void 0,[e,t],void 0,function*(e,{selected:t,localSchema:n}){let{files:r,imports:i}=yield zi(e),a=/* @__PURE__ */ new Map,o=qo(e),s=t=>{if(!a.has(t))try{a.set(t,ut.readFileSync(M.join(e,t),`utf-8`))}catch{a.set(t,void 0)}return a.get(t)},c=Wo(s(o)??``);return{baseDir:e,files:r,imports:i,selected:t,configFile:o,variables:c.variables&&typeof c.variables==`object`?c.variables:void 0,themeVersion:Ko(c),latex:Uo(c),localSchema:n,read:s,locate:(e,t)=>{let n=s(e)??``,r=t?n.indexOf(t):-1;return r===-1?{}:H(n,r)}}});var $=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Xo=M.join(pt.homedir(),`.mintlify`,`diagnostics`),Zo=(e,t=Xo)=>{let n=M.resolve(e),r=mt(`sha256`).update(n).digest(`hex`).slice(0,12),i=M.basename(n).replace(/[^\w.-]+/g,`-`)||`site`;return M.join(t,`${i}-${r}.json`)},Qo=/\.mdx?$/,$o=e=>ue(M.extname(e).slice(1)),es=/* @__PURE__ */ new Set([`docs.json`,`mint.json`,`.mintignore`]),ts=(e,t)=>`${e} ${t}${e===1?``:`s`}`,ns=({rule:e,message:t})=>`${e}:${t}`,rs=[...Io,Vo],is=new Set(rs.map(({id:e})=>e)),as=e=>e.filter(({rule:e})=>is.has(e)),os=(e,t)=>{let n=/* @__PURE__ */ new Map;for(let t of e)n.set(ns(t),(n.get(ns(t))??0)+1);return t.filter(e=>{let t=n.get(ns(e))??0;return n.set(ns(e),t-1),t<=0})},ss=e=>{let t=e.line?`:${e.line}${e.column?`:${e.column}`:``}`:``;return`${e.file}${t} ${e.rule} ${e.message}`},cs=e=>[...e].sort((e,t)=>(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0)),ls=e=>{let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.file,[...t.get(n.file)??[],n]);return t},us=(e,t,n)=>n===void 0?``:Ri(t,se(n,M.join(e,t))),ds=e=>{let t=/* @__PURE__ */ new Map;return{read:n=>{if(!t.has(n))try{t.set(n,dt(M.join(e,n),`utf-8`))}catch{t.set(n,void 0)}return t.get(n)},forget:e=>t.delete(e)}},fs=(e,...t)=>$(void 0,[e,...t],void 0,function*(e,{reportDir:t}={}){let i=Zo(e,t),o,s=ds(e),c=/* @__PURE__ */ new Map,u,f,h=Promise.resolve(),g=/* @__PURE__ */ new Map,_=/* @__PURE__ */ new Map,v=()=>[...c.values()].flat(),ee=()=>$(void 0,void 0,void 0,function*(){let e=v(),t={version:1,updatedAt:(/* @__PURE__ */ new Date()).toISOString(),summary:{warnings:e.length,files:c.size,fixable:e.filter(({fix:e})=>e).length},diagnostics:e};yield ht.mkdir(M.dirname(i),{recursive:!0});let n=`${i}.${process.pid}.tmp`;yield ht.writeFile(n,`${JSON.stringify(t,null,2)}\n`),yield ht.rename(n,i)}),y=()=>{let e=v().length,t=e===0?void 0:(0,xn.jsx)(p,{message:`${ts(e,`content warning`)} in ${ts(c.size,`file`)}. Run \`mint validate\` to list them, or read ${i}.`});f&&t?n(f,t):t?m(t):f&&r(f),f=t},te=e=>{h=h.then(e).catch(()=>void 0)},b=(e,t)=>{clearTimeout(g.get(e)),g.set(e,setTimeout(()=>{g.delete(e),te(t)},150))},ne=()=>$(void 0,void 0,void 0,function*(){let t=ds(e),n=yield Yo(e,{localSchema:!1});return{site:Object.assign(Object.assign({},n),{read:t.read}),reader:t}}),x=(e,t)=>$(void 0,void 0,void 0,function*(){let n=c.get(t)??[],r=e.files.some(e=>e.file===t)?cs(as(yield ea(Object.assign(Object.assign({},e),{selected:/* @__PURE__ */ new Set([t])}),rs))):[];return r.length>0?c.set(t,r):c.delete(t),os(n,r)}),S=e=>new Map(e.files.map(({file:e,kind:t})=>[e,t])),re=t=>$(void 0,void 0,void 0,function*(){if(!o)return;let n=!1;for(let[r,i]of t){s.forget(r),us(e,r,s.read(r))!==(o.imports?.get(r)??``)&&(n=!0);let t=Qo.test(r)&&!o.files.some(e=>e.file===r);(i||t)&&(n=!0)}let r=new Set([...t.keys()].filter(e=>Qo.test(e)));if(n){let e=S(o),n;try{n=yield ne()}catch(e){for(let[e,n]of t)_.set(e,(_.get(e)??!1)||n);throw e}o=n.site,s=n.reader;for(let[t,n]of S(o))e.get(t)!==n&&r.add(t);for(let t of e.keys())o.files.some(e=>e.file===t)||r.add(t)}let i=o,a=(yield Promise.all([...r].map(e=>x(i,e)))).flat();for(let e of a.slice(0,5))l((0,xn.jsx)(p,{message:ss(e)}));a.length>5&&l((0,xn.jsx)(p,{message:`${ts(a.length-5,`more content warning`)}`})),y(),yield ee()}),C=()=>{let e=new Map(_);return _.clear(),re(e)},w=()=>$(void 0,void 0,void 0,function*(){if(Jo(e)!==2){yield u?.close(),u=void 0,o=void 0,c=/* @__PURE__ */ new Map,y(),yield ht.rm(i,{force:!0});return}let t=yield he(e),n=yield it(e,{ignored:d(e,t),onEvent:(t,n)=>{let r=M.relative(e,n).split(M.sep).join(`/`);$o(r)&&(_.set(r,(_.get(r)??!1)||t!==`change`),b(`files`,C))},onError:()=>void 0}),r;try{r=yield ne()}catch(e){throw yield n.close(),e}yield u?.close(),u=n,o=r.site,s=r.reader,c=ls(cs(as(yield ea(o,rs)))),y(),yield ee()}),T=a(()=>{f&&m(f)}),E=ft(e,(e,t)=>{t&&es.has(String(t))&&b(`config`,w)});return E.on(`error`,()=>void 0),te(w),yield h,{close:()=>$(void 0,void 0,void 0,function*(){E.close(),T();for(let e of g.values())clearTimeout(e);yield h,yield u?.close()})}});export{Bn as C,vr as S,wi as _,Vo as a,Zr as b,ea as c,Ti as d,li as f,Ci as g,gi as h,Yo as i,qi as l,_i as m,Zo as n,Io as o,Ni as p,fs as r,Ia as s,Xo as t,Pi as u,H as v,Ur as x,ri as y};
|
|
@@ -98,4 +98,4 @@ Please do one of the following:
|
|
|
98
98
|
- Use a different option key
|
|
99
99
|
https://yargs.js.org/docs/#api-reference-version`,void 0,`versionWarning`),I(this,q,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(I(this,q,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=I(this,Z,`f`).getDescriptions();Object.prototype.hasOwnProperty.call(a,e)&&typeof i!=`string`||this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){P(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[Ut](),e===void 0&&(e=I(this,Y,`f`)),typeof t==`object`&&(F(this,At,t,`f`),t=n),typeof t==`function`&&(F(this,J,t,`f`),t=!1),t||F(this,Y,e,`f`),I(this,J,`f`)&&F(this,V,!1,`f`);let r=this[vn](e,!!t),i=this.parsed;return I(this,R,`f`).setParsed(this.parsed),N(r)?r.then(e=>(I(this,J,`f`)&&I(this,J,`f`).call(this,I(this,B,`f`),e,I(this,K,`f`)),e)).catch(e=>{throw I(this,J,`f`)&&I(this,J,`f`)(e,this.parsed.argv,I(this,K,`f`)),e}).finally(()=>{this[rn](),this.parsed=i}):(I(this,J,`f`)&&I(this,J,`f`).call(this,I(this,B,`f`),r,I(this,K,`f`)),this[rn](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return N(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(N(r))throw new j(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return P(`<object>`,[e],arguments.length),F(this,kt,e,`f`),this}pkgConf(e,t){P(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[Xt](t||I(this,bt,`f`));return r[e]&&typeof r[e]==`object`&&(n=gt(r[e],t||I(this,bt,`f`),this[Gt]()[`deep-merge-config`]||!1,I(this,X,`f`)),I(this,q,`f`).configObjects=(I(this,q,`f`).configObjects||[]).concat(n)),this}positional(e,t){P(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=$e(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=I(this,xt,`f`).fullCommands[I(this,xt,`f`).fullCommands.length-1],i=r?I(this,L,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return Pe(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,I(this,Z,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return P(`[boolean]`,[e],arguments.length),F(this,Nt,e,`f`),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return P(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&I(this,q,`f`).narg[e]||this[Qt](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return P(`[string] [string]`,[e,t],arguments.length),e||=this.$0,I(this,Dt,`f`).log(I(this,R,`f`).generateCompletionScript(e,t||I(this,z,`f`)||`completion`)),this}showHelp(e){if(P(`[string|function]`,[e],arguments.length),F(this,W,!0,`f`),!I(this,Z,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[vn](I(this,Y,`f`),void 0,void 0,0,!0);if(N(t))return t.then(()=>{I(this,Z,`f`).showHelp(e)}),this}let t=I(this,L,`f`).runDefaultBuilderOn(this);if(N(t))return t.then(()=>{I(this,Z,`f`).showHelp(e)}),this}return I(this,Z,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return P(`[boolean|string] [string]`,[e,t],arguments.length),I(this,Z,`f`).showHelpOnFail(e,t),this}showVersion(e){return P(`[string|function]`,[e],arguments.length),I(this,Z,`f`).showVersion(e),this}skipValidation(e){return P(`<array|string>`,[e],arguments.length),this[Zt](`skipValidation`,e),this}strict(e){return P(`[boolean]`,[e],arguments.length),F(this,Pt,e!==!1,`f`),this}strictCommands(e){return P(`[boolean]`,[e],arguments.length),F(this,Ft,e!==!1,`f`),this}strictOptions(e){return P(`[boolean]`,[e],arguments.length),F(this,It,e!==!1,`f`),this}string(e){return P(`<array|string>`,[e],arguments.length),this[Zt](`string`,e),this[xn](e),this}terminalWidth(){return P([],0),I(this,X,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return P(`<object>`,[e],arguments.length),F(this,Ct,!1,`f`),I(this,X,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(P(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(M(e,null,I(this,X,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new j(`.usage() description must start with $0 if being used as alias for .command()`)}return I(this,Z,`f`).usage(e),this}usageConfiguration(e){return P(`<object>`,[e],arguments.length),F(this,Lt,e,`f`),this}version(e,t,n){let r=`version`;if(P(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),I(this,Q,`f`)&&(this[Vt](I(this,Q,`f`)),I(this,Z,`f`).version(void 0),F(this,Q,null,`f`)),arguments.length===0)n=this[Jt](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return F(this,Q,typeof e==`string`?e:r,`f`),t||=I(this,Z,`f`).deferY18nLookup(`Show version number`),I(this,Z,`f`).version(n||void 0),this.boolean(I(this,Q,`f`)),this.describe(I(this,Q,`f`),t),this}wrap(e){return P(`<number|null|undefined>`,[e],arguments.length),I(this,Z,`f`).wrap(e),this}[(L=/* @__PURE__ */ new WeakMap,bt=/* @__PURE__ */ new WeakMap,xt=/* @__PURE__ */ new WeakMap,R=/* @__PURE__ */ new WeakMap,z=/* @__PURE__ */ new WeakMap,St=/* @__PURE__ */ new WeakMap,B=/* @__PURE__ */ new WeakMap,Ct=/* @__PURE__ */ new WeakMap,wt=/* @__PURE__ */ new WeakMap,V=/* @__PURE__ */ new WeakMap,Tt=/* @__PURE__ */ new WeakMap,H=/* @__PURE__ */ new WeakMap,U=/* @__PURE__ */ new WeakMap,W=/* @__PURE__ */ new WeakMap,G=/* @__PURE__ */ new WeakMap,Et=/* @__PURE__ */ new WeakMap,Dt=/* @__PURE__ */ new WeakMap,K=/* @__PURE__ */ new WeakMap,q=/* @__PURE__ */ new WeakMap,Ot=/* @__PURE__ */ new WeakMap,kt=/* @__PURE__ */ new WeakMap,J=/* @__PURE__ */ new WeakMap,At=/* @__PURE__ */ new WeakMap,jt=/* @__PURE__ */ new WeakMap,Mt=/* @__PURE__ */ new WeakMap,Y=/* @__PURE__ */ new WeakMap,Nt=/* @__PURE__ */ new WeakMap,X=/* @__PURE__ */ new WeakMap,Pt=/* @__PURE__ */ new WeakMap,Ft=/* @__PURE__ */ new WeakMap,It=/* @__PURE__ */ new WeakMap,Z=/* @__PURE__ */ new WeakMap,Lt=/* @__PURE__ */ new WeakMap,Q=/* @__PURE__ */ new WeakMap,$=/* @__PURE__ */ new WeakMap,zt)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[Bt](){return{log:(...e)=>{this[pn]()||console.log(...e),F(this,W,!0,`f`),I(this,K,`f`).length&&F(this,K,I(this,K,`f`)+`
|
|
100
100
|
`,`f`),F(this,K,I(this,K,`f`)+e.join(` `),`f`)},error:(...e)=>{this[pn]()||console.error(...e),F(this,W,!0,`f`),I(this,K,`f`).length&&F(this,K,I(this,K,`f`)+`
|
|
101
|
-
`,`f`),F(this,K,I(this,K,`f`)+e.join(` `),`f`)}}}[Vt](e){Pe(I(this,q,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=I(this,q,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete I(this,Z,`f`).getDescriptions()[e]}[Ht](e,t,n){I(this,wt,`f`)[n]||(I(this,X,`f`).process.emitWarning(e,t),I(this,wt,`f`)[n]=!0)}[Ut](){I(this,Tt,`f`).push({options:I(this,q,`f`),configObjects:I(this,q,`f`).configObjects.slice(0),exitProcess:I(this,V,`f`),groups:I(this,U,`f`),strict:I(this,Pt,`f`),strictCommands:I(this,Ft,`f`),strictOptions:I(this,It,`f`),completionCommand:I(this,z,`f`),output:I(this,K,`f`),exitError:I(this,B,`f`),hasOutput:I(this,W,`f`),parsed:this.parsed,parseFn:I(this,J,`f`),parseContext:I(this,At,`f`)}),I(this,Z,`f`).freeze(),I(this,$,`f`).freeze(),I(this,L,`f`).freeze(),I(this,H,`f`).freeze()}[Wt](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(I(this,X,`f`).process.argv()[0])?I(this,X,`f`).process.argv().slice(1,2):I(this,X,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[gn](I(this,bt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),I(this,X,`f`).getEnv(`_`)&&I(this,X,`f`).getProcessArgvBin()===I(this,X,`f`).getEnv(`_`)&&(e=I(this,X,`f`).getEnv(`_`).replace(`${I(this,X,`f`).path.dirname(I(this,X,`f`).process.execPath())}/`,``)),e}[Gt](){return I(this,kt,`f`)}[Kt](){return I(this,Lt,`f`)}[qt](){if(!I(this,Ct,`f`))return;let e=I(this,X,`f`).getEnv(`LC_ALL`)||I(this,X,`f`).getEnv(`LC_MESSAGES`)||I(this,X,`f`).getEnv(`LANG`)||I(this,X,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Jt](){return this[Xt]().version||`unknown`}[Yt](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)I(this,X,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Xt](e){let t=e||`*`;if(I(this,jt,`f`)[t])return I(this,jt,`f`)[t];let n={};try{let t=e||I(this,X,`f`).mainFilename;!e&&I(this,X,`f`).path.extname(t)&&(t=I(this,X,`f`).path.dirname(t));let r=I(this,X,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});M(r,void 0,I(this,X,`f`)),n=JSON.parse(I(this,X,`f`).readFileSync(r,`utf8`))}catch{}return I(this,jt,`f`)[t]=n||{},I(this,jt,`f`)[t]}[Zt](e,t){t=[].concat(t),t.forEach(t=>{t=this[tn](t),I(this,q,`f`)[e].push(t)})}[Qt](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=n})}[$t](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=(I(this,q,`f`)[e][t]||[]).concat(n)})}[en](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Pe(n))e(t,n[t]);else i(t,this[tn](n),r)}[tn](e){return e===`__proto__`?`___proto___`:e}[nn](e,t){return this[Qt](this[nn].bind(this),`key`,e,t),this}[rn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=I(this,Tt,`f`).pop();M(f,void 0,I(this,X,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){F(e,q,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){F(t,V,e,`f`)}}.value,groups:{set value(e){F(n,U,e,`f`)}}.value,output:{set value(e){F(r,K,e,`f`)}}.value,exitError:{set value(e){F(i,B,e,`f`)}}.value,hasOutput:{set value(e){F(a,W,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){F(o,Pt,e,`f`)}}.value,strictCommands:{set value(e){F(s,Ft,e,`f`)}}.value,strictOptions:{set value(e){F(c,It,e,`f`)}}.value,completionCommand:{set value(e){F(l,z,e,`f`)}}.value,parseFn:{set value(e){F(u,J,e,`f`)}}.value,parseContext:{set value(e){F(d,At,e,`f`)}}.value}=f,I(this,q,`f`).configObjects=p,I(this,Z,`f`).unfreeze(),I(this,$,`f`).unfreeze(),I(this,L,`f`).unfreeze(),I(this,H,`f`).unfreeze()}[an](e,t){return He(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[on].bind(this),getContext:this[sn].bind(this),getHasOutput:this[cn].bind(this),getLoggerInstance:this[ln].bind(this),getParseContext:this[un].bind(this),getParserConfiguration:this[Gt].bind(this),getUsageConfiguration:this[Kt].bind(this),getUsageInstance:this[dn].bind(this),getValidationInstance:this[fn].bind(this),hasParseCallback:this[pn].bind(this),isGlobalContext:this[mn].bind(this),postProcess:this[hn].bind(this),reset:this[_n].bind(this),runValidation:this[yn].bind(this),runYargsParserAndExecuteCommands:this[vn].bind(this),setHasOutput:this[bn].bind(this)}}[on](){return I(this,L,`f`)}[sn](){return I(this,xt,`f`)}[cn](){return I(this,W,`f`)}[ln](){return I(this,Dt,`f`)}[un](){return I(this,At,`f`)||{}}[dn](){return I(this,Z,`f`)}[fn](){return I(this,$,`f`)}[pn](){return!!I(this,J,`f`)}[mn](){return I(this,Et,`f`)}[hn](e,t,n,r){return n||N(e)||(t||(e=this[zt](e)),(this[Gt]()[`parse-positional-numbers`]||this[Gt]()[`parse-positional-numbers`]===void 0)&&(e=this[Yt](e)),r&&(e=Ve(e,this,I(this,H,`f`).getMiddleware(),!1))),e}[_n](e={}){F(this,q,I(this,q,`f`)||{},`f`);let t={};t.local=I(this,q,`f`).local||[],t.configObjects=I(this,q,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(I(this,Mt,`f`),Object.keys(I(this,U,`f`)).reduce((e,t)=>{let r=I(this,U,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),F(this,U,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(I(this,q,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=$e(I(this,q,`f`)[e],e=>!n[e])}),t.envPrefix=I(this,q,`f`).envPrefix,F(this,q,t,`f`),F(this,Z,I(this,Z,`f`)?I(this,Z,`f`).reset(n):nt(this,I(this,X,`f`)),`f`),F(this,$,I(this,$,`f`)?I(this,$,`f`).reset(n):pt(this,I(this,Z,`f`),I(this,X,`f`)),`f`),F(this,L,I(this,L,`f`)?I(this,L,`f`).reset():qe(I(this,Z,`f`),I(this,$,`f`),I(this,H,`f`),I(this,X,`f`)),`f`),I(this,R,`f`)||F(this,R,ct(this,I(this,Z,`f`),I(this,L,`f`),I(this,X,`f`)),`f`),I(this,H,`f`).reset(),F(this,z,null,`f`),F(this,K,``,`f`),F(this,B,null,`f`),F(this,W,!1,`f`),this.parsed=!1,this}[gn](e,t){return I(this,X,`f`).path.relative(e,t)}[vn](e,t,n,r=0,i=!1){let a=!!n||i;e||=I(this,Y,`f`),I(this,q,`f`).__=I(this,X,`f`).y18n.__,I(this,q,`f`).configuration=this[Gt]();let o=!!I(this,q,`f`).configuration[`populate--`],s=Object.assign({},I(this,q,`f`).configuration,{"populate--":!0}),c=I(this,X,`f`).Parser.detailed(e,Object.assign({},I(this,q,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,I(this,At,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===I(this,G,`f`)&&l[e]?f=!0:e===I(this,Q,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&I(this,Z,`f`).clearCachedHelpMessage();try{if(this[qt](),t)return this[hn](l,o,!!n,!1);I(this,G,`f`)&&[I(this,G,`f`)].concat(d[I(this,G,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),F(this,Et,!1,`f`);let s=I(this,L,`f`).getCommands(),m=I(this,R,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++){if(a=String(l._[t]),s.includes(a)&&a!==I(this,z,`f`)){let e=I(this,L,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[hn](e,o,!!n,!1)}if(!e&&a!==I(this,z,`f`)){e=a;break}}!I(this,L,`f`).hasDefaultCommand()&&I(this,Nt,`f`)&&e&&!h&&I(this,$,`f`).recommendCommands(e,s)}I(this,z,`f`)&&l._.includes(I(this,z,`f`))&&!m&&(I(this,V,`f`)&&et(!0),this.showCompletionScript(),this.exit(0))}if(I(this,L,`f`).hasDefaultCommand()&&!h){let e=I(this,L,`f`).runCommand(null,this,c,0,i,f||p||i);return this[hn](e,o,!!n,!1)}if(m){I(this,V,`f`)&&et(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${I(this,R,`f`).completionKey}`)+1);return I(this,R,`f`).getCompletion(t,(e,t)=>{if(e)throw new j(e.message);(t||[]).forEach(e=>{I(this,Dt,`f`).log(e)}),this.exit(0)}),this[hn](l,!o,!!n,!1)}if(I(this,W,`f`)||(f?(I(this,V,`f`)&&et(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(I(this,V,`f`)&&et(!0),a=!0,I(this,Z,`f`).showVersion(`log`),this.exit(0))),!a&&I(this,q,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>I(this,q,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new j(c.error.message);if(!m){let e=this[yn](d,{},c.error);n||(u=Ve(l,this,I(this,H,`f`).getMiddleware(),!0)),u=this[an](e,u??l),N(u)&&!n&&(u=u.then(()=>Ve(l,this,I(this,H,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof j)I(this,Z,`f`).fail(e.message,e);else throw e}return this[hn](u??l,o,!!n,!0)}[yn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new j(n.message);I(this,$,`f`).nonOptionCount(a),I(this,$,`f`).requiredArguments(a,i);let o=!1;I(this,Ft,`f`)&&(o=I(this,$,`f`).unknownCommands(a)),I(this,Pt,`f`)&&!o?I(this,$,`f`).unknownArguments(a,e,t,!!r):I(this,It,`f`)&&I(this,$,`f`).unknownArguments(a,e,{},!1,!1),I(this,$,`f`).limitedChoices(a),I(this,$,`f`).implications(a),I(this,$,`f`).conflicting(a)}}[bn](){F(this,W,!0,`f`)}[xn](e){if(typeof e==`string`)I(this,q,`f`).key[e]=!0;else for(let t of e)I(this,q,`f`).key[t]=!0}};function Cn(e){return!!e&&typeof e.getInternalMethods==`function`}const wn=Rt(Me);var Tn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const En=e=>e.option(`multi-repo`,{type:`boolean`,description:`Compose local repositories; set up a workspace if no config exists`}).option(`workspace`,{type:`string`,requiresArg:!0,description:`Path to a local multi-repo config (implies --multi-repo)`}).option(`setup`,{type:`boolean`,description:`Review saved setup (requires --multi-repo or --workspace); preserve cache`}).option(`non-interactive`,{type:`boolean`,description:`Never prompt (requires --multi-repo or --workspace and a valid config)`}).wrap(null).epilog(n),Dn=(e,t)=>En(wn(e).scriptName(t).usage(`$0 dev --multi-repo [options]`)).option(`port`,{type:`number`,default:3e3,description:`Local preview port`}).option(`open`,{type:`boolean`,default:!1,description:`Open the preview in a browser`}).option(`client-version`,{type:`string`,hidden:!0}).option(`local-client-version`,{type:`string`,hidden:!0}).option(`local-schema`,{type:`boolean`,hidden:!0}).option(`classic`,{type:`boolean`,default:!1,description:`Preview with the classic client`}).option(`beta`,{type:`boolean`,default:!1,hidden:!0}).option(`groups`,{type:`array`,description:`Mock user groups`}).option(`signed-in`,{type:`boolean`,default:!1}).option(`disable-openapi`,{type:`boolean`,default:!1}).option(`disable-prefetch`,{type:`boolean`,default:!1}).option(`host`,{type:`boolean`,default:!1}).option(`telemetry`,{alias:`t`,type:`boolean`}).help().alias(`help`,`h`).exitProcess(!1).strictOptions().fail(e=>{throw Error(e)});function On(e){return Dn(e,`mint`).help(!1).version(!1).strictOptions(!1).parseSync()._[0]===`dev`}function kn(e,n,r,i){return Tn(this,void 0,void 0,function*(){let a=Dn(e,n).parseSync();if(a.help||a.version)return;if(a.workspace!==void 0&&!a.workspace.trim())throw Error(`--workspace requires a config path.`);if(!a[`multi-repo`]&&!a.workspace)throw Error(`Use --multi-repo with --setup or --non-interactive.`);if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error(`--port must be an integer from 1 to 65535.`);let{resolveWorkspace:o}=yield import(`./multi-repo-setup-DaTpmZuU.js`),s;console.log(`Checking multi-repo configuration…`);let c=yield o({cwd:process.cwd(),workspace:a.workspace,setup:a.setup,nonInteractive:a[`non-interactive`],onSaved:e=>{s=`Saved ${e}. Keep machine-specific paths out of Git; add the local config to .gitignore.`}}),{prepareMultiRepoPreview:l}=yield import(`./multi-repo-preview-Cj2JRsYd.js`),f=performance.now(),p=0,m=yield l(c,!0,{compositionCacheDirectory:d.join(u.homedir(),`.mintlify`,`multi-repo-compositions`),onProgress:e=>{e.stage===`cold`&&console.log(`Preparing the workspace for the first time. Large repositories can take around two minutes; later runs reuse the saved workspace.`),e.stage===`cached`&&console.log(`Checking the saved workspace for changes…`),e.stage===`watching`&&console.log(`Starting repository watchers…`),e.stage===`files`&&performance.now()-p>=1e3&&(p=performance.now(),console.log(`Checked ${e.files.toLocaleString()} files…`))}});r(m.close);let h=m.getStats();console.log(`Workspace ready in ${((performance.now()-f)/1e3).toFixed(1)}s: ${h?.reusedFiles??0} files reused. Starting preview…`);for(let e of m.sources)console.log(` ${e.repo} → /${e.mountPath}`);if(process.chdir(m.directory),typeof a.telemetry==`boolean`){let{setTelemetryEnabled:e}=yield import(`./config-BWtVex1A.js`);yield e(a.telemetry)}let[{dev:g,Logs:ee},{render:_},{createElement:te}]=yield Promise.all([import(`./dist-oQVTFR6D.js`),import(`./build-B-oc3MuD.js`),import(`./react-CA8V--cT.js`).then(e=>/* @__PURE__ */ t(e.default,1))]);if(_(te(ee)),a.classic!==!0){let{watchComponentUsage:e}=yield import(`./live-DyuIovPE.js`);e(m.directory).catch(()=>void 0)}yield g(Object.assign(Object.assign({},a),{groups:a.groups??(a[`signed-in`]?[]:void 0),packageName:n,previewReadyMessage:s,onExit:i}))})}export{A as a,wn as i,En as n,kn as r,On as t};
|
|
101
|
+
`,`f`),F(this,K,I(this,K,`f`)+e.join(` `),`f`)}}}[Vt](e){Pe(I(this,q,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=I(this,q,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete I(this,Z,`f`).getDescriptions()[e]}[Ht](e,t,n){I(this,wt,`f`)[n]||(I(this,X,`f`).process.emitWarning(e,t),I(this,wt,`f`)[n]=!0)}[Ut](){I(this,Tt,`f`).push({options:I(this,q,`f`),configObjects:I(this,q,`f`).configObjects.slice(0),exitProcess:I(this,V,`f`),groups:I(this,U,`f`),strict:I(this,Pt,`f`),strictCommands:I(this,Ft,`f`),strictOptions:I(this,It,`f`),completionCommand:I(this,z,`f`),output:I(this,K,`f`),exitError:I(this,B,`f`),hasOutput:I(this,W,`f`),parsed:this.parsed,parseFn:I(this,J,`f`),parseContext:I(this,At,`f`)}),I(this,Z,`f`).freeze(),I(this,$,`f`).freeze(),I(this,L,`f`).freeze(),I(this,H,`f`).freeze()}[Wt](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(I(this,X,`f`).process.argv()[0])?I(this,X,`f`).process.argv().slice(1,2):I(this,X,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[gn](I(this,bt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),I(this,X,`f`).getEnv(`_`)&&I(this,X,`f`).getProcessArgvBin()===I(this,X,`f`).getEnv(`_`)&&(e=I(this,X,`f`).getEnv(`_`).replace(`${I(this,X,`f`).path.dirname(I(this,X,`f`).process.execPath())}/`,``)),e}[Gt](){return I(this,kt,`f`)}[Kt](){return I(this,Lt,`f`)}[qt](){if(!I(this,Ct,`f`))return;let e=I(this,X,`f`).getEnv(`LC_ALL`)||I(this,X,`f`).getEnv(`LC_MESSAGES`)||I(this,X,`f`).getEnv(`LANG`)||I(this,X,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Jt](){return this[Xt]().version||`unknown`}[Yt](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)I(this,X,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Xt](e){let t=e||`*`;if(I(this,jt,`f`)[t])return I(this,jt,`f`)[t];let n={};try{let t=e||I(this,X,`f`).mainFilename;!e&&I(this,X,`f`).path.extname(t)&&(t=I(this,X,`f`).path.dirname(t));let r=I(this,X,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});M(r,void 0,I(this,X,`f`)),n=JSON.parse(I(this,X,`f`).readFileSync(r,`utf8`))}catch{}return I(this,jt,`f`)[t]=n||{},I(this,jt,`f`)[t]}[Zt](e,t){t=[].concat(t),t.forEach(t=>{t=this[tn](t),I(this,q,`f`)[e].push(t)})}[Qt](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=n})}[$t](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{I(this,q,`f`)[e][t]=(I(this,q,`f`)[e][t]||[]).concat(n)})}[en](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Pe(n))e(t,n[t]);else i(t,this[tn](n),r)}[tn](e){return e===`__proto__`?`___proto___`:e}[nn](e,t){return this[Qt](this[nn].bind(this),`key`,e,t),this}[rn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=I(this,Tt,`f`).pop();M(f,void 0,I(this,X,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){F(e,q,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){F(t,V,e,`f`)}}.value,groups:{set value(e){F(n,U,e,`f`)}}.value,output:{set value(e){F(r,K,e,`f`)}}.value,exitError:{set value(e){F(i,B,e,`f`)}}.value,hasOutput:{set value(e){F(a,W,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){F(o,Pt,e,`f`)}}.value,strictCommands:{set value(e){F(s,Ft,e,`f`)}}.value,strictOptions:{set value(e){F(c,It,e,`f`)}}.value,completionCommand:{set value(e){F(l,z,e,`f`)}}.value,parseFn:{set value(e){F(u,J,e,`f`)}}.value,parseContext:{set value(e){F(d,At,e,`f`)}}.value}=f,I(this,q,`f`).configObjects=p,I(this,Z,`f`).unfreeze(),I(this,$,`f`).unfreeze(),I(this,L,`f`).unfreeze(),I(this,H,`f`).unfreeze()}[an](e,t){return He(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[on].bind(this),getContext:this[sn].bind(this),getHasOutput:this[cn].bind(this),getLoggerInstance:this[ln].bind(this),getParseContext:this[un].bind(this),getParserConfiguration:this[Gt].bind(this),getUsageConfiguration:this[Kt].bind(this),getUsageInstance:this[dn].bind(this),getValidationInstance:this[fn].bind(this),hasParseCallback:this[pn].bind(this),isGlobalContext:this[mn].bind(this),postProcess:this[hn].bind(this),reset:this[_n].bind(this),runValidation:this[yn].bind(this),runYargsParserAndExecuteCommands:this[vn].bind(this),setHasOutput:this[bn].bind(this)}}[on](){return I(this,L,`f`)}[sn](){return I(this,xt,`f`)}[cn](){return I(this,W,`f`)}[ln](){return I(this,Dt,`f`)}[un](){return I(this,At,`f`)||{}}[dn](){return I(this,Z,`f`)}[fn](){return I(this,$,`f`)}[pn](){return!!I(this,J,`f`)}[mn](){return I(this,Et,`f`)}[hn](e,t,n,r){return n||N(e)||(t||(e=this[zt](e)),(this[Gt]()[`parse-positional-numbers`]||this[Gt]()[`parse-positional-numbers`]===void 0)&&(e=this[Yt](e)),r&&(e=Ve(e,this,I(this,H,`f`).getMiddleware(),!1))),e}[_n](e={}){F(this,q,I(this,q,`f`)||{},`f`);let t={};t.local=I(this,q,`f`).local||[],t.configObjects=I(this,q,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(I(this,Mt,`f`),Object.keys(I(this,U,`f`)).reduce((e,t)=>{let r=I(this,U,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),F(this,U,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(I(this,q,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=$e(I(this,q,`f`)[e],e=>!n[e])}),t.envPrefix=I(this,q,`f`).envPrefix,F(this,q,t,`f`),F(this,Z,I(this,Z,`f`)?I(this,Z,`f`).reset(n):nt(this,I(this,X,`f`)),`f`),F(this,$,I(this,$,`f`)?I(this,$,`f`).reset(n):pt(this,I(this,Z,`f`),I(this,X,`f`)),`f`),F(this,L,I(this,L,`f`)?I(this,L,`f`).reset():qe(I(this,Z,`f`),I(this,$,`f`),I(this,H,`f`),I(this,X,`f`)),`f`),I(this,R,`f`)||F(this,R,ct(this,I(this,Z,`f`),I(this,L,`f`),I(this,X,`f`)),`f`),I(this,H,`f`).reset(),F(this,z,null,`f`),F(this,K,``,`f`),F(this,B,null,`f`),F(this,W,!1,`f`),this.parsed=!1,this}[gn](e,t){return I(this,X,`f`).path.relative(e,t)}[vn](e,t,n,r=0,i=!1){let a=!!n||i;e||=I(this,Y,`f`),I(this,q,`f`).__=I(this,X,`f`).y18n.__,I(this,q,`f`).configuration=this[Gt]();let o=!!I(this,q,`f`).configuration[`populate--`],s=Object.assign({},I(this,q,`f`).configuration,{"populate--":!0}),c=I(this,X,`f`).Parser.detailed(e,Object.assign({},I(this,q,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,I(this,At,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===I(this,G,`f`)&&l[e]?f=!0:e===I(this,Q,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&I(this,Z,`f`).clearCachedHelpMessage();try{if(this[qt](),t)return this[hn](l,o,!!n,!1);I(this,G,`f`)&&[I(this,G,`f`)].concat(d[I(this,G,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),F(this,Et,!1,`f`);let s=I(this,L,`f`).getCommands(),m=I(this,R,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++){if(a=String(l._[t]),s.includes(a)&&a!==I(this,z,`f`)){let e=I(this,L,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[hn](e,o,!!n,!1)}if(!e&&a!==I(this,z,`f`)){e=a;break}}!I(this,L,`f`).hasDefaultCommand()&&I(this,Nt,`f`)&&e&&!h&&I(this,$,`f`).recommendCommands(e,s)}I(this,z,`f`)&&l._.includes(I(this,z,`f`))&&!m&&(I(this,V,`f`)&&et(!0),this.showCompletionScript(),this.exit(0))}if(I(this,L,`f`).hasDefaultCommand()&&!h){let e=I(this,L,`f`).runCommand(null,this,c,0,i,f||p||i);return this[hn](e,o,!!n,!1)}if(m){I(this,V,`f`)&&et(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${I(this,R,`f`).completionKey}`)+1);return I(this,R,`f`).getCompletion(t,(e,t)=>{if(e)throw new j(e.message);(t||[]).forEach(e=>{I(this,Dt,`f`).log(e)}),this.exit(0)}),this[hn](l,!o,!!n,!1)}if(I(this,W,`f`)||(f?(I(this,V,`f`)&&et(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(I(this,V,`f`)&&et(!0),a=!0,I(this,Z,`f`).showVersion(`log`),this.exit(0))),!a&&I(this,q,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>I(this,q,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new j(c.error.message);if(!m){let e=this[yn](d,{},c.error);n||(u=Ve(l,this,I(this,H,`f`).getMiddleware(),!0)),u=this[an](e,u??l),N(u)&&!n&&(u=u.then(()=>Ve(l,this,I(this,H,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof j)I(this,Z,`f`).fail(e.message,e);else throw e}return this[hn](u??l,o,!!n,!0)}[yn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new j(n.message);I(this,$,`f`).nonOptionCount(a),I(this,$,`f`).requiredArguments(a,i);let o=!1;I(this,Ft,`f`)&&(o=I(this,$,`f`).unknownCommands(a)),I(this,Pt,`f`)&&!o?I(this,$,`f`).unknownArguments(a,e,t,!!r):I(this,It,`f`)&&I(this,$,`f`).unknownArguments(a,e,{},!1,!1),I(this,$,`f`).limitedChoices(a),I(this,$,`f`).implications(a),I(this,$,`f`).conflicting(a)}}[bn](){F(this,W,!0,`f`)}[xn](e){if(typeof e==`string`)I(this,q,`f`).key[e]=!0;else for(let t of e)I(this,q,`f`).key[t]=!0}};function Cn(e){return!!e&&typeof e.getInternalMethods==`function`}const wn=Rt(Me);var Tn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const En=e=>e.option(`multi-repo`,{type:`boolean`,description:`Compose local repositories; set up a workspace if no config exists`}).option(`workspace`,{type:`string`,requiresArg:!0,description:`Path to a local multi-repo config (implies --multi-repo)`}).option(`setup`,{type:`boolean`,description:`Review saved setup (requires --multi-repo or --workspace); preserve cache`}).option(`non-interactive`,{type:`boolean`,description:`Never prompt (requires --multi-repo or --workspace and a valid config)`}).wrap(null).epilog(n),Dn=(e,t)=>En(wn(e).scriptName(t).usage(`$0 dev --multi-repo [options]`)).option(`port`,{type:`number`,default:3e3,description:`Local preview port`}).option(`open`,{type:`boolean`,default:!1,description:`Open the preview in a browser`}).option(`client-version`,{type:`string`,hidden:!0}).option(`local-client-version`,{type:`string`,hidden:!0}).option(`local-schema`,{type:`boolean`,hidden:!0}).option(`classic`,{type:`boolean`,default:!1,description:`Preview with the classic client`}).option(`beta`,{type:`boolean`,default:!1,hidden:!0}).option(`groups`,{type:`array`,description:`Mock user groups`}).option(`signed-in`,{type:`boolean`,default:!1}).option(`disable-openapi`,{type:`boolean`,default:!1}).option(`disable-prefetch`,{type:`boolean`,default:!1}).option(`host`,{type:`boolean`,default:!1}).option(`telemetry`,{alias:`t`,type:`boolean`}).help().alias(`help`,`h`).exitProcess(!1).strictOptions().fail(e=>{throw Error(e)});function On(e){return Dn(e,`mint`).help(!1).version(!1).strictOptions(!1).parseSync()._[0]===`dev`}function kn(e,n,r,i){return Tn(this,void 0,void 0,function*(){let a=Dn(e,n).parseSync();if(a.help||a.version)return;if(a.workspace!==void 0&&!a.workspace.trim())throw Error(`--workspace requires a config path.`);if(!a[`multi-repo`]&&!a.workspace)throw Error(`Use --multi-repo with --setup or --non-interactive.`);if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error(`--port must be an integer from 1 to 65535.`);let{resolveWorkspace:o}=yield import(`./multi-repo-setup-DaTpmZuU.js`),s;console.log(`Checking multi-repo configuration…`);let c=yield o({cwd:process.cwd(),workspace:a.workspace,setup:a.setup,nonInteractive:a[`non-interactive`],onSaved:e=>{s=`Saved ${e}. Keep machine-specific paths out of Git; add the local config to .gitignore.`}}),{prepareMultiRepoPreview:l}=yield import(`./multi-repo-preview-Cj2JRsYd.js`),f=performance.now(),p=0,m=yield l(c,!0,{compositionCacheDirectory:d.join(u.homedir(),`.mintlify`,`multi-repo-compositions`),onProgress:e=>{e.stage===`cold`&&console.log(`Preparing the workspace for the first time. Large repositories can take around two minutes; later runs reuse the saved workspace.`),e.stage===`cached`&&console.log(`Checking the saved workspace for changes…`),e.stage===`watching`&&console.log(`Starting repository watchers…`),e.stage===`files`&&performance.now()-p>=1e3&&(p=performance.now(),console.log(`Checked ${e.files.toLocaleString()} files…`))}});r(m.close);let h=m.getStats();console.log(`Workspace ready in ${((performance.now()-f)/1e3).toFixed(1)}s: ${h?.reusedFiles??0} files reused. Starting preview…`);for(let e of m.sources)console.log(` ${e.repo} → /${e.mountPath}`);if(process.chdir(m.directory),typeof a.telemetry==`boolean`){let{setTelemetryEnabled:e}=yield import(`./config-BWtVex1A.js`);yield e(a.telemetry)}let[{dev:g,Logs:ee},{render:_},{createElement:te}]=yield Promise.all([import(`./dist-oQVTFR6D.js`),import(`./build-B-oc3MuD.js`),import(`./react-CA8V--cT.js`).then(e=>/* @__PURE__ */ t(e.default,1))]);if(_(te(ee)),a.classic!==!0){let{watchComponentUsage:e}=yield import(`./live-9n9BQVZs.js`);e(m.directory).catch(()=>void 0)}yield g(Object.assign(Object.assign({},a),{groups:a.groups??(a[`signed-in`]?[]:void 0),packageName:n,previewReadyMessage:s,onExit:i}))})}export{A as a,wn as i,En as n,kn as r,On as t};
|
|
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
export{t as isMultiRepoDev,n as multiRepoOptions,r as runMultiRepoDev}from"./multi-repo-command-
|
|
7
|
+
export{t as isMultiRepoDev,n as multiRepoOptions,r as runMultiRepoDev}from"./multi-repo-command-B8Mjapc9.js";
|
package/dist/start.js
CHANGED
|
@@ -5,4 +5,4 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
5
5
|
const require = __mintCreateRequire(import.meta.url);
|
|
6
6
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __mintDirname(__filename);
|
|
8
|
-
import{r as e}from"./client-DXQ6Tgw0.js";var t=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function n(e,n=e=>process.exit(e)){let r;return i=>(r??=t(this,void 0,void 0,function*(){try{yield e()}catch(e){return console.error(`Preview cleanup failed:`,e),n(1)}return n(i)}),r)}var r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const i=process.env.MINTLIFY_PACKAGE_NAME??`mint`;let a;function o(){return r(this,void 0,void 0,function*(){let e=a;a=void 0,yield e?.()})}function s(){return r(this,void 0,void 0,function*(){let e=process.argv.slice(2);if(e.some(e=>[`--multi-repo`,`--workspace`,`--setup`,`--non-interactive`].includes(e.split(`=`)[0]??``))){let{isMultiRepoDev:t,runMultiRepoDev:n}=yield import(`./multi-repo-command-
|
|
8
|
+
import{r as e}from"./client-DXQ6Tgw0.js";var t=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function n(e,n=e=>process.exit(e)){let r;return i=>(r??=t(this,void 0,void 0,function*(){try{yield e()}catch(e){return console.error(`Preview cleanup failed:`,e),n(1)}return n(i)}),r)}var r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const i=process.env.MINTLIFY_PACKAGE_NAME??`mint`;let a;function o(){return r(this,void 0,void 0,function*(){let e=a;a=void 0,yield e?.()})}function s(){return r(this,void 0,void 0,function*(){let e=process.argv.slice(2);if(e.some(e=>[`--multi-repo`,`--workspace`,`--setup`,`--non-interactive`].includes(e.split(`=`)[0]??``))){let{isMultiRepoDev:t,runMultiRepoDev:n}=yield import(`./multi-repo-command-BOkrmEqj.js`);if(t(e)){yield n(e,i,e=>{a=e},()=>c(0));return}}let{cli:t}=yield import(`./cli-BZ7NuW3R.js`);yield t({packageName:i})})}s().catch(e=>r(void 0,void 0,void 0,function*(){console.error(e instanceof Error?e.message:e),yield c(1)}));const c=n(()=>r(void 0,void 0,void 0,function*(){try{yield o()}finally{yield e()}}));process.once(`beforeExit`,()=>r(void 0,void 0,void 0,function*(){try{yield o(),yield e()}catch{}})),process.on(`SIGINT`,()=>{c(130)}),process.on(`SIGTERM`,()=>{c(143)});export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.93",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"sharp": "0.33.5"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@mintlify/package-builder": "0.0.
|
|
50
|
+
"@mintlify/package-builder": "0.0.201",
|
|
51
51
|
"@parcel/watcher": "2.5.1",
|
|
52
52
|
"fsevents": "2.3.3",
|
|
53
53
|
"keytar": "7.9.0"
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/parser": "7.21.2",
|
|
57
57
|
"@inquirer/prompts": "7.9.0",
|
|
58
|
-
"@mintlify/common": "1.0.
|
|
59
|
-
"@mintlify/editor": "0.0.
|
|
60
|
-
"@mintlify/link-rot": "3.0.
|
|
58
|
+
"@mintlify/common": "1.0.1412",
|
|
59
|
+
"@mintlify/editor": "0.0.692",
|
|
60
|
+
"@mintlify/link-rot": "3.0.1670",
|
|
61
61
|
"@mintlify/models": "0.0.407",
|
|
62
|
-
"@mintlify/og": "0.0.
|
|
63
|
-
"@mintlify/prebuild": "1.0.
|
|
64
|
-
"@mintlify/previewing": "4.0.
|
|
62
|
+
"@mintlify/og": "0.0.211",
|
|
63
|
+
"@mintlify/prebuild": "1.0.1592",
|
|
64
|
+
"@mintlify/previewing": "4.0.1684",
|
|
65
65
|
"@mintlify/ts-config": "2.0.2",
|
|
66
66
|
"@mintlify/validation": "0.1.994",
|
|
67
67
|
"@tsconfig/recommended": "1.0.2",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"yargs": "17.7.1",
|
|
111
111
|
"zod": "4.3.6"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "94d201c7d6b18f6a2943f6d21e294ee28ef12436"
|
|
114
114
|
}
|
package/dist/live-B98Hesfx.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createRequire as __mintCreateRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __mintFileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __mintDirname } from 'node:path';
|
|
4
|
-
const require = __mintCreateRequire(import.meta.url);
|
|
5
|
-
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __mintDirname(__filename);
|
|
7
|
-
import{o as e}from"./rolldown-runtime-CEAe2Uac.js";import{$ as t,A as n,O as r,Q as i,T as a,X as o,Y as s,Z as c,_ as l,et as u,n as d,nt as f,q as p,y as m}from"./dist-Crde1L1h.js";import{$t as h,Bt as g,C as _,Cn as v,Dn as ee,E as y,Et as te,Gt as b,Ht as ne,On as x,Q as S,Qt as re,Rt as C,St as w,U as T,Un as E,Vt as ie,X as ae,Yt as oe,Z as se,Zn as ce,Zt as le,_n as ue,a as de,bt as fe,er as pe,et as me,it as he,k as ge,nr as _e,o as ve,ot as ye,rn as be,st as xe,tr as Se,ur as Ce,vn as we,w as Te,wn as Ee,wt as De,yn as Oe,yt as ke,zt as Ae}from"./dist-ClUwKwwU.js";import{B as je,M as Me,P as Ne,Q as Pe,X as Fe,Z as Ie,_ as D,_t as Le,b as Re,c as ze,d as Be,r as Ve,s as He,st as Ue,t as We,tt as O,u as Ge,w as Ke,x as qe,y as Je}from"./utils-BUq37nH_.js";import{a as Ye,c as Xe,i as Ze,n as Qe,o as $e,r as et,s as tt,t as k}from"./remark-utils-CV-HGimg.js";import{n as nt,t as rt}from"./currencyMath-Bm2NMq0k.js";import{t as it}from"./watcher-CrrSXFeO.js";import at,{basename as ot,dirname as st,join as A,normalize as ct,parse as lt,resolve as ut}from"path";import dt,{readFileSync as ft,watch as pt}from"node:fs";import mt from"node:os";import j from"node:path";import{createHash as ht}from"node:crypto";import gt from"node:fs/promises";import{existsSync as _t}from"fs";import{sep as vt}from"path/win32";function yt(e,t){let n=t>0?`_${t}`:``;return oe(`param-${e}${n}`,{decamelize:!0,separator:`-`})}function bt(e){return(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`)&&e.name===`Variation`}function xt(e){let t=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`is`);if(!t)return{kind:`missing`};if(typeof t.value==`string`){let e=t.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(!t.value)return{kind:`invalid`};let n=t.value.data?.estree,r=n?.body[0],i=r?.type===`ExpressionStatement`?r.expression:void 0;if(i?.type===`Literal`&&typeof i.value==`string`){let e=i.value.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`TemplateLiteral`&&i.expressions.length===0){let e=(i.quasis[0]?.value.cooked)?.trim();return e?{kind:`valid`,ids:[e]}:{kind:`invalid`}}if(i?.type===`ArrayExpression`){let e=[];for(let t of i.elements){if(t?.type!==`Literal`||typeof t.value!=`string`)return{kind:`invalid`};let n=t.value.trim();if(!n)return{kind:`invalid`};e.push(n)}return e.length>0?{kind:`valid`,ids:[...new Set(e)]}:{kind:`invalid`}}if(n)return{kind:`invalid`};let a=t.value.value.trim().match(/^(["'`])([\s\S]*)\1$/);return(a?.[2])?.trim()?{kind:`valid`,ids:[a[2].trim()]}:{kind:`invalid`}}const St=[`h1`,`h2`,`h3`,`h4`],Ct=[`Accordion`,`AccordionGroup`,`Expandable`,`Update`,`Prompt`];function M(e,t){let n=e.find(e=>`name`in e&&e.name===t);if(n&&`value`in n&&typeof n.value==`string`)return n.value}const wt=e=>e&&[...e].sort(),Tt=e=>{if(typeof e==`string`)return e;let t=Ue(Xe(e.groups));return JSON.stringify([wt(t?.includes),wt(t?.excludes)])},Et=(e,t)=>{if(t===void 0)return!0;let n=new Set(e?.map(Tt));return t.every(e=>n.has(Tt(e)))},Dt=(e,t)=>{let n=i();return r=>{let i=[],a=!1,c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map,f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Set,m=s.includes(t?.mode??``);O(r,e=>{if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`)for(let t of e.data?.islandHeadings??[])n.reserve(t.slug);e.type===`mdxJsxFlowElement`&&e.name&&Ct.includes(e.name)&&O(e,t=>{t!==e&&p.add(t)});let t=e;if(Ye(t)){let n=$e(t),r=tt(n);Ze(n)?O(e,t=>{t!==e&&p.add(t)}):r&&O(e,t=>{t!==e&&d.set(t,[...d.get(t)??[],r])})}if(e.type===`mdxJsxFlowElement`&&e.name===`Steps`){let t=M(e.attributes,`titleSize`);if(t){let n=e=>{for(let r of e)r.type===`mdxJsxFlowElement`&&(r.name===`Step`?f.set(r,t):Be(r)&&n(r.children))};n(e.children)}}if(e.type===`mdxJsxFlowElement`&&e.name===`Tab`){let t=M(e.attributes,`id`),n=M(e.attributes,`title`),r=t??(n?h(et(e,n)):void 0);r&&O(e,e=>{c.set(e,r)})}if(e.type===`mdxJsxFlowElement`&&e.name===`View`){let t=M(e.attributes,`title`);t&&O(e,e=>{l.set(e,t)})}let r=e;if(bt(r)){let t=xt(r),n=t.kind===`valid`?t.ids:[];O(e,e=>{let t=u.get(e);u.set(e,t?t.filter(e=>n.includes(e)):n)})}});let g=(e,t)=>{if(!e.title.trim())return;if(t!==void 0&&Number(t)<=2){a=!0,i.push(e);return}let n=i;if(a){let t=i.at(-1);t&&!(t.depth>2&&t.depth>=e.depth)&&(t.tabId===void 0||t.tabId===e.tabId)&&(t.viewId===void 0||t.viewId===e.viewId)&&(t.variationIds===void 0||e.variationIds!==void 0&&e.variationIds.every(e=>t.variationIds?.includes(e)))&&Et(e.authRules,t.authRules)&&(n=t.children)}n.push(e)};O(r,e=>{if(p.has(e))return;let t=c.get(e),r=l.get(e),i=u.get(e),a=d.get(e);if(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`){let o=e.data?.tableOfContents;if(!o?.length)return;let s=e=>{for(let t of e)n.reserve(t.slug),s(t.children)};s(o);for(let e of o)g(Object.assign(Object.assign({},e),{tabId:t,viewId:r,variationIds:i,authRules:a||e.authRules?[...a??[],...e.authRules??[]]:void 0}),e.depth);return}if(e.type===`mdxJsxFlowElement`&&e.name===`_MintIsland`){if(m)return;for(let{title:n,slug:o,depth:s}of e.data?.islandHeadings??[])g({title:n,slug:o,depth:s,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},s);return}let s=e.type===`heading`&&o.includes(e.depth),_=e.type===`mdxJsxFlowElement`&&St.includes(e.name??``),v=e.type===`mdxJsxFlowElement`&&e.name===`Heading`,ee=e.type===`mdxJsxFlowElement`&&e.name===`Update`&&e.attributes.some(e=>`name`in e&&e.name===`label`),y=e.type===`mdxJsxFlowElement`&&e.name===`Step`?M(e.attributes,`titleSize`)??f.get(e):void 0,te=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`noAnchor`&&(e.value==null||e.value===`true`||typeof e.value==`object`&&e.value.value===`true`)),b=e.type===`mdxJsxFlowElement`&&e.name===`Step`?et(e,M(e.attributes,`title`)??``):void 0,ne=e.type===`mdxJsxFlowElement`&&e.name===`Step`&&!te&&[`h2`,`h3`].includes(y??``)&&b?.trim()!==``,x=e.type===`mdxJsxFlowElement`&&e.attributes.some(e=>`name`in e&&e.name===`id`);if(!s&&!_&&!v&&!ee&&!ne||m&&(s||_))return;let S;if(`name`in e&&e.name===`Update`)S=1,e.depth=1;else if(`name`in e&&e.name===`Step`)S={h2:2,h3:3,h4:4}[y??``]??3,e.depth=S;else if(`depth`in e)S=e.depth;else if(`name`in e&&e.name===`Heading`){let t=e.attributes.find(e=>`name`in e&&e.name===`level`);t&&`value`in t&&typeof t.value==`number`&&(S=t.value)}else if(`name`in e&&e.name?.[1]){let t=Number(e.name[1]);S=isNaN(t)?void 0:t,S!==void 0&&(e.depth=S)}let C=b??Qe(e),w,T=`name`in e&&(e.name===`Heading`||e.name===`Step`||e.name===`Update`)||x?M(e.attributes,`id`):void 0;w=T?n.claim(re(T)||h(C)):n.claim(h(C));let E;if(`name`in e&&e.name===`Update`){let t=M(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Step`){let t=M(e.attributes,`id`);E=t?t===w?e.attributes:e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):[...e.attributes,k(`id`,w)]}else if(`name`in e&&e.name===`Heading`)E=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;else if(S!==void 0&&x){let t=T&&w!==T?e.attributes.map(e=>`name`in e&&e.name===`id`?k(`id`,w):e):e.attributes;E=[k(`level`,S),...t]}else S!==void 0&&!x&&(E=[k(`level`,S),k(`id`,w)],_&&e.attributes.length>0&&E.push(...e.attributes));e.attributes=E,e.type=`mdxJsxFlowElement`,e.name=e.name===`Update`?`Update`:e.name===`Step`?`Step`:`Heading`;let ie=e.depth;g({title:C,slug:w,depth:ie,children:[],tabId:t,viewId:r,variationIds:i,authRules:a},S)}),e&&(e.tableOfContents=i)}},Ot=/* @__PURE__ */ new Set([`codeFenced`,`codeText`,`yaml`,`toml`]),kt=[Me([`yaml`,`toml`]),je(),{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}],At=e=>{let t=+!!e.startsWith(``),n=Ie(Pe({extensions:kt}).document().write(Fe()(e.slice(t),void 0,!0))),r=[];for(let[e,i]of n)e===`enter`&&Ot.has(i.type)&&r.push([i.start.offset+t,i.end.offset+t]);return r},jt=/* @__PURE__ */ new Set(/* @__PURE__ */ `Info.Warning.Note.Tip.Check.Danger.Callout.AccordionGroup.Card.CardGroup.Tabs.CodeGroup.Column.Columns.CustomCode.CustomComponent.DynamicCustomComponent.Expandable.Frame.GitHub.Github.Icon.Latex.Mermaid.Panel.Popup.Prompt.List.Quote.RequestExample.ResponseExample.SnippetGroup.Steps.Tile.Tooltip.Tree.FileTree.Variation.Visibility.MDX.Badge.Color.ZoomImage`.split(`.`)),Mt=/* @__PURE__ */ new Set([`Heading`,`Step`,`Update`]),Nt=[`Example`,`Snippet`],Pt=e=>We.includes(e)||Nt.includes(e),Ft=[];function N(e){let t=-1;if(!e||!Array.isArray(e)&&!e.type)throw Error("Expected node, not `"+e+"`");if(`value`in e)return e.value;let n=(Array.isArray(e)?e:e.children)||Ft,r=[];for(;++t<n.length;)r[t]=N(n[t]);return r.join(``)}const It={}.hasOwnProperty;function Lt(e,t,n){let r=-1;if(!e)throw Error(`Iterate requires that |this| not be `+e);if(!It.call(e,`length`))throw Error("Iterate requires that |this| has a `length`");if(typeof t!=`function`)throw TypeError("`callback` must be a function");for(;++r<e.length;){if(!(r in e))continue;let i=t.call(n,e[r],r,e);typeof i==`number`&&(i<0&&(r=0),r=i-1)}}function P(e){return t;function t(e){if(!e||!e.children)throw Error("Missing children in `parent` for `modifier`");Lt(e.children,n,e)}function n(t,n){return e(t,n,this)}}const Rt=P(function(e,t,n){let r=n.children[t-1];if(r&&`children`in r&&`children`in e&&e.children.length>0){let i=-1;for(;e.children[++i];){let a=e.children[i];if(a.type===`WordNode`)return;if(a.type===`SymbolNode`||a.type===`PunctuationNode`){let i=N(a);return i!==`,`&&i!==`;`?void 0:(r.children.push(...e.children),r.position&&e.position&&(r.position.end=e.position.end),n.children.splice(t,1),t)}}}}),zt=/^([!"').?\u0F3B\u0F3D\u169C\u2019\u201D\u2026\u203A\u203D\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00BB\]}])\1*$/,Bt=/^[ \t]*((\r?\n|\r)[\t ]*)+$/,Vt=/^([!.?\u2026\u203D]+)$/,Ht=/^([&'\-.:=?@\u00AD\u00B7\u2010\u2011\u2019\u2027]|_+)$/,Ut=/^(?:[\d\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])+$/,Wt=/^\d/,Gt=/^(?:[a-z\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5F\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C1\uA7C3\uA7C8\uA7CA\uA7D1\uA7D3\uA7D5\uA7D7\uA7D9\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E\uDF25-\uDF2A]|\uD83A[\uDD22-\uDD43])/,Kt=/[\uD800-\uDFFF]/,qt=/[!"'-),-/:;?[-\]_{}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\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\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u201F\u2022-\u2027\u2032-\u203A\u203C-\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-\u2E5D\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Jt=/[\dA-Za-z\u00AA\u00B2\u00B3\u00B5\u00B9\u00BA\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE6\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEFD-\uDF27\uDF30-\uDF54\uDF70-\uDF85\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC52-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF]/,Yt=/[\t-\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Xt=P(function(e,t,n){if(`children`in e&&e.children.length>0&&t>0){let r=n.children[t-1],i=e.children[0],a=e.children[1];if(r&&r.type===`SentenceNode`&&(i.type===`SymbolNode`||i.type===`PunctuationNode`)&&zt.test(N(i)))return e.children.shift(),r.children.push(i),i.position&&r.position&&(r.position.end=i.position.end),a&&a.position&&e.position&&(e.position.start=a.position.start),t-1}}),Zt=P(function(e,t,n){if(e.type!==`SentenceNode`)return;let r=e.children,i=0;for(;++i<r.length-1;){let a=r[i];if(a.type!==`WhiteSpaceNode`||N(a).split(/\r\n|\r|\n/).length<3)continue;e.children=r.slice(0,i);let o={type:`SentenceNode`,children:r.slice(i+1)},s=r[i-1],c=r[i+1];if(n.children.splice(t+1,0,a,o),e.position&&s.position&&c.position){let t=e.position.end;e.position.end=s.position.end,o.position={start:c.position.start,end:t}}return t+1}}),Qt=P(function(e,t,n){if(`children`in e){let r=e.children[e.children.length-1];if(r&&r.type===`WhiteSpaceNode`){e.children.pop(),n.children.splice(t+1,0,r);let i=e.children[e.children.length-1];return i&&i.position&&e.position&&(e.position.end=i.position.end),t}}});function $t(e){return t;function t(t){let n=t&&t.children,r=-1;if(!n)throw Error("Missing children in `parent` for `visit`");for(;++r in n;)e(n[r],r,t)}}const en=$t(function(e,t,n){if(`children`in e&&e.children){let r=e.children[0];if(r&&r.type===`WhiteSpaceNode`){e.children.shift(),n.children.splice(t,0,r);let i=e.children[0];i&&i.position&&e.position&&(e.position.start=i.position.start)}}}),tn=P(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&N(e)===`-`){let r=n.children,i=r[t-1],a=r[t+1];if((!a||a.type!==`WordNode`)&&i&&i.type===`WordNode`)return r.splice(t,1),i.children.push(e),i.position&&e.position&&(i.position.end=e.position.end),t}}),nn=P(function(e,t,n){let r=n.children[t-1];if(r&&r.type===`SentenceNode`&&e.type===`SentenceNode`){let i=e.children[0];if(i&&i.type===`WordNode`&&Wt.test(N(i)))return r.children.push(...e.children),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t}}),rn=P(function(e,t,n){if(e.type===`SentenceNode`&&t>0){let r=n.children[t-1],i=e.children;if(i.length>0&&r.type===`SentenceNode`){let a=-1;for(;i[++a];){let o=i[a];if(o.type===`WordNode`)return Gt.test(N(o))?(r.children.push(...i),n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t):void 0;if(o.type===`SymbolNode`||o.type===`PunctuationNode`)return}}}}),an=P(function(e,t,n){if(e.type!==`SymbolNode`&&e.type!==`PunctuationNode`||N(e)!==`&`)return;let r=n.children,i=r[t+1];if(!(t>0&&r[t-1].type===`WordNode`||!(i&&i.type===`WordNode`)))return r.splice(t,1),i.children.unshift(e),i.position&&e.position&&(i.position.start=e.position.start),t-1}),on=P(function(e,t,n){if(t>0&&e.type===`PunctuationNode`&&N(e)===`.`){let r=n.children[t-1];if(r.type===`WordNode`&&r.children&&r.children.length!==1&&r.children.length%2!=0){let i=r.children.length,a=!0;for(;r.children[--i];){let e=r.children[i],t=N(e);if(i%2==0){if(t.length>1)return;Ut.test(t)||(a=!1)}else if(t!==`.`){if(i<r.children.length-2)break;return}}if(!a)return n.children.splice(t,1),r.children.push(e),r.position&&e.position&&(r.position.end=e.position.end),t}}}),sn=P(function(e,t,n){if(t>0&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)){let e=n.children,r=e[t-1];if(r&&r.type===`WordNode`){let n=t-1,i=[],a=[];for(;e[++n];){let t=e[n];if(t.type===`WordNode`)i.push(...a,...t.children),a=[];else if((t.type===`SymbolNode`||t.type===`PunctuationNode`)&&Ht.test(N(t)))a.push(t);else break}if(i.length>0){a.length>0&&(n-=a.length),e.splice(t,n-t),r.children.push(...i);let o=i[i.length-1];return r.position&&o.position&&(r.position.end=o.position.end),t}}}}),cn=P(function(e,t,n){let r=n.children,i=r[t-1];if(i&&i.type===`WordNode`&&(e.type===`SymbolNode`||e.type===`PunctuationNode`)&&N(e)===`/`){let n=N(i),a=e,o=[e],s=1,c=``,l=r[t+1];if(l&&l.type===`WordNode`&&(c=N(l),a=l,o.push(...l.children),s++),n.length<3&&(!c||c.length<3))return i.children.push(...o),r.splice(t,s),i.position&&a.position&&(i.position.end=a.position.end),t}}),ln=P(function(e,t,n){if(`children`in e){let r=-1;for(;e.children[++r];)if(e.children[r].type===`WordNode`)return;let i=n.children[t-1];if(i&&`children`in i)return i.children.push(...e.children),n.children.splice(t,1),i.position&&e.position&&(i.position.end=e.position.end),t;let a=n.children[t+1];a&&`children`in a&&(a.children.unshift(...e.children),a.position&&e.position&&(a.position.start=e.position.start),n.children.splice(t,1))}}),un=/* @__PURE__ */ RegExp(`^([0-9]{1,3}|[a-z]|al|ca|cap|cca|cent|cf|cit|con|cp|cwt|ead|etc|ff|fl|ibid|id|nem|op|pro|seq|sic|stat|tem|viz)$`),dn=P(function(e,t,n){if(`children`in e&&e.children.length>1){let r=e.children[e.children.length-1];if(r&&(r.type===`PunctuationNode`||r.type===`SymbolNode`)&&N(r)===`.`){let i=e.children[e.children.length-2];if(i&&i.type===`WordNode`&&un.test(N(i).toLowerCase())){i.children.push(r),e.children.pop(),r.position&&i.position&&(i.position.end=r.position.end);let a=n.children[t+1];if(a&&a.type===`SentenceNode`)return e.children.push(...a.children),n.children.splice(t+1,1),a.position&&e.position&&(e.position.end=a.position.end),t-1}}}}),fn=$t(function(e,t,n){if(`children`in e){let t=e.children.length,n=!1;for(;e.children[--t];){let r=e.children[t];if(r.type!==`SymbolNode`&&r.type!==`PunctuationNode`){r.type===`WordNode`&&(n=!0);continue}if(!Vt.test(N(r)))continue;if(!n){n=!0;continue}if(N(r)!==`.`)continue;let i=e.children[t-1],a=e.children[t+1];if(i&&i.type===`WordNode`){let n=e.children[t+2];if(a&&n&&a.type===`WhiteSpaceNode`&&N(n)===`.`)continue;e.children.splice(t,1),i.children.push(r),r.position&&i.position&&(i.position.end=r.position.end),t--}else a&&a.type===`WordNode`&&(e.children.splice(t,1),a.children.unshift(r),r.position&&a.position&&(a.position.start=r.position.start))}}}),pn=P(function(e,t,n){if(`children`in e&&e.children.length===0)return n.children.splice(t,1),t}),mn=$t(function(e,t,n){let r=n.children;e.position&&t<1&&(!n.position||!n.position.start)&&(hn(n),n.position.start=e.position.start),!e.position||t!==r.length-1||n.position&&n.position.end||(hn(n),n.position.end=e.position.end)});function hn(e){e.position||={}}var gn=class{constructor(e,t){let n=t||e;this.doc=n?String(n):void 0,this.tokenizeRootPlugins=[...this.tokenizeRootPlugins],this.tokenizeParagraphPlugins=[...this.tokenizeParagraphPlugins],this.tokenizeSentencePlugins=[...this.tokenizeSentencePlugins]}parse(e){return this.tokenizeRoot(e||this.doc)}tokenizeRoot(e){let t={type:`RootNode`,children:_n(this.tokenizeParagraph(e),`WhiteSpaceNode`,Bt)},n=-1;for(;this.tokenizeRootPlugins[++n];)this.tokenizeRootPlugins[n](t);return t}tokenizeParagraph(e){let t={type:`ParagraphNode`,children:_n(this.tokenizeSentence(e),`PunctuationNode`,Vt)},n=-1;for(;this.tokenizeParagraphPlugins[++n];)this.tokenizeParagraphPlugins[n](t);return t}tokenizeSentence(e){let t={type:`SentenceNode`,children:this.tokenize(e)},n=-1;for(;this.tokenizeSentencePlugins[++n];)this.tokenizeSentencePlugins[n](t);return t}tokenize(e){let t=[];if(!e)return t;let n={line:1,column:1,offset:0},r=0,i=0,a={...n},o,s;for(;i<e.length;){let l=e.charAt(i),u=Yt.test(l)?`WhiteSpaceNode`:qt.test(l)?`PunctuationNode`:Jt.test(l)?`WordNode`:`SymbolNode`;r<i&&o&&u&&(o!==u||o!==`WordNode`&&o!==`WhiteSpaceNode`&&l!==s&&!Kt.test(l))&&(t.push(c(o,e.slice(r,i))),r=i,a={...n}),l===`\r`||l===`
|
|
8
|
-
`&&s!==`\r`?(n.line++,n.column=1):l!==`
|
|
9
|
-
`&&n.column++,n.offset++,o=u,s=l,i++}return o&&r<i&&t.push(c(o,e.slice(r,i))),t;function c(e,t){return e===`WordNode`?{type:`WordNode`,children:[{type:`TextNode`,value:t,position:{start:a,end:{...n}}}],position:{start:a,end:{...n}}}:{type:e,value:t,position:{start:a,end:{...n}}}}}};gn.prototype.tokenizeSentencePlugins=[an,tn,sn,cn,on,mn],gn.prototype.tokenizeParagraphPlugins=[ln,Xt,rn,nn,dn,Rt,fn,en,Qt,Zt,pn,mn],gn.prototype.tokenizeRootPlugins=[en,Qt,pn,mn];function _n(e,t,n){let r=[],i=-1,a=0;for(;++i<e.children.length;){let o=e.children[i];if(i===e.children.length-1||o.type===t&&n.test(N(o))){let t={type:e.type,children:e.children.slice(a,i+1)},n=e.children[a],s=o;n.position&&s.position&&(t.position={start:n.position.start,end:s.position.end}),r.push(t),a=i+1}}return r}function vn(){let e=this;e.parser=t;function t(t){let n=new gn;return yn(n.tokenizeParagraphPlugins,e.data(`nlcstParagraphExtensions`)),yn(n.tokenizeRootPlugins,e.data(`nlcstRootExtensions`)),yn(n.tokenizeSentencePlugins,e.data(`nlcstSentenceExtensions`)),n.parse(t)}}function yn(e,t){t&&e.unshift(...t)}function bn(){let e=this;e.compiler=xn}function xn(e){return N(e)}var Sn=f(),Cn=/* @__PURE__ */ e(xe(),1);const wn=Ne().use(vn).use(bn).freeze(),Tn=[`”`,`’`],En=[`“`,`‘`],Dn={};function On(e){let t=e||Dn,n=[];if(t.quotes!==!1&&n.push(Ln),t.ellipses===`spaced`?n.push(Fn):t.ellipses===`unspaced`?n.push(In):t.ellipses!==!1&&n.push(Pn),t.backticks===`all`){if(t.quotes!==!1)throw Error("Cannot accept `backticks: 'all'` with `quotes: true`");n.push(kn)}else t.backticks!==!1&&n.push(An);t.dashes===`inverted`?n.push(Mn):t.dashes===`oldschool`?n.push(Nn):t.dashes!==!1&&n.push(jn);let r={close:t.closingQuotes?[t.closingQuotes.double,t.closingQuotes.single]:Tn,open:t.openingQuotes?[t.openingQuotes.double,t.openingQuotes.single]:En};return function(e){O(e,function(e,t,i){let a=-1;if(i&&t!==void 0&&(e.type===`PunctuationNode`||e.type===`SymbolNode`)){for(;++a<n.length;)if(n[a](r,e,t,i)===!0)return console.log(`drop`,e),i.children.splice(t,1),t}})}}function kn(e,t,n,r){An(e,t,n,r),t.value==="`"?t.value=`‘`:t.value===`'`&&(t.value=`’`)}function An(e,t){t.value==="``"?t.value=`“`:t.value===`''`&&(t.value=`”`)}function jn(e,t){t.value===`--`&&(t.value=`—`)}function Mn(e,t,n,r){let i=r.children[n+1];if(t.value===`—`&&i&&i.type===`PunctuationNode`&&i.value===`-`)return i.value=`–`,!0;t.value===`---`?t.value=`–`:t.value===`--`&&(t.value=`—`)}function Nn(e,t,n,r){let i=r.children[n+1];if(t.value===`–`&&i&&i.type===`PunctuationNode`&&i.value===`-`)return i.value=`—`,!0;t.value===`---`?t.value=`—`:t.value===`--`&&(t.value=`–`)}function Pn(e,t,n,r){Fn(e,t,n,r),In(e,t,n,r)}function Fn(e,t,n,r){let i=t.value,a=r.children;if(!/^\.+$/.test(i))return;let o=[],s=n,c=1;for(;--s>0;){let e=a[s];if(e.type!==`WhiteSpaceNode`)break;let t=e;if(e=a[--s],e&&(e.type===`PunctuationNode`||e.type===`SymbolNode`)&&/^\.+$/.test(e.value))o.push(t,e),c++;else break}c<3||(a.splice(n-o.length,o.length),t.value=`…`)}function In(e,t){/^\.{3,}$/.test(t.value)&&(t.value=`…`)}function Ln(e,t,n,r){let i=r.children,a=t.value;if(a!==`"`&&a!==`'`)return;let o=a===`"`?0:1,s=i[n-1],c=i[n+1],l=i[n+2],u=c?N(c):``;c&&(c.type===`PunctuationNode`||c.type===`SymbolNode`)&&(!l||l.type!==`WordNode`)?t.value=e.close[o]:c&&(c.type===`PunctuationNode`||c.type===`SymbolNode`)&&(u===`"`||u===`'`)&&l&&l.type===`WordNode`?(t.value=e.open[o],c.value=e.open[u===`"`?0:1]):t.value=c&&/^\d\ds$/.test(u)?e.close[o]:s&&(s.type===`WhiteSpaceNode`||s.type===`PunctuationNode`||s.type===`SymbolNode`)&&c&&c.type===`WordNode`?e.open[o]:s&&s.type!==`WhiteSpaceNode`&&s.type!==`SymbolNode`&&s.type!==`PunctuationNode`||!c||c.type===`WhiteSpaceNode`||a===`'`&&u===`s`?e.close[o]:e.open[o]}const Rn=/* @__PURE__ */ new Set([`text`,`inlineCode`,`paragraph`]),zn=/* @__PURE__ */ new Set([`style`,`script`]),Bn=(e,t,n)=>n&&(n.type!==`mdxJsxTextElement`||`name`in n&&typeof n.name==`string`&&!zn.has(n.name))&&Rn.has(e.type)&&(Hn(e)||Un(e)),Vn=e=>{let t=wn().use(On,{...e,ellipses:!1,dashes:!1,backticks:!1}),n=wn().use(On,{...e,quotes:!1});return e=>{let r=``,i=0,a=[];O(e,Bn,e=>{Hn(e)?r+=e.type===`text`?e.value:`A`.repeat(e.value.length):Un(e)&&(r+=` `),a.push(e)}),/["']/.test(r)&&(r=t.processSync(r).toString());for(let e of a)if(Hn(e)){let t=i+e.value.length;if(e.type===`text`){let a=r.slice(i,t);e.value=/\.[\s\u0085]*\.|--|``|''/.test(a)?n.processSync(a).toString():a}i=t}else Un(e)&&(i+=1)}};function Hn(e){return`value`in e&&typeof e.value==`string`}function Un(e){return e.type===`paragraph`}const Wn=(function(e){if(e==null)return Yn;if(typeof e==`string`)return qn(e);if(typeof e==`object`)return Array.isArray(e)?Gn(e):Kn(e);if(typeof e==`function`)return Jn(e);throw Error(`Expected function, string, or object as test`)});function Gn(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Wn(e[n]);return Jn(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}function Kn(e){return Jn(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function qn(e){return Jn(t);function t(t){return t&&t.type===e}}function Jn(e){return t;function t(t,...n){return!!(t&&typeof t==`object`&&`type`in t&&e.call(this,t,...n))}}function Yn(){return!0}function Xn(e){return`\x1B[33m`+e+`\x1B[39m`}const Zn=(function(e,t,n,r){typeof t==`function`&&typeof n!=`function`&&(r=n,n=t,t=null);let i=Wn(t),a=r?-1:1;o(e,void 0,[])();function o(e,s,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Xn(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=[],u,d,f;if((!t||i(e,s,c[c.length-1]||null))&&(l=Qn(n(e,c)),l[0]===!1))return l;if(e.children&&l[0]!==`skip`)for(d=(r?e.children.length:-1)+a,f=c.concat(e);d>-1&&d<e.children.length;){if(u=o(e.children[d],d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+a}return l}}});function Qn(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:[e]}const $n=(function(e,t,n,r){typeof t==`function`&&typeof n!=`function`&&(r=n,n=t,t=null),Zn(e,t,i,r);function i(e,t){let r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}}),er=[`.mdx`,`.md`],tr=[`.jpeg`,`.jpg`,`.jfif`,`.pjpeg`,`.pjp`,`.png`,`.svg`,`.svgz`,`.ico`,`.webp`,`.gif`,`.apng`,`.avif`,`.bmp`,`.mp4`,`.css`,`.xml`],nr=e=>!(e.dir===`node_modules`||e.dir.startsWith(`node_modules/`)),rr=e=>!(e.dir===`.github`||e.dir.startsWith(`.github/`)),ir=e=>er.includes(e.ext),ar=e=>tr.includes(e.ext),or=e=>ir(e)||ar(e),sr=e=>e.map(F).map(lt).filter(nr),cr=e=>sr(e).filter(ir).filter(rr),lr=e=>sr(e).filter(or).filter(rr),ur=e=>A(e.dir,e.base),dr=e=>A(e.dir,e.name),fr=e=>e.split(`#`)[0].split(`?`)[0],pr=(e,t=[])=>cr(ke(e,e,t)).map(ur),mr=(e,t=[])=>lr(ke(e,e,t)).map(ur),F=e=>ct(hr(e)),hr=e=>e.startsWith(`/`)?e.slice(1):e,I=e=>Buffer.from(e).toString();var L;(function(e){e.INTERNAL=`internal`,e.EXTERNAL=`external`,e.DATA=`data`})(L||={});const gr=e=>{try{return decodeURIComponent(e)}catch{return e}},_r=e=>/[:*]/.test(e);var R;(function(e){e.MD=`md`,e.SRC=`src`,e.HREF=`href`,e.CARD=`card`,e.IMPORT=`import`,e.DEFINITION=`definition`})(R||={});var vr;(function(e){e.CONTENT=`content`,e.NAVIGATION=`navigation`})(vr||={});var yr=class e{static getPathType(e){let t;return t=URL.canParse(e)?L.EXTERNAL:e.startsWith(`data:`)?L.DATA:L.INTERNAL,t}constructParsedPath(){let t=e.getPathType(this.originalPath),n,r;if(t===L.INTERNAL){let e=new URL(`mintlify:/`);e.pathname=`/${this.relativeDir}/${this.filename}`.replaceAll(vt,`/`),n=new URL(this.originalPath.replaceAll(vt,`/`),e);let t=gr(n.pathname).slice(1);t.endsWith(`/`)&&(t=t.slice(0,-1)),t===``&&(t=`.`),r=lt(t)}else try{n=new URL(this.originalPath),r=n}catch{throw Error(`Failed to parse path as URL: ${this.originalPath}. If this is a purposefully malformed path, please wrap it in backticks, i.e \`${this.originalPath}\` `)}let i=n.hash?t===L.INTERNAL?gr(n.hash):n.hash:void 0,a=n.search?new URLSearchParams(n.search):void 0;return{path:r,pathType:t,anchorLink:i,queryParams:a}}constructor(e,t=``,n=``,r,i){this.originalPath=e,this.relativeDir=t,this.filename=n,this.wrapper=r,this.line=i,this.pagePaths=[],this.relativeDir=F(t);let{path:a,pathType:o,anchorLink:s,queryParams:c}=this.constructParsedPath();this.path=a,this.pathType=o,this.anchorLink=s,this.queryParams=c}toString(){if(this.pathType===L.INTERNAL){let e=this.path;return A(e.dir,e.base)}return this.path.toString()}getResolvedFiles(e,t){if(this.pathType!==L.INTERNAL||this.path instanceof URL)return[];let{dir:n,name:r,base:i}=lt(this.toString()),a=[];return _t(ut(t,this.toString()))&&a.push(A(n,i)),a.push(...e.lookup(n,r,i)),a}keepsMdxExtension(){let e=this.wrapper===R.DEFINITION?this.originalPath:this.wrapper===R.MD||this.wrapper===R.HREF?t(A(this.relativeDir,this.filename),this.originalPath,!0):void 0;return e!==void 0&&/\.mdx$/i.test(fr(e))}resolvesTo(e,t,n){return this.pathType===L.INTERNAL&&!!(this.toString()===e.toString()||this.getResolvedFiles(t,n).includes(e.toString()))}static filterMapInternalPaths(t){return t.map(t=>new e(t)).filter(({pathType:e})=>e===L.INTERNAL).map(e=>e.toString())}},br=class e{constructor(t){this.byDirAndName=/* @__PURE__ */ new Map,t.forEach((t,n)=>{let r=t.startsWith(`/`)?t.slice(1):t,{dir:i,name:a}=lt(r),o=e.key(i,a),s=[n,r],c=this.byDirAndName.get(o);c?c.push(s):this.byDirAndName.set(o,[s])})}static key(e,t){return`${e}\0${t}`}lookup(t,n,r){let i=this.byDirAndName.get(e.key(t,n))??[],a=r===n?[]:this.byDirAndName.get(e.key(t,r))??[];return[...i,...a].sort(([e],[t])=>e-t).map(([,e])=>e)}},xr=class{constructor(e,t=[]){this.label=e,this.paths=t,this.edges=[],this.headingSlugs=null,this.relativeDir=F(st(e)),this.filename=ot(e),this.label=A(this.relativeDir,this.filename)}toString(){return this.label}equals(e){return this.label===e.label}addPath(e,t,n){let r=new yr(e,this.relativeDir,this.filename,t,n);this.paths.push(r)}addOutgoingEdge(e){let t=this.edges.find(t=>t.equals(e));t?t.incrementCount():this.edges.push(e)}getChildNodes(e=1){let t=[];for(let n of this.edges){let r=n.target;t.push(r),e>1&&t.push(...r.getChildNodes(e-1))}return t}},Sr=class{constructor(e,t,n){this.source=e,this.target=t,this.edgeType=n,this.count=0,this.count++}incrementCount(){this.count++}getCount(){return this.count}equals(e){return this.source.equals(e.source)&&this.target.equals(e.target)&&this.edgeType===e.edgeType}},Cr=class{constructor(e,t=[]){this.baseDir=e,this.nodes=Object.create(null),this.edges=[],this.fileResolutionMap=/* @__PURE__ */ new Map,this.redirectMap=/* @__PURE__ */ new Map,this.wildcardRedirects=[],this.configRedirects=[],this.mintIgnoreGlobs=[],this.virtualNodes=/* @__PURE__ */ new Set,this.snippetReferencesByFile=/* @__PURE__ */ new Map,this.baseDir=ut(e),this.mintIgnoreGlobs=t,this.mintIgnoreMatcher=w(t)}addNode(e){return this.nodes[e]||(this.nodes[e]=new xr(e)),this.nodes[e]}addNodes(e){for(let t of e)this.addNode(t)}addVirtualNodes(e){for(let t of e)this.addNode(t),this.virtualNodes.add(new xr(t).toString())}setRedirects(e){this.configRedirects=e,this.redirectMap.clear();for(let t of e){let e=F(t.source);this.redirectMap.has(e)||this.redirectMap.set(e,F(t.destination))}this.wildcardRedirects=[...this.redirectMap].filter(([e])=>_r(e))}matchesWildcardPattern(e,t){let n=`^${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/:(\w+)/g,`(?<$1>[^/]+)`).replace(/\\\*/g,`(.*)`)}$`;return new RegExp(n).test(e)}applyWildcardRedirect(e,t,n){let r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=[],a=r.replace(/:(\w+)/g,(e,t)=>(i.push({type:`param`,name:t}),`(?<${t}>[^/]+)`)).replace(/\\\*/g,()=>(i.push({type:`wildcard`}),`(.*)`)),o=RegExp(`^${a}$`),s=e.match(o);if(!s)return n;let c=n,l=s.groups||{};for(let[e,t]of Object.entries(l))c=c.replace(RegExp(`:${e}`,`g`),t);let u=s.slice(1),d=0,f=u.filter((e,t)=>i[t]&&i[t].type===`wildcard`);return c=c.replace(/\*/g,()=>f[d++]||``),c}addAliasNodes(){let e=yr.filterMapInternalPaths(fe(this.baseDir,this.baseDir,this.mintIgnoreGlobs)).filter(e=>!De(e,this.mintIgnoreMatcher));this.addNodes(e)}getNode(e){return this.nodes[e]}getAnchorTargetFiles(e){this.fileResolutionMap.size===0&&this.precomputeFileResolutions();let t=new Set(Object.keys(this.nodes)),n=/* @__PURE__ */ new Set;for(let r of Object.values(this.nodes))for(let i of r.paths.flatMap(e=>[e,...e.pagePaths]))if(i.pathType===L.INTERNAL&&i.anchorLink&&e.has(A(i.relativeDir,i.filename)))for(let e of this.getHeadingSlugCandidates(i.toString(),t)){let t=this.nodes[e];if(t&&(n.add(e),t.headingSlugs!==null))break}return n}addEdge(e,t,n=vr.CONTENT){let r=new Sr(e,t,n);return this.edges.find(e=>e.equals(r)?(e.incrementCount(),!0):!1)||(this.edges.push(r),r)}addEdgesBetweenNodes(){let e=new br(mr(this.baseDir,this.mintIgnoreGlobs));for(let t of Object.values(this.nodes))for(let n of t.paths)if(n.pathType===L.INTERNAL){let r=Object.values(this.nodes).find(t=>n.resolvesTo(t,e,this.baseDir));if(r){let e=this.addEdge(t,r);t.addOutgoingEdge(e)}}}precomputeFileResolutions(){let e=new br(mr(this.baseDir,this.mintIgnoreGlobs)),t=/* @__PURE__ */ new Set;Object.values(this.nodes).forEach(n=>{n.paths.flatMap(e=>[e,...e.pagePaths]).filter(e=>e.pathType===L.INTERNAL).forEach(n=>{let r=n.toString();if(t.has(r))return;t.add(r);let i=n.getResolvedFiles(e,this.baseDir);this.fileResolutionMap.set(r,new Set(i))})})}getHeadingSlugCandidates(e,t){let n=[...this.fileResolutionMap.get(e)??[]].filter(e=>t.has(e)),r=A(e,`index.mdx`),i=this.nodes[r]?r:A(e,`index.md`);return[...n,e,i]}getHeadingSlugsForPath(e,t){for(let n of this.getHeadingSlugCandidates(e,t)){let e=this.nodes[n];if(e&&e.headingSlugs!==null)return e.headingSlugs}}getBrokenInternalLinks(e){this.fileResolutionMap.size===0&&this.precomputeFileResolutions();let t=/* @__PURE__ */ new Set,n=new Set(Object.values(this.nodes).map(e=>e.toString()));for(let r of Object.values(this.nodes))for(let i of r.paths.flatMap(e=>[e,...e.pagePaths]))if(i.pathType===L.INTERNAL){let r=i.toString(),a=this.fileResolutionMap.get(r),o=r===`.`||a&&[...a].some(e=>n.has(e))||this.virtualNodes.has(r);if(i.keepsMdxExtension()&&!this.redirectsToPage(r)||!o&&!this.reachesPage(r))t.add(i);else if(e?.checkAnchors&&i.anchorLink){let e=re(i.anchorLink.slice(1)),a=this.getHeadingSlugsForPath(r,n);a&&!a.has(e)&&t.add(i)}}return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>t.has(e)&&(e.pagePaths.length===0||e.pagePaths.some(e=>t.has(e))))}getLinksTo(e){let t=this.getPageRoute(e.toString()),n=n=>n.pathType===L.INTERNAL&&!n.originalPath.startsWith(`#`)&&this.getPageRoute(n.toString())===t&&(!e.anchorLink||n.anchorLink===e.anchorLink);return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>n(e)||e.pagePaths.some(n))}getPageRoute(e){let t=[...this.getPageCandidates(e),e].find(e=>this.nodes[e])??e,n=lt(t),r=ir(n)?dr(n):t;return ot(r)===`index`?st(r):r}getPageCandidates(e){return e===`.`?[`index.mdx`,`index.md`]:[`${e}.mdx`,`${e}.md`,A(e,`index.mdx`),A(e,`index.md`)]}isPageRoute(e){return this.getPageCandidates(e).some(e=>this.nodes[e])||this.virtualNodes.has(e)}resolvesToValidPath(e,t=/* @__PURE__ */ new Set){if(URL.canParse(e))return!0;let n=fr(e);return!n||_r(n)?!0:this.reachesPage(F(n),t)}redirectsToPage(e){let t=this.getRedirectTarget(e);return t!==void 0&&this.resolvesToValidPath(t,/* @__PURE__ */ new Set([e]))}reachesPage(e,t=/* @__PURE__ */ new Set){if(t.has(e))return!1;t.add(e);let n=this.getExactRedirectTarget(e);if(n!==void 0)return this.resolvesToValidPath(n,t);if(e!==`.`&&this.nodes[e]||this.isPageRoute(e))return!0;let r=this.getRedirectTarget(e);return r!==void 0&&this.resolvesToValidPath(r,t)}getExactRedirectTarget(e){return this.redirectMap.get(e)}getRedirectTarget(e){let t=this.getExactRedirectTarget(e);if(t!==void 0)return t;for(let[t,n]of this.wildcardRedirects)if(this.matchesWildcardPattern(e,t))return this.applyWildcardRedirect(e,t,n)}getBrokenRedirects(){let e=[],t=/* @__PURE__ */ new Set;for(let{source:n,destination:r}of this.configRedirects){let i=F(n);t.has(i)||(t.add(i),URL.canParse(r)||_r(fr(r))||this.resolvesToValidPath(r)||e.push({source:n,destination:r}))}return e}getExternalPathsByNode(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(this.nodes)){let r=n.paths.filter(e=>e.pathType===L.EXTERNAL);r.length>0&&e.set(t,r)}return e}getAllInternalPaths(){return Object.values(this.nodes).flatMap(e=>e.paths).filter(e=>e.pathType===L.INTERNAL).map(e=>e.originalPath+` => `+e.toString())}},wr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Tr=e=>wr(void 0,void 0,void 0,function*(){for(let t of[`docs.json`,`mint.json`]){let n=at.join(e,t);if(Cn.default.existsSync(n))try{let r=yield Cn.default.readJSON(n),{resolved:i}=yield ye(r,e);if(i&&typeof i==`object`&&!Array.isArray(i))return{configFile:t,json:i}}catch(e){console.warn(`Warning: Failed to read or resolve ${t}: ${e}`)}}return null}),Er=e=>wr(void 0,void 0,void 0,function*(){let t=yield Tr(e);return t?t.configFile===`docs.json`?Se(pe(t.json)):_e(t.json):null}),Dr=e=>wr(void 0,void 0,void 0,function*(){let t=yield Tr(e);if(!t||t.configFile!==`docs.json`)return null;let n=Se(pe(t.json));return n.success?n.data:null});var Or=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const kr=e=>Or(void 0,void 0,void 0,function*(){let t=yield Dr(e);if(!t)return[];let{generatedRoutes:n}=yield y(t,t=>ge(t,e),{onSourceError:(e,t)=>console.warn(`Warning: Failed to load GraphQL schema ${e}: ${t}`)});return n});var Ar=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const jr=e=>typeof e==`string`&&e!==``&&E(e)===void 0&&te(e)===void 0,Mr=e=>{if(typeof e!=`object`||!e)return[];if(Array.isArray(e))return e.flatMap(Mr);let t=e,n=[];if(typeof t.href==`string`&&n.push(t.href),jr(t.root)&&n.push(t.root.startsWith(`/`)?t.root:`/${t.root}`),Array.isArray(t.pages))for(let e of t.pages)jr(e)&&n.push(e.startsWith(`/`)?e:`/${e}`);for(let e of Object.values(t))n.push(...Mr(e));return n},Nr=e=>Ar(void 0,void 0,void 0,function*(){let t=yield Tr(e);if(t&&t.json.navigation)return{hrefs:Mr(t.json.navigation),configFile:t.configFile}});var Pr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Fr=(e,t)=>Pr(void 0,void 0,void 0,function*(){let n=[];try{let r=yield Dr(e),i=r?ce(r):void 0,a=yield de(e,{explicitOverlays:i,fetchRemoteDocument:t?.fetchRemoteDocument});if(r){let o=yield ve(e,{explicitOverlays:i,fetchRemoteDocument:t?.fetchRemoteDocument}),s=yield Ir(r,o,t?.fetchRemoteDocument),c=[...a,...s],l={};try{yield _(r.navigation,c,l,{writeFiles:!1,overlayRegistry:o,fetchRemoteDocument:t?.fetchRemoteDocument})}catch(e){console.warn(`Warning: Failed to extract OpenAPI pages from navigation: ${e}`)}n.push(...Object.keys(l))}for(let e of a)try{let{pagesAcc:t}=yield T(e.spec,{openApiFilePath:e.originalFileLocation,writeFiles:!1,outDir:`api-reference`});n.push(...Object.keys(t))}catch(t){console.warn(`Warning: Failed to extract pages from OpenAPI spec ${e.originalFileLocation}: ${t}`)}}catch(e){console.warn(`Warning: Failed to categorize files for OpenAPI extraction: ${e}`)}return[...new Set(n)]}),Ir=(e,t,n)=>Pr(void 0,void 0,void 0,function*(){try{return yield Te(`docs`,e,void 0,t,n)}catch(e){return console.warn(`Warning: Failed to fetch URL-based OpenAPI specs: ${e}`),[]}});var Lr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Rr=e=>Lr(void 0,void 0,void 0,function*(){let t=[],n=yield Er(e);return n&&n.success&&`redirects`in n.data&&n.data.redirects&&t.push(...n.data.redirects),t}),zr=[`ImportDefaultSpecifier`,`ImportNamespaceSpecifier`],Br=e=>{let t=[],n=[],r=[],i=/* @__PURE__ */ new Set;$n(e,e=>{if(ze(e)&&Ve(e)){for(let n of e.data.estree.body){if(!He(n)||typeof n.source.value!=`string`)continue;let e=I(n.source.value);t.push(e);for(let t of n.specifiers)zr.includes(t.type)&&r.push({source:e,name:t.local.name})}return}if(!Ge(e)||!e.name||(i.add(e.name),e.name!==`Snippet`))return;let a=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`file`)?.value;typeof a==`string`&&n.push(`/_snippets/`+hr(I(a)))});for(let{source:e,name:t}of r)i.has(t)&&n.push(e);return{imported:t,rendered:n}},Vr=[`snippets/`,`_snippets/`],z=e=>e.replaceAll(vt,`/`),Hr=({originalPath:e,pathType:t,wrapper:n})=>n!==R.IMPORT&&t===L.INTERNAL&&!e.startsWith(`/`),Ur=(e,t)=>{var n;let r=new Map([...t.keys()].map(e=>[z(e),e])),i=(e,t)=>e.flatMap(e=>{let n=Oe(e,z(t)),i=n&&r.get(hr(n));return i?[i]:[]}),a=/* @__PURE__ */ new Set;for(let[e,{imported:n}]of t){let t=z(e).toLowerCase();Vr.some(e=>t.startsWith(e))&&a.add(e);for(let t of i(n,e))a.add(t)}let o=(e,n)=>{let r=t.get(e)?.rendered??[];for(let t of i(r,e))!n.has(t)&&a.has(t)&&(n.add(t),o(t,n));return n},s=/* @__PURE__ */ new Map;for(let e of t.keys())a.has(e)||s.set(e,o(e,/* @__PURE__ */ new Set));for(let[t,r]of s){let i=e.getNode(t);if(i)for(let t of r){let r=e.getNode(t);for(let e of r?.paths.filter(Hr)??[])e.pagePaths.push(new yr(e.originalPath,i.relativeDir,i.filename,e.wrapper));for(let e of r?.headingSlugs??[])(n=i.headingSlugs)==null||n.add(e)}}},Wr=(e,t,n)=>{let r=/* @__PURE__ */ new Set;if(!n.checkAnchors&&!n.checkSnippets)return r;let i=n.checkAnchors?[...e.getAnchorTargetFiles(t)]:[];for(let e of i)r.add(z(e));let a=new Map([...e.snippetReferencesByFile.keys()].map(e=>[z(e),e])),o=/* @__PURE__ */ new Set,s=t=>{if(o.has(t))return;o.add(t);let n=a.get(t),i=n?e.snippetReferencesByFile.get(n)?.rendered??[]:[];for(let e of i){let n=Oe(e,t);if(!n)continue;let i=hr(n);r.add(i),s(i)}};for(let e of[...t,...i])s(z(e));return r};var Gr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Kr=e=>{let t=/* @__PURE__ */ new Set;for(let n of e){t.add(le(n.slug));for(let e of Kr(n.children))t.add(e)}return t},qr=/* @__PURE__ */ new Set([`ParamField`,`Param`,`ResponseField`]),Jr=/* @__PURE__ */ new Set([`query`,`path`,`body`,`header`,`name`]),Yr=e=>{let t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map;return $n(e,`mdxJsxFlowElement`,e=>{if(qr.has(e.name??``)){let r=e.attributes.find(e=>`name`in e&&Jr.has(e.name));if(r&&typeof r.value==`string`&&r.value){let e=n.get(r.value)??0;n.set(r.value,e+1),t.add(yt(r.value,e))}return}if(jt.has(e.name??``))return;let r=e.attributes.find(e=>`name`in e&&e.name===`id`);if(r&&typeof r.value==`string`&&r.value){let n=Mt.has(e.name??``)?le(r.value):r.value;t.add(n)}}),t},Xr=e=>{if(typeof e==`string`)return e;let t=(e?.data?.estree)?.body[0],n=t?.type===`ExpressionStatement`?t.expression:void 0;if(n?.type===`Literal`&&typeof n.value==`string`)return n.value;if(n?.type===`TemplateLiteral`&&n.expressions.length===0)return n.quasis[0]?.value.cooked??void 0},Zr=(e,t,n)=>Gr(void 0,void 0,void 0,function*(){let r={},i=()=>t=>{let n=/* @__PURE__ */ new Set;return $n(t,[`linkReference`,`imageReference`],e=>{`identifier`in e&&n.add(e.identifier)}),$n(t,t=>{let r=t.position?.start.line,i=r===void 0?void 0:s[r-1];if(t.type===`link`||t.type===`image`){e.addPath(I(t.url),R.MD,i);return}if(t.type===`definition`){n.delete(t.identifier)&&e.addPath(I(t.url),R.DEFINITION,i);return}let a=t;if(a.name===`img`||a.name===`source`){let t=a.attributes.findIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`src`),n=Xr(a.attributes[t]?.value);if(typeof n==`string`){e.addPath(I(n),R.SRC,i);return}}else if(a.name===`a`||a.name===`Card`){let t=a.attributes.findIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`href`),n=Xr(a.attributes[t]?.value);if(typeof n==`string`){e.addPath(I(n),R.HREF,i);return}}}),t},a=ee(t),o=Ke(a),s=qe(a),l=v().use(Vn).use(i).use(c).use(Dt,r),u=l.parse(o),d=Br(u);if(n?.checkSnippets)for(let t of d.imported)e.addPath(t,R.IMPORT);yield l.run(u);let f=r.tableOfContents?Kr(r.tableOfContents):/* @__PURE__ */ new Set,p=Yr(u);return e.headingSlugs=/* @__PURE__ */ new Set([...f,...p]),d}),Qr=(e,t)=>Gr(void 0,void 0,void 0,function*(){let n=e||process.cwd(),r=yield he(n),i=w(r),a=new Cr(n,r),o=mr(n,r).filter(e=>!De(e,i));a.addNodes(o);let s=yield Rr(n);a.setRedirects(s),a.addAliasNodes();try{let e=yield Fr(n,{fetchRemoteDocument:t?.fetchRemoteDocument});a.addVirtualNodes(e)}catch(e){console.warn(`Warning: Failed to extract OpenAPI page paths: ${e}`)}try{let e=yield kr(n);a.addVirtualNodes(e)}catch(e){console.warn(`Warning: Failed to extract GraphQL page paths: ${e}`)}let c=yield Nr(n);if(c){let e=a.addNode(c.configFile);for(let t of c.hrefs){let n=t===`/`||t===``?`/index`:t.replace(/^\/#/,`/index#`);e.addPath(n)}}let l=pr(n,r).filter(e=>!De(e,i)),u=/* @__PURE__ */ new Map,d=0,f=performance.now();return yield Promise.all(Array.from({length:Math.min(8,l.length)},()=>Gr(void 0,void 0,void 0,function*(){for(;d<l.length;){performance.now()-f>50&&(yield new Promise(e=>setImmediate(e)),f=performance.now());let e=l[d++];if(e===void 0)continue;let r=a.getNode(e);if(!r)continue;let i=Cn.default.readFileSync(at.join(n,e)).toString();try{let n=yield Zr(r,i,{checkSnippets:t?.checkSnippets});u.set(e,n)}catch(n){let r=/* @__PURE__ */ Error(`Syntax error - Unable to parse ${e} - ${n}`);if(!t?.onParseError)throw r;t.onParseError(e,r)}}}))),Ur(a,u),a.snippetReferencesByFile=u,a});var B=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const $r=e=>{try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}},ei=(e,t)=>B(void 0,void 0,void 0,function*(){let n=new AbortController,r=setTimeout(()=>n.abort(),1e4);try{let r=yield fetch(e,{method:t,signal:n.signal,headers:{"User-Agent":`Mintlify-LinkChecker/1.0`},redirect:`follow`});return yield r.body?.cancel().catch(()=>void 0),r.status}finally{clearTimeout(r)}}),ti=/* @__PURE__ */ new Set([404,405]),ni=e=>B(void 0,void 0,void 0,function*(){try{let t=yield ei(e,`HEAD`),n=ti.has(t)?yield ei(e,`GET`).catch(()=>t):t;return{ok:n!==404,status:n}}catch(e){return{ok:!1,status:null,error:e instanceof Error?e.message:`unknown error`}}}),ri=(e,t,n)=>B(void 0,void 0,void 0,function*(){let r=[],i=0,a=()=>B(void 0,void 0,void 0,function*(){for(;i<e.length;){let n=i++;r[n]=yield t(e[n])}}),o=Array.from({length:Math.min(n,e.length)},()=>a());return yield Promise.all(o),r}),ii=(e,t)=>B(void 0,void 0,void 0,function*(){let n=/* @__PURE__ */ new Map;for(let[r,i]of e.getExternalPathsByNode())if(!t?.sourceFiles||t.sourceFiles.has(r)){for(let e of i)if($r(e.originalPath)){let t=e.originalPath,i=n.get(t),a={file:r,originalPath:e.originalPath};i?i.push(a):n.set(t,[a])}}let r=[...n.keys()];return(yield ri(r,e=>B(void 0,void 0,void 0,function*(){let t=yield ni(e);if(t.ok)return null;let r={url:e,status:t.status,sources:n.get(e)};return t.error&&(r.error=t.error),r}),5)).filter(e=>e!==null)});var ai=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const oi=new RegExp(Re.source,`gm`),si=/^(?:import|export)(?=[\s{*])/,ci=/<[A-Za-z][\w.:-]*(?:"[^"]*"|'[^']*'|\{[^{}]*\}|[^<>"'{}])*>/g,li=/"[^"]*"|'[^']*'|\{[^{}]*\}/g,ui=e=>/\{\s*#[^}]+?\s*\}\s*$/.test(e),di=e=>{let t=e.replace(oi,(e,t,n,r)=>{let i=e.indexOf(r,t.length+n.length)+r.length;return e.slice(0,i).padEnd(e.length,` `)});return v().parse(t)},fi=(e,t)=>{let n=``,r=0;for(let[i,a]of[...t].sort((e,t)=>e[0]-t[0])){let t=Math.max(i,r);a<=t||(n+=e.slice(r,t)+e.slice(t,a).replace(/[^\n]/g,` `),r=a)}return n+e.slice(r)},pi=(e,t)=>t.reduce((e,t)=>fi(e,t(e)),e),mi=e=>{try{return x.parse(e,{ecmaVersion:`latest`,sourceType:`module`}),!0}catch(t){let n=t.pos;return typeof n!=`number`||n<e.trimEnd().length}},hi=e=>{let t=g.exec(e);return t?[[t.index,t.index+t[0].length]]:[]},gi=(e,t)=>{let n,r=!0,i=[],a=0;for(let o of e.split(`
|
|
10
|
-
`)){let e=o.trim()===``,s=r;r=e,n?e&&mi(n.join(`
|
|
11
|
-
`))?n=void 0:(n.push(o),i.push([a,a+o.length])):s&&si.test(o)&&!t.some(([e,t])=>e<=a&&a<t)&&(n=[o],i.push([a,a+o.length])),a+=o.length+1}return i},_i=e=>fi(e,hi(e)),vi=(e,{keepEsm:t=!1}={})=>{let n=At(e);return fi(e,[...hi(e),...n,...t?[]:gi(e,n)])},yi=/* @__PURE__ */ new Set([`{`,"${"]),bi=(e,t)=>{let n=[],r=0;try{let i=x.tokenizer(e.slice(t),{ecmaVersion:`latest`,onComment:(e,r,i,a)=>n.push([t+i+2,t+a-(e?2:0)])});for(let a of i){let i=a.type.label;if(i===`template`)n.push([t+a.start,t+a.end]);else if(i===`string`)n.push([t+a.start+1,t+a.end-1]);else if(i===`regexp`){let r=e.slice(t+a.start,t+a.end);n.push([t+a.start+1,t+a.start+r.lastIndexOf(`/`)])}else if(yi.has(i))r++;else if(i===`}`&&r--===0)return{ranges:n,end:t+a.end}}}catch(r){if(!(r instanceof SyntaxError&&`pos`in r&&typeof r.pos==`number`))return{ranges:n,end:e.length};let i=t+r.pos;if(!r.message.startsWith(`Unterminated string`))return{ranges:n,end:i};let a=e.indexOf(`
|
|
12
|
-
`,i);n.push([i+1,a===-1?e.length:a])}return{ranges:n,end:e.length}},xi=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(r===`\\`)n++;else if(r===`{`){let r=bi(e,n+1);t.push(...r.ranges),n=r.end-1}}return t},Si=e=>[...e.matchAll(ci)].flatMap(({index:e,0:t})=>[...t.matchAll(li)].map(({index:t,0:n})=>[e+t+1,e+t+n.length-1])),Ci=e=>[...e.matchAll(/\\[\s\S]/g)].flatMap(({index:e,0:t})=>t===`\\<`?[[e+1,e+2]]:[]),wi=e=>pi(vi(e),[Si,Ci,xi]),Ti=e=>{let t=e.map((e,t)=>({edit:e,index:t})).sort((e,t)=>t.edit.start-e.edit.start||t.edit.end-e.edit.end||t.index-e.index),n=[],r=1/0;for(let{edit:e}of t)e.end>r||(n.push(e),r=e.start);return n},Ei=(e,t)=>Ti(t).reduce((e,t)=>e.slice(0,t.start)+t.text+e.slice(t.end),e),Di=(e,t,n=1)=>{let r=0;for(let n=1;n<t;n++){let t=e.indexOf(`
|
|
13
|
-
`,r);if(t===-1)break;r=t+1}return r+n-1},V=(e,t)=>{let n=e.slice(0,t).split(`
|
|
14
|
-
`);return{line:n.length,column:(n.pop()?.length??0)+1}},Oi=(e,t)=>e.start-t.start;function ki(e,t,n){let r=0;for(let i of e){let e=i.start+r;if(n===`snap`?t<e:t<=e)break;if(t<e+i.text.length)return n===`snap`?i.start:void 0;r+=i.text.length-(i.end-i.start)}return t-r}const Ai=(e,t,n)=>{let{start:r,end:i}=n;for(let{edits:n}of e.slice(0,t).reverse()){let e=[...n].sort(Oi),t=ki(e,r,`reject`),a=ki(e,i,`reject`);if(t===void 0||a===void 0||e.some(e=>e.start<a&&e.end>t))return;r=t,i=a}return{start:r,end:i,text:n.text}},ji=(e,t,n)=>{let r=e[t],i=e[0];if(!r||!i||n.line===void 0)return{};let a=e.slice(0,t).reduceRight((e,{edits:t})=>ki([...t].sort(Oi),e,`snap`),Di(r.content,n.line,n.column)),o=V(i.content,a);return n.column===void 0?{line:o.line}:o},Mi=e=>u(C(e)).replace(/^\.$/,``),Ni=(e,t)=>ai(void 0,void 0,void 0,function*(){let n=new xr(e);try{yield Zr(n,t)}catch{return[]}return n.paths.flatMap(e=>e.pathType===L.INTERNAL&&e.anchorLink?[`${Mi(Ae(e.toString()))}#${re(e.anchorLink.slice(1))}`]:[])}),Pi=(e,t,n)=>{let r=`${Mi(t)}#`;for(let t of e??[]){if(!t.startsWith(r))continue;let e=t.slice(r.length),i=e.startsWith(`${n}-`)&&/^\d/.test(e.slice(n.length+1));if(e===n||i)return e}},Fi={id:`parse-error`,group:`content`,severity:`error`,description:`files MDX can't parse; other checks skip them`};var Ii=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Li=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ri=/* @__PURE__ */ new Set([`page`,`snippet`,`snippet-v2`]),zi=(e,t)=>[...new Set([...t].flatMap(t=>{let n=Oe(t,`/${e.replace(/^\//,``)}`);return n?[n.toLowerCase()]:[]}))].sort().join(`
|
|
15
|
-
`),Bi=e=>Ii(void 0,void 0,void 0,function*(){let{mdxCandidates:t}=yield S(e,yield he(e)),{snippets:n,snippetsV2:r,fileImportsMap:i}=yield ae(e,t),a=/* @__PURE__ */ new Set([...n,...r]),o=new Map(t.map(e=>[e.replace(/^\//,``),[...i.get(e.toLowerCase())??[]].sort().join(`
|
|
16
|
-
`)]));return{files:t.filter(e=>/\.mdx?$/.test(e)&&Ri.has(ne(e))).map(e=>({file:e.replace(/^\//,``),kind:a.has(e)?`snippet`:`page`})),imports:o}}),Vi=e=>{try{let{attributes:t}=ie(e);return t&&typeof t==`object`?Object.assign({},t):{}}catch{return{}}},Hi=/\s*\(\d+:\d+(?:-\d+:\d+)?\)$/,Ui=/* @__PURE__ */ new Set([`unexpected-character`,`unexpected-eof`]),Wi=(e,t,n)=>{let{source:r,ruleId:i}=e??{};return r===`micromark-extension-mdx-jsx`&&typeof i==`string`&&Ui.has(i)&&n?.line!=null&&n.column!=null&&t[Di(t,n.line,n.column)-1]===`<`},Gi=(e,t=``)=>{let n=e?.reason,r=e instanceof Error?e.message:`could not parse this file`,i=typeof n==`string`?n:r,a=e&&typeof e==`object`?me(e):null,o=Wi(e,t,a)?`; if this < isn't a tag, escape it as \\<`:``;return Object.assign(Object.assign(Object.assign({},a?.line!=null&&{line:a.line}),a?.column!=null&&{column:a.column}),{message:i.replace(Hi,``)+o})},Ki=(e,t)=>Object.assign(Object.assign({},t),{rule:Fi.id,group:Fi.group,severity:Fi.severity,file:e,message:`${t.message} (other checks were skipped for this file)`}),qi=e=>{try{return di(e)}catch{return}},Ji=(e,t,n,r={})=>{let i=Object.assign({file:e,content:t,baseDir:n,frontmatter:Vi(t)},r),a=qi(t);if(a)return{context:Object.assign(Object.assign({},i),{tree:a}),approximate:!1};try{return{context:Object.assign(Object.assign({},i),{tree:Ee(t,e)}),approximate:!0}}catch(e){return{error:Gi(e,t)}}},Yi={type:`root`,children:[]},Xi=/\{\{\s*([\w.\-]+)\s*\}\}/g,Zi=(e,t={})=>[...e.matchAll(Xi)].filter(e=>e[1]!==void 0&&t[e[1]]!==void 0).map(e=>({start:e.index,end:e.index+e[0].length,text:b(e[0],t)})),Qi=(e,t,n,r,i)=>{var{edit:a}=n,o=Li(n,[`edit`]);let s=a&&Ai(r,i,a);return Object.assign(Object.assign(Object.assign(Object.assign({},o),ji(r,i,o)),{rule:e.id,group:e.group,severity:e.severity,file:t}),s&&{fix:Object.assign({file:t},s)})},$i=(e,{file:t,kind:n},r,i,a,o)=>{let s=n===`snippet`?e.filter(e=>!e.pagesOnly):e,c=s.filter(e=>e.raw),l=s.filter(e=>!e.raw),u=n===`snippet`?Zi(r,o):[],d=Ei(r,u),f={file:t,content:d,baseDir:i,frontmatter:{},tree:Yi,variables:o},p=c.flatMap(e=>e.check(f).map(t=>({rule:e,finding:t}))),m=Ti(p.flatMap(({finding:e})=>e.edit?[e.edit]:[])),h=Ei(d,m),g=[{content:r,edits:u},{content:d,edits:m},{content:h,edits:[]}],_=p.map(({rule:e,finding:n})=>Qi(e,t,n,g,1)),v=Ji(t,h,i,Object.assign(Object.assign({},a),{variables:o}));if(`error`in v)return _.unshift(Ki(t,Object.assign(Object.assign({},v.error),ji(g,2,v.error)))),_;for(let e of l)for(let n of e.check(v.context)){let r=v.approximate?Object.assign(Object.assign({},n),{edit:void 0}):n;_.push(Qi(e,t,r,g,2))}return _},ea=e=>Ii(void 0,void 0,void 0,function*(){let t=yield Promise.all(e.files.map(({file:t})=>Ni(t,e.read(t)??``)));return new Set(t.flat())}),ta=(e,t)=>Ii(void 0,void 0,void 0,function*(){let n=new Set(t.filter(e=>e.needsAnchorLinks).map(({id:e})=>e)),r=e.files.filter(({file:t})=>!e.selected||e.selected.has(t)),i=(n,r)=>{let i=e.read(n.file);return i===void 0?[Ki(n.file,{message:`could not read this file`})]:$i(t,n,i,e.baseDir,r,e.variables)},a=e=>e.some(({rule:e})=>n.has(e)),o={readFile:e.read,themeVersion:e.themeVersion,latex:e.latex},s=r.map(e=>i(e,o));if(!s.some(a))return s.flat();let c=Object.assign(Object.assign({},o),{anchorLinks:yield ea(e)});return r.flatMap((e,t)=>{let n=s[t]??[];return a(n)?i(e,c):n})}),na=[`humans`,`agents`,`signed-in`,`signed-out`],ra={wide:"The page keeps the default width and still hides the table of contents; without `mode` the table of contents shows.",center:"The page keeps the default layout and still hides the table of contents; without `mode` the table of contents shows.",frame:"The page uses the default layout, but its headings still get no anchor ids and no table of contents; without `mode` they do."},ia=[`children`,`className`,`id`,`key`,`style`],aa=[`right`,`left`,`none`],oa=[`grey`,`violet`,`sky`,`teal`,`plum`,`crimson`,`info`,`success`,`warning`,`destructive`],sa=[`inline`,`base`],ca=[`default`,`color`],la=[`dot`,`number`,`box`],ua=[`timeline`,`divided`],da=[`box`,`circle`,`dot`,`number`],fa=[`solid`,`dashed`],pa=[`h2`,`h3`,`h4`],ma=[`rule`,`card`,`plain`],ha=[`background`,`plain`,`separator`],ga=[`compact`,`table`],_a=[`minimal`,`grid`],va=[`equal`,`auto`],ya=[`start`,`center`,`end`],ba=[`subtle`,`strong`],H=(e,{legacy:t={},invalid:n}={})=>Object.assign({values:e,legacy:t},n!==void 0&&{invalid:n}),xa=e=>e,U={icon:{kind:`icon`},iconType:{kind:`iconType`}},W={kind:`flag`},G={kind:`any`},K={status:`supported`,props:U,removedProps:{color:{note:`It is ignored. Style the callout with custom CSS on [data-component-item="alert"].`}}},Sa={status:`pending`,anyProps:!0},Ca={type:G,typeHref:G,location:G,default:G,required:W,deprecated:W,hidden:W,pre:G,post:G},wa={status:`supported`,within:[`Table`],anyProps:!0},Ta=Object.assign(Object.assign({},wa),{props:{align:H(ya)}}),Ea={status:`supported`,props:{cols:{kind:`integer`,min:1,max:4},joined:W,variant:H(ha)}},Da={status:`supported`,props:Object.assign(Object.assign({},U),{filename:G,language:G,lang:G,lines:W,wrap:W,expandable:W,nocopy:W,inline:W})},Oa={status:`supported`},ka={status:`supported`,within:[`Tree`,`FileTree`],props:{name:G,highlight:W}},Aa=Object.assign(Object.assign({},ka),{props:Object.assign(Object.assign({},ka.props),{defaultOpen:W,openable:W})}),ja=Object.assign({},Sa),Ma=`A tooltip holds text only. Put the link in the text next to the tooltip, or make the trigger itself a link.`,Na={status:`removed`,note:"Written directly, it renders nothing of its own. Remove the tag; `twoslash` code fences still show hovers."},Pa=xa({Accordion:{status:`supported`,props:Object.assign(Object.assign({},U),{title:G,description:G,defaultOpen:W})},AccordionGroup:{status:`supported`,children:[`Accordion`]},ApiPlayground:{status:`removed`,note:`Nothing renders in its place. Generate the API playground from OpenAPI or AsyncAPI.`},Badge:{status:`supported`,props:Object.assign(Object.assign({},U),{color:H(oa,{legacy:{gray:`grey`,blue:[`sky`,`info`],green:[`teal`,`success`],orange:`warning`,yellow:`warning`,red:[`crimson`,`destructive`],purple:`violet`,white:null,surface:null,"white-destructive":`destructive`,"surface-destructive":`destructive`}}),size:H(sa,{legacy:{xs:`inline`,sm:`inline`,md:`inline`,lg:`base`}}),type:H(ca)}),removedProps:{shape:{note:`The badge has one shape.`,remove:!0},stroke:{note:`The badge has no outline.`,remove:!0},disabled:{note:`The badge has no disabled state.`,remove:!0}}},Callout:K,Card:{status:`supported`,props:Object.assign(Object.assign({},U),{title:G,color:G,horizontal:W,href:G,img:G,disabled:W,cta:G,variant:H(ha)}),removedProps:{arrow:{note:"The card has no corner icon. Add a `cta` instead: it shows a chevron when the card links within the site."},type:{note:`It is ignored.`,remove:!0}}},CardGroup:Object.assign(Object.assign({},Ea),{status:`deprecated`,replacement:`Columns`}),Check:K,CodeBlock:Da,CodeGroup:{status:`supported`,props:{dropdown:W,report:W}},Color:{status:`supported`,props:{variant:H(ga)}},"Color.Row":{status:`supported`,within:[`Color`],props:{title:G}},"Color.Item":{status:`supported`,within:[`Color`],required:[{props:[`value`],note:`Without it the item does not render.`}],props:{name:G,value:{kind:`text`}}},Column:{status:`supported`,within:[`Columns`,`CardGroup`]},Columns:Ea,CustomCode:{status:`supported`,anyProps:!0},CustomComponent:{status:`supported`,anyProps:!0},Danger:K,DynamicCustomComponent:{status:`supported`,anyProps:!0},Expandable:{status:`supported`,props:{title:G,defaultOpen:W},removedProps:{lazy:{note:`It is ignored.`,remove:!0},uniqueParamId:{note:`It is ignored.`,remove:!0}}},FileTree:Oa,Frame:{status:`supported`,props:{caption:G,hint:G,containerClassName:G},removedProps:{as:{note:`It is ignored.`,remove:!0}}},GitHub:ja,"GitHub.Repo":ja,Github:ja,"Github.Repo":ja,Heading:{status:`supported`,anyProps:!0},Icon:{status:`supported`,props:Object.assign(Object.assign({},U),{src:G,library:G,color:G,size:G,title:G,"aria-label":G})},Info:K,Latex:{status:`supported`},Link:{status:`supported`,anyProps:!0,props:{iconPosition:H(aa)}},List:{status:`supported`,props:{marker:H(la),start:{kind:`integer`}}},MDX:{status:`supported`},MDXContentController:{status:`supported`,anyProps:!0},Mermaid:{status:`supported`,props:{chart:G,title:G,actions:G},removedProps:{placement:{note:`It is ignored.`,remove:!0}}},Note:K,OptimizedVideo:{status:`supported`,anyProps:!0},Panel:{status:`supported`,anyProps:!0},Param:{status:`removed`,replacement:`ParamField`,note:`Only its description renders.`},ParamField:{status:`supported`,required:[{props:[`query`,`path`,`body`,`header`],note:`It names the parameter and where it goes; without one the field does not render.`}],props:Object.assign(Object.assign({},Ca),{query:G,path:G,body:G,header:G,placeholder:G,enum:G})},Popup:Na,PopupContent:Na,PopupTrigger:Na,Prompt:{status:`supported`,props:{description:G,actions:G},removedProps:{icon:{note:`It is ignored.`,remove:!0},iconType:{note:`It is ignored.`,remove:!0}}},Quote:{status:`supported`,props:{variant:H(ma),author:G,img:G,icon:G}},RequestExample:{status:`supported`,props:{dropdown:W}},ResponseExample:{status:`supported`,props:{dropdown:W}},ResponseField:{status:`supported`,required:[{props:[`name`],note:`Without it the field does not render.`}],props:Object.assign(Object.assign({},Ca),{name:G})},SnippetGroup:{status:`removed`,replacement:`CodeGroup`,note:`Its code blocks render without the group.`},Step:{status:`supported`,within:[`Steps`],props:Object.assign(Object.assign({},U),{title:G,description:G,stepNumber:G,titleSize:H(pa),noAnchor:W})},Steps:{status:`supported`,children:[`Step`],props:{titleSize:H(pa),variant:H(ua),marker:H(da),line:H(fa),background:W,start:{kind:`integer`}}},Tab:{status:`supported`,within:[`Tabs`],required:[{props:[`title`],note:`Without it the tab is labelled "Tab Title".`}],props:Object.assign(Object.assign({},U),{title:G})},Table:{status:`supported`,props:{variant:H(_a),layout:H(va),"aria-label":G}},"Table.Body":wa,"Table.Cell":Object.assign(Object.assign({},Ta),{props:Object.assign(Object.assign({},Ta.props),{variant:H(ba)})}),"Table.Header":wa,"Table.HeaderCell":Ta,"Table.Row":wa,"Table.RowHeader":Ta,Tabs:{status:`supported`,children:[`Tab`],props:{defaultTabIndex:{kind:`integer`,min:0},borderBottom:W,sync:W}},Tile:Sa,Tip:Object.assign(Object.assign({},K),{status:`deprecated`,replacement:`Check`}),Tooltip:{status:`supported`,required:[{props:[`tip`,`headline`],note:`Without either one the trigger renders as plain text, with no tooltip.`}],linksOnlyWhole:!0,props:{tip:G,headline:G,triggerAriaLabel:G,iconPosition:H(aa)},removedProps:{cta:{note:Ma},href:{note:Ma}}},Tree:Oa,"Tree.File":ka,"Tree.Folder":Aa,Update:Sa,Variation:Sa,View:{status:`deprecated`,note:`Use Tabs for alternatives within a section or CodeGroup for code samples.`,required:[{props:[`title`],note:`Without it readers can never pick this view.`}],props:Object.assign(Object.assign({},U),{title:G})},Visibility:{status:`supported`,required:[{props:[`for`],note:`Without it readers see nothing.`}],props:{for:H(na,{invalid:`Readers see nothing.`})}},Warning:K,ZoomImage:{status:`supported`,anyProps:!0}}),q=e=>{let t=/* @__PURE__ */ new Set;return O(e.tree,`mdxjsEsm`,e=>{for(let n of e.data?.estree?.body??[])if(n.type===`ImportDeclaration`)for(let e of n.specifiers)D(e.local,t);else if(n.type===`ExportNamedDeclaration`){let e=n.declaration;if(e?.type===`VariableDeclaration`)for(let n of e.declarations)D(n.id,t);else e&&D(e.id,t);for(let e of n.specifiers)D(e.local,t),D(e.exported,t)}else if(n.type===`ExportDefaultDeclaration`){let e=n.declaration;(e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`)&&D(e.id,t)}}),t},Fa=e=>(e.tree.children.find(e=>[`yaml`,`toml`].includes(e.type))?.position)?.end.offset??0,Ia=(e,t,n)=>{let r;try{r=be(Ee(e,t))}catch{return}return r.has(n)?`{ ${n} }`:r.has(`default`)?n:void 0},La={id:`unknown-component`,group:`content`,severity:`error`,scope:`file`,description:`JSX components that are not built in, imported or exported`,pagesOnly:!0,check:e=>{let t=q(e),n=/* @__PURE__ */ new Set,r=[],i=Fa(e),a=i===0?``:`
|
|
17
|
-
|
|
18
|
-
`,o=/^\n*/.exec(e.content.slice(i))?.[0].length??0,s=`
|
|
19
|
-
`.repeat(Math.max(0,2-o)),c=(o,c)=>{let l=o?.split(`.`)[0];if(!o||!l||!/^[A-Z]/.test(l)||t.has(l)||n.has(o)||Pt(o)||e.themeVersion===2&&Object.prototype.hasOwnProperty.call(Pa,o))return;n.add(o);let u=we.map(e=>`snippets/${l}${e}`).find(t=>e.readFile?.call(e,t)!==void 0),d=u&&e.readFile?.call(e,u),f=u&&d!==void 0&&o===l?Ia(d,u,l):void 0;r.push({line:c?.line,column:c?.column,message:`<${o}> is not built in, imported or exported on this page`,edit:f?{start:i,end:i,text:`${a}import ${f} from "/${u}";${s}`}:void 0})},l=(e,t)=>Je(e,/* @__PURE__ */ new Set,{reference:e=>{if(e.type!==`JSXIdentifier`)return;let n=e.loc;c(String(e.name),n?.start??t)}});return O(e.tree,e=>{if(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`){c(e.name,e.position?.start);for(let t of e.attributes){let n=t.type===`mdxJsxAttribute`?t.value:t;n&&typeof n==`object`&&l(n.data?.estree,e.position?.start)}}else(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`)&&l(e.data?.estree,e.position?.start)}),r}},Ra=Pa,za=new Set(ia),J=e=>e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`,Y=e=>e&&Object.prototype.hasOwnProperty.call(Ra,e)?Ra[e]:void 0,Ba=e=>(e.children??[]).flatMap(e=>J(e)&&e.name?[e]:Ba(e)),Va=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(r!==void 0&&t(r))return n}return-1},Ha=e=>e?.split(`.`)[0]??``,X=(e,t)=>{let n=q(e),r=(e,i,a)=>{let o=i;if(J(e)){let r=n.has(Ha(e.name))?void 0:Y(e.name);r&&t(e,r,i,a),o=[...i,e]}let s=[...a,e];for(let t of e.children??[])r(t,o,s)};r(e.tree,[],[])},Ua=e=>e.data?.estree,Wa=e=>{let t=/* @__PURE__ */ new Set,n=e=>{if(Array.isArray(e)){for(let t of e)n(t);return}if(typeof e!=`object`||!e)return;let{type:r,name:i}=e;if(r===`JSXClosingElement`){let e=i;for(;e?.type===`JSXMemberExpression`;)e=e.object;t.add(e)}for(let[t,r]of Object.entries(e))t!==`loc`&&t!==`range`&&typeof r==`object`&&n(r)};return n(e),t},Ga=(e,t)=>{let n=q(e),r=e=>{let r=Wa(e);Je(e,/* @__PURE__ */ new Set,{reference:e=>{if(e.type!==`JSXIdentifier`||r.has(e))return;let i=String(e.name),a=n.has(i)?void 0:Y(i),o=e.loc?.start;a&&t({name:i,spec:a,position:o?{line:o.line,column:o.column+1}:{}})}})},i=e=>{if(J(e)){let i=n.has(Ha(e.name))?void 0:Y(e.name);i&&e.name&&t({name:e.name,spec:i,position:Q(e),element:e});for(let t of e.attributes){let e=t.type===`mdxJsxAttribute`?t.value:t;e&&typeof e==`object`&&r(Ua(e))}}else(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`)&&r(Ua(e));for(let t of e.children??[])i(t)};i(e.tree)},Z=(e,t)=>Object.assign(Object.assign({},e),{scope:`file`,group:`content`,severity:`warning`,theme:2,check:e=>{let n=[];return t(e,e=>n.push(e)),n}}),Q=e=>({line:e.position?.start.line,column:e.position?.start.column}),Ka=e=>e.map(e=>`"${e}"`).join(`, `),qa=e=>e.map(e=>`<${e}>`).join(` or `),Ja=(e,t)=>{let n=e.toLowerCase(),r=t.toLowerCase(),i=Array.from({length:n.length+1},(e,t)=>Array.from({length:r.length+1},(e,n)=>t===0?n:n===0?t:0)),a=(e,t)=>i[e]?.[t]??0;for(let e=1;e<=n.length;e++)for(let t=1;t<=r.length;t++){let o=n[e-1]===r[t-1]?0:1,s=Math.min(a(e-1,t)+1,a(e,t-1)+1,a(e-1,t-1)+o);e>1&&t>1&&n[e-1]===r[t-2]&&n[e-2]===r[t-1]&&(s=Math.min(s,a(e-2,t-2)+1));let c=i[e];c&&(c[t]=s)}return a(n.length,r.length)},Ya=(e,t)=>{let n=Math.max(1,Math.floor(e.length/3));return t.map(t=>({candidate:t,score:Ja(e,t)})).filter(({score:e})=>e<=n).sort((e,t)=>e.score-t.score)[0]?.candidate},Xa=(e,t)=>{let n=Ya(e,t);return n?` Did you mean "${n}"?`:``},Za=e=>{if(e!==null)return typeof e==`string`?`"${e}"`:Ka(e).replace(/, (?=[^,]*$)/,` or `)},Qa=e=>e.attributes.filter(e=>e.type===`mdxJsxAttribute`),$a=/[^\s=/>{}"']+/y,eo=e=>e.attributes.flatMap(e=>{let t=e.type===`mdxJsxAttribute`?e.value:e,n=t&&typeof t==`object`?Ua(t):void 0;return typeof n?.start==`number`&&typeof n.end==`number`?[{start:n.start,end:n.end}]:[]}),to=(e,t,n)=>{let r=/* @__PURE__ */ new Map,i=t=>{let r=n.find(({start:e})=>e===t+1);if(!r)return;let i=r.end;for(;i<e.length&&/[\s>]/.test(e[i]??``);)i++;return e[i]===`}`?i+1:void 0},a=t,o=()=>{for(;a<e.length&&/\s/.test(e[a]??``);)a++};for(;;){o();let t=e[a];if(t===void 0||t===`>`||t===`/`)break;if(t===`{`){let e=i(a);if(e===void 0)break;a=e;continue}$a.lastIndex=a;let n=$a.exec(e)?.[0];if(!n)break;let s=a;a+=n.length;let c=a;if(o(),e[a]===`=`){a++,o();let t=e[a];if(t===`"`||t===`'`){let n=e.indexOf(t,a+1);a=n===-1?e.length:n+1}else if(t===`{`){let e=i(a);if(e===void 0)break;a=e}}else a=c;r.set(n,[...r.get(n)??[],{start:s,end:a}])}return r},no=(e,t)=>{let n=Qa(t),r=t.position?.start.offset;if(r===void 0||!t.name)return n.map(e=>({attribute:e}));let{content:i}=e,a=to(i,r+t.name.length+1,eo(t)),o=/* @__PURE__ */ new Map;return n.map(e=>{let t=o.get(e.name)??0;o.set(e.name,t+1);let n=a.get(e.name)?.[t];return n?Object.assign(Object.assign({attribute:e},n),{source:i.slice(n.start,n.end)}):{attribute:e}})},ro=(e,t,n)=>t===void 0?Q(n):V(e.content,t),io={known:!1},ao=e=>{let t=e;if(t.type===`Literal`)return{known:!0,value:t.value};if(t.type===`TemplateLiteral`&&t.expressions?.length===0)return{known:!0,value:(t.quasis?.[0])?.value.cooked};if(t.type===`UnaryExpression`&&t.operator===`-`){let e=ao(t.argument);return e.known&&typeof e.value==`number`?{known:!0,value:-e.value}:io}return io},oo=e=>{let{value:t}=e;if(typeof t!=`object`||!t)return;let[n]=Ua(t)?.body??[];return n?.type===`ExpressionStatement`?n.expression:void 0},so=e=>{let{value:t}=e;return t==null?{known:!0,value:!0}:typeof t==`string`?{known:!0,value:t}:ao(oo(e))},co=e=>{let t=so(e);if(!t.known)return;let{value:n}=t;return typeof n==`string`||typeof n==`number`?String(n):void 0},lo=(e,t)=>{let n=`values`in e||e.kind===`integer`||e.kind===`iconType`,r=so(t);return n&&r.known&&typeof r.value==`boolean`?String(r.value):void 0},uo=e=>{let t=oo(e)?.type;return t===`ObjectExpression`||t===`ArrayExpression`},fo=e=>e===``||e===!1||e==null,po=e=>{let t=so(e);return!t.known||!fo(t.value)},mo=({start:e,end:t},n)=>e===void 0||t===void 0?void 0:{start:e,end:t,text:n},ho=(e,{start:t,end:n})=>{if(t===void 0||n===void 0)return;let r=t;for(;r>0&&/[ \t]/.test(e.content[r-1]??``);)r--;return{start:r,end:n,text:``}},go=e=>e.replace(/\./g,`\\.`),_o=(e,t,n)=>{let r=t.position?.start.offset,i=t.position?.end.offset,a=t.name;if(r===void 0||i===void 0||!a)return;let o=e.content.slice(r,i),s=go(a),c=RegExp(`^<\\s*${s}(?![\\w.:-])`).exec(o);if(!c)return;let l=RegExp(`</\\s*${s}\\s*>$`).exec(o);if(l||o.endsWith(`/>`))return{start:r,end:i,text:`<${n}${o.slice(c[0].length,l?l.index:o.length)}${l?`</${n}>`:``}`}},vo=Z({id:`removed-component`,description:`Components that no longer render`},(e,t)=>Ga(e,({name:e,spec:n,position:r})=>{if(n.status!==`removed`)return;let i=n.replacement?` Use <${n.replacement}> instead.`:``;t(Object.assign(Object.assign({},r),{message:`<${e}> is removed. ${n.note??``}${i}`.trim()}))})),yo=Z({id:`deprecated-component`,description:`Components that still render but are on their way out`},(e,t)=>{let n=q(e);Ga(e,({name:r,spec:i,position:a,element:o})=>{let{replacement:s}=i;if(i.status!==`deprecated`)return;if(!s){t(Object.assign(Object.assign({},a),{message:`<${r}> is deprecated. ${i.note??``}`.trim()}));return}let c=n.has(s);t(Object.assign(Object.assign({},a),{message:c?`<${r}> is deprecated. Use the built-in <${s}>, which takes the same props; this page declares its own <${s}>, so rename that first.`:`<${r}> is deprecated. Use <${s}>, which takes the same props.`,edit:o&&!c?_o(e,o,s):void 0}))})}),bo=Z({id:`pending-component`,description:`Components that do not render yet`},(e,t)=>Ga(e,({name:e,spec:n,position:r})=>{n.status===`pending`&&t(Object.assign(Object.assign({},r),{message:`<${e}> is not supported yet. It renders only its content, without its own styling.`}))})),xo=Z({id:`removed-prop`,description:`Props that are no longer read`},(e,t)=>X(e,(n,r)=>{for(let i of no(e,n)){let{attribute:a}=i,o=r.removedProps?.[a.name];if(o===void 0)continue;let s=o.remove?` Remove the prop.`:``;t(Object.assign(Object.assign({},ro(e,i.start,n)),{message:`\`${a.name}\` on <${n.name}> is removed. ${o.note}${s}`,edit:o.remove?ho(e,i):void 0}))}})),So=Z({id:`unknown-prop`,description:`Props a component does not take`},(e,t)=>X(e,(n,r)=>{if(r.anyProps||r.status===`removed`||r.status===`pending`)return;let i=Object.keys(r.props??{});for(let a of no(e,n)){let{name:o}=a.attribute;if(za.has(o)||i.includes(o)||r.removedProps?.[o]!==void 0||o.startsWith(`data-`)||o.startsWith(`aria-`))continue;let s=i.length>0?` It takes ${Ka(i)}.`:` It takes no props.`;t(Object.assign(Object.assign({},ro(e,a.start,n)),{message:`<${n.name}> has no \`${o}\` prop, so it is ignored.${Xa(o,i)}${s}`}))}})),Co=(e,t)=>Object.prototype.hasOwnProperty.call(e.legacy,t)?e.legacy[t]:void 0,wo=(e,t,n,r)=>{let i=`\`${t.source??`${t.attribute.name}="${r}"`}\` on <${e.name}>`;if(`values`in n){if(n.values.includes(r))return;let e=Co(n,r);if(e!==void 0){let t=Za(e);return{message:t?`${i} is an old value. Use ${t}.`:`${i} is an old value with no replacement. Remove it to get the default.`}}return{message:`${i} is not a supported value${n.invalid?`. ${n.invalid}`:`, so the default is used.`}${Xa(r,n.values)} Allowed: ${Ka(n.values)}.`}}if(n.kind===`iconType`)return Le.includes(r)?void 0:{message:`${i} is not an icon type, so the icon is not drawn.${Xa(r,Le)} Allowed: ${Ka(Le)}.`};if(n.kind===`integer`){let e=Number(r);return Number.isInteger(e)&&(n.min===void 0||e>=n.min)&&(n.max===void 0||e<=n.max)?void 0:{message:`${i} must be a whole number${n.min!==void 0&&n.max!==void 0?` from ${n.min} to ${n.max}`:n.min===void 0?``:` of at least ${n.min}`}.`}}},To=Z({id:`invalid-value`,description:`Prop values a component does not support`},(e,t)=>X(e,(n,r)=>{for(let i of no(e,n)){let{attribute:a}=i,o=r.props?.[a.name];if(o&&`kind`in o&&o.kind===`text`){let r=so(a);(uo(a)||r.known&&typeof r.value!=`string`)&&t(Object.assign(Object.assign({},ro(e,i.start,n)),{message:`\`${i.source??a.name}\` on <${n.name}> must be one plain string. Any other value does not render.`}));continue}if(!o)continue;let s=co(a)??lo(o,a);if(s===void 0)continue;let c=wo(n,i,o,s);if(!c)continue;let l=`values`in o?Co(o,s):void 0;t(Object.assign(Object.assign(Object.assign({},ro(e,i.start,n)),c),{edit:typeof l==`string`?mo(i,`${a.name}="${l}"`):void 0}))}})),Eo=e=>e.type===`text`&&!e.value?.trim(),Do=e=>J(e)&&!e.name||e.type===`paragraph`&&e.children.every(e=>Eo(e)||e.type===`mdxJsxTextElement`||e.type===`mdxTextExpression`),Oo=Z({id:`component-placement`,description:`Components used outside the component they belong in`,pagesOnly:!0},(e,t)=>X(e,(e,n,r,i)=>{let{within:a}=n;if(!a)return;let o=Va(i,e=>J(e)&&a.includes(e.name??``)),s=i[o];if(!s||!J(s)){t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> only works inside ${qa(a)}. Here it renders without the layout that component gives it.`}));return}if(!(Y(s.name)?.children)?.includes(e.name??``))return;let c=i.slice(o+1).find(e=>!Do(e));if(!c)return;let l=J(c)?`<${c.name}>`:`a ${c.type}`;t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> must be a direct child of <${s.name}>; only a fragment may wrap it. Here it is inside ${l}, so <${s.name}> drops it.`}))})),ko=Z({id:`dropped-child`,description:`Children a component does not render`},(e,t)=>{let n=q(e);X(e,(e,r)=>{if(r.children)for(let i of Ba(e)){let a=i.name??``;r.children.includes(a)||!Y(a)||n.has(Ha(a))||t(Object.assign(Object.assign({},Q(i)),{message:`<${e.name}> holds only ${qa(r.children)}. This <${a}> is dropped.`}))}})}),Ao=e=>e.map(e=>`\`${e}\``).join(` or `),jo=Z({id:`missing-prop`,description:`Props a component needs to render its main part`},(e,t)=>X(e,(e,n)=>{let{attributes:r}=e,i=e=>{let t=Va(r,t=>t.type===`mdxJsxAttribute`&&t.name===e),n=r.slice(t+1).some(({type:e})=>e===`mdxJsxExpressionAttribute`),i=r[t];return n||i?.type===`mdxJsxAttribute`&&po(i)};for(let{props:r,note:a}of n.required??[])r.some(i)||t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> needs ${Ao(r)}. ${a}`}))})),Mo=e=>{let t=/* @__PURE__ */ new Set,n=e=>{e.type===`definition`&&t.add(String(e.identifier).toLowerCase());for(let t of e.children??[])n(t)};return n(e),t},No=(e,t)=>e.type===`link`||e.type===`linkReference`&&t.has(String(e.identifier).toLowerCase())||J(e)&&(e.name===`a`||e.name===`Link`||e.name===`button`),Po=(e,t)=>No(e,t)||(e.children??[]).some(e=>Po(e,t)),Fo=e=>e.flatMap(e=>e.type===`paragraph`?Fo(e.children):e.type===`text`&&!e.value?.trim()?[]:[e]),Io=[vo,yo,bo,xo,So,To,jo,Oo,ko,Z({id:`nested-link`,description:`Links inside a component that only works when the link is its whole content`},(e,t)=>{let n=Mo(e.tree);X(e,(e,r)=>{if(!r.linksOnlyWhole)return;let i=Fo(e.children),[a]=i;i.length===1&&a&&No(a,n)||i.some(e=>Po(e,n))&&t(Object.assign(Object.assign({},Q(e)),{message:`<${e.name}> around text that contains a link shows no tooltip. Make the whole trigger the link, or move the link out of it.`}))})}),Z({id:`removed-page-mode`,description:`Page modes that no longer exist`,pagesOnly:!0},(e,t)=>{let{mode:n}=e.frontmatter,r=ra;if(typeof n!=`string`||!Object.prototype.hasOwnProperty.call(r,n))return;let i=e.content.search(/^mode\s*:/m);t(Object.assign(Object.assign({},i===-1?{}:V(e.content,i)),{message:`\`mode: ${n}\` in the frontmatter is deprecated. ${r[n]} Use custom CSS for a different layout.`}))})],Lo=e=>`type`in e&&e.type===`JSXOpeningElement`&&`name`in e&&typeof e.name==`object`&&e.name!==null&&`name`in e.name&&e.name.name===`Latex`,Ro=e=>Array.isArray(e)?e.some(Ro):typeof e!=`object`||!e?!1:Lo(e)?!0:Object.entries(e).some(([e,t])=>e!==`loc`&&e!==`range`&&typeof t==`object`&&Ro(t)),zo=e=>typeof e==`object`&&e&&`data`in e&&typeof e.data==`object`&&e.data!==null&&`estree`in e.data?e.data.estree:void 0,Bo=e=>{if(e.type===`math`||e.type===`inlineMath`)return!0;if(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`)return Ro(zo(e));if(e.type!==`mdxJsxFlowElement`&&e.type!==`mdxJsxTextElement`)return!1;if(`name`in e&&e.name===`Latex`)return!0;let t=`attributes`in e?e.attributes:void 0;return Array.isArray(t)&&t.some(e=>Ro(zo(e))||typeof e==`object`&&!!e&&`value`in e&&Ro(zo(e.value)))},Vo={id:`latex-disabled`,group:`content`,severity:`warning`,theme:2,scope:`file`,description:`math on a site whose docs.json turns LaTeX off`,check:({tree:e,content:t,latex:n})=>{if(n!==!1)return[];let r=[];return O(e,e=>{if(r.length>0)return!1;Bo(e)&&(e.type!==`inlineMath`||!rt(e,t)&&!nt(e.value))&&r.push({line:e.position?.start.line,column:e.position?.start.column,message:`This page uses LaTeX math, but docs.json sets "styling": { "latex": false }, so it shows as plain text. Set "latex" to true to render it.`})}),r}};var Ho=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Uo=({styling:e})=>{let t=e&&typeof e==`object`&&`latex`in e?e.latex:void 0;return typeof t==`boolean`?t:void 0},Wo=e=>{try{let t=JSON.parse(e);return t&&typeof t==`object`?t:{}}catch{return{}}},Go=Ce,Ko=({theme:e,themeVersion:t})=>{let n=Go[typeof e==`string`?e:`mint`]??1;return typeof t==`number`&&Number.isInteger(t)&&t>=1&&t<=n?t:1},qo=e=>dt.existsSync(j.join(e,`docs.json`))?`docs.json`:`mint.json`,Jo=e=>{try{return Ko(Wo(dt.readFileSync(j.join(e,qo(e)),`utf-8`)))}catch{return Ko({})}},Yo=(e,t)=>Ho(void 0,[e,t],void 0,function*(e,{selected:t,localSchema:n}){let{files:r,imports:i}=yield Bi(e),a=/* @__PURE__ */ new Map,o=qo(e),s=t=>{if(!a.has(t))try{a.set(t,dt.readFileSync(j.join(e,t),`utf-8`))}catch{a.set(t,void 0)}return a.get(t)},c=Wo(s(o)??``);return{baseDir:e,files:r,imports:i,selected:t,configFile:o,variables:c.variables&&typeof c.variables==`object`?c.variables:void 0,themeVersion:Ko(c),latex:Uo(c),localSchema:n,read:s,locate:(e,t)=>{let n=s(e)??``,r=t?n.indexOf(t):-1;return r===-1?{}:V(n,r)}}});var $=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Xo=j.join(mt.homedir(),`.mintlify`,`diagnostics`),Zo=(e,t=Xo)=>{let n=j.resolve(e),r=ht(`sha256`).update(n).digest(`hex`).slice(0,12),i=j.basename(n).replace(/[^\w.-]+/g,`-`)||`site`;return j.join(t,`${i}-${r}.json`)},Qo=/\.mdx?$/,$o=e=>ue(j.extname(e).slice(1)),es=/* @__PURE__ */ new Set([`docs.json`,`mint.json`,`.mintignore`]),ts=(e,t)=>`${e} ${t}${e===1?``:`s`}`,ns=({rule:e,message:t})=>`${e}:${t}`,rs=[...Io,Vo],is=new Set(rs.map(({id:e})=>e)),as=e=>e.filter(({rule:e})=>is.has(e)),os=(e,t)=>{let n=/* @__PURE__ */ new Map;for(let t of e)n.set(ns(t),(n.get(ns(t))??0)+1);return t.filter(e=>{let t=n.get(ns(e))??0;return n.set(ns(e),t-1),t<=0})},ss=e=>{let t=e.line?`:${e.line}${e.column?`:${e.column}`:``}`:``;return`${e.file}${t} ${e.rule} ${e.message}`},cs=e=>[...e].sort((e,t)=>(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0)),ls=e=>{let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.file,[...t.get(n.file)??[],n]);return t},us=(e,t,n)=>n===void 0?``:zi(t,se(n,j.join(e,t))),ds=e=>{let t=/* @__PURE__ */ new Map;return{read:n=>{if(!t.has(n))try{t.set(n,ft(j.join(e,n),`utf-8`))}catch{t.set(n,void 0)}return t.get(n)},forget:e=>t.delete(e)}},fs=(e,...t)=>$(void 0,[e,...t],void 0,function*(e,{reportDir:t}={}){let i=Zo(e,t),o,s=ds(e),c=/* @__PURE__ */ new Map,u,f,h=Promise.resolve(),g=/* @__PURE__ */ new Map,_=/* @__PURE__ */ new Map,v=()=>[...c.values()].flat(),ee=()=>$(void 0,void 0,void 0,function*(){let e=v(),t={version:1,updatedAt:(/* @__PURE__ */ new Date()).toISOString(),summary:{warnings:e.length,files:c.size,fixable:e.filter(({fix:e})=>e).length},diagnostics:e};yield gt.mkdir(j.dirname(i),{recursive:!0});let n=`${i}.${process.pid}.tmp`;yield gt.writeFile(n,`${JSON.stringify(t,null,2)}\n`),yield gt.rename(n,i)}),y=()=>{let e=v().length,t=e===0?void 0:(0,Sn.jsx)(p,{message:`${ts(e,`content warning`)} in ${ts(c.size,`file`)}. Run \`mint validate\` to list them, or read ${i}.`});f&&t?n(f,t):t?m(t):f&&r(f),f=t},te=e=>{h=h.then(e).catch(()=>void 0)},b=(e,t)=>{clearTimeout(g.get(e)),g.set(e,setTimeout(()=>{g.delete(e),te(t)},150))},ne=()=>$(void 0,void 0,void 0,function*(){let t=ds(e),n=yield Yo(e,{localSchema:!1});return{site:Object.assign(Object.assign({},n),{read:t.read}),reader:t}}),x=(e,t)=>$(void 0,void 0,void 0,function*(){let n=c.get(t)??[],r=e.files.some(e=>e.file===t)?cs(as(yield ta(Object.assign(Object.assign({},e),{selected:/* @__PURE__ */ new Set([t])}),rs))):[];return r.length>0?c.set(t,r):c.delete(t),os(n,r)}),S=e=>new Map(e.files.map(({file:e,kind:t})=>[e,t])),re=t=>$(void 0,void 0,void 0,function*(){if(!o)return;let n=!1;for(let[r,i]of t){s.forget(r),us(e,r,s.read(r))!==(o.imports?.get(r)??``)&&(n=!0);let t=Qo.test(r)&&!o.files.some(e=>e.file===r);(i||t)&&(n=!0)}let r=new Set([...t.keys()].filter(e=>Qo.test(e)));if(n){let e=S(o),n;try{n=yield ne()}catch(e){for(let[e,n]of t)_.set(e,(_.get(e)??!1)||n);throw e}o=n.site,s=n.reader;for(let[t,n]of S(o))e.get(t)!==n&&r.add(t);for(let t of e.keys())o.files.some(e=>e.file===t)||r.add(t)}let i=o,a=(yield Promise.all([...r].map(e=>x(i,e)))).flat();for(let e of a.slice(0,5))l((0,Sn.jsx)(p,{message:ss(e)}));a.length>5&&l((0,Sn.jsx)(p,{message:`${ts(a.length-5,`more content warning`)}`})),y(),yield ee()}),C=()=>{let e=new Map(_);return _.clear(),re(e)},w=()=>$(void 0,void 0,void 0,function*(){if(Jo(e)!==2){yield u?.close(),u=void 0,o=void 0,c=/* @__PURE__ */ new Map,y(),yield gt.rm(i,{force:!0});return}let t=yield he(e),n=yield it(e,{ignored:d(e,t),onEvent:(t,n)=>{let r=j.relative(e,n).split(j.sep).join(`/`);$o(r)&&(_.set(r,(_.get(r)??!1)||t!==`change`),b(`files`,C))},onError:()=>void 0}),r;try{r=yield ne()}catch(e){throw yield n.close(),e}yield u?.close(),u=n,o=r.site,s=r.reader,c=ls(cs(as(yield ta(o,rs)))),y(),yield ee()}),T=a(()=>{f&&m(f)}),E=pt(e,(e,t)=>{t&&es.has(String(t))&&b(`config`,w)});return E.on(`error`,()=>void 0),te(w),yield h,{close:()=>$(void 0,void 0,void 0,function*(){E.close(),T();for(let e of g.values())clearTimeout(e);yield h,yield u?.close()})}});export{Vn as C,yr as S,Ti as _,Vo as a,Qr as b,ta as c,Ei as d,ui as f,wi as g,_i as h,Yo as i,Ji as l,vi as m,Zo as n,Io as o,Pi as p,fs as r,La as s,Xo as t,Fi as u,V as v,Wr as x,ii as y};
|