@mintlify/cli 4.1.38 → 4.1.39
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/start.js +38 -38
- package/package.json +5 -5
package/dist/start.js
CHANGED
|
@@ -866,7 +866,7 @@ A.isNotRelative=ee,A.convert=e=>e;var te=class{constructor({ignorecase:e=!0,igno
|
|
|
866
866
|
`:`
|
|
867
867
|
`)+n,i=r+1,r=e.indexOf(`
|
|
868
868
|
`,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:vYe,stderr:yYe}=hYe,RP=Symbol(`GENERATOR`),zP=Symbol(`STYLER`),BP=Symbol(`IS_EMPTY`),bYe=[`ansi`,`ansi`,`ansi256`,`ansi16m`],VP=Object.create(null),xYe=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=vYe?vYe.level:0;e.level=t.level===void 0?n:t.level},SYe=e=>{let t=(...e)=>e.join(` `);return xYe(t,e),Object.setPrototypeOf(t,HP.prototype),t};function HP(e){return SYe(e)}Object.setPrototypeOf(HP.prototype,Function.prototype);for(let[e,t]of Object.entries(PP))VP[e]={get(){let n=GP(this,WP(t.open,t.close,this[zP]),this[BP]);return Object.defineProperty(this,e,{value:n}),n}};VP.visible={get(){let e=GP(this,this[zP],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const UP=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?PP[n].ansi16m(...r):t===`ansi256`?PP[n].ansi256(PP.rgbToAnsi256(...r)):PP[n].ansi(PP.rgbToAnsi(...r)):e===`hex`?UP(`rgb`,t,n,...PP.hexToRgb(...r)):PP[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){VP[e]={get(){let{level:t}=this;return function(...n){let r=WP(UP(e,bYe[t],`color`,...n),PP.color.close,this[zP]);return GP(this,r,this[BP])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);VP[t]={get(){let{level:t}=this;return function(...n){let r=WP(UP(e,bYe[t],`bgColor`,...n),PP.bgColor.close,this[zP]);return GP(this,r,this[BP])}}}}const CYe=Object.defineProperties(()=>{},{...VP,level:{enumerable:!0,get(){return this[RP].level},set(e){this[RP].level=e}}}),WP=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},GP=(e,t,n)=>{let r=(...e)=>wYe(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,CYe),r[RP]=e,r[zP]=t,r[BP]=n,r},wYe=(e,t)=>{if(e.level<=0||!t)return e[BP]?``:t;let n=e[zP];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=gYe(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
|
|
869
|
-
`);return a!==-1&&(t=_Ye(t,i,r,a)),r+t+i};Object.defineProperties(HP.prototype,VP);const KP=HP();HP({level:yYe?yYe.level:0});let qP=[],TYe=!1;const EYe=()=>{qP=[]},DYe=e=>{TYe=e},OYe=()=>[...qP],JP=e=>{qP.push(e),TYe||console.log(KP.yellow.bold(`warning`)+` - `+e.message)},kYe=(e,t)=>{JP({type:`parse-error`,message:e.trim(),...t})};var AYe=class extends Error{};const jYe=e=>{if(e&&
|
|
869
|
+
`);return a!==-1&&(t=_Ye(t,i,r,a)),r+t+i};Object.defineProperties(HP.prototype,VP);const KP=HP();HP({level:yYe?yYe.level:0});let qP=[],TYe=!1;const EYe=()=>{qP=[]},DYe=e=>{TYe=e},OYe=()=>[...qP],JP=e=>{qP.push(e),TYe||console.log(KP.yellow.bold(`warning`)+` - `+e.message)},kYe=(e,t)=>{JP({type:`parse-error`,message:e.trim(),...t})};var AYe=class extends Error{};const jYe=e=>{let t=qP.filter(({notice:e})=>!e);if(e&&t.length>0)throw new AYe(`Build validation failed with ${t.length} warning(s). See above for details.`)},MYe=(e,t)=>(JP({type:`missing-nav-page`,message:`"${e}" is referenced in the ${t}.json navigation but the file does not exist.`,file:`${t}.json`,ref:e}),{title:Ah(e),href:Dh(e)}),NYe=(e,t)=>{let n=t=>({...t,pages:t.pages.map(t=>typeof t==`string`?(e[kh(ak(t))]??e[t])||MYe(t,`mint`):n(t))});return t.map(e=>n(e))},YP=(e,t)=>{let{global:n,...r}=t,i=(e,t)=>{if(!t||e.hidden!==!0)return e;let{hidden:n,...r}=e;return r},a=(t,n)=>{let r=e[kh(ak(t))]??e[t];return r?i(r,n):MYe(t,`docs`)},o=(e,t=!1)=>{let n={...e},r=`hidden`in n&&typeof n.hidden==`boolean`?n.hidden:t;if(`openapi`in n){let{openapi:e,...t}=n;n={...t}}if(`root`in n&&typeof n.root==`string`&&(n.root=a(n.root,r)),`pages`in n){let e=n.pages.map(e=>typeof e==`string`?a(e,r):o(e,r));n.pages=e}return[`groups`,...Ss].forEach(e=>{let t=n[e];Array.isArray(t)&&(n={...n,[e]:t.map(e=>o(e,r))})}),n};return{global:n,...o(r)}},PYe=/\.mdx?$/i,FYe=/* @__PURE__ */ new Set([`node_modules`,`snippets`]),IYe=[`index`,`readme`],LYe=e=>PYe.test(e)&&e.split(`/`).every(e=>!e.startsWith(`.`)&&!e.startsWith(`_`)&&!FYe.has(e)),XP=(e,t)=>{let n=e=>{let t=IYe.indexOf(vt.posix.basename(e).toLowerCase());return t===-1?IYe.length:t};return n(e)-n(t)||e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})},RYe=e=>Ah(e.replace(/^\d+[-_.\s]+/,``)),zYe=e=>[...[...e.pages].sort(XP),...[...e.folders.entries()].sort(([e],[t])=>XP(e,t)).map(([e,t])=>({group:RYe(e),pages:zYe(t)}))],BYe=(e,t)=>{let n={pages:[],folders:/* @__PURE__ */ new Map};for(let t of e.map(e=>e.replaceAll(`\\`,`/`))){if(!LYe(t))continue;let e=t.replace(PYe,``).split(`/`),r=e.join(`/`),i=n;for(let t of e.slice(0,-1)){let e=i.folders.get(t);e||(e={pages:[],folders:/* @__PURE__ */ new Map},i.folders.set(t,e)),i=e}i.pages.push(r)}let r=[];n.pages.length&&r.push({group:`Introduction`,pages:[...n.pages].sort(XP)});for(let[e,t]of[...n.folders.entries()].sort(([e],[t])=>XP(e,t)))r.push({group:RYe(e),pages:zYe(t)});return{$schema:`https://mintlify.com/docs.json`,theme:`mint`,name:t,colors:{primary:`#16A34A`},navigation:{groups:r}}};var ZP=/* @__PURE__ */ a((e=>{e.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]==`function`)e.apply(this,t);else return new Promise((n,r)=>{e.call(this,...t,(e,t)=>e==null?n(t):r(e))})},"name",{value:e.name})},e.fromPromise=function(e){return Object.defineProperty(function(...t){let n=t[t.length-1];if(typeof n!=`function`)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(e=>n(null,e),n)},"name",{value:e.name})}})),VYe=/* @__PURE__ */ a(((e,n)=>{var r=t(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}n.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){c&&(c.code===`EACCES`||c.code===`EPERM`)&&Date.now()-a<6e4?(setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10)):i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){t?i&&i(t):e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){t?a&&a(t):e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!(e&&e.code!==`ENOSYS`&&(process.getuid&&process.getuid()===0||e.code!==`EINVAL`&&e.code!==`EPERM`))}}})),HYe=/* @__PURE__ */ a(((e,n)=>{var r=t(`stream`).Stream;n.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=65536,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}this.fd===null?e.open(this.path,this.flags,this.mode,function(e,t){e?(a.emit(`error`,e),a.readable=!1):(a.fd=t,a.emit(`open`,t),a._read())}):process.nextTick(function(){a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),UYe=/* @__PURE__ */ a(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),QP=/* @__PURE__ */ a(((e,n)=>{var r=t(`fs`),i=VYe(),a=HYe(),o=UYe(),s=t(`util`),c,l;
|
|
870
870
|
/* istanbul ignore else - node 0.x polyfill */
|
|
871
871
|
typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),l=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,l=`___graceful-fs.previous`);function u(){}function d(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var f=u;s.debuglog?f=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(f=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
872
872
|
GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){function t(t,n){return e.call(r,t,function(e){e||g(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,l,{value:e}),t})(r.close),r.closeSync=(function(e){function t(t){e.apply(r,arguments),g()}return Object.defineProperty(t,l,{value:e}),t})(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){f(r[c]),t(`assert`).equal(r[c].length,0)})),global[c]||d(global,r[c]),n.exports=p(o(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(n.exports=p(r),r.__patched=!0);function p(e){i(e),e.gracefulify=p,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?m([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=a(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,"ReadStream",{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,"FileWriteStream",{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){f(`ENQUEUE`,e[0].name,e[1]),r[c].push(e),_()}var h;function g(){for(var e=Date.now(),t=0;t<r[c].length;++t)r[c][t].length>2&&(r[c][t][3]=e,r[c][t][4]=e);_()}function _(){if(clearTimeout(h),h=void 0,r[c].length!==0){var e=r[c].shift(),t=e[0],n=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)f(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){f(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(f(`RETRY`,t.name,n),t.apply(null,n.concat([a]))):r[c].push(e)}h===void 0&&(h=setTimeout(_,0))}}})),$P=/* @__PURE__ */ a((e=>{let t=ZP().fromCallback,n=QP(),r=(/* @__PURE__ */ `access.appendFile.chmod.chown.close.copyFile.fchmod.fchown.fdatasync.fstat.fsync.ftruncate.futimes.lchmod.lchown.link.lstat.mkdir.mkdtemp.open.opendir.readdir.readFile.readlink.realpath.rename.rm.rmdir.stat.symlink.truncate.unlink.utimes.writeFile`.split(`.`)).filter(e=>typeof n[e]==`function`);Object.assign(e,n),r.forEach(r=>{e[r]=t(n[r])}),e.exists=function(e,t){return typeof t==`function`?n.exists(e,t):new Promise(t=>n.exists(e,t))},e.read=function(e,t,r,i,a,o){return typeof o==`function`?n.read(e,t,r,i,a,o):new Promise((o,s)=>{n.read(e,t,r,i,a,(e,t,n)=>{if(e)return s(e);o({bytesRead:t,buffer:n})})})},e.write=function(e,t,...r){return typeof r[r.length-1]==`function`?n.write(e,t,...r):new Promise((i,a)=>{n.write(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesWritten:t,buffer:n})})})},e.readv=function(e,t,...r){return typeof r[r.length-1]==`function`?n.readv(e,t,...r):new Promise((i,a)=>{n.readv(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesRead:t,buffers:n})})})},e.writev=function(e,t,...r){return typeof r[r.length-1]==`function`?n.writev(e,t,...r):new Promise((i,a)=>{n.writev(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesWritten:t,buffers:n})})})},typeof n.realpath.native==`function`?e.realpath.native=t(n.realpath.native):process.emitWarning(`fs.realpath.native is not a function. Is fs being monkey-patched?`,`Warning`,`fs-extra-WARN0003`)})),WYe=/* @__PURE__ */ a(((e,n)=>{let r=t(`path`);n.exports.checkPath=function(e){if(process.platform===`win32`&&/[<>:"|?*]/.test(e.replace(r.parse(e).root,``))){let t=/* @__PURE__ */ Error(`Path contains invalid characters: ${e}`);throw t.code=`EINVAL`,t}}})),GYe=/* @__PURE__ */ a(((e,t)=>{let n=$P(),{checkPath:r}=WYe(),i=e=>typeof e==`number`?e:{mode:511,...e}.mode;t.exports.makeDir=async(e,t)=>(r(e),n.mkdir(e,{mode:i(t),recursive:!0})),t.exports.makeDirSync=(e,t)=>(r(e),n.mkdirSync(e,{mode:i(t),recursive:!0}))})),eF=/* @__PURE__ */ a(((e,t)=>{let n=ZP().fromPromise,{makeDir:r,makeDirSync:i}=GYe(),a=n(r);t.exports={mkdirs:a,mkdirsSync:i,mkdirp:a,mkdirpSync:i,ensureDir:a,ensureDirSync:i}})),tF=/* @__PURE__ */ a(((e,t)=>{let n=ZP().fromPromise,r=$P();function i(e){return r.access(e).then(()=>!0).catch(()=>!1)}t.exports={pathExists:n(i),pathExistsSync:r.existsSync}})),KYe=/* @__PURE__ */ a(((e,t)=>{let n=QP();function r(e,t,r,i){n.open(e,`r+`,(e,a)=>{if(e)return i(e);n.futimes(a,t,r,e=>{n.close(a,t=>{i&&i(e||t)})})})}function i(e,t,r){let i=n.openSync(e,`r+`);return n.futimesSync(i,t,r),n.closeSync(i)}t.exports={utimesMillis:r,utimesMillisSync:i}})),nF=/* @__PURE__ */ a(((e,n)=>{let r=$P(),i=t(`path`),a=t(`util`);function o(e,t,n){let i=n.dereference?e=>r.stat(e,{bigint:!0}):e=>r.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch(e=>{if(e.code===`ENOENT`)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function s(e,t,n){let i,a=n.dereference?e=>r.statSync(e,{bigint:!0}):e=>r.lstatSync(e,{bigint:!0}),o=a(e);try{i=a(t)}catch(e){if(e.code===`ENOENT`)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}function c(e,t,n,r,s){a.callbackify(o)(e,t,r,(r,a)=>{if(r)return s(r);let{srcStat:o,destStat:c}=a;if(c){if(f(o,c)){let r=i.basename(e),a=i.basename(t);return n===`move`&&r!==a&&r.toLowerCase()===a.toLowerCase()?s(null,{srcStat:o,destStat:c,isChangingCase:!0}):s(/* @__PURE__ */ Error(`Source and destination must not be the same.`))}if(o.isDirectory()&&!c.isDirectory())return s(/* @__PURE__ */ Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!o.isDirectory()&&c.isDirectory())return s(/* @__PURE__ */ Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return o.isDirectory()&&p(e,t)?s(Error(m(e,t,n))):s(null,{srcStat:o,destStat:c})})}function l(e,t,n,r){let{srcStat:a,destStat:o}=s(e,t,r);if(o){if(f(a,o)){let r=i.basename(e),s=i.basename(t);if(n===`move`&&r!==s&&r.toLowerCase()===s.toLowerCase())return{srcStat:a,destStat:o,isChangingCase:!0};throw Error(`Source and destination must not be the same.`)}if(a.isDirectory()&&!o.isDirectory())throw Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&o.isDirectory())throw Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&p(e,t))throw Error(m(e,t,n));return{srcStat:a,destStat:o}}function u(e,t,n,a,o){let s=i.resolve(i.dirname(e)),c=i.resolve(i.dirname(n));if(c===s||c===i.parse(c).root)return o();r.stat(c,{bigint:!0},(r,i)=>r?r.code===`ENOENT`?o():o(r):f(t,i)?o(Error(m(e,n,a))):u(e,t,c,a,o))}function d(e,t,n,a){let o=i.resolve(i.dirname(e)),s=i.resolve(i.dirname(n));if(s===o||s===i.parse(s).root)return;let c;try{c=r.statSync(s,{bigint:!0})}catch(e){if(e.code===`ENOENT`)return;throw e}if(f(t,c))throw Error(m(e,n,a));return d(e,t,s,a)}function f(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function p(e,t){let n=i.resolve(e).split(i.sep).filter(e=>e),r=i.resolve(t).split(i.sep).filter(e=>e);return n.reduce((e,t,n)=>e&&r[n]===t,!0)}function m(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}n.exports={checkPaths:c,checkPathsSync:l,checkParentPaths:u,checkParentPathsSync:d,isSrcSubdir:p,areIdentical:f}})),qYe=/* @__PURE__ */ a(((e,n)=>{let r=QP(),i=t(`path`),a=eF().mkdirs,o=tF().pathExists,s=KYe().utimesMillis,c=nF();function l(e,t,n,r){typeof n==`function`&&!r?(r=n,n={}):typeof n==`function`&&(n={filter:n}),r||=function(){},n||={},n.clobber=`clobber`in n?!!n.clobber:!0,n.overwrite=`overwrite`in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch===`ia32`&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
@@ -976,65 +976,65 @@ let i=t.operationTypes??[];for(let t of i){let i=t.operation,a=n[i];r[i]?e.repor
|
|
|
976
976
|
`))}function _4e(e,t,n){let r=[],i=Object.create(null),a=[],o,s=[];for(let e of t.definitions)if(e.kind===_I.SCHEMA_DEFINITION)o=e;else if(e.kind===_I.SCHEMA_EXTENSION)s.push(e);else if(BL(e))r.push(e);else if(VL(e)){let t=e.name.value,n=i[t];i[t]=n?n.concat([e]):[e]}else e.kind===_I.DIRECTIVE_DEFINITION&&a.push(e);if(Object.keys(i).length===0&&r.length===0&&a.length===0&&s.length===0&&o==null)return e;let c=Object.create(null);for(let t of e.types)c[t.name]=p(t);for(let e of r){let t=e.name.value;c[t]=v4e[t]??te(e)}let l={query:e.query&&d(e.query),mutation:e.mutation&&d(e.mutation),subscription:e.subscription&&d(e.subscription),...o&&S([o]),...S(s)};return{description:o?.description?.value,...l,types:Object.values(c),directives:[...e.directives.map(f),...a.map(T)],extensions:Object.create(null),astNode:o??e.astNode,extensionASTNodes:e.extensionASTNodes.concat(s),assumeValid:n?.assumeValid??!1};function u(e){return tL(e)?new sL(u(e.ofType)):nL(e)?new cL(u(e.ofType)):d(e)}function d(e){return c[e.name]}function f(e){let t=e.toConfig();return new TL({...t,args:FI(t.args,x)})}function p(e){if(O0e(e)||h0e(e))return e;if(YI(e))return g(e);if(XI(e))return _(e);if(ZI(e))return v(e);if(QI(e))return y(e);if($I(e))return h(e);if(eL(e))return m(e);
|
|
977
977
|
/* c8 ignore next 3 */
|
|
978
978
|
dI(!1,`Unexpected type: `+OI(e))}function m(e){let t=e.toConfig(),n=i[t.name]??[];return new yL({...t,fields:()=>({...FI(t.fields,e=>({...e,type:u(e.type)})),...O(n)}),extensionASTNodes:t.extensionASTNodes.concat(n)})}function h(e){let t=e.toConfig(),n=i[e.name]??[];return new _L({...t,values:{...t.values,...k(n)},extensionASTNodes:t.extensionASTNodes.concat(n)})}function g(e){let t=e.toConfig(),n=i[t.name]??[],r=t.specifiedByURL;for(let e of n)r=y4e(e)??r;return new dL({...t,specifiedByURL:r,extensionASTNodes:t.extensionASTNodes.concat(n)})}function _(e){let t=e.toConfig(),n=i[t.name]??[];return new fL({...t,interfaces:()=>[...e.getInterfaces().map(d),...A(n)],fields:()=>({...FI(t.fields,b),...E(n)}),extensionASTNodes:t.extensionASTNodes.concat(n)})}function v(e){let t=e.toConfig(),n=i[t.name]??[];return new hL({...t,interfaces:()=>[...e.getInterfaces().map(d),...A(n)],fields:()=>({...FI(t.fields,b),...E(n)}),extensionASTNodes:t.extensionASTNodes.concat(n)})}function y(e){let t=e.toConfig(),n=i[t.name]??[];return new gL({...t,types:()=>[...e.getTypes().map(d),...ee(n)],extensionASTNodes:t.extensionASTNodes.concat(n)})}function b(e){return{...e,type:u(e.type),args:e.args&&FI(e.args,x)}}function x(e){return{...e,type:u(e.type)}}function S(e){let t={};for(let n of e){let e=n.operationTypes??[];for(let n of e)t[n.operation]=C(n.type)}return t}function C(e){let t=e.name.value,n=v4e[t]??c[t];if(n===void 0)throw Error(`Unknown type: "${t}".`);return n}function w(e){return e.kind===_I.LIST_TYPE?new sL(w(e.type)):e.kind===_I.NON_NULL_TYPE?new cL(w(e.type)):C(e)}function T(e){return new TL({name:e.name.value,description:e.description?.value,locations:e.locations.map(({value:e})=>e),isRepeatable:e.repeatable,args:D(e.arguments),astNode:e})}function E(e){let t=Object.create(null);for(let n of e){let e=n.fields??[];for(let n of e)t[n.name.value]={type:w(n.type),description:n.description?.value,args:D(n.arguments),deprecationReason:tR(n),astNode:n}}return t}function D(e){let t=e??[],n=Object.create(null);for(let e of t){let t=w(e.type);n[e.name.value]={type:t,description:e.description?.value,defaultValue:YL(e.defaultValue,t),deprecationReason:tR(e),astNode:e}}return n}function O(e){let t=Object.create(null);for(let n of e){let e=n.fields??[];for(let n of e){let e=w(n.type);t[n.name.value]={type:e,description:n.description?.value,defaultValue:YL(n.defaultValue,e),deprecationReason:tR(n),astNode:n}}}return t}function k(e){let t=Object.create(null);for(let n of e){let e=n.values??[];for(let n of e)t[n.name.value]={description:n.description?.value,deprecationReason:tR(n),astNode:n}}return t}function A(e){return e.flatMap(e=>e.interfaces?.map(C)??[])}function ee(e){return e.flatMap(e=>e.types?.map(C)??[])}function te(e){let t=e.name.value,n=i[t]??[];switch(e.kind){case _I.OBJECT_TYPE_DEFINITION:{let r=[e,...n];return new fL({name:t,description:e.description?.value,interfaces:()=>A(r),fields:()=>E(r),astNode:e,extensionASTNodes:n})}case _I.INTERFACE_TYPE_DEFINITION:{let r=[e,...n];return new hL({name:t,description:e.description?.value,interfaces:()=>A(r),fields:()=>E(r),astNode:e,extensionASTNodes:n})}case _I.ENUM_TYPE_DEFINITION:{let r=[e,...n];return new _L({name:t,description:e.description?.value,values:k(r),astNode:e,extensionASTNodes:n})}case _I.UNION_TYPE_DEFINITION:{let r=[e,...n];return new gL({name:t,description:e.description?.value,types:()=>ee(r),astNode:e,extensionASTNodes:n})}case _I.SCALAR_TYPE_DEFINITION:return new dL({name:t,description:e.description?.value,specifiedByURL:y4e(e),astNode:e,extensionASTNodes:n});case _I.INPUT_OBJECT_TYPE_DEFINITION:{let r=[e,...n];return new yL({name:t,description:e.description?.value,fields:()=>O(r),astNode:e,extensionASTNodes:n,isOneOf:b4e(e)})}}}}const v4e=NI([...CL,...NL],e=>e.name);function tR(e){return XL(EL,e)?.reason}function y4e(e){return XL(y0e,e)?.url}function b4e(e){return!!XL(b0e,e)}function x4e(e,t){e!=null&&e.kind===_I.DOCUMENT||lI(!1,`Must provide valid Document AST.`),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&g4e(e);let n=_4e({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(n.astNode==null)for(let e of n.types)switch(e.name){case`Query`:n.query=e;break;case`Mutation`:n.mutation=e;break;case`Subscription`:n.subscription=e}let r=[...n.directives,...DL.filter(e=>n.directives.every(t=>t.name!==e.name))];return new j0e({...n,directives:r})}function S4e(e,t){return x4e(M1e(e,{noLocation:t?.noLocation,allowLegacyFragmentVariables:t?.allowLegacyFragmentVariables}),{assumeValidSDL:t?.assumeValidSDL,assumeValid:t?.assumeValid})}const nR=e=>!e.startsWith(`__`),rR=e=>e==null?{}:{description:e},iR=e=>e==null?{}:{deprecationReason:e};function aR(e){return nL(e)?{kind:`nonNull`,ofType:aR(e.ofType)}:tL(e)?{kind:`list`,ofType:aR(e.ofType)}:{kind:`named`,name:e.name}}function C4e(e){let t=e.astNode?.defaultValue;return{name:e.name,type:aR(e.type),...rR(e.description),...t===void 0?{}:{defaultValue:KI(t),defaultValueLiteral:VI(t)},...iR(e.deprecationReason)}}function w4e(e){return{name:e.name,type:aR(e.type),...rR(e.description),arguments:e.args.filter(({name:e})=>nR(e)).map(C4e),...iR(e.deprecationReason)}}function T4e(e){let t=S4e(e),n=M0e(t);if(n.length>0)throw Error(n.map(({message:e})=>e).join(`
|
|
979
|
-
`));let r=[];for(let e of Object.values(t.getTypeMap())){if(!nR(e.name)||YI(e)&&h0e(e))continue;let n={name:e.name,...rR(e.description)};XI(e)?r.push({kind:`object`,...n,fields:Object.values(e.getFields()).filter(({name:e})=>nR(e)).map(w4e),interfaces:e.getInterfaces().map(({name:e})=>e)}):eL(e)?r.push({kind:`input`,...n,fields:Object.values(e.getFields()).filter(({name:e})=>nR(e)).map(C4e)}):$I(e)?r.push({kind:`enum`,...n,values:e.getValues().filter(({name:e})=>nR(e)).map(e=>({name:e.name,...rR(e.description),...iR(e.deprecationReason)}))}):ZI(e)?r.push({kind:`interface`,...n,fields:Object.values(e.getFields()).filter(({name:e})=>nR(e)).map(w4e),interfaces:e.getInterfaces().map(({name:e})=>e),possibleTypes:t.getPossibleTypes(e).map(({name:e})=>e)}):QI(e)?r.push({kind:`union`,...n,possibleTypes:e.getTypes().map(({name:e})=>e)}):YI(e)&&r.push({kind:`scalar`,...n})}let i=t.getQueryType(),a=t.getMutationType(),o=t.getSubscriptionType();return{...i==null?{}:{queryType:i.name},...a==null?{}:{mutationType:a.name},...o==null?{}:{subscriptionType:o.name},types:r}}const E4e=e=>()=>t=>{p(t,`element`,t=>{if(t.tagName!==`a`||typeof t.properties?.href!=`string`)return;let n=e(t.properties.href);n===void 0?delete t.properties.href:t.properties.href=n})};function oR(e,t){let n=AF.vendor;AF.vendor??=`gitbook`;try{return D4e(e,t)}finally{AF.vendor=n}}function D4e(e,t){let n=Je().use(_$e).use(x$e);return t&&n.use(E4e(t)),
|
|
980
|
-
`),r=Je().use(Xe).use(zg).parse(n);return p(r,`html`,(e,t,n)=>{let r=M4e(e.value);if(!n||t===void 0||n.type===`paragraph`||n.type===`heading`){Object.assign(e,{type:`text`,value:r});return}let i=r.split(/\n[ \t]*\n/).map(e=>e.trim()).filter(Boolean).map(e=>({type:`paragraph`,children:[{type:`text`,value:e}],data:{htmlBlock:!0}}));return n.children.splice(t,1,...i),t+i.length}),p(r,`paragraph`,e=>{e.children=P4e(e.children)}),j4e(r),t&&p(r,`heading`,e=>{e.depth=e.depth<t?t:e.depth}),r}function M4e(e){let t=``,n=0,r=-1;for(let i=0;i<e.length;i+=1)e[i]===`<`&&r===-1?r=i:e[i]===`>`&&r!==-1&&(t+=e.slice(n,r),n=i+1,r=-1);return t+e.slice(n)}function N4e(e){return e.data?.htmlBlock===!0}function P4e(e){let t=[];for(let n of e){let e=t[t.length-1];n.type===`text`&&e?.type===`text`?e.value+=n.value:(n.type!==`text`||n.value!==``)&&t.push(n)}let n=t[0];n?.type===`text`&&(n.value=n.value.trimStart());let r=t[t.length-1];return r?.type===`text`&&(r.value=r.value.trimEnd()),t.filter(e=>e.type!==`text`||e.value!==``)}function cR(e){return e.type===`text`||e.type===`inlineCode`?e.value:e.type===`break`?` `:e.type===`image`||e.type===`imageReference`?e.alt??``:`children`in e?e.children.map(cR).join(``):``}function F4e(e){return e.children.some(e=>e.type===`text`&&e.value.trim()!==``||e.type===`inlineCode`||(e.type===`emphasis`||e.type===`strong`||e.type===`delete`)&&cR(e).trim()!==``)}function
|
|
979
|
+
`));let r=[];for(let e of Object.values(t.getTypeMap())){if(!nR(e.name)||YI(e)&&h0e(e))continue;let n={name:e.name,...rR(e.description)};XI(e)?r.push({kind:`object`,...n,fields:Object.values(e.getFields()).filter(({name:e})=>nR(e)).map(w4e),interfaces:e.getInterfaces().map(({name:e})=>e)}):eL(e)?r.push({kind:`input`,...n,fields:Object.values(e.getFields()).filter(({name:e})=>nR(e)).map(C4e)}):$I(e)?r.push({kind:`enum`,...n,values:e.getValues().filter(({name:e})=>nR(e)).map(e=>({name:e.name,...rR(e.description),...iR(e.deprecationReason)}))}):ZI(e)?r.push({kind:`interface`,...n,fields:Object.values(e.getFields()).filter(({name:e})=>nR(e)).map(w4e),interfaces:e.getInterfaces().map(({name:e})=>e),possibleTypes:t.getPossibleTypes(e).map(({name:e})=>e)}):QI(e)?r.push({kind:`union`,...n,possibleTypes:e.getTypes().map(({name:e})=>e)}):YI(e)&&r.push({kind:`scalar`,...n})}let i=t.getQueryType(),a=t.getMutationType(),o=t.getSubscriptionType();return{...i==null?{}:{queryType:i.name},...a==null?{}:{mutationType:a.name},...o==null?{}:{subscriptionType:o.name},types:r}}const E4e=e=>()=>t=>{p(t,`element`,t=>{if(t.tagName!==`a`||typeof t.properties?.href!=`string`)return;let n=e(t.properties.href);n===void 0?delete t.properties.href:t.properties.href=n})};function oR(e,t){let n=AF.vendor;AF.vendor??=`gitbook`;try{return D4e(e,t)}finally{AF.vendor=n}}function D4e(e,t){let n=Je().use(_$e).use(x$e);return t&&n.use(E4e(t)),dR(n.use(h$e).use(p$e).use(m$e).use(y$e).use(T$e).use(F$e).use(n$e).use(g$e).use(cZe).use(N$e).use(j$e).use(C$e).use(D$e).runSync(e))}function O4e(e,t){let n=cI(e);return sI(n),oR(n,t)}const k4e={NOTE:`Note`,TIP:`Tip`,IMPORTANT:`Info`,WARNING:`Warning`,CAUTION:`Danger`},A4e=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\][ \t]*(\n|$)/i;function j4e(e){p(e,`blockquote`,(e,t,n)=>{if(!n||t===void 0)return;let[r]=e.children;if(r?.type!==`paragraph`)return;let[i]=r.children;if(i?.type!==`text`)return;let a=A4e.exec(i.value),o=a?.[1]?k4e[a[1].toUpperCase()]:void 0;if(!a||!o)return;let s=r.children[1];if(a[2]===``&&s!==void 0&&s.type!==`break`)return;i.value=i.value.slice(a[0].length),i.value===``&&r.children.shift(),r.children[0]?.type===`break`&&r.children.shift();let c={type:`mdxJsxFlowElement`,name:o,attributes:[],children:r.children.length>0?e.children:e.children.slice(1)};n.children.splice(t,1,c)})}function sR(e,t){let n=e.replace(/\r\n?/g,`
|
|
980
|
+
`),r=Je().use(Xe).use(zg).parse(n);return p(r,`html`,(e,t,n)=>{let r=M4e(e.value);if(!n||t===void 0||n.type===`paragraph`||n.type===`heading`){Object.assign(e,{type:`text`,value:r});return}let i=r.split(/\n[ \t]*\n/).map(e=>e.trim()).filter(Boolean).map(e=>({type:`paragraph`,children:[{type:`text`,value:e}],data:{htmlBlock:!0}}));return n.children.splice(t,1,...i),t+i.length}),p(r,`paragraph`,e=>{e.children=P4e(e.children)}),j4e(r),t&&p(r,`heading`,e=>{e.depth=e.depth<t?t:e.depth}),r}function M4e(e){let t=``,n=0,r=-1;for(let i=0;i<e.length;i+=1)e[i]===`<`&&r===-1?r=i:e[i]===`>`&&r!==-1&&(t+=e.slice(n,r),n=i+1,r=-1);return t+e.slice(n)}function N4e(e){return e.data?.htmlBlock===!0}function P4e(e){let t=[];for(let n of e){let e=t[t.length-1];n.type===`text`&&e?.type===`text`?e.value+=n.value:(n.type!==`text`||n.value!==``)&&t.push(n)}let n=t[0];n?.type===`text`&&(n.value=n.value.trimStart());let r=t[t.length-1];return r?.type===`text`&&(r.value=r.value.trimEnd()),t.filter(e=>e.type!==`text`||e.value!==``)}function cR(e){return e.type===`text`||e.type===`inlineCode`?e.value:e.type===`break`?` `:e.type===`image`||e.type===`imageReference`?e.alt??``:`children`in e?e.children.map(cR).join(``):``}function F4e(e){return e.children.some(e=>e.type===`text`&&e.value.trim()!==``||e.type===`inlineCode`||(e.type===`emphasis`||e.type===`strong`||e.type===`delete`)&&cR(e).trim()!==``)}function lR(e,t){let n=/* @__PURE__ */ new Set;p(e,[`link`,`image`,`definition`],(e,r,i)=>{let a=e,o=t(a);if(o!==void 0)a.url=o;else if(a.type===`definition`&&n.add(a.identifier),i&&r!==void 0){let e=a.type===`link`?a.children:a.type===`image`?[{type:`text`,value:a.alt??``}]:[];return i.children.splice(r,1,...e),r+e.length}}),n.size!==0&&p(e,[`linkReference`,`imageReference`],(e,t,r)=>{let i=e;if(!n.has(i.identifier)||!r||t===void 0)return;let a=i.type===`linkReference`?i.children:[{type:`text`,value:i.alt??``}];return r.children.splice(t,1,...a),t+a.length})}function uR(e,t){return dR(sR(e,t))}function I4e(e){p(e,`paragraph`,e=>{let t=e.children[0];if(t?.type!==`text`)return;let n=/^(import|export)(?=\s|$)/.exec(t.value);n&&(t.value=t.value.slice(1),e.children.unshift({type:`html`,value:`&#${n[0].charCodeAt(0)};`}))})}function dR(e){let t=structuredClone(e);p(t,`paragraph`,e=>{e.children=P4e(e.children)}),I4e(t);let n=Je().use(sZe).use(zg).use(De).stringify(t);return String(n).replace(/\n{3,}/g,`
|
|
981
981
|
|
|
982
|
-
`).trim()}function
|
|
983
|
-
`))}function
|
|
982
|
+
`).trim()}function L4e(e){return uR(e.replace(/\r\n/g,`
|
|
983
|
+
`))}function fR(e){return`{${JSON.stringify(e)}}`}function pR(e,t,n,r,i,a){let o=a?` id=${fR(a)}`:``,s=t?` type=${fR(_R(t,80))}`:``,c=i?` typeHref=${fR(i)}`:``,l=n?``:` required`;return`<ResponseField name=${fR(e)}${o}${s}${c}${l}>\n${H4e(r||``)}\n</ResponseField>`}function R4e(e){return mR(e).replace(/[\\`*_{}[\]<>]/g,`\\$&`)}function mR(e){return e.replace(/[\r\n]+[ \t]*/g,` `)}const z4e=/^(?:https?|mailto):/i;function hR(e){let t=e.replace(/[\u0000-\u0020\u007f]/g,``),n=B4e(e).replace(/[\t\n\r]/g,``);if(t===``||t.startsWith(`#`))return n;if(!/&[#a-z]/i.test(t.replace(/^[\\/]+/,``).split(/[/?#]/,1)[0]??``))return/^[a-z][a-z0-9+.-]*:/i.test(t)||/^[\\/][\\/]/.test(t)||t.startsWith(`\\`)?z4e.test(t)?n:void 0:n}function B4e(e){let t=0,n=e.length;for(;t<n&&e.charCodeAt(t)<=32;)t+=1;for(;n>t&&e.charCodeAt(n-1)<=32;)--n;return e.slice(t,n)}function V4e(e){return e.split(`/`).map(e=>encodeURIComponent(e).replace(/[()!'*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)).join(`/`)}function gR(e){if(!e.some(e=>e.href))return;let t=[];for(let n of e){let e=t.at(-1);e&&!e.href&&!n.href?e.text+=n.text:t.push({...n})}return`<code>${t.map(e=>e.href?`[${R4e(e.text)}](${e.href})`:fR(mR(e.text))).join(``)}</code>`}function H4e(e){return e.split(`
|
|
984
984
|
`).map(e=>e&&` ${e}`).join(`
|
|
985
|
-
`)}function
|
|
985
|
+
`)}function _R(e,t){return e.length>t?`${e.slice(0,t-1)}…`:e}function vR(e){let t=mR(e).trim();if(!t)return e;let n=Math.max(0,...(t.match(/`+/g)??[]).map(e=>e.length)),r="`".repeat(n+1),i=t.startsWith("`")||t.endsWith("`")?` `:``;return`${r}${i}${t}${i}${r}`}function yR(e,t){let n=[];for(let r of e)if(r.type===`text`)n.push({text:r.value.replace(/\s+/g,` `),href:t});else if(r.type===`element`){let e=t;r.tagName===`a`&&typeof r.properties.href==`string`&&(e=hR(r.properties.href)?.replace(/[\u0000-\u0020\u007f"'()[\]<>`{}\\]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`)}`)),n.push(...yR(r.children,e))}let r=[];for(let e of n){let t=r.at(-1);t&&t.href===e.href?t.text+=e.text:r.push({...e})}return r}function bR(e){let t=e.map(e=>e.text).join(``);return xR(e,t.length-t.trimStart().length,t.trimEnd().length)}function xR(e,t,n){let r=[],i=0;for(let a of e){let e=i+a.text.length;e>t&&i<n&&r.push({text:a.text.slice(Math.max(0,t-i),n-i),href:a.href}),i=e}return r}function SR(e,t,n=0,r=`([{`,i=`)]}`){let a=0,o,s=!1;for(let c=n;c<e.length;c+=1){let n=e[c]??``;if(s)s=!1;else if(o)n===`\\`?s=!0:n===o&&(o=void 0);else if(n===`"`||n===`'`)o=n;else if(r.includes(n))a+=1;else if(i.includes(n))a=Math.max(0,a-1);else if(n===t&&a===0)return c}return-1}function CR(e,t,n,r){let i=t.map(e=>e.text).join(``),a=t.length===1?t[0]?.href:void 0,o;return(!a||i.length>80)&&(o=gR(t)??(i.length>80?vR(i):void 0)),pR(e,i,n,[o&&`**Type:** ${o}`,r].filter(Boolean).join(`
|
|
986
986
|
|
|
987
|
-
`),a)}function
|
|
987
|
+
`),a)}function U4e(e,t,n){let r=[],i=0;for(let a of e.matchAll(t))a.index>i&&r.push({text:e.slice(i,a.index)}),r.push(n(a[0],a.index)),i=a.index+a[0].length;return i<e.length&&r.push({text:e.slice(i)}),r}function wR(e){let t=/* @__PURE__ */ new Map,n=e.map(({path:e,group:n})=>{let r={...n,pages:[...n.pages]};return e.length&&t.set(e.join(`\0`),r),{path:e,group:r}}),r=[];for(let{path:e,group:i}of n){let n;for(let r=e.length-1;r>0&&!n;--r)n=t.get(e.slice(0,r).join(`\0`));n?n.pages.push(i):r.push(i)}return r}const W4e=/* @__PURE__ */ new Set([`System.Object`,`System.ValueType`,`System.Enum`]),G4e={Class:`CLASS`,Interface:`INTERFACE`,Enum:`ENUM`,Struct:`STRUCT`,Delegate:`DELEGATE`};async function K4e(e){let t=await q4e(e),n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map;for(let e of t){for(let t of e.items??[])t.uid&&(n.set(t.uid,t),t.name&&r.set(t.uid,t.name));for(let t of e.references??[])t.uid&&t.name&&!r.has(t.uid)&&r.set(t.uid,t.name)}let i=[...n.values()].filter(e=>e.type!==void 0&&e.type in G4e).sort((e,t)=>(e.name??``).localeCompare(t.name??``)),a=X4e([...new Set(i.map(e=>e.namespace??``))].sort()),o=/* @__PURE__ */ new Map;for(let e of i)o.set(e.uid,Rt.posix.join(a.get(e.namespace??``)??``,TR(e.name??e.uid)));let s=new Z4e(o,r,n),{tocNamespaces:c,tocOrder:l}=await J4e(e),u=/* @__PURE__ */ new Map;for(let e of i){let t=e.namespace??``;u.set(t,[...u.get(t)??[],e])}let d=[...c.filter(e=>u.has(e)),...[...u.keys()].filter(e=>!c.includes(e)).sort()],f=[],p=[];for(let e of d){let t=Y4e(u.get(e)??[],l.get(e)??[]).map(e=>s.renderPage(e));f.push(...t),p.push({path:e?e.split(`.`):[],group:{group:e||`Reference`,pages:t.map(e=>e.slug)}})}return{pages:f,groups:wR(p)}}async function q4e(e){let t=await OF.default.readdir(e),n=[];for(let r of t.filter(e=>/\.ya?ml$/.test(e)).sort()){let t=await OF.default.readFile(Rt.join(e,r),`utf8`);if(!t.startsWith(`### YamlMime:ManagedReference`))continue;let i=ne.load(t);i&&typeof i==`object`&&n.push(i)}return n}async function J4e(e){let t=[],n=/* @__PURE__ */ new Map,r=Rt.join(e,`toc.yml`);if(!await OF.default.pathExists(r))return{tocNamespaces:t,tocOrder:n};let i=ne.load(await OF.default.readFile(r,`utf8`)),a=e=>{for(let r of e)r.type===`Namespace`&&r.uid!==void 0&&(t.push(r.uid),n.set(r.uid,(r.items??[]).map(e=>e.uid).filter(e=>typeof e==`string`))),r.items&&a(r.items)};return a(i?.items??[]),{tocNamespaces:t,tocOrder:n}}function Y4e(e,t){let n=new Map(t.map((e,t)=>[e,t]));return[...e].sort((e,t)=>{let r=n.get(e.uid),i=n.get(t.uid);return r!==void 0&&i!==void 0?r-i:r===void 0?i===void 0?(e.name??``).localeCompare(t.name??``):1:-1})}function X4e(e){let t=e.map(e=>e.split(`.`)),n=t[0]??[];for(let e of t.slice(1)){let t=0;for(;t<n.length&&n[t]===e[t];)t+=1;n=n.slice(0,t)}let r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Set;for(let[a,o]of e.entries()){let e=t[a]??[],s=e.slice(n.length),c=TR((s.length?s:e.slice(-1)).join(`-`)),l=i.has(c)?TR(e.join(`-`)):c;for(let t=2;i.has(l);t+=1)l=`${TR(e.join(`-`))}-${t}`;i.add(l),r.set(o,l)}return r}function TR(e){return e.toLowerCase().replace(/`+\d*/g,``).replace(/[^a-z0-9-_.]+/g,`-`).replace(/^-+|-+$/g,``)||`item`}var Z4e=class{constructor(e,t,n){this.slugByUid=e,this.namesByUid=t,this.itemsByUid=n}renderPage(e){let t=[this.prose(e.summary)];switch(e.syntax?.content&&t.push(this.codeBlock(e.syntax.content)),t.push(...this.renderHeritage(e)),t.push(this.prose(e.remarks)),t.push(...(e.example??[]).map(e=>this.renderExample(e))),e.type){case`Enum`:t.push(...this.renderEnum(e));break;case`Delegate`:t.push(...this.renderSignatureDetails(e.syntax,2));break;default:t.push(...this.renderTypeMembers(e))}return{slug:this.slugByUid.get(e.uid)??TR(e.name??e.uid),title:e.name??e.uid,description:this.firstSentence(e.summary),tag:G4e[e.type??``],content:t.filter(Boolean).join(`
|
|
988
988
|
|
|
989
|
-
`)}}members(e){return(e.children??[]).map(e=>this.itemsByUid.get(e)).filter(e=>e!==void 0)}renderTypeMembers(e){let t=this.members(e),n=[],r=t.filter(e=>e.type===`Constructor`),i=t.filter(e=>e.type===`Field`).sort(
|
|
989
|
+
`)}}members(e){return(e.children??[]).map(e=>this.itemsByUid.get(e)).filter(e=>e!==void 0)}renderTypeMembers(e){let t=this.members(e),n=[],r=t.filter(e=>e.type===`Constructor`),i=t.filter(e=>e.type===`Field`).sort($4e),a=t.filter(e=>e.type===`Property`||e.type===`Event`).sort($4e),o=t.filter(e=>e.type===`Method`||e.type===`Operator`);if(r.length){n.push(`## Constructors`);for(let e of r)n.push(...this.renderMember(e,3))}if(i.length){n.push(`## Fields`);for(let e of i)n.push(this.memberField(e))}if(a.length){n.push(`## Properties`);for(let e of a)n.push(this.memberField(e))}if(o.length){n.push(`## Methods`);let e=/* @__PURE__ */ new Map;for(let t of o){let n=e3e(t.name??t.uid);e.set(n,[...e.get(n)??[],t])}for(let[t,r]of[...e.entries()].sort(([e],[t])=>e.localeCompare(t))){n.push(`### ${t}()`);for(let e of r)n.push(...this.renderMember(e,4))}}return n}renderHeritage(e){let t=e.inheritance?.at(-1);return[{label:`Extends`,uids:t&&!W4e.has(t)?[t]:[]},{label:`Implements`,uids:e.implements??[]}].filter(({uids:e})=>e.length).map(({label:e,uids:t})=>`**${e}:** ${t.map(e=>gR(this.typeTokens(e))??vR(this.typeName(e))).join(`, `)}`)}renderEnum(e){let t=[`## Members`];for(let n of this.members(e).filter(e=>e.type===`Field`)){let e=n.syntax?.content?.split(`=`)[1]?.trim()??``;t.push(pR(n.name??n.uid,e,!1,this.prose(n.summary)))}return t}renderMember(e,t){let n=[];return e.syntax?.content&&n.push(this.codeBlock(e.syntax.content)),n.push(this.prose(e.summary),this.prose(e.remarks)),n.push(...(e.example??[]).map(e=>this.renderExample(e))),n.push(...this.renderSignatureDetails(e.syntax,t)),n.filter(Boolean)}renderSignatureDetails(e,t){if(!e)return[];let n=[],r=`#`.repeat(t);if(e.typeParameters?.length){n.push(`${r} Type Parameters`);for(let t of e.typeParameters)n.push(pR(t.id??``,``,!1,this.prose(t.description)))}if(e.parameters?.length){n.push(`${r} Parameters`);for(let t of e.parameters)n.push(CR(t.id??``,this.typeTokens(t.type),a3e(t.id,e.content),this.prose(t.description)))}let i=this.typeName(e.return?.type);if(i&&i.toLowerCase()!==`void`){n.push(`${r} Returns`);let t=this.prose(e.return?.description),a=gR(this.typeTokens(e.return?.type))??vR(i.replace(/`/g,``));n.push(`${a}${t?`\n\n${t}`:``}`)}return n}memberField(e){let t=[this.prose(e.summary),this.prose(e.remarks),...(e.example??[]).map(e=>this.renderExample(e))].filter(Boolean).join(`
|
|
990
990
|
|
|
991
|
-
`);return
|
|
991
|
+
`);return CR(e.name??e.uid,this.typeTokens(e.syntax?.return?.type),i3e(e.syntax?.content),t)}codeBlock(e,t=`csharp`){return`\`\`\`${t}\n${e}\n\`\`\``}renderExample(e){return/<[a-z][^>]*>/i.test(e)?this.prose(e):this.codeBlock(ER(e))}prose(e){return e?this.inlineCodeSpans(this.resolveXrefs(e)).split(/(<pre[^>]*>[\s\S]*?<\/pre>)/g).map((e,t)=>t%2==1?this.preToCodeBlock(e):O4e(e)).filter(Boolean).join(`
|
|
992
992
|
|
|
993
|
-
`):``}preToCodeBlock(e){let t=/class="lang(?:uage)?-([\w-]+)"/.exec(e)?.[1]??`csharp`,n=TR(e.replace(/<[^>]+>/g,``)).replace(/^\n+|\n+$/g,``);return this.codeBlock(n,t)}resolveXrefs(e){return e.replace(/<xref\s[^>]*?(?:href|uid)="([^"]+)"[^>]*>([\s\S]*?)<\/xref>/g,(e,t,n)=>{let r=r3e(t),i=n.trim()||i3e(this.shortName(r)),a=this.slugForUid(r);return a?`<a href="/${a}">${i}</a>`:`<code>${i}</code>`})}inlineCodeSpans(e){return e.split(/(<pre[\s\S]*?<\/pre>|<code[\s\S]*?<\/code>)/g).map((e,t)=>t%2==1?e:e.replace(/`([^`\n]+)`/g,(e,t)=>`<code>${i3e(t)}</code>`)).join(``)}slugForUid(e){let t=this.slugByUid.get(e);if(t)return t;let n=this.itemsByUid.get(e)?.parent??e.replace(/\(.*\)$/,``).replace(/\*$/,``).replace(/\.[^.]*$/,``);return n?this.slugByUid.get(n):void 0}shortName(e){return this.namesByUid.get(e)??n3e(e)}typeName(e){return e?this.shortName(e):``}typeTokens(e){if(!e)return[];let t=e.replace(/(^|[^\w.])`+\d+/g,`$1`).replace(/\{/g,`<`).replace(/\}/g,`>`),n=W4e(t,/[A-Za-z_]\w*(?:`+\d+)?(?:\.[A-Za-z_]\w*(?:`+\d+)?)*/g,(e,n)=>{let r=$4e(t,n+e.length),i=this.slugByUid.get(r?`${e}\`${r}`:e);return{text:e.replace(/`+\d+/g,``).split(`.`).at(-1)??e,href:i?`/${i}`:void 0}});return n.some(e=>e.href)?n:[{text:this.typeName(e)}]}firstSentence(e){if(!e)return;let t=TR(e.replace(/<[^>]*>/g,` `)).replace(/\s+/g,` `).trim();return t?gR(t.split(/(?<=\.)\s/)[0]??t,160):void 0}};function $4e(e,t){if(e[t]!==`<`)return 0;let n=0,r=1;for(let i=t+1;i<e.length;i+=1){let t=e[i];if(t===`<`)n+=1;else if(t===`>`&&n--===0)return r;else t===`,`&&n===0&&(r+=1)}return r}function e3e(e,t){return(e.name??``).localeCompare(t.name??``)}function t3e(e){return e.split(/[(<]/)[0]?.trim()||e}function n3e(e){return e.replace(/`+\d+/g,``).replace(/\{/g,`<`).replace(/\}/g,`>`).replace(/[A-Za-z_][A-Za-z0-9_.]*/g,e=>e.split(`.`).at(-1)??e)}function r3e(e){try{return TR(decodeURIComponent(e))}catch{return TR(e)}}function TR(e){return e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/ /g,` `).replace(/&/g,`&`)}function i3e(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function a3e(e){return e!==void 0&&/\?\s+\w+\s*[{;=]/.test(e)}function o3e(e,t){return!e||!t?!1:RegExp(`\\b${s3e(e)}\\s*=`).test(t)}function s3e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function c3e(e){if(ER(e))return{type:`root`,children:[{type:`code`,lang:`text`,value:e}]};let t=sR(e),n=t.children[0];return n?.type===`heading`&&n.depth===1&&t.children.shift(),p(t,`heading`,e=>{e.depth<2&&(e.depth=2)}),t}const l3e=/* @__PURE__ */ new Set([`[`,`]`,`*`,`_`,`<`,`>`,`{`,`}`,"`",`&`]);function ER(e){let t=0,n=0,r=0,i=0;for(let a=0;a<e.length;a+=1){let o=e[a];o!==void 0&&l3e.has(o)&&(i+=1),o===`\\`?a+=1:o===`[`?t+=1:o===`(`?n+=1:o===`]`?t>0?--t:r+=1:o===`)`&&(n>0?--n:r+=1)}return t+n+r>1e3||i>1e4}const u3e=`package-overview`,d3e=/^github\.com\/([^/]+)\/([^/]+)((?:\/[^/]+)*?)(?:\/v(?:[2-9]|[1-9]\d+))?$/,DR=s().max(512).regex(/^[\p{L}_][\p{L}\p{N}_]*$/u,`expected a Go identifier`),OR=s().max(512).regex(/^[\p{L}\p{N}._~-]+(?:\/[\p{L}\p{N}._~-]+)*$/u,`expected a Go import path`),f3e=/^[\p{L}\p{N}._~-]+$/u,p3e=s().max(512).refine(e=>e===`.`||e.split(`/`).every(e=>f3e.test(e)&&!/^\.+$/.test(e)),`expected "." or a relative directory of import-path segments, none made only of dots`),kR=s().max(1048576),AR=s().max(262144),m3e=P({pkg:OR.optional(),name:DR,private:me().optional()}),jR=C(P({t:AR,ref:m3e.optional()})),MR=P({suffix:DR.optional(),doc:kR.optional(),code:AR,output:AR.optional()}),h3e=P({name:DR,constraint:jR}),g3e=P({name:DR.optional(),type:jR}),NR=P({name:DR,recv:AR.optional(),decl:jR,doc:kR.optional(),deprecated:kR.optional(),typeParams:C(h3e).optional(),params:C(g3e).optional(),results:C(g3e).optional(),examples:C(MR).optional()}),PR=P({names:C(DR),decl:jR,doc:kR.optional(),deprecated:kR.optional()}),_3e=P({name:DR,type:jR,doc:kR.optional(),deprecated:kR.optional(),embedded:me().optional(),tag:AR.optional()}),v3e=P({name:DR,kind:k([`struct`,`interface`,`defined`,`alias`]),decl:jR,doc:kR.optional(),deprecated:kR.optional(),typeParams:C(h3e).optional(),fields:C(_3e).optional(),methods:C(NR).optional(),funcs:C(NR).optional(),consts:C(PR).optional(),vars:C(PR).optional(),examples:C(MR).optional()}),y3e=P({importPath:OR,name:DR,dir:p3e,synopsis:kR.optional(),doc:kR.optional(),readme:kR.optional(),deprecated:kR.optional(),consts:C(PR).optional(),vars:C(PR).optional(),funcs:C(NR).optional(),types:C(v3e).optional(),examples:C(MR).optional()}),b3e=P({schemaVersion:D(1),generator:P({name:s().max(512),version:s().max(512),go:s().max(512)}),module:OR,goos:s(),goarch:s(),commentSyntax:k([`markdown`,`godoc`]),packages:C(y3e).superRefine((e,t)=>{let n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Map,a=e.find(e=>e.dir===`.`);e.forEach((e,o)=>{n.has(e.importPath)&&t.addIssue({code:Ee.custom,path:[o,`importPath`],message:`duplicate package ${e.importPath}`}),n.add(e.importPath),r.has(e.dir)&&t.addIssue({code:Ee.custom,path:[o,`dir`],message:`duplicate package directory ${e.dir}`}),r.add(e.dir);let s=T3e(e,a),c=i.get(s);c!==void 0&&t.addIssue({code:Ee.custom,path:[o,`dir`],message:`packages ${c} and ${e.dir} would both be addressed as ${s}`}),i.set(s,e.dir)})})}),FR={struct:`STRUCT`,interface:`INTERFACE`,defined:`TYPE`,alias:`TYPE`};async function x3e(e){let t=w3e(await OF.default.readJson(e),e),n=new j3e(t),r=t.packages.map(e=>new M3e(n,e)),i=[],a=[];for(let[e,n]of r.entries()){let r=n.packagePages();i.push(...r,...n.memberPages());let o=t.packages[e]?.dir??`.`;a.push({path:o===`.`?[]:o.split(`/`),group:{group:n.group,pages:C3e(r)}})}return{pages:i,groups:CR(a)}}const S3e=[{tag:FR.interface,group:`Interfaces`},{tag:FR.struct,group:`Structs`},{tag:FR.defined,group:`Types`},{tag:`FUNCTION`,group:`Functions`}];function C3e([e,...t]){let n=S3e.map(({tag:e,group:n})=>({group:n,pages:t.filter(t=>t.tag===e).map(e=>e.slug)})).filter(e=>e.pages.length>0),r=n.length>1?n:t.map(e=>e.slug);return e?[e.slug,...r]:r}function w3e(e,t){let n=typeof e==`object`&&e&&`schemaVersion`in e?e.schemaVersion:void 0;if(typeof n==`number`&&n!==1)throw Error(`Go SDK artifact ${t} uses schema version ${n}, but Mintlify reads schema version 1. Regenerate it with a compatible mintlify-go-extractor release.`);let r=b3e.safeParse(e);if(!r.success){let e=r.error.issues[0],n=e?`${e.path.join(`.`)||`artifact`}: ${e.message}`:`invalid`;throw Error(`Invalid Go SDK artifact ${t}: ${n}`)}return r.data}function IR(e){return e.replace(/[^\p{L}\p{N}\-_.]+/gu,`-`).replace(/^-+|-+$/g,``)||`item`}function LR(e){return e.dir===`.`?``:e.dir.split(`/`).map(IR).join(`/`)}function T3e(e,t){if(e.dir===`.`)return e.name;let n=e.dir.replaceAll(`/`,`.`);return t?`${t.name}.${n}`:n}function E3e(e){return e.dir===`.`?e.name:Rt.posix.basename(e.dir)}function D3e(e,t){if(e.dir===`.`)return;let n=Rt.posix.dirname(e.dir),r=n===`.`?void 0:n.replaceAll(`/`,`.`);return t?r?`${t.name}.${r}`:t.name:r}function O3e(e){return`${e}()`}function k3e(e,t){return`${e.name}.${t.name}`}function A3e(e){return[...e.funcs??[],...(e.types??[]).flatMap(e=>e.funcs??[])].sort((e,t)=>e.name.localeCompare(t.name))}var j3e=class{constructor(e){this.packages=/* @__PURE__ */ new Map,this.symbols=/* @__PURE__ */ new Map,this.routes=/* @__PURE__ */ new Map,this.module=e.module,this.root=e.packages.find(e=>e.dir===`.`);for(let t of e.packages){let e=LR(t),n={slug:this.route(e,u3e)};this.packages.set(t.importPath,n.slug);for(let e of[...t.consts??[],...t.vars??[]])for(let r of e.names)this.add(t,r,n);for(let n of A3e(t))this.add(t,n.name,{slug:this.route(e,n.name)});for(let n of t.types??[]){let r=this.route(e,n.name);this.add(t,n.name,{slug:r});for(let e of[...n.consts??[],...n.vars??[]])for(let n of e.names)this.add(t,n,{slug:r})}}for(let t of e.packages)for(let e of t.types??[]){let n=this.slugOf(t,e.name);for(let r of e.methods??[])this.add(t,`${e.name}.${r.name}`,{slug:n,anchor:k3e(e,r),page:this.route(n,r.name)});for(let r of e.fields??[])this.add(t,`${e.name}.${r.name}`,{slug:n,anchor:r.name,page:this.route(n,r.name)})}}add(e,t,n){this.symbols.set(`${e.importPath}#${t}`,n)}slugOf(e,t){return this.symbols.get(`${e.importPath}#${t}`)?.slug??LR(e)}route(e,t){let n=Rt.posix.join(e,IR(t)),r=n.normalize(`NFC`).toLowerCase(),i=this.routes.get(r);if(i===void 0)return this.routes.set(r,1),n;let a=i+1;return this.routes.set(r,a),this.routes.set(`${r}-${a}`,1),`${n}-${a}`}packageSlug(e){return this.packages.get(e)}symbolSlug(e,t){return this.symbols.get(`${e}#${t}`)?.slug}memberPageSlug(e,t){return this.symbols.get(`${e}#${t}`)?.page}href(e,t,n){if(t){let n=this.symbols.get(`${e}#${t}`);if(n)return`/${n.slug}${n.anchor?`#${n.anchor}`:``}`}let r=this.packages.get(e);if(r)return t?void 0:`/${r}`;if(!n)return`https://pkg.go.dev/${H4e(e)}${t?`#${H4e(t)}`:``}`}},M3e=class{constructor(e,t){this.index=e,this.pkg=t,this.rendered=/* @__PURE__ */ new Map,this.group=t.dir===`.`?t.name:t.dir,this.base=LR(t),this.funcs=A3e(t)}packagePages(){return[this.packagePage(),...(this.pkg.types??[]).map(e=>this.typePage(e)),...this.funcs.map(e=>this.funcPage(e))]}memberPages(){return(this.pkg.types??[]).flatMap(e=>this.typeMemberPages(e))}packagePage(){let e=this.index.packageSlug(this.pkg.importPath)??Rt.posix.join(this.base,u3e),t=[this.body(this.pkg.doc),this.deprecated(this.pkg.deprecated)],n=this.pkg.types??[];n.length&&t.push(`## Types`,this.indexList(n.map(e=>e.name))),this.funcs.length&&t.push(`## Functions`,this.indexList(this.funcs.map(e=>e.name))),t.push(...this.valueSection(`Constants`,this.pkg.consts,2)),t.push(...this.valueSection(`Variables`,this.pkg.vars,2)),t.push(...this.exampleSection(this.pkg.examples,2));let r=D3e(this.pkg,this.index.root),i=this.description(this.pkg.doc),a=this.pkg.readme?this.readme(this.pkg.readme,i):void 0,o=i??a?.description;return{slug:e,title:`package ${this.pkg.name}`,...o?{description:o}:{},tag:`PACKAGE`,...a?.intro?{intro:a.intro}:{},content:BR(t),target:{kind:`package`,name:E3e(this.pkg),...r?{namespace:r}:{}}}}readme(e,t){if(ER(e))return{intro:zR(e,`text`)};let n=c3e(e),r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Set;p(n,`imageReference`,e=>{r.add(e.identifier)}),p(n,`linkReference`,e=>{i.add(e.identifier)}),I4e(n,e=>this.repoUrl(e.url,e.type===`image`||e.type===`definition`&&r.has(e.identifier)&&!i.has(e.identifier)));let a=F3e(n,t);return{intro:uR(n),...a?{description:a}:{}}}describe(e){let t=this.description(e);return t?{description:t}:{}}description(e){if(!e)return;let t=this.doc(e).tree.children.find(e=>e.type===`paragraph`);if(t)return L3e(cR(t).replace(/\s+/g,` `).trim())}repoUrl(e,t){let n=mR(e);if(n===void 0||!/^[^#]/.test(n)||/^[a-z][a-z0-9+.-]*:/i.test(n))return n;let r=d3e.exec(this.index.module);if(!r)return n;let[,i,a,o=``]=r,[s=``,c]=n.split(`#`),l=s.startsWith(`/`)?Rt.posix.normalize(s.slice(1)):Rt.posix.normalize(Rt.posix.join(o.slice(1),this.pkg.dir===`.`?``:this.pkg.dir,s));return l.startsWith(`..`)?n:`https://github.com/${i}/${a}/${t?`raw`:`blob`}/HEAD/${l}${c?`#${c}`:``}`}typePage(e){let t=[this.body(e.doc),this.deprecated(e.deprecated),zR(N3e(e))];return e.typeParams?.length&&t.push(`## Type Parameters`,...e.typeParams.map(e=>this.field(e.name,e.constraint))),e.fields?.length&&t.push(`## Fields`,...e.fields.map(e=>this.fieldEntry(e))),t.push(...this.memberSection(`Constructors`,e.funcs)),t.push(...this.memberSection(`Methods`,e.methods,e)),t.push(...this.valueSection(`Constants`,e.consts,2)),t.push(...this.valueSection(`Variables`,e.vars,2)),t.push(...this.exampleSection(e.examples,2)),{slug:this.slug(e.name),title:e.name,...this.describe(e.doc),tag:FR[e.kind],content:BR(t),target:this.target(e.kind===`interface`?`interface`:`type`,e.name)}}funcPage(e){let t=[this.body(e.doc),this.deprecated(e.deprecated),zR(RR(e.decl)),...this.signatureDetails(e,2)];return{slug:this.slug(e.name),title:e.name,...this.describe(e.doc),tag:`FUNCTION`,content:BR(t),target:this.target(`function`,e.name)}}typeMemberPages(e){let t=(e.methods??[]).map(t=>({slug:this.memberSlug(e,t.name),title:`${e.name}.${t.name}`,...this.describe(t.doc),tag:`METHOD`,content:BR(this.funcBody(t,2)),target:this.target(`method`,t.name,e.name)})),n=(e.fields??[]).map(t=>({slug:this.memberSlug(e,t.name),title:`${e.name}.${t.name}`,...this.describe(t.doc),tag:`FIELD`,content:this.fieldEntry(t),target:this.target(`property`,t.name,e.name)}));return[...t,...n]}target(e,t,n){return{kind:e,name:t,...n?{parent:n}:{},namespace:T3e(this.pkg,this.index.root)}}slug(e){return this.index.symbolSlug(this.pkg.importPath,e)??Rt.posix.join(this.base,IR(e))}memberSlug(e,t){return this.index.memberPageSlug(this.pkg.importPath,`${e.name}.${t}`)??Rt.posix.join(this.slug(e.name),IR(t))}indexList(e){return e.map(e=>`- [${e}](/${this.slug(e)})`).join(`
|
|
994
|
-
`)}memberSection(e,t,n){if(!t?.length)return[];let r=`#`.repeat(3);return[`## ${e}`,...t.flatMap(e=>[`${r} ${
|
|
995
|
-
`).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`//`)),i=(e.methods?.length??0)+(e.fields?.length??0);if(r.length>i)return t}return t.slice(0,n+e.kind.length+1)}function
|
|
993
|
+
`):``}preToCodeBlock(e){let t=/class="lang(?:uage)?-([\w-]+)"/.exec(e)?.[1]??`csharp`,n=ER(e.replace(/<[^>]+>/g,``)).replace(/^\n+|\n+$/g,``);return this.codeBlock(n,t)}resolveXrefs(e){return e.replace(/<xref\s[^>]*?(?:href|uid)="([^"]+)"[^>]*>([\s\S]*?)<\/xref>/g,(e,t,n)=>{let r=n3e(t),i=n.trim()||r3e(this.shortName(r)),a=this.slugForUid(r);return a?`<a href="/${a}">${i}</a>`:`<code>${i}</code>`})}inlineCodeSpans(e){return e.split(/(<pre[\s\S]*?<\/pre>|<code[\s\S]*?<\/code>)/g).map((e,t)=>t%2==1?e:e.replace(/`([^`\n]+)`/g,(e,t)=>`<code>${r3e(t)}</code>`)).join(``)}slugForUid(e){let t=this.slugByUid.get(e);if(t)return t;let n=this.itemsByUid.get(e)?.parent??e.replace(/\(.*\)$/,``).replace(/\*$/,``).replace(/\.[^.]*$/,``);return n?this.slugByUid.get(n):void 0}shortName(e){return this.namesByUid.get(e)??t3e(e)}typeName(e){return e?this.shortName(e):``}typeTokens(e){if(!e)return[];let t=e.replace(/(^|[^\w.])`+\d+/g,`$1`).replace(/\{/g,`<`).replace(/\}/g,`>`),n=U4e(t,/[A-Za-z_]\w*(?:`+\d+)?(?:\.[A-Za-z_]\w*(?:`+\d+)?)*/g,(e,n)=>{let r=Q4e(t,n+e.length),i=this.slugByUid.get(r?`${e}\`${r}`:e);return{text:e.replace(/`+\d+/g,``).split(`.`).at(-1)??e,href:i?`/${i}`:void 0}});return n.some(e=>e.href)?n:[{text:this.typeName(e)}]}firstSentence(e){if(!e)return;let t=ER(e.replace(/<[^>]*>/g,` `)).replace(/\s+/g,` `).trim();return t?_R(t.split(/(?<=\.)\s/)[0]??t,160):void 0}};function Q4e(e,t){if(e[t]!==`<`)return 0;let n=0,r=1;for(let i=t+1;i<e.length;i+=1){let t=e[i];if(t===`<`)n+=1;else if(t===`>`&&n--===0)return r;else t===`,`&&n===0&&(r+=1)}return r}function $4e(e,t){return(e.name??``).localeCompare(t.name??``)}function e3e(e){return e.split(/[(<]/)[0]?.trim()||e}function t3e(e){return e.replace(/`+\d+/g,``).replace(/\{/g,`<`).replace(/\}/g,`>`).replace(/[A-Za-z_][A-Za-z0-9_.]*/g,e=>e.split(`.`).at(-1)??e)}function n3e(e){try{return ER(decodeURIComponent(e))}catch{return ER(e)}}function ER(e){return e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/ /g,` `).replace(/&/g,`&`)}function r3e(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function i3e(e){return e!==void 0&&/\?\s+\w+\s*[{;=]/.test(e)}function a3e(e,t){return!e||!t?!1:RegExp(`\\b${o3e(e)}\\s*=`).test(t)}function o3e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function s3e(e){if(DR(e))return{type:`root`,children:[{type:`code`,lang:`text`,value:e}]};let t=sR(e),n=t.children[0];return n?.type===`heading`&&n.depth===1&&t.children.shift(),p(t,`heading`,e=>{e.depth<2&&(e.depth=2)}),t}const c3e=/* @__PURE__ */ new Set([`[`,`]`,`*`,`_`,`<`,`>`,`{`,`}`,"`",`&`]);function DR(e){let t=0,n=0,r=0,i=0;for(let a=0;a<e.length;a+=1){let o=e[a];o!==void 0&&c3e.has(o)&&(i+=1),o===`\\`?a+=1:o===`[`?t+=1:o===`(`?n+=1:o===`]`?t>0?--t:r+=1:o===`)`&&(n>0?--n:r+=1)}return t+n+r>1e3||i>1e4}const l3e=`package-overview`,u3e=/^github\.com\/([^/]+)\/([^/]+)((?:\/[^/]+)*?)(?:\/v(?:[2-9]|[1-9]\d+))?$/,OR=s().max(512).regex(/^[\p{L}_][\p{L}\p{N}_]*$/u,`expected a Go identifier`),kR=s().max(512).regex(/^[\p{L}\p{N}._~-]+(?:\/[\p{L}\p{N}._~-]+)*$/u,`expected a Go import path`),d3e=/^[\p{L}\p{N}._~-]+$/u,f3e=s().max(512).refine(e=>e===`.`||e.split(`/`).every(e=>d3e.test(e)&&!/^\.+$/.test(e)),`expected "." or a relative directory of import-path segments, none made only of dots`),AR=s().max(1048576),jR=s().max(262144),p3e=P({pkg:kR.optional(),name:OR,private:me().optional()}),MR=C(P({t:jR,ref:p3e.optional()})),NR=P({suffix:OR.optional(),doc:AR.optional(),code:jR,output:jR.optional()}),m3e=P({name:OR,constraint:MR}),h3e=P({name:OR.optional(),type:MR}),PR=P({name:OR,recv:jR.optional(),decl:MR,doc:AR.optional(),deprecated:AR.optional(),typeParams:C(m3e).optional(),params:C(h3e).optional(),results:C(h3e).optional(),examples:C(NR).optional()}),FR=P({names:C(OR),decl:MR,doc:AR.optional(),deprecated:AR.optional()}),g3e=P({name:OR,type:MR,doc:AR.optional(),deprecated:AR.optional(),embedded:me().optional(),tag:jR.optional()}),_3e=P({name:OR,kind:k([`struct`,`interface`,`defined`,`alias`]),decl:MR,doc:AR.optional(),deprecated:AR.optional(),typeParams:C(m3e).optional(),fields:C(g3e).optional(),methods:C(PR).optional(),funcs:C(PR).optional(),consts:C(FR).optional(),vars:C(FR).optional(),examples:C(NR).optional()}),v3e=P({importPath:kR,name:OR,dir:f3e,synopsis:AR.optional(),doc:AR.optional(),readme:AR.optional(),deprecated:AR.optional(),consts:C(FR).optional(),vars:C(FR).optional(),funcs:C(PR).optional(),types:C(_3e).optional(),examples:C(NR).optional()}),y3e=P({schemaVersion:D(1),generator:P({name:s().max(512),version:s().max(512),go:s().max(512)}),module:kR,goos:s(),goarch:s(),commentSyntax:k([`markdown`,`godoc`]),packages:C(v3e).superRefine((e,t)=>{let n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Map,a=e.find(e=>e.dir===`.`);e.forEach((e,o)=>{n.has(e.importPath)&&t.addIssue({code:Ee.custom,path:[o,`importPath`],message:`duplicate package ${e.importPath}`}),n.add(e.importPath),r.has(e.dir)&&t.addIssue({code:Ee.custom,path:[o,`dir`],message:`duplicate package directory ${e.dir}`}),r.add(e.dir);let s=w3e(e,a),c=i.get(s);c!==void 0&&t.addIssue({code:Ee.custom,path:[o,`dir`],message:`packages ${c} and ${e.dir} would both be addressed as ${s}`}),i.set(s,e.dir)})})}),IR={struct:`STRUCT`,interface:`INTERFACE`,defined:`TYPE`,alias:`TYPE`};async function b3e(e){let t=C3e(await OF.default.readJson(e),e),n=new A3e(t),r=t.packages.map(e=>new j3e(n,e)),i=[],a=[];for(let[e,n]of r.entries()){let r=n.packagePages();i.push(...r,...n.memberPages());let o=t.packages[e]?.dir??`.`;a.push({path:o===`.`?[]:o.split(`/`),group:{group:n.group,pages:S3e(r)}})}return{pages:i,groups:wR(a)}}const x3e=[{tag:IR.interface,group:`Interfaces`},{tag:IR.struct,group:`Structs`},{tag:IR.defined,group:`Types`},{tag:`FUNCTION`,group:`Functions`}];function S3e([e,...t]){let n=x3e.map(({tag:e,group:n})=>({group:n,pages:t.filter(t=>t.tag===e).map(e=>e.slug)})).filter(e=>e.pages.length>0),r=n.length>1?n:t.map(e=>e.slug);return e?[e.slug,...r]:r}function C3e(e,t){let n=typeof e==`object`&&e&&`schemaVersion`in e?e.schemaVersion:void 0;if(typeof n==`number`&&n!==1)throw Error(`Go SDK artifact ${t} uses schema version ${n}, but Mintlify reads schema version 1. Regenerate it with a compatible mintlify-go-extractor release.`);let r=y3e.safeParse(e);if(!r.success){let e=r.error.issues[0],n=e?`${e.path.join(`.`)||`artifact`}: ${e.message}`:`invalid`;throw Error(`Invalid Go SDK artifact ${t}: ${n}`)}return r.data}function LR(e){return e.replace(/[^\p{L}\p{N}\-_.]+/gu,`-`).replace(/^-+|-+$/g,``)||`item`}function RR(e){return e.dir===`.`?``:e.dir.split(`/`).map(LR).join(`/`)}function w3e(e,t){if(e.dir===`.`)return e.name;let n=e.dir.replaceAll(`/`,`.`);return t?`${t.name}.${n}`:n}function T3e(e){return e.dir===`.`?e.name:Rt.posix.basename(e.dir)}function E3e(e,t){if(e.dir===`.`)return;let n=Rt.posix.dirname(e.dir),r=n===`.`?void 0:n.replaceAll(`/`,`.`);return t?r?`${t.name}.${r}`:t.name:r}function D3e(e){return`${e}()`}function O3e(e,t){return`${e.name}.${t.name}`}function k3e(e){return[...e.funcs??[],...(e.types??[]).flatMap(e=>e.funcs??[])].sort((e,t)=>e.name.localeCompare(t.name))}var A3e=class{constructor(e){this.packages=/* @__PURE__ */ new Map,this.symbols=/* @__PURE__ */ new Map,this.routes=/* @__PURE__ */ new Map,this.module=e.module,this.root=e.packages.find(e=>e.dir===`.`);for(let t of e.packages){let e=RR(t),n={slug:this.route(e,l3e)};this.packages.set(t.importPath,n.slug);for(let e of[...t.consts??[],...t.vars??[]])for(let r of e.names)this.add(t,r,n);for(let n of k3e(t))this.add(t,n.name,{slug:this.route(e,n.name)});for(let n of t.types??[]){let r=this.route(e,n.name);this.add(t,n.name,{slug:r});for(let e of[...n.consts??[],...n.vars??[]])for(let n of e.names)this.add(t,n,{slug:r})}}for(let t of e.packages)for(let e of t.types??[]){let n=this.slugOf(t,e.name);for(let r of e.methods??[])this.add(t,`${e.name}.${r.name}`,{slug:n,anchor:O3e(e,r),page:this.route(n,r.name)});for(let r of e.fields??[])this.add(t,`${e.name}.${r.name}`,{slug:n,anchor:r.name,page:this.route(n,r.name)})}}add(e,t,n){this.symbols.set(`${e.importPath}#${t}`,n)}slugOf(e,t){return this.symbols.get(`${e.importPath}#${t}`)?.slug??RR(e)}route(e,t){let n=Rt.posix.join(e,LR(t)),r=n.normalize(`NFC`).toLowerCase(),i=this.routes.get(r);if(i===void 0)return this.routes.set(r,1),n;let a=i+1;return this.routes.set(r,a),this.routes.set(`${r}-${a}`,1),`${n}-${a}`}packageSlug(e){return this.packages.get(e)}symbolSlug(e,t){return this.symbols.get(`${e}#${t}`)?.slug}memberPageSlug(e,t){return this.symbols.get(`${e}#${t}`)?.page}href(e,t,n){if(t){let n=this.symbols.get(`${e}#${t}`);if(n)return`/${n.slug}${n.anchor?`#${n.anchor}`:``}`}let r=this.packages.get(e);if(r)return t?void 0:`/${r}`;if(!n)return`https://pkg.go.dev/${V4e(e)}${t?`#${V4e(t)}`:``}`}},j3e=class{constructor(e,t){this.index=e,this.pkg=t,this.rendered=/* @__PURE__ */ new Map,this.group=t.dir===`.`?t.name:t.dir,this.base=RR(t),this.funcs=k3e(t)}packagePages(){return[this.packagePage(),...(this.pkg.types??[]).map(e=>this.typePage(e)),...this.funcs.map(e=>this.funcPage(e))]}memberPages(){return(this.pkg.types??[]).flatMap(e=>this.typeMemberPages(e))}packagePage(){let e=this.index.packageSlug(this.pkg.importPath)??Rt.posix.join(this.base,l3e),t=[this.body(this.pkg.doc),this.deprecated(this.pkg.deprecated)],n=this.pkg.types??[];n.length&&t.push(`## Types`,this.indexList(n.map(e=>e.name))),this.funcs.length&&t.push(`## Functions`,this.indexList(this.funcs.map(e=>e.name))),t.push(...this.valueSection(`Constants`,this.pkg.consts,2)),t.push(...this.valueSection(`Variables`,this.pkg.vars,2)),t.push(...this.exampleSection(this.pkg.examples,2));let r=E3e(this.pkg,this.index.root),i=this.description(this.pkg.doc),a=this.pkg.readme?this.readme(this.pkg.readme,i):void 0,o=i??a?.description;return{slug:e,title:`package ${this.pkg.name}`,...o?{description:o}:{},tag:`PACKAGE`,...a?.intro?{intro:a.intro}:{},content:VR(t),target:{kind:`package`,name:T3e(this.pkg),...r?{namespace:r}:{}}}}readme(e,t){if(DR(e))return{intro:BR(e,`text`)};let n=s3e(e),r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Set;p(n,`imageReference`,e=>{r.add(e.identifier)}),p(n,`linkReference`,e=>{i.add(e.identifier)}),lR(n,e=>this.repoUrl(e.url,e.type===`image`||e.type===`definition`&&r.has(e.identifier)&&!i.has(e.identifier)));let a=P3e(n,t);return{intro:dR(n),...a?{description:a}:{}}}describe(e){let t=this.description(e);return t?{description:t}:{}}description(e){if(!e)return;let t=this.doc(e).tree.children.find(e=>e.type===`paragraph`);if(t)return I3e(cR(t).replace(/\s+/g,` `).trim())}repoUrl(e,t){let n=hR(e);if(n===void 0||!/^[^#]/.test(n)||/^[a-z][a-z0-9+.-]*:/i.test(n))return n;let r=u3e.exec(this.index.module);if(!r)return n;let[,i,a,o=``]=r,[s=``,c]=n.split(`#`),l=s.startsWith(`/`)?Rt.posix.normalize(s.slice(1)):Rt.posix.normalize(Rt.posix.join(o.slice(1),this.pkg.dir===`.`?``:this.pkg.dir,s));return l.startsWith(`..`)?n:`https://github.com/${i}/${a}/${t?`raw`:`blob`}/HEAD/${l}${c?`#${c}`:``}`}typePage(e){let t=[this.body(e.doc),this.deprecated(e.deprecated),BR(M3e(e))];return e.typeParams?.length&&t.push(`## Type Parameters`,...e.typeParams.map(e=>this.field(e.name,e.constraint))),e.fields?.length&&t.push(`## Fields`,...e.fields.map(e=>this.fieldEntry(e))),t.push(...this.memberSection(`Constructors`,e.funcs)),t.push(...this.memberSection(`Methods`,e.methods,e)),t.push(...this.valueSection(`Constants`,e.consts,2)),t.push(...this.valueSection(`Variables`,e.vars,2)),t.push(...this.exampleSection(e.examples,2)),{slug:this.slug(e.name),title:e.name,...this.describe(e.doc),tag:IR[e.kind],content:VR(t),target:this.target(e.kind===`interface`?`interface`:`type`,e.name)}}funcPage(e){let t=[this.body(e.doc),this.deprecated(e.deprecated),BR(zR(e.decl)),...this.signatureDetails(e,2)];return{slug:this.slug(e.name),title:e.name,...this.describe(e.doc),tag:`FUNCTION`,content:VR(t),target:this.target(`function`,e.name)}}typeMemberPages(e){let t=(e.methods??[]).map(t=>({slug:this.memberSlug(e,t.name),title:`${e.name}.${t.name}`,...this.describe(t.doc),tag:`METHOD`,content:VR(this.funcBody(t,2)),target:this.target(`method`,t.name,e.name)})),n=(e.fields??[]).map(t=>({slug:this.memberSlug(e,t.name),title:`${e.name}.${t.name}`,...this.describe(t.doc),tag:`FIELD`,content:this.fieldEntry(t),target:this.target(`property`,t.name,e.name)}));return[...t,...n]}target(e,t,n){return{kind:e,name:t,...n?{parent:n}:{},namespace:w3e(this.pkg,this.index.root)}}slug(e){return this.index.symbolSlug(this.pkg.importPath,e)??Rt.posix.join(this.base,LR(e))}memberSlug(e,t){return this.index.memberPageSlug(this.pkg.importPath,`${e.name}.${t}`)??Rt.posix.join(this.slug(e.name),LR(t))}indexList(e){return e.map(e=>`- [${e}](/${this.slug(e)})`).join(`
|
|
994
|
+
`)}memberSection(e,t,n){if(!t?.length)return[];let r=`#`.repeat(3);return[`## ${e}`,...t.flatMap(e=>[`${r} ${D3e(e.name)}${n?` {#${O3e(n,e)}}`:``}`,...this.funcBody(e,4)])]}funcBody(e,t){return[BR(zR(e.decl)),this.prose(e.doc),this.deprecated(e.deprecated),...this.signatureDetails(e,t)]}signatureDetails(e,t){let n=`#`.repeat(t),r=[];e.typeParams?.length&&r.push(`${n} Type Parameters`,...e.typeParams.map(e=>this.field(e.name,e.constraint)));let i=e.params??[];return i.length&&r.push(`${n} Parameters`,...i.every(e=>!!e.name)?i.map(e=>this.field(e.name,e.type)):[this.returns(i)]),e.results?.length&&r.push(`${n} Returns`,this.returns(e.results)),r.push(...this.exampleSection(e.examples,t)),r}returns(e){let t=[];return e.forEach((e,n)=>{n>0&&t.push({text:`, `}),t.push(...this.tokens(e.type))}),e.length>1&&(t.unshift({text:`(`}),t.push({text:`)`})),gR(t)??vR(t.map(e=>e.text).join(``))}fieldEntry(e){let t=VR([e.embedded?`Embedded field.`:void 0,e.tag?`**Tag:** ${vR(e.tag)}`:void 0,this.prose(e.doc),this.deprecated(e.deprecated)]);return this.field(e.name,e.type,t,e.name)}field(e,t,n,r){let i=this.singleRefHref(t),a=zR(t),o=i?void 0:gR(this.tokens(t))??(a.length>80?vR(a):void 0);return pR(e,a,!0,VR([o&&`**Type:** ${o}`,n]),i,r)}singleRefHref(e){let t=e.findIndex(e=>e.ref);if(t===-1||t!==e.length-1)return;let n=zR(e.slice(0,t));if(!/^(?:\*|\[\]|\.\.\.)*(?:[\p{L}_][\p{L}\p{N}_]*\.)?$/u.test(n))return;let r=e[t]?.ref,i=r?this.refHref(r):void 0;return i?.startsWith(`/`)?i:void 0}tokens(e){return e.map(e=>{let t=e.ref?this.refHref(e.ref):void 0;return t?{text:e.t,href:t}:{text:e.t}})}refHref(e){return this.index.href(e.pkg??this.pkg.importPath,e.name,e.private??!1)}valueSection(e,t,n){return t?.length?[`${`#`.repeat(n)} ${e}`,...t.flatMap(e=>[BR(zR(e.decl)),this.prose(e.doc),this.deprecated(e.deprecated)])]:[]}exampleSection(e,t){if(!e?.length)return[];let n=`#`.repeat(t);return[`${n} Examples`,...e.flatMap(e=>[`${n}# ${e.suffix?`Example (${e.suffix})`:`Example`}`,this.prose(e.doc),BR(e.code),e.output?`Output:\n\n${BR(e.output.replace(/\n+$/,``),`text`)}`:``])]}deprecated(e){return e?`<Warning>\n${H4e(`Deprecated: ${this.prose(e)}`)}\n</Warning>`:``}prose(e){return e?dR(this.doc(e).tree):``}body(e){if(!e)return``;let{tree:t}=this.doc(e),[n]=t.children;if(n?.type!==`paragraph`)return dR(t);let r=cR(n).replace(/\s+/g,` `).trim(),i=UR(r);if(!i||i===r||_R(i,HR)!==i)return dR(t);let a=structuredClone(t),[o]=a.children;return o?.type===`paragraph`?(F3e(o),o.children.length===0&&a.children.shift(),dR(a)):dR(t)}doc(e){let t=this.rendered.get(e);return t||(t=this.parseDoc(e),this.rendered.set(e,t)),t}parseDoc(e){if(DR(e))return{tree:{type:`root`,children:[{type:`code`,lang:`text`,value:e}]}};let t=sR(e,4);return lR(t,e=>e.url.startsWith(`go:`)?this.resolveDocLink(e.url.slice(3)):hR(e.url)),{tree:t}}resolveDocLink(e){let t=e.indexOf(`#`),n=t===-1?e:e.slice(0,t),r=t===-1?void 0:e.slice(t+1);return this.index.href(n,r,!1)}};function zR(e){return e.map(e=>e.t).join(``)}function M3e(e){let t=zR(e.decl);if(e.kind!==`struct`&&e.kind!==`interface`)return t;let n=N3e(t,e.kind);if(n===-1)return t;if(e.kind===`interface`){let r=t.slice(n+e.kind.length+3,t.lastIndexOf(`}`)).split(`
|
|
995
|
+
`).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`//`)),i=(e.methods?.length??0)+(e.fields?.length??0);if(r.length>i)return t}return t.slice(0,n+e.kind.length+1)}function N3e(e,t){let n=` ${t} {`,r=0;for(let t=0;t<e.length;t+=1){let i=e[t];if(i===`[`)r+=1;else if(i===`]`)--r;else if(r===0&&e.startsWith(n,t))return t}return-1}function BR(e,t=`go`){let n=Math.max(0,...(e.match(/`+/g)??[]).map(e=>e.length)),r="`".repeat(Math.max(3,n+1));return`${r}${t}\n${e}\n${r}`}function VR(e){return e.filter(Boolean).join(`
|
|
996
996
|
|
|
997
|
-
`)}function
|
|
998
|
-
`).map(e=>e.trim()).filter(e=>e.length>0&&!e.startsWith(`module:`))}throw Error(`No element-list or package-list found in ${e}`)}function
|
|
997
|
+
`)}function P3e(e,t){let n=e.children.findIndex(e=>e.type===`paragraph`&&!N4e(e)&&F4e(e)),r=e.children[n];if(!r)return t;let i=cR(r).replace(/\s+/g,` `).trim(),a=UR(i);return!a||t!==void 0&&_R(a,HR)!==t?t:a===i?(e.children.splice(n,1),t??_R(a,HR)):(t!==void 0&&F3e(r),t)}function F3e(e){let t=e.children.map(cR),n=/\.(?:\s|$)/.exec(t.join(``));if(!n)return;let r=n.index+1,i=0;for(let n=0;n<e.children.length;n+=1){let a=e.children[n],o=t[n]?.length??0;if(i+o<=r)i+=o;else{if(i===r){for(e.children.splice(0,n);e.children[0]?.type===`break`;)e.children.shift();let t=e.children[0];t?.type===`text`&&(t.value=t.value.trimStart(),t.value===``&&e.children.shift());return}if(a?.type!==`text`)return;a.value=a.value.slice(r-i).trimStart(),e.children.splice(0,n),a.value===``&&e.children.shift();return}}e.children=[]}const HR=160;function UR(e){if(!e)return;let t=/\.\s/.exec(e);return t?e.slice(0,t.index+1):e}function I3e(e){let t=UR(e);return t&&_R(t,160)}const L3e=[{kind:`interface`,group:`Interfaces`,tag:`INTERFACE`},{kind:`class`,group:`Classes`,tag:`CLASS`},{kind:`enum`,group:`Enums`,tag:`ENUM`},{kind:`record`,group:`Records`,tag:`RECORD`},{kind:`exception`,group:`Exceptions`,tag:`EXCEPTION`},{kind:`error`,group:`Errors`,tag:`ERROR`},{kind:`annotation`,group:`Annotations`,tag:`ANNOTATION`}],WR=/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)*$/,R3e=/* @__PURE__ */ new Set([`summary`,`inherited-list`,`sub-title`,`header`,`inheritance`]);async function z3e(e){let t=await U3e(e);if(t.length===0)throw Error(`No javadoc types found in ${e}`);let n=new Map(t.map(e=>[e.file,e.slug])),r=/* @__PURE__ */ new Map,i=[],a=/* @__PURE__ */ new Map;for(let o of t){let t=await OF.default.readFile(Rt.join(e,o.file),`utf8`),s=r.get(o.pkg);s||(s=await V3e(e,o.pkg),r.set(o.pkg,s));let c=J3e(o,t,n,s.get(o.name));o.kind=c.kind,i.push(c);let l=a.get(o.pkg)??[];l.push(o),a.set(o.pkg,l)}return{pages:i,groups:wR([...a.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({path:e.split(`.`),group:{group:e,pages:B3e(t)}})))}}function B3e(e){let t=[...e].sort((e,t)=>e.name.localeCompare(t.name)),n=L3e.map(e=>({group:e.group,pages:t.filter(t=>t.kind===e.kind).map(e=>e.slug)})).filter(e=>e.pages.length>0);return n.length<=1?t.map(e=>e.slug):n}async function V3e(e,t){let n=Rt.join(e,...t.split(`.`),`package-summary.html`);if(!await OF.default.pathExists(n))return/* @__PURE__ */ new Map;let r=cI(await OF.default.readFile(n,`utf8`)),i=/* @__PURE__ */ new Map,a=(e,t)=>{let n=KR(e,`col-first`)||KR(e,`colFirst`);JR(e,e=>{(n||KR(e,`col-first`)||KR(e,`colFirst`))&&JR(e,e=>o(e,t))}),n&&JR(e,e=>o(e,t))},o=(e,t)=>{if(e.tagName!==`a`||typeof e.properties.href!=`string`)return;let n=e.properties.href.split(/[?#]/)[0]??``;if(!n.endsWith(`.html`)||/^[a-z][a-z0-9+.-]*:/i.test(n))return;let r=Rt.posix.basename(n,`.html`);WR.test(r)&&!i.has(r)&&i.set(r,t)},s=/* @__PURE__ */ new Map;return JR(r,e=>{let t=e.properties?.id;if(e.tagName!==`button`||typeof t!=`string`||!/^class-summary-tab\d+$/.test(t))return;let n=H3e(YR(e));n&&s.set(t,n)}),s.size>0?(JR(r,e=>{let t=GR(e).find(e=>s.has(e));t&&a(e,s.get(t))}),i):(JR(r,e=>{if(e.tagName!==`table`)return;let t=qR(e,e=>e.tagName===`caption`),n=t?H3e(YR(t)):void 0;n&&a(e,n)}),i)}function H3e(e){let t=e.replace(/\u00a0/g,` `).replace(/\s+/g,` `).trim().toLowerCase();if(!t.startsWith(`all `)){if(t.startsWith(`interface`))return`interface`;if(t.startsWith(`class`))return`class`;if(t.startsWith(`enum`))return`enum`;if(t.startsWith(`record`))return`record`;if(t.startsWith(`exception`))return`exception`;if(t.startsWith(`error`))return`error`;if(t.startsWith(`annotation`))return`annotation`}}async function U3e(e){let t=await W3e(e)??await G3e(e),n=/* @__PURE__ */ new Set,r=[];for(let i of t)n.has(i.file)||(n.add(i.file),await OF.default.pathExists(Rt.join(e,i.file))&&r.push(i));return r}async function W3e(e){let t=Rt.join(e,`type-search-index.js`);if(!await OF.default.pathExists(t))return;let n=await OF.default.readFile(t,`utf8`),r=n.slice(n.indexOf(`=`)+1).trim().replace(/;$/,``),i;try{i=JSON.parse(r)}catch{return}if(!Array.isArray(i))return;let a=[];for(let e of i){let t=e.p,n=e.l?.replace(/<.*$/,``);t&&n&&WR.test(t)&&WR.test(n)&&a.push(q3e(t,n))}return a.length>0?a:void 0}async function G3e(e){let t=await K3e(e),n=[];for(let r of t){if(!WR.test(r))continue;let t=Rt.join(e,...r.split(`.`));if(await OF.default.pathExists(t))for(let e of await OF.default.readdir(t)){if(!e.endsWith(`.html`))continue;let t=e.slice(0,-5);!t.startsWith(`package-`)&&WR.test(t)&&n.push(q3e(r,t))}}return n}async function K3e(e){for(let t of[`element-list`,`package-list`]){let n=Rt.join(e,t);if(await OF.default.pathExists(n))return(await OF.default.readFile(n,`utf8`)).split(`
|
|
998
|
+
`).map(e=>e.trim()).filter(e=>e.length>0&&!e.startsWith(`module:`))}throw Error(`No element-list or package-list found in ${e}`)}function q3e(e,t){return{pkg:e,name:t,file:`${e.split(`.`).join(`/`)}/${t}.html`,slug:`${e.replace(/\./g,`-`)}/${t}`,kind:`class`}}function J3e(e,t,n,r){let i=cI(t);sI(i);let a=qR(i,e=>e.tagName===`main`)??qR(i,e=>e.properties?.id===`main-content`)??qR(i,e=>KR(e,`contentContainer`))??i,o=qR(a,e=>KR(e,`class-description`))??qR(a,e=>KR(e,`description`)),s=qR(a,e=>KR(e,`details`)),c=s6e(o),l=r??o6e(a),u=L3e.find(e=>e.kind===l)?.tag??`CLASS`,d=[o,s].filter(e=>e!==void 0),f=Y3e(e,n,Z3e(d)),p=[],m=/* @__PURE__ */ new Map,h=`MINTJAVADOC${In().replaceAll(`-`,``)}`;for(let e of d)$3e(e),t6e(e),Q3e(e,f),p.push(...n6e(e,m,h));let g=oR({type:`root`,children:d});for(let e of p)g=g.split(`\`\`\`\n${e}\n\`\`\``).join(`\`\`\`java\n${e}\n\`\`\``);for(let[e,t]of m)g=g.replaceAll(e,()=>t);return{slug:e.slug,title:e.name,description:c,tag:u,content:g,kind:l}}function Y3e(e,t,n){let r=e.pkg.split(`.`).join(`/`);return e=>{if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`))return e;if(e.startsWith(`#`)){let t=X3e(e.slice(1)).split(`(`)[0]??``;return n.has(t)?`#${t.toLowerCase()}`:void 0}let i=e.split(`#`)[0]??``;if(!i.endsWith(`.html`))return;let a=Rt.posix.normalize(Rt.posix.join(r,i)),o=t.get(a);return o===void 0?void 0:`/${o}`}}function X3e(e){try{return decodeURIComponent(e)}catch{return e}}function Z3e(e){let t=/* @__PURE__ */ new Set;for(let n of e)JR(n,e=>{if(!KR(e,`detail`))return;let n=e.properties.id;typeof n==`string`&&t.add(n.split(`(`)[0]??n)});return t}function Q3e(e,t){e.children=e.children.flatMap(e=>{if(e.type!==`element`||(Q3e(e,t),e.tagName!==`a`||typeof e.properties.href!=`string`))return[e];let n=t(e.properties.href);return n===void 0?e.children:(e.properties.href=n,[e])})}function $3e(e){e.children=e.children.filter(e=>e.type!==`element`||e.tagName!==`hr`&&!GR(e).some(e=>R3e.has(e)));for(let t of e.children)t.type===`element`&&(t.tagName===`a`&&delete t.properties.title,$3e(t))}const e6e=/* @__PURE__ */ new Set([`details-list`,`member-list`,`detail-list`]);function t6e(e){e.children=e.children.flatMap(e=>e.type!==`element`||e.tagName!==`ul`||!GR(e).some(e=>e6e.has(e))?[e]:e.children.flatMap(e=>e.type===`element`&&e.tagName===`li`?e.children:[]));for(let t of e.children)t.type===`element`&&t6e(t)}function n6e(e,t,n){let r=[],i=/* @__PURE__ */ new Map;return JR(e,e=>{if(!KR(e,`member-signature`)&&!KR(e,`type-signature`))return;let a=YR(e).replace(/\u00a0/g,` `).trim();r.push(a);let o=i6e(e);if(o){let r=`${n}TYPES${t.size}END`;t.set(r,o),i.set(e,r)}e.tagName=`pre`,e.properties={},e.children=[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:a}]}]}),r6e(e,i),r}function r6e(e,t){e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];r6e(e,t);let n=t.get(e);return n?[e,{type:`element`,tagName:`p`,properties:{},children:[{type:`text`,value:n}]}]:[e]})}function i6e(e){let t=[],n=qR(e,e=>KR(e,`parameters`)),r=n?a6e(yR(n.children)):[];r.some(e=>e.tokens.some(e=>e.href))&&t.push(`**Parameters**`,...r.map(({name:e,tokens:t})=>CR(e,t,!1)));let i=qR(e,e=>KR(e,`return-type`)),a=i?gR(bR(yR(i.children))):void 0;return a&&t.push(`**${n?`Returns`:`Type`}:** ${a}`),t.length?t.join(`
|
|
999
999
|
|
|
1000
|
-
`):void 0}function
|
|
1001
|
-
`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!
|
|
1002
|
-
`||e===`\r`}function g6e(e,t){let n=t;for(;t<e.length;t++)if(e[t]==`?`||e[t]==` `){let r=e.substr(n,t-n);if(t>5&&r===`xml`)return ZR(`InvalidXml`,`XML declaration allowed only at the start of the document.`,QR(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}continue}return t}function _6e(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t<e.length;t++)if(e[t]===`-`&&e[t+1]===`-`&&e[t+2]===`>`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t<e.length;t++)if(e[t]===`<`)n++;else if(e[t]===`>`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t<e.length;t++)if(e[t]===`]`&&e[t+1]===`]`&&e[t+2]===`>`){t+=2;break}}return t}function v6e(e,t){let n=``,r=``,i=!1;for(;t<e.length;t++){if(e[t]===`"`||e[t]===`'`)r===``?r=e[t]:r!==e[t]||(r=``);else if(e[t]===`>`&&r===``){i=!0;break}n+=e[t]}return r===``&&{value:n,index:t,tagClosed:i}}const y6e=/* @__PURE__ */ RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function b6e(e,t){let n=u6e(e,y6e),r={};for(let e=0;e<n.length;e++){if(n[e][1].length===0)return ZR(`InvalidAttr`,`Attribute '`+n[e][2]+`' has no space in starting.`,$R(n[e]));if(n[e][3]!==void 0&&n[e][4]===void 0)return ZR(`InvalidAttr`,`Attribute '`+n[e][2]+`' is without value.`,$R(n[e]));if(n[e][3]===void 0&&!t.allowBooleanAttributes)return ZR(`InvalidAttr`,`boolean attribute '`+n[e][2]+`' is not allowed.`,$R(n[e]));let i=n[e][2];if(!C6e(i))return ZR(`InvalidAttr`,`Attribute '`+i+`' is an invalid name.`,$R(n[e]));if(!Object.prototype.hasOwnProperty.call(r,i))r[i]=1;else return ZR(`InvalidAttr`,`Attribute '`+i+`' is repeated.`,$R(n[e]))}return!0}function x6e(e,t){let n=/\d/;for(e[t]===`x`&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(e[t]===`;`)return t;if(!e[t].match(n))break}return-1}function S6e(e,t){if(t++,e[t]===`;`)return-1;if(e[t]===`#`)return t++,x6e(e,t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===`;`)break;return-1}return t}function ZR(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function C6e(e){return YR(e)}function w6e(e){return YR(e)}function QR(e,t){let n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function $R(e){return e.startIndex+e[1].length}const T6e={amp:`&`,AMP:`&`,lt:`<`,LT:`<`,gt:`>`,GT:`>`,quot:`"`,QUOT:`"`,apos:`'`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,lsquor:`‚`,rsquor:`’`,ldquor:`„`,bdquo:`„`,comma:`,`,period:`.`,colon:`:`,semi:`;`,excl:`!`,quest:`?`,num:`#`,dollar:`$`,percent:`%`,amp:`&`,ast:`*`,commat:`@`,lowbar:`_`,verbar:`|`,vert:`|`,sol:`/`,bsol:`\\`,lbrace:`{`,rbrace:`}`,lbrack:`[`,rbrack:`]`,lpar:`(`,rpar:`)`,nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,COPY:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,REG:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,half:`½`,frac34:`¾`,iquest:`¿`,times:`×`,div:`÷`,divide:`÷`},E6e={Agrave:`À`,agrave:`à`,Aacute:`Á`,aacute:`á`,Acirc:`Â`,acirc:`â`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,Aring:`Å`,aring:`å`,AElig:`Æ`,aelig:`æ`,Ccedil:`Ç`,ccedil:`ç`,Egrave:`È`,egrave:`è`,Eacute:`É`,eacute:`é`,Ecirc:`Ê`,ecirc:`ê`,Euml:`Ë`,euml:`ë`,Igrave:`Ì`,igrave:`ì`,Iacute:`Í`,iacute:`í`,Icirc:`Î`,icirc:`î`,Iuml:`Ï`,iuml:`ï`,ETH:`Ð`,eth:`ð`,Ntilde:`Ñ`,ntilde:`ñ`,Ograve:`Ò`,ograve:`ò`,Oacute:`Ó`,oacute:`ó`,Ocirc:`Ô`,ocirc:`ô`,Otilde:`Õ`,otilde:`õ`,Ouml:`Ö`,ouml:`ö`,Oslash:`Ø`,oslash:`ø`,Ugrave:`Ù`,ugrave:`ù`,Uacute:`Ú`,uacute:`ú`,Ucirc:`Û`,ucirc:`û`,Uuml:`Ü`,uuml:`ü`,Yacute:`Ý`,yacute:`ý`,THORN:`Þ`,thorn:`þ`,szlig:`ß`,yuml:`ÿ`,Yuml:`Ÿ`},D6e={Amacr:`Ā`,amacr:`ā`,Abreve:`Ă`,abreve:`ă`,Aogon:`Ą`,aogon:`ą`,Cacute:`Ć`,cacute:`ć`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cdot:`Ċ`,cdot:`ċ`,Ccaron:`Č`,ccaron:`č`,Dcaron:`Ď`,dcaron:`ď`,Dstrok:`Đ`,dstrok:`đ`,Emacr:`Ē`,emacr:`ē`,Ecaron:`Ě`,ecaron:`ě`,Edot:`Ė`,edot:`ė`,Eogon:`Ę`,eogon:`ę`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gbreve:`Ğ`,gbreve:`ğ`,Gdot:`Ġ`,gdot:`ġ`,Gcedil:`Ģ`,Hcirc:`Ĥ`,hcirc:`ĥ`,Hstrok:`Ħ`,hstrok:`ħ`,Itilde:`Ĩ`,itilde:`ĩ`,Imacr:`Ī`,imacr:`ī`,Iogon:`Į`,iogon:`į`,Idot:`İ`,IJlig:`IJ`,ijlig:`ij`,Jcirc:`Ĵ`,jcirc:`ĵ`,Kcedil:`Ķ`,kcedil:`ķ`,kgreen:`ĸ`,Lacute:`Ĺ`,lacute:`ĺ`,Lcedil:`Ļ`,lcedil:`ļ`,Lcaron:`Ľ`,lcaron:`ľ`,Lmidot:`Ŀ`,lmidot:`ŀ`,Lstrok:`Ł`,lstrok:`ł`,Nacute:`Ń`,nacute:`ń`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ENG:`Ŋ`,eng:`ŋ`,Omacr:`Ō`,omacr:`ō`,Odblac:`Ő`,odblac:`ő`,OElig:`Œ`,oelig:`œ`,Racute:`Ŕ`,racute:`ŕ`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,Sacute:`Ś`,sacute:`ś`,Scirc:`Ŝ`,scirc:`ŝ`,Scedil:`Ş`,scedil:`ş`,Scaron:`Š`,scaron:`š`,Tcedil:`Ţ`,tcedil:`ţ`,Tcaron:`Ť`,tcaron:`ť`,Tstrok:`Ŧ`,tstrok:`ŧ`,Utilde:`Ũ`,utilde:`ũ`,Umacr:`Ū`,umacr:`ū`,Ubreve:`Ŭ`,ubreve:`ŭ`,Uring:`Ů`,uring:`ů`,Udblac:`Ű`,udblac:`ű`,Uogon:`Ų`,uogon:`ų`,Wcirc:`Ŵ`,wcirc:`ŵ`,Ycirc:`Ŷ`,ycirc:`ŷ`,Zacute:`Ź`,zacute:`ź`,Zdot:`Ż`,zdot:`ż`,Zcaron:`Ž`,zcaron:`ž`},O6e={Alpha:`Α`,alpha:`α`,Beta:`Β`,beta:`β`,Gamma:`Γ`,gamma:`γ`,Delta:`Δ`,delta:`δ`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,varepsilon:`ϵ`,Zeta:`Ζ`,zeta:`ζ`,Eta:`Η`,eta:`η`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,vartheta:`ϑ`,Iota:`Ι`,iota:`ι`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,varkappa:`ϰ`,Lambda:`Λ`,lambda:`λ`,Mu:`Μ`,mu:`μ`,Nu:`Ν`,nu:`ν`,Xi:`Ξ`,xi:`ξ`,Omicron:`Ο`,omicron:`ο`,Pi:`Π`,pi:`π`,piv:`ϖ`,varpi:`ϖ`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,varrho:`ϱ`,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,varsigma:`ς`,Tau:`Τ`,tau:`τ`,Upsilon:`Υ`,upsilon:`υ`,upsi:`υ`,Upsi:`ϒ`,upsih:`ϒ`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,varphi:`ϕ`,Chi:`Χ`,chi:`χ`,Psi:`Ψ`,psi:`ψ`,Omega:`Ω`,omega:`ω`,ohm:`Ω`,Gammad:`Ϝ`,gammad:`ϝ`,digamma:`ϝ`},k6e={Afr:`𝔄`,afr:`𝔞`,Acy:`А`,acy:`а`,Bcy:`Б`,bcy:`б`,Vcy:`В`,vcy:`в`,Gcy:`Г`,gcy:`г`,Dcy:`Д`,dcy:`д`,IEcy:`Е`,iecy:`е`,IOcy:`Ё`,iocy:`ё`,ZHcy:`Ж`,zhcy:`ж`,Zcy:`З`,zcy:`з`,Icy:`И`,icy:`и`,Jcy:`Й`,jcy:`й`,Kcy:`К`,kcy:`к`,Lcy:`Л`,lcy:`л`,Mcy:`М`,mcy:`м`,Ncy:`Н`,ncy:`н`,Ocy:`О`,ocy:`о`,Pcy:`П`,pcy:`п`,Rcy:`Р`,rcy:`р`,Scy:`С`,scy:`с`,Tcy:`Т`,tcy:`т`,Ucy:`У`,ucy:`у`,Fcy:`Ф`,fcy:`ф`,KHcy:`Х`,khcy:`х`,TScy:`Ц`,tscy:`ц`,CHcy:`Ч`,chcy:`ч`,SHcy:`Ш`,shcy:`ш`,SHCHcy:`Щ`,shchcy:`щ`,HARDcy:`Ъ`,hardcy:`ъ`,Ycy:`Ы`,ycy:`ы`,SOFTcy:`Ь`,softcy:`ь`,Ecy:`Э`,ecy:`э`,YUcy:`Ю`,yucy:`ю`,YAcy:`Я`,yacy:`я`,DJcy:`Ђ`,djcy:`ђ`,GJcy:`Ѓ`,gjcy:`ѓ`,Jukcy:`Є`,jukcy:`є`,DScy:`Ѕ`,dscy:`ѕ`,Iukcy:`І`,iukcy:`і`,YIcy:`Ї`,yicy:`ї`,Jsercy:`Ј`,jsercy:`ј`,LJcy:`Љ`,ljcy:`љ`,NJcy:`Њ`,njcy:`њ`,TSHcy:`Ћ`,tshcy:`ћ`,KJcy:`Ќ`,kjcy:`ќ`,Ubrcy:`Ў`,ubrcy:`ў`,DZcy:`Џ`,dzcy:`џ`},A6e={plus:`+`,minus:`−`,mnplus:`∓`,mp:`∓`,pm:`±`,times:`×`,div:`÷`,divide:`÷`,sdot:`⋅`,star:`☆`,starf:`★`,bigstar:`★`,lowast:`∗`,ast:`*`,midast:`*`,compfn:`∘`,smallcircle:`∘`,bullet:`•`,bull:`•`,nbsp:`\xA0`,hellip:`…`,mldr:`…`,prime:`′`,Prime:`″`,tprime:`‴`,bprime:`‵`,backprime:`‵`,minus:`−`,minusd:`∸`,dotminus:`∸`,plusdo:`∔`,dotplus:`∔`,plusmn:`±`,minusplus:`∓`,mnplus:`∓`,mp:`∓`,setminus:`∖`,smallsetminus:`∖`,Backslash:`∖`,setmn:`∖`,ssetmn:`∖`,lowbar:`_`,verbar:`|`,vert:`|`,VerticalLine:`|`,colon:`:`,Colon:`∷`,Proportion:`∷`,ratio:`∶`,equals:`=`,ne:`≠`,nequiv:`≢`,equiv:`≡`,Congruent:`≡`,sim:`∼`,thicksim:`∼`,thksim:`∼`,sime:`≃`,simeq:`≃`,TildeEqual:`≃`,asymp:`≈`,approx:`≈`,thickapprox:`≈`,thkap:`≈`,TildeTilde:`≈`,ncong:`≇`,cong:`≅`,TildeFullEqual:`≅`,asympeq:`≍`,CupCap:`≍`,bump:`≎`,Bumpeq:`≎`,HumpDownHump:`≎`,bumpe:`≏`,bumpeq:`≏`,HumpEqual:`≏`,dotminus:`∸`,minusd:`∸`,plusdo:`∔`,dotplus:`∔`,le:`≤`,LessEqual:`≤`,ge:`≥`,GreaterEqual:`≥`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,greater:`>`,less:`<`},j6e={alefsym:`ℵ`,aleph:`ℵ`,beth:`ℶ`,gimel:`ℷ`,daleth:`ℸ`,forall:`∀`,ForAll:`∀`,part:`∂`,PartialD:`∂`,exist:`∃`,Exists:`∃`,nexist:`∄`,nexists:`∄`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,varnothing:`∅`,nabla:`∇`,Del:`∇`,isin:`∈`,isinv:`∈`,in:`∈`,Element:`∈`,notin:`∉`,notinva:`∉`,ni:`∋`,niv:`∋`,SuchThat:`∋`,ReverseElement:`∋`,notni:`∌`,notniva:`∌`,prod:`∏`,Product:`∏`,coprod:`∐`,Coproduct:`∐`,sum:`∑`,Sum:`∑`,minus:`−`,mp:`∓`,plusdo:`∔`,dotplus:`∔`,setminus:`∖`,lowast:`∗`,radic:`√`,Sqrt:`√`,prop:`∝`,propto:`∝`,Proportional:`∝`,varpropto:`∝`,infin:`∞`,infintie:`⧝`,ang:`∠`,angle:`∠`,angmsd:`∡`,measuredangle:`∡`,angsph:`∢`,mid:`∣`,VerticalBar:`∣`,nmid:`∤`,nsmid:`∤`,npar:`∦`,parallel:`∥`,spar:`∥`,nparallel:`∦`,nspar:`∦`,and:`∧`,wedge:`∧`,or:`∨`,vee:`∨`,cap:`∩`,cup:`∪`,int:`∫`,Integral:`∫`,conint:`∮`,ContourIntegral:`∮`,Conint:`∯`,DoubleContourIntegral:`∯`,Cconint:`∰`,there4:`∴`,therefore:`∴`,Therefore:`∴`,becaus:`∵`,because:`∵`,Because:`∵`,ratio:`∶`,Proportion:`∷`,minusd:`∸`,dotminus:`∸`,mDDot:`∺`,homtht:`∻`,sim:`∼`,bsimg:`∽`,backsim:`∽`,ac:`∾`,mstpos:`∾`,acd:`∿`,VerticalTilde:`≀`,wr:`≀`,wreath:`≀`,nsime:`≄`,nsimeq:`≄`,nsimeq:`≄`,ncong:`≇`,simne:`≆`,ncongdot:`⩭̸`,ngsim:`≵`,nsim:`≁`,napprox:`≉`,nap:`≉`,ngeq:`≱`,nge:`≱`,nleq:`≰`,nle:`≰`,ngtr:`≯`,ngt:`≯`,nless:`≮`,nlt:`≮`,nprec:`⊀`,npr:`⊀`,nsucc:`⊁`,nsc:`⊁`},M6e={larr:`←`,leftarrow:`←`,LeftArrow:`←`,uarr:`↑`,uparrow:`↑`,UpArrow:`↑`,rarr:`→`,rightarrow:`→`,RightArrow:`→`,darr:`↓`,downarrow:`↓`,DownArrow:`↓`,harr:`↔`,leftrightarrow:`↔`,LeftRightArrow:`↔`,varr:`↕`,updownarrow:`↕`,UpDownArrow:`↕`,nwarr:`↖`,nwarrow:`↖`,UpperLeftArrow:`↖`,nearr:`↗`,nearrow:`↗`,UpperRightArrow:`↗`,searr:`↘`,searrow:`↘`,LowerRightArrow:`↘`,swarr:`↙`,swarrow:`↙`,LowerLeftArrow:`↙`,lArr:`⇐`,Leftarrow:`⇐`,uArr:`⇑`,Uparrow:`⇑`,rArr:`⇒`,Rightarrow:`⇒`,dArr:`⇓`,Downarrow:`⇓`,hArr:`⇔`,Leftrightarrow:`⇔`,iff:`⇔`,vArr:`⇕`,Updownarrow:`⇕`,lAarr:`⇚`,Lleftarrow:`⇚`,rAarr:`⇛`,Rrightarrow:`⇛`,lrarr:`⇆`,leftrightarrows:`⇆`,rlarr:`⇄`,rightleftarrows:`⇄`,lrhar:`⇋`,leftrightharpoons:`⇋`,ReverseEquilibrium:`⇋`,rlhar:`⇌`,rightleftharpoons:`⇌`,Equilibrium:`⇌`,udarr:`⇅`,UpArrowDownArrow:`⇅`,duarr:`⇵`,DownArrowUpArrow:`⇵`,llarr:`⇇`,leftleftarrows:`⇇`,rrarr:`⇉`,rightrightarrows:`⇉`,ddarr:`⇊`,downdownarrows:`⇊`,har:`↽`,lhard:`↽`,leftharpoondown:`↽`,lharu:`↼`,leftharpoonup:`↼`,rhard:`⇁`,rightharpoondown:`⇁`,rharu:`⇀`,rightharpoonup:`⇀`,lsh:`↰`,Lsh:`↰`,rsh:`↱`,Rsh:`↱`,ldsh:`↲`,rdsh:`↳`,hookleftarrow:`↩`,hookrightarrow:`↪`,mapstoleft:`↤`,mapstoup:`↥`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,crarr:`↵`,nwarrow:`↖`,nearrow:`↗`,searrow:`↘`,swarrow:`↙`,nleftarrow:`↚`,nleftrightarrow:`↮`,nrightarrow:`↛`,nrarr:`↛`,larrtl:`↢`,rarrtl:`↣`,leftarrowtail:`↢`,rightarrowtail:`↣`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Larr:`↞`,Rarr:`↠`,larrhk:`↩`,rarrhk:`↪`,larrlp:`↫`,looparrowleft:`↫`,rarrlp:`↬`,looparrowright:`↬`,harrw:`↭`,leftrightsquigarrow:`↭`,nrarrw:`↝̸`,rarrw:`↝`,rightsquigarrow:`↝`,larrbfs:`⤟`,rarrbfs:`⤠`,nvHarr:`⤄`,nvlArr:`⤂`,nvrArr:`⤃`,larrfs:`⤝`,rarrfs:`⤞`,Map:`⤅`,larrsim:`⥳`,rarrsim:`⥴`,harrcir:`⥈`,Uarrocir:`⥉`,lurdshar:`⥊`,ldrdhar:`⥧`,ldrushar:`⥋`,rdldhar:`⥩`,lrhard:`⥭`,rlhar:`⇌`,uharr:`↾`,uharl:`↿`,dharr:`⇂`,dharl:`⇃`,Uarr:`↟`,Darr:`↡`,zigrarr:`⇝`,nwArr:`⇖`,neArr:`⇗`,seArr:`⇘`,swArr:`⇙`,nharr:`↮`,nhArr:`⇎`,nlarr:`↚`,nlArr:`⇍`,nrarr:`↛`,nrArr:`⇏`,larrb:`⇤`,LeftArrowBar:`⇤`,rarrb:`⇥`,RightArrowBar:`⇥`},N6e={square:`□`,Square:`□`,squ:`□`,squf:`▪`,squarf:`▪`,blacksquar:`▪`,blacksquare:`▪`,FilledVerySmallSquare:`▪`,blk34:`▓`,blk12:`▒`,blk14:`░`,block:`█`,srect:`▭`,rect:`▭`,sdot:`⋅`,sdotb:`⊡`,dotsquare:`⊡`,triangle:`▵`,tri:`▵`,trine:`▵`,utri:`▵`,triangledown:`▿`,dtri:`▿`,tridown:`▿`,triangleleft:`◃`,ltri:`◃`,triangleright:`▹`,rtri:`▹`,blacktriangle:`▴`,utrif:`▴`,blacktriangledown:`▾`,dtrif:`▾`,blacktriangleleft:`◂`,ltrif:`◂`,blacktriangleright:`▸`,rtrif:`▸`,loz:`◊`,lozenge:`◊`,blacklozenge:`⧫`,lozf:`⧫`,bigcirc:`◯`,xcirc:`◯`,circ:`ˆ`,Circle:`○`,cir:`○`,o:`○`,bullet:`•`,bull:`•`,hellip:`…`,mldr:`…`,nldr:`‥`,boxh:`─`,HorizontalLine:`─`,boxv:`│`,boxdr:`┌`,boxdl:`┐`,boxur:`└`,boxul:`┘`,boxvr:`├`,boxvl:`┤`,boxhd:`┬`,boxhu:`┴`,boxvh:`┼`,boxH:`═`,boxV:`║`,boxdR:`╒`,boxDr:`╓`,boxDR:`╔`,boxDl:`╕`,boxdL:`╖`,boxDL:`╗`,boxuR:`╘`,boxUr:`╙`,boxUR:`╚`,boxUl:`╜`,boxuL:`╛`,boxUL:`╝`,boxvR:`╞`,boxVr:`╟`,boxVR:`╠`,boxVl:`╢`,boxvL:`╡`,boxVL:`╣`,boxHd:`╤`,boxhD:`╥`,boxHD:`╦`,boxHu:`╧`,boxhU:`╨`,boxHU:`╩`,boxvH:`╪`,boxVh:`╫`,boxVH:`╬`},P6e={excl:`!`,iexcl:`¡`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,nbsp:`\xA0`,comma:`,`,period:`.`,colon:`:`,semi:`;`,vert:`|`,Verbar:`‖`,verbar:`|`,dblac:`˝`,circ:`ˆ`,caron:`ˇ`,breve:`˘`,dot:`˙`,ring:`˚`,ogon:`˛`,tilde:`˜`,DiacriticalGrave:"`",DiacriticalAcute:`´`,DiacriticalTilde:`˜`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,grave:"`",acute:`´`},F6e={cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,euro:`€`,dollar:`$`,euro:`€`,fnof:`ƒ`,inr:`₹`,af:`؋`,birr:`ብር`,peso:`₱`,rub:`₽`,won:`₩`,yuan:`¥`,cedil:`¸`},I6e={frac12:`½`,half:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`},L6e={trade:`™`,TRADE:`™`,telrec:`⌕`,target:`⌖`,ulcorn:`⌜`,ulcorner:`⌜`,urcorn:`⌝`,urcorner:`⌝`,dlcorn:`⌞`,llcorner:`⌞`,drcorn:`⌟`,lrcorner:`⌟`,intercal:`⊺`,intcal:`⊺`,oplus:`⊕`,CirclePlus:`⊕`,ominus:`⊖`,CircleMinus:`⊖`,otimes:`⊗`,CircleTimes:`⊗`,osol:`⊘`,odot:`⊙`,CircleDot:`⊙`,oast:`⊛`,circledast:`⊛`,odash:`⊝`,circleddash:`⊝`,ocirc:`⊚`,circledcirc:`⊚`,boxplus:`⊞`,plusb:`⊞`,boxminus:`⊟`,minusb:`⊟`,boxtimes:`⊠`,timesb:`⊠`,boxdot:`⊡`,sdotb:`⊡`,veebar:`⊻`,vee:`∨`,barvee:`⊽`,and:`∧`,wedge:`∧`,Cap:`⋒`,Cup:`⋓`,Fork:`⋔`,pitchfork:`⋔`,epar:`⋕`,ltlarr:`⥶`,nvap:`≍⃒`,nvsim:`∼⃒`,nvge:`≥⃒`,nvle:`≤⃒`,nvlt:`<⃒`,nvgt:`>⃒`,nvltrie:`⊴⃒`,nvrtrie:`⊵⃒`,Vdash:`⊩`,dashv:`⊣`,vDash:`⊨`,Vdash:`⊩`,Vvdash:`⊪`,nvdash:`⊬`,nvDash:`⊭`,nVdash:`⊮`,nVDash:`⊯`};({...T6e,...E6e,...D6e,...O6e,...k6e,...A6e,...j6e,...M6e,...N6e,...P6e,...F6e,...I6e,...L6e});const R6e={amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`},z6e={nbsp:`\xA0`,copy:`©`,reg:`®`,trade:`™`,mdash:`—`,ndash:`–`,hellip:`…`,laquo:`«`,raquo:`»`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,bull:`•`,para:`¶`,sect:`§`,deg:`°`,frac12:`½`,frac14:`¼`,frac34:`¾`},B6e=/* @__PURE__ */ new Set(`!?\\\\/[]$%{}^&*()<>|+`);function V6e(e){if(e[0]===`#`)throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if(B6e.has(t))throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function ez(...e){let t=Object.create(null);for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(typeof r==`string`)t[e]=r;else if(r&&typeof r==`object`&&r.val!==void 0){let n=r.val;typeof n==`string`&&(t[e]=n)}}return t}const tz=`external`,nz=`base`;function H6e(e){return!e||e===tz?/* @__PURE__ */ new Set([tz]):e===`all`?/* @__PURE__ */ new Set([`all`]):e===nz?/* @__PURE__ */ new Set([nz]):Array.isArray(e)?new Set(e):/* @__PURE__ */ new Set([tz])}const rz=Object.freeze({allow:0,leave:1,remove:2,throw:3}),U6e=/* @__PURE__ */ new Set([9,10,13]);function W6e(e){if(!e)return{xmlVersion:1,onLevel:rz.allow,nullLevel:rz.remove};let t=e.xmlVersion===1.1?1.1:1,n=rz[e.onNCR]??rz.allow,r=rz[e.nullNCR]??rz.remove;return{xmlVersion:t,onLevel:n,nullLevel:Math.max(r,rz.remove)}}var G6e=class{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck==`function`?e.postCheck:e=>e,this._limitTiers=H6e(this._limit.applyLimitsTo??tz),this._numericAllowed=e.numericAllowed??!0,this._baseMap=ez(R6e,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let t=W6e(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel}setExternalEntities(e){if(e)for(let t of Object.keys(e))V6e(t);this._externalMap=ez(e)}addExternalEntity(e,t){V6e(e),typeof t==`string`&&t.indexOf(`&`)===-1&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=ez(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!=`string`||e.length===0)return e;let t=e,n=[],r=e.length,i=0,a=0,o=this._maxTotalExpansions>0,s=this._maxExpandedLength>0,c=o||s;for(;a<r;){if(e.charCodeAt(a)!==38){a++;continue}let t=a+1;for(;t<r&&e.charCodeAt(t)!==59&&t-a<=32;)t++;if(t>=r||e.charCodeAt(t)!==59){a++;continue}let l=e.slice(a+1,t);if(l.length===0){a++;continue}let u,d;if(this._removeSet.has(l))u=``,d===void 0&&(d=tz);else if(this._leaveSet.has(l)){a++;continue}else if(l.charCodeAt(0)===35){let e=this._resolveNCR(l);if(e===void 0){a++;continue}u=e,d=nz}else{let e=this._resolveName(l);u=e?.value,d=e?.tier}if(u===void 0)a++;else if(a>i&&n.push(e.slice(i,a)),n.push(u),i=t+1,a=i,c&&this._tierCounts(d)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(s){let e=u.length-(l.length+2);if(e>0&&(this._expandedLength+=e,this._expandedLength>this._maxExpandedLength))throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}i<r&&n.push(e.slice(i));let l=n.length===0?e:n.join(``);return this._postCheck(l,t)}_tierCounts(e){return this._limitTiers.has(`all`)?!0:this._limitTiers.has(e)}_resolveName(e){if(e in this._inputMap)return{value:this._inputMap[e],tier:tz};if(e in this._externalMap)return{value:this._externalMap[e],tier:tz};if(e in this._baseMap)return{value:this._baseMap[e],tier:nz}}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!U6e.has(e)?rz.remove:-1}_applyNCRAction(e,t,n){switch(e){case rz.allow:return String.fromCodePoint(n);case rz.remove:return``;case rz.leave:return;case rz.throw:throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,`0`)})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(n=t===120||t===88?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let r=this._classifyNCR(n);if(!this._numericAllowed&&r<rz.remove)return;let i=r===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,r);return this._applyNCRAction(i,e,n)}};const K6e=e=>XR.includes(e)?`__`+e:e,q6e={preserveOrder:!1,attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:K6e};function J6e(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(XR.some(e=>n===e.toLowerCase())||f6e.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Y6e(e,t){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:`all`}:typeof e==`object`&&e?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??`all`}:Y6e(!0)}const X6e=function(e){let t=Object.assign({},q6e,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&J6e(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=K6e),t.processEntities=Y6e(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t};let iz;iz=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var az=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){e.tagname===`__proto__`&&(e.tagname=`#__proto__`),e[`:@`]&&Object.keys(e[`:@`]).length>0?this.child.push({[e.tagname]:e.child,":@":e[`:@`]}):this.child.push({[e.tagname]:e.child}),t!==void 0&&(this.child[this.child.length-1][iz]={startIndex:t})}static getMetaDataSymbol(){return iz}},Z6e=class{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]===`O`&&e[t+4]===`C`&&e[t+5]===`T`&&e[t+6]===`Y`&&e[t+7]===`P`&&e[t+8]===`E`){t+=9;let i=1,a=!1,o=!1,s=``;for(;t<e.length;t++)if(e[t]===`<`&&!o){if(a&&sz(e,`!ENTITY`,t)){t+=7;let i,a;if([i,a,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),a.indexOf(`&`)===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&r>=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[i]=a,r++}}else if(a&&sz(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&sz(e,`!ATTLIST`,t))t+=8;else if(a&&sz(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else if(sz(e,`!--`,t))o=!0;else throw Error(`Invalid DOCTYPE`);i++,s=``}else if(e[t]===`>`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];if(i!==0)throw Error(`Unclosed DOCTYPE`)}else throw Error(`Invalid Tag instead of DOCTYPE`);return{entities:n,i:t}}readEntityExp(e,t){t=oz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!==`"`&&e[t]!==`'`;)t++;let r=e.substring(n,t);if(cz(r),t=oz(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()===`SYSTEM`)throw Error(`External entities are not supported`);if(e[t]===`%`)throw Error(`Parameter entities are not supported`)}let i=``;if([t,i]=this.readIdentifierVal(e,t,`entity`),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&i.length>this.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[r,i,t]}readNotationExp(e,t){t=oz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);!this.suppressValidationErr&&cz(r),t=oz(e,t);let i=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&i!==`SYSTEM`&&i!==`PUBLIC`)throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);t+=i.length,t=oz(e,t);let a=null,o=null;if(i===`PUBLIC`)[t,a]=this.readIdentifierVal(e,t,`publicIdentifier`),t=oz(e,t),(e[t]===`"`||e[t]===`'`)&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`));else if(i===`SYSTEM`&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`),!this.suppressValidationErr&&!o))throw Error(`Missing mandatory system identifier for SYSTEM notation`);return{notationName:r,publicIdentifier:a,systemIdentifier:o,index:--t}}readIdentifierVal(e,t,n){let r=``,i=e[t];if(i!==`"`&&i!==`'`)throw Error(`Expected quoted string, found "${i}"`);t++;let a=t;for(;t<e.length&&e[t]!==i;)t++;if(r=e.substring(a,t),e[t]!==i)throw Error(`Unterminated ${n} value`);return t++,[t,r]}readElementExp(e,t){t=oz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);if(!this.suppressValidationErr&&!YR(r))throw Error(`Invalid element name: "${r}"`);t=oz(e,t);let i=``;if(e[t]===`E`&&sz(e,`MPTY`,t))t+=4;else if(e[t]===`A`&&sz(e,`NY`,t))t+=2;else if(e[t]===`(`){t++;let n=t;for(;t<e.length&&e[t]!==`)`;)t++;if(i=e.substring(n,t),e[t]!==`)`)throw Error(`Unterminated content model`)}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:i.trim(),index:t}}readAttlistExp(e,t){t=oz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);for(cz(r),t=oz(e,t),n=t;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);if(!cz(i))throw Error(`Invalid attribute name: "${i}"`);t=oz(e,t);let a=``;if(e.substring(t,t+8).toUpperCase()===`NOTATION`){if(a=`NOTATION`,t+=8,t=oz(e,t),e[t]!==`(`)throw Error(`Expected '(', found "${e[t]}"`);t++;let n=[];for(;t<e.length&&e[t]!==`)`;){let r=t;for(;t<e.length&&e[t]!==`|`&&e[t]!==`)`;)t++;let i=e.substring(r,t);if(i=i.trim(),!cz(i))throw Error(`Invalid notation name: "${i}"`);n.push(i),e[t]===`|`&&(t++,t=oz(e,t))}if(e[t]!==`)`)throw Error(`Unterminated list of notations`);t++,a+=` (`+n.join(`|`)+`)`}else{let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;if(a+=e.substring(n,t),!this.suppressValidationErr&&![`CDATA`,`ID`,`IDREF`,`IDREFS`,`ENTITY`,`ENTITIES`,`NMTOKEN`,`NMTOKENS`].includes(a.toUpperCase()))throw Error(`Invalid attribute type: "${a}"`)}t=oz(e,t);let o=``;return e.substring(t,t+8).toUpperCase()===`#REQUIRED`?(o=`#REQUIRED`,t+=8):e.substring(t,t+7).toUpperCase()===`#IMPLIED`?(o=`#IMPLIED`,t+=7):[t,o]=this.readIdentifierVal(e,t,`ATTLIST`),{elementName:r,attributeName:i,attributeType:a,defaultValue:o,index:t}}};const oz=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function sz(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function cz(e){if(YR(e))return e;throw Error(`Invalid entity name ${e}`)}const Q6e=/^[-+]?0x[a-fA-F0-9]+$/,$6e=/^0b[01]+$/,e8e=/^0o[0-7]+$/,t8e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,n8e={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:`.`,eNotation:!0,infinity:`original`};function r8e(e,t={}){if(t=Object.assign({},n8e,t),!e||typeof e!=`string`)return e;let n=e.trim();if(n.length===0||t.skipLike!==void 0&&t.skipLike.test(n))return e;if(n===`0`)return 0;if(t.hex&&Q6e.test(n))return lz(n,16);if(t.binary&&$6e.test(n))return lz(n,2);if(t.octal&&e8e.test(n))return lz(n,8);if(!isFinite(n))return s8e(e,Number(n),t);if(n.includes(`e`)||n.includes(`E`))return a8e(e,n,t);{let r=t8e.exec(n);if(r){let i=r[1]||``,a=r[2],o=o8e(r[3]),s=i?e[a.length+1]===`.`:e[a.length]===`.`;if(!t.leadingZeros&&(a.length>1||a.length===1&&!s))return e;{let r=Number(n),s=String(r);if(r===0)return r;if(s.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return s===`0`||s===o||s===`${i}${o}`?r:e;let c=a?o:n;return a?c===s||i+c===s?r:e:c===s||c===i+s?r:e}}return e}}const i8e=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function a8e(e,t,n){if(!n.eNotation)return e;let r=t.match(i8e);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length===1&&(r[3].startsWith(`.${a}`)||r[3][0]===a)?Number(t):o.length>0?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}return e}function o8e(e){return e&&e.indexOf(`.`)!==-1&&(e=e.replace(/0+$/,``),e===`.`?e=`0`:e[0]===`.`?e=`0`+e:e[e.length-1]===`.`&&(e=e.substring(0,e.length-1))),e}function lz(e,t){let n=e.trim();if((t===2||t===8)&&(e=n.substring(2)),parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}function s8e(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}function c8e(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var l8e=class{constructor(e,t={},n){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n<e.length;)e[n]===this.separator?n+1<e.length&&e[n+1]===this.separator?(r.trim()&&(t.push(this._parseSegment(r.trim())),r=``),t.push({type:`deep-wildcard`}),n+=2):(r.trim()&&t.push(this._parseSegment(r.trim())),r=``,n++):(r+=e[n],n++);return r.trim()&&t.push(this._parseSegment(r.trim())),t}_parseSegment(e){let t={type:`tag`},n=null,r=e,i=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(i&&(r=i[1]+i[3],i[2])){let e=i[2].slice(1,-1);e&&(n=e)}let a,o=r;if(r.includes(`::`)){let t=r.indexOf(`::`);if(a=r.substring(0,t).trim(),o=r.substring(t+2).trim(),!a)throw Error(`Invalid namespace in pattern: ${e}`)}let s,c=null;if(o.includes(`:`)){let e=o.lastIndexOf(`:`),t=o.substring(0,e).trim(),n=o.substring(e+1).trim();[`first`,`last`,`odd`,`even`].includes(n)||/^nth\(\d+\)$/.test(n)?(s=t,c=n):s=o}else s=o;if(!s)throw Error(`Invalid segment pattern: ${e}`);if(t.tag=s,a&&(t.namespace=a),n){if(n.includes(`=`)){let e=n.indexOf(`=`);t.attrName=n.substring(0,e).trim(),t.attrValue=n.substring(e+1).trim()}else t.attrName=n.trim()}if(c){let e=c.match(/^nth\((\d+)\)$/);e?(t.position=`nth`,t.positionValue=parseInt(e[1],10)):t.position=c}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}},u8e=class{constructor(){this._byDepthAndTag=/* @__PURE__ */ new Map,this._wildcardByDepth=/* @__PURE__ */ new Map,this._deepWildcards=[],this._patterns=/* @__PURE__ */ new Set,this._sealed=!1}add(e){if(this._sealed)throw TypeError(`ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.`);if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard())return this._deepWildcards.push(e),this;let t=e.length,n=e.segments[e.segments.length-1]?.tag;if(!n||n===`*`)this._wildcardByDepth.has(t)||this._wildcardByDepth.set(t,[]),this._wildcardByDepth.get(t).push(e);else{let r=`${t}:${n}`;this._byDepthAndTag.has(r)||this._byDepthAndTag.set(r,[]),this._byDepthAndTag.get(r).push(e)}return this}addAll(e){for(let t of e)this.add(t);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return this.findMatch(e)!==null}findMatch(e){let t=e.getDepth(),n=`${t}:${e.getCurrentTag()}`,r=this._byDepthAndTag.get(n);if(r){for(let t=0;t<r.length;t++)if(e.matches(r[t]))return r[t]}let i=this._wildcardByDepth.get(t);if(i){for(let t=0;t<i.length;t++)if(e.matches(i[t]))return i[t]}for(let t=0;t<this._deepWildcards.length;t++)if(e.matches(this._deepWildcards[t]))return this._deepWildcards[t];return null}},d8e=class{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){let e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let n=t[t.length-1];return n.values!==void 0&&e in n.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},f8e=class{constructor(e={}){this.separator=e.separator||`.`,this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new d8e(this)}push(e,t=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=/* @__PURE__ */ new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;if(n===this.separator&&t===!0){if(this._pathStringCache!==null)return this._pathStringCache;let e=this.path.map(e=>e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(!this._matchSegment(e[t],this.path[t],t===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,n=e.length-1;for(;n>=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--)if(this._matchSegment(r,this.path[e],e===this.path.length-1)){t=e-1,n--,i=!0;break}if(!i)return!1}else{if(!this._matchSegment(r,this.path[t],t===this.path.length-1))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace||e.attrName!==void 0&&(!n||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}};function p8e(e,t){if(!e)return{};let n=t.attributesGroupName?e[t.attributesGroupName]:e;if(!n)return{};let r={};for(let e in n)if(e.startsWith(t.attributeNamePrefix)){let i=e.substring(t.attributeNamePrefix.length);r[i]=n[e]}else r[e]=n[e];return r}function m8e(e){if(!e||typeof e!=`string`)return;let t=e.indexOf(`:`);if(t!==-1&&t>0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}var h8e=class{constructor(e,t){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=b8e,this.parseTextData=g8e,this.resolveNameSpace=_8e,this.buildAttributesMap=y8e,this.isItStopNode=w8e,this.replaceEntitiesValue=S8e,this.readStopNodeData=D8e,this.saveTextToParentTag=C8e,this.addChild=x8e,this.ignoreAttributesFn=c8e(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0;let n={...R6e};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities==`object`?n=this.options.htmlEntities:this.options.htmlEntities===!0&&(n={...z6e,...F6e}),this.entityDecoder=new G6e({namedEntities:{...n,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new f8e,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new u8e;let r=this.options.stopNodes;if(r&&r.length>0){for(let e=0;e<r.length;e++){let t=r[e];typeof t==`string`?this.stopNodeExpressionsSet.add(new l8e(t)):t instanceof l8e&&this.stopNodeExpressionsSet.add(t)}this.stopNodeExpressionsSet.seal()}}};function g8e(e,t,n,r,i,a,o){let s=this.options;if(e!==void 0&&(s.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=s.jPath?n.toString():n,c=s.tagValueProcessor(t,e,r,i,a);return c==null?e:typeof c!=typeof e||c!==e?c:s.trimValues||e.trim()===e?O8e(e,s.parseTagValue,s.numberParseOptions):e}}function _8e(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}const v8e=/* @__PURE__ */ RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function y8e(e,t,n,r=!1){let i=this.options;if(r===!0||i.ignoreAttributes!==!0&&typeof e==`string`){let r=u6e(e,v8e),a=r.length,o={},s=Array(a),c=!1,l={};for(let e=0;e<a;e++){let t=this.resolveNameSpace(r[e][1]),a=r[e][4];if(t.length&&a!==void 0){let r=a;i.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r,n,this.readonlyMatcher),s[e]=r,l[t]=r,c=!0}}c&&typeof t==`object`&&t.updateCurrent&&t.updateCurrent(l);let u=i.jPath?t.toString():this.readonlyMatcher,d=!1;for(let e=0;e<a;e++){let t=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(t,u))continue;let n=i.attributeNamePrefix+t;if(t.length){if(i.transformAttributeName&&(n=i.transformAttributeName(n)),n=k8e(n,i),r[e][4]!==void 0){let r=s[e],a=i.attributeValueProcessor(t,r,u);a==null?o[n]=r:typeof a!=typeof r||a!==r?o[n]=a:o[n]=O8e(r,i.parseAttributeValue,i.numberParseOptions),d=!0}else i.allowBooleanAttributes&&(o[n]=!0,d=!0)}}if(!d)return;if(i.attributesGroupName&&!i.preserveOrder){let e={};return e[i.attributesGroupName]=o,e}return o}}const b8e=function(e){e=e.replace(/\r\n?/g,`
|
|
1003
|
-
`);let t=new az(`!xml`),n=t,r=``;this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,a=new Z6e(i.processEntities),o=e.length;for(let s=0;s<o;s++)if(e[s]===`<`){let c=e.charCodeAt(s+1);if(c===47){let t=uz(e,`>`,s,`Closing Tag is not closed.`),a=e.substring(s+2,t).trim();if(i.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}a=fz(i.transformTagName,a,``,i).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(a&&i.unpairedTagsSet.has(a))throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);o&&i.unpairedTagsSet.has(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,s=t}else if(c===63){let t=dz(e,s,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let a=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName,!0);if(a){let e=a[this.options.attributeNamePrefix+`version`];this.entityDecoder.setXmlVersion(Number(e)||1)}if(!(i.ignoreDeclaration&&t.tagName===`?xml`||i.ignorePiTags)){let e=new az(t.tagName);e.add(i.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&i.ignoreAttributes!==!0&&(e[`:@`]=a),this.addChild(n,e,this.readonlyMatcher,s)}s=t.closeIndex+1}else if(c===33&&e.charCodeAt(s+2)===45&&e.charCodeAt(s+3)===45){let t=uz(e,`-->`,s+4,`Comment is not closed.`);if(i.commentPropName){let a=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(i.commentPropName,[{[i.textNodeName]:a}])}s=t}else if(c===33&&e.charCodeAt(s+2)===68){let t=a.readDocType(e,s);this.entityDecoder.addInputEntities(t.entities),s=t.i}else if(c===33&&e.charCodeAt(s+2)===91){let t=uz(e,`]]>`,s,`CDATA is not closed.`)-2,a=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(a,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,i.cdataPropName?n.add(i.cdataPropName,[{[i.textNodeName]:a}]):n.add(i.textNodeName,o),s=t+2}else{let a=dz(e,s,i.removeNSPrefix);if(!a){let t=e.substring(Math.max(0,s-50),Math.min(o,s+50));throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`)}let c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;if({tagName:c,tagExp:u}=fz(i.transformTagName,c,u,i),i.strictReservedNames&&(c===i.commentPropName||c===i.cdataPropName||c===i.textNodeName||c===i.attributesGroupName))throw Error(`Invalid tag name: ${c}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let p=n;p&&i.unpairedTagsSet.has(p.tagname)&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let m=!1;u.length>0&&u.lastIndexOf(`/`)===u.length-1&&(m=!0,c[c.length-1]===`/`?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),d=c!==u);let h=null,g;g=m8e(l),c!==t.tagname&&this.matcher.push(c,{},g),c!==u&&d&&(h=this.buildAttributesMap(u,this.matcher,c),h&&p8e(h,i)),c!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let _=s;if(this.isCurrentNodeStopNode){let t=``;if(m)s=a.closeIndex;else if(i.unpairedTagsSet.has(c))s=a.closeIndex;else{let n=this.readStopNodeData(e,l,f+1);if(!n)throw Error(`Unexpected end of ${l}`);s=n.i,t=n.tagContent}let r=new az(c);h&&(r[`:@`]=h),r.add(i.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,_)}else{if(m){({tagName:c,tagExp:u}=fz(i.transformTagName,c,u,i));let e=new az(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(c)){let e=new az(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=a.closeIndex;continue}else{let e=new az(c);if(this.tagsNodeStack.length>i.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),n=e}r=``,s=f}}}else r+=e[s];return t.child};function x8e(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);a===!1||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function S8e(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}return this.entityDecoder.decode(e)}function C8e(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[`:@`]?Object.keys(t[`:@`]).length!==0:!1,r),e!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function w8e(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function T8e(e,t,n=`>`){let r=0,i=e.length,a=n.charCodeAt(0),o=n.length>1?n.charCodeAt(1):-1,s=``,c=t;for(let n=t;n<i;n++){let t=e.charCodeAt(n);if(r)t===r&&(r=0);else if(t===34||t===39)r=t;else if(t===a){if(o!==-1){if(e.charCodeAt(n+1)===o)return s+=e.substring(c,n),{data:s,index:n}}else return s+=e.substring(c,n),{data:s,index:n}}else t===9&&!r&&(s+=e.substring(c,n)+` `,c=n+1)}}function uz(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function E8e(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i}function dz(e,t,n,r=`>`){let i=T8e(e,t+1,r);if(!i)return;let a=i.data,o=i.index,s=a.search(/\s/),c=a,l=!0;s!==-1&&(c=a.substring(0,s),a=a.substring(s+1).trimStart());let u=c;if(n){let e=c.indexOf(`:`);e!==-1&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:u}}function D8e(e,t,n){let r=n,i=1,a=e.length;for(;n<a;n++)if(e[n]===`<`){let a=e.charCodeAt(n+1);if(a===47){let a=E8e(e,`>`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(a===63)n=uz(e,`?>`,n+1,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===45&&e.charCodeAt(n+3)===45)n=uz(e,`-->`,n+3,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===91)n=uz(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=dz(e,n,!1);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}}function O8e(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`||t!==`false`&&r8e(e,n)}return d6e(e)?e:``}function fz(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return t=k8e(t,r),{tagName:t,tagExp:n}}function k8e(e,t){if(f6e.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return XR.includes(e)?t.onDangerousProperty(e):e}const pz=az.getMetaDataSymbol();function A8e(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)if(r.startsWith(t)){let i=r.substring(t.length);n[i]=e[r]}else n[r]=e[r];return n}function j8e(e,t,n,r){return M8e(e,t,n,r)}function M8e(e,t,n,r){let i,a={};for(let o=0;o<e.length;o++){let s=e[o],c=N8e(s);if(c!==void 0&&c!==t.textNodeName){let e=A8e(s[`:@`]||{},t.attributeNamePrefix);n.push(c,e)}if(c===t.textNodeName)i===void 0?i=s[c]:i+=``+s[c];else if(c===void 0)continue;else if(s[c]){let e=M8e(s[c],t,n,r),i=F8e(e,t);if(Object.keys(e).length===0&&t.alwaysCreateTextNode&&(e[t.textNodeName]=``),s[`:@`]?P8e(e,s[`:@`],r,t):Object.keys(e).length===1&&e[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?e=e[t.textNodeName]:Object.keys(e).length===0&&(t.alwaysCreateTextNode?e[t.textNodeName]=``:e=``),s[pz]!==void 0&&typeof e==`object`&&e&&(e[pz]=s[pz]),a[c]!==void 0&&Object.prototype.hasOwnProperty.call(a,c))Array.isArray(a[c])||(a[c]=[a[c]]),a[c].push(e);else{let n=t.jPath?r.toString():r;a[c]=t.isArray(c,n,i)?[e]:e}c!==void 0&&c!==t.textNodeName&&n.pop()}}return typeof i==`string`?i.length>0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function N8e(e){let t=Object.keys(e);for(let e=0;e<t.length;e++){let n=t[e];if(n!==`:@`)return n}}function P8e(e,t,n,r){if(t){let i=Object.keys(t),a=i.length;for(let o=0;o<a;o++){let a=i[o],s=a.startsWith(r.attributeNamePrefix)?a.substring(r.attributeNamePrefix.length):a,c=r.jPath?n.toString()+`.`+s:n;e[a]=r.isArray(a,c,!0,!0)?[t[a]]:t[a]}}}function F8e(e,t){let{textNodeName:n}=t,r=Object.keys(e).length;return!!(r===0||r===1&&(e[n]||typeof e[n]==`boolean`||e[n]===0))}var I8e=class{constructor(e){this.externalEntities={},this.options=X6e(e)}parse(e,t){if(typeof e!=`string`&&e.toString)e=e.toString();else if(typeof e!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(t){t===!0&&(t={});let n=m6e(e,t);if(n!==!0)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let n=new h8e(this.options,this.externalEntities),r=n.parseXml(e);return this.options.preserveOrder||r===void 0?r:j8e(r,this.options,n.matcher,n.readonlyMatcher)}addEntity(e,t){if(t.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(e.indexOf(`&`)!==-1||e.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '
'`);if(t===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[e]=t}static getMetaDataSymbol(){return az.getMetaDataSymbol()}};const L8e=/* @__PURE__ */ new Set([`file`,`class`,`interface`,`trait`,`enum`,`method`,`property`,`constant`,`argument`,`tag`,`implements`]),R8e=[{key:`class`,tag:`CLASS`},{key:`interface`,tag:`INTERFACE`},{key:`trait`,tag:`TRAIT`},{key:`enum`,tag:`ENUM`}];async function z8e(e){let t=(await OF.default.stat(e)).isDirectory()?Rt.join(e,`structure.xml`):e,n=await OF.default.readFile(t,`utf8`),r=B8e(new I8e({ignoreAttributes:!1,attributeNamePrefix:`@_`,parseTagValue:!1,parseAttributeValue:!1,htmlEntities:!0,isArray:e=>L8e.has(e)}).parse(n).project?.file??[]);if(r.length===0)throw Error(`No phpDocumentor elements found in ${t}`);let i=new G8e(new Map(r.map(e=>[e.fullName,e.slug]))),a=/* @__PURE__ */ new Map;for(let e of r){let t=a.get(e.group)??[];t.push(e),a.set(e.group,t)}let o=r.find(e=>e.namespace.length===0)?.group,s=[...a.keys()].sort((e,t)=>e===o?-1:t===o?1:e.localeCompare(t)),c=[],l=[];for(let e of s){let t=(a.get(e)??[]).sort((e,t)=>e.name.localeCompare(t.name)),n=t.map(e=>i.renderPage(e));c.push(...n),l.push({path:t[0]?.namespace??[],group:{group:e,pages:n.map(e=>e.slug)}})}return{pages:c,groups:CR(l)}}function B8e(e){let t=[],n=[];for(let r of e)for(let e of R8e)for(let i of r[e.key]??[]){let r=i.name??``;if(!r)continue;let a=(i.full_name??r).replace(/^\\/,``);t.push({element:i,keyword:e.key,tag:e.tag,name:r,fullName:a}),n.push(V8e(i,r,a))}let r=H8e(n),i=/* @__PURE__ */ new Set;return t.map((e,t)=>{let a=(n[t]??[]).slice(r.length),o=a.length?a.join(`\\`):r.join(`\\`)||`Reference`,s=[...a.map(U8e),U8e(e.name)].join(`/`),c=s,l=2;for(;i.has(c);)c=`${s}-${l++}`;return i.add(c),{...e,namespace:a,group:o,slug:c}})}function V8e(e,t,n){let r=e[`@_namespace`]?.replace(/^\\/,``);if(r)return r.split(`\\`);let i=n.split(`\\`);return i.at(-1)===t?i.slice(0,-1):i}function H8e(e){let t=e[0]??[];for(let n of e.slice(1)){let e=0;for(;e<t.length&&t[e]===n[e];)e++;t=t.slice(0,e)}return t}function U8e(e){return e.toLowerCase().replace(/[^a-z0-9-_.]+/g,`-`).replace(/^-+|-+$/g,``)||`item`}function mz(e,t){return e?.tag?.filter(e=>e[`@_name`]===t)??[]}function hz(e){return e?.filter(e=>(e[`@_visibility`]??`public`)===`public`)??[]}function W8e(e){return e.startsWith(`?`)||/(^|\|)null(\||$)/i.test(e)}var G8e=class{constructor(e){this.slugByName=e}renderPage(e){let{element:t}=e,n=[],r=this.docblock(t.docblock);r&&n.push(r),n.push(...this.renderHeritage(e));let i=hz(t.constant).sort((e,t)=>(e.name??``).localeCompare(t.name??``)),a=hz(t.property).sort((e,t)=>(e.name??``).localeCompare(t.name??``)),o=hz(t.method),s=o.filter(e=>e.name===`__construct`),c=o.filter(e=>e.name!==`__construct`).sort((e,t)=>(e.name??``).localeCompare(t.name??``));if(i.length){n.push(`## Constants`);for(let e of i){let t=mz(e.docblock,`var`)[0]?.[`@_type`]??``,r=[this.docblock(e.docblock),e.value?`Value: \`${K8e(e.value)}\``:``].filter(Boolean).join(`
|
|
1000
|
+
`):void 0}function a6e(e){let t=e.map(e=>e.text).join(``),n=t.indexOf(`(`),r=t.lastIndexOf(`)`);if(n===-1||r<=n)return[];let i=xR(e,n+1,r),a=i.map(e=>e.text).join(``),o=[],s=0;for(;s<=a.length;){let e=SR(a,`,`,s,`<([{`,`>)]}`),t=e===-1?a.length:e,n=bR(xR(i,s,t)),r=n.map(e=>e.text).join(``),c=/([A-Za-z_$][\w$]*)$/.exec(r)?.[1];c&&r.length>c.length&&o.push({name:c,tokens:bR(xR(n,0,r.length-c.length))}),s=t+1}return o}function o6e(e){let t=qR(e,e=>e.tagName===`h1`),n=t?YR(t).trim():``;return n.startsWith(`Annotation`)?`annotation`:n.startsWith(`Enum`)?`enum`:n.startsWith(`Interface`)?`interface`:n.startsWith(`Record`)?`record`:`class`}function s6e(e){if(!e)return;let t=qR(e,e=>KR(e,`block`));if(!t)return;let n=YR(t).replace(/\s+/g,` `).trim();if(!n)return;let r=n.split(/(?<=\.)\s/)[0]??n;return r.length>160?`${r.slice(0,159)}…`:r}function GR(e){let t=e.properties?.className;return Array.isArray(t)?t.map(String):[]}function KR(e,t){return GR(e).includes(t)}function qR(e,t){for(let n of e.children){if(n.type!==`element`)continue;if(t(n))return n;let e=qR(n,t);if(e)return e}}function JR(e,t){for(let n of e.children)n.type===`element`&&(t(n),JR(n,t))}function YR(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value:n.type===`element`&&n.tagName!==`script`&&n.tagName!==`style`&&(t+=YR(n));return t}const c6e=/* @__PURE__ */ RegExp(`^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function l6e(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e<a;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n}const XR=function(e){return c6e.exec(e)!=null};function u6e(e){return e!==void 0}const ZR=[`hasOwnProperty`,`toString`,`valueOf`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`],d6e=[`__proto__`,`constructor`,`prototype`],f6e={allowBooleanAttributes:!1,unpairedTags:[]};function p6e(e,t){t=Object.assign({},f6e,t);let n=[],r=!1,i=!1;e[0]===``&&(e=e.substr(1));for(let a=0;a<e.length;a++)if(e[a]===`<`&&e[a+1]===`?`){if(a+=2,a=h6e(e,a),a.err)return a}else if(e[a]===`<`){let o=a;if(a++,e[a]===`!`){a=g6e(e,a);continue}{let s=!1;e[a]===`/`&&(s=!0,a++);let c=``;for(;a<e.length&&e[a]!==`>`&&e[a]!==` `&&e[a]!==` `&&e[a]!==`
|
|
1001
|
+
`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!C6e(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,QR(`InvalidTag`,t,$R(e,a))}let l=_6e(e,a);if(l===!1)return QR(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,$R(e,a));let u=l.value;if(a=l.index,u[u.length-1]===`/`){let n=a-u.length;u=u.substring(0,u.length-1);let i=y6e(u,t);if(i===!0)r=!0;else return QR(i.err.code,i.err.msg,$R(e,n+i.err.line))}else if(s){if(!l.tagClosed)return QR(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,$R(e,a));if(u.trim().length>0)return QR(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,$R(e,o));if(n.length===0)return QR(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,$R(e,o));{let t=n.pop();if(c!==t.tagName){let n=$R(e,t.tagStartPos);return QR(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,$R(e,o))}n.length==0&&(i=!0)}}else{let s=y6e(u,t);if(s!==!0)return QR(s.err.code,s.err.msg,$R(e,a-u.length+s.err.line));if(i===!0)return QR(`InvalidXml`,`Multiple possible root nodes found.`,$R(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a<e.length;a++)if(e[a]===`<`){if(e[a+1]===`!`){a++,a=g6e(e,a);continue}if(e[a+1]===`?`){if(a=h6e(e,++a),a.err)return a}else break}else if(e[a]===`&`){let t=x6e(e,a);if(t==-1)return QR(`InvalidChar`,`char '&' is not expected.`,$R(e,a));a=t}else if(i===!0&&!m6e(e[a]))return QR(`InvalidXml`,`Extra text at the end`,$R(e,a));e[a]===`<`&&a--}}else{if(m6e(e[a]))continue;return QR(`InvalidChar`,`char '`+e[a]+`' is not expected.`,$R(e,a))}return r?n.length==1?QR(`InvalidTag`,`Unclosed tag '`+n[0].tagName+`'.`,$R(e,n[0].tagStartPos)):n.length>0?QR(`InvalidXml`,`Invalid '`+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):!0:QR(`InvalidXml`,`Start tag expected.`,1)}function m6e(e){return e===` `||e===` `||e===`
|
|
1002
|
+
`||e===`\r`}function h6e(e,t){let n=t;for(;t<e.length;t++)if(e[t]==`?`||e[t]==` `){let r=e.substr(n,t-n);if(t>5&&r===`xml`)return QR(`InvalidXml`,`XML declaration allowed only at the start of the document.`,$R(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}continue}return t}function g6e(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t<e.length;t++)if(e[t]===`-`&&e[t+1]===`-`&&e[t+2]===`>`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t<e.length;t++)if(e[t]===`<`)n++;else if(e[t]===`>`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t<e.length;t++)if(e[t]===`]`&&e[t+1]===`]`&&e[t+2]===`>`){t+=2;break}}return t}function _6e(e,t){let n=``,r=``,i=!1;for(;t<e.length;t++){if(e[t]===`"`||e[t]===`'`)r===``?r=e[t]:r!==e[t]||(r=``);else if(e[t]===`>`&&r===``){i=!0;break}n+=e[t]}return r===``&&{value:n,index:t,tagClosed:i}}const v6e=/* @__PURE__ */ RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function y6e(e,t){let n=l6e(e,v6e),r={};for(let e=0;e<n.length;e++){if(n[e][1].length===0)return QR(`InvalidAttr`,`Attribute '`+n[e][2]+`' has no space in starting.`,ez(n[e]));if(n[e][3]!==void 0&&n[e][4]===void 0)return QR(`InvalidAttr`,`Attribute '`+n[e][2]+`' is without value.`,ez(n[e]));if(n[e][3]===void 0&&!t.allowBooleanAttributes)return QR(`InvalidAttr`,`boolean attribute '`+n[e][2]+`' is not allowed.`,ez(n[e]));let i=n[e][2];if(!S6e(i))return QR(`InvalidAttr`,`Attribute '`+i+`' is an invalid name.`,ez(n[e]));if(!Object.prototype.hasOwnProperty.call(r,i))r[i]=1;else return QR(`InvalidAttr`,`Attribute '`+i+`' is repeated.`,ez(n[e]))}return!0}function b6e(e,t){let n=/\d/;for(e[t]===`x`&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(e[t]===`;`)return t;if(!e[t].match(n))break}return-1}function x6e(e,t){if(t++,e[t]===`;`)return-1;if(e[t]===`#`)return t++,b6e(e,t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===`;`)break;return-1}return t}function QR(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function S6e(e){return XR(e)}function C6e(e){return XR(e)}function $R(e,t){let n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function ez(e){return e.startIndex+e[1].length}const w6e={amp:`&`,AMP:`&`,lt:`<`,LT:`<`,gt:`>`,GT:`>`,quot:`"`,QUOT:`"`,apos:`'`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,lsquor:`‚`,rsquor:`’`,ldquor:`„`,bdquo:`„`,comma:`,`,period:`.`,colon:`:`,semi:`;`,excl:`!`,quest:`?`,num:`#`,dollar:`$`,percent:`%`,amp:`&`,ast:`*`,commat:`@`,lowbar:`_`,verbar:`|`,vert:`|`,sol:`/`,bsol:`\\`,lbrace:`{`,rbrace:`}`,lbrack:`[`,rbrack:`]`,lpar:`(`,rpar:`)`,nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,COPY:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,REG:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,half:`½`,frac34:`¾`,iquest:`¿`,times:`×`,div:`÷`,divide:`÷`},T6e={Agrave:`À`,agrave:`à`,Aacute:`Á`,aacute:`á`,Acirc:`Â`,acirc:`â`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,Aring:`Å`,aring:`å`,AElig:`Æ`,aelig:`æ`,Ccedil:`Ç`,ccedil:`ç`,Egrave:`È`,egrave:`è`,Eacute:`É`,eacute:`é`,Ecirc:`Ê`,ecirc:`ê`,Euml:`Ë`,euml:`ë`,Igrave:`Ì`,igrave:`ì`,Iacute:`Í`,iacute:`í`,Icirc:`Î`,icirc:`î`,Iuml:`Ï`,iuml:`ï`,ETH:`Ð`,eth:`ð`,Ntilde:`Ñ`,ntilde:`ñ`,Ograve:`Ò`,ograve:`ò`,Oacute:`Ó`,oacute:`ó`,Ocirc:`Ô`,ocirc:`ô`,Otilde:`Õ`,otilde:`õ`,Ouml:`Ö`,ouml:`ö`,Oslash:`Ø`,oslash:`ø`,Ugrave:`Ù`,ugrave:`ù`,Uacute:`Ú`,uacute:`ú`,Ucirc:`Û`,ucirc:`û`,Uuml:`Ü`,uuml:`ü`,Yacute:`Ý`,yacute:`ý`,THORN:`Þ`,thorn:`þ`,szlig:`ß`,yuml:`ÿ`,Yuml:`Ÿ`},E6e={Amacr:`Ā`,amacr:`ā`,Abreve:`Ă`,abreve:`ă`,Aogon:`Ą`,aogon:`ą`,Cacute:`Ć`,cacute:`ć`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cdot:`Ċ`,cdot:`ċ`,Ccaron:`Č`,ccaron:`č`,Dcaron:`Ď`,dcaron:`ď`,Dstrok:`Đ`,dstrok:`đ`,Emacr:`Ē`,emacr:`ē`,Ecaron:`Ě`,ecaron:`ě`,Edot:`Ė`,edot:`ė`,Eogon:`Ę`,eogon:`ę`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gbreve:`Ğ`,gbreve:`ğ`,Gdot:`Ġ`,gdot:`ġ`,Gcedil:`Ģ`,Hcirc:`Ĥ`,hcirc:`ĥ`,Hstrok:`Ħ`,hstrok:`ħ`,Itilde:`Ĩ`,itilde:`ĩ`,Imacr:`Ī`,imacr:`ī`,Iogon:`Į`,iogon:`į`,Idot:`İ`,IJlig:`IJ`,ijlig:`ij`,Jcirc:`Ĵ`,jcirc:`ĵ`,Kcedil:`Ķ`,kcedil:`ķ`,kgreen:`ĸ`,Lacute:`Ĺ`,lacute:`ĺ`,Lcedil:`Ļ`,lcedil:`ļ`,Lcaron:`Ľ`,lcaron:`ľ`,Lmidot:`Ŀ`,lmidot:`ŀ`,Lstrok:`Ł`,lstrok:`ł`,Nacute:`Ń`,nacute:`ń`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ENG:`Ŋ`,eng:`ŋ`,Omacr:`Ō`,omacr:`ō`,Odblac:`Ő`,odblac:`ő`,OElig:`Œ`,oelig:`œ`,Racute:`Ŕ`,racute:`ŕ`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,Sacute:`Ś`,sacute:`ś`,Scirc:`Ŝ`,scirc:`ŝ`,Scedil:`Ş`,scedil:`ş`,Scaron:`Š`,scaron:`š`,Tcedil:`Ţ`,tcedil:`ţ`,Tcaron:`Ť`,tcaron:`ť`,Tstrok:`Ŧ`,tstrok:`ŧ`,Utilde:`Ũ`,utilde:`ũ`,Umacr:`Ū`,umacr:`ū`,Ubreve:`Ŭ`,ubreve:`ŭ`,Uring:`Ů`,uring:`ů`,Udblac:`Ű`,udblac:`ű`,Uogon:`Ų`,uogon:`ų`,Wcirc:`Ŵ`,wcirc:`ŵ`,Ycirc:`Ŷ`,ycirc:`ŷ`,Zacute:`Ź`,zacute:`ź`,Zdot:`Ż`,zdot:`ż`,Zcaron:`Ž`,zcaron:`ž`},D6e={Alpha:`Α`,alpha:`α`,Beta:`Β`,beta:`β`,Gamma:`Γ`,gamma:`γ`,Delta:`Δ`,delta:`δ`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,varepsilon:`ϵ`,Zeta:`Ζ`,zeta:`ζ`,Eta:`Η`,eta:`η`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,vartheta:`ϑ`,Iota:`Ι`,iota:`ι`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,varkappa:`ϰ`,Lambda:`Λ`,lambda:`λ`,Mu:`Μ`,mu:`μ`,Nu:`Ν`,nu:`ν`,Xi:`Ξ`,xi:`ξ`,Omicron:`Ο`,omicron:`ο`,Pi:`Π`,pi:`π`,piv:`ϖ`,varpi:`ϖ`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,varrho:`ϱ`,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,varsigma:`ς`,Tau:`Τ`,tau:`τ`,Upsilon:`Υ`,upsilon:`υ`,upsi:`υ`,Upsi:`ϒ`,upsih:`ϒ`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,varphi:`ϕ`,Chi:`Χ`,chi:`χ`,Psi:`Ψ`,psi:`ψ`,Omega:`Ω`,omega:`ω`,ohm:`Ω`,Gammad:`Ϝ`,gammad:`ϝ`,digamma:`ϝ`},O6e={Afr:`𝔄`,afr:`𝔞`,Acy:`А`,acy:`а`,Bcy:`Б`,bcy:`б`,Vcy:`В`,vcy:`в`,Gcy:`Г`,gcy:`г`,Dcy:`Д`,dcy:`д`,IEcy:`Е`,iecy:`е`,IOcy:`Ё`,iocy:`ё`,ZHcy:`Ж`,zhcy:`ж`,Zcy:`З`,zcy:`з`,Icy:`И`,icy:`и`,Jcy:`Й`,jcy:`й`,Kcy:`К`,kcy:`к`,Lcy:`Л`,lcy:`л`,Mcy:`М`,mcy:`м`,Ncy:`Н`,ncy:`н`,Ocy:`О`,ocy:`о`,Pcy:`П`,pcy:`п`,Rcy:`Р`,rcy:`р`,Scy:`С`,scy:`с`,Tcy:`Т`,tcy:`т`,Ucy:`У`,ucy:`у`,Fcy:`Ф`,fcy:`ф`,KHcy:`Х`,khcy:`х`,TScy:`Ц`,tscy:`ц`,CHcy:`Ч`,chcy:`ч`,SHcy:`Ш`,shcy:`ш`,SHCHcy:`Щ`,shchcy:`щ`,HARDcy:`Ъ`,hardcy:`ъ`,Ycy:`Ы`,ycy:`ы`,SOFTcy:`Ь`,softcy:`ь`,Ecy:`Э`,ecy:`э`,YUcy:`Ю`,yucy:`ю`,YAcy:`Я`,yacy:`я`,DJcy:`Ђ`,djcy:`ђ`,GJcy:`Ѓ`,gjcy:`ѓ`,Jukcy:`Є`,jukcy:`є`,DScy:`Ѕ`,dscy:`ѕ`,Iukcy:`І`,iukcy:`і`,YIcy:`Ї`,yicy:`ї`,Jsercy:`Ј`,jsercy:`ј`,LJcy:`Љ`,ljcy:`љ`,NJcy:`Њ`,njcy:`њ`,TSHcy:`Ћ`,tshcy:`ћ`,KJcy:`Ќ`,kjcy:`ќ`,Ubrcy:`Ў`,ubrcy:`ў`,DZcy:`Џ`,dzcy:`џ`},k6e={plus:`+`,minus:`−`,mnplus:`∓`,mp:`∓`,pm:`±`,times:`×`,div:`÷`,divide:`÷`,sdot:`⋅`,star:`☆`,starf:`★`,bigstar:`★`,lowast:`∗`,ast:`*`,midast:`*`,compfn:`∘`,smallcircle:`∘`,bullet:`•`,bull:`•`,nbsp:`\xA0`,hellip:`…`,mldr:`…`,prime:`′`,Prime:`″`,tprime:`‴`,bprime:`‵`,backprime:`‵`,minus:`−`,minusd:`∸`,dotminus:`∸`,plusdo:`∔`,dotplus:`∔`,plusmn:`±`,minusplus:`∓`,mnplus:`∓`,mp:`∓`,setminus:`∖`,smallsetminus:`∖`,Backslash:`∖`,setmn:`∖`,ssetmn:`∖`,lowbar:`_`,verbar:`|`,vert:`|`,VerticalLine:`|`,colon:`:`,Colon:`∷`,Proportion:`∷`,ratio:`∶`,equals:`=`,ne:`≠`,nequiv:`≢`,equiv:`≡`,Congruent:`≡`,sim:`∼`,thicksim:`∼`,thksim:`∼`,sime:`≃`,simeq:`≃`,TildeEqual:`≃`,asymp:`≈`,approx:`≈`,thickapprox:`≈`,thkap:`≈`,TildeTilde:`≈`,ncong:`≇`,cong:`≅`,TildeFullEqual:`≅`,asympeq:`≍`,CupCap:`≍`,bump:`≎`,Bumpeq:`≎`,HumpDownHump:`≎`,bumpe:`≏`,bumpeq:`≏`,HumpEqual:`≏`,dotminus:`∸`,minusd:`∸`,plusdo:`∔`,dotplus:`∔`,le:`≤`,LessEqual:`≤`,ge:`≥`,GreaterEqual:`≥`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,greater:`>`,less:`<`},A6e={alefsym:`ℵ`,aleph:`ℵ`,beth:`ℶ`,gimel:`ℷ`,daleth:`ℸ`,forall:`∀`,ForAll:`∀`,part:`∂`,PartialD:`∂`,exist:`∃`,Exists:`∃`,nexist:`∄`,nexists:`∄`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,varnothing:`∅`,nabla:`∇`,Del:`∇`,isin:`∈`,isinv:`∈`,in:`∈`,Element:`∈`,notin:`∉`,notinva:`∉`,ni:`∋`,niv:`∋`,SuchThat:`∋`,ReverseElement:`∋`,notni:`∌`,notniva:`∌`,prod:`∏`,Product:`∏`,coprod:`∐`,Coproduct:`∐`,sum:`∑`,Sum:`∑`,minus:`−`,mp:`∓`,plusdo:`∔`,dotplus:`∔`,setminus:`∖`,lowast:`∗`,radic:`√`,Sqrt:`√`,prop:`∝`,propto:`∝`,Proportional:`∝`,varpropto:`∝`,infin:`∞`,infintie:`⧝`,ang:`∠`,angle:`∠`,angmsd:`∡`,measuredangle:`∡`,angsph:`∢`,mid:`∣`,VerticalBar:`∣`,nmid:`∤`,nsmid:`∤`,npar:`∦`,parallel:`∥`,spar:`∥`,nparallel:`∦`,nspar:`∦`,and:`∧`,wedge:`∧`,or:`∨`,vee:`∨`,cap:`∩`,cup:`∪`,int:`∫`,Integral:`∫`,conint:`∮`,ContourIntegral:`∮`,Conint:`∯`,DoubleContourIntegral:`∯`,Cconint:`∰`,there4:`∴`,therefore:`∴`,Therefore:`∴`,becaus:`∵`,because:`∵`,Because:`∵`,ratio:`∶`,Proportion:`∷`,minusd:`∸`,dotminus:`∸`,mDDot:`∺`,homtht:`∻`,sim:`∼`,bsimg:`∽`,backsim:`∽`,ac:`∾`,mstpos:`∾`,acd:`∿`,VerticalTilde:`≀`,wr:`≀`,wreath:`≀`,nsime:`≄`,nsimeq:`≄`,nsimeq:`≄`,ncong:`≇`,simne:`≆`,ncongdot:`⩭̸`,ngsim:`≵`,nsim:`≁`,napprox:`≉`,nap:`≉`,ngeq:`≱`,nge:`≱`,nleq:`≰`,nle:`≰`,ngtr:`≯`,ngt:`≯`,nless:`≮`,nlt:`≮`,nprec:`⊀`,npr:`⊀`,nsucc:`⊁`,nsc:`⊁`},j6e={larr:`←`,leftarrow:`←`,LeftArrow:`←`,uarr:`↑`,uparrow:`↑`,UpArrow:`↑`,rarr:`→`,rightarrow:`→`,RightArrow:`→`,darr:`↓`,downarrow:`↓`,DownArrow:`↓`,harr:`↔`,leftrightarrow:`↔`,LeftRightArrow:`↔`,varr:`↕`,updownarrow:`↕`,UpDownArrow:`↕`,nwarr:`↖`,nwarrow:`↖`,UpperLeftArrow:`↖`,nearr:`↗`,nearrow:`↗`,UpperRightArrow:`↗`,searr:`↘`,searrow:`↘`,LowerRightArrow:`↘`,swarr:`↙`,swarrow:`↙`,LowerLeftArrow:`↙`,lArr:`⇐`,Leftarrow:`⇐`,uArr:`⇑`,Uparrow:`⇑`,rArr:`⇒`,Rightarrow:`⇒`,dArr:`⇓`,Downarrow:`⇓`,hArr:`⇔`,Leftrightarrow:`⇔`,iff:`⇔`,vArr:`⇕`,Updownarrow:`⇕`,lAarr:`⇚`,Lleftarrow:`⇚`,rAarr:`⇛`,Rrightarrow:`⇛`,lrarr:`⇆`,leftrightarrows:`⇆`,rlarr:`⇄`,rightleftarrows:`⇄`,lrhar:`⇋`,leftrightharpoons:`⇋`,ReverseEquilibrium:`⇋`,rlhar:`⇌`,rightleftharpoons:`⇌`,Equilibrium:`⇌`,udarr:`⇅`,UpArrowDownArrow:`⇅`,duarr:`⇵`,DownArrowUpArrow:`⇵`,llarr:`⇇`,leftleftarrows:`⇇`,rrarr:`⇉`,rightrightarrows:`⇉`,ddarr:`⇊`,downdownarrows:`⇊`,har:`↽`,lhard:`↽`,leftharpoondown:`↽`,lharu:`↼`,leftharpoonup:`↼`,rhard:`⇁`,rightharpoondown:`⇁`,rharu:`⇀`,rightharpoonup:`⇀`,lsh:`↰`,Lsh:`↰`,rsh:`↱`,Rsh:`↱`,ldsh:`↲`,rdsh:`↳`,hookleftarrow:`↩`,hookrightarrow:`↪`,mapstoleft:`↤`,mapstoup:`↥`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,crarr:`↵`,nwarrow:`↖`,nearrow:`↗`,searrow:`↘`,swarrow:`↙`,nleftarrow:`↚`,nleftrightarrow:`↮`,nrightarrow:`↛`,nrarr:`↛`,larrtl:`↢`,rarrtl:`↣`,leftarrowtail:`↢`,rightarrowtail:`↣`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Larr:`↞`,Rarr:`↠`,larrhk:`↩`,rarrhk:`↪`,larrlp:`↫`,looparrowleft:`↫`,rarrlp:`↬`,looparrowright:`↬`,harrw:`↭`,leftrightsquigarrow:`↭`,nrarrw:`↝̸`,rarrw:`↝`,rightsquigarrow:`↝`,larrbfs:`⤟`,rarrbfs:`⤠`,nvHarr:`⤄`,nvlArr:`⤂`,nvrArr:`⤃`,larrfs:`⤝`,rarrfs:`⤞`,Map:`⤅`,larrsim:`⥳`,rarrsim:`⥴`,harrcir:`⥈`,Uarrocir:`⥉`,lurdshar:`⥊`,ldrdhar:`⥧`,ldrushar:`⥋`,rdldhar:`⥩`,lrhard:`⥭`,rlhar:`⇌`,uharr:`↾`,uharl:`↿`,dharr:`⇂`,dharl:`⇃`,Uarr:`↟`,Darr:`↡`,zigrarr:`⇝`,nwArr:`⇖`,neArr:`⇗`,seArr:`⇘`,swArr:`⇙`,nharr:`↮`,nhArr:`⇎`,nlarr:`↚`,nlArr:`⇍`,nrarr:`↛`,nrArr:`⇏`,larrb:`⇤`,LeftArrowBar:`⇤`,rarrb:`⇥`,RightArrowBar:`⇥`},M6e={square:`□`,Square:`□`,squ:`□`,squf:`▪`,squarf:`▪`,blacksquar:`▪`,blacksquare:`▪`,FilledVerySmallSquare:`▪`,blk34:`▓`,blk12:`▒`,blk14:`░`,block:`█`,srect:`▭`,rect:`▭`,sdot:`⋅`,sdotb:`⊡`,dotsquare:`⊡`,triangle:`▵`,tri:`▵`,trine:`▵`,utri:`▵`,triangledown:`▿`,dtri:`▿`,tridown:`▿`,triangleleft:`◃`,ltri:`◃`,triangleright:`▹`,rtri:`▹`,blacktriangle:`▴`,utrif:`▴`,blacktriangledown:`▾`,dtrif:`▾`,blacktriangleleft:`◂`,ltrif:`◂`,blacktriangleright:`▸`,rtrif:`▸`,loz:`◊`,lozenge:`◊`,blacklozenge:`⧫`,lozf:`⧫`,bigcirc:`◯`,xcirc:`◯`,circ:`ˆ`,Circle:`○`,cir:`○`,o:`○`,bullet:`•`,bull:`•`,hellip:`…`,mldr:`…`,nldr:`‥`,boxh:`─`,HorizontalLine:`─`,boxv:`│`,boxdr:`┌`,boxdl:`┐`,boxur:`└`,boxul:`┘`,boxvr:`├`,boxvl:`┤`,boxhd:`┬`,boxhu:`┴`,boxvh:`┼`,boxH:`═`,boxV:`║`,boxdR:`╒`,boxDr:`╓`,boxDR:`╔`,boxDl:`╕`,boxdL:`╖`,boxDL:`╗`,boxuR:`╘`,boxUr:`╙`,boxUR:`╚`,boxUl:`╜`,boxuL:`╛`,boxUL:`╝`,boxvR:`╞`,boxVr:`╟`,boxVR:`╠`,boxVl:`╢`,boxvL:`╡`,boxVL:`╣`,boxHd:`╤`,boxhD:`╥`,boxHD:`╦`,boxHu:`╧`,boxhU:`╨`,boxHU:`╩`,boxvH:`╪`,boxVh:`╫`,boxVH:`╬`},N6e={excl:`!`,iexcl:`¡`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,nbsp:`\xA0`,comma:`,`,period:`.`,colon:`:`,semi:`;`,vert:`|`,Verbar:`‖`,verbar:`|`,dblac:`˝`,circ:`ˆ`,caron:`ˇ`,breve:`˘`,dot:`˙`,ring:`˚`,ogon:`˛`,tilde:`˜`,DiacriticalGrave:"`",DiacriticalAcute:`´`,DiacriticalTilde:`˜`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,grave:"`",acute:`´`},P6e={cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,euro:`€`,dollar:`$`,euro:`€`,fnof:`ƒ`,inr:`₹`,af:`؋`,birr:`ብር`,peso:`₱`,rub:`₽`,won:`₩`,yuan:`¥`,cedil:`¸`},F6e={frac12:`½`,half:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`},I6e={trade:`™`,TRADE:`™`,telrec:`⌕`,target:`⌖`,ulcorn:`⌜`,ulcorner:`⌜`,urcorn:`⌝`,urcorner:`⌝`,dlcorn:`⌞`,llcorner:`⌞`,drcorn:`⌟`,lrcorner:`⌟`,intercal:`⊺`,intcal:`⊺`,oplus:`⊕`,CirclePlus:`⊕`,ominus:`⊖`,CircleMinus:`⊖`,otimes:`⊗`,CircleTimes:`⊗`,osol:`⊘`,odot:`⊙`,CircleDot:`⊙`,oast:`⊛`,circledast:`⊛`,odash:`⊝`,circleddash:`⊝`,ocirc:`⊚`,circledcirc:`⊚`,boxplus:`⊞`,plusb:`⊞`,boxminus:`⊟`,minusb:`⊟`,boxtimes:`⊠`,timesb:`⊠`,boxdot:`⊡`,sdotb:`⊡`,veebar:`⊻`,vee:`∨`,barvee:`⊽`,and:`∧`,wedge:`∧`,Cap:`⋒`,Cup:`⋓`,Fork:`⋔`,pitchfork:`⋔`,epar:`⋕`,ltlarr:`⥶`,nvap:`≍⃒`,nvsim:`∼⃒`,nvge:`≥⃒`,nvle:`≤⃒`,nvlt:`<⃒`,nvgt:`>⃒`,nvltrie:`⊴⃒`,nvrtrie:`⊵⃒`,Vdash:`⊩`,dashv:`⊣`,vDash:`⊨`,Vdash:`⊩`,Vvdash:`⊪`,nvdash:`⊬`,nvDash:`⊭`,nVdash:`⊮`,nVDash:`⊯`};({...w6e,...T6e,...E6e,...D6e,...O6e,...k6e,...A6e,...j6e,...M6e,...N6e,...P6e,...F6e,...I6e});const L6e={amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`},R6e={nbsp:`\xA0`,copy:`©`,reg:`®`,trade:`™`,mdash:`—`,ndash:`–`,hellip:`…`,laquo:`«`,raquo:`»`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,bull:`•`,para:`¶`,sect:`§`,deg:`°`,frac12:`½`,frac14:`¼`,frac34:`¾`},z6e=/* @__PURE__ */ new Set(`!?\\\\/[]$%{}^&*()<>|+`);function B6e(e){if(e[0]===`#`)throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if(z6e.has(t))throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function tz(...e){let t=Object.create(null);for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(typeof r==`string`)t[e]=r;else if(r&&typeof r==`object`&&r.val!==void 0){let n=r.val;typeof n==`string`&&(t[e]=n)}}return t}const nz=`external`,rz=`base`;function V6e(e){return!e||e===nz?/* @__PURE__ */ new Set([nz]):e===`all`?/* @__PURE__ */ new Set([`all`]):e===rz?/* @__PURE__ */ new Set([rz]):Array.isArray(e)?new Set(e):/* @__PURE__ */ new Set([nz])}const iz=Object.freeze({allow:0,leave:1,remove:2,throw:3}),H6e=/* @__PURE__ */ new Set([9,10,13]);function U6e(e){if(!e)return{xmlVersion:1,onLevel:iz.allow,nullLevel:iz.remove};let t=e.xmlVersion===1.1?1.1:1,n=iz[e.onNCR]??iz.allow,r=iz[e.nullNCR]??iz.remove;return{xmlVersion:t,onLevel:n,nullLevel:Math.max(r,iz.remove)}}var W6e=class{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck==`function`?e.postCheck:e=>e,this._limitTiers=V6e(this._limit.applyLimitsTo??nz),this._numericAllowed=e.numericAllowed??!0,this._baseMap=tz(L6e,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let t=U6e(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel}setExternalEntities(e){if(e)for(let t of Object.keys(e))B6e(t);this._externalMap=tz(e)}addExternalEntity(e,t){B6e(e),typeof t==`string`&&t.indexOf(`&`)===-1&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=tz(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!=`string`||e.length===0)return e;let t=e,n=[],r=e.length,i=0,a=0,o=this._maxTotalExpansions>0,s=this._maxExpandedLength>0,c=o||s;for(;a<r;){if(e.charCodeAt(a)!==38){a++;continue}let t=a+1;for(;t<r&&e.charCodeAt(t)!==59&&t-a<=32;)t++;if(t>=r||e.charCodeAt(t)!==59){a++;continue}let l=e.slice(a+1,t);if(l.length===0){a++;continue}let u,d;if(this._removeSet.has(l))u=``,d===void 0&&(d=nz);else if(this._leaveSet.has(l)){a++;continue}else if(l.charCodeAt(0)===35){let e=this._resolveNCR(l);if(e===void 0){a++;continue}u=e,d=rz}else{let e=this._resolveName(l);u=e?.value,d=e?.tier}if(u===void 0)a++;else if(a>i&&n.push(e.slice(i,a)),n.push(u),i=t+1,a=i,c&&this._tierCounts(d)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(s){let e=u.length-(l.length+2);if(e>0&&(this._expandedLength+=e,this._expandedLength>this._maxExpandedLength))throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}i<r&&n.push(e.slice(i));let l=n.length===0?e:n.join(``);return this._postCheck(l,t)}_tierCounts(e){return this._limitTiers.has(`all`)?!0:this._limitTiers.has(e)}_resolveName(e){if(e in this._inputMap)return{value:this._inputMap[e],tier:nz};if(e in this._externalMap)return{value:this._externalMap[e],tier:nz};if(e in this._baseMap)return{value:this._baseMap[e],tier:rz}}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!H6e.has(e)?iz.remove:-1}_applyNCRAction(e,t,n){switch(e){case iz.allow:return String.fromCodePoint(n);case iz.remove:return``;case iz.leave:return;case iz.throw:throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,`0`)})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(n=t===120||t===88?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let r=this._classifyNCR(n);if(!this._numericAllowed&&r<iz.remove)return;let i=r===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,r);return this._applyNCRAction(i,e,n)}};const G6e=e=>ZR.includes(e)?`__`+e:e,K6e={preserveOrder:!1,attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:G6e};function q6e(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(ZR.some(e=>n===e.toLowerCase())||d6e.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function J6e(e,t){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:`all`}:typeof e==`object`&&e?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??`all`}:J6e(!0)}const Y6e=function(e){let t=Object.assign({},K6e,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&q6e(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=G6e),t.processEntities=J6e(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t};let az;az=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var oz=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){e.tagname===`__proto__`&&(e.tagname=`#__proto__`),e[`:@`]&&Object.keys(e[`:@`]).length>0?this.child.push({[e.tagname]:e.child,":@":e[`:@`]}):this.child.push({[e.tagname]:e.child}),t!==void 0&&(this.child[this.child.length-1][az]={startIndex:t})}static getMetaDataSymbol(){return az}},X6e=class{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]===`O`&&e[t+4]===`C`&&e[t+5]===`T`&&e[t+6]===`Y`&&e[t+7]===`P`&&e[t+8]===`E`){t+=9;let i=1,a=!1,o=!1,s=``;for(;t<e.length;t++)if(e[t]===`<`&&!o){if(a&&cz(e,`!ENTITY`,t)){t+=7;let i,a;if([i,a,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),a.indexOf(`&`)===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&r>=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[i]=a,r++}}else if(a&&cz(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&cz(e,`!ATTLIST`,t))t+=8;else if(a&&cz(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else if(cz(e,`!--`,t))o=!0;else throw Error(`Invalid DOCTYPE`);i++,s=``}else if(e[t]===`>`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];if(i!==0)throw Error(`Unclosed DOCTYPE`)}else throw Error(`Invalid Tag instead of DOCTYPE`);return{entities:n,i:t}}readEntityExp(e,t){t=sz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!==`"`&&e[t]!==`'`;)t++;let r=e.substring(n,t);if(lz(r),t=sz(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()===`SYSTEM`)throw Error(`External entities are not supported`);if(e[t]===`%`)throw Error(`Parameter entities are not supported`)}let i=``;if([t,i]=this.readIdentifierVal(e,t,`entity`),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&i.length>this.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[r,i,t]}readNotationExp(e,t){t=sz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);!this.suppressValidationErr&&lz(r),t=sz(e,t);let i=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&i!==`SYSTEM`&&i!==`PUBLIC`)throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);t+=i.length,t=sz(e,t);let a=null,o=null;if(i===`PUBLIC`)[t,a]=this.readIdentifierVal(e,t,`publicIdentifier`),t=sz(e,t),(e[t]===`"`||e[t]===`'`)&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`));else if(i===`SYSTEM`&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`),!this.suppressValidationErr&&!o))throw Error(`Missing mandatory system identifier for SYSTEM notation`);return{notationName:r,publicIdentifier:a,systemIdentifier:o,index:--t}}readIdentifierVal(e,t,n){let r=``,i=e[t];if(i!==`"`&&i!==`'`)throw Error(`Expected quoted string, found "${i}"`);t++;let a=t;for(;t<e.length&&e[t]!==i;)t++;if(r=e.substring(a,t),e[t]!==i)throw Error(`Unterminated ${n} value`);return t++,[t,r]}readElementExp(e,t){t=sz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);if(!this.suppressValidationErr&&!XR(r))throw Error(`Invalid element name: "${r}"`);t=sz(e,t);let i=``;if(e[t]===`E`&&cz(e,`MPTY`,t))t+=4;else if(e[t]===`A`&&cz(e,`NY`,t))t+=2;else if(e[t]===`(`){t++;let n=t;for(;t<e.length&&e[t]!==`)`;)t++;if(i=e.substring(n,t),e[t]!==`)`)throw Error(`Unterminated content model`)}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:i.trim(),index:t}}readAttlistExp(e,t){t=sz(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);for(lz(r),t=sz(e,t),n=t;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);if(!lz(i))throw Error(`Invalid attribute name: "${i}"`);t=sz(e,t);let a=``;if(e.substring(t,t+8).toUpperCase()===`NOTATION`){if(a=`NOTATION`,t+=8,t=sz(e,t),e[t]!==`(`)throw Error(`Expected '(', found "${e[t]}"`);t++;let n=[];for(;t<e.length&&e[t]!==`)`;){let r=t;for(;t<e.length&&e[t]!==`|`&&e[t]!==`)`;)t++;let i=e.substring(r,t);if(i=i.trim(),!lz(i))throw Error(`Invalid notation name: "${i}"`);n.push(i),e[t]===`|`&&(t++,t=sz(e,t))}if(e[t]!==`)`)throw Error(`Unterminated list of notations`);t++,a+=` (`+n.join(`|`)+`)`}else{let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;if(a+=e.substring(n,t),!this.suppressValidationErr&&![`CDATA`,`ID`,`IDREF`,`IDREFS`,`ENTITY`,`ENTITIES`,`NMTOKEN`,`NMTOKENS`].includes(a.toUpperCase()))throw Error(`Invalid attribute type: "${a}"`)}t=sz(e,t);let o=``;return e.substring(t,t+8).toUpperCase()===`#REQUIRED`?(o=`#REQUIRED`,t+=8):e.substring(t,t+7).toUpperCase()===`#IMPLIED`?(o=`#IMPLIED`,t+=7):[t,o]=this.readIdentifierVal(e,t,`ATTLIST`),{elementName:r,attributeName:i,attributeType:a,defaultValue:o,index:t}}};const sz=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function cz(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function lz(e){if(XR(e))return e;throw Error(`Invalid entity name ${e}`)}const Z6e=/^[-+]?0x[a-fA-F0-9]+$/,Q6e=/^0b[01]+$/,$6e=/^0o[0-7]+$/,e8e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t8e={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:`.`,eNotation:!0,infinity:`original`};function n8e(e,t={}){if(t=Object.assign({},t8e,t),!e||typeof e!=`string`)return e;let n=e.trim();if(n.length===0||t.skipLike!==void 0&&t.skipLike.test(n))return e;if(n===`0`)return 0;if(t.hex&&Z6e.test(n))return uz(n,16);if(t.binary&&Q6e.test(n))return uz(n,2);if(t.octal&&$6e.test(n))return uz(n,8);if(!isFinite(n))return o8e(e,Number(n),t);if(n.includes(`e`)||n.includes(`E`))return i8e(e,n,t);{let r=e8e.exec(n);if(r){let i=r[1]||``,a=r[2],o=a8e(r[3]),s=i?e[a.length+1]===`.`:e[a.length]===`.`;if(!t.leadingZeros&&(a.length>1||a.length===1&&!s))return e;{let r=Number(n),s=String(r);if(r===0)return r;if(s.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return s===`0`||s===o||s===`${i}${o}`?r:e;let c=a?o:n;return a?c===s||i+c===s?r:e:c===s||c===i+s?r:e}}return e}}const r8e=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function i8e(e,t,n){if(!n.eNotation)return e;let r=t.match(r8e);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length===1&&(r[3].startsWith(`.${a}`)||r[3][0]===a)?Number(t):o.length>0?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}return e}function a8e(e){return e&&e.indexOf(`.`)!==-1&&(e=e.replace(/0+$/,``),e===`.`?e=`0`:e[0]===`.`?e=`0`+e:e[e.length-1]===`.`&&(e=e.substring(0,e.length-1))),e}function uz(e,t){let n=e.trim();if((t===2||t===8)&&(e=n.substring(2)),parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}function o8e(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}function s8e(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var c8e=class{constructor(e,t={},n){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n<e.length;)e[n]===this.separator?n+1<e.length&&e[n+1]===this.separator?(r.trim()&&(t.push(this._parseSegment(r.trim())),r=``),t.push({type:`deep-wildcard`}),n+=2):(r.trim()&&t.push(this._parseSegment(r.trim())),r=``,n++):(r+=e[n],n++);return r.trim()&&t.push(this._parseSegment(r.trim())),t}_parseSegment(e){let t={type:`tag`},n=null,r=e,i=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(i&&(r=i[1]+i[3],i[2])){let e=i[2].slice(1,-1);e&&(n=e)}let a,o=r;if(r.includes(`::`)){let t=r.indexOf(`::`);if(a=r.substring(0,t).trim(),o=r.substring(t+2).trim(),!a)throw Error(`Invalid namespace in pattern: ${e}`)}let s,c=null;if(o.includes(`:`)){let e=o.lastIndexOf(`:`),t=o.substring(0,e).trim(),n=o.substring(e+1).trim();[`first`,`last`,`odd`,`even`].includes(n)||/^nth\(\d+\)$/.test(n)?(s=t,c=n):s=o}else s=o;if(!s)throw Error(`Invalid segment pattern: ${e}`);if(t.tag=s,a&&(t.namespace=a),n){if(n.includes(`=`)){let e=n.indexOf(`=`);t.attrName=n.substring(0,e).trim(),t.attrValue=n.substring(e+1).trim()}else t.attrName=n.trim()}if(c){let e=c.match(/^nth\((\d+)\)$/);e?(t.position=`nth`,t.positionValue=parseInt(e[1],10)):t.position=c}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}},l8e=class{constructor(){this._byDepthAndTag=/* @__PURE__ */ new Map,this._wildcardByDepth=/* @__PURE__ */ new Map,this._deepWildcards=[],this._patterns=/* @__PURE__ */ new Set,this._sealed=!1}add(e){if(this._sealed)throw TypeError(`ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.`);if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard())return this._deepWildcards.push(e),this;let t=e.length,n=e.segments[e.segments.length-1]?.tag;if(!n||n===`*`)this._wildcardByDepth.has(t)||this._wildcardByDepth.set(t,[]),this._wildcardByDepth.get(t).push(e);else{let r=`${t}:${n}`;this._byDepthAndTag.has(r)||this._byDepthAndTag.set(r,[]),this._byDepthAndTag.get(r).push(e)}return this}addAll(e){for(let t of e)this.add(t);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return this.findMatch(e)!==null}findMatch(e){let t=e.getDepth(),n=`${t}:${e.getCurrentTag()}`,r=this._byDepthAndTag.get(n);if(r){for(let t=0;t<r.length;t++)if(e.matches(r[t]))return r[t]}let i=this._wildcardByDepth.get(t);if(i){for(let t=0;t<i.length;t++)if(e.matches(i[t]))return i[t]}for(let t=0;t<this._deepWildcards.length;t++)if(e.matches(this._deepWildcards[t]))return this._deepWildcards[t];return null}},u8e=class{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){let e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let n=t[t.length-1];return n.values!==void 0&&e in n.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},d8e=class{constructor(e={}){this.separator=e.separator||`.`,this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new u8e(this)}push(e,t=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=/* @__PURE__ */ new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;if(n===this.separator&&t===!0){if(this._pathStringCache!==null)return this._pathStringCache;let e=this.path.map(e=>e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(!this._matchSegment(e[t],this.path[t],t===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,n=e.length-1;for(;n>=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--)if(this._matchSegment(r,this.path[e],e===this.path.length-1)){t=e-1,n--,i=!0;break}if(!i)return!1}else{if(!this._matchSegment(r,this.path[t],t===this.path.length-1))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace||e.attrName!==void 0&&(!n||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}};function f8e(e,t){if(!e)return{};let n=t.attributesGroupName?e[t.attributesGroupName]:e;if(!n)return{};let r={};for(let e in n)if(e.startsWith(t.attributeNamePrefix)){let i=e.substring(t.attributeNamePrefix.length);r[i]=n[e]}else r[e]=n[e];return r}function p8e(e){if(!e||typeof e!=`string`)return;let t=e.indexOf(`:`);if(t!==-1&&t>0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}var m8e=class{constructor(e,t){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=y8e,this.parseTextData=h8e,this.resolveNameSpace=g8e,this.buildAttributesMap=v8e,this.isItStopNode=C8e,this.replaceEntitiesValue=x8e,this.readStopNodeData=E8e,this.saveTextToParentTag=S8e,this.addChild=b8e,this.ignoreAttributesFn=s8e(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0;let n={...L6e};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities==`object`?n=this.options.htmlEntities:this.options.htmlEntities===!0&&(n={...R6e,...P6e}),this.entityDecoder=new W6e({namedEntities:{...n,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new d8e,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new l8e;let r=this.options.stopNodes;if(r&&r.length>0){for(let e=0;e<r.length;e++){let t=r[e];typeof t==`string`?this.stopNodeExpressionsSet.add(new c8e(t)):t instanceof c8e&&this.stopNodeExpressionsSet.add(t)}this.stopNodeExpressionsSet.seal()}}};function h8e(e,t,n,r,i,a,o){let s=this.options;if(e!==void 0&&(s.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=s.jPath?n.toString():n,c=s.tagValueProcessor(t,e,r,i,a);return c==null?e:typeof c!=typeof e||c!==e?c:s.trimValues||e.trim()===e?D8e(e,s.parseTagValue,s.numberParseOptions):e}}function g8e(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}const _8e=/* @__PURE__ */ RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function v8e(e,t,n,r=!1){let i=this.options;if(r===!0||i.ignoreAttributes!==!0&&typeof e==`string`){let r=l6e(e,_8e),a=r.length,o={},s=Array(a),c=!1,l={};for(let e=0;e<a;e++){let t=this.resolveNameSpace(r[e][1]),a=r[e][4];if(t.length&&a!==void 0){let r=a;i.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r,n,this.readonlyMatcher),s[e]=r,l[t]=r,c=!0}}c&&typeof t==`object`&&t.updateCurrent&&t.updateCurrent(l);let u=i.jPath?t.toString():this.readonlyMatcher,d=!1;for(let e=0;e<a;e++){let t=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(t,u))continue;let n=i.attributeNamePrefix+t;if(t.length){if(i.transformAttributeName&&(n=i.transformAttributeName(n)),n=O8e(n,i),r[e][4]!==void 0){let r=s[e],a=i.attributeValueProcessor(t,r,u);a==null?o[n]=r:typeof a!=typeof r||a!==r?o[n]=a:o[n]=D8e(r,i.parseAttributeValue,i.numberParseOptions),d=!0}else i.allowBooleanAttributes&&(o[n]=!0,d=!0)}}if(!d)return;if(i.attributesGroupName&&!i.preserveOrder){let e={};return e[i.attributesGroupName]=o,e}return o}}const y8e=function(e){e=e.replace(/\r\n?/g,`
|
|
1003
|
+
`);let t=new oz(`!xml`),n=t,r=``;this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,a=new X6e(i.processEntities),o=e.length;for(let s=0;s<o;s++)if(e[s]===`<`){let c=e.charCodeAt(s+1);if(c===47){let t=dz(e,`>`,s,`Closing Tag is not closed.`),a=e.substring(s+2,t).trim();if(i.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}a=pz(i.transformTagName,a,``,i).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(a&&i.unpairedTagsSet.has(a))throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);o&&i.unpairedTagsSet.has(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,s=t}else if(c===63){let t=fz(e,s,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let a=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName,!0);if(a){let e=a[this.options.attributeNamePrefix+`version`];this.entityDecoder.setXmlVersion(Number(e)||1)}if(!(i.ignoreDeclaration&&t.tagName===`?xml`||i.ignorePiTags)){let e=new oz(t.tagName);e.add(i.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&i.ignoreAttributes!==!0&&(e[`:@`]=a),this.addChild(n,e,this.readonlyMatcher,s)}s=t.closeIndex+1}else if(c===33&&e.charCodeAt(s+2)===45&&e.charCodeAt(s+3)===45){let t=dz(e,`-->`,s+4,`Comment is not closed.`);if(i.commentPropName){let a=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(i.commentPropName,[{[i.textNodeName]:a}])}s=t}else if(c===33&&e.charCodeAt(s+2)===68){let t=a.readDocType(e,s);this.entityDecoder.addInputEntities(t.entities),s=t.i}else if(c===33&&e.charCodeAt(s+2)===91){let t=dz(e,`]]>`,s,`CDATA is not closed.`)-2,a=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(a,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,i.cdataPropName?n.add(i.cdataPropName,[{[i.textNodeName]:a}]):n.add(i.textNodeName,o),s=t+2}else{let a=fz(e,s,i.removeNSPrefix);if(!a){let t=e.substring(Math.max(0,s-50),Math.min(o,s+50));throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`)}let c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;if({tagName:c,tagExp:u}=pz(i.transformTagName,c,u,i),i.strictReservedNames&&(c===i.commentPropName||c===i.cdataPropName||c===i.textNodeName||c===i.attributesGroupName))throw Error(`Invalid tag name: ${c}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let p=n;p&&i.unpairedTagsSet.has(p.tagname)&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let m=!1;u.length>0&&u.lastIndexOf(`/`)===u.length-1&&(m=!0,c[c.length-1]===`/`?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),d=c!==u);let h=null,g;g=p8e(l),c!==t.tagname&&this.matcher.push(c,{},g),c!==u&&d&&(h=this.buildAttributesMap(u,this.matcher,c),h&&f8e(h,i)),c!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let _=s;if(this.isCurrentNodeStopNode){let t=``;if(m)s=a.closeIndex;else if(i.unpairedTagsSet.has(c))s=a.closeIndex;else{let n=this.readStopNodeData(e,l,f+1);if(!n)throw Error(`Unexpected end of ${l}`);s=n.i,t=n.tagContent}let r=new oz(c);h&&(r[`:@`]=h),r.add(i.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,_)}else{if(m){({tagName:c,tagExp:u}=pz(i.transformTagName,c,u,i));let e=new oz(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(c)){let e=new oz(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=a.closeIndex;continue}else{let e=new oz(c);if(this.tagsNodeStack.length>i.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),n=e}r=``,s=f}}}else r+=e[s];return t.child};function b8e(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);a===!1||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function x8e(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}return this.entityDecoder.decode(e)}function S8e(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[`:@`]?Object.keys(t[`:@`]).length!==0:!1,r),e!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function C8e(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function w8e(e,t,n=`>`){let r=0,i=e.length,a=n.charCodeAt(0),o=n.length>1?n.charCodeAt(1):-1,s=``,c=t;for(let n=t;n<i;n++){let t=e.charCodeAt(n);if(r)t===r&&(r=0);else if(t===34||t===39)r=t;else if(t===a){if(o!==-1){if(e.charCodeAt(n+1)===o)return s+=e.substring(c,n),{data:s,index:n}}else return s+=e.substring(c,n),{data:s,index:n}}else t===9&&!r&&(s+=e.substring(c,n)+` `,c=n+1)}}function dz(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function T8e(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i}function fz(e,t,n,r=`>`){let i=w8e(e,t+1,r);if(!i)return;let a=i.data,o=i.index,s=a.search(/\s/),c=a,l=!0;s!==-1&&(c=a.substring(0,s),a=a.substring(s+1).trimStart());let u=c;if(n){let e=c.indexOf(`:`);e!==-1&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:u}}function E8e(e,t,n){let r=n,i=1,a=e.length;for(;n<a;n++)if(e[n]===`<`){let a=e.charCodeAt(n+1);if(a===47){let a=T8e(e,`>`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(a===63)n=dz(e,`?>`,n+1,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===45&&e.charCodeAt(n+3)===45)n=dz(e,`-->`,n+3,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===91)n=dz(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=fz(e,n,!1);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}}function D8e(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`||t!==`false`&&n8e(e,n)}return u6e(e)?e:``}function pz(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return t=O8e(t,r),{tagName:t,tagExp:n}}function O8e(e,t){if(d6e.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return ZR.includes(e)?t.onDangerousProperty(e):e}const mz=oz.getMetaDataSymbol();function k8e(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)if(r.startsWith(t)){let i=r.substring(t.length);n[i]=e[r]}else n[r]=e[r];return n}function A8e(e,t,n,r){return j8e(e,t,n,r)}function j8e(e,t,n,r){let i,a={};for(let o=0;o<e.length;o++){let s=e[o],c=M8e(s);if(c!==void 0&&c!==t.textNodeName){let e=k8e(s[`:@`]||{},t.attributeNamePrefix);n.push(c,e)}if(c===t.textNodeName)i===void 0?i=s[c]:i+=``+s[c];else if(c===void 0)continue;else if(s[c]){let e=j8e(s[c],t,n,r),i=P8e(e,t);if(Object.keys(e).length===0&&t.alwaysCreateTextNode&&(e[t.textNodeName]=``),s[`:@`]?N8e(e,s[`:@`],r,t):Object.keys(e).length===1&&e[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?e=e[t.textNodeName]:Object.keys(e).length===0&&(t.alwaysCreateTextNode?e[t.textNodeName]=``:e=``),s[mz]!==void 0&&typeof e==`object`&&e&&(e[mz]=s[mz]),a[c]!==void 0&&Object.prototype.hasOwnProperty.call(a,c))Array.isArray(a[c])||(a[c]=[a[c]]),a[c].push(e);else{let n=t.jPath?r.toString():r;a[c]=t.isArray(c,n,i)?[e]:e}c!==void 0&&c!==t.textNodeName&&n.pop()}}return typeof i==`string`?i.length>0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function M8e(e){let t=Object.keys(e);for(let e=0;e<t.length;e++){let n=t[e];if(n!==`:@`)return n}}function N8e(e,t,n,r){if(t){let i=Object.keys(t),a=i.length;for(let o=0;o<a;o++){let a=i[o],s=a.startsWith(r.attributeNamePrefix)?a.substring(r.attributeNamePrefix.length):a,c=r.jPath?n.toString()+`.`+s:n;e[a]=r.isArray(a,c,!0,!0)?[t[a]]:t[a]}}}function P8e(e,t){let{textNodeName:n}=t,r=Object.keys(e).length;return!!(r===0||r===1&&(e[n]||typeof e[n]==`boolean`||e[n]===0))}var F8e=class{constructor(e){this.externalEntities={},this.options=Y6e(e)}parse(e,t){if(typeof e!=`string`&&e.toString)e=e.toString();else if(typeof e!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(t){t===!0&&(t={});let n=p6e(e,t);if(n!==!0)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let n=new m8e(this.options,this.externalEntities),r=n.parseXml(e);return this.options.preserveOrder||r===void 0?r:A8e(r,this.options,n.matcher,n.readonlyMatcher)}addEntity(e,t){if(t.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(e.indexOf(`&`)!==-1||e.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '
'`);if(t===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[e]=t}static getMetaDataSymbol(){return oz.getMetaDataSymbol()}};const I8e=/* @__PURE__ */ new Set([`file`,`class`,`interface`,`trait`,`enum`,`method`,`property`,`constant`,`argument`,`tag`,`implements`]),L8e=[{key:`class`,tag:`CLASS`},{key:`interface`,tag:`INTERFACE`},{key:`trait`,tag:`TRAIT`},{key:`enum`,tag:`ENUM`}];async function R8e(e){let t=(await OF.default.stat(e)).isDirectory()?Rt.join(e,`structure.xml`):e,n=await OF.default.readFile(t,`utf8`),r=z8e(new F8e({ignoreAttributes:!1,attributeNamePrefix:`@_`,parseTagValue:!1,parseAttributeValue:!1,htmlEntities:!0,isArray:e=>I8e.has(e)}).parse(n).project?.file??[]);if(r.length===0)throw Error(`No phpDocumentor elements found in ${t}`);let i=new W8e(new Map(r.map(e=>[e.fullName,e.slug]))),a=/* @__PURE__ */ new Map;for(let e of r){let t=a.get(e.group)??[];t.push(e),a.set(e.group,t)}let o=r.find(e=>e.namespace.length===0)?.group,s=[...a.keys()].sort((e,t)=>e===o?-1:t===o?1:e.localeCompare(t)),c=[],l=[];for(let e of s){let t=(a.get(e)??[]).sort((e,t)=>e.name.localeCompare(t.name)),n=t.map(e=>i.renderPage(e));c.push(...n),l.push({path:t[0]?.namespace??[],group:{group:e,pages:n.map(e=>e.slug)}})}return{pages:c,groups:wR(l)}}function z8e(e){let t=[],n=[];for(let r of e)for(let e of L8e)for(let i of r[e.key]??[]){let r=i.name??``;if(!r)continue;let a=(i.full_name??r).replace(/^\\/,``);t.push({element:i,keyword:e.key,tag:e.tag,name:r,fullName:a}),n.push(B8e(i,r,a))}let r=V8e(n),i=/* @__PURE__ */ new Set;return t.map((e,t)=>{let a=(n[t]??[]).slice(r.length),o=a.length?a.join(`\\`):r.join(`\\`)||`Reference`,s=[...a.map(H8e),H8e(e.name)].join(`/`),c=s,l=2;for(;i.has(c);)c=`${s}-${l++}`;return i.add(c),{...e,namespace:a,group:o,slug:c}})}function B8e(e,t,n){let r=e[`@_namespace`]?.replace(/^\\/,``);if(r)return r.split(`\\`);let i=n.split(`\\`);return i.at(-1)===t?i.slice(0,-1):i}function V8e(e){let t=e[0]??[];for(let n of e.slice(1)){let e=0;for(;e<t.length&&t[e]===n[e];)e++;t=t.slice(0,e)}return t}function H8e(e){return e.toLowerCase().replace(/[^a-z0-9-_.]+/g,`-`).replace(/^-+|-+$/g,``)||`item`}function hz(e,t){return e?.tag?.filter(e=>e[`@_name`]===t)??[]}function gz(e){return e?.filter(e=>(e[`@_visibility`]??`public`)===`public`)??[]}function U8e(e){return e.startsWith(`?`)||/(^|\|)null(\||$)/i.test(e)}var W8e=class{constructor(e){this.slugByName=e}renderPage(e){let{element:t}=e,n=[],r=this.docblock(t.docblock);r&&n.push(r),n.push(...this.renderHeritage(e));let i=gz(t.constant).sort((e,t)=>(e.name??``).localeCompare(t.name??``)),a=gz(t.property).sort((e,t)=>(e.name??``).localeCompare(t.name??``)),o=gz(t.method),s=o.filter(e=>e.name===`__construct`),c=o.filter(e=>e.name!==`__construct`).sort((e,t)=>(e.name??``).localeCompare(t.name??``));if(i.length){n.push(`## Constants`);for(let e of i){let t=hz(e.docblock,`var`)[0]?.[`@_type`]??``,r=[this.docblock(e.docblock),e.value?`Value: \`${G8e(e.value)}\``:``].filter(Boolean).join(`
|
|
1004
1004
|
|
|
1005
|
-
`);n.push(
|
|
1005
|
+
`);n.push(CR(e.name??``,this.typeTokens(t),!1,r))}}for(let e of s)n.push(`## Constructor`),n.push(...this.renderMethodBody(e,3));if(a.length){n.push(`## Properties`);for(let e of a){let t=hz(e.docblock,`var`)[0],r=t?.[`@_type`]??``,i=[this.docblock(e.docblock)||(t?.[`@_description`]?uR(this.resolveInline(t[`@_description`])):``),e.default?`Default: \`${G8e(e.default)}\``:``].filter(Boolean).join(`
|
|
1006
1006
|
|
|
1007
|
-
`);n.push(
|
|
1007
|
+
`);n.push(CR(e.name??``,this.typeTokens(r),U8e(r),i))}}if(c.length){n.push(`## Methods`);for(let e of c)n.push(`### ${e.name}()`),n.push(...this.renderMethodBody(e,4))}return{slug:e.slug,title:e.name,description:this.firstSentence(t.docblock),tag:e.tag,content:n.filter(Boolean).join(`
|
|
1008
1008
|
|
|
1009
|
-
`)}}renderHeritage(e){let{element:t}=e,n=[{label:`Extends`,types:t.extends?[t.extends]:[]},{label:`Implements`,types:t.implements??[]}].filter(({types:e})=>e.length);if(!n.length)return[];let r=[t[`@_abstract`]===`true`?`abstract`:``,t[`@_final`]===`true`?`final`:``].filter(Boolean);return[this.codeBlock([...r,e.keyword,e.name].join(` `)),...n.map(({label:e,types:t})=>`**${e}:** ${t.map(e=>
|
|
1010
|
-
`)))),n}signature(e){let t=(e.argument??[]).map(e=>{let t=e.type?`${e.type} `:``,n=e.default?` = ${e.default}`:``;return`${t}$${e.name}${n}`}).join(`, `),n=[e[`@_abstract`]===`true`?`abstract`:``,`public`,e[`@_static`]===`true`?`static`:``].filter(Boolean),r=
|
|
1009
|
+
`)}}renderHeritage(e){let{element:t}=e,n=[{label:`Extends`,types:t.extends?[t.extends]:[]},{label:`Implements`,types:t.implements??[]}].filter(({types:e})=>e.length);if(!n.length)return[];let r=[t[`@_abstract`]===`true`?`abstract`:``,t[`@_final`]===`true`?`final`:``].filter(Boolean);return[this.codeBlock([...r,e.keyword,e.name].join(` `)),...n.map(({label:e,types:t})=>`**${e}:** ${t.map(e=>gR(this.typeTokens(e))??vR(e)).join(`, `)}`)]}renderMethodBody(e,t){let n=[this.codeBlock(this.signature(e))],r=this.docblock(e.docblock);r&&n.push(r);let i=e.argument??[],a=hz(e.docblock,`param`);if(i.length){n.push(`${`#`.repeat(t)} Parameters`);for(let e of i){let t=a.find(t=>t[`@_variable`]===e.name),r=e.type||t?.[`@_type`]||``,i=!!e.default||U8e(r),o=t?.[`@_description`]?uR(this.resolveInline(t[`@_description`])):``;n.push(CR(e.name??``,this.typeTokens(r),i,o))}}let o=hz(e.docblock,`return`)[0];if(o?.[`@_type`]&&o[`@_type`]!==`void`){n.push(`${`#`.repeat(t)} Returns`);let e=o[`@_description`]?`\n\n${uR(this.resolveInline(o[`@_description`]))}`:``,r=this.typeTokens(o[`@_type`]);n.push(`${gR(r)??vR(o[`@_type`])}${e}`)}let s=hz(e.docblock,`throws`);return s.length&&(n.push(`${`#`.repeat(t)} Throws`),n.push(uR(s.map(e=>{let t=e[`@_description`]?` ${e[`@_description`]}`:``;return`- ${this.typeLink(e[`@_type`]??`Exception`)}${t}`}).join(`
|
|
1010
|
+
`)))),n}signature(e){let t=(e.argument??[]).map(e=>{let t=e.type?`${e.type} `:``,n=e.default?` = ${e.default}`:``;return`${t}$${e.name}${n}`}).join(`, `),n=[e[`@_abstract`]===`true`?`abstract`:``,`public`,e[`@_static`]===`true`?`static`:``].filter(Boolean),r=hz(e.docblock,`return`)[0]?.[`@_type`],i=r&&e.name!==`__construct`?`: ${r}`:``;return`${n.join(` `)} function ${e.name}(${t})${i}`}docblock(e){if(!e)return``;let t=[],n=[...hz(e,`see`),...hz(e,`link`)].map(e=>this.seeLink(e)).filter(Boolean),r=[e.description??``,e[`long-description`]??``,n.length?`See ${n.join(`, `)}.`:``].filter(Boolean).join(`
|
|
1011
1011
|
|
|
1012
|
-
`);r&&t.push(
|
|
1012
|
+
`);r&&t.push(uR(this.resolveInline(r)));let i=hz(e,`deprecated`)[0];if(i){let e=i[`@_description`]?`: ${uR(this.resolveInline(i[`@_description`]))}`:``;t.push(`<Warning>Deprecated${e}</Warning>`)}return t.filter(Boolean).join(`
|
|
1013
1013
|
|
|
1014
|
-
`)}seeLink(e){let t=e[`@_link`]||e[`@_description`]||``;if(!t)return``;if(/^https?:/.test(t))return`[${e[`@_description`]||t}](${t})`;let n=this.resolve(t);return n?`[${t.replace(/^\\/,``)}](/${n})`:`\`${t}\``}resolveInline(e){return e.replace(/\{@(?:see|link)\s+([^\s}]+)\s*([^}]*)\}/g,(e,t,n)=>{let r=n.trim()||t.replace(/^\\/,``);if(/^https?:/.test(t))return`[${r}](${t})`;let i=this.resolve(t);return i?`[${r}](/${i})`:`\`${t}\``})}resolve(e){let t=e.replace(/^\\/,``).split(`::`)[0]??``;return this.slugByName.get(t)}firstSentence(e){let t=[e?.description??``,e?.[`long-description`]??``].join(` `).replace(/\{@(?:see|link)\s+([^\s}]+)[^}]*\}/g,`$1`).replace(/\s+/g,` `).trim();return t?
|
|
1014
|
+
`)}seeLink(e){let t=e[`@_link`]||e[`@_description`]||``;if(!t)return``;if(/^https?:/.test(t))return`[${e[`@_description`]||t}](${t})`;let n=this.resolve(t);return n?`[${t.replace(/^\\/,``)}](/${n})`:`\`${t}\``}resolveInline(e){return e.replace(/\{@(?:see|link)\s+([^\s}]+)\s*([^}]*)\}/g,(e,t,n)=>{let r=n.trim()||t.replace(/^\\/,``);if(/^https?:/.test(t))return`[${r}](${t})`;let i=this.resolve(t);return i?`[${r}](/${i})`:`\`${t}\``})}resolve(e){let t=e.replace(/^\\/,``).split(`::`)[0]??``;return this.slugByName.get(t)}firstSentence(e){let t=[e?.description??``,e?.[`long-description`]??``].join(` `).replace(/\{@(?:see|link)\s+([^\s}]+)[^}]*\}/g,`$1`).replace(/\s+/g,` `).trim();return t?_R(t.split(/(?<=\.)\s/)[0]??t,160):void 0}typeTokens(e){return U4e(e,/\\?[A-Za-z_]\w*(?:\\[A-Za-z_]\w*)*/g,e=>{let t=this.resolve(e);return{text:e,href:t?`/${t}`:void 0}})}typeLink(e){let t=[];for(let n of this.typeTokens(e)){let e=t.at(-1);e&&!e.href&&!n.href?e.text+=n.text:t.push({...n})}return t.map(({text:e,href:t})=>t?`[${vR(e)}](${t})`:vR(e)).join(``)}codeBlock(e){return`\`\`\`php\n${e}\n\`\`\``}};function G8e(e){return e.replace(/`/g,``)}function K8e(e,t,n){let r=Rt.posix.relative(Rt.posix.dirname(n),Rt.posix.dirname(t));r&&p(e,`element`,e=>{if(e.tagName!==`img`||typeof e.properties.src!=`string`)return;let t=hR(e.properties.src);if(!t||t.startsWith(`/`)||t.startsWith(`#`)||/^[a-z][a-z0-9+.-]*:/i.test(t))return;let n=t.search(/[?#]/),i=n===-1?t:t.slice(0,n);if(!i)return;let a=n===-1?``:t.slice(n),o=Rt.posix.join(r,i);e.properties.src=`${o.startsWith(`../`)?o:`./${o}`}${a}`})}function q8e(e){let t=new Set(e.map(e=>e.slug)),n=[];for(let r of e){let e=J8e(cI(r.body)).sort((e,t)=>e.start-t.start),i=e.map(e=>`${r.slug}/${e.name}`);if(e.length<2||new Set(i).size!==i.length||i.some(e=>t.has(e))){n.push(r);continue}let a=``,o=0,s=/* @__PURE__ */ new Set,c=[];for(let n of e){let e=`${r.slug}/${n.name}`,i=X8e(n.node)||n.name;a+=r.body.slice(o,n.start);for(let e of Z8e(n.node))s.has(e)||(s.add(e),a+=`<span id="${_z(e)}"></span>`);a+=`<div class="toctree-wrapper"><ul><li><a class="reference internal" href="/${_z(e)}">${_z(i)}</a></li></ul></div>`,o=n.end,t.add(e),c.push({slug:e,title:i,body:r.body.slice(n.start,n.end),tag:`MODULE`,sourceSlug:r.slug,parents:[{link:`/${r.slug}`}]})}a+=r.body.slice(o),n.push({...r,body:a,tag:`MODULE`},...c)}return n}function J8e(e){let t=[],n=[];for(let r of e.children){if(r.type!==`element`)continue;let e=Y8e(r);if(e){let n=r.position?.start.offset,i=r.position?.end.offset;typeof n==`number`&&typeof i==`number`&&t.push({node:r,name:e,start:n,end:i})}else n.push(r)}let r=n.flatMap(J8e);return t.length>1?[...t,...r]:r}function Y8e(e){let t=e.properties.id;if(typeof t!=`string`||!t.startsWith(`module-`)||e.tagName!==`section`&&e.tagName!==`div`||e.tagName===`div`&&!$8e(e).includes(`section`))return;let n=t.slice(7);if(/^[\p{ID_Start}_][\p{ID_Continue}]*(?:\.[\p{ID_Start}_][\p{ID_Continue}]*)*$/u.test(n))return n}function X8e(e){for(let t of e.children)if(t.type===`element`&&/^h[1-6]$/.test(t.tagName))return Q8e(t).replace(/\s+/g,` `).trim()}function Z8e(e){let t=[];typeof e.properties.id==`string`&&t.push(e.properties.id);for(let n of e.children)n.type===`element`&&t.push(...Z8e(n));return t}function Q8e(e){return e.type===`text`?e.value:e.type!==`element`||$8e(e).includes(`headerlink`)?``:e.children.map(Q8e).join(``)}function $8e(e){let t=e.properties.className;return Array.isArray(t)?t.map(String):typeof t==`string`?t.split(/\s+/):[]}function _z(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`)}function e5e(e){let t=new Map(e.map(e=>[e.slug,e])),n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Set,a=/* @__PURE__ */ new Set;function o(e,t){if(e===t)return;let i=n.get(e)??[];i.includes(t)||i.push(t),n.set(e,i);let a=r.get(t)??[];a.includes(e)||a.push(e),r.set(t,a)}for(let n of e){let e=cI(n.body);o5e(e)?a.add(n.slug):s5e(e)&&i.add(n.slug);let r=r5e(e);!r.length&&n.toc&&r.push(cI(n.toc));function s(e,r){let i=r;if(e.type===`element`&&e.tagName===`li`){let a=i5e(e),s=a?a5e(a,n.slug,t):void 0;s&&(o(r,s),i=s)}for(let t of e.children)t.type===`element`&&s(t,i)}for(let e of r)s(e,n.slug)}for(let n of e){if(r.has(n.slug))continue;let e=n.parents?.map(e=>a5e(e.link,n.slug,t)).filter(e=>e!==void 0).pop();e&&o(e,n.slug)}let s=/* @__PURE__ */ new Map;for(let t of e)if(!r.has(t.slug))for(let e of n5e(t.slug))s.set(e,(s.get(e)??0)+1);let c=/* @__PURE__ */ new Set;for(let[e,n]of s)n<2||t.has(e)||(c.add(e),t.set(e,{slug:e,title:Rt.posix.basename(e),body:``}));let l=[...t.values()].sort((e,t)=>e.slug.localeCompare(t.slug));for(let e of l){if(r.has(e.slug))continue;let n=n5e(e.slug).reverse().find(e=>t.has(e));n&&o(n,e.slug)}let u=new Set(e.filter(e=>e.tag||a.has(e.slug)).map(e=>e.slug)),d=!0;for(;d;){d=!1;for(let e of l){let t=n.get(e.slug)??[];!u.has(e.slug)&&t.length&&t.every(e=>u.has(e))&&!i.has(e.slug)&&(u.add(e.slug),d=!0)}}let f=[...l].sort((e,t)=>e.slug===`index`?-1:t.slug===`index`?1:e.slug.localeCompare(t.slug));function p(e,r,i){if(i.has(e)||!c.has(e)&&u.has(e)!==r)return[];let a=t.get(e);if(!a)return[];i.add(e);let o=(n.get(e)??[]).flatMap(e=>p(e,r,i));return c.has(e)?o.length<2?o:[{group:a.title,pages:o}]:o.length?[{group:a.title,pages:[e,...o]}]:[e]}let m=[];for(let e of[!1,!0]){let t=/* @__PURE__ */ new Set,n=[],i=f.filter(t=>c.has(t.slug)||u.has(t.slug)===e),a=i.filter(t=>!(r.get(t.slug)??[]).some(t=>c.has(t)||u.has(t)===e));for(let r of[...a,...i])n.push(...p(r.slug,e,t));let o=e?`API Reference`:`Getting Started`,s=t5e(n,o);s.length&&m.push({group:o,pages:s})}return m}function t5e(e,t){return e.flatMap(e=>{if(typeof e==`string`)return[e];let n=t5e(e.pages,t);return e.group===t?n:[{...e,pages:n}]})}function n5e(e){return[...e.matchAll(/[/.]/g)].map(t=>e.slice(0,t.index))}function r5e(e){let t=[];for(let n of e.children)n.type===`element`&&(l5e(n).includes(`toctree-wrapper`)?t.push(n):t.push(...r5e(n)));return t}function i5e(e){for(let t of e.children){if(t.type!==`element`||[`ul`,`ol`].includes(t.tagName))continue;if(t.tagName===`a`&&typeof t.properties.href==`string`)return t.properties.href;let e=i5e(t);if(e)return e}}function a5e(e,t,n){if(!e||e.includes(`#`)||/^(?:[a-z][\w+.-]*:|\/\/)/i.test(e))return;let r=e.split(`?`)[0]??``;try{r=decodeURIComponent(r)}catch{return}let i;if(r.startsWith(`/`))i=[r.slice(1)];else{let e=Rt.posix.join(Rt.posix.dirname(t),r),n=Rt.posix.join(t,r);i=r.endsWith(`/`)&&t!==`index`&&!t.endsWith(`/index`)?[n,e]:[e,n]}for(let e of i){let t=Rt.posix.normalize(e).replace(/\.(?:html?|fjson)$/,``).replace(/\/$/,``);if((!t||t===`.`)&&(t=`index`),n.has(t))return t;let r=Rt.posix.join(t,`index`);if(n.has(r))return r}}function o5e(e){if(e.type===`element`){let{id:t,href:n}=e.properties;if(typeof t==`string`&&t.startsWith(`module-`)||typeof n==`string`&&/github\.com\/readthedocs\/sphinx-autoapi/.test(n))return!0}return e.children.some(e=>e.type===`element`&&o5e(e))}function s5e(e){if(e.type===`element`){if(l5e(e).includes(`toctree-wrapper`))return!1;if([`p`,`pre`,`table`,`dl`].includes(e.tagName))return e.children.some(e=>c5e(e).trim())}return e.children.some(e=>e.type===`element`&&s5e(e))}function c5e(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(c5e).join(``):``}function l5e(e){let t=e.properties.className;return Array.isArray(t)?t.map(String):typeof t==`string`?t.split(/\s+/):[]}function u5e(e){return gR(bR(yR(e.children)))}function d5e(e,t){let n=GE(e).replace(/\s+/g,` `).trim(),r="`".repeat(Math.max(3,...(n.match(/`+/g)??[]).map(e=>e.length+1))),i=[`${r}python\n${n}\n${r}`],a=p5e(t),o=vz(e,`sig-param`).map(e=>f5e(e,a)).filter(e=>e!==void 0);o.length&&i.push(`**Parameters**`,...o);let s=vz(e,`sig-return-typehint`)[0];if(s){let e=bR(yR(s.children)),t=e.map(e=>e.text).join(``);t&&!a.returns.some(t=>_5e(e,t))&&i.push(`**Returns:** ${gR(e)??vR(t)}`)}return i.join(`
|
|
1015
1015
|
|
|
1016
|
-
`)}function
|
|
1017
|
-
`).replace(/^[> ]*@@mintlang:[\w+-]+@@\n?/gm,``);for(let[e,t]of i)l=l.replaceAll(e,()=>t);return{slug:e.slug,title:e.title,description:c,tag:e.tag,content:l}}function
|
|
1018
|
-
`))}return{slug:t,title:e.name,intro:
|
|
1016
|
+
`)}function f5e(e,t){let n=yR(e.children),r=n.map(e=>e.text).join(``),i=SR(r,`:`);if(i===-1)return;let a=r.slice(0,i).trim();if(!a)return;let o=SR(r,`=`),s=o===-1?r.length:o,c=bR(xR(n,i+1,s));if(c.map(e=>e.text).join(``)&&!t.parameters.get(a)?.some(e=>_5e(c,e)))return CR(a,c,o!==-1||a.startsWith(`*`))}function p5e(e){let t={parameters:/* @__PURE__ */ new Map,returns:[]};if(!e)return t;for(let n of m5e(e)){let e=``;for(let r of n.children)r.type===`element`&&(r.tagName===`dt`?e=GE(r).trim().replace(/:\s*$/,``).replace(/\s+/g,` `).toLowerCase():r.tagName===`dd`&&(e===`return type`||e===`rtype`?t.returns.push(bR(yR(r.children))):(e===`parameter`||e===`parameters`)&&h5e(r,t.parameters)))}return t}function m5e(e){let t=[];for(let n of e.children){if(n.type!==`element`)continue;let e=n.properties.className,r=Array.isArray(e)?e.map(String):String(e??``).split(` `);n.tagName===`dl`&&r.includes(`py`)||(n.tagName===`dl`&&r.includes(`field-list`)?t.push(n):t.push(...m5e(n)))}return t}function h5e(e,t){for(let n of e.children){if(n.type!==`element`)continue;if(n.tagName!==`p`){h5e(n,t);continue}let e=n.children.find(e=>e.type!==`text`||e.value.trim()!==``);if(e?.type!==`element`||e.tagName!==`strong`)continue;let r=GE(e).trim(),i=yR(n.children),a=i.map(e=>e.text).join(``),o=a.indexOf(r)+r.length,s=a.indexOf(`(`,o);if(s===-1||a.slice(o,s).trim()!==``)continue;let c=g5e(a,s);if(c===-1)continue;let l=t.get(r)??[];l.push(bR(xR(i,s+1,c))),t.set(r,l)}}function g5e(e,t){let n=0,r,i=!1;for(let a=t;a<e.length;a+=1){let t=e[a];if(i)i=!1;else if(r)t===`\\`?i=!0:t===r&&(r=void 0);else if(t===`"`||t===`'`)r=t;else if(t===`(`)n+=1;else if(t===`)`&&(--n,n===0))return a}return-1}function _5e(e,t){let n=e=>JSON.stringify(e.map(e=>e.href?[`href`,e.href]:[`text`,e.text.replace(/\s+/g,``)]).filter(([,e])=>e));return n(e)===n(t)}function vz(e,t){let n=[];for(let r of e.children){if(r.type!==`element`)continue;let e=r.properties.className;Array.isArray(e)&&e.includes(t)||typeof e==`string`&&e.split(` `).includes(t)?n.push(r):n.push(...vz(r,t))}return n}const v5e=/* @__PURE__ */ new Set([`genindex`,`search`,`py-modindex`]),y5e=/(`{3,})[^\S\n]*\n[> ]*@@mintlang:([\w+-]+)@@[^\S\n]*\n/g,b5e={note:`Note`,hint:`Tip`,tip:`Tip`,important:`Info`,seealso:`Info`,warning:`Warning`,caution:`Warning`,danger:`Warning`,error:`Warning`,attention:`Warning`};async function x5e(e){let t=q8e(await C5e(e)),n=new Set(t.map(e=>e.slug)),r=S5e(t),i=t.map(e=>T5e(e,n,r)),[a,...o]=e5e(t),[s,...c]=a?.pages??[];return a?.group===`Getting Started`&&typeof s==`string`&&!c.length?{pages:i,groups:o,overview:s}:{pages:i,groups:a?[a,...o]:[]}}function S5e(e){let t=/* @__PURE__ */ new Map,n=[...e.filter(e=>!e.sourceSlug),...e.filter(e=>e.sourceSlug)];for(let e of n){let n=e.sourceSlug??e.slug,r=t.get(n)??/* @__PURE__ */ new Map;p(cI(e.body),`element`,t=>{typeof t.properties.id==`string`&&r.set(yz(t.properties.id),e.slug)}),t.set(n,r)}return t}async function C5e(e){let t=[];for(let n of await w5e(e)){let r=await OF.default.readJson(n);if(!r||typeof r!=`object`||!(`body`in r)||typeof r.body!=`string`||!r.body.trim())continue;let i=`current_page_name`in r&&typeof r.current_page_name==`string`?r.current_page_name:Rt.relative(e,n).split(Rt.sep).join(`/`).replace(/\.fjson$/,``);if(v5e.has(i)||i.startsWith(`_modules`))continue;let a=[];if(`parents`in r&&Array.isArray(r.parents))for(let e of r.parents)e&&typeof e==`object`&&`link`in e&&typeof e.link==`string`&&a.push({link:e.link});t.push({slug:i,title:I5e(`title`in r&&typeof r.title==`string`?r.title:i),body:r.body,tag:/<dl class="py[ "]/.test(r.body)?`MODULE`:void 0,toc:`toc`in r&&typeof r.toc==`string`?r.toc:void 0,parents:a})}return t}async function w5e(e){let t=[];for(let n of await OF.default.readdir(e,{withFileTypes:!0})){if(n.name.startsWith(`_`))continue;let r=Rt.join(e,n.name);n.isDirectory()?t.push(...await w5e(r)):n.name.endsWith(`.fjson`)&&t.push(r)}return t.sort()}function T5e(e,t,n){let r=cI(e.body),i=/* @__PURE__ */ new Map,a=`MINTSPHINX${In().replaceAll(`-`,``)}`;function o(e){let t=`${a}BLOCK${i.size}END`;return i.set(t,e),t}function s(e){return{type:`element`,tagName:`p`,properties:{},children:[{type:`text`,value:o(e)}]}}sI(r),E5e(r,e.title);let c=F5e(r);D5e(r,e,t,n),K8e(r,e.sourceSlug??e.slug,e.slug),M5e(r),k5e(r,s),bz(r,0,s),A5e(r,o),j5e(r);let l=oR(r).replace(y5e,`$1$2
|
|
1017
|
+
`).replace(/^[> ]*@@mintlang:[\w+-]+@@\n?/gm,``);for(let[e,t]of i)l=l.replaceAll(e,()=>t);return{slug:e.slug,title:e.title,description:c,tag:e.tag,content:l}}function E5e(e,t){p(e,`element`,(e,t,n)=>{if(!n||typeof t!=`number`)return;let r=e.tagName===`a`&&xz(e).includes(`headerlink`),i=e.tagName===`a`&&e.children.some(e=>e.type===`element`&&xz(e).includes(`viewcode-link`));if(r||i)return n.children.splice(t,1),t});let n=!1;p(e,`element`,(e,r,i)=>{if(!n&&i&&typeof r==`number`&&(e.tagName===`h1`||/^h[1-6]$/.test(e.tagName)&&I5e(GE(e))===t))return n=!0,i.children.splice(r,1),r})}function D5e(e,t,n,r){p(e,`element`,e=>{if(e.tagName!==`a`||typeof e.properties.href!=`string`)return;let i=O5e(e.properties.href,t,n,r);i===void 0?delete e.properties.href:e.properties.href=i})}function O5e(e,t,n,r){let i=t.sourceSlug??t.slug,a=hR(e);if(a===void 0||/^(https?:|mailto:)/i.test(a))return a;let o=a.indexOf(`#`),s=o<0?``:`#${yz(a.slice(o+1))}`,c=o<0?a:a.slice(0,o),l=c.indexOf(`?`),u=l<0?``:c.slice(l),d=l<0?c:c.slice(0,l);function f(e){let n=e;return s.length>1&&(n=r.get(e)?.get(s.slice(1))??e),!d&&n===t.slug?`${u}${s}`:`/${n}${u}${s}`}if(!d)return f(i);try{d=decodeURIComponent(d)}catch{return}let p=Rt.posix.dirname(i),m=[Rt.posix.join(p,d),Rt.posix.join(i,d)];d.endsWith(`/`)&&Rt.posix.basename(i)!==`index`&&m.reverse(),d.startsWith(`/`)&&(m=[d.slice(1)]);for(let e of m){let t=Rt.posix.normalize(e).replace(/\.(?:html?|fjson)$/,``).replace(/\/$/,``);if((t===`.`||t===``)&&(t=`index`),n.has(t))return f(t);let r=Rt.posix.join(t,`index`);if(n.has(r))return f(r)}}function yz(e){return YE(e).replace(/[<>"&]/g,``).replace(/\s+/g,`-`)}function k5e(e,t){let n=[];for(let r of e.children){if(r.type===`element`){let e=r.properties.id;typeof e==`string`&&!(r.tagName===`dt`&&xz(r).includes(`sig`))&&n.push(t(`<span id=${fR(yz(e))} />`)),k5e(r,t)}r.type!==`doctype`&&r.type!==`mdxjsEsm`&&n.push(r)}e.children=n}function A5e(e,t){let n=[];for(let r of e.children){if(r.type===`element`){if(r.tagName===`code`){let e=u5e(r);if(e){n.push({type:`text`,value:t(e)});continue}}r.tagName!==`pre`&&A5e(r,t)}r.type!==`doctype`&&r.type!==`mdxjsEsm`&&n.push(r)}e.children=n}function j5e(e){p(e,`element`,e=>{if(e.tagName!==`div`||!xz(e).includes(`admonition`))return;let t=xz(e).find(e=>e in b5e),n=e.children.filter(e=>!(e.type===`element`&&xz(e).includes(`admonition-title`)));return e.tagName=b5e[t??``]??`Note`,e.properties={},e.children=aI(n),ct})}function M5e(e){p(e,`element`,e=>{let t=xz(e).find(e=>e.startsWith(`highlight-`))?.slice(10);if(t&&t!=="default"&&t!==`none`)return p(e,`element`,e=>{if(e.tagName===`pre`)return e.children.unshift({type:`text`,value:`@@mintlang:${t}@@\n`}),ct}),ct})}function bz(e,t,n){let r=[];for(let i of e.children)i.type===`element`&&i.tagName===`dl`&&xz(i).includes(`py`)?r.push(...N5e(i,t,n)):(i.type===`element`&&bz(i,t,n),i.type!==`doctype`&&i.type!==`mdxjsEsm`&&r.push(i));e.children=r}function N5e(e,t,n){let r=xz(e).some(e=>[`method`,`function`].includes(e)),i=[];for(let[a,o]of e.children.entries())if(o.type===`element`){if(o.tagName===`dt`&&xz(o).includes(`sig`)){let s=P5e(o);if(s){let e=R4e(r?`${s}()`:s),a=o.properties.id,c=typeof a==`string`?` {#${yz(a)}}`:``;i.push(n(`${`#`.repeat(Math.min(3+t,6))} ${e}${c}`))}let c=e.children.slice(a+1).find(e=>e.type===`element`&&e.tagName===`dd`);i.push(n(d5e(o,c)))}else o.tagName===`dd`&&(bz(o,t+1,n),i.push(...o.children))}return i}function P5e(e){let t;return p(e,`element`,e=>{if(xz(e).includes(`descname`))return t=GE(e).trim(),ct}),t}function F5e(e){let t;return p(e,`element`,(e,n,r)=>{if(t||e.tagName!==`p`)return;if(r&&r.type===`element`&&r.tagName===`li`)return ct;let i=GE(e).replace(/\s+/g,` `).trim();if(!i||i.startsWith(`Bases:`))return;let a=i.split(/(?<=\.)\s/)[0]??i;t=a.length>160?`${a.slice(0,159)}…`:a}),t}function xz(e){let t=e.properties.className;return Array.isArray(t)?t.map(String):typeof t==`string`?t.split(` `):[]}function I5e(e){return e.replace(/<[^>]+>/g,``).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/&#(\d+);/g,(e,t)=>{let n=Number(t);return n<=1114111?String.fromCodePoint(n):`&#${t};`}).replace(/\s+/g,` `).trim()}const Sz={project:1,module:2,namespace:4,enum:8,enumMember:16,variable:32,function:64,class:128,interface:256,constructor:512,property:1024,method:2048,callSignature:4096,indexSignature:8192,constructorSignature:16384,parameter:32768,typeLiteral:65536,accessor:262144,getSignature:524288,setSignature:1048576,typeAlias:2097152},Cz=[{kind:Sz.class,group:`Classes`,dir:`classes`,tag:`CLASS`,symbolKind:`class`},{kind:Sz.interface,group:`Interfaces`,dir:`interfaces`,tag:`INTERFACE`,symbolKind:`interface`},{kind:Sz.enum,group:`Enumerations`,dir:`enums`,tag:`ENUM`,symbolKind:`enum`},{kind:Sz.function,group:`Functions`,dir:`functions`,tag:`FUNCTION`,symbolKind:`function`},{kind:Sz.typeAlias,group:`Type Aliases`,dir:`types`,tag:`TYPE`,symbolKind:`type`},{kind:Sz.variable,group:`Variables`,dir:`variables`,tag:`VARIABLE`,symbolKind:`variable`}],L5e=/* @__PURE__ */ new Set([Sz.property,Sz.accessor]);function wz(e,t){if(t||L5e.has(e.kind))return ZE(`${t?`member`:`property`}-${e.name}`,{decamelize:!0});if(e.kind===Sz.method)return $E(`${e.name}()`)}const R5e=/* @__PURE__ */ new Set([Sz.constructor,Sz.property,Sz.accessor,Sz.method]),z5e=new Map([...Cz.map(e=>[e.kind,e.group]),[Sz.namespace,`Namespaces`],[Sz.constructor,`Constructors`],[Sz.property,`Properties`],[Sz.accessor,`Accessors`],[Sz.method,`Methods`]]);function B5e(e){let t=new Map((e.children??[]).map(e=>[e.id,e.kind]));return(e.groups??[]).some(e=>e.categories?.length||(e.children??[]).some(n=>{let r=z5e.get(t.get(n)??-1);return r!==void 0&&r!==e.title}))}async function V5e(e){let t=await OF.default.readJson(e),n=t.children?.some(e=>e.kind===Sz.module)===!0?t.children?.filter(e=>e.kind===Sz.module)??[]:[t],r=n.length>1,i=/* @__PURE__ */ new Map;for(let e of n){let t=r?Dz(e.name):``;for(let{node:n,namespacePath:r}of Ez(e)){let e=Cz.find(e=>e.kind===n.kind);e&&!n.flags?.isPrivate&&i.set(n.id,Rt.posix.join(t,...r.map(Dz),e.dir,Dz(n.name)))}}let a=/* @__PURE__ */ new Map;for(let e of n)for(let{node:t}of Ez(e)){let e=i.get(t.id);if(e)for(let n of t.children??[]){if(n.flags?.isPrivate)continue;let r=wz(n,t.kind===Sz.enum);r&&a.set(n.id,`${e}#${r}`)}}let o=new K5e(i,a),s=[],c=[],l=/* @__PURE__ */ new Map;for(let e of n){let t=Ez(e),n=[];for(let a of Cz){let c=t.filter(({node:e})=>e.kind===a.kind&&!e.flags?.isPrivate).sort((e,t)=>Tz(e).localeCompare(Tz(t)));if(c.length===0)continue;let l=c.map(e=>o.renderPage(e.node,a,Tz(e)));s.push(...l);for(let t of c){if(t.node.kind!==Sz.class&&t.node.kind!==Sz.interface)continue;let n=i.get(t.node.id)??Rt.posix.join(r?Dz(e.name):``,...t.namespacePath.map(Dz),a.dir,Dz(t.node.name));s.push(...o.renderMemberPages(t.node,n,Tz(t)))}n.push({group:a.group,pages:l.map(e=>e.slug)})}let a=H5e(e)?U5e(e,i):[],u=a.length?a:n;r?l.set(e.id,{path:e.name.split(`/`),group:{group:e.name,pages:u}}):c.push(...u)}let u=[],d=[],f,p=new Set(s.map(e=>e.slug.toLowerCase())),m=[t,...n.filter(e=>e!==t)],h=[];for(let e of m){if(!e.readme?.some(e=>e.text.trim()))continue;let n=e===t?``:Dz(e.name).replace(/^\.+$/,`item`),r=Rt.posix.join(n,`package-overview`),a=r,o=2;for(;p.has(a.toLowerCase());)a=`${r}-${o}`,o+=1;p.add(a.toLowerCase()),i.set(e.id,a),h.push({node:e,slug:a})}for(let{node:e,slug:n}of h){let r=e===t,a=new Set(Ez(e).map(({node:e})=>i.get(e.id))),c=s.filter(e=>!e.target?.parent&&(r||a.has(e.slug))),p=o.renderOverview(e,n,c,r?void 0:t.name);u.push(p);let m=l.get(e.id)?.group;r?f=n:m?m.pages.unshift(n):f?d.push({group:`${e.name} Overview`,pages:[n]}):f=n}return{pages:[...u,...s],groups:[...d,...c,...wR([...l.values()].filter(({group:e})=>e.pages.length))],...f?{overview:f}:{}}}function H5e(e){return e.categories?.length||B5e(e)?!0:(e.children??[]).some(e=>e.kind===Sz.namespace&&H5e(e))}function U5e(e,t){return W5e(e,t,/* @__PURE__ */ new Map).filter(e=>typeof e!=`string`)}function W5e(e,t,n){let r=new Map((e.children??[]).map(e=>[e.id,e])),i=(e=[])=>[...new Set(e)].flatMap(e=>{let i=r.get(e);if(!i)return[];let o=n.get(e)??0;if(i.kind===Sz.namespace)return o>0?[]:(n.set(e,1),a(i.name,W5e(i,t,n)));let s=t.get(e);if(!s)return[];if(o>=8)throw Error(`TypeDoc declaration "${_R(i.name,64)}" is listed in more than 8 navigation groups`);return n.set(e,o+1),[s]}),a=(e,t)=>{let n=G5e(e);return n&&t.length?[{group:n,pages:t}]:[]};return e.categories?.length?e.categories.flatMap(e=>a(e.title,i(e.children))):(e.groups??[]).flatMap(e=>a(e.title,e.categories?.length?e.categories.flatMap(e=>a(e.title,i(e.children))):i(e.children)))}function Tz({node:e,namespacePath:t}){return[...t,e.name].join(`.`)}function Ez(e,t=[]){let n=[];for(let r of e.children??[])r.kind===Sz.namespace?n.push(...Ez(r,[...t,r.name])):n.push({node:r,namespacePath:t});return n}function G5e(e){return String(e??``).replace(/\s+/g,` `).trim()}function Dz(e){if(e.length>512)throw Error(`TypeDoc declaration name "${_R(e,64)}" exceeds 512 characters`);return e.replace(/[^a-zA-Z0-9-_.]+/g,`-`).replace(/^-+|-+$/g,``)||`item`}var K5e=class{constructor(e,t=/* @__PURE__ */ new Map){this.slugById=e,this.memberSlugById=t}renderOverview(e,t,n,r){let i=s3e(this.partsMarkdown(e.readme??[]));lR(i,e=>hR(e.url));let a=[];for(let e of Cz){let t=n.filter(t=>t.target?.kind===e.symbolKind);t.length!==0&&a.push(`## ${e.group}`,t.map(e=>`- [${vR(e.title)}](/${e.slug})`).join(`
|
|
1018
|
+
`))}return{slug:t,title:e.name,intro:dR(i),content:a.join(`
|
|
1019
1019
|
|
|
1020
|
-
`),target:{kind:`package`,name:e.name,...r?{namespace:r}:{}}}}renderPage(e,t,n){let r=this.slugById.get(e.id)??Rt.posix.join(t.dir,
|
|
1020
|
+
`),target:{kind:`package`,name:e.name,...r?{namespace:r}:{}}}}renderPage(e,t,n){let r=this.slugById.get(e.id)??Rt.posix.join(t.dir,Dz(e.name)),i=[],a=this.comment(e.comment);switch(a&&i.push(a),e.kind){case Sz.class:case Sz.interface:i.push(...this.renderClassLike(e));break;case Sz.enum:i.push(...this.renderEnum(e));break;case Sz.function:i.push(...this.renderSignatures(e,2));break;case Sz.typeAlias:case Sz.variable:i.push(this.codeBlock(`${e.kind===Sz.variable?`const`:`type`} ${e.name}${e.kind===Sz.typeAlias?` =`:`:`} ${this.type(e.type)}`))}let o={kind:t.symbolKind,name:e.name};return{slug:r,title:n??e.name,description:this.firstSentence(e.comment),tag:t.tag,content:i.filter(Boolean).join(`
|
|
1021
1021
|
|
|
1022
|
-
`),target:o}}renderMemberPages(e,t,n){let r=(e.children??[]).filter(e=>!e.flags?.isPrivate),i=[];for(let a of r.filter(e=>e.kind===
|
|
1022
|
+
`),target:o}}renderMemberPages(e,t,n){let r=(e.children??[]).filter(e=>!e.flags?.isPrivate),i=[];for(let a of r.filter(e=>e.kind===Sz.property||e.kind===Sz.accessor)){let r=a.kind===Sz.accessor?a.getSignature?.type:a.type,o=a.flags?.isOptional===!0,s=this.comment(a.comment??a.getSignature?.comment);i.push({slug:Rt.posix.join(t,Dz(a.name)),title:`${n}.${a.name}`,description:this.firstSentence(a.comment??a.getSignature?.comment),tag:`PROPERTY`,content:this.typeField(a.name,r,o,s),target:{kind:`property`,name:a.name,parent:e.name}})}for(let a of r.filter(e=>e.kind===Sz.method))i.push({slug:Rt.posix.join(t,Dz(a.name)),title:`${n}.${a.name}`,description:this.firstSentence(a.comment??a.signatures?.[0]?.comment),tag:`METHOD`,content:this.renderSignatures(a,2).filter(Boolean).join(`
|
|
1023
1023
|
|
|
1024
|
-
`),target:{kind:`method`,name:a.name,parent:e.name}});return i}renderClassLike(e){let t=[{label:`Extends`,types:e.extendedTypes},{label:`Implements`,types:e.implementedTypes}].filter(({types:e})=>e?.length).map(({label:e,types:t})=>`**${e}:** ${(t??[]).map(e=>this.linkedOrCode(e)).join(`, `)}`),n=(e.children??[]).filter(e=>!e.flags?.isPrivate),r=this.memberLayout(e,n);if(r){for(let e of r)if(t.push(`## ${
|
|
1025
|
-
`)),...
|
|
1024
|
+
`),target:{kind:`method`,name:a.name,parent:e.name}});return i}renderClassLike(e){let t=[{label:`Extends`,types:e.extendedTypes},{label:`Implements`,types:e.implementedTypes}].filter(({types:e})=>e?.length).map(({label:e,types:t})=>`**${e}:** ${(t??[]).map(e=>this.linkedOrCode(e)).join(`, `)}`),n=(e.children??[]).filter(e=>!e.flags?.isPrivate),r=this.memberLayout(e,n);if(r){for(let e of r)if(t.push(`## ${Oz(e.title)}`),e.categories)for(let n of e.categories)t.push(`### ${Oz(n.title)}`),t.push(...this.renderMembers(n.members,4));else t.push(...this.renderMembers(e.members,3));return t}let i=n.filter(e=>e.kind===Sz.constructor),a=n.filter(e=>e.kind===Sz.property||e.kind===Sz.accessor).sort((e,t)=>e.name.localeCompare(t.name)),o=n.filter(e=>e.kind===Sz.method).sort((e,t)=>e.name.localeCompare(t.name));for(let e of i)t.push(`## Constructor`),t.push(...this.renderMembers([e],3));return a.length&&(t.push(`## Properties`),t.push(...this.renderMembers(a,3))),o.length&&(t.push(`## Methods`),t.push(...this.renderMembers(o,3))),t}memberLayout(e,t){let n=new Map(t.map(e=>[e.id,e])),r=/* @__PURE__ */ new Set,i=(e=[])=>e.flatMap(e=>{let t=n.get(e);return!t||!R5e.has(t.kind)||r.has(e)?[]:(r.add(e),[t])}),a=e=>e.map(e=>({title:e.title,members:i(e.children)})).filter(e=>e.members.length>0);if(e.categories?.length)return a(e.categories);if(B5e(e))return(e.groups??[]).map(e=>e.categories?.length?{title:e.title,members:[],categories:a(e.categories)}:{title:e.title,members:i(e.children)}).filter(e=>e.members.length>0||e.categories?.length)}renderMembers(e,t){let n=[];for(let r of e.filter(e=>e.kind===Sz.constructor))n.push(...this.renderSignatures(r,t));for(let t of e.filter(e=>e.kind===Sz.property||e.kind===Sz.accessor)){let e=t.kind===Sz.accessor?t.getSignature?.type:t.type;n.push(this.typeField(t.name,e,t.flags?.isOptional===!0,this.comment(t.comment??t.getSignature?.comment),wz(t,!1)))}for(let r of e.filter(e=>e.kind===Sz.method))n.push(`${`#`.repeat(t)} ${Oz(r.name)}()`),n.push(...this.renderSignatures(r,t+1));return n}renderEnum(e){let t=[`## Members`];for(let n of e.children??[])t.push(pR(n.name,n.type?.type===`literal`?JSON.stringify(n.type.value):``,!1,this.comment(n.comment),void 0,wz(n,!0)));return t}renderSignatures(e,t){let n=e.signatures??[];if(n.length>1)return this.renderOverloads(n,t);let r=[];for(let e of n){r.push(this.codeBlock(this.signatureLine(e)));let n=this.comment(e.comment);if(n&&r.push(n),e.parameters?.length){r.push(kz(`Parameters`,t));for(let t of e.parameters)r.push(this.typeField(t.name,t.type,t.flags?.isOptional===!0||t.defaultValue!==void 0,this.comment(t.comment)))}let i=e.comment?.blockTags?.find(e=>e.tag===`@returns`),a=this.type(e.type);if(a&&a!==`void`){r.push(kz(`Returns`,t));let n=this.linkedType(e.type)??vR(a);r.push(`${n}${i?`\n\n${this.parts(i.content)}`:``}`)}}return r}renderOverloads(e,t){let n=[this.codeBlock(e.map(e=>this.signatureLine(e)).join(`
|
|
1025
|
+
`)),...Az(e.map(e=>this.comment(e.comment)))],r=Az(e.flatMap(e=>(e.parameters??[]).map(e=>e.name)));r.length&&n.push(kz(`Parameters`,t));for(let t of r){let r=e.map(e=>e.parameters?.find(e=>e.name===t)),i=r.filter(e=>e!==void 0),a=r.some(e=>!e||e.flags?.isOptional===!0||e.defaultValue!==void 0),o=Az(i.map(e=>this.comment(e.comment))).join(`
|
|
1026
1026
|
|
|
1027
1027
|
`),s=this.distinctTypes(i.map(e=>e.type)),[c]=s;if(s.length===1){n.push(this.typeField(t,c,a,o));continue}let l=s.map(e=>`- ${this.linkedOrCode(e)}`).join(`
|
|
1028
|
-
`);n.push(
|
|
1028
|
+
`);n.push(pR(t,s.map(e=>this.type(e)).join(` | `),a,[`**Type:** one of\n\n${l}`,o].filter(Boolean).join(`
|
|
1029
1029
|
|
|
1030
|
-
`)))}let i=this.distinctTypes(e.map(e=>e.type)).filter(e=>this.type(e)!==`void`);return i.length&&n.push(
|
|
1030
|
+
`)))}let i=this.distinctTypes(e.map(e=>e.type)).filter(e=>this.type(e)!==`void`);return i.length&&n.push(kz(`Returns`,t),i.map(e=>this.linkedOrCode(e)).join(` | `),...Az(e.map(e=>{let t=e.comment?.blockTags?.find(e=>e.tag===`@returns`);return t?this.parts(t.content):``}))),n}distinctTypes(e){return[...new Map(e.map(e=>[this.linkedOrCode(e),e])).values()]}signatureLine(e){let t=(e.parameters??[]).map(e=>`${e.name}${e.flags?.isOptional||e.defaultValue!==void 0?`?`:``}: ${this.type(e.type)}`).join(`, `);return`${e.name}(${t}): ${this.type(e.type)}`}linkedOrCode(e){return this.linkedType(e)??vR(this.type(e))}typeField(e,t,n,r,i){let a=this.typeTokens(t),[o]=a,s=a.length===1&&o?.href?`/${o.href}`:void 0,c=s?void 0:this.linkedType(t),l=[c&&`**Type:** ${c}`,r].filter(Boolean).join(`
|
|
1031
1031
|
|
|
1032
|
-
`);return
|
|
1032
|
+
`);return pR(e,this.type(t),n,l,s,i)}codeBlock(e){return`\`\`\`typescript\n${e}\n\`\`\``}comment(e){if(!e?.summary?.length)return``;let t=this.parts(e.summary),n=e.blockTags?.find(e=>e.tag===`@deprecated`),r=e.blockTags?.find(e=>e.tag===`@example`),i=[t];return n&&i.push(`<Warning>Deprecated${n.content.length?`: ${this.parts(n.content)}`:``}</Warning>`),r&&i.push(this.parts(r.content)),i.filter(Boolean).join(`
|
|
1033
1033
|
|
|
1034
|
-
`)}parts(e){return lR(this.partsMarkdown(e))}partsMarkdown(e){return e.map(e=>{if(e.kind===`inline-tag`){let t=typeof e.target==`number`?this.slugById.get(e.target)??this.memberSlugById.get(e.target):void 0;return t?`[${e.text}](/${t})`:typeof e.target==`string`?`[${e.text}](${e.target})`:`\`${e.text}\``}return e.text}).join(``)}firstSentence(e){if(!e?.summary?.length)return;let t=e.summary.filter(e=>e.kind===`text`).map(e=>e.text).join(``).replace(/!?\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/[`*_]/g,``).replace(/\s+/g,` `).trim();return t?gR(t.split(/(?<=\.)\s/)[0]??t,160):void 0}type(e){return this.typeTokens(e).map(e=>e.text).join(``)}linkedType(e){return hR(this.typeTokens(e).map(e=>({text:e.text,...e.href?{href:`/${e.href}`}:{}})))}typeTokens(e){if(!e)return[{text:`void`}];switch(e.type){case`intrinsic`:return[{text:e.name??`unknown`}];case`reference`:{let t=typeof e.target==`number`?this.slugById.get(e.target):void 0,n={text:e.name??`unknown`,href:t};return e.typeArguments?.length?[n,{text:`<`},...this.joinTypes(e.typeArguments,`, `),{text:`>`}]:[n]}case`union`:return this.joinTypes(e.types,` | `);case`intersection`:return this.joinTypes(e.types,` & `);case`array`:return[...this.typeTokens(e.elementType),{text:`[]`}];case`literal`:return[{text:JSON.stringify(e.value)}];case`tuple`:return[{text:`[`},...this.joinTypes(e.elements,`, `),{text:`]`}];case`reflection`:return this.reflection(e.declaration);case`typeOperator`:return[{text:`${e.operator} `},...this.typeTokens(e.target)];case`indexedAccess`:return[...this.typeTokens(e.objectType),{text:`[`},...this.typeTokens(e.indexType),{text:`]`}];case`conditional`:return[...this.typeTokens(e.checkType),{text:` extends `},...this.typeTokens(e.extendsType),{text:` ? `},...this.typeTokens(e.trueType),{text:` : `},...this.typeTokens(e.falseType)];case`query`:return[{text:`typeof `},...this.typeTokens(e.target)];case`templateLiteral`:return[{text:`string`}];default:return[{text:e.name??`unknown`}]}}joinTypes(e=[],t){return e.flatMap((e,n)=>[...n>0?[{text:t}]:[],...this.typeTokens(e)])}reflection(e){if(!e)return[{text:`object`}];let t=e.signatures?.[0];return t?[{text:`(`},...(t.parameters??[]).flatMap((e,t)=>[{text:`${t>0?`, `:``}${e.name}: `},...this.typeTokens(e.type)]),{text:`) => `},...this.typeTokens(t.type)]:e.children?.length?[{text:`{ `},...e.children.flatMap((e,t)=>[{text:`${t>0?`; `:``}${e.name}: `},...this.typeTokens(e.type)]),{text:` }`}]:[{text:`object`}]}};function Dz(e){return R4e(K5e(e))}function Oz(e,t){return t<=4?`${`#`.repeat(t)} ${e}`:`**${e}**`}function kz(e){return[...new Set(e)].filter(Boolean)}const J5e={typedoc:H5e,docfx:q4e,javadoc:B3e,sphinx:S5e,phpdoc:z8e,go:x3e};async function Y5e(e,t){let n=J5e[e];if(!n)throw Error(`Unsupported SDK documentation format: ${e}`);return n(t)}const X5e={package:`packages`,class:`classes`,interface:`interfaces`,enum:`enums`,function:`functions`,type:`types`,variable:`variables`,method:`methods`,property:`properties`};function Z5e(e,t){if(!e||e.kind!==t.kind||t.namespace!==void 0&&e.namespace!==t.namespace)return!1;let n=t.namespace!==void 0;return Q5e(e.name,e.namespace,t.name,n)?t.parent?e.parent!==void 0&&Q5e(e.parent,e.namespace,t.parent,n):e.parent===void 0:!1}function Q5e(e,t,n,r){return n===e?!0:r||t===void 0?!1:`.${t}.${e}`.endsWith(`.${n}`)}function $5e(e,t){if(t.parent)return e.title===`${t.parent}.${t.name}`||e.slug.endsWith(`/${Az(t.parent)}/${Az(t.name)}`);let n=X5e[t.kind];return e.slug===`${n}/${Az(t.name)}`||e.slug.endsWith(`/${n}/${Az(t.name)}`)}function Az(e){return e.replace(/[^a-zA-Z0-9-_.]+/g,`-`).replace(/^-+|-+$/g,``)||`item`}function e7e(e){let t=e.parent?`${e.parent}.${e.name}`:e.name;return e.namespace?`${e.namespace}.${t}`:t}function t7e(e,t){let n=e.pages.filter(e=>Z5e(e.target,t));if(n.length>1){let e=t.parent?`${t.parent}.${t.name}`:t.name,r=n.filter(t=>e7e(t.target)===e);if(r.length===1)return r[0]}if(n.length>1&&n.some(e=>e.target?.namespace)){let e=n.map(e=>e7e(e.target)),r=t.parent?`${t.parent}.${t.name}`:t.name;throw Error(`SDK symbol is ambiguous: ${t.kind} ${r} matches ${e.join(`, `)}; qualify it with its package`)}return n[0]||t.namespace!==void 0?n[0]:e.pages.find(e=>n7e(e.target,t)&&$5e(e,t))}function n7e(e,t){return e?e.kind!==t.kind||e.name!==t.name?!1:t.parent?e.parent!==void 0&&`.${t.parent}`.endsWith(`.${e.parent}`):e.parent===void 0:!0}function r7e(e,t){let n=t7e(e,t);if(!n){let e=t.parent?`${t.parent}.${t.name}`:t.name;throw Error(`SDK symbol not found: ${t.kind} ${e}`)}return n}var i7e=Ln(`/`);try{i7e(`worker_threads`).Worker}catch{}var jz=Uint8Array,Mz=Uint16Array,a7e=Int32Array,o7e=new jz([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),s7e=new jz([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c7e=new jz([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l7e=function(e,t){for(var n=new Mz(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new a7e(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},u7e=l7e(o7e,2),d7e=u7e.b,f7e=u7e.r;d7e[28]=258,f7e[258]=28;var p7e=l7e(s7e,0),m7e=p7e.b;p7e.r;for(var Nz=new Mz(32768),Pz=0;Pz<32768;++Pz){var Fz=(Pz&43690)>>1|(Pz&21845)<<1;Fz=(Fz&52428)>>2|(Fz&13107)<<2,Fz=(Fz&61680)>>4|(Fz&3855)<<4,Nz[Pz]=((Fz&65280)>>8|(Fz&255)<<8)>>1}for(var Iz=(function(e,t,n){for(var r=e.length,i=0,a=new Mz(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new Mz(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new Mz(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[Nz[d]>>c]=l}else for(s=new Mz(r),i=0;i<r;++i)e[i]&&(s[i]=Nz[o[e[i]-1]++]>>15-e[i]);return s}),Lz=new jz(288),Pz=0;Pz<144;++Pz)Lz[Pz]=8;for(var Pz=144;Pz<256;++Pz)Lz[Pz]=9;for(var Pz=256;Pz<280;++Pz)Lz[Pz]=7;for(var Pz=280;Pz<288;++Pz)Lz[Pz]=8;for(var h7e=new jz(32),Pz=0;Pz<32;++Pz)h7e[Pz]=5;var g7e=/*#__PURE__*/ Iz(Lz,9,1),_7e=/*#__PURE__*/ Iz(h7e,5,1),Rz=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},zz=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},Bz=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},v7e=function(e){return(e+7)/8|0},Vz=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new jz(e.subarray(t,n))},y7e=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],Hz=function(e,t,n){var r=Error(t||y7e[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Hz),!n)throw r;return r},b7e=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new jz(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new jz(i*3));var l=function(e){var t=n.length;if(e>t){var r=new jz(Math.max(t*2,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=i*8;do{if(!p){u=zz(e,d,1);var v=zz(e,d+1,3);if(d+=3,!v){var y=v7e(d)+4,b=e[y-4]|e[y-3]<<8,x=y+b;if(x>i){c&&Hz(0);break}s&&l(f+b),n.set(e.subarray(y,x),f),t.b=f+=b,t.p=d=x*8,t.f=u;continue}if(v==1)p=g7e,m=_7e,h=9,g=5;else if(v==2){var S=zz(e,d,31)+257,C=zz(e,d+10,15)+4,w=S+zz(e,d+5,31)+1;d+=14;for(var T=new jz(w),E=new jz(19),D=0;D<C;++D)E[c7e[D]]=zz(e,d+D*3,7);d+=C*3;for(var O=Rz(E),k=(1<<O)-1,A=Iz(E,O,1),D=0;D<w;){var ee=A[zz(e,d,k)];d+=ee&15;var y=ee>>4;if(y<16)T[D++]=y;else{var te=0,ne=0;for(y==16?(ne=3+zz(e,d,3),d+=2,te=T[D-1]):y==17?(ne=3+zz(e,d,7),d+=3):y==18&&(ne=11+zz(e,d,127),d+=7);ne--;)T[D++]=te}}var re=T.subarray(0,S),ie=T.subarray(S);h=Rz(re),g=Rz(ie),p=Iz(re,h,1),m=Iz(ie,g,1)}else Hz(1);if(d>_){c&&Hz(0);break}}s&&l(f+131072);for(var ae=(1<<h)-1,oe=(1<<g)-1,j=d;;j=d){var te=p[Bz(e,d)&ae],se=te>>4;if(d+=te&15,d>_){c&&Hz(0);break}if(te||Hz(2),se<256)n[f++]=se;else if(se==256){j=d,p=null;break}else{var ce=se-254;if(se>264){var D=se-257,le=o7e[D];ce=zz(e,d,(1<<le)-1)+d7e[D],d+=le}var M=m[Bz(e,d)&oe],N=M>>4;M||Hz(3),d+=M&15;var ie=m7e[N];if(N>3){var le=s7e[N];ie+=Bz(e,d)&(1<<le)-1,d+=le}if(d>_){c&&Hz(0);break}s&&l(f+131072);var ue=f+ce;if(f<ie){var de=a-ie,fe=Math.min(ie,ue);for(de+f<0&&Hz(3);f<fe;++f)n[f]=r[de+f]}for(;f<ue;++f)n[f]=n[f-ie]}}t.l=p,t.p=j,t.b=f,t.f=u,p&&(u=1,t.m=h,t.d=m,t.n=g)}while(!u);return f!=n.length&&o?Vz(n,0,f):n.subarray(0,f)},Uz=/*#__PURE__*/ new jz(0),Wz=function(e,t){return e[t]|e[t+1]<<8},Gz=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Kz=function(e,t){return Gz(e,t)+Gz(e,t+4)*4294967296},x7e=/* @__PURE__ */ function(){function e(e,t){typeof e==`function`&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new jz(32768),this.p=new jz(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||Hz(5),this.d&&Hz(4),!this.p.length)this.p=e;else if(e.length){var t=new jz(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=b7e(this.p,this.s,this.o);this.ondata(Vz(n,t,this.s.b),this.d),this.o=Vz(n,this.s.b-32768),this.s.b=this.o.length,this.p=Vz(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),qz=typeof TextDecoder<`u`&&/*#__PURE__*/ new TextDecoder;try{qz.decode(Uz,{stream:!0})}catch{}var S7e=function(e){for(var t=``,n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Vz(e,n-1)};i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function C7e(e,t){if(t){for(var n=``,r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(qz)return qz.decode(e);var i=S7e(e),a=i.s,n=i.r;return n.length&&Hz(8),a}var w7e=function(e,t){for(;Wz(e,t)!=1;t+=4+Wz(e,t+2));return[Kz(e,t+12),Kz(e,t+4),Kz(e,t+20)]},T7e=/* @__PURE__ */ function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),E7e=/* @__PURE__ */ function(){function e(){var e=this;this.i=new x7e(function(t,n){e.ondata(null,t,n)})}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),D7e=/* @__PURE__ */ function(){function e(e){this.onfile=e,this.k=[],this.o={0:T7e},this.p=Uz}return e.prototype.push=function(e,t){var n=this;if(this.onfile||Hz(5),this.p||Hz(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),e=e.subarray(r),e.length)return this.push(e,t)}else{var a=0,o=0,s=void 0,c=void 0;this.p.length?e.length?(c=new jz(this.p.length+e.length),c.set(this.p),c.set(e,this.p.length)):c=this.p:c=e;for(var l=c.length,u=this.c,d=u&&this.d,f=function(){var e,t=Gz(c,o);if(t==67324752){a=1,s=o,p.d=null,p.c=0;var r=Wz(c,o+6),i=Wz(c,o+8),d=r&2048,f=r&8,m=Wz(c,o+26),h=Wz(c,o+28);if(l>o+30+m+h){var g=[];p.k.unshift(g),a=2;var _=Gz(c,o+18),v=Gz(c,o+22),y=C7e(c.subarray(o+30,o+=30+m),!d);_==4294967295?(e=f?[-2]:w7e(c,o),_=e[0],v=e[1]):f&&(_=-1),o+=h,p.c=_;var b,x={name:y,compression:i,start:function(){if(x.ondata||Hz(5),!_)x.ondata(null,Uz,!0);else{var e=n.o[i];e||x.ondata(Hz(14,`unknown compression type `+i,1),null,!1),b=_<0?new e(y):new e(y,_,v),b.ondata=function(e,t,n){x.ondata(e,t,n)};for(var t=0,r=g;t<r.length;t++){var a=r[t];b.push(a,!1)}n.k[0]==g&&n.c?n.d=b:b.push(Uz,!0)}},terminate:function(){b&&b.terminate&&b.terminate()}};_>=0&&(x.size=_,x.originalSize=v),p.onfile(x)}return`break`}if(u){if(t==134695760)return s=o+=12+(u==-2&&8),a=3,p.c=0,`break`;if(t==33639248)return s=o-=4,a=3,p.c=0,`break`}},p=this;o<l-4&&f()!==`break`;++o);if(this.p=Uz,u<0){var m=a?c.subarray(0,s-12-(u==-2&&8)-(Gz(c,s-16)==134695760&&4)):c.subarray(0,o);d?d.push(m,!!a):this.k[+(a==2)].push(m)}if(a&2)return this.push(c.subarray(o),t);this.p=c.subarray(o)}t&&(this.c&&Hz(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();const Jz=e=>e.replaceAll(`\\`,`/`).normalize(`NFC`).toLowerCase();function Yz(e,t){let n=new Map(Object.keys(e.pages).map(e=>[Jz(e),e]));for(let r of Object.keys(t.pages)){let i=n.get(Jz(r));if(i)throw Error(`Generated ${e.label} route "${i}" collides with generated ${t.label} route "${r}"`)}}const O7e=5242880,Xz=new Hn;for(let[e,t]of[[`0.0.0.0`,8],[`10.0.0.0`,8],[`100.64.0.0`,10],[`127.0.0.0`,8],[`169.254.0.0`,16],[`172.16.0.0`,12],[`192.0.0.0`,24],[`192.0.2.0`,24],[`192.88.99.0`,24],[`192.168.0.0`,16],[`198.18.0.0`,15],[`198.51.100.0`,24],[`203.0.113.0`,24],[`224.0.0.0`,4],[`240.0.0.0`,4]])Xz.addSubnet(e,t,`ipv4`);for(let[e,t]of[[`::`,128],[`::1`,128],[`::`,96],[`64:ff9b:1::`,48],[`100::`,64],[`2001::`,32],[`2001:2::`,48],[`2001:10::`,28],[`2001:20::`,28],[`2001:db8::`,32],[`2002::`,16],[`3fff::`,20],[`5f00::`,16],[`fc00::`,7],[`fe80::`,10],[`fec0::`,10],[`ff00::`,8]])Xz.addSubnet(e,t,`ipv6`);const Zz=e=>{let t=Un(e),n=e.toLowerCase();if(t===6&&n.startsWith(`::ffff:`)){let e=n.slice(7);if(Un(e)===4)return Zz(e);let[t,r]=e.split(`:`).map(e=>Number.parseInt(e,16));return t!=null&&r!=null&&Number.isFinite(t)&&Number.isFinite(r)?Zz(`${t>>8}.${t&255}.${r>>8}.${r&255}`):!1}return t!==0&&!Xz.check(e,t===4?`ipv4`:`ipv6`)};async function k7e(e){return Un(e)?[{address:e,family:Un(e)}]:await Rn(e,{all:!0})}function A7e(e){return((t,n,r)=>{typeof n==`object`&&n?.all?r(null,[e]):r(null,e.address,e.family)})}async function j7e(e,t,n){if(e.protocol!==`https:`)throw Error(`${n} redirects must use HTTPS: ${e.href}`);let r=e.hostname.toLowerCase().replace(/^\[|\]$/g,``);if(r===`localhost`||r.endsWith(`.localhost`))throw Error(`${n} host must be public: ${r}`);let i;try{i=await t(r)}catch(e){let t=e instanceof Error?`: ${e.message}`:``;throw Error(`Unable to resolve ${n} host ${r}${t}`)}if(i.length===0||i.some(({address:e})=>!Zz(e)))throw Error(`${n} host must resolve only to public addresses: ${r}`);return i[0]}function M7e(e,t,n,r,i,a){return new Promise((o,s)=>{let c,l,u=!1,d=(e,t)=>{u||(u=!0,clearTimeout(m),e(t))},f=e.hostname.replace(/^\[|\]$/g,``),p={agent:!1,lookup:A7e(t),servername:Un(f)?void 0:f,headers:{Host:e.host}},m=setTimeout(()=>{let e=/* @__PURE__ */ Error(`timeout`);c?.destroy(e),l.destroy(e),d(s,e)},r);try{l=n(e,p,t=>{c=t;let n=[],r=0,l=Number(t.headers[`content-length`]);Number.isFinite(l)&&l>i?(t.destroy(),d(s,/* @__PURE__ */ Error(`${a} ${e.href} exceeds the ${i} byte limit`))):(t.on(`data`,o=>{let c=Buffer.isBuffer(o)?o:Buffer.from(o);r+=c.byteLength,r>i?(t.destroy(),d(s,/* @__PURE__ */ Error(`${a} ${e.href} exceeds the ${i} byte limit`))):n.push(new Uint8Array(c))}),t.on(`end`,()=>{d(o,{statusCode:t.statusCode??0,statusMessage:t.statusMessage??``,headers:t.headers,body:Buffer.concat(n)})}),t.on(`error`,e=>d(s,e)))})}catch(e){d(s,e);return}l.on(`error`,e=>d(s,e)),l.end()})}async function N7e(e,t={}){return(await P7e(e,t)).toString(`utf8`)}async function P7e(e,t={}){let n=t.timeoutMs??1e4,r=t.maxBytes??5242880,i=t.resolveHostname??k7e,a=t.requestImpl??Bn,o=t.label??`GraphQL schema`,s=Date.now()+n,c=new URL(e),l=async(e,t)=>{let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(/* @__PURE__ */ Error(`timeout`)),t)})])}finally{n&&clearTimeout(n)}};for(let t=0;t<=5;t++){let n=s-Date.now();if(n<=0)throw Error(`Timed out loading ${o} ${e}`);let u;try{let e=await l(j7e(c,i,o),n);if(n=s-Date.now(),n<=0)throw Error(`timeout`);u=await M7e(c,e,a,n,r,o)}catch(t){throw Date.now()>=s||t instanceof Error&&t.message===`timeout`?Error(`Timed out loading ${o} ${e}`):t}if(u.statusCode>=300&&u.statusCode<400){let n=u.headers.location;if(typeof n!=`string`)throw Error(`${o} redirect from ${c.href} has no location`);if(t===5)throw Error(`Too many redirects loading ${o} ${e}`);c=new URL(n,c)}else{if(u.statusCode<200||u.statusCode>=300)throw Error(`Unable to load ${o} ${c.href}: ${u.statusCode} ${u.statusMessage}`);return u.body}}throw Error(`Too many redirects loading ${o} ${e}`)}const Qz=`sdk-reference`,F7e=209715200;function I7e(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.format==`string`&&typeof t.source==`string`}function $z(e,t=[],n=!1){if(typeof e==`string`)return t.push(e.replace(/^\//,``).replace(/\.mdx?$/,``)),t;if(Array.isArray(e)){for(let n of e)$z(n,t);return t}if(typeof e!=`object`||!e)return t;let r=e;if(!n&&`sdk`in r&&I7e(r.sdk))return t;`root`in r&&$z(r.root,t),`pages`in r&&$z(r.pages,t),`groups`in r&&$z(r.groups,t);for(let e of[`tabs`,`anchors`,`dropdowns`,`versions`,`languages`,`products`,`menu`])e in r&&$z(r[e],t);return t}function L7e(e,t,n){return t?$z(e,[],!0).some(e=>{let r=t[e]??t[`/${e}`];return OP({sdk:r?.sdk},n)!==void 0}):!1}function R7e(e,t,n,r,i){Q7e(e.slug,t);let a=Rt.posix.join(n,e.slug),o=e.target?{format:t.format,source:t.source,kind:e.target.kind,name:e.target.name,...e.target.parent?{parent:e.target.parent}:{},...e.target.namespace?{namespace:e.target.namespace}:{}}:void 0;return{slug:a,title:e.title,...e.description?{description:e.description}:{},...e.tag?{tag:e.tag}:{},content:Z7e(e9e(e,!0),n,r),format:t.format,source:t.source,...o?{sdk:o}:{},...i?{autogeneratedBySdk:!0}:{}}}function z7e(e,t){return{group:e.group,pages:e.pages.map(e=>typeof e==`string`?Rt.posix.join(t,e):z7e(e,t))}}function B7e(e,t=/* @__PURE__ */ new Set){for(let n of e)for(let e of n.pages)typeof e==`string`?t.add(e):B7e([e],t);return t}function V7e(e,t){let n=new Map(e.pages.map(e=>[e.slug,e])),r=e.groups.map(e=>z7e(e,t)),i=B7e(e.groups);e.overview&&i.add(e.overview);let a=e.pages.filter(e=>!e.target?.parent).map(e=>e.slug).filter(e=>!i.has(e));return a.length>0&&n.size>0&&r.push({group:`Reference`,pages:a.map(e=>Rt.posix.join(t,e))}),r}async function H7e(e,t,n={}){let r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a={},{pageMetadataBySlug:o}=n;function s(e){let n=`${e.format}:${e.source}`,i=r.get(n);return i||(i=t(e),r.set(n,i)),i}function c(e){let t=Jz(e.slug),n=i.get(t);if(n&&(n.slug!==e.slug||n.format!==e.format||n.source!==e.source))throw Error(`Multiple SDK references generate colliding routes "${n.slug}" and "${e.slug}"`);i.set(t,e)}async function l(e){let t=e.directory??Qz,n=await s(e),r=n.pages.filter(e=>!e.target?.parent),i=new Set(r.map(e=>e.slug));for(let n of r)c(R7e(n,e,t,i,!0));return{groups:V7e({...n,pages:r},t),overview:n.overview&&i.has(n.overview)?[Rt.posix.join(t,n.overview)]:[]}}async function u(e,t){return Array.isArray(e)?Promise.all(e.map(e=>{if(typeof e==`string`){let n=e.replace(/^\//,``).replace(/\.mdx?$/,``);return t&&(a[n]=t),e}return d(e,t)})):d(e,t)}async function d(e,t){if(Array.isArray(e))return Promise.all(e.map(e=>d(e,t)));if(typeof e==`string`||typeof e!=`object`||!e)return e;let n=e,r=`sdk`in n&&I7e(n.sdk)?n.sdk:void 0,i=r??t,s=`tab`in n&&typeof n.tab==`string`,c=`group`in n&&typeof n.group==`string`;if(c&&typeof n.root==`string`&&i){let e=n.root.replace(/^\//,``).replace(/\.mdx?$/,``);a[e]=i}if(r&&(s||c)){if(!L7e(n,o,r)){let{groups:e,overview:t}=await l(r);if(s){let{sdk:i,...a}=n,o=Array.isArray(a.groups)?await d(a.groups,r):[],s=[...Array.isArray(a.pages)?await u(a.pages,r):[],...t],c=await Promise.all(Object.entries(a).filter(([e])=>e!==`groups`&&e!==`pages`).map(async([e,t])=>[e,await d(t,r)])),l=o.findIndex(e=>We(e)&&e.group===`Overview`&&Array.isArray(e.pages)),f=o.map((e,t)=>t===l&&We(e)&&Array.isArray(e.pages)?{...e,pages:[...e.pages,...s]}:e);return{...Object.fromEntries(c),groups:[...f,...l===-1&&s.length>0?[{group:`Overview`,pages:s}]:[],...e]}}let{sdk:i,...a}=n,o=Array.isArray(a.pages)?await u(a.pages,r):[];return{...a,pages:[...o,...t,...e]}}if(s){let{sdk:e,...t}=n;return d(t,r)}let{sdk:e,...t}=n;return d(t,r)}return Object.fromEntries(await Promise.all(Object.entries(n).map(async([e,t])=>[e,e===`pages`?await u(t,i):await d(t,i)])))}let f=await d(e.navigation),p=[...i.values()].sort((e,t)=>e.slug.localeCompare(t.slug)),m=Object.fromEntries(p.map(e=>[e.slug,{href:`/${e.slug}`,title:e.title,...e.description?{description:e.description}:{},...e.tag?{tag:e.tag}:{},...e.sdk?{sdk:e.sdk}:{}}]));return{newDocsConfig:{...e,navigation:f},pagesAcc:m,generatedPages:p,generatedRoutes:p.map(({slug:e})=>e),inheritedSdkBySlug:a}}async function U7e(e){let t=OP(e.metadata,e.inherited);if(!t)return;let n=await e.loadReference({format:t.format,source:t.source}),r;try{r=r7e(n,t)}catch(t){console.error(`unable to resolve sdk target for "${e.slug}":`,t);return}let i=e.slug.replace(/^\//,``).replace(/\.mdx?$/,``),a=Rt.posix.dirname(i),o=e.inherited===void 0?a===`.`?Qz:a:e.inherited.directory??Qz,s=new Set(n.pages.map(e=>e.slug)),c=eB(e.authorContent).trim(),l=Z7e(e9e(r,c.length===0),o,s),u=[c,l].filter(Boolean).join(`
|
|
1034
|
+
`)}parts(e){return uR(this.partsMarkdown(e))}partsMarkdown(e){return e.map(e=>{if(e.kind===`inline-tag`){let t=typeof e.target==`number`?this.slugById.get(e.target)??this.memberSlugById.get(e.target):void 0;return t?`[${e.text}](/${t})`:typeof e.target==`string`?`[${e.text}](${e.target})`:`\`${e.text}\``}return e.text}).join(``)}firstSentence(e){if(!e?.summary?.length)return;let t=e.summary.filter(e=>e.kind===`text`).map(e=>e.text).join(``).replace(/!?\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/[`*_]/g,``).replace(/\s+/g,` `).trim();return t?_R(t.split(/(?<=\.)\s/)[0]??t,160):void 0}type(e){return this.typeTokens(e).map(e=>e.text).join(``)}linkedType(e){return gR(this.typeTokens(e).map(e=>({text:e.text,...e.href?{href:`/${e.href}`}:{}})))}typeTokens(e){if(!e)return[{text:`void`}];switch(e.type){case`intrinsic`:return[{text:e.name??`unknown`}];case`reference`:{let t=typeof e.target==`number`?this.slugById.get(e.target):void 0,n={text:e.name??`unknown`,href:t};return e.typeArguments?.length?[n,{text:`<`},...this.joinTypes(e.typeArguments,`, `),{text:`>`}]:[n]}case`union`:return this.joinTypes(e.types,` | `);case`intersection`:return this.joinTypes(e.types,` & `);case`array`:return[...this.typeTokens(e.elementType),{text:`[]`}];case`literal`:return[{text:JSON.stringify(e.value)}];case`tuple`:return[{text:`[`},...this.joinTypes(e.elements,`, `),{text:`]`}];case`reflection`:return this.reflection(e.declaration);case`typeOperator`:return[{text:`${e.operator} `},...this.typeTokens(e.target)];case`indexedAccess`:return[...this.typeTokens(e.objectType),{text:`[`},...this.typeTokens(e.indexType),{text:`]`}];case`conditional`:return[...this.typeTokens(e.checkType),{text:` extends `},...this.typeTokens(e.extendsType),{text:` ? `},...this.typeTokens(e.trueType),{text:` : `},...this.typeTokens(e.falseType)];case`query`:return[{text:`typeof `},...this.typeTokens(e.target)];case`templateLiteral`:return[{text:`string`}];default:return[{text:e.name??`unknown`}]}}joinTypes(e=[],t){return e.flatMap((e,n)=>[...n>0?[{text:t}]:[],...this.typeTokens(e)])}reflection(e){if(!e)return[{text:`object`}];let t=e.signatures?.[0];return t?[{text:`(`},...(t.parameters??[]).flatMap((e,t)=>[{text:`${t>0?`, `:``}${e.name}: `},...this.typeTokens(e.type)]),{text:`) => `},...this.typeTokens(t.type)]:e.children?.length?[{text:`{ `},...e.children.flatMap((e,t)=>[{text:`${t>0?`; `:``}${e.name}: `},...this.typeTokens(e.type)]),{text:` }`}]:[{text:`object`}]}};function Oz(e){return L4e(G5e(e))}function kz(e,t){return t<=4?`${`#`.repeat(t)} ${e}`:`**${e}**`}function Az(e){return[...new Set(e)].filter(Boolean)}const q5e={typedoc:V5e,docfx:K4e,javadoc:z3e,sphinx:x5e,phpdoc:R8e,go:b3e};async function J5e(e,t){let n=q5e[e];if(!n)throw Error(`Unsupported SDK documentation format: ${e}`);return n(t)}const Y5e={package:`packages`,class:`classes`,interface:`interfaces`,enum:`enums`,function:`functions`,type:`types`,variable:`variables`,method:`methods`,property:`properties`};function X5e(e,t){if(!e||e.kind!==t.kind||t.namespace!==void 0&&e.namespace!==t.namespace)return!1;let n=t.namespace!==void 0;return Z5e(e.name,e.namespace,t.name,n)?t.parent?e.parent!==void 0&&Z5e(e.parent,e.namespace,t.parent,n):e.parent===void 0:!1}function Z5e(e,t,n,r){return n===e?!0:r||t===void 0?!1:`.${t}.${e}`.endsWith(`.${n}`)}function Q5e(e,t){if(t.parent)return e.title===`${t.parent}.${t.name}`||e.slug.endsWith(`/${jz(t.parent)}/${jz(t.name)}`);let n=Y5e[t.kind];return e.slug===`${n}/${jz(t.name)}`||e.slug.endsWith(`/${n}/${jz(t.name)}`)}function jz(e){return e.replace(/[^a-zA-Z0-9-_.]+/g,`-`).replace(/^-+|-+$/g,``)||`item`}function $5e(e){let t=e.parent?`${e.parent}.${e.name}`:e.name;return e.namespace?`${e.namespace}.${t}`:t}function e7e(e,t){let n=e.pages.filter(e=>X5e(e.target,t));if(n.length>1){let e=t.parent?`${t.parent}.${t.name}`:t.name,r=n.filter(t=>$5e(t.target)===e);if(r.length===1)return r[0]}if(n.length>1&&n.some(e=>e.target?.namespace)){let e=n.map(e=>$5e(e.target)),r=t.parent?`${t.parent}.${t.name}`:t.name;throw Error(`SDK symbol is ambiguous: ${t.kind} ${r} matches ${e.join(`, `)}; qualify it with its package`)}return n[0]||t.namespace!==void 0?n[0]:e.pages.find(e=>t7e(e.target,t)&&Q5e(e,t))}function t7e(e,t){return e?e.kind!==t.kind||e.name!==t.name?!1:t.parent?e.parent!==void 0&&`.${t.parent}`.endsWith(`.${e.parent}`):e.parent===void 0:!0}function n7e(e,t){let n=e7e(e,t);if(!n){let e=t.parent?`${t.parent}.${t.name}`:t.name;throw Error(`SDK symbol not found: ${t.kind} ${e}`)}return n}var r7e=Ln(`/`);try{r7e(`worker_threads`).Worker}catch{}var Mz=Uint8Array,Nz=Uint16Array,i7e=Int32Array,a7e=new Mz([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),o7e=new Mz([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s7e=new Mz([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c7e=function(e,t){for(var n=new Nz(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new i7e(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},l7e=c7e(a7e,2),u7e=l7e.b,d7e=l7e.r;u7e[28]=258,d7e[258]=28;var f7e=c7e(o7e,0),p7e=f7e.b;f7e.r;for(var Pz=new Nz(32768),Fz=0;Fz<32768;++Fz){var Iz=(Fz&43690)>>1|(Fz&21845)<<1;Iz=(Iz&52428)>>2|(Iz&13107)<<2,Iz=(Iz&61680)>>4|(Iz&3855)<<4,Pz[Fz]=((Iz&65280)>>8|(Iz&255)<<8)>>1}for(var Lz=(function(e,t,n){for(var r=e.length,i=0,a=new Nz(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new Nz(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new Nz(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[Pz[d]>>c]=l}else for(s=new Nz(r),i=0;i<r;++i)e[i]&&(s[i]=Pz[o[e[i]-1]++]>>15-e[i]);return s}),Rz=new Mz(288),Fz=0;Fz<144;++Fz)Rz[Fz]=8;for(var Fz=144;Fz<256;++Fz)Rz[Fz]=9;for(var Fz=256;Fz<280;++Fz)Rz[Fz]=7;for(var Fz=280;Fz<288;++Fz)Rz[Fz]=8;for(var m7e=new Mz(32),Fz=0;Fz<32;++Fz)m7e[Fz]=5;var h7e=/*#__PURE__*/ Lz(Rz,9,1),g7e=/*#__PURE__*/ Lz(m7e,5,1),zz=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Bz=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},Vz=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},_7e=function(e){return(e+7)/8|0},Hz=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Mz(e.subarray(t,n))},v7e=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],Uz=function(e,t,n){var r=Error(t||v7e[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Uz),!n)throw r;return r},y7e=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new Mz(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new Mz(i*3));var l=function(e){var t=n.length;if(e>t){var r=new Mz(Math.max(t*2,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=i*8;do{if(!p){u=Bz(e,d,1);var v=Bz(e,d+1,3);if(d+=3,!v){var y=_7e(d)+4,b=e[y-4]|e[y-3]<<8,x=y+b;if(x>i){c&&Uz(0);break}s&&l(f+b),n.set(e.subarray(y,x),f),t.b=f+=b,t.p=d=x*8,t.f=u;continue}if(v==1)p=h7e,m=g7e,h=9,g=5;else if(v==2){var S=Bz(e,d,31)+257,C=Bz(e,d+10,15)+4,w=S+Bz(e,d+5,31)+1;d+=14;for(var T=new Mz(w),E=new Mz(19),D=0;D<C;++D)E[s7e[D]]=Bz(e,d+D*3,7);d+=C*3;for(var O=zz(E),k=(1<<O)-1,A=Lz(E,O,1),D=0;D<w;){var ee=A[Bz(e,d,k)];d+=ee&15;var y=ee>>4;if(y<16)T[D++]=y;else{var te=0,ne=0;for(y==16?(ne=3+Bz(e,d,3),d+=2,te=T[D-1]):y==17?(ne=3+Bz(e,d,7),d+=3):y==18&&(ne=11+Bz(e,d,127),d+=7);ne--;)T[D++]=te}}var re=T.subarray(0,S),ie=T.subarray(S);h=zz(re),g=zz(ie),p=Lz(re,h,1),m=Lz(ie,g,1)}else Uz(1);if(d>_){c&&Uz(0);break}}s&&l(f+131072);for(var ae=(1<<h)-1,oe=(1<<g)-1,j=d;;j=d){var te=p[Vz(e,d)&ae],se=te>>4;if(d+=te&15,d>_){c&&Uz(0);break}if(te||Uz(2),se<256)n[f++]=se;else if(se==256){j=d,p=null;break}else{var ce=se-254;if(se>264){var D=se-257,le=a7e[D];ce=Bz(e,d,(1<<le)-1)+u7e[D],d+=le}var M=m[Vz(e,d)&oe],N=M>>4;M||Uz(3),d+=M&15;var ie=p7e[N];if(N>3){var le=o7e[N];ie+=Vz(e,d)&(1<<le)-1,d+=le}if(d>_){c&&Uz(0);break}s&&l(f+131072);var ue=f+ce;if(f<ie){var de=a-ie,fe=Math.min(ie,ue);for(de+f<0&&Uz(3);f<fe;++f)n[f]=r[de+f]}for(;f<ue;++f)n[f]=n[f-ie]}}t.l=p,t.p=j,t.b=f,t.f=u,p&&(u=1,t.m=h,t.d=m,t.n=g)}while(!u);return f!=n.length&&o?Hz(n,0,f):n.subarray(0,f)},Wz=/*#__PURE__*/ new Mz(0),Gz=function(e,t){return e[t]|e[t+1]<<8},Kz=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},b7e=function(e,t){return Kz(e,t)+Kz(e,t+4)*4294967296},x7e=/* @__PURE__ */ function(){function e(e,t){typeof e==`function`&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new Mz(32768),this.p=new Mz(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||Uz(5),this.d&&Uz(4),!this.p.length)this.p=e;else if(e.length){var t=new Mz(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=y7e(this.p,this.s,this.o);this.ondata(Hz(n,t,this.s.b),this.d),this.o=Hz(n,this.s.b-32768),this.s.b=this.o.length,this.p=Hz(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),qz=typeof TextDecoder<`u`&&/*#__PURE__*/ new TextDecoder;try{qz.decode(Wz,{stream:!0})}catch{}var S7e=function(e){for(var t=``,n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Hz(e,n-1)};i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function C7e(e,t){if(t){for(var n=``,r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(qz)return qz.decode(e);var i=S7e(e),a=i.s,n=i.r;return n.length&&Uz(8),a}var w7e=function(e,t){for(;Gz(e,t)!=1;t+=4+Gz(e,t+2));return[b7e(e,t+12),b7e(e,t+4),b7e(e,t+20)]},T7e=/* @__PURE__ */ function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),E7e=/* @__PURE__ */ function(){function e(){var e=this;this.i=new x7e(function(t,n){e.ondata(null,t,n)})}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),D7e=/* @__PURE__ */ function(){function e(e){this.onfile=e,this.k=[],this.o={0:T7e},this.p=Wz}return e.prototype.push=function(e,t){var n=this;if(this.onfile||Uz(5),this.p||Uz(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),e=e.subarray(r),e.length)return this.push(e,t)}else{var a=0,o=0,s=void 0,c=void 0;this.p.length?e.length?(c=new Mz(this.p.length+e.length),c.set(this.p),c.set(e,this.p.length)):c=this.p:c=e;for(var l=c.length,u=this.c,d=u&&this.d,f=function(){var e,t=Kz(c,o);if(t==67324752){a=1,s=o,p.d=null,p.c=0;var r=Gz(c,o+6),i=Gz(c,o+8),d=r&2048,f=r&8,m=Gz(c,o+26),h=Gz(c,o+28);if(l>o+30+m+h){var g=[];p.k.unshift(g),a=2;var _=Kz(c,o+18),v=Kz(c,o+22),y=C7e(c.subarray(o+30,o+=30+m),!d);_==4294967295?(e=f?[-2]:w7e(c,o),_=e[0],v=e[1]):f&&(_=-1),o+=h,p.c=_;var b,x={name:y,compression:i,start:function(){if(x.ondata||Uz(5),!_)x.ondata(null,Wz,!0);else{var e=n.o[i];e||x.ondata(Uz(14,`unknown compression type `+i,1),null,!1),b=_<0?new e(y):new e(y,_,v),b.ondata=function(e,t,n){x.ondata(e,t,n)};for(var t=0,r=g;t<r.length;t++){var a=r[t];b.push(a,!1)}n.k[0]==g&&n.c?n.d=b:b.push(Wz,!0)}},terminate:function(){b&&b.terminate&&b.terminate()}};_>=0&&(x.size=_,x.originalSize=v),p.onfile(x)}return`break`}if(u){if(t==134695760)return s=o+=12+(u==-2&&8),a=3,p.c=0,`break`;if(t==33639248)return s=o-=4,a=3,p.c=0,`break`}},p=this;o<l-4&&f()!==`break`;++o);if(this.p=Wz,u<0){var m=a?c.subarray(0,s-12-(u==-2&&8)-(Kz(c,s-16)==134695760&&4)):c.subarray(0,o);d?d.push(m,!!a):this.k[+(a==2)].push(m)}if(a&2)return this.push(c.subarray(o),t);this.p=c.subarray(o)}t&&(this.c&&Uz(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();const Jz=e=>e.replaceAll(`\\`,`/`).normalize(`NFC`).toLowerCase();function Yz(e,t){let n=new Map(Object.keys(e.pages).map(e=>[Jz(e),e]));for(let r of Object.keys(t.pages)){let i=n.get(Jz(r));if(i)throw Error(`Generated ${e.label} route "${i}" collides with generated ${t.label} route "${r}"`)}}const O7e=5242880,Xz=new Hn;for(let[e,t]of[[`0.0.0.0`,8],[`10.0.0.0`,8],[`100.64.0.0`,10],[`127.0.0.0`,8],[`169.254.0.0`,16],[`172.16.0.0`,12],[`192.0.0.0`,24],[`192.0.2.0`,24],[`192.88.99.0`,24],[`192.168.0.0`,16],[`198.18.0.0`,15],[`198.51.100.0`,24],[`203.0.113.0`,24],[`224.0.0.0`,4],[`240.0.0.0`,4]])Xz.addSubnet(e,t,`ipv4`);for(let[e,t]of[[`::`,128],[`::1`,128],[`::`,96],[`64:ff9b:1::`,48],[`100::`,64],[`2001::`,32],[`2001:2::`,48],[`2001:10::`,28],[`2001:20::`,28],[`2001:db8::`,32],[`2002::`,16],[`3fff::`,20],[`5f00::`,16],[`fc00::`,7],[`fe80::`,10],[`fec0::`,10],[`ff00::`,8]])Xz.addSubnet(e,t,`ipv6`);const Zz=e=>{let t=Un(e),n=e.toLowerCase();if(t===6&&n.startsWith(`::ffff:`)){let e=n.slice(7);if(Un(e)===4)return Zz(e);let[t,r]=e.split(`:`).map(e=>Number.parseInt(e,16));return t!=null&&r!=null&&Number.isFinite(t)&&Number.isFinite(r)?Zz(`${t>>8}.${t&255}.${r>>8}.${r&255}`):!1}return t!==0&&!Xz.check(e,t===4?`ipv4`:`ipv6`)};async function k7e(e){return Un(e)?[{address:e,family:Un(e)}]:await Rn(e,{all:!0})}function A7e(e){return((t,n,r)=>{typeof n==`object`&&n?.all?r(null,[e]):r(null,e.address,e.family)})}async function j7e(e,t,n){if(e.protocol!==`https:`)throw Error(`${n} redirects must use HTTPS: ${e.href}`);let r=e.hostname.toLowerCase().replace(/^\[|\]$/g,``);if(r===`localhost`||r.endsWith(`.localhost`))throw Error(`${n} host must be public: ${r}`);let i;try{i=await t(r)}catch(e){let t=e instanceof Error?`: ${e.message}`:``;throw Error(`Unable to resolve ${n} host ${r}${t}`)}if(i.length===0||i.some(({address:e})=>!Zz(e)))throw Error(`${n} host must resolve only to public addresses: ${r}`);return i[0]}function M7e(e,t,n,r,i,a){return new Promise((o,s)=>{let c,l,u=!1,d=(e,t)=>{u||(u=!0,clearTimeout(m),e(t))},f=e.hostname.replace(/^\[|\]$/g,``),p={agent:!1,lookup:A7e(t),servername:Un(f)?void 0:f,headers:{Host:e.host}},m=setTimeout(()=>{let e=/* @__PURE__ */ Error(`timeout`);c?.destroy(e),l.destroy(e),d(s,e)},r);try{l=n(e,p,t=>{c=t;let n=[],r=0,l=Number(t.headers[`content-length`]);Number.isFinite(l)&&l>i?(t.destroy(),d(s,/* @__PURE__ */ Error(`${a} ${e.href} exceeds the ${i} byte limit`))):(t.on(`data`,o=>{let c=Buffer.isBuffer(o)?o:Buffer.from(o);r+=c.byteLength,r>i?(t.destroy(),d(s,/* @__PURE__ */ Error(`${a} ${e.href} exceeds the ${i} byte limit`))):n.push(new Uint8Array(c))}),t.on(`end`,()=>{d(o,{statusCode:t.statusCode??0,statusMessage:t.statusMessage??``,headers:t.headers,body:Buffer.concat(n)})}),t.on(`error`,e=>d(s,e)))})}catch(e){d(s,e);return}l.on(`error`,e=>d(s,e)),l.end()})}async function N7e(e,t={}){return(await P7e(e,t)).toString(`utf8`)}async function P7e(e,t={}){let n=t.timeoutMs??1e4,r=t.maxBytes??5242880,i=t.resolveHostname??k7e,a=t.requestImpl??Bn,o=t.label??`GraphQL schema`,s=Date.now()+n,c=new URL(e),l=async(e,t)=>{let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(/* @__PURE__ */ Error(`timeout`)),t)})])}finally{n&&clearTimeout(n)}};for(let t=0;t<=5;t++){let n=s-Date.now();if(n<=0)throw Error(`Timed out loading ${o} ${e}`);let u;try{let e=await l(j7e(c,i,o),n);if(n=s-Date.now(),n<=0)throw Error(`timeout`);u=await M7e(c,e,a,n,r,o)}catch(t){throw Date.now()>=s||t instanceof Error&&t.message===`timeout`?Error(`Timed out loading ${o} ${e}`):t}if(u.statusCode>=300&&u.statusCode<400){let n=u.headers.location;if(typeof n!=`string`)throw Error(`${o} redirect from ${c.href} has no location`);if(t===5)throw Error(`Too many redirects loading ${o} ${e}`);c=new URL(n,c)}else{if(u.statusCode<200||u.statusCode>=300)throw Error(`Unable to load ${o} ${c.href}: ${u.statusCode} ${u.statusMessage}`);return u.body}}throw Error(`Too many redirects loading ${o} ${e}`)}const Qz=`sdk-reference`,F7e=209715200;function I7e(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.format==`string`&&typeof t.source==`string`}function $z(e,t=[],n=!1){if(typeof e==`string`)return t.push(e.replace(/^\//,``).replace(/\.mdx?$/,``)),t;if(Array.isArray(e)){for(let n of e)$z(n,t);return t}if(typeof e!=`object`||!e)return t;let r=e;if(!n&&`sdk`in r&&I7e(r.sdk))return t;`root`in r&&$z(r.root,t),`pages`in r&&$z(r.pages,t),`groups`in r&&$z(r.groups,t);for(let e of[`tabs`,`anchors`,`dropdowns`,`versions`,`languages`,`products`,`menu`])e in r&&$z(r[e],t);return t}function L7e(e,t,n){return t?$z(e,[],!0).some(e=>{let r=t[e]??t[`/${e}`];return OP({sdk:r?.sdk},n)!==void 0}):!1}function R7e(e,t,n,r,i){Q7e(e.slug,t);let a=Rt.posix.join(n,e.slug),o=e.target?{format:t.format,source:t.source,kind:e.target.kind,name:e.target.name,...e.target.parent?{parent:e.target.parent}:{},...e.target.namespace?{namespace:e.target.namespace}:{}}:void 0;return{slug:a,title:e.title,...e.description?{description:e.description}:{},...e.tag?{tag:e.tag}:{},content:Z7e(e9e(e,!0),n,r),format:t.format,source:t.source,...o?{sdk:o}:{},...i?{autogeneratedBySdk:!0}:{}}}function z7e(e,t){return{group:e.group,pages:e.pages.map(e=>typeof e==`string`?Rt.posix.join(t,e):z7e(e,t))}}function B7e(e,t=/* @__PURE__ */ new Set){for(let n of e)for(let e of n.pages)typeof e==`string`?t.add(e):B7e([e],t);return t}function V7e(e,t){let n=new Map(e.pages.map(e=>[e.slug,e])),r=e.groups.map(e=>z7e(e,t)),i=B7e(e.groups);e.overview&&i.add(e.overview);let a=e.pages.filter(e=>!e.target?.parent).map(e=>e.slug).filter(e=>!i.has(e));return a.length>0&&n.size>0&&r.push({group:`Reference`,pages:a.map(e=>Rt.posix.join(t,e))}),r}async function H7e(e,t,n={}){let r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a={},{pageMetadataBySlug:o}=n;function s(e){let n=`${e.format}:${e.source}`,i=r.get(n);return i||(i=t(e),r.set(n,i)),i}function c(e){let t=Jz(e.slug),n=i.get(t);if(n&&(n.slug!==e.slug||n.format!==e.format||n.source!==e.source))throw Error(`Multiple SDK references generate colliding routes "${n.slug}" and "${e.slug}"`);i.set(t,e)}async function l(e){let t=e.directory??Qz,n=await s(e),r=n.pages.filter(e=>!e.target?.parent),i=new Set(r.map(e=>e.slug));for(let n of r)c(R7e(n,e,t,i,!0));return{groups:V7e({...n,pages:r},t),overview:n.overview&&i.has(n.overview)?[Rt.posix.join(t,n.overview)]:[]}}async function u(e,t){return Array.isArray(e)?Promise.all(e.map(e=>{if(typeof e==`string`){let n=e.replace(/^\//,``).replace(/\.mdx?$/,``);return t&&(a[n]=t),e}return d(e,t)})):d(e,t)}async function d(e,t){if(Array.isArray(e))return Promise.all(e.map(e=>d(e,t)));if(typeof e==`string`||typeof e!=`object`||!e)return e;let n=e,r=`sdk`in n&&I7e(n.sdk)?n.sdk:void 0,i=r??t,s=`tab`in n&&typeof n.tab==`string`,c=`group`in n&&typeof n.group==`string`;if(c&&typeof n.root==`string`&&i){let e=n.root.replace(/^\//,``).replace(/\.mdx?$/,``);a[e]=i}if(r&&(s||c)){if(!L7e(n,o,r)){let{groups:e,overview:t}=await l(r);if(s){let{sdk:i,...a}=n,o=Array.isArray(a.groups)?await d(a.groups,r):[],s=[...Array.isArray(a.pages)?await u(a.pages,r):[],...t],c=await Promise.all(Object.entries(a).filter(([e])=>e!==`groups`&&e!==`pages`).map(async([e,t])=>[e,await d(t,r)])),l=o.findIndex(e=>We(e)&&e.group===`Overview`&&Array.isArray(e.pages)),f=o.map((e,t)=>t===l&&We(e)&&Array.isArray(e.pages)?{...e,pages:[...e.pages,...s]}:e);return{...Object.fromEntries(c),groups:[...f,...l===-1&&s.length>0?[{group:`Overview`,pages:s}]:[],...e]}}let{sdk:i,...a}=n,o=Array.isArray(a.pages)?await u(a.pages,r):[];return{...a,pages:[...o,...t,...e]}}if(s){let{sdk:e,...t}=n;return d(t,r)}let{sdk:e,...t}=n;return d(t,r)}return Object.fromEntries(await Promise.all(Object.entries(n).map(async([e,t])=>[e,e===`pages`?await u(t,i):await d(t,i)])))}let f=await d(e.navigation),p=[...i.values()].sort((e,t)=>e.slug.localeCompare(t.slug)),m=Object.fromEntries(p.map(e=>[e.slug,{href:`/${e.slug}`,title:e.title,...e.description?{description:e.description}:{},...e.tag?{tag:e.tag}:{},...e.sdk?{sdk:e.sdk}:{}}]));return{newDocsConfig:{...e,navigation:f},pagesAcc:m,generatedPages:p,generatedRoutes:p.map(({slug:e})=>e),inheritedSdkBySlug:a}}async function U7e(e){let t=OP(e.metadata,e.inherited);if(!t)return;let n=await e.loadReference({format:t.format,source:t.source}),r;try{r=n7e(n,t)}catch(t){console.error(`unable to resolve sdk target for "${e.slug}":`,t);return}let i=e.slug.replace(/^\//,``).replace(/\.mdx?$/,``),a=Rt.posix.dirname(i),o=e.inherited===void 0?a===`.`?Qz:a:e.inherited.directory??Qz,s=new Set(n.pages.map(e=>e.slug)),c=eB(e.authorContent).trim(),l=Z7e(e9e(r,c.length===0),o,s),u=[c,l].filter(Boolean).join(`
|
|
1035
1035
|
|
|
1036
1036
|
`);return{slug:i,title:typeof e.metadata.title==`string`&&e.metadata.title.length>0?e.metadata.title:r.title,description:typeof e.metadata.description==`string`&&e.metadata.description.length>0?e.metadata.description:r.description,tag:typeof e.metadata.tag==`string`&&e.metadata.tag.length>0?e.metadata.tag:r.tag,content:u,generatedBody:l,format:t.format,source:t.source,sdk:t}}function eB(e){if(!e.startsWith(`---`))return e;let t=e.indexOf(`
|
|
1037
|
-
---`,3);return t===-1?e:e.slice(t+4).replace(/^\n+/,``)}async function W7e(e,t,n){for(let r of[`.mdx`,`.md`]){let i=Rt.resolve(e,`${t}${r}`),a=Rt.relative(e,i);if(a.startsWith(`..${Rt.sep}`)||a===`..`||Rt.isAbsolute(a)||!await lF.default.pathExists(i))continue;let o=await lF.default.realpath(i),s=Rt.relative(e,o);if(!(s.startsWith(`..${Rt.sep}`)||s===`..`||Rt.isAbsolute(s)))return{content:n?.get(`/${ok(a)}`)?.frontmatter??await lF.default.readFile(o,`utf8`),extension:r}}}const G7e=e=>{try{return new URL(e).protocol===`https:`}catch{return!1}};function K7e(e,t){let n=e.split(`/`);if(e.includes(`\\`)||Rt.posix.isAbsolute(e)||Rt.win32.isAbsolute(e)||n.some(e=>e===`.`||e===`..`))throw Error(`SDK artifact ${t} contains an unsafe archive entry "${e}"`)}function q7e(e,t){let n=/* @__PURE__ */ new Map,r=0,i,a=()=>/* @__PURE__ */ Error(`SDK artifact ${t} exceeds the ${F7e} byte extracted size limit`),o=new D7e(e=>{try{K7e(e.name,t)}catch(e){i??=e instanceof Error?e:Error(String(e));return}if(e.name.endsWith(`/`))return;let o=[];e.ondata=(t,s,c)=>{if(!i){if(t)i=t;else if(r+=s.byteLength,r>F7e)i=a(),e.terminate();else if(o.push(s),c){let t=new Uint8Array(o.reduce((e,t)=>e+t.byteLength,0)),r=0;for(let e of o)t.set(e,r),r+=e.byteLength;n.set(e.name,t)}}},e.start()});if(o.register(E7e),o.push(e,!0),i)throw i;return n}async function J7e(e,t,n){let r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(r[0]!==80||r[1]!==75){let r=Rt.posix.basename(new URL(t).pathname)||`artifact`,i=Rt.join(n,r.replace(/[^\w.-]+/g,`-`));return await lF.default.writeFile(i,e),i}let i=q7e(r,t);for(let[e,t]of i)await lF.default.outputFile(Rt.join(n,e),Buffer.from(t));let a=n;for(;;){let e=await lF.default.readdir(a,{withFileTypes:!0});if(e.length!==1||!e[0])return a;let t=Rt.join(a,e[0].name);if(e[0].isFile())return t;a=t}}async function Y7e(e,t){let n=await P7e(e.source,{label:`SDK artifact`,maxBytes:52428800,timeoutMs:3e4,...t}),r=await lF.default.mkdtemp(Rt.join(Sn.tmpdir(),`mintlify-sdk-`));try{let t=await J7e(n,e.source,r);return await
|
|
1037
|
+
---`,3);return t===-1?e:e.slice(t+4).replace(/^\n+/,``)}async function W7e(e,t,n){for(let r of[`.mdx`,`.md`]){let i=Rt.resolve(e,`${t}${r}`),a=Rt.relative(e,i);if(a.startsWith(`..${Rt.sep}`)||a===`..`||Rt.isAbsolute(a)||!await lF.default.pathExists(i))continue;let o=await lF.default.realpath(i),s=Rt.relative(e,o);if(!(s.startsWith(`..${Rt.sep}`)||s===`..`||Rt.isAbsolute(s)))return{content:n?.get(`/${ok(a)}`)?.frontmatter??await lF.default.readFile(o,`utf8`),extension:r}}}const G7e=e=>{try{return new URL(e).protocol===`https:`}catch{return!1}};function K7e(e,t){let n=e.split(`/`);if(e.includes(`\\`)||Rt.posix.isAbsolute(e)||Rt.win32.isAbsolute(e)||n.some(e=>e===`.`||e===`..`))throw Error(`SDK artifact ${t} contains an unsafe archive entry "${e}"`)}function q7e(e,t){let n=/* @__PURE__ */ new Map,r=0,i,a=()=>/* @__PURE__ */ Error(`SDK artifact ${t} exceeds the ${F7e} byte extracted size limit`),o=new D7e(e=>{try{K7e(e.name,t)}catch(e){i??=e instanceof Error?e:Error(String(e));return}if(e.name.endsWith(`/`))return;let o=[];e.ondata=(t,s,c)=>{if(!i){if(t)i=t;else if(r+=s.byteLength,r>F7e)i=a(),e.terminate();else if(o.push(s),c){let t=new Uint8Array(o.reduce((e,t)=>e+t.byteLength,0)),r=0;for(let e of o)t.set(e,r),r+=e.byteLength;n.set(e.name,t)}}},e.start()});if(o.register(E7e),o.push(e,!0),i)throw i;return n}async function J7e(e,t,n){let r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(r[0]!==80||r[1]!==75){let r=Rt.posix.basename(new URL(t).pathname)||`artifact`,i=Rt.join(n,r.replace(/[^\w.-]+/g,`-`));return await lF.default.writeFile(i,e),i}let i=q7e(r,t);for(let[e,t]of i)await lF.default.outputFile(Rt.join(n,e),Buffer.from(t));let a=n;for(;;){let e=await lF.default.readdir(a,{withFileTypes:!0});if(e.length!==1||!e[0])return a;let t=Rt.join(a,e[0].name);if(e[0].isFile())return t;a=t}}async function Y7e(e,t){let n=await P7e(e.source,{label:`SDK artifact`,maxBytes:52428800,timeoutMs:3e4,...t}),r=await lF.default.mkdtemp(Rt.join(Sn.tmpdir(),`mintlify-sdk-`));try{let t=await J7e(n,e.source,r);return await J5e(e.format,t)}finally{await lF.default.remove(r)}}async function X7e(e,t,n){let{format:r,source:i}=e;if(G7e(i))return Y7e(e,n);if(Rt.isAbsolute(i)||Rt.win32.isAbsolute(i))throw Error(`Unable to load SDK reference ${i}: path must be relative`);let a=await lF.default.realpath(t),o=Rt.resolve(a,i),s=(e,t)=>{let n=Rt.relative(a,e);if(n===`..`||n.startsWith(`..${Rt.sep}`)||Rt.isAbsolute(n))throw Error(`Unable to load SDK reference ${i}: ${t}`)};s(o,`path escapes the content directory`);let c=await lF.default.realpath(o);return s(c,`path resolves outside the content directory`),J5e(r,c)}function Z7e(e,t,n){let r=e=>{let r=e.indexOf(`?`),i=r<0?e:e.slice(0,r),a=r<0?``:e.slice(r);return n.has(i)?`${Rt.posix.join(t,i)}${a}`:e};return e.replace(/\]\(\/([^)#\s]+)((?:#[^)\s]*)?)(?=[\s)])/g,(e,t,n)=>`](/${r(t)}${n}`).replace(/typeHref=\{"\/([^"#]+)((?:#[^"]*)?)"\}/g,(e,t,n)=>`typeHref={"/${r(t)}${n}"}`)}function Q7e(e,t){let n=e.split(`/`);if(!e||e.includes(`\\`)||Rt.posix.isAbsolute(e)||n.some(e=>e===``||e===`.`||e===`..`))throw Error(`SDK reference ${t.format}:${t.source} produced an unsafe page slug "${e}"`)}function $7e(e){return e.replace(/!?\[([^\][\n]*)\]\([^()\n]*\)/g,`$1`).replace(/[`*_\\]/g,``).replace(/\s+/g,` `).trim()}function e9e(e,t){let n=t9e(e.content,e.description);return t&&e.intro?[e.intro,n].filter(Boolean).join(`
|
|
1038
1038
|
|
|
1039
1039
|
`):n}function t9e(e,t){if(!t)return e;let[n=``,...r]=e.split(`
|
|
1040
1040
|
|
|
@@ -1043,7 +1043,7 @@ dI(!1,`Unexpected type: `+OI(e))}function m(e){let t=e.toConfig(),n=i[t.name]??[
|
|
|
1043
1043
|
`).trim():e}function n9e(e){return`---\n${[`title: ${JSON.stringify(e.title)}`,...e.description?[`description: ${JSON.stringify(e.description)}`]:[],...e.tag?[`tag: ${JSON.stringify(e.tag)}`]:[],...e.sdk?[`sdk: ${JSON.stringify(e.sdk)}`]:[]].join(`
|
|
1044
1044
|
`)}\n---\n\n`}const r9e=`{/* mintlify:sdk-generated */}`;function i9e(e){let t=e.indexOf(r9e);return(t===-1?e:e.slice(0,t)).trim()}function a9e(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return`---\n${ne.dump(t,{lineWidth:-1}).trimEnd()}\n---\n\n`}function tB(e,t,n=`.mdx`){let r=Rt.resolve(e??``,`src`,`_props`),i=Rt.resolve(r,`${t}${n}`),a=Rt.relative(r,i);if(!(a.startsWith(`..${Rt.sep}`)||a===`..`||Rt.isAbsolute(a)))return i}async function o9e({contentDirectoryPath:e,inheritedSdkBySlug:t,pageMetadataBySlug:n,loadReference:r,targetDir:i}){let a=/* @__PURE__ */ new Map,o=e=>{let t=`${e.format}:${e.source}`,n=a.get(t);return n||(n=r(e),a.set(t,n)),n},s=/* @__PURE__ */ new Set([...Object.keys(n),...Object.keys(t)]),c=await lF.default.realpath(e);await Promise.all([...s].map(async e=>{let r=e.replace(/^\//,``).replace(/\.mdx?$/,``),a=n[r]??n[`/${r}`],s=t[r]??t[`/${r}`];if(!a||OP({sdk:a.sdk},s)===void 0)return;let l=await W7e(c,r);if(!l)return;let{content:u,extension:d}=l,f,p,m;try{let e=ik(u).attributes;f=e.title,p=e.description,m=e.tag}catch{}let h=await U7e({slug:r,authorContent:u,metadata:{sdk:a.sdk,title:f,description:p,tag:m},loadReference:o,inherited:s});if(!h)return;let g=tB(i,h.slug,d);if(!g)return;let _={},v=i9e(eB(u)),y=!1;if(await lF.default.pathExists(g))try{let e=await lF.default.readFile(g,`utf8`);_=ik(e).attributes,v=i9e(eB(e)),y=!0}catch{try{_=ik(u).attributes}catch{}}else try{_=ik(u).attributes}catch{}if(!y&&/^import\s/m.test(v))return;h.sdk&&(_.sdk=h.sdk),(typeof _.title!=`string`||_.title.length===0)&&(_.title=h.title),(typeof _.description!=`string`||_.description.length===0)&&h.description&&(_.description=h.description),(typeof _.tag!=`string`||_.tag.length===0)&&h.tag&&(_.tag=h.tag);let b=h.generatedBody??h.content,x=[v,`${r9e}\n\n${b}`].filter(Boolean).join(`
|
|
1045
1045
|
|
|
1046
|
-
`);await lF.default.outputFile(g,`${a9e(_)}${x}\n`,{flag:`w`})}))}async function s9e(e,t){let n=Rt.resolve(t??``,`src`,`_props`),r=Rt.join(n,`sdk-data.json`),i=[];try{let e=JSON.parse(await lF.default.readFile(r,`utf8`));Array.isArray(e.pages)&&(i=e.pages.filter(e=>typeof e==`string`))}catch{}await Promise.all(i.map(async e=>{let n=tB(t,e);if(n)try{await lF.default.remove(n)}catch(t){console.warn(`Failed to remove stale SDK reference page ${e}: ${t instanceof Error?t.message:String(t)}`)}})),await lF.default.remove(r),e.generatedPages.length!==0&&(await lF.default.outputFile(r,JSON.stringify({pages:e.generatedRoutes}),{flag:`w`}),await Promise.all(e.generatedPages.map(e=>{let n=tB(t,e.slug);if(!n)throw Error(`SDK reference page "${e.slug}" resolves outside the output directory`);return lF.default.outputFile(n,`${n9e(e)}${e.content}\n`,{flag:`w`})})))}function nB(e,t=/* @__PURE__ */ new Set){if(typeof e==`string`)return t.add(e.replace(/^\//,``).replace(/\.mdx?$/,``)),t;if(Array.isArray(e))return e.forEach(e=>nB(e,t)),t;if(!We(e))return t;`root`in e&&nB(e.root,t),`pages`in e&&nB(e.pages,t),`groups`in e&&nB(e.groups,t);for(let n of[`tabs`,`anchors`,`dropdowns`,`versions`,`languages`,`products`,`menu`])n in e&&nB(e[n],t);return t}async function c9e(e,t,n){let r=await lF.default.realpath(e),i={},a=nB(t),o=a.values();return await Promise.all(Array.from({length:Math.min(16,a.size)},async()=>{for(let e of o)try{let t=await W7e(r,e,n);if(t===void 0)continue;let{attributes:a}=ik(t.content);a.sdk!==void 0&&(i[e]={sdk:a.sdk})}catch{}})),i}const l9e=async(e,t)=>{let n=e.api?.asyncapi,r=[];async function i(e){try{let t=await bJe(e);r.push({filename:e,spec:t,originalFileLocation:e})}catch(e){throw console.error(e),e}}if(n){if(typeof n==`string`&&Eh(n,t))await i(n);else if(Array.isArray(n))for(let e of n)typeof e==`string`&&Eh(e,t)&&await i(e);else typeof n==`object`&&`source`in n&&Eh(n.source,t)&&await i(n.source)}return r},u9e=`api-reference`,d9e=async(e,t,n,r)=>{let{overwrite:i,writeFiles:a,targetDir:o,localSchema:s,writeFile:c}=r,l=[];async function u(e){let r=u9e,u=[];if(`asyncapi`in e&&(typeof e.asyncapi==`string`?u=[e.asyncapi]:Array.isArray(e.asyncapi)?u=e.asyncapi:typeof e.asyncapi==`object`&&`source`in e.asyncapi&&(u=[e.asyncapi.source],r=e.asyncapi.directory??u9e)),u.length>0){let d=[];for(let n of u){let r;if(Eh(n,s)?(r=await h9e(n),l.push(r)):r=t.find(e=>e.originalFileLocation===Dh(n)),!r)throw n===u[0]&&t.length>0&&!t[0]?.spec.channels().length?Error(`No channels defined`):Error(`AsyncAPI file ${n} defined in ${m9e(e)?.division} in your docs.json does not exist`);d.push(r)}let f=[];for(let e of d){let{pagesAcc:t,nav:l}=await aZe(e.spec,{asyncApiFilePath:e.originalFileLocation,writeFiles:a,outDir:r,outDirBasePath:_t.join(o??``,`src`,`_props`),overwrite:i,localSchema:s,writeFile:c});Object.entries(t).forEach(([e,t])=>{n[e]=t}),f=[...f,...l]}let p=m9e(e);if(p?.division){let e=p.nav;return`group`in e?{...e,pages:`pages`in e&&Array.isArray(e.pages)?[...e.pages,...f]:f}:{...e,groups:`groups`in e?[...e.groups,...f]:f}}}return null}async function d(e){let t=await u(e);if(t)return t;let n={...e};if(`pages`in n){let e=await Promise.all(n.pages.map(async e=>typeof e==`object`&&e&&`group`in e?d(e):e));n.pages=e}for(let e of[`groups`,...Ss]){let t=lk(n,e);t&&(n=Object.assign({},n,{[e]:await Promise.all(t.map(e=>d(e)))}))}return n}let f=await d(e);if(!p9e(f))throw Error(`AsyncAPI page generation produced a non-top-level navigation node`);return e=f,{newNav:f,newAsyncApiFiles:l}},f9e=[`group`,`tab`,`anchor`,`version`,`language`,`dropdown`,`product`,`item`];function p9e(e){return f9e.every(t=>!(t in e))}function m9e(e){if(`asyncapi`in e){let{asyncapi:t,...n}=e,r={group:`group`,anchor:`anchor`,tab:`tab`,version:`version`,language:`language`,dropdown:`dropdown`,product:`product`,item:`item`},i=Object.keys(r).find(e=>e in n);return{division:r[i],name:n[i],nav:n}}}async function h9e(e){try{return{filename:e,spec:await bJe(e),originalFileLocation:e}}catch(e){throw console.error(e),e}}const g9e=async(e,t,n,r,i,a=!0,o=!1)=>{let s=await l9e(e,r),c={},l=[],u=a&&(o||i!=null&&Object.keys(i).length>0),{newNav:d,newAsyncApiFiles:f}=await d9e(e.navigation,t,c,{overwrite:!0,writeFiles:a,targetDir:n,localSchema:r,...u?{writeFile:(e,t)=>{l.push({filename:e,content:t})}}:{}}),p=async()=>{await Promise.all(l.map(({filename:e,content:t})=>lF.default.outputFile(e,t)))};return i&&Yz({label:`GraphQL`,pages:i},{label:`AsyncAPI`,pages:c}),o||await p(),{newDocsConfig:{...e,navigation:d},pagesAcc:c,asyncApiFiles:[...t,...s,...f],flushWrites:p}};var _9e=/* @__PURE__ */ a(((e,t)=>{function n(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}t.exports=n})),v9e=/* @__PURE__ */ a(((e,t)=>{function n(e){return function(t){return e?.[t]}}t.exports=n})),y9e=/* @__PURE__ */ a(((e,t)=>{t.exports=v9e()({À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`})})),b9e=/* @__PURE__ */ a(((e,t)=>{var n=y9e(),r=Rd(),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp(`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,`g`);function o(e){return e=r(e),e&&e.replace(i,n).replace(a,``)}t.exports=o})),x9e=/* @__PURE__ */ a(((e,t)=>{var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r(e){return e.match(n)||[]}t.exports=r})),S9e=/* @__PURE__ */ a(((e,t)=>{var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function r(e){return n.test(e)}t.exports=r})),C9e=/* @__PURE__ */ a(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\u2700-\\u27bf`,a=`a-z\\xdf-\\xf6\\xf8-\\xff`,o=`\\xac\\xb1\\xd7\\xf7`,s=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,c=`\\u2000-\\u206f`,l=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,u=`A-Z\\xc0-\\xd6\\xd8-\\xde`,d=`\\ufe0e\\ufe0f`,f=o+s+c+l,p=`['’]`,m=`[`+f+`]`,h=`[`+r+`]`,g=`\\d+`,_=`[`+i+`]`,v=`[`+a+`]`,y=`[^`+n+f+g+i+a+u+`]`,b=`(?:`+h+`|\\ud83c[\\udffb-\\udfff])`,x=`[^`+n+`]`,S=`(?:\\ud83c[\\udde6-\\uddff]){2}`,C=`[\\ud800-\\udbff][\\udc00-\\udfff]`,w=`[`+u+`]`,T=`\\u200d`,E=`(?:`+v+`|`+y+`)`,D=`(?:`+w+`|`+y+`)`,O=`(?:`+p+`(?:d|ll|m|re|s|t|ve))?`,k=`(?:`+p+`(?:D|LL|M|RE|S|T|VE))?`,A=b+`?`,ee=`[`+d+`]?`,te=`(?:`+T+`(?:`+[x,S,C].join(`|`)+`)`+ee+A+`)*`,ne=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,re=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,ie=ee+A+te,ae=`(?:`+[_,S,C].join(`|`)+`)`+ie,oe=RegExp([w+`?`+v+`+`+O+`(?=`+[m,w,`$`].join(`|`)+`)`,D+`+`+k+`(?=`+[m,w+E,`$`].join(`|`)+`)`,w+`?`+E+`+`+O,w+`+`+k,re,ne,g,ae].join(`|`),`g`);function j(e){return e.match(oe)||[]}t.exports=j})),w9e=/* @__PURE__ */ a(((e,t)=>{var n=x9e(),r=S9e(),i=Rd(),a=C9e();function o(e,t,o){return e=i(e),t=o?void 0:t,t===void 0?r(e)?a(e):n(e):e.match(t)||[]}t.exports=o})),T9e=/* @__PURE__ */ a(((e,t)=>{var n=_9e(),r=b9e(),i=w9e(),a=RegExp(`['’]`,`g`);function o(e){return function(t){return n(i(r(t).replace(a,``)),e,``)}}t.exports=o})),E9e=/* @__PURE__ */ r((/* @__PURE__ */ a(((e,t)=>{t.exports=T9e()(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()})})))(),1);const D9e=`graphql-reference`,rB=(e,t)=>e.name.localeCompare(t.name),O9e=Jz;function k9e(e){return typeof e==`string`?{source:e,directory:D9e}:{source:e.source,directory:e.directory??D9e}}function A9e(e){let t=/* @__PURE__ */ new Map;for(let n of e){let e=n.toLowerCase(),r=t.get(e);(r===void 0||n<r)&&t.set(e,n)}let n=e.filter(e=>t.get(e.toLowerCase())!==e),r=/* @__PURE__ */ new Map;for(let e of n){let t=(0,E9e.default)(e);r.set(t,(r.get(t)??0)+1)}return new Map(e.map(e=>{let n=t.get(e.toLowerCase());if(n===e)return[e,e];let i=(0,E9e.default)(e),a=i.includes(`-`)&&r.get(i)===1?i:`${i?`${i}-`:``}${Pn(`sha256`).update(e).digest(`hex`).slice(0,6)}`;return JP({type:`graphql`,message:`GraphQL name "${e}" shares its URL with "${n}", so its page uses "${a}"`}),[e,a]}))}const j9e=/* @__PURE__ */ new WeakMap,M9e=/* @__PURE__ */ new WeakMap;function N9e(e,t){let n=j9e.get(e);return n||(n=A9e(e.types.filter(t=>aB(e,t)).map(e=>e.name)),j9e.set(e,n)),n.get(t)}function P9e(e,t){let n=M9e.get(e);return n||(n=A9e(e.map(e=>e.name)),M9e.set(e,n)),n.get(t)}function F9e(e,t,n){let r=t;return Rt.posix.join(...n.split(`.`).map(t=>{let n=e.types.find(e=>e.name===r),i=n?.kind===`object`||n?.kind===`interface`?n.fields:[],a=i.find(e=>e.name===t);return r=a?SP(a.type):void 0,P9e(i,t)??t}))}function iB(e,t,n,r,i,a){let o=r===`query`?`queries`:r===`mutation`?`mutations`:`types`,s=Rt.posix.join(n,o),c=r===`type`?N9e(e,i)??i:F9e(e,r===`query`?e.queryType:e.mutationType,i);return{slug:Rt.posix.join(s,c),directory:Rt.posix.dirname(s),title:i.slice(i.lastIndexOf(`.`)+1),...`description`in a&&a.description?{description:a.description}:{},...r!==`type`&&`deprecationReason`in a&&a.deprecationReason!=null?{deprecated:!0}:{},tag:r===`type`&&`kind`in a?a.kind.toUpperCase():r.toUpperCase(),target:{source:t,kind:r,name:i}}}const I9e=[`object`,`input`,`interface`,`union`,`enum`,`scalar`];function L9e(e,t){return e.types.some(e=>`fields`in e&&e.fields.some(e=>SP(e.type)===t||`arguments`in e&&e.arguments.some(e=>SP(e.type)===t))||`possibleTypes`in e&&e.possibleTypes.includes(t))}function aB(e,t){return t.name===e.queryType||t.name===e.mutationType||t.name===e.subscriptionType&&!L9e(e,t.name)?!1:I9e.includes(t.kind)}function R9e(e,t,n,r){let i=`GraphQL ${r.kind} ${r.name}`;if(r.kind===`type`){let a=e.types.find(({name:e})=>e===r.name);if(!a||!aB(e,a))throw Error(`${i} not found in ${t}`);return iB(e,t,n,`type`,r.name,a)}let a=wJe(e,r);if(!a)throw Error(`${i} not found in ${t}`);return iB(e,t,n,r.kind,r.name,a.field)}function z9e(e,t,n){let r=new Map(e.types.map(e=>[e.name,e])),i=e.queryType?r.get(e.queryType):void 0,a=e.mutationType?r.get(e.mutationType):void 0,o=e.queryType&&i?.kind===`object`?i.fields:[],s=e.mutationType&&a?.kind===`object`?a.fields:[];return{queries:o.slice().sort(rB).map(r=>iB(e,t,n,`query`,r.name,r)),mutations:s.slice().sort(rB).map(r=>iB(e,t,n,`mutation`,r.name,r)),types:e.types.filter(t=>aB(e,t)).slice().sort(rB).map(r=>iB(e,t,n,`type`,r.name,r))}}function B9e(e){return`---\n${[`title: ${JSON.stringify(e.title)}`,...e.description?[`description: ${JSON.stringify(e.description)}`]:[],...e.deprecated?[`deprecated: true`]:[],`tag: ${JSON.stringify(e.tag)}`,`graphql: ${JSON.stringify(e.target)}`].join(`
|
|
1046
|
+
`);await lF.default.outputFile(g,`${a9e(_)}${x}\n`,{flag:`w`})}))}async function s9e(e,t){let n=Rt.resolve(t??``,`src`,`_props`),r=Rt.join(n,`sdk-data.json`),i=[];try{let e=JSON.parse(await lF.default.readFile(r,`utf8`));Array.isArray(e.pages)&&(i=e.pages.filter(e=>typeof e==`string`))}catch{}await Promise.all(i.map(async e=>{let n=tB(t,e);if(n)try{await lF.default.remove(n)}catch(t){console.warn(`Failed to remove stale SDK reference page ${e}: ${t instanceof Error?t.message:String(t)}`)}})),await lF.default.remove(r),e.generatedPages.length!==0&&(await lF.default.outputFile(r,JSON.stringify({pages:e.generatedRoutes}),{flag:`w`}),await Promise.all(e.generatedPages.map(e=>{let n=tB(t,e.slug);if(!n)throw Error(`SDK reference page "${e.slug}" resolves outside the output directory`);return lF.default.outputFile(n,`${n9e(e)}${e.content}\n`,{flag:`w`})})))}function nB(e,t=/* @__PURE__ */ new Set){if(typeof e==`string`)return t.add(e.replace(/^\//,``).replace(/\.mdx?$/,``)),t;if(Array.isArray(e))return e.forEach(e=>nB(e,t)),t;if(!We(e))return t;`root`in e&&nB(e.root,t),`pages`in e&&nB(e.pages,t),`groups`in e&&nB(e.groups,t);for(let n of[`tabs`,`anchors`,`dropdowns`,`versions`,`languages`,`products`,`menu`])n in e&&nB(e[n],t);return t}async function c9e(e,t,n){let r=await lF.default.realpath(e),i={},a=nB(t),o=a.values();return await Promise.all(Array.from({length:Math.min(16,a.size)},async()=>{for(let e of o)try{let t=await W7e(r,e,n);if(t===void 0)continue;let{attributes:a}=ik(t.content);a.sdk!==void 0&&(i[e]={sdk:a.sdk})}catch{}})),i}const l9e=async(e,t)=>{let n=e.api?.asyncapi,r=[];async function i(e){try{let t=await bJe(e);r.push({filename:e,spec:t,originalFileLocation:e})}catch(e){throw console.error(e),e}}if(n){if(typeof n==`string`&&Eh(n,t))await i(n);else if(Array.isArray(n))for(let e of n)typeof e==`string`&&Eh(e,t)&&await i(e);else typeof n==`object`&&`source`in n&&Eh(n.source,t)&&await i(n.source)}return r},u9e=`api-reference`,d9e=async(e,t,n,r)=>{let{overwrite:i,writeFiles:a,targetDir:o,localSchema:s,writeFile:c}=r,l=[];async function u(e){let r=u9e,u=[];if(`asyncapi`in e&&(typeof e.asyncapi==`string`?u=[e.asyncapi]:Array.isArray(e.asyncapi)?u=e.asyncapi:typeof e.asyncapi==`object`&&`source`in e.asyncapi&&(u=[e.asyncapi.source],r=e.asyncapi.directory??u9e)),u.length>0){let d=[];for(let n of u){let r;if(Eh(n,s)?(r=await h9e(n),l.push(r)):r=t.find(e=>e.originalFileLocation===Dh(n)),!r)throw n===u[0]&&t.length>0&&!t[0]?.spec.channels().length?Error(`No channels defined`):Error(`AsyncAPI file ${n} defined in ${m9e(e)?.division} in your docs.json does not exist`);d.push(r)}let f=[];for(let e of d){let{pagesAcc:t,nav:l}=await aZe(e.spec,{asyncApiFilePath:e.originalFileLocation,writeFiles:a,outDir:r,outDirBasePath:_t.join(o??``,`src`,`_props`),overwrite:i,localSchema:s,writeFile:c});Object.entries(t).forEach(([e,t])=>{n[e]=t}),f=[...f,...l]}let p=m9e(e);if(p?.division){let e=p.nav;return`group`in e?{...e,pages:`pages`in e&&Array.isArray(e.pages)?[...e.pages,...f]:f}:{...e,groups:`groups`in e?[...e.groups,...f]:f}}}return null}async function d(e){let t=await u(e);if(t)return t;let n={...e};if(`pages`in n){let e=await Promise.all(n.pages.map(async e=>typeof e==`object`&&e&&`group`in e?d(e):e));n.pages=e}for(let e of[`groups`,...Ss]){let t=lk(n,e);t&&(n=Object.assign({},n,{[e]:await Promise.all(t.map(e=>d(e)))}))}return n}let f=await d(e);if(!p9e(f))throw Error(`AsyncAPI page generation produced a non-top-level navigation node`);return e=f,{newNav:f,newAsyncApiFiles:l}},f9e=[`group`,`tab`,`anchor`,`version`,`language`,`dropdown`,`product`,`item`];function p9e(e){return f9e.every(t=>!(t in e))}function m9e(e){if(`asyncapi`in e){let{asyncapi:t,...n}=e,r={group:`group`,anchor:`anchor`,tab:`tab`,version:`version`,language:`language`,dropdown:`dropdown`,product:`product`,item:`item`},i=Object.keys(r).find(e=>e in n);return{division:r[i],name:n[i],nav:n}}}async function h9e(e){try{return{filename:e,spec:await bJe(e),originalFileLocation:e}}catch(e){throw console.error(e),e}}const g9e=async(e,t,n,r,i,a=!0,o=!1)=>{let s=await l9e(e,r),c={},l=[],u=a&&(o||i!=null&&Object.keys(i).length>0),{newNav:d,newAsyncApiFiles:f}=await d9e(e.navigation,t,c,{overwrite:!0,writeFiles:a,targetDir:n,localSchema:r,...u?{writeFile:(e,t)=>{l.push({filename:e,content:t})}}:{}}),p=async()=>{await Promise.all(l.map(({filename:e,content:t})=>lF.default.outputFile(e,t)))};return i&&Yz({label:`GraphQL`,pages:i},{label:`AsyncAPI`,pages:c}),o||await p(),{newDocsConfig:{...e,navigation:d},pagesAcc:c,asyncApiFiles:[...t,...s,...f],flushWrites:p}};var _9e=/* @__PURE__ */ a(((e,t)=>{function n(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}t.exports=n})),v9e=/* @__PURE__ */ a(((e,t)=>{function n(e){return function(t){return e?.[t]}}t.exports=n})),y9e=/* @__PURE__ */ a(((e,t)=>{t.exports=v9e()({À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`})})),b9e=/* @__PURE__ */ a(((e,t)=>{var n=y9e(),r=Rd(),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp(`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,`g`);function o(e){return e=r(e),e&&e.replace(i,n).replace(a,``)}t.exports=o})),x9e=/* @__PURE__ */ a(((e,t)=>{var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r(e){return e.match(n)||[]}t.exports=r})),S9e=/* @__PURE__ */ a(((e,t)=>{var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function r(e){return n.test(e)}t.exports=r})),C9e=/* @__PURE__ */ a(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\u2700-\\u27bf`,a=`a-z\\xdf-\\xf6\\xf8-\\xff`,o=`\\xac\\xb1\\xd7\\xf7`,s=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,c=`\\u2000-\\u206f`,l=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,u=`A-Z\\xc0-\\xd6\\xd8-\\xde`,d=`\\ufe0e\\ufe0f`,f=o+s+c+l,p=`['’]`,m=`[`+f+`]`,h=`[`+r+`]`,g=`\\d+`,_=`[`+i+`]`,v=`[`+a+`]`,y=`[^`+n+f+g+i+a+u+`]`,b=`(?:`+h+`|\\ud83c[\\udffb-\\udfff])`,x=`[^`+n+`]`,S=`(?:\\ud83c[\\udde6-\\uddff]){2}`,C=`[\\ud800-\\udbff][\\udc00-\\udfff]`,w=`[`+u+`]`,T=`\\u200d`,E=`(?:`+v+`|`+y+`)`,D=`(?:`+w+`|`+y+`)`,O=`(?:`+p+`(?:d|ll|m|re|s|t|ve))?`,k=`(?:`+p+`(?:D|LL|M|RE|S|T|VE))?`,A=b+`?`,ee=`[`+d+`]?`,te=`(?:`+T+`(?:`+[x,S,C].join(`|`)+`)`+ee+A+`)*`,ne=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,re=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,ie=ee+A+te,ae=`(?:`+[_,S,C].join(`|`)+`)`+ie,oe=RegExp([w+`?`+v+`+`+O+`(?=`+[m,w,`$`].join(`|`)+`)`,D+`+`+k+`(?=`+[m,w+E,`$`].join(`|`)+`)`,w+`?`+E+`+`+O,w+`+`+k,re,ne,g,ae].join(`|`),`g`);function j(e){return e.match(oe)||[]}t.exports=j})),w9e=/* @__PURE__ */ a(((e,t)=>{var n=x9e(),r=S9e(),i=Rd(),a=C9e();function o(e,t,o){return e=i(e),t=o?void 0:t,t===void 0?r(e)?a(e):n(e):e.match(t)||[]}t.exports=o})),T9e=/* @__PURE__ */ a(((e,t)=>{var n=_9e(),r=b9e(),i=w9e(),a=RegExp(`['’]`,`g`);function o(e){return function(t){return n(i(r(t).replace(a,``)),e,``)}}t.exports=o})),E9e=/* @__PURE__ */ r((/* @__PURE__ */ a(((e,t)=>{t.exports=T9e()(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()})})))(),1);const D9e=`graphql-reference`,rB=(e,t)=>e.name.localeCompare(t.name),O9e=Jz;function k9e(e){return typeof e==`string`?{source:e,directory:D9e}:{source:e.source,directory:e.directory??D9e}}function A9e(e){let t=/* @__PURE__ */ new Map;for(let n of e){let e=n.toLowerCase(),r=t.get(e);(r===void 0||n<r)&&t.set(e,n)}let n=e.filter(e=>t.get(e.toLowerCase())!==e),r=/* @__PURE__ */ new Map;for(let e of n){let t=(0,E9e.default)(e);r.set(t,(r.get(t)??0)+1)}return new Map(e.map(e=>{let n=t.get(e.toLowerCase());if(n===e)return[e,e];let i=(0,E9e.default)(e),a=i.includes(`-`)&&r.get(i)===1?i:`${i?`${i}-`:``}${Pn(`sha256`).update(e).digest(`hex`).slice(0,6)}`;return JP({type:`graphql-url-collision`,notice:!0,message:`GraphQL name "${e}" shares its URL with "${n}", so its page uses "${a}"`}),[e,a]}))}const j9e=/* @__PURE__ */ new WeakMap,M9e=/* @__PURE__ */ new WeakMap;function N9e(e,t){let n=j9e.get(e);return n||(n=A9e(e.types.filter(t=>aB(e,t)).map(e=>e.name)),j9e.set(e,n)),n.get(t)}function P9e(e,t){let n=M9e.get(e);return n||(n=A9e(e.map(e=>e.name)),M9e.set(e,n)),n.get(t)}function F9e(e,t,n){let r=t;return Rt.posix.join(...n.split(`.`).map(t=>{let n=e.types.find(e=>e.name===r),i=n?.kind===`object`||n?.kind===`interface`?n.fields:[],a=i.find(e=>e.name===t);return r=a?SP(a.type):void 0,P9e(i,t)??t}))}function iB(e,t,n,r,i,a){let o=r===`query`?`queries`:r===`mutation`?`mutations`:`types`,s=Rt.posix.join(n,o),c=r===`type`?N9e(e,i)??i:F9e(e,r===`query`?e.queryType:e.mutationType,i);return{slug:Rt.posix.join(s,c),directory:Rt.posix.dirname(s),title:i.slice(i.lastIndexOf(`.`)+1),...`description`in a&&a.description?{description:a.description}:{},...r!==`type`&&`deprecationReason`in a&&a.deprecationReason!=null?{deprecated:!0}:{},tag:r===`type`&&`kind`in a?a.kind.toUpperCase():r.toUpperCase(),target:{source:t,kind:r,name:i}}}const I9e=[`object`,`input`,`interface`,`union`,`enum`,`scalar`];function L9e(e,t){return e.types.some(e=>`fields`in e&&e.fields.some(e=>SP(e.type)===t||`arguments`in e&&e.arguments.some(e=>SP(e.type)===t))||`possibleTypes`in e&&e.possibleTypes.includes(t))}function aB(e,t){return t.name===e.queryType||t.name===e.mutationType||t.name===e.subscriptionType&&!L9e(e,t.name)?!1:I9e.includes(t.kind)}function R9e(e,t,n,r){let i=`GraphQL ${r.kind} ${r.name}`;if(r.kind===`type`){let a=e.types.find(({name:e})=>e===r.name);if(!a||!aB(e,a))throw Error(`${i} not found in ${t}`);return iB(e,t,n,`type`,r.name,a)}let a=wJe(e,r);if(!a)throw Error(`${i} not found in ${t}`);return iB(e,t,n,r.kind,r.name,a.field)}function z9e(e,t,n){let r=new Map(e.types.map(e=>[e.name,e])),i=e.queryType?r.get(e.queryType):void 0,a=e.mutationType?r.get(e.mutationType):void 0,o=e.queryType&&i?.kind===`object`?i.fields:[],s=e.mutationType&&a?.kind===`object`?a.fields:[];return{queries:o.slice().sort(rB).map(r=>iB(e,t,n,`query`,r.name,r)),mutations:s.slice().sort(rB).map(r=>iB(e,t,n,`mutation`,r.name,r)),types:e.types.filter(t=>aB(e,t)).slice().sort(rB).map(r=>iB(e,t,n,`type`,r.name,r))}}function B9e(e){return`---\n${[`title: ${JSON.stringify(e.title)}`,...e.description?[`description: ${JSON.stringify(e.description)}`]:[],...e.deprecated?[`deprecated: true`]:[],`tag: ${JSON.stringify(e.tag)}`,`graphql: ${JSON.stringify(e.target)}`].join(`
|
|
1047
1047
|
`)}\n---\n`}async function oB(e,t,{onSourceError:n}={}){let r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Set;async function s(e){let a=r.get(e);if(!a){let o=t(e).then(t=>{let n=T4e(t);return i.set(e,n),n});a=n?o.catch(t=>{n(e,t)}):o,r.set(e,a)}return a}function c(e){let t=O9e(e.slug),n=a.get(t);if(n&&(n.slug!==e.slug||n.target.source!==e.target.source||n.target.kind!==e.target.kind||n.target.name!==e.target.name))throw Error(`Multiple GraphQL references generate colliding routes "${n.slug}" and "${e.slug}"`);a.set(t,e)}async function l(e,t){if(!t)return e;let n=CJe(e);if(!n)return e;let r=await s(t.source);if(!r)return e;let i=R9e(r,t.source,t.directory,n);return c(i),o.add(t.owner),i.slug}async function u(e,t){return Object.fromEntries(await Promise.all(Object.entries(e).map(async([e,n])=>e!==`pages`||!Array.isArray(n)?[e,await d(n,t)]:[e,await Promise.all(n.map(e=>typeof e==`string`?l(e,t):d(e,t)))])))}async function d(e,t){if(Array.isArray(e))return Promise.all(e.map(e=>d(e,t)));if(typeof e!=`object`||!e)return e;let{graphql:n,...r}=e;if(n===void 0)return u(r,t);let{source:i,directory:a}=k9e(n),l=await u(r,{source:i,directory:a,owner:e});if(o.has(e))return l;let f=await s(i);if(!f)return l;let p=z9e(f,i,a),m=[{group:`Queries`,pages:p.queries.map(({slug:e})=>e)},{group:`Mutations`,pages:p.mutations.map(({slug:e})=>e)},{group:`Types`,pages:p.types.map(({slug:e})=>e)}].filter(({pages:e})=>e.length>0);if([...p.queries,...p.mutations,...p.types].forEach(c),`group`in l){let e=Array.isArray(l.pages)?l.pages:[];return{...l,pages:[...e,...m]}}let h=Array.isArray(l.groups)?l.groups:[];return{...l,groups:[...h,...m]}}let f=await d(e.navigation),p=[...a.values()].sort((e,t)=>Jz(e.slug).localeCompare(Jz(t.slug))||e.slug.localeCompare(t.slug)),m=Object.fromEntries(p.map(e=>[e.slug,{href:`/${e.slug}`,title:e.title,...e.description?{description:e.description}:{},...e.deprecated?{deprecated:!0}:{},tag:e.tag,graphql:e.target}]));return{navigation:f,newDocsConfig:{...e,navigation:f},pagesAcc:m,generatedPages:p,generatedRoutes:p.map(({slug:e})=>e),parsedReferences:Object.fromEntries([...i].sort(([e],[t])=>e.localeCompare(t)))}}async function sB(e,t){if(Rt.isAbsolute(e)||Rt.win32.isAbsolute(e))throw Error(`Unable to load GraphQL schema ${e}: path must be relative`);let n;try{n=new URL(e)}catch{}if(n){if(n.protocol===`https:`)return N7e(n.href);throw Error(`Unable to load GraphQL schema ${e}: URL must use HTTPS`)}try{let n=await lF.default.realpath(t),r=Rt.resolve(n,e),i=Rt.relative(n,r);if(i===`..`||i.startsWith(`..${Rt.sep}`)||Rt.isAbsolute(i))throw Error(`path escapes the content directory`);let a=await lF.default.realpath(r),o=Rt.relative(n,a);if(o===`..`||o.startsWith(`..${Rt.sep}`)||Rt.isAbsolute(o))throw Error(`path resolves outside the content directory`);let s=await qn(a,`r`);try{if((await s.stat()).size>5242880)throw Error(`schema exceeds the ${O7e} byte limit`);let e=new TextDecoder,t=``,n=0;for await(let r of s.createReadStream({autoClose:!1})){if(n+=r.length,n>5242880)throw Error(`schema exceeds the ${O7e} byte limit`);t+=e.decode(r,{stream:!0})}return t+e.decode()}finally{await s.close()}}catch(t){let n=t instanceof Error?`: ${t.message}`:``;throw Error(`Unable to load GraphQL schema ${e}${n}`)}}const V9e=e=>{try{return new URL(e).protocol===`https:`}catch{return!1}};function H9e(e,t){let n=Rt.resolve(e??``,`src`,`_props`),r=Rt.resolve(n,`${t}.mdx`),i=Rt.relative(n,r);if(!(i.startsWith(`..${Rt.sep}`)||i===`..`||Rt.isAbsolute(i)))return r}async function U9e(e,t){let n=Rt.resolve(t??``,`src`,`_props`),r=Rt.join(n,`graphql-data.json`);try{let e=JSON.parse(await lF.default.readFile(r,`utf8`));e.pages!=null&&typeof e.pages==`object`&&!Array.isArray(e.pages)&&await Promise.all(Object.keys(e.pages).flatMap(e=>{let n=H9e(t,e);return n?[lF.default.remove(n)]:[]}))}catch{}if(await lF.default.remove(r),Object.keys(e.parsedReferences).length===0&&e.generatedRoutes.length===0)return;let i={references:e.parsedReferences,pages:Object.fromEntries(e.generatedPages.map(t=>{let n=Object.fromEntries(e.generatedPages.filter(e=>e.target.source===t.target.source&&e.target.kind===`type`&&e.directory===t.directory).map(e=>[e.target.name,`/${e.slug}`]));return[t.slug,{target:t.target,routes:n}]}))};await lF.default.outputFile(r,JSON.stringify(i),{flag:`w`}),await Promise.all(e.generatedPages.map(e=>lF.default.outputFile(Rt.join(t??``,`src`,`_props`,`${e.slug}.mdx`),B9e(e),{flag:`w`})))}const cB=async(e,t,n,r,i)=>{let a;a=e===`docs`?t.api?.openapi:t.openapi;let o=[];async function s(e){let t=r?await Cm(r,e):void 0,n=await yh(e,{overlays:t,fetchRemoteDocument:i});o.push({filename:e,spec:n,originalFileLocation:e})}for(let e of Ka(a))Eh(e.source,n)&&await s(e.source);return o},lB=`api-reference`,W9e=/* @__PURE__ */ new WeakMap,G9e=e=>{let t=W9e.get(e);if(t)return t;let n={resolveTags:mh(e),resolveBadge:hh(e)};return W9e.set(e,n),n},K9e=e=>e.replace(/^\/+|\/+$/g,``),q9e=(e,t)=>{if(!e)return``;let n=e.replace(/^\/+/,``);return t.map(K9e).filter(Boolean).sort((e,t)=>t.length-e.length).find(e=>n===e||n.startsWith(`${e}/`))??``},uB=(e,t,n)=>q9e(e,n)||q9e(t,n),J9e=async(e,t,n,r)=>{let{overwrite:i,writeFiles:a,targetDir:o,localSchema:s,invalidSpecFiles:c,mountPaths:l=[],writeFile:u,overlayRegistry:d,fetchRemoteDocument:f}=r,p=[],m=/* @__PURE__ */ new Map;async function h(e){let r=lB,h,g;if(`openapi`in e){if(typeof e.openapi==`string`)h=e.openapi;else if(Array.isArray(e.openapi)&&e.openapi.length>0){let t=e.openapi[0];typeof t==`string`?h=t:t!=null&&(h=t.source,r=t.directory??lB,g=t.slug)}else typeof e.openapi==`object`&&`source`in e.openapi&&(h=e.openapi.source,r=e.openapi.directory??lB,g=e.openapi.slug)}if(h){let _;if(Eh(h,s)){if(m.has(h))_=await m.get(h);else{let e=Z9e(h,d,f);m.set(h,e),_=await e,p.push(_)}}else _=t.find(e=>e.originalFileLocation!=null&&e.originalFileLocation===Dh(h));if(!_){let t=_F(c,h);throw Error(t?`Openapi file ${h} defined in ${dB(e)?.division} in your docs.json exists but is invalid: ${t.reason}`:`Openapi file ${h} defined in ${dB(e)?.division} in your docs.json does not exist`)}let{pagesAcc:v,nav:y}=await tZe(_.spec,{openApiFilePath:_.originalFileLocation,writeFiles:a,outDir:r,outDirBasePath:_t.join(o??``,`src`,`_props`),slug:g,mountPath:uB(_.originalFileLocation,r,l),overwrite:i,localSchema:s,writeFile:u});Object.entries(v).forEach(([e,t])=>{n[e]=t});let b=dB(e);if(b?.division){let e=b.nav;return`group`in e?{...e,pages:`pages`in e&&Array.isArray(e.pages)?[...e.pages,...y]:y}:{...e,groups:`groups`in e?[...e.groups,...y]:y}}}return null}function g(e){let t={source:void 0,directory:void 0,slug:void 0};if(`openapi`in e&&e.openapi!==null){let n=e.openapi;if(typeof n==`string`)return{...t,source:n};if(Array.isArray(n)&&n.length>0){let e=n[0];return typeof e==`string`?{...t,source:e}:e==null?t:{source:e.source,directory:e.directory,slug:e.slug}}if(typeof n==`object`&&`source`in n&&typeof n.source==`string`)return{source:n.source,directory:`directory`in n&&typeof n.directory==`string`?n.directory:void 0,slug:`slug`in n?n.slug:void 0}}return t}let _=/* @__PURE__ */ new Set,v=/* @__PURE__ */ new Set,y=0;async function b(e,r,h,x,S){let C=y++,w=g(e),T=w.source??r,E=w.source?w.directory:w.directory??h,D=w.source?w.slug:w.slug??S,O=w.source?C:x,k=e;if(`pages`in k){let e=await Promise.all(k.pages.map(async e=>{if(typeof e==`object`&&e&&`group`in e)return b(e,T,E,O,D);if(typeof e!=`string`)return e;let r=Ff(e);if(r){let{filename:e,method:h,endpoint:g}=r,_=e??T;if(_){let r;if(_){if(Eh(_,s)){if(m.has(_))r=await m.get(_);else{let e=Z9e(_,d,f);m.set(_,e),r=await e,p.push(r)}}else r=t.find(e=>e.originalFileLocation!=null&&e.originalFileLocation===Dh(_))}if(!r){let e=_F(c,_);throw Error(e?`Openapi file ${_} referenced in docs.json exists but is invalid: ${e.reason}`:`Openapi file ${_} referenced in docs.json does not exist`)}let y=r.spec,b=h.toLowerCase()===`webhook`,x=[],S=[],C=[],w=[];if(b){let e=y.webhooks,t=Pf(e,g);if(!t)throw Error(`Webhook ${g} not found in ${_}. ${e?`Available webhooks: ${Object.keys(e).join(`, `)}`:``}`.trim());w=PF(t.pathKey,t.pathItem,y,x,S,C,n,{openApiFilePath:r.originalFileLocation,writeFiles:a,outDir:E??lB,outDirBasePath:_t.join(o??``,`src`,`_props`),slug:D,mountPath:uB(r.originalFileLocation,E,l),overwrite:i,localSchema:s,writeFile:u,...G9e(y)},wh)}else{let e=Pf(y.paths,g);if(!e){let e=Object.keys(y.paths??{}).join(`, `);throw Error(`Endpoint ${g} not found in ${_}.${e?` Available paths: ${e}`:``}`)}let t=h===`webhook`?void 0:Pl(e.pathItem,h);if(!t)throw Error(`Method ${h.toUpperCase()} for endpoint ${e.pathKey} not found in ${_}`);let c=Dl(h)?{[h]:t}:{additionalOperations:{[h]:t}};w=NF(e.pathKey,c,y,x,S,C,n,{openApiFilePath:r.originalFileLocation,writeFiles:a,outDir:E??lB,outDirBasePath:_t.join(o??``,`src`,`_props`),slug:D,mountPath:uB(r.originalFileLocation,E,l),overwrite:i,localSchema:s,writeFile:u,...G9e(y)},wh)}await Promise.all(C);let T=w[0];if(!T)throw Error(`Failed to generate OpenAPI endpoint page for ${h.toUpperCase()} ${g} in ${_}`);return O&&!e&&v.add(O),T}}return e}));k.pages=e}for(let e of[`groups`,...Ss])if(e in k){let t=k[e];k={...k,[e]:await Promise.all(t.map(e=>b(e,T,E,O,D)))}}return v.has(C)&&_.add(k),k}let x=await b(e,void 0,void 0,void 0);async function S(e){let t=e;if(g(t).source&&!_.has(t)){let e=await h(t);e&&(t=e)}if(`pages`in t&&t.pages){let e=await Promise.all(t.pages.map(async e=>typeof e==`object`&&e&&`group`in e?S(e):e));t.pages=e}for(let e of[`groups`,...Ss]){let n=lk(t,e);n&&(t=Object.assign({},t,{[e]:await Promise.all(n.map(e=>S(e)))}))}return t}let C=await S(x);if(!X9e(C))throw Error(`OpenAPI page generation produced a non-top-level navigation node`);return e=C,{newNav:C,newOpenApiFiles:p}},Y9e=[`group`,`tab`,`anchor`,`version`,`language`,`dropdown`,`product`,`item`];function X9e(e){return Y9e.every(t=>!(t in e))}function dB(e){if(`openapi`in e){let{openapi:t,...n}=e,r={group:`group`,anchor:`anchor`,tab:`tab`,version:`version`,language:`language`,dropdown:`dropdown`,product:`product`,item:`item`},i=Object.keys(r).find(e=>e in n);return{division:r[i],name:n[i],nav:n}}}async function Z9e(e,t,n){try{let r=t?await Cm(t,e):void 0;return{filename:e,spec:await yh(e,{overlays:r,fetchRemoteDocument:n}),originalFileLocation:e}}catch(e){throw console.error(e),e}}const Q9e=async(e,t,n,r,i,a,o=!1,s)=>{let c=await cB(`docs`,e,r,s);t.push(...c);let l={},u=[],d=o||a!=null&&Object.keys(a).length>0,{newNav:f,newOpenApiFiles:p}=await J9e(e.navigation,t,l,{overwrite:!0,writeFiles:!0,targetDir:n,localSchema:r,invalidSpecFiles:i,overlayRegistry:s,...d?{writeFile:(e,t)=>{u.push({filename:e,content:t})}}:{}}),m=async()=>{await Promise.all(u.map(({filename:e,content:t})=>lF.default.outputFile(e,t)))};return a&&Yz({label:`GraphQL`,pages:a},{label:`OpenAPI`,pages:l}),o||await m(),{newDocsConfig:{...e,navigation:f},pagesAcc:l,openApiFiles:[...t,...p],flushWrites:m}},$9e=(e,t)=>{let n=_t.relative(e,t);return n!==`..`&&!n.startsWith(`..${_t.sep}`)&&!_t.isAbsolute(n)},eet=async(e,t)=>{let n=_t.join(e,t);return $9e(e,n)?lF.default.existsSync(n)?$9e(await xn(e),await xn(n))?{content:await yn(n,`utf8`)}:`outside`:`missing`:`outside`};async function tet({config:e,contentDirectoryPath:t}){let n=typeof e.styling?.codeblocks==`object`&&e.styling.codeblocks.languages?.custom?e.styling.codeblocks.languages.custom:[];if(n.length===0)return[];let r=_t.resolve(t);return await Promise.all(n.map(async e=>{let t=await eet(r,e);if(t===`outside`)console.error(`Custom language file "${e}" defined in docs.json is outside the docs directory`);else if(t===`missing`)console.error(`Custom language file "${_t.join(r,e)}" defined in docs.json is not found`);else return{content:t.content,filePath:e}})).then(e=>e.filter(e=>e!==void 0))}async function net({contentDirectoryPath:e,openApiFiles:t,asyncApiFiles:n,docsConfig:r,localSchema:i,disableOpenApi:a,strict:o,invalidSpecFiles:s,allowSourceRefs:c,overlayRegistry:l,pageScans:u}){let d=await dF(e,`docs`);if(d==null&&r==null||(r==null&&d&&(r=await bF.getConfig(d,o,e,void 0,{allowSourceRefs:c})),r==null))throw Error(`must be run in a directory where a docs.json file exists.`);let f=await tet({config:r,contentDirectoryPath:e}),p=await oB(r,t=>sB(t,e)),{newDocsConfig:m,pagesAcc:h}=p,{newDocsConfig:g,pagesAcc:_,openApiFiles:v,flushWrites:y}=a?{newDocsConfig:m,pagesAcc:{},openApiFiles:t,flushWrites:async()=>{}}:await Q9e(m,t,void 0,i,s,h,!0,l),{newDocsConfig:b,pagesAcc:x,asyncApiFiles:S,flushWrites:C}=await g9e(g,n,void 0,i,h,!0,!0),w=await c9e(e,b.navigation,u),T=await H7e(b,t=>X7e(t,e),{pageMetadataBySlug:w}),{newDocsConfig:E,pagesAcc:D}=T,O={label:`SDK`,pages:D};Yz({label:`GraphQL`,pages:h},O),Yz({label:`OpenAPI`,pages:_},O),Yz({label:`AsyncAPI`,pages:x},O);let k={..._,...x,...h,...D};return await Promise.all([y(),C()]),await U9e(p),await s9e(T),await bF.writeConfigFile(E),{docsConfig:E,pagesAcc:k,newOpenApiFiles:v,newAsyncApiFiles:S,customLanguages:f,inheritedSdkBySlug:T.inheritedSdkBySlug,pageMetadataBySlug:w}}const ret=async(e,t,n,r,i)=>{let a=await cB(`mint`,e);t.push(...a);let o={},[s,c]=await Promise.all([iet(e.anchors,t,o,{overwrite:!0,writeFiles:!0,targetDir:n,localSchema:r,invalidSpecFiles:i}),iet(e.tabs,t,o,{overwrite:!0,writeFiles:!0,targetDir:n,localSchema:r,invalidSpecFiles:i})]),l=[...e.navigation,...s.newNavItems,...c.newNavItems];return{mintConfig:{...e,navigation:l},pagesAcc:o,openApiFiles:[...t,...s.newOpenApiFiles,...c.newOpenApiFiles]}},iet=async(e,t,n,r)=>{let{overwrite:i,writeFiles:a,targetDir:o,localSchema:s,invalidSpecFiles:c,fetchRemoteDocument:l}=r,u=[],d=[];if(e==null)return{newNavItems:u,newOpenApiFiles:d};let f=[];for(let[r,p]of e.entries()){if(p.openapi==null)continue;let e;if(Eh(p.openapi,s))try{let t=await yh(p.openapi,{fetchRemoteDocument:l});e={filename:`openapi-from-anchor-url-${r}`,spec:t},d.push(e)}catch(e){throw console.error(e),e}else e=t.find(e=>e.originalFileLocation!=null&&e.originalFileLocation===p.openapi);if(e==null){let e=_F(c,p.openapi);throw Error(e?`Openapi file "${p.openapi}" defined in the anchor or tab array at index ${r} in your mint.json exists but is invalid: ${e.reason}`:`Openapi file "${p.openapi}" defined in the anchor or tab array at index ${r} in your mint.json does not exist`)}f.push((async()=>{let{pagesAcc:t,nav:r}=await QXe(e.spec,{openApiFilePath:e.originalFileLocation,version:p.version,writeFiles:a,outDir:p.url,outDirBasePath:_t.join(o??``,`src`,`_props`),overwrite:i,localSchema:s});Object.entries(t).forEach(([e,t])=>{n[e]=t}),u.push(...r)})())}return await Promise.all(f),{newNavItems:u,newOpenApiFiles:d}};async function aet(e,t,n,r,i){let a=await dF(e,`mint`);if(a==null)return null;let o=await yF.getConfig(a,r,e),{mintConfig:s,pagesAcc:c,openApiFiles:l}=await ret(o,t,void 0,n,i);return await yF.writeConfigFile(s),{mintConfig:s,pagesAcc:c,openApiFiles:l,originalMintConfig:o}}const fB=e=>{let t=/* @__PURE__ */ new Map;for(let[n,r]of Object.entries(e))if(r.graphql!=null){let e=Jz(n);t.has(e)||t.set(e,n)}return t},pB=(e,t,n,r,i=fB(r))=>{let a=Jz(t),o=i.get(a);if(o!==void 0)throw Error(`User page route "${t}" collides with generated GraphQL route "${o}"`);let s=r[t];if(s)try{let t=ik(e).attributes;!t.title&&s.title&&(n.title=s.title),!t.description&&s.description&&(n.description=s.description),!t.sidebarTitle&&s.sidebarTitle&&(n.sidebarTitle=s.sidebarTitle)}catch{}r[t]=n,n.graphql!=null&&i.set(a,t)},{readFile:oet}=Zt,set=e=>{try{return ik(e).attributes.rss===!0}catch{return!1}},cet=async({contentDirectoryPath:e,openApiFiles:t,asyncApiFiles:n,contentFilenames:r,pagesAcc:i,pageScans:a})=>{let o=[],s=[...r],c=fB(i),l=async r=>{let s=a?.get(r),l=s?.frontmatter??await oet(Ct(e,r),`utf8`),{slug:u,pageMetadata:d}=sk(r,l,t,n);pB(l,u,d,i,c),(s?s.rssCandidate||set(l):l.includes(`<Update`)||set(l))&&o.push(r)};return await Promise.all(Array.from({length:Math.min(16,s.length)},async()=>{let t=s.shift();for(;t!==void 0;){try{await l(t)}catch(n){if(n instanceof vPe)throw n;let r=n instanceof Error?n.message:`Unknown error occurred reading page metadata.`;console.error(`${Ct(e,t)}: ${r}`)}t=s.shift()}})),{rssCandidateFilenames:o}},uet=async(e,t,n,r)=>{try{return String(await PT().process(O(Py(e))))}catch(e){let i=hF(e,n,t);return r?r(i,dXe(n,t,e)):console.log(i),`🚧 A parsing error occurred. Please contact the owner of this website.`}},mB=async(e,t,n,r)=>{try{return FT(e,n)}catch(e){let i=hF(e,n,t);return r?r(i,dXe(n,t,e)):console.error(i),FT(`🚧 A parsing error occurred. Please contact the owner of this website.`)}},{readFile:det}=Zt,fet=async({contentDirectoryPath:e,openApiFiles:t,asyncApiFiles:n,contentFilenames:r,pagesAcc:i})=>{let a=[],o=[],s=[...r],c=fB(i),l=async r=>{let s=Ct(e,r),l=Ct(`src`,`_props`,r),u;try{let d=(await det(s)).toString(),f=await mB(d,e,s,kYe),p=await $T(f);if(eE(p)){let t;try{t=ik(d).attributes}catch{}a.push({...p,filename:r,metadata:t,contentDirectoryPath:e});return}let{slug:m,pageMetadata:h}=sk(r,d,t,n);if(pB(d,m,h,i,c),h.rss===!0||CP(f)){o.push({targetPath:l,sourcePath:s,tree:f,metadata:h});return}u=f}catch(e){let t=e instanceof Error?e.message:`Unknown error occurred reading and parsing file.`;throw console.error(`${s}: ${t}`),Error(`Failed to parse MDX files, please correct errors before continuing`)}await(0,lF.outputFile)(l,IT(u),{flag:`w`})},u=async()=>{let e=s.shift();for(;e!==void 0;)await l(e),e=s.shift()},d=Math.min(8,s.length);return await Promise.all(Array.from({length:d},u)),{mdxFilesWithNoImports:o,pagesAcc:i,filesWithImports:a}},pet=(e,t,n)=>{let r=t.map(async t=>{let r=Ct(e,t),i=EO(await det(r,`utf8`),n);return{filename:t,tree:await mB(i,e,r,kYe)}});return Promise.all(r)},met=async e=>{try{let t=await yn(Ct(e,`package.json`),`utf8`);return _Ne(t).packageNames}catch{return/* @__PURE__ */ new Set}},het=async({openApiFiles:e,asyncApiFiles:t,pagesAcc:n,snippetsV2:r,filesWithImports:i,packageNames:a})=>{let o=a&&{packageNames:a,packageSnippets:qTe(r)},s=await get(r,o),c=await _et(s),l=await vet({openApiFiles:e,asyncApiFiles:t,snippetsWithResolvedImports:s,filesWithImports:i,pagesAcc:n,packages:o}),u=yet(l);await Promise.all([...c,...u])},get=async(e,t)=>{let n=e.map(async e=>({...await $T(e.tree),filename:e.filename})),r=await Promise.all(n);return YEe(r,{onWarning:JP,packages:t})},_et=async e=>e.map(async e=>{let t=Ct(`public`,e.filename);await(0,lF.outputFile)(t,IT(e.tree),{flag:`w`})}),vet=async({openApiFiles:e,asyncApiFiles:t,snippetsWithResolvedImports:n,filesWithImports:r,pagesAcc:i,packages:a})=>{let o=fB(i),s=r.map(async r=>{let s=await EE({snippets:n,fileWithImports:r,onWarning:JP,...a&&{packages:a}}),c=IT(s),{slug:l,pageMetadata:u}=sk(r.filename,c,e,t);return pB(c,l,u,i,o),{targetPath:Ct(`src`,`_props`,r.filename),tree:s}});return await Promise.all(s)},yet=e=>e.map(async({targetPath:e,tree:t})=>{await(0,lF.outputFile)(e,IT(t),{flag:`w`})});
|
|
1048
1048
|
/*!
|
|
1049
1049
|
* escape-html
|
|
@@ -2321,7 +2321,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2321
2321
|
`))?n=void 0:(n.push(o),i.push([a,a+o.length])):s&&Q6t.test(o)&&!t.some(([e,t])=>e<=a&&a<t)&&(n=[o],i.push([a,a+o.length])),a+=o.length+1}return i},s8t=e=>E9(e,a8t(e)),D9=(e,{keepEsm:t=!1}={})=>{let n=dNe(e);return E9(e,[...a8t(e),...n,...t?[]:o8t(e,n)])},c8t=/* @__PURE__ */ new Set([`{`,"${"]),l8t=(e,t)=>{let n=[],r=0;try{let i=Rg.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(c8t.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(`
|
|
2322
2322
|
`,i);n.push([i+1,a===-1?e.length:a])}return{ranges:n,end:e.length}},u8t=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(r===`\\`)n++;else if(r===`{`){let r=l8t(e,n+1);t.push(...r.ranges),n=r.end-1}}return t},d8t=e=>[...e.matchAll($6t)].flatMap(({index:e,0:t})=>[...t.matchAll(e8t)].map(({index:t,0:n})=>[e+t+1,e+t+n.length-1])),f8t=e=>[...e.matchAll(/\\[\s\S]/g)].flatMap(({index:e,0:t})=>t===`\\<`?[[e+1,e+2]]:[]),p8t=e=>r8t(D9(e),[d8t,f8t,u8t]),O9=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},k9=(e,t)=>O9(t).reduce((e,t)=>e.slice(0,t.start)+t.text+e.slice(t.end),e),m8t=(e,t,n=1)=>{let r=0;for(let n=1;n<t;n++){let t=e.indexOf(`
|
|
2323
2323
|
`,r);if(t===-1)break;r=t+1}return r+n-1},A9=(e,t)=>{let n=e.slice(0,t).split(`
|
|
2324
|
-
`);return{line:n.length,column:(n.pop()?.length??0)+1}},h8t=(e,t)=>e.start-t.start;function j9(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 g8t=(e,t,n)=>{let{start:r,end:i}=n;for(let{edits:n}of e.slice(0,t).reverse()){let e=[...n].sort(h8t),t=j9(e,r,`reject`),a=j9(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}},_8t=(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})=>j9([...t].sort(h8t),e,`snap`),m8t(r.content,n.line,n.column)),o=A9(i.content,a);return n.column===void 0?{line:o.line}:o},v8t=e=>WT(gPe(e)).replace(/^\.$/,``),y8t=(e,t)=>X6t(void 0,void 0,void 0,function*(){let n=new w2(e);try{yield aRt(n,t)}catch{return[]}return n.paths.flatMap(e=>e.pathType===b2.INTERNAL&&e.anchorLink?[`${v8t(ok(e.toString()))}#${YE(e.anchorLink.slice(1))}`]:[])}),b8t=(e,t,n)=>{let r=`${v8t(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}},M9={id:`parse-error`,group:`content`,severity:`error`,description:`files MDX can't parse; other checks skip them`};var N9=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())})},x8t=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 S8t=/* @__PURE__ */ new Set([`page`,`snippet`,`snippet-v2`]),C8t=e=>N9(void 0,void 0,void 0,function*(){let{mdxCandidates:t}=yield bXe(e,yield fF(e)),{snippets:n,snippetsV2:r}=yield yXe(e,t),i=/* @__PURE__ */ new Set([...n,...r]);return t.filter(e=>/\.mdx?$/.test(e)&&S8t.has(XO(e))).map(e=>({file:e.replace(/^\//,``),kind:i.has(e)?`snippet`:`page`}))}),w8t=e=>{try{let{attributes:t}=ik(e);return t&&typeof t==`object`?Object.assign({},t):{}}catch{return{}}},T8t=/\s*\(\d+:\d+(?:-\d+:\d+)?\)$/,E8t=/* @__PURE__ */ new Set([`unexpected-character`,`unexpected-eof`]),D8t=(e,t,n)=>{let{source:r,ruleId:i}=e??{};return r===`micromark-extension-mdx-jsx`&&typeof i==`string`&&E8t.has(i)&&n?.line!=null&&n.column!=null&&t[m8t(t,n.line,n.column)-1]===`<`},O8t=(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`?mF(e):null,o=D8t(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(T8t,``)+o})},k8t=(e,t)=>Object.assign(Object.assign({},t),{rule:M9.id,group:M9.group,severity:M9.severity,file:e,message:`${t.message} (other checks were skipped for this file)`}),A8t=e=>{try{return n8t(e)}catch{return}},j8t=(e,t,n,r={})=>{let i=Object.assign({file:e,content:t,baseDir:n,frontmatter:w8t(t)},r),a=A8t(t);if(a)return{context:Object.assign(Object.assign({},i),{tree:a}),approximate:!1};try{return{context:Object.assign(Object.assign({},i),{tree:FT(t,e)}),approximate:!0}}catch(e){return{error:O8t(e,t)}}},M8t={type:`root`,children:[]},N8t=/\{\{\s*([\w.\-]+)\s*\}\}/g,P8t=(e,t={})=>[...e.matchAll(N8t)].filter(e=>e[1]!==void 0&&t[e[1]]!==void 0).map(e=>({start:e.index,end:e.index+e[0].length,text:EO(e[0],t)})),F8t=(e,t,n,r,i)=>{var{edit:a}=n,o=x8t(n,[`edit`]);let s=a&&g8t(r,i,a);return Object.assign(Object.assign(Object.assign(Object.assign({},o),_8t(r,i,o)),{rule:e.id,group:e.group,severity:e.severity,file:t}),s&&{fix:Object.assign({file:t},s)})},I8t=(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`?P8t(r,o):[],d=k9(r,u),f={file:t,content:d,baseDir:i,frontmatter:{},tree:M8t,variables:o},p=c.flatMap(e=>e.check(f).map(t=>({rule:e,finding:t}))),m=O9(p.flatMap(({finding:e})=>e.edit?[e.edit]:[])),h=k9(d,m),g=[{content:r,edits:u},{content:d,edits:m},{content:h,edits:[]}],_=p.map(({rule:e,finding:n})=>F8t(e,t,n,g,1)),v=j8t(t,h,i,Object.assign(Object.assign({},a),{variables:o}));if(`error`in v)return _.unshift(k8t(t,Object.assign(Object.assign({},v.error),_8t(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(F8t(e,t,r,g,2))}return _},L8t=e=>N9(void 0,void 0,void 0,function*(){let t=yield Promise.all(e.files.map(({file:t})=>y8t(t,e.read(t)??``)));return new Set(t.flat())}),R8t=(e,t)=>N9(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?[k8t(n.file,{message:`could not read this file`})]:I8t(t,n,i,e.baseDir,r,e.variables)},a=e=>e.some(({rule:e})=>n.has(e)),o=r.map(t=>i(t,{readFile:e.read}));if(!o.some(a))return o.flat();let s={readFile:e.read,anchorLinks:yield L8t(e)};return r.flatMap((e,t)=>{let n=o[t]??[];return a(n)?i(e,s):n})}),P9=String.raw`[\w@.\\/-]+\.(?:mdx?|jsx?|tsx?|json|ya?ml)\b`,z8t=new RegExp(P9),B8t=[new RegExp(String.raw`\(in (${P9}),`),new RegExp(String.raw`(?:\bin|imported from) (${P9})`)],V8t=/* @__PURE__ */ new Set([`missing-file`,`invalid-import-path`,`import-resolution-error`,`default-import-no-default-export`,`export-collision`,`undeclared-package`,`package-import-conflict`]),H8t=/^:(\d+)(?::(\d+))?/,U8t=/"([^"]+)"/,F9=(e,t)=>{let n=gr(t.message).trim(),r=t.file==null&&V8t.has(t.type)?B8t.map(e=>e.exec(n)?.[1]).find(Boolean):void 0,i=t.file!=null||r||t.type===`missing-nav-page`?null:z8t.exec(n),a=r??i?.[0],o=t.file??(a?bh(ok(a)):e.configFile),s=i?H8t.exec(n.slice(i.index+i[0].length)):null,c=t.file==null&&o===e.configFile?U8t.exec(n)?.[0]:void 0,l=t.ref!=null&&t.line==null?e.locate(o,JSON.stringify(t.ref)):c?e.locate(o,c):void 0;return Object.assign(Object.assign(Object.assign({file:o},t.line==null?s&&Object.assign({line:Number(s[1])},s[2]&&{column:Number(s[2])}):Object.assign({line:t.line},t.column!=null&&{column:t.column})),l),{message:n})},W8t=/* @__PURE__ */ new Set([`parse-error`]),I9=(e,t,n,r)=>{for(let e of n)W8t.add(e);return{id:e,group:t,severity
|
|
2324
|
+
`);return{line:n.length,column:(n.pop()?.length??0)+1}},h8t=(e,t)=>e.start-t.start;function j9(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 g8t=(e,t,n)=>{let{start:r,end:i}=n;for(let{edits:n}of e.slice(0,t).reverse()){let e=[...n].sort(h8t),t=j9(e,r,`reject`),a=j9(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}},_8t=(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})=>j9([...t].sort(h8t),e,`snap`),m8t(r.content,n.line,n.column)),o=A9(i.content,a);return n.column===void 0?{line:o.line}:o},v8t=e=>WT(gPe(e)).replace(/^\.$/,``),y8t=(e,t)=>X6t(void 0,void 0,void 0,function*(){let n=new w2(e);try{yield aRt(n,t)}catch{return[]}return n.paths.flatMap(e=>e.pathType===b2.INTERNAL&&e.anchorLink?[`${v8t(ok(e.toString()))}#${YE(e.anchorLink.slice(1))}`]:[])}),b8t=(e,t,n)=>{let r=`${v8t(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}},M9={id:`parse-error`,group:`content`,severity:`error`,description:`files MDX can't parse; other checks skip them`};var N9=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())})},x8t=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 S8t=/* @__PURE__ */ new Set([`page`,`snippet`,`snippet-v2`]),C8t=e=>N9(void 0,void 0,void 0,function*(){let{mdxCandidates:t}=yield bXe(e,yield fF(e)),{snippets:n,snippetsV2:r}=yield yXe(e,t),i=/* @__PURE__ */ new Set([...n,...r]);return t.filter(e=>/\.mdx?$/.test(e)&&S8t.has(XO(e))).map(e=>({file:e.replace(/^\//,``),kind:i.has(e)?`snippet`:`page`}))}),w8t=e=>{try{let{attributes:t}=ik(e);return t&&typeof t==`object`?Object.assign({},t):{}}catch{return{}}},T8t=/\s*\(\d+:\d+(?:-\d+:\d+)?\)$/,E8t=/* @__PURE__ */ new Set([`unexpected-character`,`unexpected-eof`]),D8t=(e,t,n)=>{let{source:r,ruleId:i}=e??{};return r===`micromark-extension-mdx-jsx`&&typeof i==`string`&&E8t.has(i)&&n?.line!=null&&n.column!=null&&t[m8t(t,n.line,n.column)-1]===`<`},O8t=(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`?mF(e):null,o=D8t(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(T8t,``)+o})},k8t=(e,t)=>Object.assign(Object.assign({},t),{rule:M9.id,group:M9.group,severity:M9.severity,file:e,message:`${t.message} (other checks were skipped for this file)`}),A8t=e=>{try{return n8t(e)}catch{return}},j8t=(e,t,n,r={})=>{let i=Object.assign({file:e,content:t,baseDir:n,frontmatter:w8t(t)},r),a=A8t(t);if(a)return{context:Object.assign(Object.assign({},i),{tree:a}),approximate:!1};try{return{context:Object.assign(Object.assign({},i),{tree:FT(t,e)}),approximate:!0}}catch(e){return{error:O8t(e,t)}}},M8t={type:`root`,children:[]},N8t=/\{\{\s*([\w.\-]+)\s*\}\}/g,P8t=(e,t={})=>[...e.matchAll(N8t)].filter(e=>e[1]!==void 0&&t[e[1]]!==void 0).map(e=>({start:e.index,end:e.index+e[0].length,text:EO(e[0],t)})),F8t=(e,t,n,r,i)=>{var{edit:a}=n,o=x8t(n,[`edit`]);let s=a&&g8t(r,i,a);return Object.assign(Object.assign(Object.assign(Object.assign({},o),_8t(r,i,o)),{rule:e.id,group:e.group,severity:e.severity,file:t}),s&&{fix:Object.assign({file:t},s)})},I8t=(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`?P8t(r,o):[],d=k9(r,u),f={file:t,content:d,baseDir:i,frontmatter:{},tree:M8t,variables:o},p=c.flatMap(e=>e.check(f).map(t=>({rule:e,finding:t}))),m=O9(p.flatMap(({finding:e})=>e.edit?[e.edit]:[])),h=k9(d,m),g=[{content:r,edits:u},{content:d,edits:m},{content:h,edits:[]}],_=p.map(({rule:e,finding:n})=>F8t(e,t,n,g,1)),v=j8t(t,h,i,Object.assign(Object.assign({},a),{variables:o}));if(`error`in v)return _.unshift(k8t(t,Object.assign(Object.assign({},v.error),_8t(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(F8t(e,t,r,g,2))}return _},L8t=e=>N9(void 0,void 0,void 0,function*(){let t=yield Promise.all(e.files.map(({file:t})=>y8t(t,e.read(t)??``)));return new Set(t.flat())}),R8t=(e,t)=>N9(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?[k8t(n.file,{message:`could not read this file`})]:I8t(t,n,i,e.baseDir,r,e.variables)},a=e=>e.some(({rule:e})=>n.has(e)),o=r.map(t=>i(t,{readFile:e.read}));if(!o.some(a))return o.flat();let s={readFile:e.read,anchorLinks:yield L8t(e)};return r.flatMap((e,t)=>{let n=o[t]??[];return a(n)?i(e,s):n})}),P9=String.raw`[\w@.\\/-]+\.(?:mdx?|jsx?|tsx?|json|ya?ml)\b`,z8t=new RegExp(P9),B8t=[new RegExp(String.raw`\(in (${P9}),`),new RegExp(String.raw`(?:\bin|imported from) (${P9})`)],V8t=/* @__PURE__ */ new Set([`missing-file`,`invalid-import-path`,`import-resolution-error`,`default-import-no-default-export`,`export-collision`,`undeclared-package`,`package-import-conflict`]),H8t=/^:(\d+)(?::(\d+))?/,U8t=/"([^"]+)"/,F9=(e,t)=>{let n=gr(t.message).trim(),r=t.file==null&&V8t.has(t.type)?B8t.map(e=>e.exec(n)?.[1]).find(Boolean):void 0,i=t.file!=null||r||t.type===`missing-nav-page`?null:z8t.exec(n),a=r??i?.[0],o=t.file??(a?bh(ok(a)):e.configFile),s=i?H8t.exec(n.slice(i.index+i[0].length)):null,c=t.file==null&&o===e.configFile?U8t.exec(n)?.[0]:void 0,l=t.ref!=null&&t.line==null?e.locate(o,JSON.stringify(t.ref)):c?e.locate(o,c):void 0;return Object.assign(Object.assign(Object.assign({file:o},t.line==null?s&&Object.assign({line:Number(s[1])},s[2]&&{column:Number(s[2])}):Object.assign({line:t.line},t.column!=null&&{column:t.column})),l),{message:n})},W8t=/* @__PURE__ */ new Set([`parse-error`]),I9=(e,t,n,r,i=`error`)=>{for(let e of n)W8t.add(e);return{id:e,group:t,severity:i,needsBuild:!0,scope:`site`,description:r,check:e=>(e.build?.warnings??[]).filter(({type:e})=>n.includes(e)).map(t=>F9(e,t))}},G8t=[I9(`missing-nav-page`,`nav`,[`missing-nav-page`],`pages in the navigation that have no file`),I9(`missing-file`,`content`,[`missing-file`],`imported files that don't exist`),I9(`import-error`,`content`,[`invalid-import-path`,`import-resolution-error`,`default-import-no-default-export`,`export-collision`],`imports in pages and snippets that don't resolve`),I9(`package-import`,`config`,[`undeclared-package`,`package-import-conflict`],`npm package imports that are undeclared or conflict`),I9(`openapi-build`,`openapi`,[`openapi`],`OpenAPI pages the build could not generate`),I9(`graphql-url-collision`,`config`,[`graphql-url-collision`],`GraphQL names that differ only by case and get a new page URL`,`warning`),{id:`build-failed`,group:`config`,severity:`error`,needsBuild:!0,scope:`site`,description:`the strict build failed for a reason no rule reports`,check:e=>{if(!e.build||e.build.passed)return[];let t=t=>t.type===`parse-error`&&e.selected!==void 0&&!e.selected.has(F9(e,t).file),n=e.build.warnings.filter(e=>!e.notice&&!W8t.has(e.type)||t(e)).map(t=>F9(e,t));return e.build.strict?n:[...n,{file:e.configFile,message:e.build.error}]}}],K8t=(e,t)=>(e.build?.warnings??[]).filter(e=>e.type===t).map(t=>F9(e,t)),q8t=e=>e.trim().replace(/\s+/g,` `),J8t=Je().use(lLt),Y8t=e=>e.children.find(e=>e.type===`heading`),X8t=e=>{let t=structuredClone(e),n={type:`root`,children:[t]};return J8t.runSync(n),Ue(t)},Z8t={id:`duplicate-h1`,group:`content`,severity:`warning`,scope:`file`,description:`remove a first heading that repeats the frontmatter title`,pagesOnly:!0,needsAnchorLinks:!0,check:({tree:e,frontmatter:t,content:n,file:r,anchorLinks:i})=>{let{title:a,mode:o}=t;if(typeof a!=`string`||yO.includes(String(o)))return[];let s=Y8t(e);if(!s||s.depth!==1||q8t(Ue(s))!==q8t(a))return[];let c=s.position?.start.offset??0,l=s.position?.end.offset??c,u={line:s.position?.start.line,column:s.position?.start.column},d=n.indexOf(`
|
|
2325
2325
|
`,c);if(t8t(n.slice(c,d===-1?void 0:d)))return[Object.assign(Object.assign({},u),{message:`first heading duplicates the frontmatter title; it has a custom {#id}, so remove it by hand and update links to it`})];let f=[X8t(s),Ue(s)].map(e=>b8t(i,r,YE($E(e)))).find(e=>e!==void 0);if(f!==void 0)return[Object.assign(Object.assign({},u),{message:`first heading duplicates the frontmatter title; links point to #${f}, so remove it by hand and update them`})];let p=/^\n*/.exec(n.slice(l))?.[0].length??0;return[Object.assign(Object.assign({},u),{message:`first heading duplicates the frontmatter title`,edit:{start:c,end:l+p,text:``}})]}},Q8t={note:`<Note>`,info:`<Info>`,tip:`<Tip>`,hint:`<Tip>`,success:`<Check>`,important:`<Note>`,warning:`<Warning>`,caution:`<Warning>`,danger:`<Warning>`,error:`<Warning>`,details:`<Accordion>`},L9=e=>Q8t[e?.toLowerCase()??``]??`a callout (<Note>, <Info>, <Tip> or <Warning>)`,$8t={hint:`a callout (<Note>, <Info>, <Tip> or <Warning>)`,tabs:`<Tabs>`,tab:`<Tab title="…">`,stepper:`<Steps>`,step:`<Step title="…">`,embed:`a link or <Frame>`,"content-ref":`<Card>`,include:`a snippet import`,code:`a fenced code block`,file:`a link to the file`,swagger:`an OpenAPI page`,openapi:`an OpenAPI page`},e5t=[{regex:/\{%-?\s*(?!end)([\w-]+)[^%\n]*?-?%\}/g,message:([e,t])=>{let n=t===`hint`?/style=["']?(\w+)/.exec(e)?.[1]:void 0;return`${e} is a GitBook or Liquid tag, which Mintlify does not support; use ${n?L9(n):$8t[t??``]??`Markdown or a Mintlify component`}`}},{regex:/\{\{[<%]\s*([\w/-]+)[^}\n]*[>%]\}\}/g,message:([e])=>`${e} is a Hugo shortcode, which Mintlify does not support; use Markdown or a Mintlify component`},{regex:/\{\{-?\s*(?:(?:site|page|layout|include|jekyll|paginator)\.[^}\n]*|[^\s|{}]+\s*\|\s*\w+[^}\n]*)-?\}\}/g,message:([e])=>`${e} is a Liquid variable, which Mintlify does not support; write the value, or use a snippet or a variable`},{regex:/^ {0,3}:{3,}\s*([A-Za-z][\w-]*)/gm,message:([,e])=>`:::${e} is a Docusaurus or VitePress admonition, which Mintlify does not support; use ${L9(e)}`},{regex:/^ {0,3}::(?!:)([A-Za-z][\w-]*)/gm,message:([,e])=>`::${e} is an MDC (Nuxt Content, Docus) block, which Mintlify does not support; use the matching Mintlify component`},{regex:/^ {0,3}(!!!|\?\?\?\+?)[ \t]+([A-Za-z][\w-]*)/gm,message:([,e,t])=>`${e} ${t} is an MkDocs admonition, which Mintlify does not support; use ${e===`!!!`?L9(t):`<Accordion>`}`},{regex:/^ {0,3}===\+?[ \t]+["']/gm,message:()=>`=== "…" is an MkDocs content tab, which Mintlify does not support; use <Tabs> with <Tab title="…">`},{regex:/^[ \t]*;?[ \t]*--8<--/gm,scope:`everything`,message:()=>`--8<-- is an MkDocs snippet include, which Mintlify does not support; use a snippet import or paste the content`},{regex:/\{:\s*[.#\w][^}\n]*\}/g,message:([e])=>`${e} is a Kramdown attribute list, which Mintlify does not support; remove it, use a component, or use {#id} for a heading anchor`},{regex:/(?<![[{\w])\[\[([^[\]\n]+)\]\](?![(:[])/g,message:([e])=>`${e} is a wiki link, which Mintlify does not support; use a Markdown link such as [text](/path)`},{regex:/(?:\]\(|href=["'])((?:doc|ref|blog|changelog|page):[^)\s"']+)/g,scope:`links`,message:([,e])=>`${e} is a ReadMe link, which Mintlify does not support; link to the page path instead, such as /${e?.split(`:`)[1]??``}`},{regex:/["'(]@site\/[^"')\s]*/g,scope:`prose-and-esm`,message:([e])=>`${e.slice(1)} uses the Docusaurus @site alias, which Mintlify does not resolve; use a root-relative path such as /images/… or /snippets/…`}],t5t={id:`foreign-syntax`,group:`content`,severity:`warning`,scope:`file`,description:`syntax from another docs framework that Mintlify doesn't render`,raw:!0,check:({content:e})=>{let t=D9(e),n=p8t(e),r={prose:t,links:t,"prose-and-esm":D9(e,{keepEsm:!0}),everything:s8t(e)},i=[];for(let{regex:a,scope:o=`prose`,message:s}of e5t)for(let c of r[o].matchAll(a)){let r=c.index+(c[0].length-c[0].trimStart().length);(o!==`prose`||n[r]===t[r])&&i.push(Object.assign(Object.assign({},A9(e,r)),{message:s(c)}))}return i}},n5t={id:`katex`,group:`content`,severity:`warning`,scope:`file`,description:`math that KaTeX can't render`,check:({tree:e,content:t})=>{let n=[];return p(e,e=>{if((e.type===`math`||e.type===`inlineMath`)&&!(e.type===`inlineMath`&&we(e,t)))try{Lpe.renderToString(e.value,{throwOnError:!0,displayMode:e.type===`math`})}catch(t){n.push({line:e.position?.start.line,column:e.position?.start.column,message:t instanceof Error?t.message:`invalid math`})}}),n}},r5t=(e,t)=>!e.startsWith(`/`)&&(t(`_snippets/${e}`)!==void 0||e.startsWith(`snippets/`)&&t(e)!==void 0),i5t={id:`missing-snippet`,group:`content`,severity:`error`,scope:`file`,description:`<Snippet file> tags whose file the build cannot find`,check:({tree:e,readFile:t,variables:n})=>{if(!t)return[];let r=[];return p(e,`mdxJsxFlowElement`,e=>{if(e.name!==`Snippet`)return;let i=e.attributes.find(e=>e.type===`mdxJsxAttribute`&&e.name===`file`)?.value;if(typeof i!=`string`)return;let a=EO(i,n);r5t(a,t)||r.push({line:e.position?.start.line,column:e.position?.start.column,message:`<Snippet file="${i}"> renders nothing: no snippet matches "${a}"`})}),r}},a5t=/(?<!=\s*)\{\{\s*([\w.\-]+)\s*\}\}/g,o5t={id:`undefined-variable`,group:`content`,severity:`error`,scope:`file`,description:`{{variables}} that docs.json does not define`,raw:!0,check:({content:e,variables:t={}})=>[...D9(e).matchAll(a5t)].filter(([,e])=>e!==void 0&&t[e]===void 0).map(t=>Object.assign(Object.assign({},A9(e,t.index)),{message:`{{${t[1]}}} is not defined in the variables of docs.json`}))},s5t=e=>{let t=/* @__PURE__ */ new Set;return p(e.tree,`mdxjsEsm`,e=>{for(let n of e.data?.estree?.body??[])if(n.type===`ImportDeclaration`)for(let e of n.specifiers)pt(e.local,t);else if(n.type===`ExportNamedDeclaration`){let e=n.declaration;if(e?.type===`VariableDeclaration`)for(let n of e.declarations)pt(n.id,t);else e&&pt(e.id,t);for(let e of n.specifiers)pt(e.local,t),pt(e.exported,t)}else if(n.type===`ExportDefaultDeclaration`){let e=n.declaration;(e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`)&&pt(e.id,t)}}),t},c5t=e=>(e.tree.children.find(e=>[`yaml`,`toml`].includes(e.type))?.position)?.end.offset??0,l5t=(e,t,n)=>{let r;try{r=dE(FT(e,t))}catch{return}return r.has(n)?`{ ${n} }`:r.has(`default`)?n:void 0},u5t={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=s5t(e),n=/* @__PURE__ */ new Set,r=[],i=c5t(e),a=i===0?``:`
|
|
2326
2326
|
|
|
2327
2327
|
`,o=/^\n*/.exec(e.content.slice(i))?.[0].length??0,s=`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.39",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@inquirer/prompts": "7.9.0",
|
|
56
56
|
"@mintlify/common": "1.0.1370",
|
|
57
57
|
"@mintlify/editor": "0.0.649",
|
|
58
|
-
"@mintlify/link-rot": "3.0.
|
|
58
|
+
"@mintlify/link-rot": "3.0.1620",
|
|
59
59
|
"@mintlify/models": "0.0.396",
|
|
60
60
|
"@mintlify/og": "0.0.169",
|
|
61
|
-
"@mintlify/prebuild": "1.0.
|
|
62
|
-
"@mintlify/previewing": "4.0.
|
|
61
|
+
"@mintlify/prebuild": "1.0.1549",
|
|
62
|
+
"@mintlify/previewing": "4.0.1637",
|
|
63
63
|
"@mintlify/ts-config": "2.0.2",
|
|
64
64
|
"@mintlify/validation": "0.1.975",
|
|
65
65
|
"@tsconfig/recommended": "1.0.2",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"yargs": "17.7.1",
|
|
110
110
|
"zod": "4.3.6"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "9f43c73dcde573264f2266af3c980c23e897afab"
|
|
113
113
|
}
|