UNPKG

@gdquest/codemirror-gd-exercise-theme

Version:

Light and dark themes and syntax highlight themes made for GDExercise.

3 lines (2 loc) 48.1 kB
"use strict";var Re=Object.create;var vt=Object.defineProperty;var Ee=Object.getOwnPropertyDescriptor;var Ae=Object.getOwnPropertyNames;var Me=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var r in t)vt(e,r,{get:t[r],enumerable:!0})},Qt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ae(t))!Le.call(e,s)&&s!==r&&vt(e,s,{get:()=>t[s],enumerable:!(n=Ee(t,s))||n.enumerable});return e};var Se=(e,t,r)=>(r=e!=null?Re(Me(e)):{},Qt(t||!e||!e.__esModule?vt(r,"default",{value:e,enumerable:!0}):r,e)),Te=e=>Qt(vt({},"__esModule",{value:!0}),e);var Ht=V((wr,ie)=>{"use strict";ie.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var le=V((xr,oe)=>{"use strict";oe.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var fe=V((Or,he)=>{"use strict";var Ge=le(),He=Array.prototype.concat,We=Array.prototype.slice,ae=he.exports=function(t){for(var r=[],n=0,s=t.length;n<s;n++){var i=t[n];Ge(i)?r=He.call(r,We.call(i)):r.push(i)}return r};ae.wrap=function(e){return function(){return e(ae(arguments))}}});var ge=V((vr,de)=>{"use strict";var bt=Ht(),yt=fe(),ue=Object.hasOwnProperty,ce=Object.create(null);for(It in bt)ue.call(bt,It)&&(ce[bt[It]]=It);var It,S=de.exports={to:{},get:{}};S.get=function(e){var t=e.substring(0,3).toLowerCase(),r,n;switch(t){case"hsl":r=S.get.hsl(e),n="hsl";break;case"hwb":r=S.get.hwb(e),n="hwb";break;default:r=S.get.rgb(e),n="rgb";break}return r?{model:n,value:r}:null};S.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^(\w+)$/,o=[0,0,0,1],l,a,u;if(l=e.match(r)){for(u=l[2],l=l[1],a=0;a<3;a++){var g=a*2;o[a]=parseInt(l.slice(g,g+2),16)}u&&(o[3]=parseInt(u,16)/255)}else if(l=e.match(t)){for(l=l[1],u=l[3],a=0;a<3;a++)o[a]=parseInt(l[a]+l[a],16);u&&(o[3]=parseInt(u+u,16)/255)}else if(l=e.match(n)){for(a=0;a<3;a++)o[a]=parseInt(l[a+1],0);l[4]&&(l[5]?o[3]=parseFloat(l[4])*.01:o[3]=parseFloat(l[4]))}else if(l=e.match(s)){for(a=0;a<3;a++)o[a]=Math.round(parseFloat(l[a+1])*2.55);l[4]&&(l[5]?o[3]=parseFloat(l[4])*.01:o[3]=parseFloat(l[4]))}else return(l=e.match(i))?l[1]==="transparent"?[0,0,0,0]:ue.call(bt,l[1])?(o=bt[l[1]],o[3]=1,o):null:null;for(a=0;a<3;a++)o[a]=J(o[a],0,255);return o[3]=J(o[3],0,1),o};S.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),s=(parseFloat(r[1])%360+360)%360,i=J(parseFloat(r[2]),0,100),o=J(parseFloat(r[3]),0,100),l=J(isNaN(n)?1:n,0,1);return[s,i,o,l]}return null};S.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),s=(parseFloat(r[1])%360+360)%360,i=J(parseFloat(r[2]),0,100),o=J(parseFloat(r[3]),0,100),l=J(isNaN(n)?1:n,0,1);return[s,i,o,l]}return null};S.to.hex=function(){var e=yt(arguments);return"#"+St(e[0])+St(e[1])+St(e[2])+(e[3]<1?St(Math.round(e[3]*255)):"")};S.to.rgb=function(){var e=yt(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};S.to.rgb.percent=function(){var e=yt(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};S.to.hsl=function(){var e=yt(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};S.to.hwb=function(){var e=yt(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};S.to.keyword=function(e){return ce[e.slice(0,3)]};function J(e,t,r){return Math.min(Math.max(t,e),r)}function St(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var Wt=V((kr,me)=>{"use strict";var wt=Ht(),pe={};for(let e of Object.keys(wt))pe[wt[e]]=e;var f={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};me.exports=f;for(let e of Object.keys(f)){if(!("channels"in f[e]))throw new Error("missing channels property: "+e);if(!("labels"in f[e]))throw new Error("missing channel labels property: "+e);if(f[e].labels.length!==f[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=f[e];delete f[e].channels,delete f[e].labels,Object.defineProperty(f[e],"channels",{value:t}),Object.defineProperty(f[e],"labels",{value:r})}f.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),i=Math.max(t,r,n),o=i-s,l,a;i===s?l=0:t===i?l=(r-n)/o:r===i?l=2+(n-t)/o:n===i&&(l=4+(t-r)/o),l=Math.min(l*60,360),l<0&&(l+=360);let u=(s+i)/2;return i===s?a=0:u<=.5?a=o/(i+s):a=o/(2-i-s),[l,a*100,u*100]};f.rgb.hsv=function(e){let t,r,n,s,i,o=e[0]/255,l=e[1]/255,a=e[2]/255,u=Math.max(o,l,a),g=u-Math.min(o,l,a),y=function(I){return(u-I)/6/g+1/2};return g===0?(s=0,i=0):(i=g/u,t=y(o),r=y(l),n=y(a),o===u?s=n-r:l===u?s=1/3+t-n:a===u&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,i*100,u*100]};f.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=f.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,i*100,n*100]};f.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),i=(1-t-s)/(1-s)||0,o=(1-r-s)/(1-s)||0,l=(1-n-s)/(1-s)||0;return[i*100,o*100,l*100,s*100]};function je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}f.rgb.keyword=function(e){let t=pe[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(wt)){let i=wt[s],o=je(e,i);o<r&&(r=o,n=s)}return n};f.keyword.rgb=function(e){return wt[e]};f.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,o=t*.0193+r*.1192+n*.9505;return[s*100,i*100,o*100]};f.rgb.lab=function(e){let t=f.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let i=116*n-16,o=500*(r-n),l=200*(n-s);return[i,o,l]};f.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,i,o;if(r===0)return o=n*255,[o,o,o];n<.5?s=n*(1+r):s=n+r-n*r;let l=2*n-s,a=[0,0,0];for(let u=0;u<3;u++)i=t+1/3*-(u-1),i<0&&i++,i>1&&i--,6*i<1?o=l+(s-l)*6*i:2*i<1?o=s:3*i<2?o=l+(s-l)*(2/3-i)*6:o=l,a[u]=o*255;return a};f.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=i<=1?i:2-i;let o=(n+r)/2,l=n===0?2*s/(i+s):2*r/(n+r);return[t,l*100,o*100]};f.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,i=t-Math.floor(t),o=255*n*(1-r),l=255*n*(1-r*i),a=255*n*(1-r*(1-i));switch(n*=255,s){case 0:return[n,a,o];case 1:return[l,n,o];case 2:return[o,n,a];case 3:return[o,l,n];case 4:return[a,o,n];case 5:return[n,o,l]}};f.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),i,o;o=(2-r)*n;let l=(2-r)*s;return i=r*s,i/=l<=1?l:2-l,i=i||0,o/=2,[t,i*100,o*100]};f.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,i;s>1&&(r/=s,n/=s);let o=Math.floor(6*t),l=1-n;i=6*t-o,o&1&&(i=1-i);let a=r+i*(l-r),u,g,y;switch(o){default:case 6:case 0:u=l,g=a,y=r;break;case 1:u=a,g=l,y=r;break;case 2:u=r,g=l,y=a;break;case 3:u=r,g=a,y=l;break;case 4:u=a,g=r,y=l;break;case 5:u=l,g=r,y=a;break}return[u*255,g*255,y*255]};f.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,i=1-Math.min(1,t*(1-s)+s),o=1-Math.min(1,r*(1-s)+s),l=1-Math.min(1,n*(1-s)+s);return[i*255,o*255,l*255]};f.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,i,o;return s=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,o=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[s*255,i*255,o*255]};f.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,i=500*(t-r),o=200*(r-n);return[s,i,o]};f.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,i,o;i=(t+16)/116,s=r/500+i,o=i-n/200;let l=i**3,a=s**3,u=o**3;return i=l>.008856?l:(i-16/116)/7.787,s=a>.008856?a:(s-16/116)/7.787,o=u>.008856?u:(o-16/116)/7.787,s*=95.047,i*=100,o*=108.883,[s,i,o]};f.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let o=Math.sqrt(r*r+n*n);return[t,o,s]};f.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s);return[t,i,o]};f.rgb.ansi16=function(e,t=null){let[r,n,s]=e,i=t===null?f.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let o=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(o+=60),o};f.hsv.ansi16=function(e){return f.rgb.ansi16(f.hsv.rgb(e),e[2])};f.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};f.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,s,i]};f.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return[r,n,s]};f.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};f.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(l=>l+l).join(""));let n=parseInt(r,16),s=n>>16&255,i=n>>8&255,o=n&255;return[s,i,o]};f.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),o=s-i,l,a;return o<1?l=i/(1-o):l=0,o<=0?a=0:s===t?a=(r-n)/o%6:s===r?a=2+(n-t)/o:a=4+(t-r)/o,a/=6,a%=1,[a*360,o*100,l*100]};f.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};f.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};f.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let s=[0,0,0],i=t%1*6,o=i%1,l=1-o,a=0;switch(Math.floor(i)){case 0:s[0]=1,s[1]=o,s[2]=0;break;case 1:s[0]=l,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=o;break;case 3:s[0]=0,s[1]=l,s[2]=1;break;case 4:s[0]=o,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=l}return a=(1-r)*n,[(r*s[0]+a)*255,(r*s[1]+a)*255,(r*s[2]+a)*255]};f.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};f.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};f.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};f.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,i=0;return s<1&&(i=(n-s)/(1-s)),[e[0],s*100,i*100]};f.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};f.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};f.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};f.gray.hsl=function(e){return[0,0,e[0]]};f.gray.hsv=f.gray.hsl;f.gray.hwb=function(e){return[0,100,e[0]]};f.gray.cmyk=function(e){return[0,0,0,e[0]]};f.gray.lab=function(e){return[e[0],0,0]};f.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};f.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var ye=V((Cr,be)=>{"use strict";var Tt=Wt();function Ye(){let e={},t=Object.keys(Tt);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function Ve(e){let t=Ye(),r=[e];for(t[e].distance=0;r.length;){let n=r.pop(),s=Object.keys(Tt[n]);for(let i=s.length,o=0;o<i;o++){let l=s[o],a=t[l];a.distance===-1&&(a.distance=t[n].distance+1,a.parent=n,r.unshift(l))}}return t}function $e(e,t){return function(r){return t(e(r))}}function Xe(e,t){let r=[t[e].parent,e],n=Tt[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),n=$e(Tt[t[s].parent][s],n),s=t[s].parent;return n.conversion=r,n}be.exports=function(e){let t=Ve(e),r={},n=Object.keys(t);for(let s=n.length,i=0;i<s;i++){let o=n[i];t[o].parent!==null&&(r[o]=Xe(o,t))}return r}});var xe=V((_r,we)=>{"use strict";var jt=Wt(),Je=ye(),ut={},Qe=Object.keys(jt);function Ze(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function tr(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let i=s.length,o=0;o<i;o++)s[o]=Math.round(s[o]);return s};return"conversion"in e&&(t.conversion=e.conversion),t}Qe.forEach(e=>{ut[e]={},Object.defineProperty(ut[e],"channels",{value:jt[e].channels}),Object.defineProperty(ut[e],"labels",{value:jt[e].labels});let t=Je(e);Object.keys(t).forEach(n=>{let s=t[n];ut[e][n]=tr(s),ut[e][n].raw=Ze(s)})});we.exports=ut});var ke=V((Nr,ve)=>{"use strict";var ct=ge(),T=xe(),Oe=["keyword","gray","hex"],Yt={};for(let e of Object.keys(T))Yt[[...T[e].labels].sort().join("")]=e;var Ft={};function N(e,t){if(!(this instanceof N))return new N(e,t);if(t&&t in Oe&&(t=null),t&&!(t in T))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof N)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let s=ct.get(e);if(s===null)throw new Error("Unable to parse color from string: "+e);this.model=s.model,n=T[this.model].channels,this.color=s.value.slice(0,n),this.valpha=typeof s.value[n]=="number"?s.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=T[this.model].channels;let s=Array.prototype.slice.call(e,0,n);this.color=Vt(s,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let s=Object.keys(e);"alpha"in e&&(s.splice(s.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let i=s.sort().join("");if(!(i in Yt))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Yt[i];let{labels:o}=T[this.model],l=[];for(r=0;r<o.length;r++)l.push(e[o[r]]);this.color=Vt(l)}if(Ft[this.model])for(n=T[this.model].channels,r=0;r<n;r++){let s=Ft[this.model][r];s&&(this.color[r]=s(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}N.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in ct.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return ct.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return ct.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=T[this.model],{labels:r}=T[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new N([...this.color.map(rr(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new N([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:k("rgb",0,_(255)),green:k("rgb",1,_(255)),blue:k("rgb",2,_(255)),hue:k(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:k("hsl",1,_(100)),lightness:k("hsl",2,_(100)),saturationv:k("hsv",1,_(100)),value:k("hsv",2,_(100)),chroma:k("hcg",1,_(100)),gray:k("hcg",2,_(100)),white:k("hwb",1,_(100)),wblack:k("hwb",2,_(100)),cyan:k("cmyk",0,_(100)),magenta:k("cmyk",1,_(100)),yellow:k("cmyk",2,_(100)),black:k("cmyk",3,_(100)),x:k("xyz",0,_(95.047)),y:k("xyz",1,_(100)),z:k("xyz",2,_(108.833)),l:k("lab",0,_(100)),a:k("lab",1),b:k("lab",2),keyword(e){return e!==void 0?new N(e):T[this.model].keyword(this.color)},hex(e){return e!==void 0?new N(e):ct.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new N(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),ct.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,n]of e.entries()){let s=n/255;t[r]=s<=.04045?s/12.92:((s+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return N.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),n=this.rgb(),s=t===void 0?.5:t,i=2*s-1,o=r.alpha()-n.alpha(),l=((i*o===-1?i:(i+o)/(1+i*o))+1)/2,a=1-l;return N.rgb(l*r.red()+a*n.red(),l*r.green()+a*n.green(),l*r.blue()+a*n.blue(),r.alpha()*s+n.alpha()*(1-s))}};for(let e of Object.keys(T)){if(Oe.includes(e))continue;let{channels:t}=T[e];N.prototype[e]=function(...r){return this.model===e?new N(this):r.length>0?new N(r,e):new N([...nr(T[this.model][e].raw(this.color)),this.valpha],e)},N[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=Vt(r,t)),new N(n,e)}}function er(e,t){return Number(e.toFixed(t))}function rr(e){return function(t){return er(t,e)}}function k(e,t,r){e=Array.isArray(e)?e:[e];for(let n of e)(Ft[n]||(Ft[n]=[]))[t]=r;return e=e[0],function(n){let s;return n!==void 0?(r&&(n=r(n)),s=this[e](),s.color[t]=n,s):(s=this[e]().color[t],r&&(s=r(s)),s)}}function _(e){return function(t){return Math.max(0,Math.min(e,t))}}function nr(e){return Array.isArray(e)?e:[e]}function Vt(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}ve.exports=N});var fr={};Ie(fr,{gdExerciseHighlightDark:()=>lr,gdExerciseHighlightLight:()=>hr,gdExerciseThemeDark:()=>ir,gdExerciseThemeLight:()=>sr});module.exports=Te(fr);var Fe=0;var x=class{constructor(t={}){this.id=Fe++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=W.match(t)),r=>{let n=t(r);return n===void 0?null:[this,n]}}};x.closedBy=new x({deserialize:e=>e.split(" ")});x.openedBy=new x({deserialize:e=>e.split(" ")});x.group=new x({deserialize:e=>e.split(" ")});x.contextHash=new x({perNode:!0});x.lookAhead=new x({perNode:!0});x.mounted=new x({perNode:!0});var Be=Object.create(null),W=class e{constructor(t,r,n,s=0){this.name=t,this.props=r,this.id=n,this.flags=s}static define(t){let r=t.props&&t.props.length?Object.create(null):Be,n=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),s=new e(t.name||"",r,t.id,n);if(t.props){for(let i of t.props)if(Array.isArray(i)||(i=i(s)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");r[i[0].id]=i[1]}}return s}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let r=this.prop(x.group);return r?r.indexOf(t)>-1:!1}return this.id==t}static match(t){let r=Object.create(null);for(let n in t)for(let s of n.split(" "))r[s]=t[n];return n=>{for(let s=n.prop(x.group),i=-1;i<(s?s.length:0);i++){let o=r[i<0?n.name:s[i]];if(o)return o}}}};W.none=new W("",Object.create(null),0,8);var kt=new WeakMap,Zt=new WeakMap,E;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"})(E||(E={}));var H=class e{constructor(t,r,n,s,i){if(this.type=t,this.children=r,this.positions=n,this.length=s,this.props=null,i&&i.length){this.props=Object.create(null);for(let[o,l]of i)this.props[typeof o=="number"?o:o.id]=l}}toString(){let t=this.prop(x.mounted);if(t&&!t.overlay)return t.tree.toString();let r="";for(let n of this.children){let s=n.toString();s&&(r&&(r+=","),r+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}cursor(t=0){return new ft(this.topNode,t)}cursorAt(t,r=0,n=0){let s=kt.get(this)||this.topNode,i=new ft(s);return i.moveTo(t,r),kt.set(this,i._tree),i}get topNode(){return new rt(this,0,0,null)}resolve(t,r=0){let n=ht(kt.get(this)||this.topNode,t,r,!1);return kt.set(this,n),n}resolveInner(t,r=0){let n=ht(Zt.get(this)||this.topNode,t,r,!0);return Zt.set(this,n),n}iterate(t){let{enter:r,leave:n,from:s=0,to:i=this.length}=t,o=t.mode||0,l=(o&E.IncludeAnonymous)>0;for(let a=this.cursor(o|E.IncludeAnonymous);;){let u=!1;if(a.from<=i&&a.to>=s&&(!l&&a.type.isAnonymous||r(a)!==!1)){if(a.firstChild())continue;u=!0}for(;u&&n&&(l||!a.type.isAnonymous)&&n(a),!a.nextSibling();){if(!a.parent())return;u=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let r in this.props)t.push([+r,this.props[r]]);return t}balance(t={}){return this.children.length<=8?this:Kt(W.none,this.children,this.positions,0,this.children.length,0,this.length,(r,n,s)=>new e(this.type,r,n,s,this.propValues),t.makeTree||((r,n,s)=>new e(W.none,r,n,s)))}static build(t){return De(t)}};H.empty=new H(W.none,[],[],0);var Pt=class e{constructor(t,r){this.buffer=t,this.index=r}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},et=class e{constructor(t,r,n){this.buffer=t,this.length=r,this.set=n}get type(){return W.none}toString(){let t=[];for(let r=0;r<this.buffer.length;)t.push(this.childString(r)),r=this.buffer[r+3];return t.join(",")}childString(t){let r=this.buffer[t],n=this.buffer[t+3],s=this.set.types[r],i=s.name;if(/\W/.test(i)&&!s.isError&&(i=JSON.stringify(i)),t+=4,n==t)return i;let o=[];for(;t<n;)o.push(this.childString(t)),t=this.buffer[t+3];return i+"("+o.join(",")+")"}findChild(t,r,n,s,i){let{buffer:o}=this,l=-1;for(let a=t;a!=r&&!(ee(i,s,o[a+1],o[a+2])&&(l=a,n>0));a=o[a+3]);return l}slice(t,r,n){let s=this.buffer,i=new Uint16Array(r-t),o=0;for(let l=t,a=0;l<r;){i[a++]=s[l++],i[a++]=s[l++]-n;let u=i[a++]=s[l++]-n;i[a++]=s[l++]-t,o=Math.max(o,u)}return new e(i,o,this.set)}};function ee(e,t,r,n){switch(e){case-2:return r<t;case-1:return n>=t&&r<t;case 0:return r<t&&n>t;case 1:return r<=t&&n>t;case 2:return n>t;case 4:return!0}}function re(e,t){let r=e.childBefore(t);for(;r;){let n=r.lastChild;if(!n||n.to!=r.to)break;n.type.isError&&n.from==n.to?(e=r,r=n.prevSibling):r=n}return e}function ht(e,t,r,n){for(var s;e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t);){let o=!n&&e instanceof rt&&e.index<0?null:e.parent;if(!o)return e;e=o}let i=n?0:E.IgnoreOverlays;if(n)for(let o=e,l=o.parent;l;o=l,l=o.parent)o instanceof rt&&o.index<0&&((s=l.enter(t,r,i))===null||s===void 0?void 0:s.from)!=o.from&&(e=l);for(;;){let o=e.enter(t,r,i);if(!o)return e;e=o}}var rt=class e{constructor(t,r,n,s){this._tree=t,this.from=r,this.index=n,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,r,n,s,i=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,u=r>0?l.length:-1;t!=u;t+=r){let g=l[t],y=a[t]+o.from;if(ee(s,n,y,y+g.length)){if(g instanceof et){if(i&E.ExcludeBuffers)continue;let I=g.findChild(0,g.buffer.length,r,n-y,s);if(I>-1)return new pt(new zt(o,g,t,y),null,I)}else if(i&E.IncludeAnonymous||!g.type.isAnonymous||Ut(g)){let I;if(!(i&E.IgnoreMounts)&&g.props&&(I=g.prop(x.mounted))&&!I.overlay)return new e(I.tree,y,t,o);let K=new e(g,y,t,o);return i&E.IncludeAnonymous||!K.type.isAnonymous?K:K.nextChild(r<0?g.children.length-1:0,r,n,s)}}}if(i&E.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?t=o.index+r:t=r<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,r,n=0){let s;if(!(n&E.IgnoreOverlays)&&(s=this._tree.prop(x.mounted))&&s.overlay){let i=t-this.from;for(let{from:o,to:l}of s.overlay)if((r>0?o<=i:o<i)&&(r<0?l>=i:l>i))return new e(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,r,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(t=0){return new ft(this,t)}get tree(){return this._tree}toTree(){return this._tree}resolve(t,r=0){return ht(this,t,r,!1)}resolveInner(t,r=0){return ht(this,t,r,!0)}enterUnfinishedNodesBefore(t){return re(this,t)}getChild(t,r=null,n=null){let s=_t(this,t,r,n);return s.length?s[0]:null}getChildren(t,r=null,n=null){return _t(this,t,r,n)}toString(){return this._tree.toString()}get node(){return this}matchContext(t){return Nt(this,t)}};function _t(e,t,r,n){let s=e.cursor(),i=[];if(!s.firstChild())return i;if(r!=null){for(;!s.type.is(r);)if(!s.nextSibling())return i}for(;;){if(n!=null&&s.type.is(n))return i;if(s.type.is(t)&&i.push(s.node),!s.nextSibling())return n==null?i:[]}}function Nt(e,t,r=t.length-1){for(let n=e.parent;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}var zt=class{constructor(t,r,n,s){this.parent=t,this.buffer=r,this.index=n,this.start=s}},pt=class e{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,r,n){this.context=t,this._parent=r,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,r,n){let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],t,r-this.context.start,n);return i<0?null:new e(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,r,n=0){if(n&E.ExcludeBuffers)return null;let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],r>0?1:-1,t-this.context.start,r);return i<0?null:new e(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,r=t.buffer[this.index+3];return r<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,r):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,r=this._parent?this._parent.index+4:0;return this.index==r?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(r,this.index,-1,0,4))}cursor(t=0){return new ft(this,t)}get tree(){return null}toTree(){let t=[],r=[],{buffer:n}=this.context,s=this.index+4,i=n.buffer[this.index+3];if(i>s){let o=n.buffer[this.index+1];t.push(n.slice(s,i,o)),r.push(0)}return new H(this.type,t,r,this.to-this.from)}resolve(t,r=0){return ht(this,t,r,!1)}resolveInner(t,r=0){return ht(this,t,r,!0)}enterUnfinishedNodesBefore(t){return re(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,r=null,n=null){let s=_t(this,t,r,n);return s.length?s[0]:null}getChildren(t,r=null,n=null){return _t(this,t,r,n)}get node(){return this}matchContext(t){return Nt(this,t)}},ft=class{get name(){return this.type.name}constructor(t,r=0){if(this.mode=r,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof rt)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let n=t._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,r){this.index=t;let{start:n,buffer:s}=this.buffer;return this.type=r||s.set.types[s.buffer[t]],this.from=n+s.buffer[t+1],this.to=n+s.buffer[t+2],!0}yield(t){return t?t instanceof rt?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,r,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,r,n,this.mode));let{buffer:s}=this.buffer,i=s.findChild(this.index+4,s.buffer[this.index+3],t,r-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,r,n=this.mode){return this.buffer?n&E.ExcludeBuffers?!1:this.enterChild(1,t,r):this.yield(this._tree.enter(t,r,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&E.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&E.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:r}=this.buffer,n=this.stack.length-1;if(t<0){let s=n<0?0:this.stack[n]+4;if(this.index!=s)return this.yieldBuf(r.findChild(s,this.index,-1,0,4))}else{let s=r.buffer[this.index+3];if(s<(n<0?r.buffer.length:r.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let r,n,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(s.buffer.buffer[i+3]<this.index)return!1;({index:r,parent:n}=s)}else({index:r,_parent:n}=this._tree);for(;n;{index:r,_parent:n}=n)if(r>-1)for(let i=r+t,o=t<0?-1:n._tree.children.length;i!=o;i+=t){let l=n._tree.children[i];if(this.mode&E.IncludeAnonymous||l instanceof et||!l.type.isAnonymous||Ut(l))return!1}return!0}move(t,r){if(r&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,r=0){for(;(this.from==this.to||(r<1?this.from>=t:this.from>t)||(r>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,r););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,r=null,n=0;if(t&&t.context==this.buffer)t:for(let s=this.index,i=this.stack.length;i>=0;){for(let o=t;o;o=o._parent)if(o.index==s){if(s==this.index)return o;r=o,n=i+1;break t}s=this.stack[--i]}for(let s=n;s<this.stack.length;s++)r=new pt(this.buffer,r,this.stack[s]);return this.bufferNode=new pt(this.buffer,r,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,r){for(let n=0;;){let s=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;s&&r&&r(this),s=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,s=!0}}}matchContext(t){if(!this.buffer)return Nt(this.node,t);let{buffer:r}=this.buffer,{types:n}=r.set;for(let s=t.length-1,i=this.stack.length-1;s>=0;i--){if(i<0)return Nt(this.node,t,s);let o=n[r.buffer[this.stack[i]]];if(!o.isAnonymous){if(t[s]&&t[s]!=o.name)return!1;s--}}return!0}};function Ut(e){return e.children.some(t=>t instanceof et||!t.type.isAnonymous||Ut(t))}function De(e){var t;let{buffer:r,nodeSet:n,maxBufferLength:s=1024,reused:i=[],minRepeatType:o=n.types.length}=e,l=Array.isArray(r)?new Pt(r,r.length):r,a=n.types,u=0,g=0;function y(w,O,d,m,R){let{id:b,start:p,end:v,size:L}=l,F=g;for(;L<0;)if(l.next(),L==-1){let Y=i[b];d.push(Y),m.push(p-w);return}else if(L==-3){u=b;return}else if(L==-4){g=b;return}else throw new RangeError(`Unrecognized record size: ${L}`);let lt=a[b],j,q,Xt=p-w;if(v-p<=s&&(q=it(l.pos-O,R))){let Y=new Uint16Array(q.size-q.skip),B=l.pos-q.size,G=Y.length;for(;l.pos>B;)G=xt(q.start,Y,G);j=new et(Y,v-q.start,n),Xt=q.start-w}else{let Y=l.pos-L;l.next();let B=[],G=[],tt=b>=o?b:-1,at=0,Ot=v;for(;l.pos>Y;)tt>=0&&l.id==tt&&l.size>=0?(l.end<=Ot-s&&(K(B,G,p,at,l.end,Ot,tt,F),at=B.length,Ot=l.end),l.next()):y(p,Y,B,G,tt);if(tt>=0&&at>0&&at<B.length&&K(B,G,p,at,p,Ot,tt,F),B.reverse(),G.reverse(),tt>-1&&at>0){let Jt=I(lt);j=Kt(lt,B,G,0,B.length,0,v-p,Jt,Jt)}else j=A(lt,B,G,v-p,F-v)}d.push(j),m.push(Xt)}function I(w){return(O,d,m)=>{let R=0,b=O.length-1,p,v;if(b>=0&&(p=O[b])instanceof H){if(!b&&p.type==w&&p.length==m)return p;(v=p.prop(x.lookAhead))&&(R=d[b]+p.length+v)}return A(w,O,d,m,R)}}function K(w,O,d,m,R,b,p,v){let L=[],F=[];for(;w.length>m;)L.push(w.pop()),F.push(O.pop()+d-R);w.push(A(n.types[p],L,F,b-R,v-b)),O.push(R-d)}function A(w,O,d,m,R=0,b){if(u){let p=[x.contextHash,u];b=b?[p].concat(b):[p]}if(R>25){let p=[x.lookAhead,R];b=b?[p].concat(b):[p]}return new H(w,O,d,m,b)}function it(w,O){let d=l.fork(),m=0,R=0,b=0,p=d.end-s,v={size:0,start:0,skip:0};t:for(let L=d.pos-w;d.pos>L;){let F=d.size;if(d.id==O&&F>=0){v.size=m,v.start=R,v.skip=b,b+=4,m+=4,d.next();continue}let lt=d.pos-F;if(F<0||lt<L||d.start<p)break;let j=d.id>=o?4:0,q=d.start;for(d.next();d.pos>lt;){if(d.size<0)if(d.size==-3)j+=4;else break t;else d.id>=o&&(j+=4);d.next()}R=q,m+=F,b+=j}return(O<0||m==w)&&(v.size=m,v.start=R,v.skip=b),v.size>4?v:void 0}function xt(w,O,d){let{id:m,start:R,end:b,size:p}=l;if(l.next(),p>=0&&m<o){let v=d;if(p>4){let L=l.pos-(p-4);for(;l.pos>L;)d=xt(w,O,d)}O[--d]=v,O[--d]=b-w,O[--d]=R-w,O[--d]=m}else p==-3?u=m:p==-4&&(g=m);return d}let Z=[],ot=[];for(;l.pos>0;)y(e.start||0,e.bufferStart||0,Z,ot,-1);let M=(t=e.length)!==null&&t!==void 0?t:Z.length?ot[0]+Z[0].length:0;return new H(a[e.topID],Z.reverse(),ot.reverse(),M)}var te=new WeakMap;function Ct(e,t){if(!e.isAnonymous||t instanceof et||t.type!=e)return 1;let r=te.get(t);if(r==null){r=1;for(let n of t.children){if(n.type!=e||!(n instanceof H)){r=1;break}r+=Ct(e,n)}te.set(t,r)}return r}function Kt(e,t,r,n,s,i,o,l,a){let u=0;for(let A=n;A<s;A++)u+=Ct(e,t[A]);let g=Math.ceil(u*1.5/8),y=[],I=[];function K(A,it,xt,Z,ot){for(let M=xt;M<Z;){let w=M,O=it[M],d=Ct(e,A[M]);for(M++;M<Z;M++){let m=Ct(e,A[M]);if(d+m>=g)break;d+=m}if(M==w+1){if(d>g){let m=A[w];K(m.children,m.positions,0,m.children.length,it[w]+ot);continue}y.push(A[w])}else{let m=it[M-1]+A[M-1].length-O;y.push(Kt(e,A,it,w,M,O,m,null,a))}I.push(O+ot-i)}}return K(t,r,n,s,0),(l||a)(y,I,o)}var cr=new x({perNode:!0});var Pe=0,U=class e{constructor(t,r,n){this.set=t,this.base=r,this.modified=n,this.id=Pe++}static define(t){if(t?.base)throw new Error("Can not derive from a modified tag");let r=new e([],null,[]);if(r.set.push(r),t)for(let n of t.set)r.set.push(n);return r}static defineModifier(){let t=new Mt;return r=>r.modified.indexOf(t)>-1?r:Mt.get(r.base||r,r.modified.concat(t).sort((n,s)=>n.id-s.id))}},ze=0,Mt=class e{constructor(){this.instances=[],this.id=ze++}static get(t,r){if(!r.length)return t;let n=r[0].instances.find(l=>l.base==t&&Ue(r,l.modified));if(n)return n;let s=[],i=new U(s,t,r);for(let l of r)l.instances.push(i);let o=Ke(r);for(let l of t.set)if(!l.modified.length)for(let a of o)s.push(e.get(l,a));return i}};function Ue(e,t){return e.length==t.length&&e.every((r,n)=>r==t[n])}function Ke(e){let t=[[]];for(let r=0;r<e.length;r++)for(let n=0,s=t.length;n<s;n++)t.push(t[n].concat(e[r]));return t.sort((r,n)=>n.length-r.length)}var pr=new x,Lt=class{constructor(t,r,n,s){this.tags=t,this.mode=r,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}};Lt.empty=new Lt([],2,null);function qe(e,t){let r=Object.create(null);for(let i of e)if(!Array.isArray(i.tag))r[i.tag.id]=i.class;else for(let o of i.tag)r[o.id]=i.class;let{scope:n,all:s=null}=t||{};return{style:i=>{let o=s;for(let l of i)for(let a of l.set){let u=r[a.id];if(u){o=o?o+" "+u:u;break}}return o},scope:n}}var h=U.define,Rt=h(),$=h(),ne=h($),se=h($),X=h(),Et=h(X),qt=h(X),z=h(),nt=h(z),D=h(),P=h(),Gt=h(),mt=h(Gt),At=h(),c={comment:Rt,lineComment:h(Rt),blockComment:h(Rt),docComment:h(Rt),name:$,variableName:h($),typeName:ne,tagName:h(ne),propertyName:se,attributeName:h(se),className:h($),labelName:h($),namespace:h($),macroName:h($),literal:X,string:Et,docString:h(Et),character:h(Et),attributeValue:h(Et),number:qt,integer:h(qt),float:h(qt),bool:h(X),regexp:h(X),escape:h(X),color:h(X),url:h(X),keyword:D,self:h(D),null:h(D),atom:h(D),unit:h(D),modifier:h(D),operatorKeyword:h(D),controlKeyword:h(D),definitionKeyword:h(D),moduleKeyword:h(D),operator:P,derefOperator:h(P),arithmeticOperator:h(P),logicOperator:h(P),bitwiseOperator:h(P),compareOperator:h(P),updateOperator:h(P),definitionOperator:h(P),typeOperator:h(P),controlOperator:h(P),punctuation:Gt,separator:h(Gt),bracket:mt,angleBracket:h(mt),squareBracket:h(mt),paren:h(mt),brace:h(mt),content:z,heading:nt,heading1:h(nt),heading2:h(nt),heading3:h(nt),heading4:h(nt),heading5:h(nt),heading6:h(nt),contentSeparator:h(z),list:h(z),quote:h(z),emphasis:h(z),strong:h(z),link:h(z),monospace:h(z),strikethrough:h(z),inserted:h(),deleted:h(),changed:h(),invalid:h(),meta:At,documentMeta:h(At),annotation:h(At),processingInstruction:h(At),definition:U.defineModifier(),constant:U.defineModifier(),function:U.defineModifier(),standard:U.defineModifier(),local:U.defineModifier(),special:U.defineModifier()},mr=qe([{tag:c.link,class:"tok-link"},{tag:c.heading,class:"tok-heading"},{tag:c.emphasis,class:"tok-emphasis"},{tag:c.strong,class:"tok-strong"},{tag:c.keyword,class:"tok-keyword"},{tag:c.atom,class:"tok-atom"},{tag:c.bool,class:"tok-bool"},{tag:c.url,class:"tok-url"},{tag:c.labelName,class:"tok-labelName"},{tag:c.inserted,class:"tok-inserted"},{tag:c.deleted,class:"tok-deleted"},{tag:c.literal,class:"tok-literal"},{tag:c.string,class:"tok-string"},{tag:c.number,class:"tok-number"},{tag:[c.regexp,c.escape,c.special(c.string)],class:"tok-string2"},{tag:c.variableName,class:"tok-variableName"},{tag:c.local(c.variableName),class:"tok-variableName tok-local"},{tag:c.definition(c.variableName),class:"tok-variableName tok-definition"},{tag:c.special(c.variableName),class:"tok-variableName2"},{tag:c.definition(c.propertyName),class:"tok-propertyName tok-definition"},{tag:c.typeName,class:"tok-typeName"},{tag:c.namespace,class:"tok-namespace"},{tag:c.className,class:"tok-className"},{tag:c.macroName,class:"tok-macroName"},{tag:c.propertyName,class:"tok-propertyName"},{tag:c.operator,class:"tok-operator"},{tag:c.comment,class:"tok-comment"},{tag:c.meta,class:"tok-meta"},{tag:c.invalid,class:"tok-invalid"},{tag:c.punctuation,class:"tok-punctuation"}]);var $t=require("@codemirror/view"),gt=require("@codemirror/language"),Ar=require("@codemirror/state");var C={SYMBOL_COLOR:"#abc9ff",KEYWORD_COLOR:"#ff7085",CONTROL_FLOW_KEYWORD_COLOR:"#ff7085",BASE_TYPE_COLOR:"#42ffc2",ENGINE_TYPE_COLOR:"#8fffdb",USER_TYPE_COLOR:"#c7ffed",COMMENT_COLOR:"#cdcfd280",STRING_COLOR:"#ffeda1",BACKGROUND_COLOR:"#1d2229",COMPLETION_BACKGROUND_COLOR:"#363d4a",COMPLETION_SELECTED_COLOR:"#ffffff12",COMPLETION_EXISTING_COLOR:"#ffffff24",COMPLETION_SCROLL_COLOR:"#ffffff4a",COMPLETION_SCROLL_HOVERED_COLOR:"#ffffff66",COMPLETION_FONT_COLOR:"#cdcfd2",TEXT_COLOR:"#cdcfd2",LINE_NUMBER_COLOR:"#cdcfd280",SAFE_LINE_NUMBER_COLOR:"#cdf8d2bf",CARET_COLOR:"#ffffff",CARET_BACKGROUND_COLOR:"#000000",TEXT_SELECTED_COLOR:"#00000000",SELECTION_COLOR:"#70bafa66",BRACE_MISMATCH_COLOR:"#ff786b",CURRENT_LINE_COLOR:"#ffffff12",LINE_LENGTH_GUIDELINE_COLOR:"#363d4a",WORD_HIGHLIGHTED_COLOR:"#ffffff12",NUMBER_COLOR:"#a1ffe0",FUNCTION_COLOR:"#57b3ff",MEMBER_VARIABLE_COLOR:"#bce0ff",MARK_COLOR:"#ff786b4d",BOOKMARK_COLOR:"#147dfa",BREAKPOINT_COLOR:"#ff786b",EXECUTING_LINE_COLOR:"#fae345",CODE_FOLDING_COLOR:"#ffffff45",SEARCH_RESULT_COLOR:"#ffffff12",SEARCH_RESULT_BORDER_COLOR:"#699ce861"};var Ce=Se(ke(),1);function dt(e){let t=(0,Ce.default)(e);return t.black(t.white()).white(t.black()).hex()}var _e="8px",Bt="8px",Ne="16px",Dt="#202531",sr=$t.EditorView.theme({"&":{color:dt(C.TEXT_COLOR),backgroundColor:dt(Dt),borderRadius:_e},".cm-gutters":{backgroundColor:dt(Dt),color:dt(C.LINE_NUMBER_COLOR)},".cm-scroller::-webkit-scrollbar":{width:Bt,height:Bt},".cm-scroller::-webkit-scrollbar-thumb":{borderRadius:Ne,backgroundColor:"hwb(240deg 54.51% 34.12%)"}},{dark:!1}),ir=$t.EditorView.theme({"&":{color:C.TEXT_COLOR,backgroundColor:Dt,borderRadius:_e},".cm-gutters":{backgroundColor:Dt,color:C.LINE_NUMBER_COLOR},".cm-scroller::-webkit-scrollbar":{width:Bt,height:Bt},".cm-scroller::-webkit-scrollbar-thumb":{borderRadius:Ne,backgroundColor:"hwb(240deg 34.12% 54.51%)"}},{dark:!0});function Q(e,t){return{tag:e,color:t}}function st(e,t){let r=Q(e,t);return r.color=dt(r.color),r}var or=gt.HighlightStyle.define([Q(c.keyword,C.KEYWORD_COLOR),Q(c.moduleKeyword,C.KEYWORD_COLOR),Q(c.operatorKeyword,C.CONTROL_FLOW_KEYWORD_COLOR),Q(c.comment,C.COMMENT_COLOR),Q(c.string,C.STRING_COLOR),Q(c.number,C.NUMBER_COLOR),Q(c.variableName,C.MEMBER_VARIABLE_COLOR)]),lr=(0,gt.syntaxHighlighting)(or),ar=gt.HighlightStyle.define([st(c.keyword,C.KEYWORD_COLOR),st(c.moduleKeyword,C.KEYWORD_COLOR),st(c.operatorKeyword,C.CONTROL_FLOW_KEYWORD_COLOR),st(c.comment,C.COMMENT_COLOR),st(c.string,C.STRING_COLOR),st(c.number,C.NUMBER_COLOR),st(c.variableName,C.MEMBER_VARIABLE_COLOR)]),hr=(0,gt.syntaxHighlighting)(ar); //# sourceMappingURL=index.min.cjs.map