discord-user-card
Version:
Display Discord users' profile cards just like in Discord.
18 lines (14 loc) • 1.74 MB
JavaScript
(function(we,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("@discord-user-card/core")):typeof define=="function"&&define.amd?define(["exports","@discord-user-card/core"],U):(we=typeof globalThis<"u"?globalThis:we||self,U(we["Discord-User-Card"]={},we.DUCCore))})(this,function(we,U){"use strict";var Uf=Object.defineProperty;var Bf=(we,U,et)=>U in we?Uf(we,U,{enumerable:!0,configurable:!0,writable:!0,value:et}):we[U]=et;var G=(we,U,et)=>Bf(we,typeof U!="symbol"?U+"":U,et);function et(t){return Object.entries(t).filter(([,e])=>e).map(([e])=>e).join(" ")}function $d(t){return Object.entries(t).filter(([,e])=>e!==void 0).map(([e,s])=>`${e}: ${s};`).join(" ")}function R(t,e){const s=t.getAttribute("class")||"",n=et(e);s!==n&&t.setAttribute("class",n)}function Ae(t,e){const s=t.getAttribute("style")||"",n=$d(e);s!==n&&t.setAttribute("style",n)}function O(t,e){for(const s of Array.from(t.attributes))e.includes(s.name)||t.removeAttribute(s.name)}function v(t,e){!t||!e||t.contains(e)||t.appendChild(e)}function H(t,e){!t||!e||t.contains(e)&&t.removeChild(e)}async function je(t,e){for(const s of Object.values(t))s&&"render"in s&&await s.render(e)}function Ue(t,e){for(const s of Object.values(t))s&&"renderSkeleton"in s&&s.renderSkeleton(e)}function ke(t){if(t)for(const e of Object.values(t))e&&"destroy"in e&&e.destroy()}function Ba(t){return t.avatar?dt(t.avatar)?t.avatar:U.imageToUrl({image:U.mapDiscordImageHash(t.avatar),scope:"avatars",relatedId:t.id,animation:document.hasFocus()&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches}):U.discrimToAvatar(t.id,t.discriminator)}function Ga(t){if(t.banner)return dt(t.banner)?t.banner:U.imageToUrl({image:U.mapDiscordImageHash(t.banner),scope:"banners",relatedId:t.id,animation:document.hasFocus()&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches})}async function Kd(t){if(!t.bannerColor)return Qd(t);const[e,s,n]=U.ColorUtils.intToRgb(t.bannerColor);return`rgb(${e}, ${s}, ${n})`}async function Qd(t){const[e]=await U.getColorFromImage(Ba(t));return`rgb(${e[0]}, ${e[1]}, ${e[2]})`}function Xd(t){const{status:e}=t;return e===U.PresenceUpdateStatus.Online?{status:e,color:"#23a55a"}:e===U.PresenceUpdateStatus.Idle?{status:e,color:"#f0b232"}:e===U.PresenceUpdateStatus.DoNotDisturb?{status:e,color:"#f23f43"}:{status:U.PresenceUpdateStatus.Offline,color:"#80848e"}}function Zd(t){const e=U.mapDiscordImageHash(t.avatarDecoration);if(e)return U.imageToUrl({image:e,scope:"avatar-decoration-presets",relatedId:t.id,animation:document.hasFocus()&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches})}function dt(t){try{return new URL(t),!0}catch{return!1}}const Ye="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",tt=(t,e=0,s=1)=>kt(Mt(e,t),s),At=t=>{t._clipped=!1,t._unclipped=t.slice(0);for(let e=0;e<=3;e++)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]=tt(t[e],0,255)):e===3&&(t[e]=tt(t[e],0,1));return t},Ya={};for(let t of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Ya[`[object ${t}]`]=t.toLowerCase();function re(t){return Ya[Object.prototype.toString.call(t)]||"object"}const ie=(t,e=null)=>t.length>=3?Array.prototype.slice.call(t):re(t[0])=="object"&&e?e.split("").filter(s=>t[0][s]!==void 0).map(s=>t[0][s]):t[0],pt=t=>{if(t.length<2)return null;const e=t.length-1;return re(t[e])=="string"?t[e].toLowerCase():null},{PI:ut,min:kt,max:Mt}=Math,qe=ut*2,xt=ut/3,Jd=ut/180,el=180/ut,oe={format:{},autodetect:[]};class j{constructor(...e){const s=this;if(re(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=pt(e),o=!1;if(!n){o=!0,oe.sorted||(oe.autodetect=oe.autodetect.sort((a,r)=>r.p-a.p),oe.sorted=!0);for(let a of oe.autodetect)if(n=a.test(...e),n)break}if(oe.format[n]){const a=oe.format[n].apply(null,o?e:e.slice(0,-1));s._rgb=At(a)}else throw new Error("unknown format: "+e);s._rgb.length===3&&s._rgb.push(1)}toString(){return re(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const tl="2.6.0",Z=(...t)=>new Z.Color(...t);Z.Color=j,Z.version=tl;const sl=(...t)=>{t=ie(t,"cmyk");const[e,s,n,o]=t,a=t.length>4?t[4]:1;return o===1?[0,0,0,a]:[e>=1?0:255*(1-e)*(1-o),s>=1?0:255*(1-s)*(1-o),n>=1?0:255*(1-n)*(1-o),a]},{max:qa}=Math,nl=(...t)=>{let[e,s,n]=ie(t,"rgb");e=e/255,s=s/255,n=n/255;const o=1-qa(e,qa(s,n)),a=o<1?1/(1-o):0,r=(1-e-o)*a,i=(1-s-o)*a,c=(1-n-o)*a;return[r,i,c,o]};j.prototype.cmyk=function(){return nl(this._rgb)},Z.cmyk=(...t)=>new j(...t,"cmyk"),oe.format.cmyk=sl,oe.autodetect.push({p:2,test:(...t)=>{if(t=ie(t,"cmyk"),re(t)==="array"&&t.length===4)return"cmyk"}});const Lt=t=>Math.round(t*100)/100,ol=(...t)=>{const e=ie(t,"hsla");let s=pt(t)||"lsa";return e[0]=Lt(e[0]||0),e[1]=Lt(e[1]*100)+"%",e[2]=Lt(e[2]*100)+"%",s==="hsla"||e.length>3&&e[3]<1?(e[3]=e.length>3?e[3]:1,s="hsla"):e.length=3,`${s}(${e.join(",")})`},Ha=(...t)=>{t=ie(t,"rgba");let[e,s,n]=t;e/=255,s/=255,n/=255;const o=kt(e,s,n),a=Mt(e,s,n),r=(a+o)/2;let i,c;return a===o?(i=0,c=Number.NaN):i=r<.5?(a-o)/(a+o):(a-o)/(2-a-o),e==a?c=(s-n)/(a-o):s==a?c=2+(n-e)/(a-o):n==a&&(c=4+(e-s)/(a-o)),c*=60,c<0&&(c+=360),t.length>3&&t[3]!==void 0?[c,i,r,t[3]]:[c,i,r]},{round:Pt}=Math,al=(...t)=>{const e=ie(t,"rgba");let s=pt(t)||"rgb";return s.substr(0,3)=="hsl"?ol(Ha(e),s):(e[0]=Pt(e[0]),e[1]=Pt(e[1]),e[2]=Pt(e[2]),(s==="rgba"||e.length>3&&e[3]<1)&&(e[3]=e.length>3?e[3]:1,s="rgba"),`${s}(${e.slice(0,s==="rgb"?3:4).join(",")})`)},{round:Ft}=Math,jt=(...t)=>{t=ie(t,"hsl");const[e,s,n]=t;let o,a,r;if(s===0)o=a=r=n*255;else{const i=[0,0,0],c=[0,0,0],_=n<.5?n*(1+s):n+s-n*s,d=2*n-_,l=e/360;i[0]=l+1/3,i[1]=l,i[2]=l-1/3;for(let g=0;g<3;g++)i[g]<0&&(i[g]+=1),i[g]>1&&(i[g]-=1),6*i[g]<1?c[g]=d+(_-d)*6*i[g]:2*i[g]<1?c[g]=_:3*i[g]<2?c[g]=d+(_-d)*(2/3-i[g])*6:c[g]=d;[o,a,r]=[Ft(c[0]*255),Ft(c[1]*255),Ft(c[2]*255)]}return t.length>3?[o,a,r,t[3]]:[o,a,r,1]},za=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Va=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Wa=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,$a=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ka=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Qa=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,{round:Xa}=Math,Ut=t=>{t=t.toLowerCase().trim();let e;if(oe.format.named)try{return oe.format.named(t)}catch{}if(e=t.match(za)){const s=e.slice(1,4);for(let n=0;n<3;n++)s[n]=+s[n];return s[3]=1,s}if(e=t.match(Va)){const s=e.slice(1,5);for(let n=0;n<4;n++)s[n]=+s[n];return s}if(e=t.match(Wa)){const s=e.slice(1,4);for(let n=0;n<3;n++)s[n]=Xa(s[n]*2.55);return s[3]=1,s}if(e=t.match($a)){const s=e.slice(1,5);for(let n=0;n<3;n++)s[n]=Xa(s[n]*2.55);return s[3]=+s[3],s}if(e=t.match(Ka)){const s=e.slice(1,4);s[1]*=.01,s[2]*=.01;const n=jt(s);return n[3]=1,n}if(e=t.match(Qa)){const s=e.slice(1,4);s[1]*=.01,s[2]*=.01;const n=jt(s);return n[3]=+e[4],n}};Ut.test=t=>za.test(t)||Va.test(t)||Wa.test(t)||$a.test(t)||Ka.test(t)||Qa.test(t),j.prototype.css=function(t){return al(this._rgb,t)},Z.css=(...t)=>new j(...t,"css"),oe.format.css=Ut,oe.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&re(t)==="string"&&Ut.test(t))return"css"}}),oe.format.gl=(...t)=>{const e=ie(t,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e},Z.gl=(...t)=>new j(...t,"gl"),j.prototype.gl=function(){const t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};const{floor:rl}=Math,il=(...t)=>{t=ie(t,"hcg");let[e,s,n]=t,o,a,r;n=n*255;const i=s*255;if(s===0)o=a=r=n;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const c=rl(e),_=e-c,d=n*(1-s),l=d+i*(1-_),g=d+i*_,m=d+i;switch(c){case 0:[o,a,r]=[m,g,d];break;case 1:[o,a,r]=[l,m,d];break;case 2:[o,a,r]=[d,m,g];break;case 3:[o,a,r]=[d,l,m];break;case 4:[o,a,r]=[g,d,m];break;case 5:[o,a,r]=[m,d,l];break}}return[o,a,r,t.length>3?t[3]:1]},cl=(...t)=>{const[e,s,n]=ie(t,"rgb"),o=kt(e,s,n),a=Mt(e,s,n),r=a-o,i=r*100/255,c=o/(255-r)*100;let _;return r===0?_=Number.NaN:(e===a&&(_=(s-n)/r),s===a&&(_=2+(n-e)/r),n===a&&(_=4+(e-s)/r),_*=60,_<0&&(_+=360)),[_,i,c]};j.prototype.hcg=function(){return cl(this._rgb)},Z.hcg=(...t)=>new j(...t,"hcg"),oe.format.hcg=il,oe.autodetect.push({p:1,test:(...t)=>{if(t=ie(t,"hcg"),re(t)==="array"&&t.length===3)return"hcg"}});const _l=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,dl=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Za=t=>{if(t.match(_l)){(t.length===4||t.length===7)&&(t=t.substr(1)),t.length===3&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const e=parseInt(t,16),s=e>>16,n=e>>8&255,o=e&255;return[s,n,o,1]}if(t.match(dl)){(t.length===5||t.length===9)&&(t=t.substr(1)),t.length===4&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const e=parseInt(t,16),s=e>>24&255,n=e>>16&255,o=e>>8&255,a=Math.round((e&255)/255*100)/100;return[s,n,o,a]}throw new Error(`unknown hex color: ${t}`)},{round:ht}=Math,Ja=(...t)=>{let[e,s,n,o]=ie(t,"rgba"),a=pt(t)||"auto";o===void 0&&(o=1),a==="auto"&&(a=o<1?"rgba":"rgb"),e=ht(e),s=ht(s),n=ht(n);let i="000000"+(e<<16|s<<8|n).toString(16);i=i.substr(i.length-6);let c="0"+ht(o*255).toString(16);switch(c=c.substr(c.length-2),a.toLowerCase()){case"rgba":return`#${i}${c}`;case"argb":return`#${c}${i}`;default:return`#${i}`}};j.prototype.hex=function(t){return Ja(this._rgb,t)},Z.hex=(...t)=>new j(...t,"hex"),oe.format.hex=Za,oe.autodetect.push({p:4,test:(t,...e)=>{if(!e.length&&re(t)==="string"&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});const{cos:st}=Math,ll=(...t)=>{t=ie(t,"hsi");let[e,s,n]=t,o,a,r;return isNaN(e)&&(e=0),isNaN(s)&&(s=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(r=(1-s)/3,o=(1+s*st(qe*e)/st(xt-qe*e))/3,a=1-(r+o)):e<2/3?(e-=1/3,o=(1-s)/3,a=(1+s*st(qe*e)/st(xt-qe*e))/3,r=1-(o+a)):(e-=2/3,a=(1-s)/3,r=(1+s*st(qe*e)/st(xt-qe*e))/3,o=1-(a+r)),o=tt(n*o*3),a=tt(n*a*3),r=tt(n*r*3),[o*255,a*255,r*255,t.length>3?t[3]:1]},{min:gl,sqrt:ml,acos:pl}=Math,ul=(...t)=>{let[e,s,n]=ie(t,"rgb");e/=255,s/=255,n/=255;let o;const a=gl(e,s,n),r=(e+s+n)/3,i=r>0?1-a/r:0;return i===0?o=NaN:(o=(e-s+(e-n))/2,o/=ml((e-s)*(e-s)+(e-n)*(s-n)),o=pl(o),n>s&&(o=qe-o),o/=qe),[o*360,i,r]};j.prototype.hsi=function(){return ul(this._rgb)},Z.hsi=(...t)=>new j(...t,"hsi"),oe.format.hsi=ll,oe.autodetect.push({p:2,test:(...t)=>{if(t=ie(t,"hsi"),re(t)==="array"&&t.length===3)return"hsi"}}),j.prototype.hsl=function(){return Ha(this._rgb)},Z.hsl=(...t)=>new j(...t,"hsl"),oe.format.hsl=jt,oe.autodetect.push({p:2,test:(...t)=>{if(t=ie(t,"hsl"),re(t)==="array"&&t.length===3)return"hsl"}});const{floor:hl}=Math,El=(...t)=>{t=ie(t,"hsv");let[e,s,n]=t,o,a,r;if(n*=255,s===0)o=a=r=n;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const i=hl(e),c=e-i,_=n*(1-s),d=n*(1-s*c),l=n*(1-s*(1-c));switch(i){case 0:[o,a,r]=[n,l,_];break;case 1:[o,a,r]=[d,n,_];break;case 2:[o,a,r]=[_,n,l];break;case 3:[o,a,r]=[_,d,n];break;case 4:[o,a,r]=[l,_,n];break;case 5:[o,a,r]=[n,_,d];break}}return[o,a,r,t.length>3?t[3]:1]},{min:fl,max:bl}=Math,Sl=(...t)=>{t=ie(t,"rgb");let[e,s,n]=t;const o=fl(e,s,n),a=bl(e,s,n),r=a-o;let i,c,_;return _=a/255,a===0?(i=Number.NaN,c=0):(c=r/a,e===a&&(i=(s-n)/r),s===a&&(i=2+(n-e)/r),n===a&&(i=4+(e-s)/r),i*=60,i<0&&(i+=360)),[i,c,_]};j.prototype.hsv=function(){return Sl(this._rgb)},Z.hsv=(...t)=>new j(...t,"hsv"),oe.format.hsv=El,oe.autodetect.push({p:2,test:(...t)=>{if(t=ie(t,"hsv"),re(t)==="array"&&t.length===3)return"hsv"}});const xe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},{pow:yl}=Math,er=(...t)=>{t=ie(t,"lab");const[e,s,n]=t;let o,a,r,i,c,_;return a=(e+16)/116,o=isNaN(s)?a:a+s/500,r=isNaN(n)?a:a-n/200,a=xe.Yn*Gt(a),o=xe.Xn*Gt(o),r=xe.Zn*Gt(r),i=Bt(3.2404542*o-1.5371385*a-.4985314*r),c=Bt(-.969266*o+1.8760108*a+.041556*r),_=Bt(.0556434*o-.2040259*a+1.0572252*r),[i,c,_,t.length>3?t[3]:1]},Bt=t=>255*(t<=.00304?12.92*t:1.055*yl(t,1/2.4)-.055),Gt=t=>t>xe.t1?t*t*t:xe.t2*(t-xe.t0),{pow:tr}=Math,sr=(...t)=>{const[e,s,n]=ie(t,"rgb"),[o,a,r]=vl(e,s,n),i=116*a-16;return[i<0?0:i,500*(o-a),200*(a-r)]},Yt=t=>(t/=255)<=.04045?t/12.92:tr((t+.055)/1.055,2.4),qt=t=>t>xe.t3?tr(t,1/3):t/xe.t2+xe.t0,vl=(t,e,s)=>{t=Yt(t),e=Yt(e),s=Yt(s);const n=qt((.4124564*t+.3575761*e+.1804375*s)/xe.Xn),o=qt((.2126729*t+.7151522*e+.072175*s)/xe.Yn),a=qt((.0193339*t+.119192*e+.9503041*s)/xe.Zn);return[n,o,a]};j.prototype.lab=function(){return sr(this._rgb)},Z.lab=(...t)=>new j(...t,"lab"),oe.format.lab=er,oe.autodetect.push({p:2,test:(...t)=>{if(t=ie(t,"lab"),re(t)==="array"&&t.length===3)return"lab"}});const{sin:Tl,cos:Cl}=Math,nr=(...t)=>{let[e,s,n]=ie(t,"lch");return isNaN(n)&&(n=0),n=n*Jd,[e,Cl(n)*s,Tl(n)*s]},or=(...t)=>{t=ie(t,"lch");const[e,s,n]=t,[o,a,r]=nr(e,s,n),[i,c,_]=er(o,a,r);return[i,c,_,t.length>3?t[3]:1]},wl=(...t)=>{const e=ie(t,"hcl").reverse();return or(...e)},{sqrt:Rl,atan2:Dl,round:Nl}=Math,ar=(...t)=>{const[e,s,n]=ie(t,"lab"),o=Rl(s*s+n*n);let a=(Dl(n,s)*el+360)%360;return Nl(o*1e4)===0&&(a=Number.NaN),[e,o,a]},rr=(...t)=>{const[e,s,n]=ie(t,"rgb"),[o,a,r]=sr(e,s,n);return ar(o,a,r)};j.prototype.lch=function(){return rr(this._rgb)},j.prototype.hcl=function(){return rr(this._rgb).reverse()},Z.lch=(...t)=>new j(...t,"lch"),Z.hcl=(...t)=>new j(...t,"hcl"),oe.format.lch=or,oe.format.hcl=wl,["lch","hcl"].forEach(t=>oe.autodetect.push({p:2,test:(...e)=>{if(e=ie(e,t),re(e)==="array"&&e.length===3)return t}}));const nt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};j.prototype.name=function(){const t=Ja(this._rgb,"rgb");for(let e of Object.keys(nt))if(nt[e]===t)return e.toLowerCase();return t},oe.format.named=t=>{if(t=t.toLowerCase(),nt[t])return Za(nt[t]);throw new Error("unknown color name: "+t)},oe.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&re(t)==="string"&&nt[t.toLowerCase()])return"named"}});const Ol=t=>{if(re(t)=="number"&&t>=0&&t<=16777215){const e=t>>16,s=t>>8&255,n=t&255;return[e,s,n,1]}throw new Error("unknown num color: "+t)},Il=(...t)=>{const[e,s,n]=ie(t,"rgb");return(e<<16)+(s<<8)+n};j.prototype.num=function(){return Il(this._rgb)},Z.num=(...t)=>new j(...t,"num"),oe.format.num=Ol,oe.autodetect.push({p:5,test:(...t)=>{if(t.length===1&&re(t[0])==="number"&&t[0]>=0&&t[0]<=16777215)return"num"}});const{round:ir}=Math;j.prototype.rgb=function(t=!0){return t===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(ir)},j.prototype.rgba=function(t=!0){return this._rgb.slice(0,4).map((e,s)=>s<3?t===!1?e:ir(e):e)},Z.rgb=(...t)=>new j(...t,"rgb"),oe.format.rgb=(...t)=>{const e=ie(t,"rgba");return e[3]===void 0&&(e[3]=1),e},oe.autodetect.push({p:3,test:(...t)=>{if(t=ie(t,"rgba"),re(t)==="array"&&(t.length===3||t.length===4&&re(t[3])=="number"&&t[3]>=0&&t[3]<=1))return"rgb"}});const{log:Et}=Math,cr=t=>{const e=t/100;let s,n,o;return e<66?(s=255,n=e<6?0:-155.25485562709179-.44596950469579133*(n=e-2)+104.49216199393888*Et(n),o=e<20?0:-254.76935184120902+.8274096064007395*(o=e-10)+115.67994401066147*Et(o)):(s=351.97690566805693+.114206453784165*(s=e-55)-40.25366309332127*Et(s),n=325.4494125711974+.07943456536662342*(n=e-50)-28.0852963507957*Et(n),o=255),[s,n,o,1]},{round:Al}=Math,kl=(...t)=>{const e=ie(t,"rgb"),s=e[0],n=e[2];let o=1e3,a=4e4;const r=.4;let i;for(;a-o>r;){i=(a+o)*.5;const c=cr(i);c[2]/c[0]>=n/s?a=i:o=i}return Al(i)};j.prototype.temp=j.prototype.kelvin=j.prototype.temperature=function(){return kl(this._rgb)},Z.temp=Z.kelvin=Z.temperature=(...t)=>new j(...t,"temp"),oe.format.temp=oe.format.kelvin=oe.format.temperature=cr;const{pow:ft,sign:Ml}=Math,_r=(...t)=>{t=ie(t,"lab");const[e,s,n]=t,o=ft(e+.3963377774*s+.2158037573*n,3),a=ft(e-.1055613458*s-.0638541728*n,3),r=ft(e-.0894841775*s-1.291485548*n,3);return[255*Ht(4.0767416621*o-3.3077115913*a+.2309699292*r),255*Ht(-1.2684380046*o+2.6097574011*a-.3413193965*r),255*Ht(-.0041960863*o-.7034186147*a+1.707614701*r),t.length>3?t[3]:1]};function Ht(t){const e=Math.abs(t);return e>.0031308?(Ml(t)||1)*(1.055*ft(e,1/2.4)-.055):t*12.92}const{cbrt:zt,pow:xl,sign:Ll}=Math,dr=(...t)=>{const[e,s,n]=ie(t,"rgb"),[o,a,r]=[Vt(e/255),Vt(s/255),Vt(n/255)],i=zt(.4122214708*o+.5363325363*a+.0514459929*r),c=zt(.2119034982*o+.6806995451*a+.1073969566*r),_=zt(.0883024619*o+.2817188376*a+.6299787005*r);return[.2104542553*i+.793617785*c-.0040720468*_,1.9779984951*i-2.428592205*c+.4505937099*_,.0259040371*i+.7827717662*c-.808675766*_]};function Vt(t){const e=Math.abs(t);return e<.04045?t/12.92:(Ll(t)||1)*xl((e+.055)/1.055,2.4)}j.prototype.oklab=function(){return dr(this._rgb)},Z.oklab=(...t)=>new j(...t,"oklab"),oe.format.oklab=_r,oe.autodetect.push({p:3,test:(...t)=>{if(t=ie(t,"oklab"),re(t)==="array"&&t.length===3)return"oklab"}});const Pl=(...t)=>{t=ie(t,"lch");const[e,s,n]=t,[o,a,r]=nr(e,s,n),[i,c,_]=_r(o,a,r);return[i,c,_,t.length>3?t[3]:1]},Fl=(...t)=>{const[e,s,n]=ie(t,"rgb"),[o,a,r]=dr(e,s,n);return ar(o,a,r)};j.prototype.oklch=function(){return Fl(this._rgb)},Z.oklch=(...t)=>new j(...t,"oklch"),oe.format.oklch=Pl,oe.autodetect.push({p:3,test:(...t)=>{if(t=ie(t,"oklch"),re(t)==="array"&&t.length===3)return"oklch"}}),j.prototype.alpha=function(t,e=!1){return t!==void 0&&re(t)==="number"?e?(this._rgb[3]=t,this):new j([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},j.prototype.clipped=function(){return this._rgb._clipped||!1},j.prototype.darken=function(t=1){const e=this,s=e.lab();return s[0]-=xe.Kn*t,new j(s,"lab").alpha(e.alpha(),!0)},j.prototype.brighten=function(t=1){return this.darken(-t)},j.prototype.darker=j.prototype.darken,j.prototype.brighter=j.prototype.brighten,j.prototype.get=function(t){const[e,s]=t.split("."),n=this[e]();if(s){const o=e.indexOf(s)-(e.substr(0,2)==="ok"?2:0);if(o>-1)return n[o];throw new Error(`unknown channel ${s} in mode ${e}`)}else return n};const{pow:jl}=Math,Ul=1e-7,Bl=20;j.prototype.luminance=function(t,e="rgb"){if(t!==void 0&&re(t)==="number"){if(t===0)return new j([0,0,0,this._rgb[3]],"rgb");if(t===1)return new j([255,255,255,this._rgb[3]],"rgb");let s=this.luminance(),n=Bl;const o=(r,i)=>{const c=r.interpolate(i,.5,e),_=c.luminance();return Math.abs(t-_)<Ul||!n--?c:_>t?o(r,c):o(c,i)},a=(s>t?o(new j([0,0,0]),this):o(this,new j([255,255,255]))).rgb();return new j([...a,this._rgb[3]])}return Gl(...this._rgb.slice(0,3))};const Gl=(t,e,s)=>(t=Wt(t),e=Wt(e),s=Wt(s),.2126*t+.7152*e+.0722*s),Wt=t=>(t/=255,t<=.03928?t/12.92:jl((t+.055)/1.055,2.4)),Oe={},lt=(t,e,s=.5,...n)=>{let o=n[0]||"lrgb";if(!Oe[o]&&!n.length&&(o=Object.keys(Oe)[0]),!Oe[o])throw new Error(`interpolation mode ${o} is not defined`);return re(t)!=="object"&&(t=new j(t)),re(e)!=="object"&&(e=new j(e)),Oe[o](t,e,s).alpha(t.alpha()+s*(e.alpha()-t.alpha()))};j.prototype.mix=j.prototype.interpolate=function(t,e=.5,...s){return lt(this,t,e,...s)},j.prototype.premultiply=function(t=!1){const e=this._rgb,s=e[3];return t?(this._rgb=[e[0]*s,e[1]*s,e[2]*s,s],this):new j([e[0]*s,e[1]*s,e[2]*s,s],"rgb")},j.prototype.saturate=function(t=1){const e=this,s=e.lch();return s[1]+=xe.Kn*t,s[1]<0&&(s[1]=0),new j(s,"lch").alpha(e.alpha(),!0)},j.prototype.desaturate=function(t=1){return this.saturate(-t)},j.prototype.set=function(t,e,s=!1){const[n,o]=t.split("."),a=this[n]();if(o){const r=n.indexOf(o)-(n.substr(0,2)==="ok"?2:0);if(r>-1){if(re(e)=="string")switch(e.charAt(0)){case"+":a[r]+=+e;break;case"-":a[r]+=+e;break;case"*":a[r]*=+e.substr(1);break;case"/":a[r]/=+e.substr(1);break;default:a[r]=+e}else if(re(e)==="number")a[r]=e;else throw new Error("unsupported value for Color.set");const i=new j(a,n);return s?(this._rgb=i._rgb,this):i}throw new Error(`unknown channel ${o} in mode ${n}`)}else return a},j.prototype.tint=function(t=.5,...e){return lt(this,"white",t,...e)},j.prototype.shade=function(t=.5,...e){return lt(this,"black",t,...e)};const Yl=(t,e,s)=>{const n=t._rgb,o=e._rgb;return new j(n[0]+s*(o[0]-n[0]),n[1]+s*(o[1]-n[1]),n[2]+s*(o[2]-n[2]),"rgb")};Oe.rgb=Yl;const{sqrt:$t,pow:ot}=Math,ql=(t,e,s)=>{const[n,o,a]=t._rgb,[r,i,c]=e._rgb;return new j($t(ot(n,2)*(1-s)+ot(r,2)*s),$t(ot(o,2)*(1-s)+ot(i,2)*s),$t(ot(a,2)*(1-s)+ot(c,2)*s),"rgb")};Oe.lrgb=ql;const Hl=(t,e,s)=>{const n=t.lab(),o=e.lab();return new j(n[0]+s*(o[0]-n[0]),n[1]+s*(o[1]-n[1]),n[2]+s*(o[2]-n[2]),"lab")};Oe.lab=Hl;const at=(t,e,s,n)=>{let o,a;n==="hsl"?(o=t.hsl(),a=e.hsl()):n==="hsv"?(o=t.hsv(),a=e.hsv()):n==="hcg"?(o=t.hcg(),a=e.hcg()):n==="hsi"?(o=t.hsi(),a=e.hsi()):n==="lch"||n==="hcl"?(n="hcl",o=t.hcl(),a=e.hcl()):n==="oklch"&&(o=t.oklch().reverse(),a=e.oklch().reverse());let r,i,c,_,d,l;(n.substr(0,1)==="h"||n==="oklch")&&([r,c,d]=o,[i,_,l]=a);let g,m,h,S;return!isNaN(r)&&!isNaN(i)?(i>r&&i-r>180?S=i-(r+360):i<r&&r-i>180?S=i+360-r:S=i-r,m=r+s*S):isNaN(r)?isNaN(i)?m=Number.NaN:(m=i,(d==1||d==0)&&n!="hsv"&&(g=_)):(m=r,(l==1||l==0)&&n!="hsv"&&(g=c)),g===void 0&&(g=c+s*(_-c)),h=d+s*(l-d),n==="oklch"?new j([h,g,m],n):new j([m,g,h],n)},lr=(t,e,s)=>at(t,e,s,"lch");Oe.lch=lr,Oe.hcl=lr;const zl=(t,e,s)=>{const n=t.num(),o=e.num();return new j(n+s*(o-n),"num")};Oe.num=zl;const Vl=(t,e,s)=>at(t,e,s,"hcg");Oe.hcg=Vl;const Wl=(t,e,s)=>at(t,e,s,"hsi");Oe.hsi=Wl;const $l=(t,e,s)=>at(t,e,s,"hsl");Oe.hsl=$l;const Kl=(t,e,s)=>at(t,e,s,"hsv");Oe.hsv=Kl;const Ql=(t,e,s)=>{const n=t.oklab(),o=e.oklab();return new j(n[0]+s*(o[0]-n[0]),n[1]+s*(o[1]-n[1]),n[2]+s*(o[2]-n[2]),"oklab")};Oe.oklab=Ql;const Xl=(t,e,s)=>at(t,e,s,"oklch");Oe.oklch=Xl;const{pow:Kt,sqrt:Qt,PI:Xt,cos:gr,sin:mr,atan2:Zl}=Math,Jl=(t,e="lrgb",s=null)=>{const n=t.length;s||(s=Array.from(new Array(n)).map(()=>1));const o=n/s.reduce(function(l,g){return l+g});if(s.forEach((l,g)=>{s[g]*=o}),t=t.map(l=>new j(l)),e==="lrgb")return eg(t,s);const a=t.shift(),r=a.get(e),i=[];let c=0,_=0;for(let l=0;l<r.length;l++)if(r[l]=(r[l]||0)*s[0],i.push(isNaN(r[l])?0:s[0]),e.charAt(l)==="h"&&!isNaN(r[l])){const g=r[l]/180*Xt;c+=gr(g)*s[0],_+=mr(g)*s[0]}let d=a.alpha()*s[0];t.forEach((l,g)=>{const m=l.get(e);d+=l.alpha()*s[g+1];for(let h=0;h<r.length;h++)if(!isNaN(m[h]))if(i[h]+=s[g+1],e.charAt(h)==="h"){const S=m[h]/180*Xt;c+=gr(S)*s[g+1],_+=mr(S)*s[g+1]}else r[h]+=m[h]*s[g+1]});for(let l=0;l<r.length;l++)if(e.charAt(l)==="h"){let g=Zl(_/i[l],c/i[l])/Xt*180;for(;g<0;)g+=360;for(;g>=360;)g-=360;r[l]=g}else r[l]=r[l]/i[l];return d/=n,new j(r,e).alpha(d>.99999?1:d,!0)},eg=(t,e)=>{const s=t.length,n=[0,0,0,0];for(let o=0;o<t.length;o++){const a=t[o],r=e[o]/s,i=a._rgb;n[0]+=Kt(i[0],2)*r,n[1]+=Kt(i[1],2)*r,n[2]+=Kt(i[2],2)*r,n[3]+=i[3]*r}return n[0]=Qt(n[0]),n[1]=Qt(n[1]),n[2]=Qt(n[2]),n[3]>.9999999&&(n[3]=1),new j(At(n))},{pow:tg}=Math;function bt(t){let e="rgb",s=Z("#ccc"),n=0,o=[0,1],a=[],r=[0,0],i=!1,c=[],_=!1,d=0,l=1,g=!1,m={},h=!0,S=1;const b=function(T){if(T=T||["#fff","#000"],T&&re(T)==="string"&&Z.brewer&&Z.brewer[T.toLowerCase()]&&(T=Z.brewer[T.toLowerCase()]),re(T)==="array"){T.length===1&&(T=[T[0],T[0]]),T=T.slice(0);for(let w=0;w<T.length;w++)T[w]=Z(T[w]);a.length=0;for(let w=0;w<T.length;w++)a.push(w/(T.length-1))}return P(),c=T},y=function(T){if(i!=null){const w=i.length-1;let x=0;for(;x<w&&T>=i[x];)x++;return x-1}return 0};let N=T=>T,k=T=>T;const M=function(T,w){let x,B;if(w==null&&(w=!1),isNaN(T)||T===null)return s;w?B=T:i&&i.length>2?B=y(T)/(i.length-2):l!==d?B=(T-d)/(l-d):B=1,B=k(B),w||(B=N(B)),S!==1&&(B=tg(B,S)),B=r[0]+B*(1-r[0]-r[1]),B=tt(B,0,1);const L=Math.floor(B*1e4);if(h&&m[L])x=m[L];else{if(re(c)==="array")for(let $=0;$<a.length;$++){const J=a[$];if(B<=J){x=c[$];break}if(B>=J&&$===a.length-1){x=c[$];break}if(B>J&&B<a[$+1]){B=(B-J)/(a[$+1]-J),x=Z.interpolate(c[$],c[$+1],B,e);break}}else re(c)==="function"&&(x=c(B));h&&(m[L]=x)}return x};var P=()=>m={};b(t);const D=function(T){const w=Z(M(T));return _&&w[_]?w[_]():w};return D.classes=function(T){if(T!=null){if(re(T)==="array")i=T,o=[T[0],T[T.length-1]];else{const w=Z.analyze(o);T===0?i=[w.min,w.max]:i=Z.limits(w,"e",T)}return D}return i},D.domain=function(T){if(!arguments.length)return o;d=T[0],l=T[T.length-1],a=[];const w=c.length;if(T.length===w&&d!==l)for(let x of Array.from(T))a.push((x-d)/(l-d));else{for(let x=0;x<w;x++)a.push(x/(w-1));if(T.length>2){const x=T.map((L,$)=>$/(T.length-1)),B=T.map(L=>(L-d)/(l-d));B.every((L,$)=>x[$]===L)||(k=L=>{if(L<=0||L>=1)return L;let $=0;for(;L>=B[$+1];)$++;const J=(L-B[$])/(B[$+1]-B[$]);return x[$]+J*(x[$+1]-x[$])})}}return o=[d,l],D},D.mode=function(T){return arguments.length?(e=T,P(),D):e},D.range=function(T,w){return b(T),D},D.out=function(T){return _=T,D},D.spread=function(T){return arguments.length?(n=T,D):n},D.correctLightness=function(T){return T==null&&(T=!0),g=T,P(),g?N=function(w){const x=M(0,!0).lab()[0],B=M(1,!0).lab()[0],L=x>B;let $=M(w,!0).lab()[0];const J=x+(B-x)*w;let le=$-J,se=0,pe=1,I=20;for(;Math.abs(le)>.01&&I-- >0;)(function(){return L&&(le*=-1),le<0?(se=w,w+=(pe-w)*.5):(pe=w,w+=(se-w)*.5),$=M(w,!0).lab()[0],le=$-J})();return w}:N=w=>w,D},D.padding=function(T){return T!=null?(re(T)==="number"&&(T=[T,T]),r=T,D):r},D.colors=function(T,w){arguments.length<2&&(w="hex");let x=[];if(arguments.length===0)x=c.slice(0);else if(T===1)x=[D(.5)];else if(T>1){const B=o[0],L=o[1]-B;x=sg(0,T).map($=>D(B+$/(T-1)*L))}else{t=[];let B=[];if(i&&i.length>2)for(let L=1,$=i.length,J=1<=$;J?L<$:L>$;J?L++:L--)B.push((i[L-1]+i[L])*.5);else B=o;x=B.map(L=>D(L))}return Z[w]&&(x=x.map(B=>B[w]())),x},D.cache=function(T){return T!=null?(h=T,D):h},D.gamma=function(T){return T!=null?(S=T,D):S},D.nodata=function(T){return T!=null?(s=Z(T),D):s},D}function sg(t,e,s){let n=[],o=t<e,a=e;for(let r=t;o?r<a:r>a;o?r++:r--)n.push(r);return n}const ng=function(t){let e=[1,1];for(let s=1;s<t;s++){let n=[1];for(let o=1;o<=e.length;o++)n[o]=(e[o]||0)+e[o-1];e=n}return e},og=function(t){let e,s,n,o;if(t=t.map(a=>new j(a)),t.length===2)[s,n]=t.map(a=>a.lab()),e=function(a){const r=[0,1,2].map(i=>s[i]+a*(n[i]-s[i]));return new j(r,"lab")};else if(t.length===3)[s,n,o]=t.map(a=>a.lab()),e=function(a){const r=[0,1,2].map(i=>(1-a)*(1-a)*s[i]+2*(1-a)*a*n[i]+a*a*o[i]);return new j(r,"lab")};else if(t.length===4){let a;[s,n,o,a]=t.map(r=>r.lab()),e=function(r){const i=[0,1,2].map(c=>(1-r)*(1-r)*(1-r)*s[c]+3*(1-r)*(1-r)*r*n[c]+3*(1-r)*r*r*o[c]+r*r*r*a[c]);return new j(i,"lab")}}else if(t.length>=5){let a,r,i;a=t.map(c=>c.lab()),i=t.length-1,r=ng(i),e=function(c){const _=1-c,d=[0,1,2].map(l=>a.reduce((g,m,h)=>g+r[h]*_**(i-h)*c**h*m[l],0));return new j(d,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},ag=t=>{const e=og(t);return e.scale=()=>bt(e),e},Be=(t,e,s)=>{if(!Be[s])throw new Error("unknown blend mode "+s);return Be[s](t,e)},We=t=>(e,s)=>{const n=Z(s).rgb(),o=Z(e).rgb();return Z.rgb(t(n,o))},$e=t=>(e,s)=>{const n=[];return n[0]=t(e[0],s[0]),n[1]=t(e[1],s[1]),n[2]=t(e[2],s[2]),n},rg=t=>t,ig=(t,e)=>t*e/255,cg=(t,e)=>t>e?e:t,_g=(t,e)=>t>e?t:e,dg=(t,e)=>255*(1-(1-t/255)*(1-e/255)),lg=(t,e)=>e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255)),gg=(t,e)=>255*(1-(1-e/255)/(t/255)),mg=(t,e)=>t===255?255:(t=255*(e/255)/(1-t/255),t>255?255:t);Be.normal=We($e(rg)),Be.multiply=We($e(ig)),Be.screen=We($e(dg)),Be.overlay=We($e(lg)),Be.darken=We($e(cg)),Be.lighten=We($e(_g)),Be.dodge=We($e(mg)),Be.burn=We($e(gg));const{pow:pg,sin:ug,cos:hg}=Math;function Eg(t=300,e=-1.5,s=1,n=1,o=[0,1]){let a=0,r;re(o)==="array"?r=o[1]-o[0]:(r=0,o=[o,o]);const i=function(c){const _=qe*((t+120)/360+e*c),d=pg(o[0]+r*c,n),g=(a!==0?s[0]+c*a:s)*d*(1-d)/2,m=hg(_),h=ug(_),S=d+g*(-.14861*m+1.78277*h),b=d+g*(-.29227*m-.90649*h),y=d+g*(1.97294*m);return Z(At([S*255,b*255,y*255,1]))};return i.start=function(c){return c==null?t:(t=c,i)},i.rotations=function(c){return c==null?e:(e=c,i)},i.gamma=function(c){return c==null?n:(n=c,i)},i.hue=function(c){return c==null?s:(s=c,re(s)==="array"?(a=s[1]-s[0],a===0&&(s=s[1])):a=0,i)},i.lightness=function(c){return c==null?o:(re(c)==="array"?(o=c,r=c[1]-c[0]):(o=[c,c],r=0),i)},i.scale=()=>Z.scale(i),i.hue(s),i}const fg="0123456789abcdef",{floor:bg,random:Sg}=Math,yg=()=>{let t="#";for(let e=0;e<6;e++)t+=fg.charAt(bg(Sg()*16));return new j(t,"hex")},{log:pr,pow:vg,floor:Tg,abs:Cg}=Math;function ur(t,e=null){const s={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return re(t)==="object"&&(t=Object.values(t)),t.forEach(n=>{e&&re(n)==="object"&&(n=n[e]),n!=null&&!isNaN(n)&&(s.values.push(n),s.sum+=n,n<s.min&&(s.min=n),n>s.max&&(s.max=n),s.count+=1)}),s.domain=[s.min,s.max],s.limits=(n,o)=>hr(s,n,o),s}function hr(t,e="equal",s=7){re(t)=="array"&&(t=ur(t));const{min:n,max:o}=t,a=t.values.sort((i,c)=>i-c);if(s===1)return[n,o];const r=[];if(e.substr(0,1)==="c"&&(r.push(n),r.push(o)),e.substr(0,1)==="e"){r.push(n);for(let i=1;i<s;i++)r.push(n+i/s*(o-n));r.push(o)}else if(e.substr(0,1)==="l"){if(n<=0)throw new Error("Logarithmic scales are only possible for values > 0");const i=Math.LOG10E*pr(n),c=Math.LOG10E*pr(o);r.push(n);for(let _=1;_<s;_++)r.push(vg(10,i+_/s*(c-i)));r.push(o)}else if(e.substr(0,1)==="q"){r.push(n);for(let i=1;i<s;i++){const c=(a.length-1)*i/s,_=Tg(c);if(_===c)r.push(a[_]);else{const d=c-_;r.push(a[_]*(1-d)+a[_+1]*d)}}r.push(o)}else if(e.substr(0,1)==="k"){let i;const c=a.length,_=new Array(c),d=new Array(s);let l=!0,g=0,m=null;m=[],m.push(n);for(let b=1;b<s;b++)m.push(n+b/s*(o-n));for(m.push(o);l;){for(let y=0;y<s;y++)d[y]=0;for(let y=0;y<c;y++){const N=a[y];let k=Number.MAX_VALUE,M;for(let P=0;P<s;P++){const D=Cg(m[P]-N);D<k&&(k=D,M=P),d[M]++,_[y]=M}}const b=new Array(s);for(let y=0;y<s;y++)b[y]=null;for(let y=0;y<c;y++)i=_[y],b[i]===null?b[i]=a[y]:b[i]+=a[y];for(let y=0;y<s;y++)b[y]*=1/d[y];l=!1;for(let y=0;y<s;y++)if(b[y]!==m[y]){l=!0;break}m=b,g++,g>200&&(l=!1)}const h={};for(let b=0;b<s;b++)h[b]=[];for(let b=0;b<c;b++)i=_[b],h[i].push(a[b]);let S=[];for(let b=0;b<s;b++)S.push(h[b][0]),S.push(h[b][h[b].length-1]);S=S.sort((b,y)=>b-y),r.push(S[0]);for(let b=1;b<S.length;b+=2){const y=S[b];!isNaN(y)&&r.indexOf(y)===-1&&r.push(y)}}return r}const wg=(t,e)=>{t=new j(t),e=new j(e);const s=t.luminance(),n=e.luminance();return s>n?(s+.05)/(n+.05):(n+.05)/(s+.05)},{sqrt:He,pow:Re,min:Rg,max:Dg,atan2:Er,abs:fr,cos:St,sin:br,exp:Ng,PI:Sr}=Math;function Og(t,e,s=1,n=1,o=1){var a=function(fe){return 360*fe/(2*Sr)},r=function(fe){return 2*Sr*fe/360};t=new j(t),e=new j(e);const[i,c,_]=Array.from(t.lab()),[d,l,g]=Array.from(e.lab()),m=(i+d)/2,h=He(Re(c,2)+Re(_,2)),S=He(Re(l,2)+Re(g,2)),b=(h+S)/2,y=.5*(1-He(Re(b,7)/(Re(b,7)+Re(25,7)))),N=c*(1+y),k=l*(1+y),M=He(Re(N,2)+Re(_,2)),P=He(Re(k,2)+Re(g,2)),D=(M+P)/2,T=a(Er(_,N)),w=a(Er(g,k)),x=T>=0?T:T+360,B=w>=0?w:w+360,L=fr(x-B)>180?(x+B+360)/2:(x+B)/2,$=1-.17*St(r(L-30))+.24*St(r(2*L))+.32*St(r(3*L+6))-.2*St(r(4*L-63));let J=B-x;J=fr(J)<=180?J:B<=x?J+360:J-360,J=2*He(M*P)*br(r(J)/2);const le=d-i,se=P-M,pe=1+.015*Re(m-50,2)/He(20+Re(m-50,2)),I=1+.045*D,q=1+.015*D*$,X=30*Ng(-Re((L-275)/25,2)),de=-(2*He(Re(D,7)/(Re(D,7)+Re(25,7))))*br(2*r(X)),be=He(Re(le/(s*pe),2)+Re(se/(n*I),2)+Re(J/(o*q),2)+de*(se/(n*I))*(J/(o*q)));return Dg(0,Rg(100,be))}function Ig(t,e,s="lab"){t=new j(t),e=new j(e);const n=t.get(s),o=e.get(s);let a=0;for(let r in n){const i=(n[r]||0)-(o[r]||0);a+=i*i}return Math.sqrt(a)}const Ag=(...t)=>{try{return new j(...t),!0}catch{return!1}},kg={cool(){return bt([Z.hsl(180,1,.9),Z.hsl(250,.7,.4)])},hot(){return bt(["#000","#f00","#ff0","#fff"]).mode("rgb")}},yt={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};for(let t of Object.keys(yt))yt[t.toLowerCase()]=yt[t];Object.assign(Z,{average:Jl,bezier:ag,blend:Be,cubehelix:Eg,mix:lt,interpolate:lt,random:yg,scale:bt,analyze:ur,contrast:wg,deltaE:Og,distance:Ig,limits:hr,valid:Ag,scales:kg,input:oe,colors:nt,brewer:yt});function rt(t){if(!t.themeColors)return{primaryColor:"var(--background-secondary-alt)",secondaryColor:"var(--background-secondary-alt)",overlayColor:"rgba(0, 0, 0, 0)",buttonColor:"var(--button-secondary-background)",backgroundColor:"var(--background-floating)",dividerColor:"var(--background-modifier-accent)",roleBackgroundColor:"var(--background-secondary-alt)",roleBorderColor:"var(--interactive-normal)"};function e(r,i=1){return`hsla(${r[0].toFixed(0)}, ${(r[1]*100).toFixed(1)}%, ${(r[2]*100).toFixed(1)}%, ${i})`}const s=U.ColorUtils.getDarkness(t.themeColors.primary)>.5?"dark":"light",n=Mg(t.themeColors.primary,"#FFFFFF"),o=s==="dark"?.24:.12,a=s==="dark"?[0,0,100]:n;return{primaryColor:e(Z(U.ColorUtils.intToHex(t.themeColors.primary)).hsl()),secondaryColor:e(Z(t.themeColors.secondary).hsl()),overlayColor:s==="dark"?"hsla(0,0%,0%,0.6)":"hsla(0,0%,100%,0.6)",backgroundColor:s==="dark"?"hsla(0,0%,0%,0.45)":"hsla(0,0%,100%,0.45)",buttonColor:e(n),dividerColor:e(a,o),themeOverwrite:s,roleBackgroundColor:s==="dark"?"hsl(var(--primary-660-hsl) / .5)":"hsl(var(--white-500-hsl) / .5)",roleBorderColor:s==="dark"?"hsl(var(--white-500-hsl) / .2)":"hsl(var(--primary-660-hsl) / .2)",...xg({primaryColor:t.themeColors.primary,secondaryColor:t.themeColors.secondary,isDarkTheme:s==="dark"})}}function Mg(t,e){const o=Z(e).luminance();let a=Z(t),r=Z.contrast(Z(e),a);for(let i=0;i<100;i++){const c=r<7,_=r>10;if(!c&&!_)break;const d=a.luminance()>o;_&&d||c&&!d?a=a.darken():a=a.brighten(),r=Z.contrast(Z(e),a)}return a.hsl()}function xg(t){const{primaryColor:e,secondaryColor:s,isDarkTheme:n}=t,o=Z(e),a=Z(s),[r,i]=o.luminance()>a.luminance()?[o,a]:[a,o],c=n?r.set("lch.l",98).set("lch.c",15):i.set("lch.l",10),_=n?i.set("hsl.s",1).set("hsl.l",.05):r.set("hsl.s",1).set("hsl.l",.94),[d,l,g]=_.hsl();return{themeMixBaseHsl:`${Number.isNaN(d)?0:d} ${100*l}% ${100*g}%`,themeMixBase:_.css(),themeMixText:c.css(),themeMixAmountBase:"30%",themeMixAmountText:"70%"}}var Lg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var yr={exports:{}};(function(t,e){(function(s,n){t.exports=n()})(Lg,function(){var s=/\r\n?/g,n=/\t/g,o=/\f/g,a=function(p){return p.replace(s,`
`).replace(o,"").replace(n," ")},r=function(p,E){var u=p||{};if(E!=null)for(var A in E)Object.prototype.hasOwnProperty.call(E,A)&&(u[A]=E[A]);return u},i=function(p,E){var u=Object.keys(p).filter(function(K){var C=p[K];if(C==null||C.match==null)return!1;var F=C.order;return(typeof F!="number"||!isFinite(F))&&typeof console<"u"&&console.warn("simple-markdown: Invalid order for rule `"+K+"`: "+String(F)),!0});u.sort(function(K,C){var F=p[K],z=p[C],V=F.order,ae=z.order;if(V!==ae)return V-ae;var me=F.quality?0:1,ve=z.quality?0:1;return me!==ve?me-ve:K<C?-1:K>C?1:0});var A,W=function(K,C){var F=[];for(C=C||A,A=C;K;){var z=null,V=null,ae=null,me=NaN,ve=0,Ce=u[0],Te=p[Ce];do{var Pe=Te.order,Le=C.prevCapture==null?"":C.prevCapture[0],_e=Te.match(K,C,Le);if(_e){var Ge=Te.quality?Te.quality(_e,C,Le):0;Ge<=me||(z=Ce,V=Te,ae=_e,me=Ge)}ve++,Ce=u[ve],Te=p[Ce]}while(Te&&(!ae||Te.order===Pe&&Te.quality));if(V==null||ae==null)throw new Error("Could not find a matching rule for the below content. The rule with highest `order` should always match content provided to it. Check the definition of `match` for '"+u[u.length-1]+`'. It seems to not match the following source:
`+K);if(ae.index)throw new Error("`match` must return a capture starting at index 0 (the current parse index). Did you forget a ^ at the start of the RegExp?");var Ie=V.parse(ae,W,C);Array.isArray(Ie)?Array.prototype.push.apply(F,Ie):(Ie.type==null&&(Ie.type=z),F.push(Ie)),C.prevCapture=ae,K=K.substring(C.prevCapture[0].length)}return F},Q=function(K,C){return A=r(C,E),!A.inline&&!A.disableAutoBlockNewlines&&(K=K+`
`),A.prevCapture=null,W(a(K),A)};return Q},c=function(p){var E=function(u,A){return A.inline?p.exec(u):null};return E.regex=p,E},_=function(p){var E=function(u,A){return A.inline?null:p.exec(u)};return E.regex=p,E},d=function(p){var E=function(u,A){return p.exec(u)};return E.regex=p,E},l=typeof Symbol=="function"&&Symbol.for&&Symbol.for("react.element")||60103,g=function(p,E,u){var A={$$typeof:l,type:p,key:E??void 0,ref:null,props:u,_owner:null};return A},m=function(p,E,u,A){u=u||{},A=typeof A<"u"?A:!0;var W="";for(var Q in u){var K=u[Q];Object.prototype.hasOwnProperty.call(u,Q)&&K&&(W+=" "+N(Q)+'="'+N(K)+'"')}var C="<"+p+W+">";return A?C+E+"</"+p+">":C},h={},S=function(p){if(p==null)return null;try{var E=decodeURIComponent(p).replace(/[^A-Za-z0-9/:]/g,"").toLowerCase();if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}catch{return null}return p},b=/[<>&"']/g,y={"<":"<",">":">","&":"&",'"':""","'":"'","/":"/","`":"`"},N=function(p){return String(p).replace(b,function(E){return y[E]})},k=/\\([^0-9A-Za-z\s])/g,M=function(p){return p.replace(k,"$1")},P=function(p,E,u){var A=u.inline||!1;u.inline=!0;var W=p(E,u);return u.inline=A,W},D=function(p,E,u){var A=u.inline||!1;u.inline=!1;var W=p(E+`
`,u);return u.inline=A,W},T=function(p,E,u){return{content:P(E,p[1],u)}},w=function(){return{}},x="(?:[*+-]|\\d+\\.)",B="( *)("+x+") +",L=new RegExp("^"+B),$=new RegExp(B+"[^\\n]*(?:\\n(?!\\1"+x+` )[^\\n]*)*(
|$)`,"gm"),J=/\n{2,}$/,le=/^ (?= *`)|(` *) $/g,se=J,pe=/ *\n+$/,I=new RegExp("^( *)("+x+`) [\\s\\S]+?(?:
{2,}(?! )(?!\\1`+x+` )\\n*|\\s*
*$)`),q=/(?:^|\n)( *)$/,X=function(){var p=/^ *\| *| *\| *$/g,E=/ *$/,u=/^ *-+: *$/,A=/^ *:-+: *$/,W=/^ *:-+ *$/,Q=function(V){return u.test(V)?"right":A.test(V)?"center":W.test(V)?"left":null},K=function(V,ae,me,ve){ve&&(V=V.replace(p,""));var Ce=V.trim().split("|");return Ce.map(Q)},C=function(V,ae,me,ve){var Ce=me.inTable;me.inTable=!0;var Te=ae(V.trim(),me);me.inTable=Ce;var Pe=[[]];return Te.forEach(function(Le,_e){Le.type==="tableSeparator"?(!ve||_e!==0&&_e!==Te.length-1)&&Pe.push([]):(Le.type==="text"&&(Te[_e+1]==null||Te[_e+1].type==="tableSeparator")&&(Le.content=Le.content.replace(E,"")),Pe[Pe.length-1].push(Le))}),Pe},F=function(V,ae,me,ve){var Ce=V.trim().split(`
`);return Ce.map(function(Te){return C(Te,ae,me,ve)})},z=function(V){return function(ae,me,ve){ve.inline=!0;var Ce=C(ae[1],me,ve,V),Te=K(ae[2],me,ve,V),Pe=F(ae[3],me,ve,V);return ve.inline=!1,{type:"table",header:Ce,align:Te,cells:Pe}}};return{parseTable:z(!0),parseNpTable:z(!1),TABLE_REGEX:/^ *(\|.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/,NPTABLE_REGEX:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/}}(),ne="(?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*",de=`\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*`,be=/mailto:/i,fe=function(p,E,u){var A=(p[2]||p[1]).replace(/\s+/g," ").toLowerCase();if(E._defs&&E._defs[A]){var W=E._defs[A];u.target=W.target,u.title=W.title}return E._refs=E._refs||{},E._refs[A]=E._refs[A]||[],E._refs[A].push(u),u},ee=0,ce={Array:{react:function(p,E,u){for(var A=u.key,W=[],Q=0,K=0;Q<p.length;Q++,K++){u.key=""+Q;var C=p[Q];if(C.type==="text")for(C={type:"text",content:C.content};Q+1<p.length&&p[Q+1].type==="text";Q++)C.content+=p[Q+1].content;W.push(E(C,u))}return u.key=A,W},html:function(p,E,u){for(var A="",W=0;W<p.length;W++){var Q=p[W];if(Q.type==="text")for(Q={type:"text",content:Q.content};W+1<p.length&&p[W+1].type==="text";W++)Q.content+=p[W+1].content;A+=E(Q,u)}return A}},heading:{order:ee++,match:_(/^ *(#{1,6})([^\n]+?)#* *(?:\n *)+\n/),parse:function(p,E,u){return{level:p[1].length,content:P(E,p[2].trim(),u)}},react:function(p,E,u){return g("h"+p.level,u.key,{children:E(p.content,u)})},html:function(p,E,u){return m("h"+p.level,E(p.content,u))}},nptable:{order:ee++,match:_(X.NPTABLE_REGEX),parse:X.parseNpTable,react:null,html:null},lheading:{order:ee++,match:_(/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/),parse:function(p,E,u){return{type:"heading",level:p[2]==="="?1:2,content:P(E,p[1],u)}},react:null,html:null},hr:{order:ee++,match:_(/^( *[-*_]){3,} *(?:\n *)+\n/),parse:w,react:function(p,E,u){return g("hr",u.key,h)},html:function(p,E,u){return"<hr>"}},codeBlock:{order:ee++,match:_(/^(?: [^\n]+\n*)+(?:\n *)+\n/),parse:function(p,E,u){var A=p[0].replace(/^ /gm,"").replace(/\n+$/,"");return{lang:void 0,content:A}},react:function(p,E,u){var A=p.lang?"markdown-code-"+p.lang:void 0;return g("pre",u.key,{children:g("code",null,{className:A,children:p.content})})},html:function(p,E,u){var A=p.lang?"markdown-code-"+p.lang:void 0,W=m("code",N(p.content),{class:A});return m("pre",W)}},fence:{order:ee++,match:_(/^ *(`{3,}|~{3,}) *(?:(\S+) *)?\n([\s\S]+?)\n?\1 *(?:\n *)+\n/),parse:function(p,E,u){return{type:"codeBlock",lang:p[2]||void 0,content:p[3]}},react:null,html:null},blockQuote:{order:ee++,match:_(/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/),parse:function(p,E,u){var A=p[0].replace(/^ *> ?/gm,"");return{content:E(A,u)}},react:function(p,E,u){return g("blockquote",u.key,{children:E(p.content,u)})},html:function(p,E,u){return m("blockquote",E(p.content,u))}},list:{order:ee++,match:function(p,E){var u=E.prevCapture==null?"":E.prevCapture[0],A=q.exec(u),W=E._list||!E.inline;return A&&W?(p=A[1]+p,I.exec(p)):null},parse:function(p,E,u){var A=p[2],W=A.length>1,Q=W?+A:void 0,K=p[0].replace(se,`
`).match($),C=!1,F=K.map(function(z,V){var ae=L.exec(z),me=ae?ae[0].length:0,ve=new RegExp("^ {1,"+me+"}","gm"),Ce=z.replace(ve,"").replace(L,""),Te=V===K.length-1,Pe=Ce.indexOf(`
`)!==-1,Le=Pe||Te&&C;C=Le;var _e=u.inline,Ge=u._list;u._list=!0;var Ie;Le?(u.inline=!1,Ie=Ce.replace(pe,`
`)):(u.inline=!0,Ie=Ce.replace(pe,""));var Ot=E(Ie,u);return u.inline=_e,u._list=Ge,Ot});return{ordered:W,start:Q,items:F}},react:function(p,E,u){var A=p.ordered?"ol":"ul";return g(A,u.key,{start:p.start,children:p.items.map(function(W,Q){return g("li",""+Q,{children:E(W,u)})})})},html:function(p,E,u){var A=p.items.map(function(K){return m("li",E(K,u))}).join(""),W=p.ordered?"ol":"ul",Q={start:p.start};return m(W,A,Q)}},def:{order:ee++,match:_(/^ *\[([^\]]+)\]: *<?([^\s>]*)>?(?: +["(]([^\n]+)[")])? *\n(?: *\n)*/),parse:function(p,E,u){var A=p[1].replace(/\s+/g," ").toLowerCase(),W=p[2],Q=p[3];return u._refs&&u._refs[A]&&u._refs[A].forEach(function(K){K.target=W,K.title=Q}),u._defs=u._defs||{},u._defs[A]={target:W,title:Q},{def:A,target:W,title:Q}},react:function(){return null},html:function(){return""}},table:{order:ee++,match:_(X.TABLE_REGEX),parse:X.parseTable,react:function(p,E,u){var A=function(K){return p.align[K]==null?{}:{textAlign:p.align[K]}},W=p.header.map(function(K,C){return g("th",""+C,{style:A(C),scope:"col",children:E(K,u)})}),Q=p.cells.map(function(K,C){return g("tr",""+C,{children:K.map(function(F,z){return g("td",""+z,{style:A(z),children:E(F,u)})})})});return g("table",u.key,{children:[g("thead","thead",{children:g("tr",null,{children:W})}),g("tbody","tbody",{children:Q})]})},html:function(p,E,u){var A=function(F){return p.align[F]==null?"":"text-align:"+p.align[F]+";"},W=p.header.map(function(F,z){return m("th",E(F,u),{style:A(z),scope:"col"})}).join(""),Q=p.cells.map(function(F){var z=F.map(function(V,ae){return m("td",E(V,u),{style:A(ae)})}).join("");return m("tr",z)}).join(""),K=m("thead",m("tr",W)),C=m("tbody",Q);return m("table",K+C)}},newline:{order:ee++,match:_(/^(?:\n *)*\n/),parse:w,react:function(p,E,u){return`
`},html:function(p,E,u){return`
`}},paragraph:{order:ee++,match:_(/^((?:[^\n]|\n(?! *\n))+)(?:\n *)+\n/),parse:T,react:function(p,E,u){return g("div",u.key,{className:"paragraph",children:E(p.content,u)})},html:function(p,E,u){var A={class:"paragraph"};return m("div",E(p.content,u),A)}},escape:{order:ee++,match:c(/^\\([^0-9A-Za-z\s])/),parse:function(p,E,u){return{type:"text",content:p[1]}},react:null,html:null},tableSeparator:{order:ee++,matc