PageSourceSearch

https://anim-ui-eight.vercel.app/_next/static/chunks/77.c31af08060e63b64.js

js anim-ui-eight.vercel.app collected 2026-10-03 06:16:16 UTC 728,915 bytes, 56 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[77],{74:(t,r,n)=>{"use strict";n.d(r,{C:()=>eV,H:()=>eH,L:()=>eX,O:()=>eK,R:()=>eq,a:()=>eG,b:()=>eW,c:()=>e1,d:()=>eZ,e:()=>eY,f:()=>eJ,g:()=>eQ,h:()=>e0});var i=n(7280),s=n(6777),o=n(4306),a=n(172),u=n(4590),l=n(817);let h=new i.A({id:"xyz-d50",name:"XYZ D50",white:"D50",base:l.A,fromBase:t=>(0,u.Ay)(l.A.white,"D50",t),toBase:t=>(0,u.Ay)("D50",l.A.white,t)}),c=216/24389,d=24/116,p=24389/27,f=u.FL.D50,g=new i.A({id:"lab",name:"Lab",coords:{l:{refRange:[0,100],name:"Lightness"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:f,base:h,fromBase(t){let r=t.map((t,r)=>t/f[r]).map(t=>t>c?Math.cbrt(t):(p*t+16)/116);return[116*r[1]-16,500*(r[0]-r[1]),200*(r[1]-r[2])]},toBase(t){let r=[];return r[1]=(t[0]+16)/116,r[0]=t[1]/500+r[1],r[2]=r[1]-t[2]/200,[r[0]>d?Math.pow(r[0],3):(116*r[0]-16)/p,t[0]>8?Math.pow((t[0]+16)/116,3):t[0]/p,r[2]>d?Math.pow(r[2],3):(116*r[2]-16)/p].map((t,r)=>t*f[r])},formats:{lab:{coords:["<number> | <percentage>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}});function m(t){return(t%360+360)%360}let y=new i.A({id:"lch",name:"LCH",coords:{l:{refRange:[0,100],name:"Lightness"},c:{refRange:[0,150],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:g,fromBase(t){let r,[n,i,s]=t;return r=.02>Math.abs(i)&&.02>Math.abs(s)?NaN:180*Math.atan2(s,i)/Math.PI,[n,Math.sqrt(i**2+s**2),m(r)]},toBase(t){let[r,n,i]=t;return n<0&&(n=0),isNaN(i)&&(i=0),[r,n*Math.cos(i*Math.PI/180),n*Math.sin(i*Math.PI/180)]},formats:{lch:{coords:["<number> | <percentage>","<number> | <percentage>","<number> | <angle>"]}}}),v=Math.PI,b=180/v,x=v/180;function _(t){let r=t*t;return r*r*r*t}function D(t,r,{kL:n=1,kC:i=1,kH:o=1}={}){let u,l;[t,r]=(0,s.A)([t,r]);let[h,c,d]=g.from(t),p=y.from(g,[h,c,d])[1],[f,m,A]=g.from(r),C=y.from(g,[f,m,A])[1];p<0&&(p=0),C<0&&(C=0);let E=_((p+C)/2),w=.5*(1-Math.sqrt(E/(E+0x16bcc41e9))),S=(1+w)*c,F=(1+w)*m,N=Math.sqrt(S**2+d**2),B=Math.sqrt(F**2+A**2),k=0===S&&0===d?0:Math.atan2(d,S),M=0===F&&0===A?0:Math.atan2(A,F);k<0&&(k+=2*v),M<0&&(M+=2*v),k*=b;let T=f-h,I=B-N,O=(M*=b)-k,L=k+M,P=Math.abs(O);N*B==0?u=0:P<=180?u=O:O>180?u=O-360:O<-180?u=O+360:a.A.warn("the unthinkable has happened");let R=2*Math.sqrt(B*N)*Math.sin(u*x/2),z=(h+f)/2,U=(N+B)/2,$=_(U),j=(z-50)**2,V=1+.015*j/Math.sqrt(20+j),G=1+.045*U,q=1+.015*U*(1-.17*Math.cos(((l=N*B==0?L:P<=180?L/2:L<360?(L+360)/2:(L-360)/2)-30)*x)+.24*Math.cos(2*l*x)+.32*Math.cos((3*l+6)*x)-.2*Math.cos((4*l-63)*x)),W=(T/(n*V))**2;return Math.sqrt(W+=(I/(i*G))**2+(R/(o*q))**2+I/(i*G)*(-1*Math.sin(2*(30*Math.exp(-1*((l-275)/25)**2))*x)*(2*Math.sqrt($/($+0x16bcc41e9))))*(R/(o*q)))}var A=n(1925);let C=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],E=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],w=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],S=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],F=new i.A({id:"oklab",name:"Oklab",coords:{l:{refRange:[0,1],name:"Lightness"},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:"D65",base:l.A,fromBase(t){let r=(0,A.A)(C,t).map(t=>Math.cbrt(t));return(0,A.A)(w,r)},toBase(t){let r=(0,A.A)(S,t).map(t=>t**3);return(0,A.A)(E,r)},formats:{oklab:{coords:["<percentage> | <number>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}});function N(t,r){[t,r]=(0,s.A)([t,r]);let[n,i,o]=F.from(t),[a,u,l]=F.from(r);return Math.sqrt((n-a)**2+(i-u)**2+(o-l)**2)}function B(t,r,{epsilon:n=75e-6}={}){t=(0,s.A)(t),r||(r=t.space),r=i.A.get(r);let o=t.coords;return r!==t.space&&(o=r.from(t)),r.inGamut(o,{epsilon:n})}function k(t,r){return(t=(0,s.A)(t),!r||t.space.equals(r))?t.coords.slice():(r=i.A.get(r)).from(t)}function M(t,r){t=(0,s.A)(t);let{space:n,index:o}
1=i.A.resolveCoord(r,t.space);return k(t,n)[o]}function T(t,r,n){return t=(0,s.A)(t),r=i.A.get(r),t.coords=r.to(t.space,n),t}function I(t,r,n){if(t=(0,s.A)(t),2==arguments.length&&"object"===(0,o.NW)(arguments[1])){let r=arguments[1];for(let n in r)I(t,n,r[n])}else{"function"==typeof n&&(n=n(M(t,r)));let{space:s,index:o}=i.A.resolveCoord(r,t.space),a=k(t,s);a[o]=n,T(t,s,a)}return t}function O(t){return{space:t.space,coords:t.coords.slice(),alpha:t.alpha}}T.returns="color",I.returns="color";let L=Math.PI/180,P=new i.A({id:"xyz-abs-d65",cssId:"--xyz-abs-d65",name:"Absolute XYZ D65",coords:{x:{refRange:[0,9504.7],name:"Xa"},y:{refRange:[0,1e4],name:"Ya"},z:{refRange:[0,10888.3],name:"Za"}},base:l.A,fromBase:t=>t.map(t=>Math.max(203*t,0)),toBase:t=>t.map(t=>Math.max(t/203,0))}),R=2610/16384,z=16384/2610,U=1.7*2523/32,$=32/(1.7*2523),j=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],V=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],G=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],q=[[1,.1386050432715393,.05804731615611886],[.9999999999999999,-.1386050432715393,-.05804731615611886],[.9999999999999998,-.09601924202631895,-.8118918960560388]],W=new i.A({id:"jzazbz",name:"Jzazbz",coords:{jz:{refRange:[0,1],name:"Jz"},az:{refRange:[-.5,.5]},bz:{refRange:[-.5,.5]}},base:P,fromBase(t){let[r,n,i]=t,s=(0,A.A)(j,[1.15*r-(1.15-1)*i,.66*n-(.66-1)*r,i]).map(function(t){return((.8359375+18.8515625*(t/1e4)**R)/(1+18.6875*(t/1e4)**R))**U}),[o,a,u]=(0,A.A)(G,s);return[.43999999999999995*o/(1+-.56*o)-16295499532821565e-27,a,u]},toBase(t){let[r,n,i]=t,s=(0,A.A)(q,[(r+16295499532821565e-27)/(.43999999999999995- -.56*(r+16295499532821565e-27)),n,i]).map(function(t){return 1e4*((.8359375-t**$)/(18.6875*t**$-18.8515625))**z}),[o,a,u]=(0,A.A)(V,s),l=(o+(1.15-1)*u)/1.15;return[l,(a+(.66-1)*l)/.66,u]},formats:{color:{coords:["<number> | <percentage>","<number> | <percentage>[-1,1]","<number> | <percentage>[-1,1]"]}}}),H=new i.A({id:"jzczhz",name:"JzCzHz",coords:{jz:{refRange:[0,1],name:"Jz"},cz:{refRange:[0,1],name:"Chroma"},hz:{refRange:[0,360],type:"angle",name:"Hue"}},base:W,fromBase(t){let r,[n,i,s]=t;return r=2e-4>Math.abs(i)&&2e-4>Math.abs(s)?NaN:180*Math.atan2(s,i)/Math.PI,[n,Math.sqrt(i**2+s**2),m(r)]},toBase:t=>[t[0],t[1]*Math.cos(t[2]*Math.PI/180),t[1]*Math.sin(t[2]*Math.PI/180)]}),Z=2413/128,Y=2610/16384,X=2523/32,J=16384/2610,K=32/2523,Q=[[.3592832590121217,.6976051147779502,-.035891593232029],[-.1920808463704993,1.100476797037432,.0753748658519118],[.0070797844607479,.0748396662186362,.8433265453898765]],ee=[[.5,.5,0],[6610/4096,-13613/4096,7003/4096],[17933/4096,-17390/4096,-543/4096]],et=[[.9999999999999998,.0086090370379328,.111029625003026],[.9999999999999998,-.0086090370379328,-.1110296250030259],[.9999999999999998,.5600313357106791,-.3206271749873188]],er=[[2.0701522183894223,-1.3263473389671563,.2066510476294053],[.3647385209748072,.6805660249472273,-.0453045459220347],[-.0497472075358123,-.0492609666966131,1.1880659249923042]],en=new i.A({id:"ictcp",name:"ICTCP",coords:{i:{refRange:[0,1],name:"I"},ct:{refRange:[-.5,.5],name:"CT"},cp:{refRange:[-.5,.5],name:"CP"}},base:P,fromBase:t=>(function(t){let r=t.map(function(t){return((.8359375+Z*(t/1e4)**Y)/(1+18.6875*(t/1e4)**Y))**X});return(0,A.A)(ee,r)})((0,A.A)(Q,t)),toBase(t){var r;let n=(r=t,(0,A.A)(et,r).map(function(t){let r=Math.max(t**K-.8359375,0);return 1e4*(r/(Z-18.6875*t**K))**J}));return(0,A.A)(er,n)}}),ei=u.FL.D65,es=2*Math.PI,eo=[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],ea=[[1.8620678550872327,-1.0112546305316843,.14918677544445175],[.38752654323613717,.6214474419314753,-.008973985167612518],[-.015841498849333856,-.03412293802851557,1.0499644368778496]],eu=[[460,451,288],[460,-891,-261],[460,-220,-6300]],el={dark:[.8,.525,.8],dim:[.9,.59,.9],average:[1,.69,1]},eh={h:[20.14,90,164.25,237.53,380.14],e:[.8,.7,1,1.2,.8],H:[0,100,200,300,400]},ec=180/Math.PI,ed=Math.PI/180;function ep(t,r){return t.map(t=>{let n=(0,o.kR)(r*Math.abs(t)*.01,.42);return 400*(0,o.pG)(n,t)/(n+27.13)})}function ef(t,r,n,i,s){let a={};a.discounting=s,a.refWhite=t,a.surround=i;let u=t.map(t=>100*t);a.la=r,a.yb=n;let l=u[1],h=(0,A.A)(eo,u),c=(i=el[a.surround])[0];a.c=i[1],a.nc=i[2];let d=(1/(5*a.la+1))**4;
1a.fl=d*a.la+.1*(1-d)*(1-d)*Math.cbrt(5*a.la),a.flRoot=a.fl**.25,a.n=a.yb/l,a.z=1.48+Math.sqrt(a.n),a.nbb=.725*a.n**-.2,a.ncb=a.nbb;let p=s?1:Math.max(Math.min(c*(1-1/3.6*Math.exp((-a.la-42)/92)),1),0);a.dRgb=h.map(t=>(0,o.GW)(1,l/t,p)),a.dRgbInv=a.dRgb.map(t=>1/t);let f=ep(h.map((t,r)=>t*a.dRgb[r]),a.fl);return a.aW=a.nbb*(2*f[0]+f[1]+.05*f[2]),a}let eg=ef(ei,64/Math.PI*.2,20,"average",!1);function em(t,r){if(!(void 0!==t.J^void 0!==t.Q))throw Error("Conversion requires one and only one: 'J' or 'Q'");if(!(void 0!==t.C^void 0!==t.M^void 0!==t.s))throw Error("Conversion requires one and only one: 'C', 'M' or 's'");if(!(void 0!==t.h^void 0!==t.H))throw Error("Conversion requires one and only one: 'h' or 'H'");if(0===t.J||0===t.Q)return[0,0,0];let n=0,i=Math.cos(n=void 0!==t.h?m(t.h)*ed:function(t){let r=(t%400+400)%400,n=Math.floor(.01*r);r%=100;let[i,s]=eh.h.slice(n,n+2),[o,a]=eh.e.slice(n,n+2);return m((r*(a*i-o*s)-100*i*a)/(r*(a-o)-100*a))}(t.H)*ed),s=Math.sin(n),a=0;void 0!==t.J?a=.1*(0,o.kR)(t.J,.5):void 0!==t.Q&&(a=.25*r.c*t.Q/((r.aW+4)*r.flRoot));let u=0;void 0!==t.C?u=t.C/a:void 0!==t.M?u=t.M/r.flRoot/a:void 0!==t.s&&(u=4e-4*t.s**2*(r.aW+4)/r.c);let l=(0,o.kR)(u*Math.pow(1.64-Math.pow(.29,r.n),-.73),10/9),h=.25*(Math.cos(n+2)+3.8),c=r.aW*(0,o.kR)(a,2/r.c/r.z),d=5e4/13*r.nc*r.ncb*h,p=c/r.nbb,f=23*(p+.305)*(0,o.Ed)(l,23*d+l*(11*i+108*s)),g=function(t,r){let n=100/r*2588.068098016295;return t.map(t=>{let r=Math.abs(t);return(0,o.pG)(n*(0,o.kR)(r/(400-r),2.380952380952381),t)})}((0,A.A)(eu,[p,f*i,f*s]).map(t=>t/1403),r.fl);return(0,A.A)(ea,g.map((t,n)=>t*r.dRgbInv[n])).map(t=>t/100)}function ey(t,r){let n=t.map(t=>100*t),i=ep((0,A.A)(eo,n).map((t,n)=>t*r.dRgb[n]),r.fl),s=i[0]+(-12*i[1]+i[2])/11,a=(i[0]+i[1]-2*i[2])/9,u=(Math.atan2(a,s)%es+es)%es,l=.25*(Math.cos(u+2)+3.8),h=5e4/13*r.nc*r.ncb*(0,o.Ed)(l*Math.sqrt(s**2+a**2),i[0]+i[1]+1.05*i[2]+.305),c=(0,o.kR)(h,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),d=r.nbb*(2*i[0]+i[1]+.05*i[2]),p=(0,o.kR)(d/r.aW,.5*r.c*r.z),f=100*(0,o.kR)(p,2),g=4/r.c*p*(r.aW+4)*r.flRoot,y=c*p,v=y*r.flRoot,b=m(u*ec),x=function(t){let r=m(t);r<=eh.h[0]&&(r+=360);let n=(0,o.ah)(eh.h,r)-1,[i,s]=eh.h.slice(n,n+2),[a,u]=eh.e.slice(n,n+2),l=eh.H[n],h=(r-i)/a;return l+100*h/(h+(s-r)/u)}(b);return{J:f,C:y,h:b,s:50*(0,o.kR)(r.c*c/(r.aW+4),.5),Q:g,M:v,H:x}}new i.A({id:"cam16-jmh",cssId:"--cam16-jmh",name:"CAM16-JMh",coords:{j:{refRange:[0,100],name:"J"},m:{refRange:[0,105],name:"Colorfulness"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:l.A,fromBase(t){let r=ey(t,eg);return[r.J,r.M,r.h]},toBase:t=>em({J:t[0],M:t[1],h:t[2]},eg)});let ev=u.FL.D65,eb=216/24389,ex=24389/27;function e_(t){return t>8?Math.pow((t+16)/116,3):t/ex}let eD=ef(ev,200/Math.PI*e_(50),100*e_(50),"average",!1),eA=new i.A({id:"hct",name:"HCT",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},c:{refRange:[0,145],name:"Colorfulness"},t:{refRange:[0,100],name:"Tone"}},base:l.A,fromBase:t=>(function(t,r){var n;let i=116*((n=t[1])>eb?Math.cbrt(n):(ex*n+16)/116)-16;if(0===i)return[0,0,0];let s=ey(t,eD);return[m(s.h),s.C,i]})(t,0),toBase:t=>(function(t,r){let[n,i,s]=t,o=[],a=0;if(0===s)return[0,0,0];let u=e_(s);a=s>0?.00379058511492914*s**2+.608983189401032*s+.9155088574762233:9514440756550361e-21*s**2+.08693057439788597*s-21.928975842194614;let l=0,h=1/0;for(;l<=15;){let t=Math.abs((o=em({J:a,C:i,h:n},r))[1]-u);if(t<h){if(t<=2e-12)return o;h=t}a-=(o[1]-u)*a/(2*o[1]),l+=1}return em({J:a,C:i,h:n},r)})(t,eD),formats:{color:{id:"--hct",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}}),eC=Math.PI/180;function eE(t){t[1]<0&&(t=eA.fromBase(eA.toBase(t)));let r=Math.log(Math.max(1+.0228*t[1]*eD.flRoot,1))/.0228,n=t[0]*eC,i=r*Math.cos(n),s=r*Math.sin(n);return[t[2],i,s]}let ew={deltaE76:function(t,r){return function(t,r,n="lab"){let s=(n=i.A.get(n)).from(t),o=n.from(r);return Math.sqrt(s.reduce((t,r,n)=>{let i=o[n];return isNaN(r)||isNaN(i)?t:t+(i-r)**2},0))}(t,r,"lab")},deltaECMC:function(t,r,{l:n=2,c:i=1}={}){[t,r]=(0,s.A)([t,r]);let[o,a,u]=g.from(t),[,l,h]=y.from(g,[o,a,u]),[c,d,p]=g.from(r),f=y.from(g,[c,d,p])[1];l<0&&(l=0),f<0&&(f=0);let m=o-c,v=l-f,b=a-d,x=u-p,_=.511;o>=16&&(_=.040975*o/(1+.01765*o));let D=.0638*l/(1+.0131*l)+.638;Number.isNaN(h)&&(h=0);let A=Math.pow(l,4),C=Math.sqrt(A/(A+1900)),E=D*(C*(h>=164&&h<=345?.56+Math.abs(.2*Math.cos((h+168)*L)):.36+Math.abs(.4*Math.cos((h+35)*L)))+1-C),w=(m/(n*_))**2;return Math.sqrt(w+=(v/(i*D))**2+(b**2+x**2-v**2)/E**2)}
1,deltaE2000:D,deltaEJz:function(t,r){[t,r]=(0,s.A)([t,r]);let[n,i,o]=H.from(t),[a,u,l]=H.from(r);Number.isNaN(o)&&Number.isNaN(l)?(o=0,l=0):Number.isNaN(o)?o=l:Number.isNaN(l)&&(l=o);let h=2*Math.sqrt(i*u)*Math.sin((o-l)/2*(Math.PI/180));return Math.sqrt((n-a)**2+(i-u)**2+h**2)},deltaEITP:function(t,r){[t,r]=(0,s.A)([t,r]);let[n,i,o]=en.from(t),[a,u,l]=en.from(r);return 720*Math.sqrt((n-a)**2+.25*(i-u)**2+(o-l)**2)},deltaEOK:N,deltaEHCT:function(t,r){[t,r]=(0,s.A)([t,r]);let[n,i,o]=eE(eA.from(t)),[a,u,l]=eE(eA.from(r));return Math.sqrt((n-a)**2+(i-u)**2+(o-l)**2)}},eS={hct:{method:"hct.c",jnd:2,deltaEMethod:"hct",blackWhiteClamp:{}},"hct-tonal":{method:"hct.c",jnd:0,deltaEMethod:"hct",blackWhiteClamp:{channel:"hct.t",min:0,max:100}}};function eF(t,{method:r=a.A.gamut_mapping,space:n,deltaEMethod:l="",jnd:h=2,blackWhiteClamp:c={}}={}){let d;if(t=(0,s.A)(t),o.Kg(arguments[1])?n=arguments[1]:n||(n=t.space),B(t,n=i.A.get(n),{epsilon:0}))return t;if("css"===r)d=function(t,{space:r}={}){t=(0,s.A)(t),r||(r=t.space),r=i.A.get(r);let n=i.A.get("oklch");if(r.isUnbounded)return eB(t,r);let a=eB(t,n),u=a.coords[0];if(u>=1){let n=eB(eN.WHITE,r);return n.alpha=t.alpha,eB(n,r)}if(u<=0){let n=eB(eN.BLACK,r);return n.alpha=t.alpha,eB(n,r)}if(B(a,r,{epsilon:0}))return eB(a,r);function l(t){let n=eB(t,r),i=Object.values(r.coords);return n.coords=n.coords.map((t,r)=>{if("range"in i[r]){let[n,s]=i[r].range;return o.qE(n,t,s)}return t}),n}let h=0,c=a.coords[1],d=!0,p=O(a),f=l(p),g=N(f,p);if(g<.02)return f;for(;c-h>1e-4;){let t=(h+c)/2;if(p.coords[1]=t,d&&B(p,r,{epsilon:0}))h=t;else if((g=N(f=l(p),p))<.02)if(.02-g<1e-4)break;else d=!1,h=t;else c=t}return f}(t,{space:n});else{if("clip"===r||B(t,n))d=eB(t,n);else{Object.prototype.hasOwnProperty.call(eS,r)&&({method:r,jnd:h,deltaEMethod:l,blackWhiteClamp:c}=eS[r]);let s=D;if(""!==l){for(let t in ew)if("deltae"+l.toLowerCase()===t.toLowerCase()){s=ew[t];break}}let a=eF(eB(t,n),{method:"clip",space:n});if(s(t,a)>h){if(3===Object.keys(c).length){let r=i.A.resolveCoord(c.channel),n=M(eB(t,r.space),r.id);if(o.$I(n)&&(n=0),n>=c.max)return eB({space:"xyz-d65",coords:u.FL.D65},t.space);if(n<=c.min)return eB({space:"xyz-d65",coords:[0,0,0]},t.space)}let a=i.A.resolveCoord(r),l=a.space,p=a.id,f=eB(t,l);f.coords.forEach((t,r)=>{o.$I(t)&&(f.coords[r]=0)});let g=(a.range||a.refRange)[0],m=function(t){let r=t?Math.floor(Math.log10(Math.abs(t))):0;return Math.max(parseFloat(`1e${r-2}`),1e-6)}(h),y=g,v=M(f,p);for(;v-y>m;){let t=O(f);s(f,t=eF(t,{space:n,method:"clip"}))-h<m?y=M(f,p):v=M(f,p),I(f,p,(y+v)/2)}d=eB(f,n)}else d=a}if("clip"===r||!B(d,n,{epsilon:0})){let t=Object.values(n.coords).map(t=>t.range||[]);d.coords=d.coords.map((r,n)=>{let[i,s]=t[n];return void 0!==i&&(r=Math.max(i,r)),void 0!==s&&(r=Math.min(r,s)),r})}}return n!==t.space&&(d=eB(d,t.space)),t.coords=d.coords,t}eF.returns="color";let eN={WHITE:{space:F,coords:[1,0,0]},BLACK:{space:F,coords:[0,0,0]}};function eB(t,r,{inGamut:n}={}){t=(0,s.A)(t);let o=(r=i.A.get(r)).from(t),a={space:r,coords:o,alpha:t.alpha};return n&&(a=eF(a,!0===n?void 0:n)),a}eB.returns="color";var ek=n(8781);a.A.interpolationSpace="lab";var eM=n(181),eT=n(9821);let eI=new eT.A({id:"p3-linear",cssId:"--display-p3-linear",name:"Linear P3",white:"D65",toXYZ_M:[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],fromXYZ_M:[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]]}),eO=new eT.A({id:"p3",cssId:"display-p3",name:"P3",base:eI,fromBase:eM.A.fromBase,toBase:eM.A.toBase}),eL=new i.A({id:"hsl",name:"HSL",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:eM.A,fromBase:t=>{let r=Math.max(...t),n=Math.min(...t),[i,s,o]=t,[a,u,l]=[NaN,0,(n+r)/2],h=r-n;if(0!==h){switch(u=0===l||1===l?0:(r-l)/Math.min(l,1-l),r){case i:a=(s-o)/h+6*(s<o);break;case s:a=(o-i)/h+2;break;case o:a=(i-s)/h+4}a*=60}return u<0&&(a+=180,u=Math.abs(u)),a>=360&&(a-=360),[a,100*u,100*l]},toBase:t=>{let[r,n,i]=t;function s(t){let s=(t+r/30)%12,o=n*Math.min(i,1-i);
1return i-o*Math.max(-1,Math.min(s-3,9-s,1))}return(r%=360)<0&&(r+=360),n/=100,i/=100,[s(0),s(8),s(4)]},formats:{hsl:{coords:["<number> | <angle>","<percentage>","<percentage>"]},hsla:{coords:["<number> | <angle>","<percentage>","<percentage>"],commas:!0,lastAlpha:!0}}}),eP=new i.A({id:"hsv",name:"HSV",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},v:{range:[0,100],name:"Value"}},base:eL,fromBase(t){let[r,n,i]=t,s=(i/=100)+(n/=100)*Math.min(i,1-i);return[r,0===s?0:200*(1-i/s),100*s]},toBase(t){let[r,n,i]=t,s=(i/=100)*(1-(n/=100)/2);return[r,0===s||1===s?0:(i-s)/Math.min(s,1-s)*100,100*s]},formats:{color:{id:"--hsv",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}}),eR=new i.A({id:"hwb",name:"HWB",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},w:{range:[0,100],name:"Whiteness"},b:{range:[0,100],name:"Blackness"}},base:eP,fromBase(t){let[r,n,i]=t;return[r,i*(100-n)/100,100-i]},toBase(t){let[r,n,i]=t,s=(n/=100)+(i/=100);if(s>=1)return[r,0,n/s*100];let o=1-i;return[r,100*(0===o?0:1-n/o),100*o]},formats:{hwb:{coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}}),ez=new i.A({id:"oklch",name:"Oklch",coords:{l:{refRange:[0,1],name:"Lightness"},c:{refRange:[0,.4],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},white:"D65",base:F,fromBase(t){let r,[n,i,s]=t;return r=2e-4>Math.abs(i)&&2e-4>Math.abs(s)?NaN:180*Math.atan2(s,i)/Math.PI,[n,Math.sqrt(i**2+s**2),m(r)]},toBase(t){let r,n,[i,s,o]=t;return isNaN(o)?(r=0,n=0):(r=s*Math.cos(o*Math.PI/180),n=s*Math.sin(o*Math.PI/180)),[i,r,n]},formats:{oklch:{coords:["<percentage> | <number>","<number> | <percentage>[0,1]","<number> | <angle>"]}}});var eU=n(1024);let e$=(t,r,n,i,s,o)=>{let a=(t-r)/(n-r)*(s-i)+i;return o&&(a=Math.min(a=Math.max(a,Math.min(i,s)),Math.max(i,s))),a},ej={};class eV{_color;mode;static colorMap={};static #e={};static #t={};static addColorMode(t,r){i.A.register(r),eV.colorMap[t]=r.id,eV.#e[t]=Object.values(r.coords).reduce((t,r)=>(t.push(r.refRange||r.range),t),[]),eV.#e[t].push([0,1]),eV.#t[t]=r.fromGray}constructor(t,r,n,{clamp:i=!1}={}){if(this.mode=r||eq,t instanceof eV){let n=r?eV.colorMap[r]:eV.colorMap[t.mode];this._color=eB(t._color,n),this.mode=n}else if("object"!=typeof t||Array.isArray(t)||null===t)if("string"==typeof t[0])try{this._color=(0,ek.A)(t[0]);let[r]=Object.entries(eV.colorMap).find(([t,r])=>r===this._color.spaceId);this.mode=r,this._color=eB(this._color,this._color.spaceId)}catch(t){throw Error("Invalid color string")}else{let r;if(n)if(4===t.length)r=eV.mapColorRange(t,this.mode,n,i);else if(3===t.length)(r=eV.mapColorRange([t[0],t[1],t[2]],this.mode,n,i)).push(1);else if(2===t.length){r=eV.#t[this.mode]?eV.#t[this.mode](t[0],n,i):eV.mapColorRange([t[0],t[0],t[0]],this.mode,n,i);let s=Array.isArray(n[n.length-1])?n[n.length-1]:[0,n[n.length-1]];
1r.push(e$(t[1],s[0],s[1],0,1,i))}else if(1===t.length)(r=eV.#t[this.mode]?eV.#t[this.mode](t[0],n,i):eV.mapColorRange([t[0],t[0],t[0]],this.mode,n,i)).push(1);else throw Error("Invalid color");else r=t;let s=eV.colorMap[this.mode]||console.error("Invalid color mode"),o={space:s,coords:r.slice(0,3),alpha:r[3]};this._color=eB(o,s)}else{let n=r?eV.colorMap[r]:t.spaceId;this._color=eB(t,n),this.mode=r||Object.entries(eV.colorMap).find(([t,r])=>r===this._color.spaceId)}}static mapColorRange(t,r,n,i){let s=n.map(t=>Array.isArray(t)?t:[0,t]),o=eV.#e[r];return t.map((t,r)=>e$(t,s[r][0],s[r][1],o[r][0],o[r][1],i))}static unmapColorRange(t,r,n){let i=n.map(t=>Array.isArray(t)?t:[0,t]),s=eV.#e[r];return t.map((t,r)=>e$(t,s[r][0],s[r][1],i[r][0],i[r][1]))}#r(t){return new eV(this._color,t)}get _array(){return this._getRGBA()}array(){return this._array}lerp(t,r,n){let u=-1;for(;(u+1<this._color.space.path.length||u+1<t._color.space.path.length)&&this._color.space.path[u+1]===t._color.space.path[u+1];)u+=1;if(-1===u)throw Error("Cannot lerp colors. No common color space found");return new eV((function t(r,n,u={}){var l;if(l=r,"function"===(0,o.NW)(l)&&l.rangeArgs){let[i,s]=[r,n];return t(...i.rangeArgs.colors,{...i.rangeArgs.options,...s})}let{space:h,outputSpace:c,progression:d,premultiplied:p}=u;r=(0,s.A)(r),n=(0,s.A)(n),r=O(r),n=O(n);let f={colors:[r,n],options:u};if(h=h?i.A.get(h):i.A.registry[a.A.interpolationSpace]||r.space,c=c?i.A.get(c):h,r=eB(r,h),n=eB(n,h),r=eF(r),n=eF(n),h.coords.h&&"angle"===h.coords.h.type){let t=u.hue=u.hue||"shorter",i=[h,"h"],[s,o]=[M(r,i),M(n,i)];isNaN(s)&&!isNaN(o)?s=o:isNaN(o)&&!isNaN(s)&&(o=s),[s,o]=function(t,r){if("raw"===t)return r;let[n,i]=r.map(m),s=i-n;return"increasing"===t?s<0&&(i+=360):"decreasing"===t?s>0&&(n+=360):"longer"===t?-180<s&&s<180&&(s>0?n+=360:i+=360):"shorter"===t&&(s>180?n+=360:s<-180&&(i+=360)),[n,i]}(t,[s,o]),I(r,i,s),I(n,i,o)}return p&&(r.coords=r.coords.map(t=>t*r.alpha),n.coords=n.coords.map(t=>t*n.alpha)),Object.assign(t=>{t=d?d(t):t;let i=r.coords.map((r,i)=>{let s=n.coords[i];return(0,o.GW)(r,s,t)}),s=(0,o.GW)(r.alpha,n.alpha,t),a={space:h,coords:i,alpha:s};return p&&(a.coords=a.coords.map(t=>t/s)),c!==h&&(a=eB(a,c)),a},{rangeArgs:f})})(this._color,t._color,{space:this._color.space.path[u].id})(r),n||this.mode)}toString(t){let r=`${this._color.space.id}-${this._color.coords.join(",")}-${this._color.alpha}-${t}`,n=ej[r];return n||(n=function(t,{precision:r=a.A.precision,format:n="default",inGamut:u=!0,...l}={}){let h;t=(0,s.A)(t);let c=n;n=t.space.getFormat(n)??t.space.getFormat("default")??i.A.DEFAULT_FORMAT;let d=t.coords.slice();if((u||=n.toGamut)&&!B(t)&&(d=eF(O(t),!0===u?void 0:u).coords),"custom"===n.type)if(l.precision=r,n.serialize)h=n.serialize(d,t.alpha,l);else throw TypeError(`format ${c} can only be used to parse colors, not for serialization`);else{let i=n.name||"color";n.serializeCoords?d=n.serializeCoords(d,r):null!==r&&(d=d.map(t=>o.g1(t,{precision:r})));let s=[...d];if("color"===i){let r=n.id||n.ids?.[0]||t.space.id;s.unshift(r)}let a=t.alpha;null!==r&&(a=o.g1(a,{precision:r}));let u=t.alpha>=1||n.noAlpha?"":`${n.commas?",":" /"} ${a}`;h=`${i}(${s.join(n.commas?", ":" ")}${u})`}return h}(this._color,{format:t}),ej[r]=n),n}setRed(t,r=[0,1]){Array.isArray(r)||(r=[0,r]);let n=eV.#e[eq][0],i=e$(t,r[0],r[1],n[0],n[1]);if(this.mode===eq||this.mode===eW)this._color.coords[0]=i;else{let t=this._color.space.id,r=eB(this._color,"srgb");r.coords[0]=i,this._color=eB(r,t)}}setGreen(t,r=[0,1]){Array.isArray(r)||(r=[0,r]);let n=eV.#e[eq][1],i=e$(t,r[0],r[1],n[0],n[1]);if(this.mode===eq||this.mode===eW)this._color.coords[1]=i;else{let t=this._color.space.id,r=eB(this._color,"srgb");r.coords[1]=i,this._color=eB(r,t)}}setBlue(t,r=[0,1]){Array.isArray(r)||(r=[0,r]);let n=eV.#e[eq][2],i=e$(t,r[0],r[1],n[0],n[1]);if(this.mode===eq||this.mode===eW)this._color.coords[2]=i;else{let t=this._color.space.id,r=eB(this._color,"srgb");r.coords[2]=i,this._color=eB(r,t)}}setAlpha(t,r=[0,1]){Array.isArray(r)||(r=[0,r]);let n=eV.#e[this.mode][3],i=e$(t,r[0],r[1],n[0],n[1]);this._color.alpha=i}_getRGBA(t=[1,1,1,1]){let r=eV.#e[eq],n=structuredClone(eB(this._color,"srgb").coords);n.push(this._color.alpha);let i=t.map(t=>Array.isArray(t)?t:[0,t]);return n.map((t,n)=>e$(t,r[n][0],r[n][1],i[n][0],i[n][1]))}_getMode(){return this.mode}_getRed(t=[0,1]){if(Array.isArray(t)||(t=[0,t]),this.mode===eq||this.mode===eW){let r=eV.#e[this.mode][0];return e$(this._color.coords[0],r[0],r[1],t[0],t[1])}{let r=eV.#e[eq][0];return e$(eB(this._color,"srgb").coords[0],r[0],r[1],t[0],t[1])}}_getGreen(t=[0,1]){if(Array.isArray(t)||(t=[0,t]),this.mode===eq||this.mode===eW){let r=eV.#e[this.mode][1];return e$(this._color.coords[1],r[0],r[1],t[0],t[1])}{let r=eV.#e[eq][1];return e$(eB(this._color,"srgb").coords[1],r[0],r[1],t[0],t[1])}}_getBlue(t=[0,1]){if(Array.isArray(t)||(t=[0,t]),this.mode===eq||this.mode===eW){let r=eV.#e[this.mode][2];return e$(this._color.coords[2],r[0],r[1],t[0],t[1])}{let r=eV.#e[eq][2];return e$(eB(this._color,"srgb").coords[2],r[0],r[1],t[0],t[1])}}_getAlpha(t=[0,1]){Array.isArray(t)||(t=[0,t]);let r=eV.#e[this.mode][3];return e$(this._color.alpha,r[0],r[1],t[0],t[1])}_getHue(t=[0,360]){if(Array.isArray(t)||(t=[0,t]),this.mode===eH||this.mode===eZ){let r=eV.#e[this.mode][0];return e$(this._color.coords[0],r[0],r[1],t[0],t[1])}{let r=eV.#e[eZ][0];return e$(eB(this._color,"hsl").coords[0],r[0],r[1],t[0],t[1])}}_getSaturation(t=[0,100]){if(Array.isArray(t)||(t=[0,t]),this.mode===eH||this.mode===eZ){let r=eV.#e[this.mode][1];return e$(this._color.coords[1],r[0],r[1],t[0],t[1])}{let r=eV.#e[eZ][1];return e$(eB(this._color,"hsl").coords[1],r[0],r[1],t[0],t[1])}}_getBrightness(t=[0,100]){if(Array.isArray(t)||(t=[0,t]),this.mode===eH){let r=eV.#e[this.mode][2];return e$(this._color.coords[2],r[0],r[1],t[0],t[1])}{let r=eV.#e[eH][2];return e$(eB(this._color,"hsb").coords[2],r[0],r[1],t[0],t[1])}}_getLightness(t=[0,100]){if(Array.isArray(t)||(t=[0,t]),this.mode===eZ){let r=eV.#e[this.mode][2];return e$(this._color.coords[2],r[0],r[1],t[0],t[1])}{let r=eV.#e[eZ][2];return e$(eB(this._color,"hsl").coords[2],r[0],r[1],t[0],t[1])}}}function eG(t,r,n){t.Color=eV,eM.A.fromGray=eO.fromGray=function(t,r,n){let i=r.map(t=>Array.isArray(t)?t:[0,t]),s=e$(t,i[2][0],i[2][1],0,1,n);return[s,s,s]},eU.A.fromGray=eL.fromGray=function(t,r,n){let i=r.map(t=>Array.isArray(t)?t:[0,t]);return[0,0,e$(t,i[2][0],i[2][1],0,100,n)]},eR.fromGray=function(t,r,n){let i,s,o=r.map(t=>Array.isArray(t)?t:[0,t]),a=e$(t,0,Math.abs(o[1][0]-o[1][1])/2+Math.abs(o[2][0]-o[2][1])/2,0,100);return a<50?(s=a,i=100-a):a>=50&&(i=a,s=100-a),[0,i,s]},g.fromGray=y.fromGray=F.fromGray=ez.fromGray=function(t,r,n){let i=r.map(t=>Array.isArray(t)?t:[0,t]);return[e$(t,i[0][0],i[0][1],0,100,n),0,0]},t.Color.addColorMode(eq,eM.A),t.Color.addColorMode(eW,eO),t.Color.addColorMode(eH,eU.A),t.Color.addColorMode(eZ,eL),t.Color.addColorMode(eY,eR),t.Color.addColorMode(eX,g),t.Color.addColorMode(eJ,y),t.Color.addColorMode(eK,F),t.Color.addColorMode(eQ,ez),n.presetup=function(){let r=this,n=["Red","Green","Blue","Alpha"];for(let i in n){let s=n[i],o=t.Color.prototype["set"+s];t.Color.prototype["set"+s]=function(t,n){return n=n||r?._renderer?.states?.colorMaxes?.[eq][i],o.call(this,t,n)}}function i(n,i){let s=t.Color.prototype["_get"+n];t.Color.prototype["_get"+n]=function(t){if(Object.keys(i).includes(this.mode))t=t||r?._renderer?.states?.colorMaxes?.[this.mode][i[this.mode]];else{let n=Object.keys(i)[0];t=t||r?._renderer?.states?.colorMaxes?.[n][i[n]]}return s.call(this,t)}}i("Red",{[eq]:0,[eW]:0}),i("Green",{[eq]:1,[eW]:1}),i("Blue",{[eq]:2,[eW]:2}),i("Alpha",{[eq]:3,[eW]:3,[eH]:3,[eZ]:3,[eY]:3,[eX]:3,[eJ]:3,[eK]:3,[eQ]:3}),i("Hue",{[eZ]:0,[eH]:0,[eY]:0,[eJ]:2,[eQ]:2}),i("Saturation",{[eZ]:1,[eH]:1}),i("Brightness",{[eH]:2}),i("Lightness",{[eZ]:2})}}"undefined"!=typeof p5&&eG(p5,p5.prototype);let eq="rgb",eW="rgbhdr",eH="hsb",eZ="hsl",eY="hwb",eX="lab",eJ="lch",eK="oklab",eQ="oklch",e0="rgba";function e1(t,r){r.RGB=eq,r.RGBHDR=eW,r.HSB=eH,r.HSL=eZ,r.HWB=eY,r.LAB=eX,r.LCH=eJ,r.OKLAB=eK,r.OKLCH=eQ,r.RGBA=e0,t.Renderer.states.colorMode=eq,t.Renderer.states.colorMaxes={[eq]:[255,255,255,255],[eW]:[255,255,255,255],[eH]:[360,100,100,1],[eZ]:[360,100,100,1],[eY]:[360,100,100,1],[eX]:[100,[-125,125],[-125,125],1],[eJ]:[100,150,360,1],[eK]:[100,[-125,125],[-125,125],1],[eQ]:[100,150,360,1],clone:function(){let t={...this};for(let r in t)t[r]instanceof Array&&(t[r]=[...t[r]]);return t}},r.color=function(...t){return t[0]instanceof eV?t[0]:new eV(Array.isArray(t[0])?t[0]:t,this._renderer.states.colorMode,this._renderer.states.colorMaxes[this._renderer.states.colorMode],{clamp:!0})},r.red=function(t){return this.color(t)._getRed()},r.green=function(t){return this.color(t)._getGreen()},r.blue=function(t){return this.color(t)._getBlue()},r.alpha=function(t){return this.color(t)._getAlpha()},r.hue=function(t){return this.color(t)._getHue()},r.saturation=function(t){return this.color(t)._getSaturation()},r.brightness=function(t){return this.color(t)._getBrightness()},r.lightness=function(t){return this.color(t)._getLightness()},r.lerpColor=function(t,r,n){return t.lerp(r,n,this._renderer.states.colorMode)},r.paletteLerp=function(t,r){let n=t[0];if(r<n[1])return this.color(n[0]);for(let n=1;n<t.length;n++){let i=t[n];if(r<i[1]){let s=t[n-1];return this.lerpColor(this.color(s[0]),this.color(i[0]),(r-s[1])/(i[1]-s[1]))}}return this.color(t[t.length-1][0])}}"undefined"!=typeof p5&&e1(p5,p5.prototype)},172:(t,r,n)=>{"use strict";n.d(r,{A:()=>i});let i={gamut_mapping:"css",precision:5,deltaE:"76",verbose:globalThis?.process?.env?.NODE_ENV?.toLowerCase()!=="test",warn:function(t){this.verbose&&globalThis?.console?.warn?.(t)}}},181:(t,r,n)=>{"use strict";n.d(r,{A:()=>l});var i=n(9821);let s=new i.A({id:"srgb-linear",name:"Linear sRGB",white:"D65",toXYZ_M:[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],fromXYZ_M:[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]]}),o={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[.6,50/255,.8],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,.6],lightslategrey:[119/255,136/255,.6],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[.4,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,.8],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[.4,.2,.6],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]},a=[,,,].fill("<percentage> | <number>[0, 255]"),u=[,,,].fill("<number>[0, 255]"),l=new i.A({id:"srgb",name:"sRGB",base:s,fromBase:t=>t.map(t=>{let r=t<0?-1:1,n=t*r;return n>.0031308?r*(1.055*n**(1/2.4)-.055):12.92*t}),toBase:t=>t.map(t=>{let r=t<0?-1:1,n=t*r;return n<=.04045?t/12.92:r*((n+.055)/1.055)**2.4}),formats:{rgb:{coords:a},rgb_number:{name:"rgb",commas:!0,coords:u,noAlpha:!0},color:{},rgba:{coords:a,commas:!0,lastAlpha:!0},rgba_number:{name:"rgba",commas:!0,coords:u},hex:{type:"custom",toGamut:!0,test:t=>/^#([a-f0-9]{3,4}){1,2}$/i.test(t),parse(t){t.length<=5&&(t=t.replace(/[a-f0-9]/gi,"$&$&"));let r=[];return t.replace(/[a-f0-9]{2}/gi,t=>{r.push(parseInt(t,16)/255)}),{spaceId:"srgb",coords:r.slice(0,3),alpha:r.slice(3)[0]}},serialize:(t,r,{collapse:n=!0}={})=>{r<1&&t.push(r),t=t.map(t=>Math.round(255*t));let i=n&&t.every(t=>t%17==0);return"#"+t.map(t=>i?(t/17).toString(16):t.toString(16).padStart(2,"0")).join("")}},keyword:{type:"custom",test:t=>/^[a-z]+$/i.test(t),parse(t){t=t.toLowerCase();let r={spaceId:"srgb",coords:null,alpha:1};if("transparent"===t?(r.coords=o.black,r.alpha=0):r.coords=o[t],r.coords)return r}}}})},428:(t,r,n)=>
vendor: 10,753 bytes, line 1
1{var i=n(8391),s=n(1613),o=n(1121).C,a=n(7512),u=n(2605).g;function l(t,r){var n=t;return"string"==typeof t&&(n=i.parseSourceMapInput(t)),null!=n.sections?new d(n,r):new h(n,r)}function h(t,r){var n=t;"string"==typeof t&&(n=i.parseSourceMapInput(t));var s=i.getArg(n,"version"),a=i.getArg(n,"sources"),u=i.getArg(n,"names",[]),l=i.getArg(n,"sourceRoot",null),h=i.getArg(n,"sourcesContent",null),c=i.getArg(n,"mappings"),d=i.getArg(n,"file",null);if(s!=this._version)throw Error("Unsupported version: "+s);l&&(l=i.normalize(l)),a=a.map(String).map(i.normalize).map(function(t){return l&&i.isAbsolute(l)&&i.isAbsolute(t)?i.relative(l,t):t}),this._names=o.fromArray(u.map(String),!0),this._sources=o.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map(function(t){return i.computeSourceURL(l,t,r)}),this.sourceRoot=l,this.sourcesContent=h,this._mappings=c,this._sourceMapURL=r,this.file=d}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function d(t,r){var n=t;"string"==typeof t&&(n=i.parseSourceMapInput(t));var s=i.getArg(n,"version"),a=i.getArg(n,"sections");if(s!=this._version)throw Error("Unsupported version: "+s);this._sources=new o,this._names=new o;var u={line:-1,column:0};this._sections=a.map(function(t){if(t.url)throw Error("Support for url field in sections not implemented.");var n=i.getArg(t,"offset"),s=i.getArg(n,"line"),o=i.getArg(n,"column");if(s<u.line||s===u.line&&o<u.column)throw Error("Section offsets must be ordered and non-overlapping.");return u=n,{generatedOffset:{generatedLine:s+1,generatedColumn:o+1},consumer:new l(i.getArg(t,"map"),r)}})}l.fromSourceMap=function(t,r){return h.fromSourceMap(t,r)},l.prototype._version=3,l.prototype.__generatedMappings=null,Object.defineProperty(l.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),l.prototype.__originalMappings=null,Object.defineProperty(l.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),l.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return";"===n||","===n},l.prototype._parseMappings=function(t,r){throw Error("Subclasses must implement _parseMappings")},l.GENERATED_ORDER=1,l.ORIGINAL_ORDER=2,l.GREATEST_LOWER_BOUND=1,l.LEAST_UPPER_BOUND=2,l.prototype.eachMapping=function(t,r,n){switch(n||l.GENERATED_ORDER){case l.GENERATED_ORDER:s=this._generatedMappings;break;case l.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var s,o=this.sourceRoot;s.map(function(t){var r=null===t.source?null:this._sources.at(t.source);return{source:r=i.computeSourceURL(o,r,this._sourceMapURL),generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}},this).forEach(t,r||null)},l.prototype.allGeneratedPositionsFor=function(t){var r=i.getArg(t,"line"),n={source:i.getArg(t,"source"),originalLine:r,originalColumn:i.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(void 0===t.column)for(var l=u.originalLine;u&&u.originalLine===l;)o.push({line:i.getArg(u,"generatedLine",null),column:i.getArg(u,"generatedColumn",null),lastColumn:i.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++a];else for(var h=u.originalColumn;u&&u.originalLine===r&&u.originalColumn==h;)o.push({line:i.getArg(u,"generatedLine",null),column:i.getArg(u,"generatedColumn",null),lastColumn:i.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++a]}return o},h.prototype=Object.create(l.prototype),h.prototype.consumer=l,h.prototype._findSourceIndex=function(t){var r,n=t;if(null!=this.sourceRoot&&(n=i.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return -1},h.fromSourceMap=function(t,r){var n=Object.create(h.prototype),s=n._names=o.fromArray(t._names.toArray(),!0),a=n._sources=o.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(t){return i.computeSourceURL(n.sourceRoot,t,r)});for(var l=t._mappings.toArray().slice(),d=n.__generatedMappings=[],p=n.__originalMappings=[],f=0,g=l.length;f<g;f++){var m=l[f],y=new c;y.generatedLine=m.generatedLine,y.generatedColumn=m.generatedColumn,m.source&&(y.source=a.indexOf(m.source),y.originalLine=m.originalLine,y.originalColumn=m.originalColumn,m.name&&(y.name=s.indexOf(m.name)),p.push(y)),d.push(y)}return u(n.__originalMappings,i.compareByOriginalPositions),n},h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),h.prototype._parseMappings=function(t,r){for(var n,s,o,l,h,d=1,p=0,f=0,g=0,m=0,y=0,v=t.length,b=0,x={},_={},D=[],A=[];b<v;)if(";"===t.charAt(b))d++,b++,p=0;else if(","===t.charAt(b))b++;else{for((n=new c).generatedLine=d,l=b;l<v&&!this._charIsMappingSeparator(t,l);l++);if(o=x[s=t.slice(b,l)])b+=s.length;else{for(o=[];b<l;)a.decode(t,b,_),h=_.value,b=_.rest,o.push(h);if(2===o.length)throw Error("Found a source, but no line and column");if(3===o.length)throw Error("Found a source and line, but no column");x[s]=o}n.generatedColumn=p+o[0],p=n.generatedColumn,o.length>1&&(n.source=m+o[1],m+=o[1],n.originalLine=f+o[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=g+o[3],g=n.originalColumn,o.length>4&&(n.name=y+o[4],y+=o[4])),A.push(n),"number"==typeof n.originalLine&&D.push(n)}u(A,i.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,u(D,i.compareByOriginalPositions),this.__originalMappings=D},h.prototype._findMapping=function(t,r,n,i,o,a){if(t[n]<=0)throw TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw TypeError("Column must be greater than or equal to 0, got "+t[i]);return s.search(t,r,o,a)},h.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}},h.prototype.originalPositionFor=function(t){var r={generatedLine:i.getArg(t,"line"),generatedColumn:i.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositionsDeflated,i.getArg(t,"bias",l.GREATEST_LOWER_BOUND));if(n>=0){var s=this._generatedMappings[n];if(s.generatedLine===r.generatedLine){var o=i.getArg(s,"source",null);null!==o&&(o=this._sources.at(o),o=i.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=i.getArg(s,"name",null);return null!==a&&(a=this._names.at(a)),{source:o,line:i.getArg(s,"originalLine",null),column:i.getArg(s,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return null==t})},h.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n,s=this._findSourceIndex(t);if(s>=0)return this.sourcesContent[s];var o=t;if(null!=this.sourceRoot&&(o=i.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(n=i.urlParse(this.sourceRoot))){var a=o.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||"/"==n.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw Error('"'+o+'" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(t){var r=i.getArg(t,"source");if((r=this._findSourceIndex(r))<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:i.getArg(t,"line"),originalColumn:i.getArg(t,"column")},s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(t,"bias",l.GREATEST_LOWER_BOUND));if(s>=0){var o=this._originalMappings[s];if(o.source===n.source)return{line:i.getArg(o,"generatedLine",null),column:i.getArg(o,"generatedColumn",null),lastColumn:i.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},d.prototype=Object.create(l.prototype),d.prototype.constructor=l,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var t=[],r=0;r<this._sections.length;r++)for(var n=0;n<this._sections[r].consumer.sources.length;n++)t.push(this._sections[r].consumer.sources[n]);return t}}),d.prototype.originalPositionFor=function(t){var r={generatedLine:i.getArg(t,"line"),generatedColumn:i.getArg(t,"column")},n=s.search(r,this._sections,function(t,r){var n=t.generatedLine-r.generatedOffset.generatedLine;return n||t.generatedColumn-r.generatedOffset.generatedColumn}),o=this._sections[n];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},d.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n].consumer.sourceContentFor(t,!0);if(i)return i}if(r)return null;throw Error('"'+t+'" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(-1!==n.consumer._findSourceIndex(i.getArg(t,"source"))){var s=n.consumer.generatedPositionFor(t);if(s)return{line:s.line+(n.generatedOffset.generatedLine-1),column:s.column+(n.generatedOffset.generatedLine===s.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},d.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var s=this._sections[n],o=s.consumer._generatedMappings,a=0;a<o.length;a++){var l=o[a],h=s.consumer._sources.at(l.source);
1h=i.computeSourceURL(s.consumer.sourceRoot,h,this._sourceMapURL),this._sources.add(h),h=this._sources.indexOf(h);var c=null;l.name&&(c=s.consumer._names.at(l.name),this._names.add(c),c=this._names.indexOf(c));var d={source:h,generatedLine:l.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(s.generatedOffset.generatedLine===l.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:c};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}u(this.__generatedMappings,i.compareByGeneratedPositionsDeflated),u(this.__originalMappings,i.compareByOriginalPositions)}},529:(t,r,n)=>{"use strict";function i(t,r){r.applyMatrix=function(...t){let r=t[0]instanceof Object.getPrototypeOf(Uint8Array);return Array.isArray(t[0])||r?this._renderer.applyMatrix(...t[0]):this._renderer.applyMatrix(...t),this},r.resetMatrix=function(){return this._renderer.resetMatrix(),this},r.rotate=function(t,r){return this._renderer.rotate(this._toRadians(t),r),this},r.rotateX=function(t){return this._assert3d("rotateX"),this._renderer.rotateX(this._toRadians(t)),this},r.rotateY=function(t){return this._assert3d("rotateY"),this._renderer.rotateY(this._toRadians(t)),this},r.rotateZ=function(t){return this._assert3d("rotateZ"),this._renderer.rotateZ(this._toRadians(t)),this},r.scale=function(r,n,i){if(r instanceof t.Vector){let t=r;r=t.x,n=t.y,i=t.z}else if(Array.isArray(r)){let t=r;r=t[0],n=t[1],i=t[2]||1}return isNaN(n)?n=i=r:isNaN(i)&&(i=1),this._renderer.scale(r,n,i),this},r.shearX=function(t){let r=this._toRadians(t);return this._renderer.applyMatrix(1,0,Math.tan(r),1,0,0),this},r.shearY=function(t){let r=this._toRadians(t);return this._renderer.applyMatrix(1,Math.tan(r),0,1,0,0),this},r.translate=function(t,r,n){return this._renderer.isP3D?this._renderer.translate(t,r,n):this._renderer.translate(t,r),this},r.push=function(){this._renderer.push()},r.pop=function(){this._renderer.pop()}}n.d(r,{A:()=>i}),"undefined"!=typeof p5&&i(p5,p5.prototype)},817:(t,r,n)=>{"use strict";n.d(r,{A:()=>i});let i=new(n(7280)).A({id:"xyz-d65",name:"XYZ D65",coords:{x:{name:"X"},y:{name:"Y"},z:{name:"Z"}},white:"D65",formats:{color:{ids:["xyz-d65","xyz"]}},aliases:["xyz"]})},902:(t,r)=>{var n=Object.defineProperty;n(r,"__esModule",{value:!0}),((t,r)=>{for(var i in r)n(t,i,{get:r[i],enumerable:!0})})(r,{GIFEncoder:()=>A,applyPalette:()=>v,default:()=>F,nearestColor:()=>D,nearestColorIndex:()=>x,nearestColorIndexWithDistance:()=>_,prequantize:()=>y,quantize:()=>f,snapColorsToPalette:()=>b});var i={trailer:59};function s(t=256){let r=0,n=new Uint8Array(t);return{get buffer(){return n.buffer},reset(){r=0},bytesView:()=>n.subarray(0,r),bytes:()=>n.slice(0,r),writeByte(t){i(r+1),n[r]=t,r++},writeBytes(t,s=0,o=t.length){i(r+o);for(let i=0;i<o;i++)n[r++]=t[i+s]}
1,writeBytesView(t,s=0,o=t.byteLength){i(r+o),n.set(t.subarray(s,s+o),r),r+=o}};function i(t){var i=n.length;if(i>=t)return;t=Math.max(t,i*(i<1048576?2:1.125)>>>0),0!=i&&(t=Math.max(t,256));let s=n;n=new Uint8Array(t),r>0&&n.set(s.subarray(0,r),0)}}var o=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],a=function(t,r,n,i,a=s(512),u=new Uint8Array(256),l=new Int32Array(5003),h=new Int32Array(5003)){let c=l.length,d=Math.max(2,i);u.fill(0),h.fill(0),l.fill(-1);let p=0,f=0,g=d+1,m=!1,y=g,v=(1<<y)-1,b=1<<g-1,x=b+1,_=b+2,D=0,A=n[0],C=0;for(let t=c;t<65536;t*=2)++C;C=8-C,a.writeByte(d),w(b);let E=n.length;for(let t=1;t<E;t++)e:{let r=n[t],i=(r<<12)+A,s=r<<C^A;if(l[s]===i){A=h[s];break e}let o=0===s?1:c-s;for(;l[s]>=0;)if((s-=o)<0&&(s+=c),l[s]===i){A=h[s];break e}w(A),A=r,_<4096?(h[s]=_++,l[s]=i):(l.fill(-1),_=b+2,m=!0,w(b))}return w(A),w(x),a.writeByte(0),a.bytesView();function w(t){for(p&=o[f],f>0?p|=t<<f:p=t,f+=y;f>=8;)u[D++]=255&p,D>=254&&(a.writeByte(D),a.writeBytesView(u,0,D),D=0),p>>=8,f-=8;if((_>v||m)&&(m?(v=(1<<(y=g))-1,m=!1):v=12==++y?1<<y:(1<<y)-1),t==x){for(;f>0;)u[D++]=255&p,D>=254&&(a.writeByte(D),a.writeBytesView(u,0,D),D=0),p>>=8,f-=8;D>0&&(a.writeByte(D),a.writeBytesView(u,0,D),D=0)}}};function u(t,r,n){return t<<8&63488|r<<2&992|n>>3}function l(t,r,n,i){return t>>4|240&r|(240&n)<<4|(240&i)<<8}function h(t,r,n){return t>>4<<8|240&r|n>>4}function c(t,r,n){return t<r?r:t>n?n:t}function d(t,r,n){var i=0,s=1e100;let o=t[r],a=o.cnt,u=o.ac,l=o.rc,h=o.gc,c=o.bc;for(var d=o.fw;0!=d;d=t[d].fw){let r=t[d],o=r.cnt,v=a*o/(a+o);if(v>=s)continue;var p,f,g,m,y=0;if(n&&(y+=v*((p=r.ac-u)*p))>=s)continue;if(!((y+=v*((f=r.rc-l)*f))>=s))!((y+=v*((g=r.gc-h)*g))>=s)&&((y+=v*((m=r.bc-c)*m))>=s||(s=y,i=d))}o.err=s,o.nn=i}function p(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function f(t,r,n={}){let{format:i="rgb565",clearAlpha:s=!0,clearAlphaColor:o=0,clearAlphaThreshold:a=0,oneBitAlpha:g=!1}=n;if(!t||!t.buffer||!(t instanceof Uint8Array)&&!(t instanceof Uint8ClampedArray))throw Error("quantize() expected RGBA Uint8Array data");let m=new Uint32Array(t.buffer),y=!1!==n.useSqrt,v="rgba4444"===i,b=function(t,r){let n=Array("rgb444"===r?4096:65536),i=t.length;if("rgba4444"===r)for(let r=0;r<i;++r){let i=t[r],s=i>>24&255,o=i>>16&255,a=i>>8&255,u=255&i,h=l(u,a,o,s),c=h in n?n[h]:n[h]=p();c.rc+=u,c.gc+=a,c.bc+=o,c.ac+=s,c.cnt++}else if("rgb444"===r)for(let r=0;r<i;++r){let i=t[r],s=i>>16&255,o=i>>8&255,a=255&i,u=h(a,o,s),l=u in n?n[u]:n[u]=p();l.rc+=a,l.gc+=o,l.bc+=s,l.cnt++}else for(let r=0;r<i;++r){let i=t[r],s=i>>16&255,o=i>>8&255,a=255&i,l=u(a,o,s),h=l in n?n[l]:n[l]=p();h.rc+=a,h.gc+=o,h.bc+=s,h.cnt++}return n}(m,i),x=b.length,_=x-1,D=new Uint32Array(x+1);for(var A=0,C=0;C<x;++C){let t=b[C];if(null!=t){var E=1/t.cnt;v&&(t.ac*=E),t.rc*=E,t.gc*=E,t.bc*=E,b[A++]=t}}r*r/A<.022&&(y=!1);for(var C=0;C<A-1;++C)b[C].fw=C+1,b[C+1].bk=C,y&&(b[C].cnt=Math.sqrt(b[C].cnt));for(y&&(b[C].cnt=Math.sqrt(b[C].cnt)),C=0;C<A;++C){d(b,C,!1);var w=b[C].err;for(N=++D[0];N>1&&!(b[F=D[B=N>>1]].err<=w);N=B)D[N]=F;D[N]=C}var S=A-r;for(C=0;C<S;){for(;;){var F,N,B,k,M=D[1];if((k=b[M]).tm>=k.mtm&&b[k.nn].mtm<=k.tm)break;k.mtm==_?M=D[1]=D[D[0]--]:(d(b,M,!1),k.tm=C);var w=b[M].err;for(N=1;(B=N+N)<=D[0]&&(B<D[0]&&b[D[B]].err>b[D[B+1]].err&&B++,!(w<=b[F=D[B]].err));N=B)D[N]=F;D[N]=M}var T=b[k.nn],I=k.cnt,O=T.cnt,E=1/(I+O);v&&(k.ac=E*(I*k.ac+O*T.ac)),k.rc=E*(I*k.rc+O*T.rc),k.gc=E*(I*k.gc+O*T.gc),k.bc=E*(I*k.bc+O*T.bc),k.cnt+=T.cnt,k.mtm=++C,b[T.bk].fw=T.fw,b[T.fw].bk=T.bk,T.mtm=_}let L=[];var P=0;for(C=0;;++P){let t=c(Math.round(b[C].rc),0,255),r=c(Math.round(b[C].gc),0,255),n=c(Math.round(b[C].bc),0,255),i=255;v&&(i=c(Math.round(b[C].ac),0,255),g&&(i=i<=("number"==typeof g?g:127)?0:255),s&&i<=a&&(t=r=n=o,i=0));let u=v?[t,r,n,i]:[t,r,n];if(!function(t,r){for(let n=0;n<t.length;n++){let i=t[n],s=i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2],o=!(i.length>=4)||!(r.length>=4)||i[3]===r[3];if(s&&o)return!0}return!1}(L,u)&&L.push(u),0==(C=b[C].fw))break}return L}function g(t,r){var n,i=0;for(n=0;n<t.length;n++){let s=t[n]-r[n];i+=s*s}return i}function m(t,r){return r>1?Math.round(t/r)*r:t}function y(t,{roundRGB:r=5,roundAlpha:n=10,oneBitAlpha:i=null}={}){let s=new Uint32Array(t.buffer);for(let t=0;t<s.length;t++){let o=s[t],a=o>>24&255,u=o>>16&255,l=o>>8&255,h=255&o;a=m(a,n),i&&(a=a<=("number"==typeof i?i:127)?0:255),h=m(h,r),l=m(l,r),u=m(u,r),s[t]=a<<24|u<<16|l<<8|(0|h)}}function v(t,r,n="rgb565"){if(!t||!t.buffer||!(t instanceof Uint8Array)&&!(t instanceof Uint8ClampedArray))throw Error("quantize() expected RGBA Uint8Array data");if(r.length>
1256)throw Error("applyPalette() only works with 256 colors or less");let i=new Uint32Array(t.buffer),s=i.length,o=new Uint8Array(s),a=Array("rgb444"===n?4096:65536);if("rgba4444"===n)for(let t=0;t<s;t++){let n=i[t],s=n>>24&255,u=n>>16&255,h=n>>8&255,c=255&n,d=l(c,h,u,s),p=d in a?a[d]:a[d]=function(t,r,n,i,s){let o=0,a=1e100;for(let u=0;u<s.length;u++){let l=s[u],h=function(t){return t*t}(l[3]-i);!(h>a||(h+=function(t){return t*t}(l[0]-t))>a||(h+=function(t){return t*t}(l[1]-r))>a)&&((h+=function(t){return t*t}(l[2]-n))>a||(a=h,o=u))}return o}(c,h,u,s,r);o[t]=p}else{let t="rgb444"===n?h:u;for(let n=0;n<s;n++){let s=i[n],u=s>>16&255,l=s>>8&255,h=255&s,c=t(h,l,u),d=c in a?a[c]:a[c]=function(t,r,n,i){let s=0,o=1e100;for(let a=0;a<i.length;a++){let u=i[a],l=function(t){return t*t}(u[0]-t);!(l>o||(l+=function(t){return t*t}(u[1]-r))>o)&&((l+=function(t){return t*t}(u[2]-n))>o||(o=l,s=a))}return s}(h,l,u,r);o[n]=d}}return o}function b(t,r,n=5){if(!t.length||!r.length)return;let i=t.map(t=>t.slice(0,3)),s=n*n,o=t[0].length;for(let n=0;n<r.length;n++){let a=r[n],u=_(i,(a=a.length<o?[a[0],a[1],a[2],255]:a.length>o?a.slice(0,3):a.slice()).slice(0,3),g),l=u[0],h=u[1];h>0&&h<=s&&(t[l]=a)}}function x(t,r,n=g){let i=1/0,s=-1;for(let o=0;o<t.length;o++){let a=n(r,t[o]);a<i&&(i=a,s=o)}return s}function _(t,r,n=g){let i=1/0,s=-1;for(let o=0;o<t.length;o++){let a=n(r,t[o]);a<i&&(i=a,s=o)}return[s,i]}function D(t,r,n=g){return t[x(t,r,n)]}function A(t={}){let{initialCapacity:r=4096,auto:n=!0}=t,o=s(r),u=new Uint8Array(256),l=new Int32Array(5003),h=new Int32Array(5003),c=!1;return{reset(){o.reset(),c=!1},finish(){o.writeByte(i.trailer)},bytes:()=>o.bytes(),bytesView:()=>o.bytesView(),get buffer(){return o.buffer},get stream(){return o},writeHeader:d,writeFrame(t,r,i,s={}){var p,f,g,m,y,v,b,x,_;let{transparent:D=!1,transparentIndex:A=0,delay:F=0,palette:N=null,repeat:B=0,colorDepth:k=8,dispose:M=-1}=s,T=!1;if(n?c||(T=!0,d(),c=!0):T=!!s.first,r=Math.max(0,Math.floor(r)),i=Math.max(0,Math.floor(i)),T){if(!N)throw Error("First frame must include a { palette } option");(function(t,r,n,i,s=8){let o=S(i.length)-1;E(t,r),E(t,n),t.writeBytes([128|s-1<<4|o,0,0])})(o,r,i,N,k),C(o,N),B>=0&&(p=o,f=B,p.writeByte(33),p.writeByte(255),p.writeByte(11),w(p,"NETSCAPE2.0"),p.writeByte(3),p.writeByte(1),E(p,f),p.writeByte(0))}g=o,m=M,y=Math.round(F/10),v=D,b=A,g.writeByte(33),g.writeByte(249),g.writeByte(4),b<0&&(b=0,v=!1),v?(x=1,_=2):(x=0,_=0),m>=0&&(_=7&m),_<<=2,g.writeByte(0|_|x),E(g,y),g.writeByte(b||0),g.writeByte(0);let I=!!N&&!T;(function(t,r,n,i){if(t.writeByte(44),E(t,0),E(t,0),E(t,r),E(t,n),i){let r=S(i.length)-1;t.writeByte(128|r)}else t.writeByte(0)})(o,r,i,I?N:null),I&&C(o,N),function(t,r,n,i,s=8,o,u,l){a(n,i,r,s,t,o,u,l)}(o,t,r,i,k,u,l,h)}};function d(){w(o,"GIF89a")}}function C(t,r){let n=1<<S(r.length);for(let i=0;i<n;i++){let n=[0,0,0];i<r.length&&(n=r[i]),t.writeByte(n[0]),t.writeByte(n[1]),t.writeByte(n[2])}}function E(t,r){t.writeByte(255&r),t.writeByte(r>>8&255)}function w(t,r){for(var n=0;n<r.length;n++)t.writeByte(r.charCodeAt(n))}function S(t){return Math.max(Math.ceil(Math.log2(t)),1)}var F=A},1024:(t,r,n)=>{"use strict";n.d(r,{A:()=>o});var i=n(7280),s=n(181),o=new i.A({id:"hsb",name:"HSB",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},b:{range:[0,100],name:"Brightness"}},base:s.A,fromBase:t=>{let r,n,i=Math.max(...t),s=i-Math.min(...t),[o,a,u]=t;return 0===s?(r=0,n=0):(n=s/i,o===i?r=(a-u)/s:a===i?r=2+(u-o)/s:u===i&&(r=4+(o-a)/s),r<0?r+=6:r>=6&&(r-=6)),[r/6*360,100*n,100*i]},toBase:a,formats:{default:{type:"custom",serialize:(t,r)=>{let n=a(t),i=`rgb(${Math.round(100*n[0]*100)/100}% ${Math.round(100*n[1]*100)/100}% ${Math.round(100*n[2]*100)/100}%`;return r<1&&(i+=` / ${r}`),i+=")"}},hsb:{coords:["<number> | <angle>","<percentage>","<percentage>"]},hsba:{coords:["<number> | <angle>","<percentage>","<percentage>"],commans:!0,lastAlpha:!0}}});function a(t){let r=t[0]/360*6,n=t[1]/100,i=t[2]/100,s=[];if(0===n)s=[i,i,i];else{let t,o,a,u=Math.floor(r),l=i*(1-n),h=i*(1-n*(r-u)),c=i*(1-n*(1+u-r));1===u?(t=h,o=i,a=l):2===u?(t=l,o=i,a=c):3===u?(t=l,o=h,a=i):4===u?(t=c,o=l,a=i):5===u?(t=i,o=l,a=h):(t=i,o=c,a=l),s=[t,o,a]}return s}},1121:(t,r,n)=>
1{var i=n(8391),s=Object.prototype.hasOwnProperty,o="undefined"!=typeof Map;function a(){this._array=[],this._set=o?new Map:Object.create(null)}a.fromArray=function(t,r){for(var n=new a,i=0,s=t.length;i<s;i++)n.add(t[i],r);return n},a.prototype.size=function(){return o?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(t,r){var n=o?t:i.toSetString(t),a=o?this.has(t):s.call(this._set,n),u=this._array.length;(!a||r)&&this._array.push(t),a||(o?this._set.set(t,u):this._set[n]=u)},a.prototype.has=function(t){if(o)return this._set.has(t);var r=i.toSetString(t);return s.call(this._set,r)},a.prototype.indexOf=function(t){if(o){var r=this._set.get(t);if(r>=0)return r}else{var n=i.toSetString(t);if(s.call(this._set,n))return this._set[n]}throw Error('"'+t+'" is not in the set.')},a.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw Error("No element indexed by "+t)},a.prototype.toArray=function(){return this._array.slice()},r.C=a},1613:(t,r)=>{r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(t,n,i,s){if(0===n.length)return -1;var o=function t(n,i,s,o,a,u){var l=Math.floor((i-n)/2)+n,h=a(s,o[l],!0);return 0===h?l:h>0?i-l>1?t(l,i,s,o,a,u):u==r.LEAST_UPPER_BOUND?i<o.length?i:-1:l:l-n>1?t(n,l,s,o,a,u):u==r.LEAST_UPPER_BOUND?l:n<0?-1:n}(-1,n.length,t,n,i,s||r.GREATEST_LOWER_BOUND);if(o<0)return -1;for(;o-1>=0&&0===i(n[o],n[o-1],!0);)--o;return o}},1925:(t,r,n)=>{"use strict";function i(t,r){let n=t.length;Array.isArray(t[0])||(t=[t]),Array.isArray(r[0])||(r=r.map(t=>[t]));let i=r[0].length,s=r[0].map((t,n)=>r.map(t=>t[n])),o=t.map(t=>s.map(r=>{let n=0;if(!Array.isArray(t)){for(let i of r)n+=t*i;return n}for(let i=0;i<t.length;i++)n+=t[i]*(r[i]||0);return n}));return(1===n&&(o=o[0]),1===i)?o.map(t=>t[0]):o}n.d(r,{A:()=>i})},1935:(t,r,n)=>{"use strict";n.d(r,{A:()=>s,f:()=>i});class i{constructor(t,r,n,i,s,o){this.size=t,this.src=r,this.dst=n,this.attr=i,this._renderer=s,this.map=o}_prepareBuffer(t,r){let n=r.attributes,i=this._renderer.GL,s=this._renderer._getOrMakeCachedBuffers(t),o=n[this.attr];if(!o)return;let a=s[this.dst],u=t[this.src];if(u&&u.length>0){let n=!a;if(n&&(s[this.dst]=a=i.createBuffer()),i.bindBuffer(i.ARRAY_BUFFER,a),n||!1!==t.dirtyFlags[this.src]){let r=this.map,n=r?r(u):u;this._renderer._bindBuffer(a,i.ARRAY_BUFFER,n),t.dirtyFlags[this.src]=!1}r.enableAttrib(o,this.size)}else{let t=o.location;if(-1===t||!this._renderer.registerEnabled.has(t))return;i.disableVertexAttribArray(t),this._renderer.registerEnabled.delete(t)}}}function s(t,r){t.RenderBuffer=i}"undefined"!=typeof p5&&s(p5,p5.prototype)},2374:t=>{self,t.exports=(()=>{"use strict";var t={177:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BezierPath=void 0;let i=n(558),s=n(188);r.BezierPath=class{constructor(t){this.samples=[],this.segments=t;let r=t.map(t=>t.getTotalLength()),n=[0];for(let t=1;t<r.length;t++)n.push(n[t-1]+r[t-1]);this._totalLength=n[n.length-1]+r[r.length-1];let o=t.map(t=>Math.max(4,Math.ceil(t.getTotalLength()/i.BezierSegment.sampleSpacing()))),a=o.reduce((t,r)=>t+r),u=1/a/10,l=this._totalLength/a;this.samples.push({dist:0,pt:this.segments[0].A,tan:this.segments[0].tangentAtParameter(0),segIdx:0,t:0}),t.forEach((t,r)=>{let i,a=o[r],h=(0,s.times)(a+1).map(t=>t/a),c=h.map(r=>t.pointAtParameter(r));for(let r=0;r<4;r++){let r=(i=(0,s.times)(a).map(t=>Math.hypot(c[t+1].x-c[t].x,c[t+1].y-c[t].y))).map(t=>t-l),n=0;for(let i=1;i<h.length-1;i++)n+=r[i-1],h[i]-=u*n,c[i]=t.pointAtParameter(h[i])}let d=0;c.slice(1).forEach((t,s)=>{d+=i[s],this.samples.push({dist:n[r]+d,pt:t,tan:this.segments[r].tangentAtParameter(h[s+1]),segIdx:r,t:h[s+1]})})}),this._jumps=[],this.segmentStartEnds=[{start:0,end:0}];for(let t=1;t<this.samples.length;t++){let r=this.samples[t-1],n=this.samples[t];if(n.segIdx===r.segIdx?this.segmentStartEnds[this.segmentStartEnds.length-1].end=n.dist:this.segmentStartEnds[n.segIdx]={start:n.dist,end:n.dist},r.segIdx!==n.segIdx&&(this.segments[r.segIdx].D.x!==this.segments[n.segIdx].A.x||this.segments[r.segIdx].D.y!==this.segments[n.segIdx].A.y)){let i=(r.dist+n.dist)/2,s={dist:i-1e-8,pt:this.segments[r.segIdx].D,tan:this.segments[r.segIdx].tangentAtParameter(1),segIdx:r.segIdx,t:1},o={dist:i+1e-8,pt:this.segments[n.segIdx].A,tan:this.segments[n.segIdx].tangentAtParameter(0),segIdx:n.segIdx,t:0};this._jumps.push(i),this.samples.splice(t,0,s,o),t+=2}}}jumps(){return[...this._jumps]}getTotalLength(){return this._totalLength}findClosestSampleIdx(t){let r=0,n=this.samples.length-1;for(;r<n;){let i=Math.floor((r+n)/2);if(this.samples[i].dist>t)n=i-1;else{if(!(this.samples[i].dist<t))return i;r=i+1}}return Math.max(0,Math.min(this.samples.length-1,Math.floor((r+n)/2)))}getPointAtLength(t,r=!1){if(t<=0)return this.samples[0].pt;if(t>=this._totalLength)return this.samples[this.samples.length-1].pt;let n=this.findClosestSampleIdx(t),i=this.samples[n].dist<t?Math.min(n+1,this.samples.length-1):Math.max(0,n-1),s=1e-6>Math.abs(this.samples[i].dist-this.samples[n].dist)?0:(t-this.samples[n].dist)/(this.samples[i].dist-this.samples[n].dist);if(r||this.samples[n].segIdx>this.samples[i].segIdx)return{x:(1-s)*this.samples[n].pt.x+s*this.samples[i].pt.x,y:(1-s)*this.samples[n].pt.y+s*this.samples[i].pt.y};if(this.samples[n].segIdx!==this.samples[i].segIdx){if(s<.5){let t=this.segments[this.samples[n].segIdx],r=2*s,i=(1-r)*this.samples[n].t+r;return t.pointAtParameter(i)}{let t=this.segments[this.samples[i].segIdx],r=2*(s-.5)*this.samples[i].t;return t.pointAtParameter(r)}}{let t=this.segments[this.samples[n].segIdx],r=(1-s)*this.samples[n].t+s*this.samples[i].t;return t.pointAtParameter(r)}}getAngleAtLength(t,r=!1){let n=this.getTangentAtLength(t,r);return Math.atan2(n.y,n.x)}getTangentAtLength(t,r=!1){if(t<=0)return this.samples[0].tan;if(t>=this._totalLength)return this.samples[this.samples.length-1].tan;let n=this.findClosestSampleIdx(t),i=this.samples[n].dist<t?Math.min(n+1,this.samples.length-1):Math.max(0,n-1),s=(t-this.samples[n].dist)/(this.samples[i].dist-this.samples[n].dist);if(r||this.samples[n].segIdx>this.samples[i].segIdx){let t=(1-s)*this.samples[n].tan.x+s*this.samples[i].tan.x,r=(1-s)*this.samples[n].tan.y+s*this.samples[i].tan.y,o=Math.max(Math.hypot(t,r),1e-4);return{x:t/=o,y:r/=o}}if(this.samples[n].segIdx!==this.samples[i].segIdx){if(s<.5){let t=this.segments[this.samples[n].segIdx],r=2*s,i=(1-r)*this.samples[n].t+r;return t.tangentAtParameter(i)}{let t=this.segments[this.samples[i].segIdx],r=2*(s-.5)*this.samples[i].t;return t.tangentAtParameter(r)}}{let t=this.segments[this.samples[n].segIdx],r=(1-s)*this.samples[n].t+s*this.samples[i].t;return t.tangentAtParameter(r)}}}},558:(t,r,n)=>
1{Object.defineProperty(r,"__esModule",{value:!0}),r.BezierSegment=void 0;let i=n(188);class s{constructor(t,r,n,i){this._totalLength=void 0,this.A=t,this.B=r,this.C=n,this.D=i}static sampleSpacing(){return 2}tangentAtParameter(t){let r=Math.max(0,Math.min(1,t));if(0===r||1===r){let t,n;0===r?this.A.x===this.B.x&&this.A.y===this.B.y?(t=this.C.x-this.A.x,n=this.C.y-this.A.y):(t=this.B.x-this.A.x,n=this.B.y-this.A.y):this.D.x===this.C.x&&this.D.y===this.C.y?(t=this.D.x-this.B.x,n=this.D.y-this.B.y):(t=this.D.x-this.C.x,n=this.D.y-this.C.y);let i=Math.hypot(t,n);return Math.abs(i)>1e-4&&(t/=i,n/=i),{x:t,y:n}}let n=1-r,i=3*this.D.x*Math.pow(r,2)-3*this.C.x*Math.pow(r,2)+6*this.C.x*n*r-6*this.B.x*n*r+3*this.B.x*Math.pow(n,2)-3*this.A.x*Math.pow(n,2),s=3*this.D.y*Math.pow(r,2)-3*this.C.y*Math.pow(r,2)+6*this.C.y*n*r-6*this.B.y*n*r+3*this.B.y*Math.pow(n,2)-3*this.A.y*Math.pow(n,2),o=Math.hypot(i,s);return Math.abs(o)>1e-4&&(i/=o,s/=o),{x:i,y:s}}isLinear(){return this.A.x===this.B.x&&this.A.y===this.B.y&&this.C.x===this.D.x&&this.C.y===this.D.y}pointAtParameter(t){let r=Math.max(0,Math.min(1,t));return{x:Math.pow(1-r,3)*this.A.x+3*Math.pow(1-r,2)*r*this.B.x+3*(1-r)*Math.pow(r,2)*this.C.x+Math.pow(r,3)*this.D.x,y:Math.pow(1-r,3)*this.A.y+3*Math.pow(1-r,2)*r*this.B.y+3*(1-r)*Math.pow(r,2)*this.C.y+Math.pow(r,3)*this.D.y}}getTotalLength(){if(void 0===this._totalLength)if(this.isLinear())this._totalLength=Math.hypot(this.D.x-this.A.x,this.D.y-this.A.y);else{let t=Math.max(10,Math.ceil((Math.hypot(this.B.x-this.A.x,this.B.y-this.A.y)+Math.hypot(this.C.x-this.B.x,this.C.y-this.B.y)+Math.hypot(this.D.x-this.C.x,this.D.y-this.C.y))/s.sampleSpacing())),r=(0,i.times)(t).map(r=>this.pointAtParameter(r/(t-1))),n=0;for(let t=1;t<r.length;t++)n+=Math.hypot(r[t].x-r[t-1].x,r[t].y-r[t-1].y);this._totalLength=n}return this._totalLength}}r.BezierSegment=s},729:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createFromCommands=r.create=r.createFromElement=r.createFromCircle=r.createFromLine=r.createFromPath=void 0;let i=n(821),s=n(558),o={M:["x","y"],m:["dx","dy"],H:["x"],h:["dx"],V:["y"],v:["dy"],L:["x","y"],l:["dx","dy"],Z:[],C:["x1","y1","x2","y2","x","y"],c:["dx1","dy1","dx2","dy2","dx","dy"],S:["x2","y2","x","y"],s:["dx2","dy2","dx","dy"],Q:["x1","y1","x","y"],q:["dx1","dy1","dx","dy"],T:["x","y"],t:["dx","dy"],A:["rx","ry","rotation","large-arc","sweep","x","y"],a:["rx","ry","rotation","large-arc","sweep","dx","dy"]};r.createFromPath=t=>{let r=function(t){let r=t.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").replace(/(\d)([A-Za-z])/g,"$1 $2").replace(/([A-Za-z])(\d)/g,"$1 $2").trim().split(/\s*,|\s+/),n=[],i="",s={};for(;r.length>0;){let t=r.shift();o.hasOwnProperty(t)?i=t:r.unshift(t),s={type:i},o[i].forEach(n=>{t=r.shift(),s[n]=parseFloat(t)}),"M"===i?i="L":"m"===i&&(i="l"),n.push(s)}return n}(t.getAttribute("d"));if(r.length<2)throw Error(`Path doesn't have enough commands: ${JSON.stringify(r)}`);if("M"!==r[0].type)throw Error(`Path starts with ${r[0].type} instead of M!`);let n={x:r[0].x,y:r[0].y};r.shift();let a=[];for(;r.length>0;){let t=r.shift();if("C"===t.type)a.push(new s.BezierSegment(n,{x:t.x1,y:t.y1},{x:t.x2,y:t.y2},{x:t.x,y:t.y})),n={x:t.x,y:t.y};else if("L"===t.type)a.push(new s.BezierSegment(n,n,{x:t.x,y:t.y},{x:t.x,y:t.y})),n={x:t.x,y:t.y};else if("H"===t.type)a.push(new s.BezierSegment(n,n,{x:t.x,y:n.y},{x:t.x,y:n.y})),n={x:t.x,y:n.y};else if("V"===t.type)a.push(new s.BezierSegment(n,n,{x:n.x,y:t.y},{x:n.x,y:t.y})),n={x:n.x,y:t.y};else if("Z"!==t.type)throw Error(`Unsupported path command ${t.type}; use only H, V, M, L, C, Z!`)}return new i.BezierPath(a)},r.createFromLine=t=>{let[r,n,o,a]=["x1","x2","y1","y2"].map(r=>parseFloat(t.getAttribute(r)||"0"));return new i.BezierPath([new s.BezierSegment({x:r,y:o},{x:r,y:o},{x:n,y:a},{x:n,y:a})])},r.createFromCircle=t=>{let[r,n,o]=["cx","cy","r"].map(r=>parseFloat(t.getAttribute(r)||"0"));return new i.BezierPath([new s.BezierSegment({x:r-o,y:n},{x:r-o,y:n-1.3*o},{x:r+o,y:n-1.3*o},{x:r+o,y:n}),new s.BezierSegment({x:r+o,y:n},{x:r+o,y:n+1.3*o},{x:r-o,y:n+1.3*o},{x:r-o,y:n}
1)])},r.createFromElement=t=>{let n=t.tagName.toLowerCase();if("path"===n)return(0,r.createFromPath)(t);if("line"===n)return(0,r.createFromLine)(t);if("circle"===n)return(0,r.createFromCircle)(t);throw Error(`Unsupported SVG tag: ${n}`)},r.create=t=>{let r=[];for(let n=1;n<t.length;n++){let i=t[n-1],o=t[n];r.push(new s.BezierSegment(i.pt,i.right||i.pt,o.left||o.pt,o.pt))}return new i.BezierPath(r)},r.createFromCommands=t=>{let r=t.slice();if(r.length<2)throw Error(`Path doesn't have enough commands: ${JSON.stringify(r)}`);if("M"!==r[0].type)throw Error(`Path starts with ${r[0].type} instead of M!`);let n={x:r[0].x,y:r[0].y},o=Object.assign({},n),a=[];for(;r.length>0;){let t=r.shift();if("M"===t.type)n=o={x:t.x,y:t.y};else if("C"===t.type)a.push(new s.BezierSegment(n,{x:t.x1,y:t.y1},{x:t.x2,y:t.y2},{x:t.x,y:t.y})),n={x:t.x,y:t.y};else if("L"===t.type)t.x===n.x&&t.y===n.y||a.push(new s.BezierSegment(n,n,{x:t.x,y:t.y},{x:t.x,y:t.y})),n={x:t.x,y:t.y};else if("H"===t.type)t.x!==n.x&&a.push(new s.BezierSegment(n,n,{x:t.x,y:n.y},{x:t.x,y:n.y})),n={x:t.x,y:n.y};else if("V"===t.type)t.y!==n.y&&a.push(new s.BezierSegment(n,n,{x:n.x,y:t.y},{x:n.x,y:t.y})),n={x:n.x,y:t.y};else if("Q"===t.type)a.push(new s.BezierSegment(n,{x:n.x+2/3*(t.x1-n.x),y:n.y+2/3*(t.y1-n.y)},{x:t.x+2/3*(t.x1-t.x),y:t.y+2/3*(t.y1-t.y)},{x:t.x,y:t.y})),n={x:t.x,y:t.y};else{if("Z"!==t.type)throw Error(`Unsupported path command ${t.type}; use only H, V, M, L, C, Z!`);Math.hypot(n.x-o.x,n.y-o.y)>0&&a.push(new s.BezierSegment(n,n,o,o))}}return new i.BezierPath(a)}},821:function(t,r,n){var i=this&&this.__createBinding||(Object.create?function(t,r,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(r,n);s&&!("get"in s?!r.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(t,i,s)}:function(t,r,n,i){void 0===i&&(i=n),t[i]=r[n]}),s=this&&this.__exportStar||function(t,r){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||i(r,t,n)};Object.defineProperty(r,"__esModule",{value:!0}),s(n(177),r),s(n(558),r),s(n(729),r),s(n(856),r)},856:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0})},188:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.times=void 0,r.times=function(t){let r=[];for(let n=0;n<t;n++)r.push(n);return r}}},r={};return function n(i){var s=r[i];if(void 0!==s)return s.exports;var o=r[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}(821)})()},2455:(t,r,n)=>{!function(){"use strict";function t(t){return q.Statement.hasOwnProperty(t.type)}a=n(6589),u=n(7607),i=a.Syntax;var i,s,o,a,u,l,h,c,d,p,f,g,m,y,v,b,x,_,D,A,C,E,w,S,F={"??":(s={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,Coalesce:3,LogicalOR:4,LogicalAND:5,BitwiseOR:6,BitwiseXOR:7,BitwiseAND:8,Equality:9,Relational:10,BitwiseSHIFT:11,Additive:12,Multiplicative:13,Exponentiation:14,Await:15,Unary:15,Postfix:16,OptionalChaining:17,Call:18,New:19,TaggedTemplate:20,Member:21,Primary:22}).Coalesce,"||":s.LogicalOR,"&&":s.LogicalAND,"|":s.BitwiseOR,"^":s.BitwiseXOR,"&":s.BitwiseAND,"==":s.Equality,"!=":s.Equality,"===":s.Equality,"!==":s.Equality,is:s.Equality,isnt:s.Equality,"<":s.Relational,">":s.Relational,"<=":s.Relational,">=":s.Relational,in:s.Relational,instanceof:s.Relational,"<<":s.BitwiseSHIFT,">>":s.BitwiseSHIFT,">>>":s.BitwiseSHIFT,"+":s.Additive,"-":s.Additive,"*":s.Multiplicative,"%":s.Multiplicative,"/":s.Multiplicative,"**":s.Exponentiation};function N(){return{indent:null,base:null,parse:null,comment:!1,format:{indent:{style:"    ",base:0,adjustMultilineComment:!1},newline:"\n",space:" ",json:!1,renumber:!1,hexadecimal:!1,quotes:"single",escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1,preserveBlankLines:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,raw:!0,verbatim:null,sourceCode:null}}function B(t,r){var n="";for(r|=0;r>0;r>>>=1,t+=t)1&r&&(n+=t);return n}function k(t){var r=t.length;return r&&u.code.isLineTerminator(t.charCodeAt(r-1))}function M(t,r){var n;for(n in r)r.hasOwnProperty(n)&&(t[n]=r[n]);return t}function T(t,r){var n,i;function s(t){return"object"==typeof t&&t instanceof Object&&!(t instanceof RegExp)}for(n in r)r.hasOwnProperty(n)&&(s(i=r[n])?s(t[n])?T(t[n],i):t[n]=T({},i):t[n]=i);return t}function I(t,r){return(-2&t)==8232?(r?"u":"\\u")+(8232===t?"2028":"2029"):10===t||13===t?(r?"":"\\")+(10===t?"n":"r"):String.fromCharCode(t)}function O(t,r){if(!C)if(Array.isArray(t))return function t(r){var n,i,s,o="";for(n=0,i=r.length;n<i;++n)o+=Array.isArray(s=r[n])?t(s):s;return o}(t);else return t;if(null==r)if(t instanceof o)return t;else r={};
vendor: 4,660 bytes, line 1
1return null==r.loc?new o(null,null,C,t,r.name||null):new o(r.loc.start.line,r.loc.start.column,!0===C?r.loc.source||null:C,t,r.name||null)}function L(){return y||" "}function P(t,r){var n,i,s,o;return 0===(n=O(t).toString()).length?[r]:0===(i=O(r).toString()).length?[t]:(s=n.charCodeAt(n.length-1),o=i.charCodeAt(0),(43===s||45===s)&&s===o||u.code.isIdentifierPartES5(s)&&u.code.isIdentifierPartES5(o)||47===s&&105===o)?[t,L(),r]:u.code.isWhiteSpace(s)||u.code.isLineTerminator(s)||u.code.isWhiteSpace(o)||u.code.isLineTerminator(o)?[t,r]:[t,y,r]}function R(t){return[l,t]}function z(t){var r;r=l,t(l+=h),l=r}function U(t,r){if("Line"===t.type)if(k(t.value))return"//"+t.value;else{var n="//"+t.value;return w||(n+="\n"),n}return D.format.indent.adjustMultilineComment&&/[\n\r]/.test(t.value)?function(t,r){var n,i,s,o,a,h,c,d;for(i=1,n=t.split(/\r\n|[\r\n]/),h=Number.MAX_VALUE,s=n.length;i<s;++i){for(o=n[i],a=0;a<o.length&&u.code.isWhiteSpace(o.charCodeAt(a));)++a;h>a&&(h=a)}for(void 0!==r?(c=l,"*"===n[1][h]&&(r+=" "),l=r):(1&h&&--h,c=l),i=1,s=n.length;i<s;++i)d=O(R(n[i].slice(h))),n[i]=C?d.join(""):d;return l=c,n.join("\n")}("/*"+t.value+"*/",r):"/*"+t.value+"*/"}function $(t,r){var n,s,o,a,c,d,p,f,g,m,y,v;if(t.leadingComments&&t.leadingComments.length>0){if(a=r,w){for(o=t.leadingComments[0],r=[],f=o.extendedRange,g=o.range,(v=((y=E.substring(f[0],g[0])).match(/\n/g)||[]).length)>0?(r.push(B("\n",v)),r.push(R(U(o)))):(r.push(y),r.push(U(o))),m=g,n=1,s=t.leadingComments.length;n<s;n++)g=(o=t.leadingComments[n]).range,v=(E.substring(m[1],g[0]).match(/\n/g)||[]).length,r.push(B("\n",v)),r.push(R(U(o))),m=g;v=(E.substring(g[1],f[1]).match(/\n/g)||[]).length,r.push(B("\n",v))}else for(o=t.leadingComments[0],r=[],x&&t.type===i.Program&&0===t.body.length&&r.push("\n"),r.push(U(o)),k(O(r).toString())||r.push("\n"),n=1,s=t.leadingComments.length;n<s;++n)k(O(p=[U(o=t.leadingComments[n])]).toString())||p.push("\n"),r.push(R(p));r.push(R(a))}if(t.trailingComments)if(w)f=(o=t.trailingComments[0]).extendedRange,g=o.range,(v=((y=E.substring(f[0],g[0])).match(/\n/g)||[]).length)>0?(r.push(B("\n",v)),r.push(R(U(o)))):(r.push(y),r.push(U(o)));else for(n=0,c=!k(O(r).toString()),d=B(" ",function(t){var r;for(r=t.length-1;r>=0&&!u.code.isLineTerminator(t.charCodeAt(r));--r);return t.length-1-r}(O([l,r,h]).toString())),s=t.trailingComments.length;n<s;++n)o=t.trailingComments[n],c?(r=0===n?[r,h]:[r,d]).push(U(o,d)):r=[r,R(U(o))],n===s-1||k(O(r).toString())||(r=[r,"\n"]);return r}function j(t,r,n){var i,s=0;for(i=t;i<r;i++)"\n"===E[i]&&s++;for(i=1;i<s;i++)n.push(m)}function V(t,r,n){return r<n?["(",t,")"]:t}function G(t){var r,n,i;for(r=1,n=(i=t.split(/\r\n|\n/)).length;r<n;r++)i[r]=m+l+i[r];return i}function q(){}function W(t){return O(t.name,t)}function H(t,r){return t.async?"async"+(r?L():y):""}function Z(t){return t.generator&&!D.moz.starlessGenerator?"*"+y:""}function Y(t){var r=t.value,n="";return r.async&&(n+=H(r,!t.computed)),r.generator&&(n+=Z(r)?"*":""),n}q.prototype.maybeBlock=function(t,r){var n,s,o=this;return(s=!D.comment||!t.leadingComments,t.type===i.BlockStatement&&s)?[y,this.generateStatement(t,r)]:t.type===i.EmptyStatement&&s?";":(z(function(){n=[m,R(o.generateStatement(t,r))]}),n)},q.prototype.maybeBlockSuffix=function(t,r){var n=k(O(r).toString());return t.type!==i.BlockStatement||D.comment&&t.leadingComments||n?n?[r,l]:[r,m,l]:[r,y]},q.prototype.generatePattern=function(t,r,n){return t.type===i.Identifier?W(t):this.generateExpression(t,r,n)},q.prototype.generateFunctionParams=function(t){var r,n,o,a;if(a=!1,t.type!==i.ArrowFunctionExpression||t.rest||t.defaults&&0!==t.defaults.length||1!==t.params.length||t.params[0].type!==i.Identifier){for((o=t.type===i.ArrowFunctionExpression?[H(t,!1)]:[]).push("("),t.defaults&&(a=!0),r=0,n=t.params.length;r<n;++r)a&&t.defaults[r]?o.push(this.generateAssignment(t.params[r],t.defaults[r],"=",s.Assignment,7)):o.push(this.generatePattern(t.params[r],s.Assignment,7)),r+1<n&&o.push(","+y);t.rest&&(t.params.length&&o.push(","+y),o.push("..."),o.push(W(t.rest))),o.push(")")}else o=[H(t,!0),W(t.params[0])];return o},q.prototype.generateFunctionBody=function(t){var r,n;return r=this.generateFunctionParams(t),t.type===i.ArrowFunctionExpression&&(r.push(y),r.push("=>")),t.expression?(r.push(y),"{"===(n=this.generateExpression(t.body,s.Assignment,7)).toString().charAt(0)&&(n=["(",n,")"]),r.push(n)):r.push(this.maybeBlock(t.body,9)),r},q.prototype.generateIterationForStatement=function(t,r,n){var o=["for"+(r.await?L()+"await":"")+y+"("],a=this;return z(function(){r.left.type===i.VariableDeclaration?z(function(){o.push(r.left.kind+L()),o.push(a.generateStatement
1(r.left.declarations[0],0))}):o.push(a.generateExpression(r.left,s.Call,7)),o=P(o,t),o=[P(o,a.generateExpression(r.right,s.Assignment,7)),")"]}),o.push(this.maybeBlock(r.body,n)),o},q.prototype.generatePropertyKey=function(t,r){var n=[];return r&&n.push("["),n.push(this.generateExpression(t,s.Assignment,7)),r&&n.push("]"),n},q.prototype.generateAssignment=function(t,r,n,i,o){return s.Assignment<i&&(o|=1),V([this.generateExpression(t,s.Call,o),y+n+y,this.generateExpression(r,s.Assignment,o)],s.Assignment,i)},q.prototype.semicolon=function(t){return!b&&32&t?"":";"},q.Statement={BlockStatement:function(t,r){var n,i,s=["{",m],o=this;return z(function(){var a,u,l,h;for(0===t.body.length&&w&&(n=t.range)[1]-n[0]>2&&("\n"===(i=E.substring(n[0]+1,n[1]-1))[0]&&(s=["{"]),s.push(i)),h=1,8&r&&(h|=16),a=0,u=t.body.length;a<u;++a)w&&(0===a&&(t.body[0].leadingComments&&(n=t.body[0].leadingComments[0].extendedRange,"\n"===(i=E.substring(n[0],n[1]))[0]&&(s=["{"])),t.body[0].leadingComments||j(t.range[0],t.body[0].range[0],s)),!(a>0)||t.body[a-1].trailingComments||t.body[a].leadingComments||j(t.body[a-1].range[1],t.body[a].range[0],s)),a===u-1&&(h|=32),l=t.body[a].leadingComments&&w?o.generateStatement(t.body[a],h):R(o.generateStatement(t.body[a],h)),s.push(l),!k(O(l).toString())&&(w&&a<u-1&&t.body[a+1].leadingComments||s.push(m)),w&&a===u-1&&!t.body[a].trailingComments&&j(t.body[a].range[1],t.range[1],s)}),s.push(R("}")),s},BreakStatement:function(t,r){return t.label?"break "+t.label.name+this.semicolon(r):"break"+this.semicolon(r)},ContinueStatement:function(t,r){return t.label?"continue "+t.label.name+this.semicolon(r):"continue"+this.semicolon(r)},ClassBody:function(t,r){var n=["{",m],i=this;return z(function(r){var o,a;for(o=0,a=t.body.length;o<a;++o)n.push(r),n.push(i.generateExpression(t.body[o],s.Sequence,7)),o+1<a&&n.push(m)}),k(O(n).toString())||n.push(m),n.push(l),n.push("}"),n},ClassDeclaration:function(t,r){var n,i;return n=["class"],t.id&&(n=P(n,this.generateExpression(t.id,s.Sequence,7))),t.superClass&&(i=P("extends",this.generateExpression(t.superClass,s.Unary,7)),n=P(n,i)),n.push(y),n.push(this.generateStatement(t.body,33)),n},DirectiveStatement:function(t,r){return D.raw&&t.raw?t.raw+this.semicolon(r):function(t){var r,n,i,s;for(r=0,s="double"===f?'"':"'",n=t.length;r<n;++r){if(39===(i=t.charCodeAt(r))){s='"';break}if(34===i){s="'";break}92===i&&++r}return s+t+s}(t.directive)+this.semicolon(r)},DoWhileStatement:function(t,r){var n=P("do",this.maybeBlock(t.body,1));return P(n=this.maybeBlockSuffix(t.body,n),["while"+y+"(",this.generateExpression(t.test,s.Sequence,7),")"+this.semicolon(r)])},CatchClause:function(t,r){var n,i=this;return z(function(){var r;t.param?(n=["catch"+y+"(",i.generateExpression(t.param,s.Sequence,7),")"],t.guard&&(r=i.generateExpression(t.guard,s.Sequence,7),n.splice(2,0," if ",r))):n=["catch"]}),n.push(this.maybeBlock(t.body,1)),n},DebuggerStatement:function(t,r){return"debugger"+this.semicolon(r)},EmptyStatement:function(t,r){return";"},ExportDefaultDeclaration:function(r,n){var i=["export"];return i=P(i,"default"),i=t(r.declaration)?P(i,this.generateStatement(r.declaration,32&n?33:1)):P(i,this.generateExpression(r.declaration,s.Assignment,7)+this.semicolon(n))},ExportNamedDeclaration:function(t,r){var n,o=["export"],a=this;return(n=32&r?33:1,t.declaration)?P(o,this.generateStatement(t.declaration,n)):(t.specifiers&&(0===t.specifiers.length?o=P(o,"{"+y+"}"):t.specifiers[0].type===i.ExportBatchSpecifier?o=P(o,this.generateExpression(t.specifiers[0],s.Sequence,7)):(o=P(o,"{"),z(function(r){var n,i;for(o.push(m),n=0,i=t.specifiers.length;n<i;++n)o.push(r),o.push(a.generateExpression(t.specifiers[n],s.Sequence,7)),n+1<i&&o.push(","+m)}),k(O(o).toString())||o.push(m),o.push(l+"}")),t.source?o=P(o,["from"+y,this.generateExpression(t.source,s.Sequence,7),this.semicolon(r)]):o.push(this.semicolon(r))),o)},ExportAllDeclaration:function(t,r){return["export"+y,"*"+y,"from"+y,this.generateExpression(t.source,s.Sequence,7),this.semicolon(r)]},ExpressionStatement:function(t,r){var n,o,a,l;return 123===(o=O(n=[this.generateExpression(t.expression,s.Sequence,7)]).toString()).charCo
1deAt(0)||"class"===o.slice(0,5)&&(123===(a=o.charCodeAt(5))||u.code.isWhiteSpace(a)||u.code.isLineTerminator(a))||"function"===o.slice(0,8)&&(40===(l=o.charCodeAt(8))||u.code.isWhiteSpace(l)||42===l||u.code.isLineTerminator(l))||function(t){var r,n,i;if("async"!==t.slice(0,5)||!u.code.isWhiteSpace(t.charCodeAt(5)))return!1;for(n=6,i=t.length;n<i&&u.code.isWhiteSpace(t.charCodeAt(n));++n);return n!==i&&"function"===t.slice(n,n+8)&&(40===(r=t.charCodeAt(n+8))||u.code.isWhiteSpace(r)||42===r||u.code.isLineTerminator(r))}(o)||_&&16&r&&t.expression.type===i.Literal&&"string"==typeof t.expression.value?n=["(",n,")"+this.semicolon(r)]:n.push(this.semicolon(r)),n},ImportDeclaration:function(t,r){var n,o,a=this;return 0===t.specifiers.length?["import",y,this.generateExpression(t.source,s.Sequence,7),this.semicolon(r)]:(n=["import"],o=0,t.specifiers[o].type===i.ImportDefaultSpecifier&&(n=P(n,[this.generateExpression(t.specifiers[o],s.Sequence,7)]),++o),t.specifiers[o]&&(0!==o&&n.push(","),t.specifiers[o].type===i.ImportNamespaceSpecifier?n=P(n,[y,this.generateExpression(t.specifiers[o],s.Sequence,7)]):(n.push(y+"{"),t.specifiers.length-o==1?(n.push(y),n.push(this.generateExpression(t.specifiers[o],s.Sequence,7)),n.push(y+"}"+y)):(z(function(r){var i,u;for(n.push(m),i=o,u=t.specifiers.length;i<u;++i)n.push(r),n.push(a.generateExpression(t.specifiers[i],s.Sequence,7)),i+1<u&&n.push(","+m)}),k(O(n).toString())||n.push(m),n.push(l+"}"+y)))),n=P(n,["from"+y,this.generateExpression(t.source,s.Sequence,7),this.semicolon(r)]))},VariableDeclarator:function(t,r){var n=1&r?7:6;return t.init?[this.generateExpression(t.id,s.Assignment,n),y,"=",y,this.generateExpression(t.init,s.Assignment,n)]:this.generatePattern(t.id,s.Assignment,n)},VariableDeclaration:function(t,r){var n,i,s,o,a,u=this;function l(){for(o=t.declarations[0],D.comment&&o.leadingComments?(n.push("\n"),n.push(R(u.generateStatement(o,a)))):(n.push(L()),n.push(u.generateStatement(o,a))),i=1,s=t.declarations.length;i<s;++i)o=t.declarations[i],D.comment&&o.leadingComments?(n.push(","+m),n.push(R(u.generateStatement(o,a)))):(n.push(","+y),n.push(u.generateStatement(o,a)))}return n=[t.kind],a=1&r?1:0,t.declarations.length>1?z(l):l(),n.push(this.semicolon(r)),n},ThrowStatement:function(t,r){return[P("throw",this.generateExpression(t.argument,s.Sequence,7)),this.semicolon(r)]},TryStatement:function(t,r){var n,i,s,o;if(n=["try",this.maybeBlock(t.block,1)],n=this.maybeBlockSuffix(t.block,n),t.handlers)for(i=0,s=t.handlers.length;i<s;++i)n=P(n,this.generateStatement(t.handlers[i],1)),(t.finalizer||i+1!==s)&&(n=this.maybeBlockSuffix(t.handlers[i].body,n));else{for(i=0,s=(o=t.guardedHandlers||[]).length;i<s;++i)n=P(n,this.generateStatement(o[i],1)),(t.finalizer||i+1!==s)&&(n=this.maybeBlockSuffix(o[i].body,n));if(t.handler)if(Array.isArray(t.handler))for(i=0,s=t.handler.length;i<s;++i)n=P(n,this.generateStatement(t.handler[i],1)),(t.finalizer||i+1!==s)&&(n=this.maybeBlockSuffix(t.handler[i].body,n));else n=P(n,this.generateStatement(t.handler,1)),t.finalizer&&(n=this.maybeBlockSuffix(t.handler.body,n))}return t.finalizer&&(n=P(n,["finally",this.maybeBlock(t.finalizer,1)])),n},SwitchStatement:function(t,r){var n,i,o,a,u,l=this;if(z(function(){n=["switch"+y+"(",l.generateExpression(t.discriminant,s.Sequence,7),")"+y+"{"+m]}),t.cases)for(o=0,u=1,a=t.cases.length;o<a;++o)o===a-1&&(u|=32),i=R(this.generateStatement(t.cases[o],u)),n.push(i),k(O(i).toString())||n.push(m);return n.push(R("}")),n},SwitchCase:function(t,r){var n,o,a,u,l,h=this;return z(function(){for(n=t.test?[P("case",h.generateExpression(t.test,s.Sequence,7)),":"]:["default:"],a=0,(u=t.consequent.length)&&t.consequent[0].type===i.BlockStatement&&(o=h.maybeBlock(t.consequent[0],1),n.push(o),a=1),a===u||k(O(n).toString())||n.push(m),l=1;a<u;++a)a===u-1&&32&r&&(l|=32),o=R(h.generateStatement(t.consequent[a],l)),n.push(o),a+1===u||k(O(o).toString())||n.push(m)}),n},IfStatement:function(t,r){var n,o,a=this;return z(function(){n=["if"+y+"(",a.generateExpression(t.test,s.Sequence,7),")"]}),o=1,32&r&&(o|=32),t.alternate?(n.push(this.maybeBlock(t.consequent,1)
1),n=this.maybeBlockSuffix(t.consequent,n),n=t.alternate.type===i.IfStatement?P(n,["else ",this.generateStatement(t.alternate,o)]):P(n,P("else",this.maybeBlock(t.alternate,o)))):n.push(this.maybeBlock(t.consequent,o)),n},ForStatement:function(t,r){var n,o=this;return z(function(){n=["for"+y+"("],t.init?t.init.type===i.VariableDeclaration?n.push(o.generateStatement(t.init,0)):(n.push(o.generateExpression(t.init,s.Sequence,6)),n.push(";")):n.push(";"),t.test&&(n.push(y),n.push(o.generateExpression(t.test,s.Sequence,7))),n.push(";"),t.update&&(n.push(y),n.push(o.generateExpression(t.update,s.Sequence,7))),n.push(")")}),n.push(this.maybeBlock(t.body,32&r?33:1)),n},ForInStatement:function(t,r){return this.generateIterationForStatement("in",t,32&r?33:1)},ForOfStatement:function(t,r){return this.generateIterationForStatement("of",t,32&r?33:1)},LabeledStatement:function(t,r){return[t.label.name+":",this.maybeBlock(t.body,32&r?33:1)]},Program:function(t,r){var n,i,s,o,a;for(s=0,o=t.body.length,n=[x&&o>0?"\n":""],a=17;s<o;++s)x||s!==o-1||(a|=32),w&&(0!==s||t.body[0].leadingComments||j(t.range[0],t.body[s].range[0],n),!(s>0)||t.body[s-1].trailingComments||t.body[s].leadingComments||j(t.body[s-1].range[1],t.body[s].range[0],n)),i=R(this.generateStatement(t.body[s],a)),n.push(i),s+1<o&&!k(O(i).toString())&&(w&&t.body[s+1].leadingComments||n.push(m)),w&&s===o-1&&!t.body[s].trailingComments&&j(t.body[s].range[1],t.range[1],n);return n},FunctionDeclaration:function(t,r){return[H(t,!0),"function",Z(t)||L(),t.id?W(t.id):"",this.generateFunctionBody(t)]},ReturnStatement:function(t,r){return t.argument?[P("return",this.generateExpression(t.argument,s.Sequence,7)),this.semicolon(r)]:["return"+this.semicolon(r)]},WhileStatement:function(t,r){var n,i=this;return z(function(){n=["while"+y+"(",i.generateExpression(t.test,s.Sequence,7),")"]}),n.push(this.maybeBlock(t.body,32&r?33:1)),n},WithStatement:function(t,r){var n,i=this;return z(function(){n=["with"+y+"(",i.generateExpression(t.object,s.Sequence,7),")"]}),n.push(this.maybeBlock(t.body,32&r?33:1)),n}},M(q.prototype,q.Statement),q.Expression={SequenceExpression:function(t,r,n){var i,o,a;for(s.Sequence<r&&(n|=1),i=[],o=0,a=t.expressions.length;o<a;++o)i.push(this.generateExpression(t.expressions[o],s.Assignment,n)),o+1<a&&i.push(","+y);return V(i,s.Sequence,r)},AssignmentExpression:function(t,r,n){return this.generateAssignment(t.left,t.right,t.operator,r,n)},ArrowFunctionExpression:function(t,r,n){return V(this.generateFunctionBody(t),s.ArrowFunction,r)},ConditionalExpression:function(t,r,n){return s.Conditional<r&&(n|=1),V([this.generateExpression(t.test,s.Coalesce,n),y+"?"+y,this.generateExpression(t.consequent,s.Assignment,n),y+":"+y,this.generateExpression(t.alternate,s.Assignment,n)],s.Conditional,r)},LogicalExpression:function(t,r,n){return"??"===t.operator&&(n|=64),this.BinaryExpression(t,r,n)},BinaryExpression:function(t,r,n){var i,o,a,l,h,c;return(l=F[t.operator],o="**"===t.operator?s.Postfix:l,a="**"===t.operator?l:l+1,l<r&&(n|=1),i=47===(c=(h=this.generateExpression(t.left,o,n)).toString()).charCodeAt(c.length-1)&&u.code.isIdentifierPartES5(t.operator.charCodeAt(0))?[h,L(),t.operator]:P(h,t.operator),h=this.generateExpression(t.right,a,n),"/"===t.operator&&"/"===h.toString().charAt(0)||"<"===t.operator.slice(-1)&&"!--"===h.toString().slice(0,3)?(i.push(L()),i.push(h)):i=P(i,h),"in"===t.operator&&!(1&n)||("||"===t.operator||"&&"===t.operator)&&64&n)?["(",i,")"]:V(i,l,r)},CallExpression:function(t,r,n){var i,o,a;for(i=[this.generateExpression(t.callee,s.Call,3)],t.optional&&i.push("?."),i.push("("),o=0,a=t.arguments.length;o<a;++o)i.push(this.generateExpression(t.arguments[o],s.Assignment,7)),o+1<a&&i.push(","+y);return(i.push(")"),2&n)?V(i,s.Call,r):["(",i,")"]},ChainExpression:function(t,r,n){return s.OptionalChaining<r&&(n|=2),V(this.generateExpression(t.expression,s.OptionalChaining,n),s.OptionalChaining,r)},NewExpression:function(t,r,n){var i,o,a,u;if(o=t.arguments.length,u=4&n&&!v&&0===o?5:1,i=P("new",this.generateExpression(t.callee,s.New,u)),!(4&n)||v||o>0){for(i.push("("),a=0;a<o;++a)i.push(this.generateExpression(t.arguments[a],s.Assignment,7)),a+1<o&&i.push(","+y);i.push(")")}return V(i,s.New,r)},MemberExpression:function(t,r,n){var o,a;return o=[this.generateExpression(t.object,s.Call,2&n?3:1)],t.computed?(t.optional&&o.push("?."),o.push("["),o.push(this.generateExpression(t.property,s.Sequence,2&n?7:5)),o.push("]")):(!t.optional&&t.object.type===i.Literal&&"number"==typeof t.object.value&&0>(a=O(o).toString()).indexOf(".")&&!/[eExX]/.test(a)&&u.code.isDecimalDigit(a.charCo
vendor: 4,580 bytes, line 1
1deAt(a.length-1))&&!(a.length>=2&&48===a.charCodeAt(0))&&o.push(" "),o.push(t.optional?"?.":"."),o.push(W(t.property))),V(o,s.Member,r)},MetaProperty:function(t,r,n){var i;return(i=[]).push("string"==typeof t.meta?t.meta:W(t.meta)),i.push("."),i.push("string"==typeof t.property?t.property:W(t.property)),V(i,s.Member,r)},UnaryExpression:function(t,r,n){var i,o,a,l,h;return o=this.generateExpression(t.argument,s.Unary,7),""===y?i=P(t.operator,o):(i=[t.operator],t.operator.length>2?i=P(i,o):(h=(l=O(i).toString()).charCodeAt(l.length-1),a=o.toString().charCodeAt(0),((43===h||45===h)&&h===a||u.code.isIdentifierPartES5(h)&&u.code.isIdentifierPartES5(a))&&i.push(L()),i.push(o))),V(i,s.Unary,r)},YieldExpression:function(t,r,n){var i;return i=t.delegate?"yield*":"yield",t.argument&&(i=P(i,this.generateExpression(t.argument,s.Yield,7))),V(i,s.Yield,r)},AwaitExpression:function(t,r,n){return V(P(t.all?"await*":"await",this.generateExpression(t.argument,s.Await,7)),s.Await,r)},UpdateExpression:function(t,r,n){return t.prefix?V([t.operator,this.generateExpression(t.argument,s.Unary,7)],s.Unary,r):V([this.generateExpression(t.argument,s.Postfix,7),t.operator],s.Postfix,r)},FunctionExpression:function(t,r,n){var i=[H(t,!0),"function"];return t.id?(i.push(Z(t)||L()),i.push(W(t.id))):i.push(Z(t)||y),i.push(this.generateFunctionBody(t)),i},ArrayPattern:function(t,r,n){return this.ArrayExpression(t,r,n,!0)},ArrayExpression:function(t,r,n,i){var o,a,u=this;return t.elements.length?(o=["[",(a=!i&&t.elements.length>1)?m:""],z(function(r){var n,i;for(n=0,i=t.elements.length;n<i;++n)t.elements[n]?(o.push(a?r:""),o.push(u.generateExpression(t.elements[n],s.Assignment,7))):(a&&o.push(r),n+1===i&&o.push(",")),n+1<i&&o.push(","+(a?m:y))}),a&&!k(O(o).toString())&&o.push(m),o.push(a?l:""),o.push("]"),o):"[]"},RestElement:function(t,r,n){return"..."+this.generatePattern(t.argument)},ClassExpression:function(t,r,n){var i,o;return i=["class"],t.id&&(i=P(i,this.generateExpression(t.id,s.Sequence,7))),t.superClass&&(o=P("extends",this.generateExpression(t.superClass,s.Unary,7)),i=P(i,o)),i.push(y),i.push(this.generateStatement(t.body,33)),i},MethodDefinition:function(t,r,n){var i,s;return i=t.static?["static"+y]:[],s="get"===t.kind||"set"===t.kind?[P(t.kind,this.generatePropertyKey(t.key,t.computed)),this.generateFunctionBody(t.value)]:[Y(t),this.generatePropertyKey(t.key,t.computed),this.generateFunctionBody(t.value)],P(i,s)},Property:function(t,r,n){return"get"===t.kind||"set"===t.kind?[t.kind,L(),this.generatePropertyKey(t.key,t.computed),this.generateFunctionBody(t.value)]:t.shorthand?"AssignmentPattern"===t.value.type?this.AssignmentPattern(t.value,s.Sequence,7):this.generatePropertyKey(t.key,t.computed):t.method?[Y(t),this.generatePropertyKey(t.key,t.computed),this.generateFunctionBody(t.value)]:[this.generatePropertyKey(t.key,t.computed),":"+y,this.generateExpression(t.value,s.Assignment,7)]},ObjectExpression:function(t,r,n){var i,o,a,u,h=this;return t.properties.length?(o=t.properties.length>1,z(function(){u=h.generateExpression(t.properties[0],s.Sequence,7)}),o||(i=O(u).toString(),/[\r\n]/g.test(i)))?(z(function(r){var n,i;if(a=["{",m,r,u],o)for(a.push(","+m),n=1,i=t.properties.length;n<i;++n)a.push(r),a.push(h.generateExpression(t.properties[n],s.Sequence,7)),n+1<i&&a.push(","+m)}),k(O(a).toString())||a.push(m),a.push(l),a.push("}"),a):["{",y,u,y,"}"]:"{}"},AssignmentPattern:function(t,r,n){return this.generateAssignment(t.left,t.right,"=",r,n)},ObjectPattern:function(t,r,n){var o,a,u,h,c,d=this;if(!t.properties.length)return"{}";if(h=!1,1===t.properties.length)(c=t.properties[0]).type===i.Property&&c.value.type!==i.Identifier&&(h=!0);else for(a=0,u=t.properties.length;a<u;++a)if((c=t.properties[a]).type===i.Property&&!c.shorthand){h=!0;break}return o=["{",h?m:""],z(function(r){var n,i;for(n=0,i=t.properties.length;n<i;++n)o.push(h?r:""),o.push(d.generateExpression(t.properties[n],s.Sequence,7)),n+1<i&&o.push(","+(h?m:y))}),h&&!k(O(o).toString())&&o.push(m),o.push(h?l:""),o.push("}"),o},ThisExpression:function(t,r,n){return"this"},Super:function(t,r,n){return"super"},Identifier:function(t,r,n){return W(t)},ImportDefaultSpecifier:function(t,r,n){return W(t.id||t.local)},ImportNamespaceSpecifier:function(t,r,n){var i=["*"],s=t.id||t.local;return s&&i.push(y+"as"+L()+W(s)),i},ImportSpecifier:function(t,r,n){var i=t.imported,s=[i.name],o=t.local;return o&&o.name!==i.name&&s.push(L()+"as"+L()+W(o)),s},ExportSpecifier:function(t,r,n){var i=t.local,s=[i.name],o=t.exported;return o&&o.name!==i.name&&s.push(L()+"as"+L()+W(o)),s}
1,Literal:function(t,r,n){var s;if(t.hasOwnProperty("raw")&&A&&D.raw)try{if((s=A(t.raw).body[0].expression).type===i.Literal&&s.value===t.value)return t.raw}catch(t){}return t.regex?"/"+t.regex.pattern+"/"+t.regex.flags:"bigint"==typeof t.value?t.value.toString()+"n":t.bigint?t.bigint+"n":null===t.value?"null":"string"==typeof t.value?function(t){var r,n,i,s,o,a="",l=0,h=0;for(r=0,n=t.length;r<n;++r){if(39===(i=t.charCodeAt(r)))++l;else if(34===i)++h;else if(47===i&&c)a+="\\";else if(u.code.isLineTerminator(i)||92===i){a+=function(t){if(92===t)return"\\\\";if(10===t)return"\\n";if(13===t)return"\\r";if(8232===t)return"\\u2028";if(8233===t)return"\\u2029";throw Error("Incorrectly classified character")}(i);continue}else if(!u.code.isIdentifierPartES5(i)&&(c&&i<32||!c&&!g&&(i<32||i>126))){a+=function(t,r){var n;return 8===t?"\\b":12===t?"\\f":9===t?"\\t":(n=t.toString(16).toUpperCase(),c||t>255)?"\\u"+"0000".slice(n.length)+n:0!==t||u.code.isDecimalDigit(r)?11===t?"\\x0B":"\\x"+"00".slice(n.length)+n:"\\0"}(i,t.charCodeAt(r+1));continue}a+=String.fromCharCode(i)}if(o=(s=!("double"===f||"auto"===f&&h<l))?"'":'"',!(s?l:h))return o+a+o;for(r=0,t=a,a=o,n=t.length;r<n;++r)(39===(i=t.charCodeAt(r))&&s||34===i&&!s)&&(a+="\\"),a+=String.fromCharCode(i);return a+o}(t.value):"number"==typeof t.value?function(t){var r,n,i,s,o;if(t!=t)throw Error("Numeric literal whose value is NaN");if(t<0||0===t&&1/t<0)throw Error("Numeric literal whose value is negative");if(t===1/0)return c?"null":d?"1e400":"1e+400";if(r=""+t,!d||r.length<3)return r;for(n=r.indexOf("."),c||48!==r.charCodeAt(0)||1!==n||(n=0,r=r.slice(1)),i=r,r=r.replace("e+","e"),s=0,(o=i.indexOf("e"))>0&&(s=+i.slice(o+1),i=i.slice(0,o)),n>=0&&(s-=i.length-n-1,i=+(i.slice(0,n)+i.slice(n+1))+""),o=0;48===i.charCodeAt(i.length+o-1);)--o;return 0!==o&&(s-=o,i=i.slice(0,o)),0!==s&&(i+="e"+s),(i.length<r.length||p&&t>1e12&&Math.floor(t)===t&&(i="0x"+t.toString(16)).length<r.length)&&+i===t&&(r=i),r}(t.value):"boolean"==typeof t.value?t.value?"true":"false":function(t){var r,n,i,s,o,a,u,l;if(n=t.toString(),t.source){if(!(r=n.match(/\/([^/]*)$/)))return n;for(s=0,i=r[1],n="",u=!1,l=!1,o=t.source.length;s<o;++s)a=t.source.charCodeAt(s),l?(n+=I(a,l),l=!1):(u?93===a&&(u=!1):47===a?n+="\\":91===a&&(u=!0),n+=I(a,l),l=92===a);return"/"+n+"/"+i}return n}(t.value)},GeneratorExpression:function(t,r,n){return this.ComprehensionExpression(t,r,n)},ComprehensionExpression:function(t,r,n){var o,a,u,l,h=this;return o=t.type===i.GeneratorExpression?["("]:["["],D.moz.comprehensionExpressionStartsWithAssignment&&(l=this.generateExpression(t.body,s.Assignment,7),o.push(l)),t.blocks&&z(function(){for(a=0,u=t.blocks.length;a<u;++a)l=h.generateExpression(t.blocks[a],s.Sequence,7),a>0||D.moz.comprehensionExpressionStartsWithAssignment?o=P(o,l):o.push(l)}),t.filter&&(o=P(o,"if"+y),l=this.generateExpression(t.filter,s.Sequence,7),o=P(o,["(",l,")"])),D.moz.comprehensionExpressionStartsWithAssignment||(l=this.generateExpression(t.body,s.Assignment,7),o=P(o,l)),o.push(t.type===i.GeneratorExpression?")":"]"),o},ComprehensionBlock:function(t,r,n){var o;return o=P(o=t.left.type===i.VariableDeclaration?[t.left.kind,L(),this.generateStatement(t.left.declarations[0],0)]:this.generateExpression(t.left,s.Call,7),t.of?"of":"in"),o=P(o,this.generateExpression(t.right,s.Sequence,7)),["for"+y+"(",o,")"]},SpreadElement:function(t,r,n){return["...",this.generateExpression(t.argument,s.Assignment,7)]},TaggedTemplateExpression:function(t,r,n){var i=3;return 2&n||(i=1),V([this.generateExpression(t.tag,s.Call,i),this.generateExpression(t.quasi,s.Primary,4)],s.TaggedTemplate,r)},TemplateElement:function(t,r,n){return t.value.raw},TemplateLiteral:function(t,r,n){var i,o,a;for(o=0,i=["`"],a=t.quasis.length;o<a;++o)i.push(this.generateExpression(t.quasis[o],s.Primary,7)),o+1<a&&(i.push("${"+y),i.push(this.generateExpression(t.expressions[o],s.Sequence,7)),i.push(y+"}"));return i.push("`"),i},ModuleSpecifier:function(t,r,n){return this.Literal(t,r,n)},ImportExpression:function(t,r,n){return V(["import(",this.generateExpression(t.source,s.Assignment,7),")"],s.Call,r)}},M(q.prototype,q.Expression),q.prototype.generateExpression=function(t,r,n){var o,a,u,l;return(a=t.type||i.Property,D.verbatim&&t.hasOwnProperty(D.verbatim))?O(l="string"==typeof(u=t[D.verbatim])?V(G(u),s.Sequence,r):V(l=G(u.content),null!=u.precedence?u.precedence:s.Sequence,r),t):(o=this[a](t,r,n),D.comment&&(o=$(t,o)),O(o,t))},q.prototype.generateStatement=function(t,r){var n,s;return n=this[t.type](t,r),D.comment&&(n=$(t,n)),s=O(n).toString(),t.type!==i.Program||x||""!==m||"\n"!==s.charAt(s.length-1)||(n=C?O(n).replaceRight(/\s+$/,""):s.replace(/\s+$/,"")),O(n,t)},S=N().format,r.version=n(2636).version,r.generate=function(i,a){var u,S,F=N();return(null!=a?("string"==typeof a.indent&&(F.format.indent.style=a.indent),"number"==typeof a.base&&(F.format.indent.base=a.base),h=(a=T(F,a)).format.indent.style,l="string"==typeof a.base?a.base:B(h,a.format.indent.base)):l=B(h=(a=F).format.indent.style,a.format.indent.base),c=a.format.json,d=a.format.renumber,p=!c&&a.format.hexadecimal,f=c?"double":a.format.quotes,g=a.format.escapeless,m=a.format.newline,y=a.format.space,a.format.compact&&(m=y=h=l=""),v=a.format.parentheses,b=a.format.semicolons,x=a.format.safeConcatenation,_=a.directive,A=c?null:a.parse,C=a.sourceMap,E=a.sourceCode,w=a.format.preserveBlankLines&&null!==E,D=a,C&&
1(o=r.browser?n.g.sourceMap.SourceNode:n(2989).SourceNode),u=function(r){var n;if(n=new q,t(r))return n.generateStatement(r,1);if(q.Expression.hasOwnProperty(r.type))return n.generateExpression(r,s.Sequence,7);throw Error("Unknown node type: "+r.type)}(i),C)?(S=u.toStringWithSourceMap({file:a.file,sourceRoot:a.sourceMapRoot}),a.sourceContent&&S.map.setSourceContent(a.sourceMap,a.sourceContent),a.sourceMapWithCode)?S:S.map.toString():(S={code:u.toString(),map:null},a.sourceMapWithCode?S:S.code)},r.attachComments=a.attachComments,r.Precedence=T({},s),r.browser=!1,r.FORMAT_MINIFY={indent:{style:"",base:0},renumber:!0,hexadecimal:!0,quotes:"auto",escapeless:!0,compact:!0,parentheses:!1,semicolons:!1},r.FORMAT_DEFAULTS=S}()},2510:(t,r,n)=>{"use strict";n.d(r,{A:()=>l,V:()=>u});var i=n(5311),s=n(5191),o=n(5056),a=n(6686);n(7189);class u{constructor(t,r,n,i){this.renderer=i,this.vertices=[],this.boundingBoxCache=null,this.lineVertices=new s.U,this.lineTangentsIn=new s.U,this.lineTangentsOut=new s.U,this.lineSides=new s.U,this.vertexNormals=[],this.faces=[],this.uvs=[],this.edges=[],this.vertexColors=[],this.vertexStrokeColors=[],this.userVertexProperties={},this.lineVertexColors=new s.U,this.detailX=void 0!==t?t:1,this.detailY=void 0!==r?r:1,this.dirtyFlags={},this._hasFillTransparency=void 0,this._hasStrokeTransparency=void 0,this.gid=`_p5_Geometry_${u.nextId}`,u.nextId++,n instanceof Function&&n.call(this)}calculateBoundingBox(){if(this.boundingBoxCache)return this.boundingBoxCache;let t=new o.M(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new o.M(5e-324,5e-324,5e-324);for(let n=0;n<this.vertices.length;n++){let i=this.vertices[n];t.x=Math.min(t.x,i.x),t.y=Math.min(t.y,i.y),t.z=Math.min(t.z,i.z),r.x=Math.max(r.x,i.x),r.y=Math.max(r.y,i.y),r.z=Math.max(r.z,i.z)}let n=new o.M(r.x-t.x,r.y-t.y,r.z-t.z),i=new o.M((t.x+r.x)/2,(t.y+r.y)/2,(t.z+r.z)/2);return this.boundingBoxCache={min:t,max:r,size:n,offset:i},this.boundingBoxCache}reset(){for(let t in this._hasFillTransparency=void 0,this._hasStrokeTransparency=void 0,this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear(),this.vertices.length=0,this.edges.length=0,this.vertexColors.length=0,this.vertexStrokeColors.length=0,this.lineVertexColors.clear(),this.vertexNormals.length=0,this.uvs.length=0,this.userVertexProperties)this.userVertexProperties[t].delete();this.userVertexProperties={},this.dirtyFlags={}}hasFillTransparency(){if(void 0===this._hasFillTransparency){this._hasFillTransparency=!1;for(let t=0;t<this.vertexColors.length;t+=4)if(this.vertexColors[t+3]<1){this._hasFillTransparency=!0;break}}return this._hasFillTransparency}hasStrokeTransparency(){if(void 0===this._hasStrokeTransparency){this._hasStrokeTransparency=!1;for(let t=0;t<this.lineVertexColors.length;t+=4)if(this.lineVertexColors[t+3]<1){this._hasStrokeTransparency=!0;break}}return this._hasStrokeTransparency}clearColors(){return this.vertexColors=[],this}saveObj(t="model.obj"){let r="";if(this.vertices.forEach(t=>{r+=`v ${t.x} ${t.y} ${t.z}
2`}),this.uvs&&this.uvs.length>0)for(let t=0;t<this.uvs.length;t+=2)r+=`vt ${this.uvs[t]} ${this.uvs[t+1]}
3`;this.vertexNormals&&this.vertexNormals.length>0&&this.vertexNormals.forEach(t=>{r+=`vn ${t.x} ${t.y} ${t.z}
4`}),this.faces.forEach(t=>{let n="f";t.forEach(t=>{n+=" ",n+=t+1,(this.vertexNormals.length>0||this.uvs.length>0)&&(n+="/",this.uvs.length>0&&(n+=t+1),n+="/",this.vertexNormals.length>0&&(n+=t+1))}),r+=n+"\n"});let n=new Blob([r],{type:"text/plain"});(0,a.P)(n,t,"obj")}saveStl(t="model.stl",{binary:r=!1}={}){let n,i=t.substring(0,t.lastIndexOf(".")),s=[];for(let t of this.faces){let r=o.M.sub(this.vertices[t[1]],this.vertices[t[0]]),n=o.M.sub(this.vertices[t[2]],this.vertices[t[0]]),i=r.y*n.z-r.z*n.y,a=r.z*n.x-r.x*n.z,u=r.x*n.y-r.y*n.x;s.push(new o.M(i,a,u).normalize())}if(r){let t=80;for(let[r,i]of((n=new DataView(new ArrayBuffer(2*this.faces.length+3*this.faces.length*16+80+4))).setUint32(t,this.faces.length,!0),t+=4,Object.entries(this.faces))){let o=s[r];for(let r of(n.setFloat32(t,o.x,!0),t+=4,n.setFloat32(t,o.y,!0),t+=4,n.setFloat32(t,o.z,!0),t+=4,i)){let i=this.vertices[r];n.setFloat32(t,i.x,!0),t+=4,n.setFloat32(t,i.y,!0),t+=4,n.setFloat32(t,i.z,!0),t+=4}n.setUint16(t,0,!0),t+=2}}
4else{for(let[t,r]of(n="solid "+i+"\n",Object.entries(this.faces))){let i=s[t];for(let t of(n+=" facet norm "+i.x+" "+i.y+" "+i.z+"\n",n+="  outer loop\n",r)){let r=this.vertices[t];n+="   vertex "+r.x+" "+r.y+" "+r.z+"\n"}n+="  endloop\n",n+=" endfacet\n"}n+="endsolid "+i+"\n"}let u=new Blob([n],{type:"text/plain"});(0,a.P)(u,t,"stl")}flipU(){this.uvs=this.uvs.flat().map((t,r)=>r%2==0?1-t:t)}flipV(){this.uvs=this.uvs.flat().map((t,r)=>r%2==0?t:1-t)}computeFaces(){let t,r,n,i;this.faces.length=0;let s=this.detailX+1;for(let o=0;o<this.detailY;o++)for(let a=0;a<this.detailX;a++)t=o*s+a,r=o*s+a+1,n=(o+1)*s+a+1,i=(o+1)*s+a,this.faces.push([t,r,i]),this.faces.push([i,r,n]);return this}_getFaceNormal(t){let r=this.faces[t],n=this.vertices[r[0]],i=this.vertices[r[1]],s=this.vertices[r[2]],a=o.M.sub(i,n),u=o.M.sub(s,n),l=o.M.cross(a,u),h=o.M.mag(l),c=h/(o.M.mag(a)*o.M.mag(u));return 0===c||isNaN(c)?(console.warn("p5.Geometry.prototype._getFaceNormal:","face has colinear sides or a repeated vertex"),l):(c>1&&(c=1),l.mult(Math.asin(c)/h))}computeNormals(t=i.F,{roundToPrecision:r=3}={}){let n,s=this.vertexNormals,a=this.vertices,u=this.faces;if(t===i.y){let t={},n=[],i=Math.pow(10,r),s=t=>Math.round(t*i)/i,o=t=>`${s(t.x)},${s(t.y)},${s(t.z)}`;for(let r=0;r<a.length;r++){let i=a[r],s=o(i);void 0===t[s]&&(t[s]=n.length,n.push(i))}u.forEach(r=>{for(let n=0;n<3;++n){let i=o(a[r[n]]);r[n]=t[i]}}
4),this.edges.forEach(r=>{for(let n=0;n<2;++n){let i=o(a[r[n]]);r[n]=t[i]}}),this.vertices=a=n}for(n=0,s.length=0;n<a.length;++n)s.push(new o.M);for(u.forEach((t,r)=>{let n=this._getFaceNormal(r);for(let r=0;r<3;++r)s[t[r]].add(n)}),n=0;n<a.length;++n)s[n].normalize();return this}averageNormals(){for(let t=0;t<=this.detailY;t++){let r=this.detailX+1,n=o.M.add(this.vertexNormals[t*r],this.vertexNormals[t*r+this.detailX]);n=o.M.div(n,2),this.vertexNormals[t*r]=n,this.vertexNormals[t*r+this.detailX]=n}return this}averagePoleNormals(){let t=new o.M(0,0,0);for(let r=0;r<this.detailX;r++)t.add(this.vertexNormals[r]);t=o.M.div(t,this.detailX);for(let r=0;r<this.detailX;r++)this.vertexNormals[r]=t;t=new o.M(0,0,0);for(let r=this.vertices.length-1;r>this.vertices.length-1-this.detailX;r--)t.add(this.vertexNormals[r]);t=o.M.div(t,this.detailX);for(let r=this.vertices.length-1;r>this.vertices.length-1-this.detailX;r--)this.vertexNormals[r]=t;return this}_makeTriangleEdges(){this.edges.length=0;for(let t=0;t<this.faces.length;t++)this.edges.push([this.faces[t][0],this.faces[t][1]]),this.edges.push([this.faces[t][1],this.faces[t][2]]),this.edges.push([this.faces[t][2],this.faces[t][0]]);return this}makeEdgesFromFaces(){this._makeTriangleEdges()}_edgesToVertices(){let t;this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear();let r=new Map,n=new Set;for(let i=0;i<this.edges.length;i++){let s=this.edges[i-1],o=this.edges[i],a=this.vertices[o[0]],u=this.vertices[o[1]],l=this.vertexStrokeColors.length>0&&s?this.vertexStrokeColors.slice(4*s[1],(s[1]+1)*4):[0,0,0,0],h=this.vertexStrokeColors.length>0?this.vertexStrokeColors.slice(4*o[0],(o[0]+1)*4):[0,0,0,0],c=this.vertexStrokeColors.length>0?this.vertexStrokeColors.slice(4*o[1],(o[1]+1)*4):[0,0,0,0],d=u.copy().sub(a).normalize(),p=d.magSq()>0;if(p&&this._addSegment(a,u,h,c,d),!this.renderer?._simpleLines){if(i>0&&s[1]===o[0])!n.has(o[0])&&(n.add(o[0]),r.delete(o[0]),t&&p&&d.dot(t)<1-1e-8&&this._addJoin(a,t,d,h));else{if(p&&!n.has(o[0])){let t=r.get(o[0]);t?(this._addJoin(a,t.dir,d,h),r.delete(o[0]),n.add(o[0])):r.set(o[0],{point:a,dir:d.copy().mult(-1),color:h})}if(t&&!n.has(s[1])){let i=r.get(s[1]);i?(this._addJoin(this.vertices[s[1]],t,i.dir.copy().mult(-1),l),r.delete(s[1]),n.add(s[1])):r.set(s[1],{point:this.vertices[s[1]],dir:t,color:l}),t=void 0}}if(i===this.edges.length-1&&!n.has(o[1])){let t=r.get(o[1]);t?(this._addJoin(u,d,t.dir.copy().mult(-1),c),r.delete(o[1]),n.add(o[1])):r.set(o[1],{point:u,dir:d,color:c})}p&&(t=d)}}for(let{point:t,dir:n,color:i}of r.values())this._addCap(t,n,i);return this}_addSegment(t,r,n,i,s){let o=t.array(),a=r.array(),u=s.array();for(let t of(this.lineSides.push(1,1,-1,1,-1,-1),[this.lineTangentsIn,this.lineTangentsOut]))for(let r=0;r<6;r++)t.push(...u);return this.lineVertices.push(...o,...a,...o,...a,...a,...o),this.renderer?._simpleLines||this.lineVertexColors.push(...n,...i,...n,...i,...i,...n),this}_addCap(t,r,n){let i=t.array(),s=r.array(),o=[0,0,0];for(let t=0;t<6;t++)this.lineVertices.push(...i),this.lineTangentsIn.push(...s),this.lineTangentsOut.push(...o),this.lineVertexColors.push(...n);return this.lineSides.push(-1,2,-2,1,2,-1),this}_addJoin(t,r,n,i){let s=t.array(),o=r.array(),a=n.array();for(let t=0;t<12;t++)this.lineVertices.push(...s),this.lineTangentsIn.push(...o),this.lineTangentsOut.push(...a),this.lineVertexColors.push(...i);return this.lineSides.push(-1,-3,-2,-1,0,-3),this.lineSides.push(3,1,2,3,0,1),this}normalize(){if(this.vertices.length>0){let t=this.vertices[0].copy(),r=this.vertices[0].copy();for(let n=0;n<this.vertices.length;n++)t.x=Math.max(t.x,this.vertices[n].x),r.x=Math.min(r.x,this.vertices[n].x),t.y=Math.max(t.y,this.vertices[n].y),r.y=Math.min(r.y,this.vertices[n].y),t.z=Math.max(t.z,this.vertices[n].z),r.z=Math.min(r.z,this.vertices[n].z);let n=o.M.lerp(t,r,.5),i=o.M.sub(t,r),s=200/Math.max(Math.max(i.x,i.y),i.z);for(let t=0;t<this.vertices.length;t++)this.vertices[t].sub(n),this.vertices[t].mult(s)}return this}vertexProperty(t,r,n){let i;this.userVertexProperties[t]||(i=this.userVertexProperties[t]=this._userVertexPropertyHelper(t,r,n)),i=this.userVertexProperties[t],n?i.pushDirect(r):(i.setCurrentData(r),i.pushCurrentData())}_userVertexPropertyHelper(t,r,n){return this[(this.userVertexProperties[t]={name:t,dataSize:n||(r.length?r.length:1),geometry:this,getName(){return this.name},getCurrentData(){return void 0===this.currentData&&(this.currentData=Array(this.getDataSize()).fill(0)),this.currentData},getDataSize(){return this.dataSize},getSrcName(){return this.name.concat("Src")},getDstName(){return this.name.concat("Buffer")},getSrcArray(){let t=this.getSrcName();return this.geometry[t]},setCurrentData(t){t.length&&t.length,this.currentData=t},pushCurrentData(){let t=this.getCurrentData();this.pushDirect(t)}
4,pushDirect(t){t.length?this.getSrcArray().push(...t):this.getSrcArray().push(t)},resetSrcArray(){this.geometry[this.getSrcName()]=[]},delete(){let t=this.getSrcName();delete this.geometry[t],delete this}}).getSrcName()]=[],this.userVertexProperties[t]}}function l(t,r){t.Geometry=u}u.nextId=0,"undefined"!=typeof p5&&l(p5,p5.prototype)},2586:(t,r,n)=>{"use strict";n.d(r,{A:()=>s});class i{add(t,r,n){if("string"!=typeof arguments[0]){for(var t in arguments[0])this.add(t,arguments[0][t],arguments[1]);return}(Array.isArray(t)?t:[t]).forEach(function(t){this[t]=this[t]||[],r&&this[t][n?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(t){t.call(r&&r.context?r.context:r,r)})}}let s=new i},2605:(t,r)=>{function n(t,r,n){var i=t[r];t[r]=t[n],t[n]=i}r.g=function(t,r){!function t(r,i,s,o){if(s<o){var a=Math.round(s+Math.random()*(o-s)),u=s-1;n(r,a,o);for(var l=r[o],h=s;h<o;h++)0>=i(r[h],l)&&n(r,u+=1,h);n(r,u+1,h);var c=u+1;t(r,i,s,c-1),t(r,i,c+1,o)}}(t,r,0,t.length-1)}},2636:t=>{"use strict";t.exports={version:"2.1.0"}},2757:(t,r,n)=>{"use strict";n.d(r,{default:()=>L});var i,s,o=n(5311),a=n(529);function u(t,r){r.noLoop=function(){this._loop=!1},r.loop=function(){!this._loop&&(this._loop=!0,this._setupDone&&this._draw())},r.isLooping=function(){return this._loop},r.redraw=async function(t){if(this._inUserDraw||!this._setupDone)return;let r=parseInt(t);(isNaN(r)||r<1)&&(r=1);let n=this._isGlobal?window:this;if("function"==typeof n.draw){void 0===n.setup&&n.scale(n._pixelDensity,n._pixelDensity);for(let t=0;t<r;t++){n.resetMatrix(),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._updateAccsOutput(),this._renderer.isP3D&&this._renderer._update(),this.frameCount=n.frameCount+1,await this._runLifecycleHook("predraw"),this._inUserDraw=!0;try{await n.draw()}finally{this._inUserDraw=!1}await this._runLifecycleHook("postdraw")}}}}"undefined"!=typeof p5&&u(p5,p5.prototype);var l=n(5056);function h(t,r){let n=[o.b,o.c,o.H,o.M,o.d,o.W];r._frameRate=0,r._lastFrameTime=window.performance.now(),r._targetFrameRate=60;let i=window.print,s=!1;function a(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function u(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}r.print=function(...t){t.length?console.log(...t):!s&&(i(),window.confirm("You just tried to print the webpage. Do you want to prevent this from running again?")&&(s=!0))},r.frameCount=0,r.deltaTime=0,r.focused=document.hasFocus(),r.cursor=function(t,r,i){let s="auto",o=this._curElement.elt;if(n.includes(t))s=t;else if("string"==typeof t){let n="";r&&i&&"number"==typeof r&&"number"==typeof i&&(n=`${r} ${i}`),s="http://"===t.substring(0,7)||"https://"===t.substring(0,8)||/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(t)?`url(${t}) ${n}, auto`:t}o.style.cursor=s},r.frameRate=function(t){return"number"!=typeof t||t<0?this._frameRate:(this._targetFrameRate=t,0===t&&(this._frameRate=t),this)},r.getFrameRate=function(){return this.frameRate()},r.setFrameRate=function(t){return this.frameRate(t)},r.getTargetFrameRate=function(){return this._targetFrameRate},r.noCursor=function(){this._curElement.elt.style.cursor="none"},r.webglVersion=o.P,r.displayWidth=screen.width,r.displayHeight=screen.height,r.windowWidth=0,r.windowHeight=0,r._onresize=function(t){let r;this.windowWidth=a(),this.windowHeight=u();let n=this._isGlobal?window:this;"function"==typeof n.windowResized&&(void 0===(r=n.windowResized(t))||r||t.preventDefault())},r._updateWindowSize=function(){this.windowWidth=a(),this.windowHeight=u()},Object.defineProperty(r,"width",{get(){return this._renderer.width}}),Object.defineProperty(r,"height",{get(){return this._renderer.height}}),r.fullscreen=function(t){if(void 0===t)return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;t?function(t){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw Error("Fullscreen not enabled in this browser.");t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}(document.documentElement):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},r.pixelDensity=function(t){let r;return"number"==typeof t?(t!==this._renderer._pixelDensity&&(this._renderer._pixelDensity=t),r=this,this.resizeCanvas(this.width,this.height,!0)):r=this._renderer._pixelDensity,r},r.displayDensity=()=>
4window.devicePixelRatio,r.getURL=()=>location.href,r.getURLPath=()=>location.pathname.split("/").filter(t=>""!==t),r.getURLParams=function(){let t,r=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,n={};for(;null!=(t=r.exec(location.search));)t.index===r.lastIndex&&r.lastIndex++,n[t[1]]=t[2];return n},r.worldToScreen=function(t){return"number"==typeof t&&(t=this.createVector(...arguments)),this._renderer.getWorldToScreenMatrix().multiplyAndNormalizePoint(t)},r.screenToWorld=function(t){"number"==typeof t&&(t=this.createVector(...arguments));let r=this._renderer.getWorldToScreenMatrix();if(2==t.dimensions){let n=r.mat4[14]/r.mat4[15];t=this.createVector(t.x,t.y,n)}return r.invert(r).multiplyAndNormalizePoint(t)}}"undefined"!=typeof p5&&h(p5,p5.prototype);var c=n(1429),d=n(8497),p=n(6373),f=n(4263),g=n(74),m=n(4922);n(1024);var y=n(9321),v=n(4962),b=n(9184);n(6796);var x=n(4574),_=n(6363),D=n(8273),A=n(9327);n(8983),n(6686),n(7189),n(902);var C=n(5570);n(7666),n(5450);var E=n(9742),w=n(4576);n(9855);var S=n(2510),F=n(5191),N=n(9829),B=n(1935);n(9331),n(9605);var k=n(4867),M=n(8715);class T{constructor(t){this.pInst=t,this.canvas=document.createElement("canvas"),this.canvas.width=t.width,this.canvas.height=t.height;let r=o.z;if(this.gl=this.canvas.getContext("webgl2"),this.gl||(r=o.a0,this.gl=this.canvas.getContext("webgl")),!this.gl)return void console.error("WebGL not supported, cannot apply filter.");this._renderer={GL:this.gl,registerEnabled:new Set,_curShader:null,_emptyTexture:null,webglVersion:r,states:{textureWrapX:this.gl.CLAMP_TO_EDGE,textureWrapY:this.gl.CLAMP_TO_EDGE},_arraysEqual:(t,r)=>JSON.stringify(t)===JSON.stringify(r),_getEmptyTexture:()=>{if(!this._emptyTexture){let t=new d.I(1,1);t.set(0,0,255),this._emptyTexture=new c.T(this._renderer,t)}return this._emptyTexture}},this._baseFilterShader=void 0,this.filterShaderSources={[o.$]:c.q,[o._]:c.o,[o.Z]:c.n,[o.Y]:c.k,[o.X]:c.j,[o.V]:c.h,[o.U]:c.g,[o.K]:c.e},this.filterShaders={},this.operation=null,this.filterParameter=1,this.customShader=null,this._shader=null,this.vertexBuffer=this.gl.createBuffer(),this.texcoordBuffer=this.gl.createBuffer(),this.vertices=new Float32Array([-1,-1,1,-1,-1,1,1,1]),this.texcoords=new Float32Array([0,1,1,1,0,0,1,0]),this._bindBufferData(this.vertexBuffer,this.gl.ARRAY_BUFFER,this.vertices),this._bindBufferData(this.texcoordBuffer,this.gl.ARRAY_BUFFER,this.texcoords)}_webGL2CompatibilityPrefix(t,r){let n="";return this._renderer.webglVersion===o.z&&(n+="#version 300 es\n#define WEBGL2\n"),"vert"===t?n+="#define VERTEX_SHADER\n":"frag"===t&&(n+="#define FRAGMENT_SHADER\n"),r&&(n+=`precision ${r} float;
5`),n}baseFilterShader(){return this._baseFilterShader||(this._baseFilterShader=new c.S(this._renderer,this._webGL2CompatibilityPrefix("vert","highp")+c.w+c.u,this._webGL2CompatibilityPrefix("frag","highp")+c.w+c.v,{vertex:{},fragment:{"vec4 getColor":`(FilterInputs inputs, in sampler2D canvasContent) {
6                return getTexture(canvasContent, inputs.texCoord);
7              }`}})),this._baseFilterShader}setOperation(t,r,n=null){this.operation=t,this.filterParameter=r,t in m.k&&void 0===r&&(this.filterParameter=m.k[t]),this.customShader=n,this._initializeShader()}_initializeShader(){if(this.customShader){this._shader=this.customShader;return}if(!this.operation)return void console.error("No operation set for FilterRenderer2D, cannot initialize shader.");if(this.filterShaders[this.operation]){this._shader=this.filterShaders[this.operation];return}let t=this.filterShaderSources[this.operation];if(!t)return void console.error("No shader available for this operation:",this.operation);let r=new c.S(this._renderer,c.x,t);this.filterShaders[this.operation]=r,this._shader=r}_bindBufferData(t,r,n){let i=this.gl;i.bindBuffer(r,t),i.bufferData(r,n,i.STATIC_DRAW)}get canvasTexture(){return this._canvasTexture||(this._canvasTexture=new c.T(this._renderer,this.pInst.wrappedElt)),this._canvasTexture}_renderPass(){let t=this.gl;this._shader.bindShader();let r=this.pInst.pixelDensity?this.pInst.pixelDensity():1,n=[1/(this.pInst.width*r),1/(this.pInst.height*r)],i=this.canvasTexture;this._shader.setUniform("tex0",i),this._shader.setUniform("texelSize",n),this._shader.setUniform("canvasSize",[this.pInst.width,this.pInst.height]),this._shader.setUniform("radius",Math.max(1,this.filterParameter)),this._shader.setUniform("filterParameter",this.filterParameter),this._shader.setDefaultUniforms(),this.pInst.states.setValue("rectMode",o.e),this.pInst.states.setValue("imageMode",o.e),this.pInst.blendMode(o.u),this.pInst.resetMatrix();let s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];this._shader.setUniform("uModelViewMatrix",s),this._shader.setUniform("uProjectionMatrix",s),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),this._shader.enableAttrib(this._shader.attributes.aPosition,2),t.bindBuffer(t.ARRAY_BUFFER,this.texcoordBuffer),this._shader.enableAttrib(this._shader.attributes.aTexCoord,2),this._shader.bindTextures(),this._shader.disableRemainingAttributes(),t.drawArrays(t.TRIANGLE_STRIP,0,4),this._shader.unbindShader()}applyFilter(){if(!this._shader)return void console.error("Cannot apply filter: shader not initialized.");this.pInst.push(),this.pInst.resetMatrix(),this.operation!==o.$||this.customShader?(this._renderPass(),this.pInst.clear(),this.pInst.blendMode(o.u)):(this._shader.setUniform("direction",[1,0]),this._renderPass(),this.pInst.clear(),this.pInst.drawingContext.drawImage(this.canvas,0,0,this.pInst.width,this.pInst.height),this._shader.setUniform("direction",[0,1]),this._renderPass(),this.pInst.clear()),this.pInst.drawingContext.drawImage(this.canvas,0,0,this.pInst.width,this.pInst.height),this.pInst.pop()}}let I="rgba(0,0,0,0)";class O extends d.R{constructor(t,r,n,i,s,o={}){for(let o of(super(t,r,n,i),this.canvas=this.elt=s||document.createElement("canvas"),i?(this._pInst._curElement=this,this._pInst.canvas=this.canvas):this.canvas.style.display="none",this.elt.id="defaultCanvas0",this.elt.classList.add("p5Canvas"),Object.getOwnPropertyNames(p.H.prototype)))"constructor"!==o&&"_"!==o[0]&&Object.defineProperty(this,o,{get(){return this.wrappedElt[o]}});if(this.elt.width=r*this._pixelDensity,this.elt.height=n*this._pixelDensity,this.elt.style.width=`${r}px`,this.elt.style.height=`${n}px`,this._pInst._userNode)this._pInst._userNode.appendChild(this.elt);else{if(0===document.getElementsByTagName("main").length){let t=document.createElement("main");document.body.appendChild(t)}document.getElementsByTagName("main")[0].appendChild(this.elt)}this.drawingContext=this.canvas.getContext("2d",o),"display-p3"===o.colorSpace&&(this.states.colorMode=g.b),this.scale(this._pixelDensity,this._pixelDensity),this.filterRenderer||(this.filterRenderer=new T(this)),this.wrappedElt=new p.H(this.elt,this._pInst),this.clipPath=null}remove(){this.wrappedElt.remove(),this.wrappedElt=null,this.canvas=null,this.elt=null}getFilterGraphicsLayer(){if(!this.filterGraphicsLayer){let t=this._pInst;this.filterGraphicsLayer=new c.G(this.width,this.height,o.a0,t)}return(this.filterGraphicsLayer.width!==this.width||this.filterGraphicsLayer.height!==this.height)&&this.filterGraphicsLayer.resizeCanvas(this.width,this.height),this.filterGraphicsLayer.pixelDensity()!==this._pInst.pixelDensity()&&this.filterGraphicsLayer.pixelDensity(this._pInst.pixelDensity()),this.filterGraphicsLayer}_applyDefaults(){this.states.setValue("_cachedFillStyle",void 0),this.states.setValue("_cachedStrokeStyle",void 0),this._cachedBlendMode=o.u,this._setFill(o.a2),this._setStroke(o.a3),this.drawingContext.lineCap=o.j,this.drawingContext.font="normal 12px sans-serif"}resize(t,r){super.resize(t,r);let n={};for(let t in this.drawingContext){let r=this.drawingContext[t];"object"!=typeof r&&"function"!=typeof r&&(n[t]=r)}for(let i in this.canvas.width=t*this._pixelDensity,this.canvas.height=r*this._pixelDensity,this.canvas.style.width=`${t}px`,this.canvas.style.height=`${r}px`,this.drawingContext.scale(this._pixelDensity,this._pixelDensity),n)try{this.drawingContext[i]=n[i]}catch(t){}}background(...t){if(this.push(),this.resetMatrix(),t[0]instanceof d.I)if(t[1]>=0){let r=t[0];this.drawingContext.globalAlpha=t[1]/255,this._pInst.image(r,0,0,this.width,this.height)}else this._pInst.image(t[0],0,0,this.width,this.height);else{let r=this._pInst.color(...t);
7this._pInst._addAccsOutput?.()&&this._pInst._accsBackground?.(r._getRGBA([255,255,255,255]));let n=r.toString();this._setFill(n),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.fillRect(0,0,this.width,this.height),this._isErasing&&this._pInst.erase()}this.pop()}clear(){this.drawingContext.save(),this.resetMatrix(),this.drawingContext.clearRect(0,0,this.width,this.height),this.drawingContext.restore()}fill(...t){super.fill(...t);let r=this.states.fillColor;this._setFill(r.toString()),this._pInst._addAccsOutput?.()&&this._pInst._accsCanvasColors?.("fill",r._getRGBA([255,255,255,255]))}stroke(...t){super.stroke(...t);let r=this.states.strokeColor;this._setStroke(r.toString()),this._pInst._addAccsOutput?.()&&this._pInst._accsCanvasColors?.("stroke",r._getRGBA([255,255,255,255]))}erase(t,r){if(!this._isErasing){this.states.setValue("_cachedFillStyle",this.drawingContext.fillStyle);let n=this._pInst.color(255,t).toString();this.drawingContext.fillStyle=n,this.states.setValue("_cachedStrokeStyle",this.drawingContext.strokeStyle);let i=this._pInst.color(255,r).toString();this.drawingContext.strokeStyle=i;let s=this._cachedBlendMode;this.blendMode(o.a4),this._cachedBlendMode=s,this._isErasing=!0}}noErase(){this._isErasing&&(this.drawingContext.fillStyle=this.states._cachedFillStyle,this.drawingContext.strokeStyle=this.states._cachedStrokeStyle,this.blendMode(this._cachedBlendMode),this._isErasing=!1)}drawShape(t){let r=new k.AQ({strokeWeight:this.states.strokeWeight});t.accept(r),this._clipping?(this.clipPath.addPath(r.path),this.clipPath.closePath()):(this.states.fillColor&&this.drawingContext.fill(r.path),this.states.strokeColor&&this.drawingContext.stroke(r.path))}beginClip(t={}){super.beginClip(t),this.states.setValue("_cachedFillStyle",this.drawingContext.fillStyle);let r=this._pInst.color(255,0).toString();this.drawingContext.fillStyle=r,this.states.setValue("_cachedStrokeStyle",this.drawingContext.strokeStyle);let n=this._pInst.color(255,0).toString();this.drawingContext.strokeStyle=n;let i=this._cachedBlendMode;this.blendMode(o.u),this._cachedBlendMode=i,this.clipPath=new Path2D,this._clipInvert&&(this.clipPath.moveTo(-2*this.width,-2*this.height),this.clipPath.lineTo(-2*this.width,2*this.height),this.clipPath.lineTo(2*this.width,2*this.height),this.clipPath.lineTo(2*this.width,-2*this.height),this.clipPath.closePath())}endClip(){this.drawingContext.clip(this.clipPath),this.clipPath=null,super.endClip(),this.drawingContext.fillStyle=this.states._cachedFillStyle,this.drawingContext.strokeStyle=this.states._cachedStrokeStyle,this.blendMode(this._cachedBlendMode)}image(t,r,n,i,s,o,a,u,l){let h;t.gifProperties&&t._animateGif(this._pInst);try{t instanceof f.z&&t._ensureCanvas(),this.states.tint&&t.canvas&&(h=this._getTintedImageCanvas(t)),h||(h=t.canvas||t.elt);let c=1;t.width&&t.width>0&&(c=h.width/t.width),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.drawImage(h,c*r,c*n,c*i,c*s,o,a,u,l),this._isErasing&&this._pInst.erase()}catch(t){if("NS_ERROR_NOT_AVAILABLE"!==t.name)throw t}}_getTintedImageCanvas(t){if(!t.canvas)return t;t.tintCanvas||(t.tintCanvas=document.createElement("canvas")),t.tintCanvas.width!==t.canvas.width&&(t.tintCanvas.width=t.canvas.width),t.tintCanvas.height!==t.canvas.height&&(t.tintCanvas.height=t.canvas.height);let r=t.tintCanvas.getContext("2d");
7return r.save(),r.clearRect(0,0,t.canvas.width,t.canvas.height),(this.states.tint[0]<255||this.states.tint[1]<255||this.states.tint[2]<255)&&(r.drawImage(t.canvas,0,0),r.globalCompositeOperation="luminosity",r.drawImage(t.canvas,0,0),r.globalCompositeOperation="color",r.drawImage(t.canvas,0,0),r.globalCompositeOperation="multiply",r.fillStyle=`rgb(${this.states.tint.slice(0,3).join(", ")})`,r.fillRect(0,0,t.canvas.width,t.canvas.height),r.globalCompositeOperation="destination-in"),r.globalAlpha=this.states.tint[3]/255,r.drawImage(t.canvas,0,0),r.restore(),t.tintCanvas}blendMode(t){if(t===o.a5)console.warn("blendMode(SUBTRACT) only works in WEBGL mode.");else if(t===o.u||t===o.a4||t===o.a6||t===o.a7||t===o.a8||t===o.a9||t===o.aa||t===o.ab||t===o.ac||t===o.ad||t===o.ae||t===o.af||t===o.ag||t===o.ah||t===o.ai)this._cachedBlendMode=t,this.drawingContext.globalCompositeOperation=t;else throw Error(`Mode ${t} not recognized.`)}blend(...t){let r=this.drawingContext.globalCompositeOperation,n=t[t.length-1],i=Array.prototype.slice.call(t,0,t.length-1);this.drawingContext.globalCompositeOperation=n,L.prototype.copy.apply(this,i),this.drawingContext.globalCompositeOperation=r}_getPixel(t,r){let n;return[(n=this.drawingContext.getImageData(t,r,1,1).data)[0],n[1],n[2],n[3]]}loadPixels(){let t=this._pixelDensity,r=this.width*t,n=this.height*t,i=this.drawingContext.getImageData(0,0,r,n);this.imageData=i,this.pixels=i.data}set(t,r,n){if(t=Math.floor(t),r=Math.floor(r),n instanceof d.I)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pixelDensity,this._pixelDensity),this.drawingContext.clearRect(t,r,n.width,n.height),this.drawingContext.drawImage(n.canvas,t,r),this.drawingContext.restore();else{let i=0,s=0,o=0,a=0,u=4*(r*this._pixelDensity*(this.width*this._pixelDensity)+t*this._pixelDensity);if(this.imageData||this.loadPixels(),"number"==typeof n)u<this.pixels.length&&(i=n,s=n,o=n,a=255);else if(Array.isArray(n)){if(n.length<4)throw Error("pixel array must be of the form [R, G, B, A]");u<this.pixels.length&&(i=n[0],s=n[1],o=n[2],a=n[3])}else n instanceof L.Color&&u<this.pixels.length&&([i,s,o,a]=n._getRGBA([255,255,255,255]));for(let n=0;n<this._pixelDensity;n++)for(let l=0;l<this._pixelDensity;l++)u=4*((r*this._pixelDensity+l)*this.width*this._pixelDensity+(t*this._pixelDensity+n)),this.pixels[u]=i,this.pixels[u+1]=s,this.pixels[u+2]=o,this.pixels[u+3]=a}}updatePixels(t,r,n,i){let s=this._pixelDensity;void 0===t&&void 0===r&&void 0===n&&void 0===i&&(t=0,r=0,n=this.width,i=this.height),t*=s,r*=s,n*=s,i*=s,this.gifProperties&&(this.gifProperties.frames[this.gifProperties.displayIndex].image=this.imageData),this.drawingContext.putImageData(this.imageData,0,0,t,r,n,i)}arc(t,r,n,i,s,a,u){let l=this.clipPa||this.drawingContext,h=t+n/2,c=r+i/2,d=n/2,p=i/2,f=u!==o.ak&&u!==o.O&&(a-s)%o.f!=0;return this.states.fillColor&&(this._clipping||l.beginPath(),l.ellipse(h,c,d,p,0,s,a),f&&l.lineTo(h,c),l.closePath(),this._clipping||l.fill()),this.states.strokeColor&&(this._clipping||l.beginPath(),l.ellipse(h,c,d,p,0,s,a),u===o.aj&&f&&l.lineTo(h,c),(u===o.aj||u===o.ak)&&l.closePath(),this._clipping||l.stroke()),this}ellipse(t){let r=this.clipPath||this.drawingContext,n=!!this.states.fillColor,i=this.states.strokeColor,s=parseFloat(t[0]),o=parseFloat(t[1]),a=parseFloat(t[2]),u=parseFloat(t[3]);if(n&&!i){if(this._getFill()===I)return this}else if(!n&&i&&this._getStroke()===I)return this;this._clipping||r.beginPath(),r.ellipse(s+a/2,o+u/2,a/2,u/2,0,0,2*Math.PI),r.closePath(),!this._clipping&&n&&r.fill(),!this._clipping&&i&&r.stroke()}line(t,r,n,i){let s=this.clipPath||this.drawingContext;return this.states.strokeColor&&(this._getStroke()===I||(this._clipping||s.beginPath(),s.moveTo(t,r),s.lineTo(n,i),s.stroke())),this}point(t,r){let n=this.clipPath||this.drawingContext;if(!this.states.strokeColor||this._getStroke()===I)return this;let i=this._getStroke(),s=this._getFill();this._clipping||this._setFill(i),this._clipping||n.beginPath(),n.arc(t,r,n.lineWidth/2,0,o.f,!1),this._clipping||(n.fill(),this._setFill(s))}quad(t,r,n,i,s,o,a,u){let l=this.clipPath||this.drawingContext,h=!!this.states.fillColor,c=this.states.strokeColor;if(h&&!c){if(this._getFill()===I)return this}else if(!h&&c&&this._getStroke()===I)return this;return this._clipping||l.beginPath(),l.moveTo(t,r),l.lineTo(n,i),l.lineTo(s,o),l.lineTo(a,u),l.closePath(),!this._clipping&&h&&l.fill(),!this._clipping&&c&&l.stroke(),this}rect(t){let r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],u=t[6],l=t[7],h=this.clipPath||this.drawingContext,c=!!this.states.fillColor,d=this.states.strokeColor;
7if(c&&!d){if(this._getFill()===I)return this}else if(!c&&d&&this._getStroke()===I)return this;if(this._clipping||h.beginPath(),void 0===o)h.rect(r,n,i,s);else{void 0===a&&(a=o),void 0===u&&(u=a),void 0===l&&(l=u);let t=Math.abs(i),c=Math.abs(s),d=t/2,p=c/2;t<2*o&&(o=d),c<2*o&&(o=p),t<2*a&&(a=d),c<2*a&&(a=p),t<2*u&&(u=d),c<2*u&&(u=p),t<2*l&&(l=d),c<2*l&&(l=p),h.roundRect(r,n,i,s,[o,a,u,l])}return!this._clipping&&this.states.fillColor&&h.fill(),!this._clipping&&this.states.strokeColor&&h.stroke(),this}triangle(t){let r=this.clipPath||this.drawingContext,n=!!this.states.fillColor,i=this.states.strokeColor,s=t[0],o=t[1],a=t[2],u=t[3],l=t[4],h=t[5];if(n&&!i){if(this._getFill()===I)return this}else if(!n&&i&&this._getStroke()===I)return this;this._clipping||r.beginPath(),r.moveTo(s,o),r.lineTo(a,u),r.lineTo(l,h),r.closePath(),!this._clipping&&n&&r.fill(),!this._clipping&&i&&r.stroke()}strokeCap(t){return(t===o.j||t===o.S||t===o.k)&&(this.drawingContext.lineCap=t),this}strokeJoin(t){return(t===o.j||t===o.B||t===o.l)&&(this.drawingContext.lineJoin=t),this}strokeWeight(t){return super.strokeWeight(t),void 0===t||0===t?this.drawingContext.lineWidth=1e-4:this.drawingContext.lineWidth=t,this}_getFill(){return this.states._cachedFillStyle||this.states.setValue("_cachedFillStyle",this.drawingContext.fillStyle),this.states._cachedFillStyle}_setFill(t){t!==this.states._cachedFillStyle&&(this.drawingContext.fillStyle=t,this.states.setValue("_cachedFillStyle",t))}_getStroke(){return this.states._cachedStrokeStyle||this.states.setValue("_cachedStrokeStyle",this.drawingContext.strokeStyle),this.states._cachedStrokeStyle}_setStroke(t){t!==this.states._cachedStrokeStyle&&(this.drawingContext.strokeStyle=t,this.states.setValue("_cachedStrokeStyle",t))}applyMatrix(t,r,n,i,s,o){this.drawingContext.transform(t,r,n,i,s,o)}getWorldToScreenMatrix(){let t=new DOMMatrix().scale(1/this._pixelDensity).multiply(this.drawingContext.getTransform());return new w.uq(t.toFloat32Array())}resetMatrix(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pixelDensity,this._pixelDensity),this}rotate(t){this.drawingContext.rotate(t)}scale(t,r){return this.drawingContext.scale(t,r),this}translate(t,r){return t instanceof L.Vector&&(r=t.y,t=t.x),this.drawingContext.translate(t,r),this}push(){return this.drawingContext.save(),super.push()}pop(t){this.drawingContext.restore(),super.pop(t)}}class L{static VERSION=o.al;static instance=null;static lifecycleHooks={presetup:[],postsetup:[],predraw:[],postdraw:[],remove:[]};static _checkForUserDefinedFunctions=()=>{};static _friendlyFileLoadError=()=>{};constructor(t,r){this.hitCriticalError=!1,this._setupDone=!1,this._userNode=r,this._curElement=null,this._elements=[],this._glAttributes=null,this._requestAnimId=0,this._isGlobal=!1,this._loop=!0,this._startListener=null,this._initializeInstanceVariables(),this._events={pointerdown:null,pointerup:null,pointermove:null,dragend:null,dragover:null,click:null,dblclick:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,wheel:null,resize:null,blur:null},this._millisStart=-1,this._recording=!1,this._lcg_random_state=null,this._gaussian_previous=!1,window.DeviceOrientationEvent&&(this._events.deviceorientation=null),window.DeviceMotionEvent&&!window._isNodeWebkit&&(this._events.devicemotion=null),this._updateWindowSize();let n=t=>{Object.defineProperty(window,t,{configurable:!0,enumerable:!0,get:()=>"function"==typeof this[t]?this[t].bind(this):this[t],set:r=>{Object.defineProperty(window,t,{configurable:!0,enumerable:!0,value:r,writable:!0}),L.disableFriendlyErrors||console.log(`You just changed the value of "${t}", which was a p5 global value. This could cause problems later if you're not careful.`)}})};if(t)t(this),L._checkForUserDefinedFunctions(this);else{if(this._isGlobal=!0,window.hitCriticalError)return;for(let t of(L.instance=this,Object.getOwnPropertyNames(L.prototype)))"_"!==t[0]&&n(t);let t=["constructor","length"];for(let r in this)if(this.hasOwnProperty(r)){if("_"===r[0]||t.includes(r))continue;n(r)}}for(let t in this._events){let r=this[`_on${t}`];if(r){let n=r.bind(this);window.addEventListener(t,n,{passive:!1}),this._events[t]=n}}let i=()=>{this.focused=!0},s=()=>{this.focused=!1};window.addEventListener("focus",i),window.addEventListener("blur",s),L.lifecycleHooks.remove.push(function(){window.removeEventListener("focus",i),window.removeEventListener("blur",s)}),"complete"===document.readyState?this.#n():(this._startListener=this.#n.bind(this),window.addEventListener("load",this._startListener,!1))}get pixels(){return this._renderer.pixels}get drawingContext(){return this._renderer.drawingContext}static registerAddon(t){let r={};for(let n of(t(L,L.prototype,r),Object.keys(L.lifecycleHooks)))"function"==typeof r[n]&&L.lifecycleHooks[n].push(r[n])}async #n(){this.hitCriticalError||(this._userNode&&"string"==typeof this._userNode&&(this._userNode=document.getElementById(this._userNode)),await this.#i(),!this.hitCriticalError&&(this._recording||this._draw()))}async #i(){if(await this._runLifecycleHook("presetup"),this.hitCriticalError)return;this.createCanvas(100,100,o.P),this._millisStart=window.performance.now();let t=this._isGlobal?window:this;if("function"==typeof t.setup&&await t.setup(),this.hitCriticalError)return;let r=document.getElementsByTagName("canvas");if(Object.keys(this._events).some(t=>t.startsWith("pointer")))for(let t of r)t.style.touchAction="none";for(let t of r)"true"===t.dataset.hidden&&(t.style.visibility="",delete t.dataset.hidden);this._lastTargetFrameTime=window.performance.now(),this._lastRealFrameTime=window.performance.now(),this._setupDone=!0,(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._updateAccsOutput(),await this._runLifecycleHook("postsetup"),this._millisStart=window.performance.now()}async _draw(t){if(this.hitCriticalError)return;let r=t||window.performance.now(),n=r-this._lastTargetFrameTime,i=1e3/this._targetFrameRate;(!this._loop||n>=i-5)&&(this.deltaTime=r-this._lastRealFrameTime,this._frameRate=1e3/this.deltaTime,await this.redraw(),this._lastTargetFrameTime=Math.max(this._lastTargetFrameTime+i,r),this._lastRealFrameTime=r,void 0!==this._updateMouseCoords&&(this._updateMouseCoords(),this.movedX=0,this.movedY=0)),this._loop&&(this._requestAnimId=window.requestAnimationFrame(this._draw.bind(this)))}async remove(){if(this._startListener&&window.removeEventListener("load",this._startListener,!1),this._curElement){for(let t in this._loop=!1,this._requestAnimId&&window.cancelAnimationFrame(this._requestAnimId),this._events)window.removeEventListener(t,this._events[t]);for(let t of this._elements)for(let r in t.elt&&t.elt.parentNode&&t.elt.parentNode.removeChild(t.elt),t._events)t.elt.removeEventListener(r,t._events[r]);await this._runLifecycleHook("remove")}if(this._isGlobal){for(let t in L.prototype)try{delete window[t]}catch(r){window[t]=void 0}for(let t in this)if(this.hasOwnProperty(t))try{delete window[t]}catch(r){window[t]=void 0}L.instance=null}}async _runLifecycleHook(t){for(let r of L.lifecycleHooks[t])await r.call(this)}_initializeInstanceVariables(){this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1},this._styles=[],this._downKeys={},this._downKeyCodes={}}}for(let t in o.v)L.prototype[t]=o.v[t];function P(t,r){let n="_Description",i="_fallbackDesc",s="_fallbackTable",o="_fte_",a="_Label",u="_labelDesc",l="_labelTable",h="_lte_";function c(t){if("label"===t||"fallback"===t)throw Error("description should not be LABEL or FALLBACK");return t.endsWith(".")||t.endsWith(";")||t.endsWith(",")||t.endsWith("?")||t.endsWith("!")||(t+="."),t}
vendor: 8,233 bytes, line 7
7r.describe=function(t,r){if("string"!=typeof t)return;let n=this.canvas.id;t=c(t),this.dummyDOM||(this.dummyDOM=document.getElementById(n).parentNode),this.descriptions||(this.descriptions={}),this.descriptions.fallback?this.descriptions.fallback.innerHTML!==t&&(this.descriptions.fallback.innerHTML=t):this._describeHTML("fallback",t),r===this.LABEL&&(this.descriptions.label?this.descriptions.label.innerHTML!==t&&(this.descriptions.label.innerHTML=t):this._describeHTML("label",t))},r.describeElement=function(t,r,n){if("string"!=typeof r||"string"!=typeof t)return;let i=this.canvas.id;r=c(r);let s=function(t){if("label"===t||"fallback"===t)throw Error("element name should not be LABEL or FALLBACK");return t.endsWith(".")||t.endsWith(";")||t.endsWith(",")?t=t.replace(/.$/,":"):t.endsWith(":")||(t+=":"),t}(t);t=t.replace(/[^a-zA-Z0-9]/g,"");let o=`<th scope="row">${s}</th><td>${r}</td>`;this.dummyDOM||(this.dummyDOM=document.getElementById(i).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[t]?this.descriptions.fallbackElements[t].innerHTML!==o&&(this.descriptions.fallbackElements[t].innerHTML=o):this._describeElementHTML("fallback",t,o),n===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[t]?this.descriptions.labelElements[t].innerHTML!==o&&(this.descriptions.labelElements[t].innerHTML=o):this._describeElementHTML("label",t,o))},r._describeHTML=function(t,r){let o=this.canvas.id;if("fallback"===t){if(this.dummyDOM.querySelector(`#${o+n}`))this.dummyDOM.querySelector("#"+o+s).insertAdjacentHTML("beforebegin",`<p id="${o+i}"></p>`);else{let t=`<div id="${o}${n}" role="region" aria-label="Canvas Description"><p id="${o}${i}"></p></div>`;this.dummyDOM.querySelector(`#${o}accessibleOutput`)?this.dummyDOM.querySelector(`#${o}accessibleOutput`).insertAdjacentHTML("beforebegin",t):this.dummyDOM.querySelector(`#${o}`).innerHTML=t}this.descriptions.fallback=this.dummyDOM.querySelector(`#${o}${i}`),this.descriptions.fallback.innerHTML=r;return}if("label"===t){if(this.dummyDOM.querySelector(`#${o+a}`))this.dummyDOM.querySelector(`#${o+l}`)&&this.dummyDOM.querySelector(`#${o+l}`).insertAdjacentHTML("beforebegin",`<p id="${o}${u}"></p>`);else{let t=`<div id="${o}${a}" class="p5Label"><p id="${o}${u}"></p></div>`;this.dummyDOM.querySelector(`#${o}accessibleOutputLabel`)?this.dummyDOM.querySelector(`#${o}accessibleOutputLabel`).insertAdjacentHTML("beforebegin",t):this.dummyDOM.querySelector("#"+o).insertAdjacentHTML("afterend",t)}this.descriptions.label=this.dummyDOM.querySelector("#"+o+u),this.descriptions.label.innerHTML=r;return}},r._describeElementHTML=function(t,r,c){let d=this.canvas.id;if("fallback"===t){if(this.dummyDOM.querySelector(`#${d+n}`))this.dummyDOM.querySelector("#"+d+s)||this.dummyDOM.querySelector("#"+d+i).insertAdjacentHTML("afterend",`<table id="${d}${s}"><caption>Canvas elements and their descriptions</caption></table>`);else{let t=`<div id="${d}${n}" role="region" aria-label="Canvas Description"><table id="${d}${s}"><caption>Canvas elements and their descriptions</caption></table></div>`;this.dummyDOM.querySelector(`#${d}accessibleOutput`)?this.dummyDOM.querySelector(`#${d}accessibleOutput`).insertAdjacentHTML("beforebegin",t):this.dummyDOM.querySelector("#"+d).innerHTML=t}let t=document.createElement("tr");t.id=d+o+r,this.dummyDOM.querySelector("#"+d+s).appendChild(t),this.descriptions.fallbackElements[r]=this.dummyDOM.querySelector(`#${d}${o}${r}`),this.descriptions.fallbackElements[r].innerHTML=c;return}if("label"===t){if(this.dummyDOM.querySelector(`#${d+a}`))this.dummyDOM.querySelector(`#${d+l}`)||this.dummyDOM.querySelector("#"+d+u).insertAdjacentHTML("afterend",`<table id="${d+l}"></table>`);else{let t=`<div id="${d}${a}" class="p5Label"><table id="${d}${l}"></table></div>`;this.dummyDOM.querySelector(`#${d}accessibleOutputLabel`)?this.dummyDOM.querySelector(`#${d}accessibleOutputLabel`).insertAdjacentHTML("beforebegin",t):this.dummyDOM.querySelector("#"+d).insertAdjacentHTML("afterend",t)}let t=document.createElement("tr");t.id=d+h+r,this.dummyDOM.querySelector("#"+d+l).appendChild(t),this.descriptions.labelElements[r]=this.dummyDOM.querySelector(`#${d}${h}${r}`),this.descriptions.labelElements[r].innerHTML=c}}}function R(t,r){r._updateGridOutput=function(t){var r,n,i,s;let o;if(!this.dummyDOM.querySelector(`#${t}_summary`))return;let a=this._accessibleOutputs[t],u=function(t,r){let n="",i="",s=0;for(let o in r){let a=0;for(let i in r[o]){let u=`<li id="${t}shape${s}">${r[o][i].color} ${o},`;"line"===o?u+=` location = ${r[o][i].pos}, length = ${r[o][i].length} pixels`:(u+=` location = ${r[o][i].pos}`,"point"!==o&&(u+=`, area = ${r[o][i].area} %`),u+="</li>"),n+=u,a++,s++}i=a>1?`${i} ${a} ${o}s`:`${i} ${a} ${o}`}return{numShapes:[s,i],details:n}}(t,this.ingredients.shapes),l=(r=u.numShapes,n=this.ingredients.colors.background,i=this.width,s=this.height,o=`${n} canvas, ${i} by ${s} pixels, contains ${r[0]}`,1===r[0]?`${o} shape: ${r[1]}`:`${o} shapes: ${r[1]}`),h=function(t,r){let n=0,i="",s=Array.from(Array(10),()=>Array(10));for(let i in r)for(let o in r[i]){let a;a="line"!==i?`<a href="#${t}shape${n}">${r[i][o].color} ${i}</a>`:`<a href="#${t}shape${n}">${r[i][o].color} ${i} midpoint</a>`,r[i][o].loc.locY<s.length&&r[i][o].loc.locX<s[r[i][o].loc.locY].length&&(s[r[i][o].loc.locY][r[i][o].loc.locX]?s[r[i][o].loc.locY][r[i][o].loc.locX]=s[r[i][o].loc.locY][r[i][o].loc.locX]+"  "+a:s[r[i][o].loc.locY][r[i][o].loc.locX]=a,n++)}for(let t in s){let r="<tr>";for(let n in s[t])r+="<td>",void 0!==s[t][n]&&(r+=s[t][n]),r+="</td>";i=i+r+"</tr>"}return i}(t,this.ingredients.shapes);l!==a.summary.innerHTML&&(a.summary.innerHTML=l),h!==a.map.innerHTML&&(a.map.innerHTML=h),u.details!==a.shapeDetails.innerHTML&&(a.shapeDetails.innerHTML=u.details),this._accessibleOutputs[t]=a}}function z(t,r){r._updateTextOutput=function(t){var r,n,i,s;let o;if(!this.dummyDOM.querySelector(`#${t}_summary`))return;let a=this._accessibleOutputs[t],u=function(t,r){let n="",i=0;for(let s in r)for(let o in r[s]){let a=`<li><a href="#${t}shape${i}">${r[s][o].color} ${s}</a>`;"line"===s?a+=`, ${r[s][o].pos}, ${r[s][o].length} pixels long.</li>`:(a+=`, at ${r[s][o].pos}`,"point"!==s&&(a+=`, covering ${r[s][o].area}% of the canvas`),a+=".</li>"),n+=a,i++}return{numShapes:i,listShapes:n}}(t,this.ingredients.shapes),l=(r=u.numShapes,n=this.ingredients.colors.background,i=this.width,s=this.height,o=`Your output is a, ${i} by ${s} pixels, ${n} canvas containing the following`,1===r?`${o} shape:`:`${o} ${r} shapes:`),h=function(t,r){let n="",i=0;for(let s in r)for(let o in r[s]){let a=`<tr id="${t}shape${i}"><th>${r[s][o].color} ${s}</th>`;"line"===s?a+=`<td>location = ${r[s][o].pos}</td><td>length = ${r[s][o].length} pixels</td></tr>`:(a+=`<td>location = ${r[s][o].pos}</td>`,"point"!==s&&(a+=`<td> area = ${r[s][o].area}%</td>`),a+="</tr>"),n+=a,i++}return n}(t,this.ingredients.shapes);l!==a.summary.innerHTML&&(a.summary.innerHTML=l),u.listShapes!==a.list.innerHTML&&(a.list.innerHTML=u.listShapes),h!==a.shapeDetails.innerHTML&&(a.shapeDetails.innerHTML=h),this._accessibleOutputs[t]=a}}function U(t,r){function n(t,r,n){let i=Math.floor(t[0]/r*10),s=Math.floor(t[1]/n*10);return 10===i&&(i-=1),10===s&&(s-=1),{locX:i,locY:s}}r.textOutput=function(t){this._accessibleOutputs.text||(this._accessibleOutputs.text=!0,this._createOutput("textOutput","Fallback"),t===this.LABEL&&(this._accessibleOutputs.textLabel=!0,this._createOutput("textOutput","Label")))},r.gridOutput=function(t){this._accessibleOutputs.grid||(this._accessibleOutputs.grid=!0,this._createOutput("gridOutput","Fallback"),t===this.LABEL&&(this._accessibleOutputs.gridLabel=!0,this._createOutput("gridOutput","Label")))},r._addAccsOutput=function(){return this._accessibleOutputs||(this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1}),this._accessibleOutputs.grid||this._accessibleOutputs.text},r._createOutput=function(t,r){let n,i,s,o=this.canvas.id;this.ingredients||(this.ingredients={shapes:{},colors:{background:"white",fill:"white",stroke:"black"}
7,pShapes:"",pBackground:""}),this.dummyDOM||(this.dummyDOM=document.getElementById(o).parentNode);let a="";"Fallback"===r?(n=o+t,i=o+"accessibleOutput",this.dummyDOM.querySelector(`#${i}`)||(this.dummyDOM.querySelector(`#${o}_Description`)?this.dummyDOM.querySelector(`#${o}_Description`).insertAdjacentHTML("afterend",`<div id="${i}" role="region" aria-label="Canvas Outputs"></div>`):this.dummyDOM.querySelector(`#${o}`).innerHTML=`<div id="${i}" role="region" aria-label="Canvas Outputs"></div>`)):"Label"===r&&(a=r,n=o+t+r,i=o+"accessibleOutput"+r,this.dummyDOM.querySelector(`#${i}`)||(this.dummyDOM.querySelector(`#${o}_Label`)?this.dummyDOM.querySelector(`#${o}_Label`).insertAdjacentHTML("afterend",`<div id="${i}"></div>`):this.dummyDOM.querySelector(`#${o}`).insertAdjacentHTML("afterend",`<div id="${i}"></div>`))),this._accessibleOutputs[n]={},"textOutput"===t?(a=`#${o}gridOutput${a}`,s=`<div id="${n}">Text Output<div id="${n}Summary" aria-label="text output summary"><p id="${n}_summary"></p><ul id="${n}_list"></ul></div><table id="${n}_shapeDetails" summary="text output shape details"></table></div>`,this.dummyDOM.querySelector(a)?this.dummyDOM.querySelector(a).insertAdjacentHTML("beforebegin",s):this.dummyDOM.querySelector(`#${i}`).innerHTML=s,this._accessibleOutputs[n].list=this.dummyDOM.querySelector(`#${n}_list`)):"gridOutput"===t&&(a=`#${o}textOutput${a}`,s=`<div id="${n}">Grid Output<p id="${n}_summary" aria-label="grid output summary"><table id="${n}_map" summary="grid output content"></table><ul id="${n}_shapeDetails" aria-label="grid output shape details"></ul></div>`,this.dummyDOM.querySelector(a)?this.dummyDOM.querySelector(a).insertAdjacentHTML("afterend",s):this.dummyDOM.querySelector(`#${i}`).innerHTML=s,this._accessibleOutputs[n].map=this.dummyDOM.querySelector(`#${n}_map`)),this._accessibleOutputs[n].shapeDetails=this.dummyDOM.querySelector(`#${n}_shapeDetails`),this._accessibleOutputs[n].summary=this.dummyDOM.querySelector(`#${n}_summary`)},r._updateAccsOutput=function(){let t=this.canvas.id;(JSON.stringify(this.ingredients.shapes)!==this.ingredients.pShapes||this.ingredients.colors.background!==this.ingredients.pBackground)&&(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(t+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(t+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(t+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(t+"gridOutputLabel"))},r._accsBackground=function(t){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.pBackground=this.ingredients.colors.background,this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==t&&(this.ingredients.colors.backgroundRGBA=t,this.ingredients.colors.background=this._rgbColorName(t))},r._accsCanvasColors=function(t,r){"fill"===t?this.ingredients.colors.fillRGBA!==r&&(this.ingredients.colors.fillRGBA=r,this.ingredients.colors.fill=this._rgbColorName(r)):"stroke"===t&&this.ingredients.colors.strokeRGBA!==r&&(this.ingredients.colors.strokeRGBA=r,this.ingredients.colors.stroke=this._rgbColorName(r))},r._accsOutput=function(t,r){var i,s;let o,a;"ellipse"===t&&r[2]===r[3]?t="circle":"rectangle"===t&&r[2]===r[3]&&(t="square");let u={}
7,l=!0,h=(i=t,s=r,"rectangle"===i||"ellipse"===i||"arc"===i||"circle"===i||"square"===i?(o=Math.round(s[0]+s[2]/2),a=Math.round(s[1]+s[3]/2)):"triangle"===i?(o=(s[0]+s[2]+s[4])/3,a=(s[1]+s[3]+s[5])/3):"quadrilateral"===i?(o=(s[0]+s[2]+s[4]+s[6])/4,a=(s[1]+s[3]+s[5]+s[7])/4):"line"===i?(o=(s[0]+s[2])/2,a=(s[1]+s[3])/2):(o=s[0],a=s[1]),[o,a]);if("line"===t){u.color=this.ingredients.colors.stroke,u.length=Math.round(Math.hypot(r[2]-r[0],r[3]-r[1]));let t=this._getPos(r[0],[1]),i=this._getPos(r[2],[3]);u.loc=n(h,this.width,this.height),t===i?u.pos=`at ${t}`:u.pos=`from ${t} to ${i}`}else"point"===t?u.color=this.ingredients.colors.stroke:(u.color=this.ingredients.colors.fill,u.area=this._getArea(t,r)),u.pos=this._getPos(...h),u.loc=n(h,this.width,this.height);if(this.ingredients.shapes[t]){for(let r in this.ingredients.shapes[t])JSON.stringify(this.ingredients.shapes[t][r])===JSON.stringify(u)&&(l=!1);!0===l&&this.ingredients.shapes[t].push(u)}else this.ingredients.shapes[t]=[u]},r._getPos=function(r,n){let{x:i,y:s}=this.worldToScreen(new t.Vector(r,n)),o=this.width,a=this.height;if(i<.4*o)if(s<.4*a)return"top left";else if(s>.6*a)return"bottom left";else return"mid left";if(i>.6*o)if(s<.4*a)return"top right";else if(s>.6*a)return"bottom right";else return"mid right";return s<.4*a?"top middle":s>.6*a?"bottom middle":"middle"},r._getArea=function(t,r){let n=0;if("arc"===t){let t=((r[5]-r[4])%(2*Math.PI)+2*Math.PI)%(2*Math.PI);if(n=t*r[2]*r[3]/8,"open"===r[6]||"chord"===r[6]){let i=r[0],s=r[1],o=r[0]+r[2]/2*Math.cos(r[4]).toFixed(2),a=r[1]+r[3]/2*Math.sin(r[4]).toFixed(2),u=r[0]+r[2]/2*Math.cos(r[5]).toFixed(2),l=r[1]+r[3]/2*Math.sin(r[5]).toFixed(2),h=Math.abs(i*(a-l)+o*(l-s)+u*(s-a))/2;t>Math.PI?n+=h:n-=h}}else"ellipse"===t||"circle"===t?n=3.14*r[2]/2*r[3]/2:"line"===t||"point"===t?n=0:"quadrilateral"===t?n=Math.abs((r[6]+r[0])*(r[7]-r[1])+(r[0]+r[2])*(r[1]-r[3])+(r[2]+r[4])*(r[3]-r[5])+(r[4]+r[6])*(r[5]-r[7]))/2:"rectangle"===t||"square"===t?n=r[2]*r[3]:"triangle"===t&&(n=Math.abs(r[0]*(r[3]-r[5])+r[2]*(r[5]-r[1])+r[4]*(r[1]-r[3]))/2);let i=this.width*this._renderer._pixelDensity,s=this.height*this._renderer._pixelDensity,o=[new DOMPoint(0,0),new DOMPoint(i,0),new DOMPoint(i,s),new DOMPoint(0,s)],a=(this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform()).inverse(),u=o.map(t=>t.matrixTransform(a));return Math.round(100*n/(Math.abs((u[3].x+u[0].x)*(u[3].y-u[0].y)+(u[0].x+u[1].x)*(u[0].y-u[1].y)+(u[1].x+u[2].x)*(u[1].y-u[2].y)+(u[2].x+u[3].x)*(u[2].y-u[3].y))/2))}}L.disableFriendlyErrors=!1,L.registerAddon(a.A),L.registerAddon(u),L.registerAddon(h),L.registerAddon(c.y),L.registerAddon(d.r),L.registerAddon(function(t,r){t.Renderer2D=O,t.renderers[o.P]=O,t.renderers["p2d-hdr"]=new Proxy(O,{construct:(t,[r,n,i,s,o])=>new t(r,n,i,s,o,{colorSpace:"display-p3"})})}),L.registerAddon(c.z),"undefined"!=typeof p5&&P(p5,p5.prototype),"undefined"!=typeof p5&&R(p5,p5.prototype),"undefined"!=typeof p5&&z(p5,p5.prototype),"undefined"!=typeof p5&&U(p5,p5.prototype),L.ColorConversion={_hsbaToHSLA(t){let r=t[0],n=t[1],i=t[2],s=(2-n)*i/2;return 0!==s&&(1===s?n=0:s<.5?n/=2-n:n=n*i/(2-2*s)),[r,n,s,t[3]]},_hsbaToRGBA(t){let r=6*t[0],n=t[1],i=t[2],s=[];if(0===n)s=[i,i,i,t[3]];else{let o,a,u,l=Math.floor(r),h=i*(1-n),c=i*(1-n*(r-l)),d=i*(1-n*(1+l-r));1===l?(o=c,a=i,u=h):2===l?(o=h,a=i,u=d):3===l?(o=h,a=c,u=i):4===l?(o=d,a=h,u=i):5===l?(o=i,a=h,u=c):(o=i,a=d,u=h),s=[o,a,u,t[3]]}return s},_hslaToHSBA(t){let r,n=t[0],i=t[1],s=t[2];return[n,i=2*((r=s<.5?(1+i)*s:s+i-s*i)-s)/r,r,t[3]]},_hslaToRGBA(t){let r=6*t[0],n=t[1],i=t[2],s=[];if(0===n)s=[i,i,i,t[3]];else{let o;o=i<.5?(1+n)*i:i+n-i*n;let a=2*i-o,u=(t,r,n)=>(t<0?t+=6:t>=6&&(t-=6),t<1)?r+(n-r)*t:t<3?n:t<4?r+(n-r)*(4-t):r;s=[u(r+2,a,o),u(r,a,o),u(r-2,a,o),t[3]]}return s},_rgbaToHSBA(t){let r,n,i=t[0],s=t[1],o=t[2],a=Math.max(i,s,o),u=a-Math.min(i,s,o);return 0===u?(r=0,n=0):(n=u/a,i===a?r=(s-o)/u:s===a?r=2+(o-i)/u:o===a&&(r=4+(i-s)/u),r<0?r+=6:r>=6&&(r-=6)),[r/6,n,a,t[3]]},_rgbaToHSLA(t){let r,n,i=t[0],s=t[1],o=t[2],a=Math.max(i,s,o),u=Math.min(i,s,o),l=a+u,h=a-u;return 0===h?(r=0,n=0):(n=l<1?h/l:h/(2-l),i===a?r=(s-o)/h:s===a?r=2+(o-i)/h:o===a&&(r=4+(i-s)/h),r<0?r+=6:r>
7=6&&(r-=6)),[r/6,n,l/2,t[3]]}};var $=L.ColorConversion;function j(t,r){let n,i=[{h:0,s:0,b:.8275,name:"gray"},{h:0,s:0,b:.8627,name:"gray"},{h:0,s:0,b:.7529,name:"gray"},{h:.0167,s:.1176,b:1,name:"light pink"}],s=[{h:0,s:0,b:0,name:"black"},{h:0,s:0,b:.5,name:"gray"},{h:0,s:0,b:1,name:"white"},{h:0,s:.5,b:.5,name:"dark maroon"},{h:0,s:.5,b:1,name:"salmon pink"},{h:0,s:1,b:0,name:"black"},{h:0,s:1,b:.5,name:"dark red"},{h:0,s:1,b:1,name:"red"},{h:5,s:0,b:1,name:"very light peach"},{h:5,s:.5,b:.5,name:"brown"},{h:5,s:.5,b:1,name:"peach"},{h:5,s:1,b:.5,name:"brick red"},{h:5,s:1,b:1,name:"crimson"},{h:10,s:0,b:1,name:"light peach"},{h:10,s:.5,b:.5,name:"brown"},{h:10,s:.5,b:1,name:"light orange"},{h:10,s:1,b:.5,name:"brown"},{h:10,s:1,b:1,name:"orange"},{h:15,s:0,b:1,name:"very light yellow"},{h:15,s:.5,b:.5,name:"olive green"},{h:15,s:.5,b:1,name:"light yellow"},{h:15,s:1,b:0,name:"dark olive green"},{h:15,s:1,b:.5,name:"olive green"},{h:15,s:1,b:1,name:"yellow"},{h:20,s:0,b:1,name:"very light yellow"},{h:20,s:.5,b:.5,name:"olive green"},{h:20,s:.5,b:1,name:"light yellow green"},{h:20,s:1,b:0,name:"dark olive green"},{h:20,s:1,b:.5,name:"dark yellow green"},{h:20,s:1,b:1,name:"yellow green"},{h:25,s:.5,b:.5,name:"dark yellow green"},{h:25,s:.5,b:1,name:"light green"},{h:25,s:1,b:.5,name:"dark green"},{h:25,s:1,b:1,name:"green"},{h:30,s:.5,b:1,name:"light green"},{h:30,s:1,b:.5,name:"dark green"},{h:30,s:1,b:1,name:"green"},{h:35,s:0,b:.5,name:"light green"},{h:35,s:0,b:1,name:"very light green"},{h:35,s:.5,b:.5,name:"dark green"},{h:35,s:.5,b:1,name:"light green"},{h:35,s:1,b:0,name:"very dark green"},{h:35,s:1,b:.5,name:"dark green"},{h:35,s:1,b:1,name:"green"},{h:40,s:0,b:1,name:"very light green"},{h:40,s:.5,b:.5,name:"dark green"},{h:40,s:.5,b:1,name:"light green"},{h:40,s:1,b:.5,name:"dark green"},{h:40,s:1,b:1,name:"green"},{h:45,s:.5,b:1,name:"light turquoise"},{h:45,s:1,b:.5,name:"dark turquoise"},{h:45,s:1,b:1,name:"turquoise"},{h:50,s:0,b:1,name:"light sky blue"},{h:50,s:.5,b:.5,name:"dark cyan"},{h:50,s:.5,b:1,name:"light cyan"},{h:50,s:1,b:.5,name:"dark cyan"},{h:50,s:1,b:1,name:"cyan"},{h:55,s:0,b:1,name:"light sky blue"},{h:55,s:.5,b:1,name:"light sky blue"},{h:55,s:1,b:.5,name:"dark blue"},{h:55,s:1,b:1,name:"sky blue"},{h:60,s:0,b:.5,name:"gray"},{h:60,s:0,b:1,name:"very light blue"},{h:60,s:.5,b:.5,name:"blue"},{h:60,s:.5,b:1,name:"light blue"},{h:60,s:1,b:.5,name:"navy blue"},{h:60,s:1,b:1,name:"blue"},{h:65,s:0,b:1,name:"lavender"},{h:65,s:.5,b:.5,name:"navy blue"},{h:65,s:.5,b:1,name:"light purple"},{h:65,s:1,b:.5,name:"dark navy blue"},{h:65,s:1,b:1,name:"blue"},{h:70,s:0,b:1,name:"lavender"},{h:70,s:.5,b:.5,name:"navy blue"},{h:70,s:.5,b:1,name:"lavender blue"},{h:70,s:1,b:.5,name:"dark navy blue"},{h:70,s:1,b:1,name:"blue"},{h:75,s:.5,b:1,name:"lavender"},{h:75,s:1,b:.5,name:"dark purple"},{h:75,s:1,b:1,name:"purple"},{h:80,s:.5,b:1,name:"pinkish purple"},{h:80,s:1,b:.5,name:"dark purple"},{h:80,s:1,b:1,name:"purple"},{h:85,s:0,b:1,name:"light pink"},{h:85,s:.5,b:.5,name:"purple"},{h:85,s:.5,b:1,name:"light fuchsia"},{h:85,s:1,b:.5,name:"dark fuchsia"},{h:85,s:1,b:1,name:"fuchsia"},{h:90,s:.5,b:.5,name:"dark fuchsia"},{h:90,s:.5,b:1,name:"hot pink"},{h:90,s:1,b:.5,name:"dark fuchsia"},{h:90,s:1,b:1,name:"fuchsia"},{h:95,s:0,b:1,name:"pink"},{h:95,s:.5,b:1,name:"light pink"},{h:95,s:1,b:.5,name:"dark magenta"},{h:95,s:1,b:1,name:"magenta"}];r._rgbColorName=function(t){let r=$._rgbaToHSBA(t);return n=r,function(t){let r;if(0!==t[0]){t[0]=Math.round(100*t[0]);let r=t[0].toString().split(""),n=r.length-1;r[n]=parseInt(r[n]),r[n]<2.5?r[n]=0:r[n]>=2.5&&r[n]<7.5&&(r[n]=5),2===r.length?(r[0]=parseInt(r[0]),r[n]>=7.5&&(r[n]=0,r[0]=r[0]+1),t[0]=10*r[0]+r[1]):r[n]>=7.5?t[0]=10:t[0]=r[n]}t[2]=t[2]/255;for(let r=t.length-1;r>=1;r--)t[r]<=.25?t[r]=0:t[r]>.25&&t[r]<.75?t[r]=.5:t[r]=1;if(0===t[0]&&0===t[1]&&1===t[2]){for(let t=2;t>=0;t--)n[t]=Math.round(1e4*n[t])/1e4;for(let t=0;t<i.length;t++)if(i[t].h===n[0]&&i[t].s===n[1]&&i[t].b===n[2]){r=i[t].name;break}else r="white"}else for(let n=0;n<s.length;n++)if(s[n].h===t[0]&&s[n].s===t[1]&&s[n].b===t[2]){r=s[n].name;break}return r}([r[0],r[1],r[2]])}}function V(t){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function G(t){var r=function(t,r){if("object"!=V(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=V(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
7(t,"string");return"symbol"==V(r)?r:r+""}function q(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?Object(arguments[r]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.forEach(function(r){var i,s;i=r,s=n[r],(i=G(i))in t?Object.defineProperty(t,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[i]=s})}return t}function W(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}function H(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,G(i.key),i)}}function Z(t,r,n){return r&&H(t.prototype,r),n&&H(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Y(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function X(t,r){if(r&&("object"==V(r)||"function"==typeof r))return r;if(void 0!==r)throw TypeError("Derived constructors may only return object or undefined");return Y(t)}function J(t){return(J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function K(t,r){return(K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t})(t,r)}function Q(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&K(t,r)}"undefined"!=typeof p5&&j(p5,p5.prototype);var ee={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},et=new(function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,t),this.init(r,n)}return Z(t,[{key:"init",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||ee,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,r,n,i){return i&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[r](t))}},{key:"create",value:function(r){return new t(this.logger,q({},{prefix:"".concat(this.prefix,":").concat(r,":")},this.options))}}]),t}()),er=function(){function t(){W(this,t),this.observers={}}return Z(t,[{key:"on",value:function(t,r){var n=this;return t.split(" ").forEach(function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(r)}),this}},{key:"off",value:function(t,r){if(this.observers[t]){if(!r)return void delete this.observers[t];this.observers[t]=this.observers[t].filter(function(t){return t!==r})}}},{key:"emit",value:function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[t]&&[].concat(this.observers[t]).forEach(function(t){t.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(r){r.apply(r,[t].concat(n))})}}]),t}();function en(){var t,r,n=new Promise(function(n,i){t=n,r=i});return n.resolve=t,n.reject=r,n}function ei(t){return null==t?"":""+t}function es(t,r,n){function i(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function s(){return!t||"string"==typeof t}for(var o="string"!=typeof r?[].concat(r):r.split(".");o.length>1;){if(s())return{};var a=i(o.shift());!t[a]&&n&&(t[a]=new n),t=Object.prototype.hasOwnProperty.call(t,a)?t[a]:{}}return s()?{}:{obj:t,k:i(o.shift())}}function eo(t,r,n){var i=es(t,r,Object);i.obj[i.k]=n}function ea(t,r){var n=es(t,r),i=n.obj,s=n.k;if(i)return i[s]}function eu(t,r,n){var i=ea(t,n);return void 0!==i?i:ea(r,n)}function el(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var eh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ec(t){return"string"==typeof t?t.replace(/[&<>
7"'\/]/g,function(t){return eh[t]}):t}var ed="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ep=function(t){function r(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return W(this,r),n=X(this,J(r).call(this)),ed&&er.call(Y(n)),n.data=t||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return Q(r,t),Z(r,[{key:"addNamespaces",value:function(t){0>this.options.ns.indexOf(t)&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}},{key:"getResource",value:function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=[t,r];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(s?n.split(s):n)),t.indexOf(".")>-1&&(o=t.split(".")),ea(this.data,o)}},{key:"addResource",value:function(t,r,n,i){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[t,r];n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(a=t.split("."),i=r,r=a[1]),this.addNamespaces(r),eo(this.data,a,i),s.silent||this.emit("added",t,r,n,i)}},{key:"addResources",value:function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var s in n)("string"==typeof n[s]||"[object Array]"===Object.prototype.toString.apply(n[s]))&&this.addResource(t,r,s,n[s],{silent:!0});i.silent||this.emit("added",t,r,n)}},{key:"addResourceBundle",value:function(t,r,n,i,s){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);var u=ea(this.data,a)||{};i?function t(r,n,i){for(var s in n)"__proto__"!==s&&"constructor"!==s&&(s in r?"string"==typeof r[s]||r[s]instanceof String||"string"==typeof n[s]||n[s]instanceof String?i&&(r[s]=n[s]):t(r[s],n[s],i):r[s]=n[s]);return r}(u,n,s):u=q({},u,n),eo(this.data,a,u),o.silent||this.emit("added",t,r,n)}},{key:"removeResourceBundle",value:function(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}},{key:"hasResourceBundle",value:function(t,r){return void 0!==this.getResource(t,r)}},{key:"getResourceBundle",value:function(t,r){return(r||(r=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?q({},{},this.getResource(t,r)):this.getResource(t,r)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),r}(er),ef={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,i,s){var o=this;return t.forEach(function(t){o.processors[t]&&(r=o.processors[t].process(r,n,i,s))}),r}},eg={},em=function(t){function r(t){var n,i,s,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return W(this,r),s=X(this,J(r).call(this)),ed&&er.call(Y(s)),n=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
7i18nFormat","utils"],i=Y(s),n.forEach(function(r){t[r]&&(i[r]=t[r])}),s.options=o,void 0===s.options.keySeparator&&(s.options.keySeparator="."),s.logger=et.create("translator"),s}return Q(r,t),Z(r,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(t,r);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,r){var n=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,s=r.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var o=t.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:t,namespaces:s};var a=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(a[0])>-1)&&(s=a.shift()),t=a.join(i)}return"string"==typeof s&&(s=[s]),{key:t,namespaces:s}}},{key:"translate",value:function(t,n,i){var s=this;if("object"!==V(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(t[t.length-1],n),u=a.key,l=a.namespaces,h=l[l.length-1],c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase())return d?h+(n.nsSeparator||this.options.nsSeparator)+u:u;var p=this.resolve(t,n),f=p&&p.res,g=p&&p.usedKey||u,m=p&&p.exactUsedKey||u,y=Object.prototype.toString.apply(f),v=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f;if(b&&f&&x&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(y)&&("string"!=typeof v||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(o){var _="[object Array]"===y,D=_?[]:{},A=_?m:g;for(var C in f)if(Object.prototype.hasOwnProperty.call(f,C)){var E="".concat(A).concat(o).concat(C);D[C]=this.translate(E,q({},n,{joinArrays:!1,ns:l})),D[C]===E&&(D[C]=f[C])}f=D}}else if(b&&"string"==typeof v&&"[object Array]"===y)(f=f.join(v))&&(f=this.extendTranslation(f,t,n,i));else{var w=!1,S=!1,F=void 0!==n.count&&"string"!=typeof n.count,N=r.hasDefaultValue(n),B=F?this.pluralResolver.getSuffix(c,n.count):"",k=n["defaultValue".concat(B)]||n.defaultValue;!this.isValidLookup(f)&&N&&(w=!0,f=k),this.isValidLookup(f)||(S=!0,f=u);var M=N&&k!==f&&this.options.updateMissing;if(S||w||M){if(this.logger.log(M?"updateKey":"missingKey",c,h,u,M?k:f),o){var T=this.resolve(u,q({},n,{keySeparator:!1}));T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var I=[],O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&O&&O[0])for(var L=0;L<O.length;L++)I.push(O[L]);else"all"===this.options.saveMissingTo?I=this.languageUtils.toResolveHierarchy(n.lng||this.language):I.push(n.lng||this.language);var P=function(t,r,i){s.options.missingKeyHandler?s.options.missingKeyHandler(t,h,r,M?i:f,M,n):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(t,h,r,M?i:f,M,n),s.emit("missingKey",t,h,r,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?I.forEach(function(t){s.pluralResolver.getSuffixes(t).forEach(function(r){P([t],u+r,n["defaultValue".concat(r)]||k)})}):P(I,u,k))}f=this.extendTranslation(f,t,n,p,i),S&&f===u&&this.options.appendNamespaceToMissingKey&&(f="".concat(h,":").concat(u)),S&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(f))}return f}},{key:"extendTranslation",value:function(t,r,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,n,i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(q({},n,{interpolation:q({},this.options.interpolation,n.interpolation)}));var a,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var l=t.match(this.interpolator.nestingRegexp);a=l&&l.length}var h=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(h=q({},this.options.interpolation.defaultVariables,h)),t=this.interpolator.interpolate(t,h,n.lng||this.language,n),u){var c=t.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];return s&&s[0]===i[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(r[0])),null):o.translate.apply(o,i.concat([r]))}
7,n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=t&&p&&p.length&&!1!==n.applyPostProcessor&&(t=ef.handle(p,t,r,this.options&&this.options.postProcessPassResolved?q({i18nResolved:i},n):n,this)),t}},{key:"resolve",value:function(t){var r,n,i,s,o,a=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!a.isValidLookup(r)){var l=a.extractFromKey(t,u),h=l.key;n=h;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var d=void 0!==u.count&&"string"!=typeof u.count,p=void 0!==u.context&&"string"==typeof u.context&&""!==u.context,f=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);c.forEach(function(t){a.isValidLookup(r)||(o=t,!eg["".concat(f[0],"-").concat(t)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(eg["".concat(f[0],"-").concat(t)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(function(n){if(!a.isValidLookup(r)){s=n;var o,l,c=h,f=[c];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(f,h,n,t,u):(d&&(o=a.pluralResolver.getSuffix(n,u.count)),d&&p&&f.push(c+o),p&&f.push(c+="".concat(a.options.contextSeparator).concat(u.context)),d&&f.push(c+=o));l=f.pop();)a.isValidLookup(r)||(i=l,r=a.getResource(n,t,l,u))}}))})}}),{res:r,usedKey:n,exactUsedKey:i,usedLng:s,usedNS:o}}},{key:"isValidLookup",value:function(t){return void 0!==t&&!(!this.options.returnNull&&null===t)&&!(!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}}],[{key:"hasDefaultValue",value:function(t){var r="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&void 0!==t[n])return!0;return!1}}]),r}(er);function ey(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ev=function(){function t(r){W(this,t),this.options=r,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=et.create("languageUtils")}return Z(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||0>t.indexOf("-"))return null;var r=t.split("-");return 2===r.length||(r.pop(),"x"===r[r.length-1].toLowerCase())?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||0>t.indexOf("-"))return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(t){return t.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ey(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ey(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=ey(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var r,n=this;return t?(t.forEach(function(t){if(!r){var i=n.formatLanguageCode(t);(!n.options.supportedLngs||n.isSupportedCode(i))&&(r=i)}}),!r&&this.options.supportedLngs&&t.forEach(function(t){if(!r){var i=n.getLanguagePartFromCode(t);if(n.isSupportedCode(i))return r=i;r=n.options.supportedLngs.find(function(t){if(0===t.indexOf(i))return t})}}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function(t,r){if(!t)return[];if("function"==typeof t&&(t=t(r)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!r)return t.default||[];var n=t[r];
7return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,r){var n=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],t),s=[],o=function(t){t&&(n.isSupportedCode(t)?s.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),i.forEach(function(t){0>s.indexOf(t)&&o(n.formatLanguageCode(t))}),s}}]),t}(),eb=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ex={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(+(1!=t&&(t%10!=1||t%100==11)))},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:3*(t%100==3||t%100==4))},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}},e_=function(){function t(r){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,t),this.languageUtils=r,this.options=i,this.logger=et.create("pluralResolver"),this.rules=(n={},eb.forEach(function(t){t.lngs.forEach(function(r){n[r]={numbers:t.nr,plurals:ex[t.fc]}})}),n)}return Z(t,[{key:"addRule",value:function(t,r){this.rules[t]=r}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var r=this.getRule(t);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,r){return this.getSuffixes(t).map(function(t){return r+t})}},{key:"getSuffixes",value:function(t){var r=this,n=this.getRule(t);return n?n.numbers.map(function(n){return r.getSuffix(t,n)}):[]}},{key:"getSuffix",value:function(t,r){var n=this,i=this.getRule(t);if(i){var s=i.noAbs?i.plurals(r):i.plurals(Math.abs(r)),o=i.numbers[s];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[
70]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),t}(),eD=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,t),this.logger=et.create("interpolator"),this.options=r,this.format=r.interpolation&&r.interpolation.format||function(t){return t},this.init(r)}return Z(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=void 0!==r.escape?r.escape:ec,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?el(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?el(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?el(r.nestingPrefix):r.nestingPrefixEscaped||el("$t("),this.nestingSuffix=r.nestingSuffix?el(r.nestingSuffix):r.nestingSuffixEscaped||el(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=void 0!==r.alwaysFormat&&r.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(n,"g")}},{key:"interpolate",value:function(t,r,n,i){var s,o,a,u=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function h(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(0>t.indexOf(u.formatSeparator)){var s=eu(r,l,t);return u.alwaysFormat?u.format(s,void 0,n):s}var o=t.split(u.formatSeparator),a=o.shift().trim(),h=o.join(u.formatSeparator).trim();return u.format(eu(r,l,a),h,n,i)};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(t){return h(t)}},{regex:this.regexp,safeValue:function(t){return u.escapeValue?h(u.escape(t)):h(t)}}].forEach(function(r){for(a=0;s=r.regex.exec(t);){if(void 0===(o=c(s[1].trim())))if("function"==typeof d){var n=d(t,s,i);o="string"==typeof n?n:""}else if(p){o=s[0];continue}else u.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),o="";else"string"==typeof o||u.useRawValueToEscape||(o=ei(o));if(t=t.replace(s[0],r.safeValue(o)),r.regex.lastIndex=0,++a>=u.maxReplaces)break}}),t}},{key:"nest",value:function(t,r){var n,i,s=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=q({},o);function u(t,r){var n=this.nestingOptionsSeparator;if(0>t.indexOf(n))return t;var i=t.split(new RegExp("".concat(n,"[ ]*{"))),s="{".concat(i[1]);t=i[0],s=(s=this.interpolate(s,a)).replace(/'/g,'"');try{a=JSON.parse(s),r&&(a=q({},r,a))}catch(r){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),r),"".concat(t).concat(n).concat(s)}return delete a.defaultValue,t}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],h=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(t){return t.trim()});n[1]=c.shift(),l=c,h=!0}if((i=r(u.call(this,n[1].trim(),a),a))&&n[0]===t&&"string"!=typeof i)return i;"string"!=typeof i&&(i=ei(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),i=""),h&&(i=l.reduce(function(t,r){return s.format(t,r,o.lng,o)},i.trim())),t=t.replace(n[0],i),this.regexp.lastIndex=0}return t}}]),t}(),eA=function(t){function r(t,n,i){var s,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return W(this,r),s=X(this,J(r).call(this)),ed&&er.call(Y(s)),s.backend=t,s.store=n,s.services=i,s.languageUtils=i.languageUtils,s.options=o,s.logger=et.create("backendConnector"),s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(i,o.backend,o),s}return Q(r,t),Z(r,[{key:"queueLoad",value:function(t,r,n,i){var s=this,o=[],a=[],u=[],l=[];return t.forEach(function(t){var i=!0;r.forEach(function(r){var u="".concat(t,"|").concat(r);!n.reload&&s.store.hasResourceBundle(t,r)?s.state[u]=2:s.state[u]<0||(1===s.state[u]?0>a.indexOf(u)&&a.push(u):(s.state[u]=1,i=!1,0>a.indexOf(u)&&a.push(u),0>o.indexOf(u)&&o.push(u),0>l.indexOf(r)&&l.push(r)))}),i||u.push(t)}),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:o,pending:a,toLoadLanguages:u,toLoadNamespaces:l}}},{key:"loaded",value:function(t,r,n){var i=t.split("|"),s=i[0],o=i[1];
7r&&this.emit("failedLoading",s,o,r),n&&this.store.addResourceBundle(s,o,n),this.state[t]=r?-1:2;var a={};this.queue.forEach(function(n){i=n.loaded,(h=(l=es(i,[s],Object)).obj)[c=l.k]=h[c]||[],u||h[c].push(o);for(var i,u,l,h,c,d=n.pending,p=d.indexOf(t);-1!==p;)d.splice(p,1),p=d.indexOf(t);r&&n.errors.push(r),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach(function(t){a[t]||(a[t]=[]),n.loaded[t].length&&n.loaded[t].forEach(function(r){0>a[t].indexOf(r)&&a[t].push(r)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(t){return!t.done})}},{key:"read",value:function(t,r,n){var i=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[n](t,r,function(u,l){if(u&&l&&s<5)return void setTimeout(function(){i.read.call(i,t,r,n,s+1,2*o,a)},o);a(u,l)}):a(null,{})}},{key:"prepareLoading",value:function(t,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof r&&(r=[r]);var o=this.queueLoad(t,r,i,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(function(t){n.loadOne(t)})}},{key:"load",value:function(t,r,n){this.prepareLoading(t,r,{},n)}},{key:"reload",value:function(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}},{key:"loadOne",value:function(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),s=i[0],o=i[1];this.read(s,o,"read",void 0,void 0,function(i,a){i&&r.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(s," failed"),i),!i&&a&&r.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(s),a),r.loaded(t,i,a)})}},{key:"saveMissing",value:function(t,r,n,i,s){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r))return void this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,r,n,i,null,q({},o,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],r,n,i))}}]),r}(er);function eC(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&(t.whitelist&&0>t.whitelist.indexOf("cimode")&&(t.whitelist=t.whitelist.concat(["cimode"])),t.supportedLngs=t.whitelist),t.nonExplicitWhitelist&&(t.nonExplicitSupportedLngs=t.nonExplicitWhitelist),t.supportedLngs&&0>t.supportedLngs.indexOf("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function eE(){}var ew=new(function(t){function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(W(this,r),t=X(this,J(r).call(this)),ed&&er.call(Y(t)),t.options=eC(n),t.services={},t.logger=et,t.modules={external:[]},i&&!t.isInitialized&&!n.isClone){if(!t.options.initImmediate)return t.init(n,i),X(t,Y(t));setTimeout(function(){t.init(n,i)},0)}return t}return Q(r,t),Z(r,[{key:"init",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof r&&(n=r,r={}),r.whitelist&&!r.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),r.nonExplicitWhitelist&&!r.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "
7nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=q({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if("object"===V(t[1])&&(r=t[1]),"string"==typeof t[1]&&(r.defaultValue=t[1]),"string"==typeof t[2]&&(r.tDescription=t[2]),"object"===V(t[2])||"object"===V(t[3])){var n=t[3]||t[2];Object.keys(n).forEach(function(t){r[t]=n[t]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,eC(r)),this.format=this.options.interpolation.format,n||(n=eE),!this.options.isClone){this.modules.logger?et.init(i(this.modules.logger),this.options):et.init(null,this.options);var s=new ev(this.options);this.store=new ep(this.options.resources,this.options);var o=this.services;o.logger=et,o.resourceStore=this.store,o.languageUtils=s,o.pluralResolver=new e_(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new eD(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new eA(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",function(r){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t.emit.apply(t,[r].concat(i))}),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new em(this.services,this.options),this.translator.on("*",function(r){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t.emit.apply(t,[r].concat(i))}),this.modules.external.forEach(function(r){r.init&&r.init(t)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(r){t[r]=function(){var n;return(n=t.store)[r].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(r){t[r]=function(){var n;return(n=t.store)[r].apply(n,arguments),t}});var u=en(),l=function(){var r=function(r,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(i),n(r,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return r(null,t.t.bind(t));t.changeLanguage(t.options.lng,r)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}},{key:"loadResources",value:function(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eE,i=n,s="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&"cimode"===s.toLowerCase())return i();var o=[],a=function(t){t&&r.services.languageUtils.toResolveHierarchy(t).forEach(function(t){0>o.indexOf(t)&&o.push(t)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(t){return a(t)}
7),this.options.preload&&this.options.preload.forEach(function(t){return a(t)}),this.services.backendConnector.load(o,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(t,r,n){var i=en();return t||(t=this.languages),r||(r=this.options.ns),n||(n=eE),this.services.backendConnector.reload(t,r,function(t){i.resolve(),n(t)}),i}},{key:"use",value:function(t){if(!t)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&ef.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,r){var n=this;this.isLanguageChangingTo=t;var i=en();this.emit("languageChanging",t);var s=function(t,s){s?(n.language=s,n.languages=n.services.languageUtils.toResolveHierarchy(s),n.translator.changeLanguage(s),n.isLanguageChangingTo=void 0,n.emit("languageChanged",s),n.logger.log("languageChanged",s)):n.isLanguageChangingTo=void 0,i.resolve(function(){return n.t.apply(n,arguments)}),r&&r(t,function(){return n.t.apply(n,arguments)})},o=function(t){var r="string"==typeof t?t:n.services.languageUtils.getBestMatchFromCodes(t);r&&(n.language||(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r)),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,function(t){s(t,r)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(t,r){var n=this,i=function t(r,i){var s;if("object"!==V(i)){for(var o=arguments.length,a=Array(o>2?o-2:0),u=2;u<o;u++)a[u-2]=arguments[u];s=n.options.overloadTranslationOptionHandler([r,i].concat(a))}else s=q({},i);return s.lng=s.lng||t.lng,s.lngs=s.lngs||t.lngs,s.ns=s.ns||t.ns,n.t(r,s)};return"string"==typeof t?i.lng=t:i.lngs=t,i.ns=r,i}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
7if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function(t,n){var i=r.services.backendConnector.state["".concat(t,"|").concat(n)];return -1===i||2===i};if(n.precheck){var u=n.precheck(this,a);if(void 0!==u)return u}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||a(i,t)&&(!s||a(o,t)))}},{key:"loadNamespaces",value:function(t,r){var n=this,i=en();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach(function(t){0>n.options.ns.indexOf(t)&&n.options.ns.push(t)}),this.loadResources(function(t){i.resolve(),r&&r(t)}),i):(r&&r(),Promise.resolve())}},{key:"loadLanguages",value:function(t,r){var n=en();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],s=t.filter(function(t){return 0>i.indexOf(t)});return s.length?(this.options.preload=i.concat(s),this.loadResources(function(t){n.resolve(),r&&r(t)}),n):(r&&r(),Promise.resolve())}},{key:"dir",value:function(t){return(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new r(t,n)}},{key:"cloneInstance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eE,s=q({},this.options,n,{isClone:!0}),o=new r(s);return["store","services","language"].forEach(function(r){o[r]=t[r]}),o.services=q({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new em(o.services,o.options),o.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];o.emit.apply(o,[t].concat(n))}),o.init(s,i),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}}]),r}(er)),eS=[],eF=eS.forEach,eN=eS.slice,eB={create:function(t,r,n,i){var s,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/"};if(n){var a=new Date;a.setTime(a.getTime()+60*n*1e3),s="; expires="+a.toUTCString()}else s="";i=i?"domain="+i+";":"",o=Object.keys(o).reduce(function(t,r){return t+";"+r.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})+"="+o[r]},""),document.cookie=t+"="+encodeURIComponent(r)+s+";"+i+o},read:function(t){for(var r=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var s=n[i];" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(r))return s.substring(r.length,s.length)}return null},remove:function(t){this.create(t,"",-1)}},ek={name:"cookie",lookup:function(t){var r;if(t.lookupCookie&&"undefined"!=typeof document){var n=eB.read(t.lookupCookie);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupCookie&&"undefined"!=typeof document&&eB.create(r.lookupCookie,t,r.cookieMinutes,r.cookieDomain,r.cookieOptions)}},eM={name:"querystring",lookup:function(t){var r;if("undefined"!=typeof window)for(var n=window.location.search.substring(1).split("&"),i=0;i<n.length;i++){var s=n[i].indexOf("=");s>0&&n[i].substring(0,s)===t.lookupQuerystring&&(r=n[i].substring(s+1))}return r}};try{i="undefined"!==window&&null!==window.localStorage;var eT="i18next.translate.boo";window.localStorage.setItem(eT,"foo"),window.localStorage.removeItem(eT)}catch(t){i=!1}var eI={name:"localStorage",lookup:function(t){var r;if(t.lookupLocalStorage&&i){var n=window.localStorage.getItem(t.lookupLocalStorage);
vendor: 3,217 bytes, line 7
7n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupLocalStorage&&i&&window.localStorage.setItem(r.lookupLocalStorage,t)}};try{s="undefined"!==window&&null!==window.sessionStorage;var eO="i18next.translate.boo";window.sessionStorage.setItem(eO,"foo"),window.sessionStorage.removeItem(eO)}catch(t){s=!1}var eL={name:"sessionStorage",lookup:function(t){var r;if(t.lookupsessionStorage&&s){var n=window.sessionStorage.getItem(t.lookupsessionStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupsessionStorage&&s&&window.sessionStorage.setItem(r.lookupsessionStorage,t)}},eP={name:"navigator",lookup:function(t){var r=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)r.push(navigator.languages[n]);navigator.userLanguage&&r.push(navigator.userLanguage),navigator.language&&r.push(navigator.language)}return r.length>0?r:void 0}},eR={name:"htmlTag",lookup:function(t){var r,n=t.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(r=n.getAttribute("lang")),r}},ez={name:"path",lookup:function(t){var r;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof t.lookupFromPathIndex){if("string"!=typeof n[t.lookupFromPathIndex])return;r=n[t.lookupFromPathIndex].replace("/","")}else r=n[0].replace("/","")}return r}},eU={name:"subdomain",lookup:function(t){var r;if("undefined"!=typeof window){var n=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);n instanceof Array&&(r="number"==typeof t.lookupFromSubdomainIndex?n[t.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):n[0].replace("http://","").replace("https://","").replace(".",""))}return r}},e$=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,t),this.type="languageDetector",this.detectors={},this.init(r,n)}return Z(t,[{key:"init",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t,this.options=function(t){return eF.call(eN.call(arguments,1),function(r){if(r)for(var n in r)void 0===t[n]&&(t[n]=r[n])}),t}(r,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],checkWhitelist:!0,checkForSimilarInWhitelist:!1}),this.options.checkForSimilarInWhitelist&&(this.options.checkWhitelist=!0),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(ek),this.addDetector(eM),this.addDetector(eI),this.addDetector(eL),this.addDetector(eP),this.addDetector(eR),this.addDetector(ez),this.addDetector(eU)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var r,n=this;t||(t=this.options.order);var i=[];if(t.forEach(function(t){if(n.detectors[t]){var r=n.detectors[t].lookup(n.options);r&&"string"==typeof r&&(r=[r]),r&&(i=i.concat(r))}}
7),i.forEach(function(t){if(!r){var i=n.services.languageUtils.formatLanguageCode(t);(!n.options.checkWhitelist||n.services.languageUtils.isWhitelisted(i))&&(r=i),!r&&n.options.checkForSimilarInWhitelist&&(r=n.getSimilarInWhitelist(i))}}),!r){var s=this.i18nOptions.fallbackLng;"string"==typeof s&&(s=[s]),s||(s=[]),r="[object Array]"===Object.prototype.toString.apply(s)?s[0]:s[0]||s.default&&s.default[0]}return r}},{key:"cacheUserLanguage",value:function(t,r){var n=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(function(r){n.detectors[r]&&n.detectors[r].cacheUserLanguage(t,n.options)}))}},{key:"getSimilarInWhitelist",value:function(t){var r=this;if(this.i18nOptions.whitelist){if(t.includes("-")){var n=t.split("-")[0],i=this.services.languageUtils.formatLanguageCode(n);if(this.services.languageUtils.isWhitelisted(i))return i;t=i}var s=this.i18nOptions.whitelist.find(function(n){var i=r.services.languageUtils.formatLanguageCode(n);if(i.startsWith(t))return i});if(s)return s}}}]),t}();e$.type="languageDetector";var ej={en:{translation:{fes:{autoplay:"The media that tried to play (with '{{src}}') wasn't allowed to by this browser, most likely due to the browser's autoplay policy.\n\n+ More info: {{url}}",checkUserDefinedFns:"It seems that you may have accidentally written {{name}} instead of {{actualName}}. Please correct it if it's not intentional.",fileLoadError:{bytes:"It looks like there was a problem loading your file. {{suggestion}}",font:"It looks like there was a problem loading your font. {{suggestion}}",gif:"There was some trouble loading your GIF. Make sure that your GIF is using 87a or 89a encoding.",image:"It looks like there was a problem loading your image. {{suggestion}}",json:"It looks like there was a problem loading your JSON file. {{suggestion}}",large:"If your large file isn't fetched successfully, we recommend splitting the file into smaller segments and fetching those.",strings:"It looks like there was a problem loading your text file. {{suggestion}}",suggestion:"Try checking if the file path ({{filePath}}) is correct, hosting the file online, or running a local server.\n\n+ More info: {{url}}",table:"It looks like there was a problem loading your table file. {{suggestion}}",xml:"It looks like there was a problem loading your XML file. {{suggestion}}"},friendlyParamError:{type_EMPTY_VAR:"{{location}} {{func}}() was expecting {{formatType}} for the {{position}} parameter, received an empty variable instead. If not intentional, this is often a problem with scope.\n\n+ More info: {{url}}",type_TOO_FEW_ARGUMENTS:"{{location}} {{func}}() was expecting at least {{minParams}} arguments, but received only {{argCount}}.",type_TOO_MANY_ARGUMENTS:"{{location}} {{func}}() was expecting no more than {{maxParams}} arguments, but received {{argCount}}.",type_WRONG_TYPE:"{{location}} {{func}}() was expecting {{formatType}} for the {{position}} parameter, received {{argType}} instead."},globalErrors:{reference:{cannotAccess:'\n{{location}} "{{symbol}}" is used before declaration. Make sure you have declared the variable before using it.\n\n+ More info: {{url}}',notDefined:'\n{{location}} "{{symbol}}" is not defined in the current scope. If you have defined it in your code, you should check its scope, spelling, and letter-casing (JavaScript is case-sensitive).\n\n+ More info: {{url}}'},stackSubseq:"└[{{location}}] \n	 Called from line {{line}} in {{func}}()\n",stackTop:"┌[{{location}}] \n	 Error at line {{line}} in {{func}}()\n",syntax:{badReturnOrYield:"\nSyntax Error - return lies outside of a function. Make sure you’re not missing any brackets, so that return lies inside a function.\n\n+ More info: {{url}}",invalidToken:"\nSyntax Error - Found a symbol that JavaScript doesn't recognize or didn't expect at it's place.\n\n+ More info: {{url}}",missingInitializer:"\nSyntax Error - A const variable is declared but not initialized. In JavaScript, an initializer for a const is required. A value must be specified in the same statement in which the variable is declared. Check the line number in the error and assign the const variable a value.\n\n+ More info: {{url}}",redeclaredVariable:'\nSyntax Error - "{{symbol}}" is being redeclared. JavaScript doesn\'t allow declaring a variable more than once. Check the line number in error for redeclaration of the variable.\n\n+ More info: {{url}}',unexpectedToken:"\nSyntax Error - Symbol present at a place that wasn't expected.\nUsually this is due to a typo. Check the line number in the error for anything missing/extra.\n\n+ More info: {{url}}"}
7,type:{constAssign:"\n{{location}} A const variable is being re-assigned. In javascript, re-assigning a value to a constant is not allowed. If you want to re-assign new values to a variable, make sure it is declared as var or let.\n\n+ More info: {{url}}",notfunc:'\n{{location}} "{{symbol}}" could not be called as a function.\nCheck the spelling, letter-casing (JavaScript is case-sensitive) and its type.\n\n+ More info: {{url}}',notfuncObj:'\n{{location}} "{{symbol}}" could not be called as a function.\nVerify whether "{{obj}}" has "{{symbol}}" in it and check the spelling, letter-casing (JavaScript is case-sensitive) and its type.\n\n+ More info: {{url}}',readFromNull:"\n{{location}} The property of null can't be read. In javascript the value null indicates that an object has no value.\n\n+ More info: {{url}}",readFromUndefined:"\n{{location}} Cannot read property of undefined. Check the line number in error and make sure the variable which is being operated is not undefined.\n\n + More info: {{url}}"}},libraryError:'{{location}} An error with message "{{error}}" occurred inside the p5js library when {{func}} was called. If not stated otherwise, it might be an issue with the arguments passed to {{func}}.',location:"[{{file}}, line {{line}}]",misspelling:'{{location}} It seems that you may have accidentally written "{{name}}" instead of "{{actualName}}". Please correct it to {{actualName}} if you wish to use the {{type}} from p5.js.',misspelling_plural:'{{location}} It seems that you may have accidentally written "{{name}}".\nYou may have meant one of the following: \n{{suggestions}}',misusedTopLevel:"Did you just try to use p5.js's {{symbolName}} {{symbolType}}? If so, you may want to move it into your sketch's setup() function.\n\n+ More info: {{url}}",preloadDisabled:"The preload() function has been removed in p5.js 2.0. Please load assets in setup() using async / await keywords or callbacks instead. See https://dev.to/limzykenneth/asynchronous-p5js-20-458f for more information.",positions:{p_1:"first",p_10:"tenth",p_11:"eleventh",p_12:"twelfth",p_2:"second",p_3:"third",p_4:"fourth",p_5:"fifth",p_6:"sixth",p_7:"seventh",p_8:"eighth",p_9:"ninth"},pre:"\n\uD83C\uDF38 p5.js says: {{message}}",sketchReaderErrors:{reservedConst:'you have used a p5.js reserved variable "{{symbol}}" make sure you change the variable name to something else.\n\n+ More info: {{url}}',reservedFunc:'you have used a p5.js reserved function "{{symbol}}" make sure you change the function name to something else.\n\n+ More info: {{url}}'},welcome:"Welcome! This is your friendly debugger. To turn me off, switch to using p5.min.js.",wrongPreload:'{{location}} An error with message "{{error}}" occurred inside the p5js library when "{{func}}" was called. If not stated otherwise, it might be due to "{{func}}" being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function.'}}}};let eV=["en","es","ko","zh","hi","ja"];if("undefined"==typeof IS_MINIFIED&&"undefined"!=typeof P5_DEV_BUILD){let t=n(3767);for(let r of Object.keys(t)){let n=r.split("_"),i=n.slice(0,n.length-1).join("-"),s=n[n.length-1];ej[i]=ej[i]||{},ej[i][s]=t[r]}}class eG{constructor(t,r){this.init(t,r)}fetchWithTimeout(t,r,n=2e3){return Promise.race([fetch(t,r),new Promise((t,r)=>setTimeout(()=>r(Error("timeout")),n))])}init(t,r={}){this.services=t,this.options=r}read(t,r,n){let i=this.options.loadPath;if(t===this.options.fallback)n(null,ej[t][r]);else if(eV.includes(t)){let s=this.services.interpolator.interpolate(i,{lng:t,ns:r});this.loadUrl(s,n)}else n("Not found",!1)}loadUrl(t,r){this.fetchWithTimeout(t).then(r=>{if(!r.ok)throw Error(`failed loading ${t}`);return r.json()},()=>{throw Error(`failed loading ${t}`)}).then(t=>r(null,t)).catch(r)}}eG.type="backend";let eq=(t,r)=>{console.debug("p5.js translator called before translations were loaded"),ew.t(t,r)},eW={ReferenceError:[{msg:"{{}} is not defined",type:"NOTDEFINED",browser:"all"},{msg:"Can't find variable: {{}}",type:"NOTDEFINED",browser:"Safari"},{msg:"Cannot access '{{.}}' before initialization",type:"CANNOTACCESS",browser:"Chrome"},{msg:"can't access lexical declaration '{{.}}' before initialization",type:"CANNOTACCESS",browser:"Firefox"}],SyntaxError:[{msg:"illegal character",type:"INVALIDTOKEN",browser:"Firefox"},{msg:"Invalid character",type:"INVALIDTOKEN",browser:"Safari"},{msg:"Invalid or unexpected token",type:"INVALIDTOKEN",browser:"Chrome"},{msg:"Unexpected token '{{.}}'",type:"UNEXPECTEDTOKEN",browser:"Chrome"},{msg:"expected {{.}}, got '{{.}}'",type:"UNEXPECTEDTOKEN",browser:"Chrome"},{msg:"Identifier '{{.}}' has already been declared",type:"REDECLAREDVARIABLE",browser:"Chrome"},{msg:"redeclaration of {} {{.}}",type:"REDECLAREDVARIABLE",browser:"Firefox"},{msg:"Missing initializer in const declaration",type:"MISSINGINITIALIZER",browser:"Chrome"},{msg:"missing = in const declaration",type:"MISSINGINITIALIZER",browser:"Firefox"},{msg:"Illegal return statement",type:"BADRETURNORYIELD",browser:"Chrome"},{msg:"return not in function",type:"BADRETURNORYIELD",browser:"Firefox"}],TypeError:[{msg:"{{.}} is not a function",type:"NOTFUNC",browser:"all"},{msg:"Cannot read {{.}} null",type:"READNULL",browser:"Chrome"},{msg:"{{.}} is null",type:"READNULL",browser:"Firefox"},{msg:"Cannot read {{.}} undefined",type:"READUDEFINED",browser:"Chrome"},{msg:"{{.}} is undefined",type:"READUDEFINED",browser:"Firefox"},{msg:"Assignment to constant variable",type:"CONSTASSIGN",browser:"Chrome"},{msg:"invalid assignment to const '{{.}}'",type:"CONSTASSIGN",browser:"Firefox"}]};function eH(t,r){let n=["#2D7BB6","#EE9900","#4DB200","#C83C00"],i=null,s=null;
7class a extends Error{}if("undefined"!=typeof IS_MINIFIED)t._friendlyError=t._checkForUserDefinedFunctions=t._fesErrorMonitor=()=>{};else{let o={},u=o.toString,l=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"];for(let t=0;t<l.length;t++)o[`[object ${l[t]}]`]=l[t].toLowerCase();let h=t=>null==t?`${t}`:"object"==typeof t||"function"==typeof t?o[u.call(t)]||"object":typeof t,c=["setup","draw","deviceMoved","deviceTurned","deviceShaken","doubleClicked","mousePressed","mouseReleased","mouseMoved","mouseDragged","mouseClicked","mouseWheel","touchStarted","touchMoved","touchEnded","keyPressed","keyReleased","keyTyped","windowResized"],d=(t,r)=>{let n="";if(null==r||"load"===r.substring(0,4))n=t;else{let i=r.split("."),s=i.length>1?`${i[0]}.${i[1]}`:"p5",o=1===i.length?r:i.slice(2).join("/");n=o.startsWith("p5.")?`${t} (https://p5js.org/reference/${s}.${o})`:`${t} (https://p5js.org/reference/${s}/${o})`}return n};t._report=(r,i,s)=>{let o=null==t._fesLogger?console.log.bind(console):t._fesLogger;"undefined"===h(s)?s="#B40033":"number"===h(s)&&(s=n[s]),r=d(r,i),o(eq("fes.pre",{message:r}))},t._error=(r,n,i)=>{throw t._report(n,i),r.hitCriticalError=!0,new a("Stopping sketch to prevent more errors")},t._friendlyError=function(r,n,i){t._report(r,n,i)},t._friendlyAutoplayError=function(t){let r=eq("fes.autoplay",{src:t,url:"https://developer.mozilla.org/docs/Web/Media/Autoplay_guide"});console.log(eq("fes.pre",{message:r}))},t.isPreloadSupported=function(){return!1};let p=r=>{if(t.disableFriendlyErrors)return;(r=r instanceof t?r:window).preload&&!t.isPreloadSupported()&&t._error(r,eq("fes.preloadDisabled"));let n={};for(let i of(c.forEach(t=>{n[t.toLowerCase()]=t}),Object.keys(r))){let s=i.toLowerCase();if(n.hasOwnProperty(s)&&!r[n[s]]&&"function"==typeof r[i]){let r=eq("fes.checkUserDefinedFns",{name:i,actualName:n[s]});t._friendlyError(r,n[s])}}},f=r=>{let n=t._fesLogger&&"function"==typeof t._fesLogger?t._fesLogger:console.log.bind(console);if(r.length>1){let t="";r.forEach((r,n)=>{let i=`${r.fileName}:${r.lineNumber}:${r.columnNumber}`,s,o={func:r.functionName,line:r.lineNumber,location:i,file:r.fileName.split("/").slice(-1)};s=0===n?eq("fes.globalErrors.stackTop",o):eq("fes.globalErrors.stackSubseq",o),t+=s}),n(t)}};t._fesErrorMonitor=n=>{let o,u,l;if(t.disableFriendlyErrors||n&&(n instanceof a||n.reason instanceof a))return;if(n instanceof Error)o=n;else if(n instanceof ErrorEvent)o=n.error;else if(n instanceof PromiseRejectionEvent&&!((o=n.reason)instanceof Error))return;if(!o)return;let h=t._getErrorStackParser().parse(o),[p,g]=((n,i)=>{let s,o,a;if(!i)return[!1,null];i.forEach(t=>{t.functionName=t.functionName||""});let u=!1;try{throw Error()}catch(r){s=t._getErrorStackParser().parse(r)[0].fileName}for(let t=i.length-1;t>=0;t--){let r=i[t].functionName.split(".");if(c.includes(r[r.length-1])){o=i.slice(0,t+1),a=r[r.length-1],i[0].fileName===s&&(u=!0);break}}if(o||(o=i),u){let u;if(0===(o=o.map((t,r)=>(t.frameIndex=r,t)).filter(t=>t.fileName!==s)).length)return[!0,null];let l=i[o[0].frameIndex-2].functionName.split(".").slice(-1)[0];if(o[0].fileName&&o[0].lineNumber&&o[0].columnNumber&&(u={location:`${o[0].fileName}:${o[0].lineNumber}:${o[0].columnNumber}`,file:o[0].fileName.split("/").slice(-1),line:o[0].lineNumber},t._fesLogCache[u.location]))return[!0,null];"preload"===a&&null==r._preloadMethods[l]?t._friendlyError(eq("fes.wrongPreload",{func:l,location:u?eq("fes.location",u):"",error:n.message}),"preload"):t._friendlyError(eq("fes.libraryError",{func:l,location:u?eq("fes.location",u):"",error:n.message}),l),o&&o.length&&f(o)}return[u,o]})(o,h);if(p)return;let m=eW[o.name];if(m){for(let t of m){let r=t.msg;r=(r=(r=r.replace(/{{}}/g,"([a-zA-Z0-9_]+)")).replace(RegExp("{{.}}","g"),"(.+)")).replace(/{}/g,"(?:[a-zA-Z0-9_]+)");let n=o.message.match(r);if(n){(u=Object.assign({},t)).match=n;break}}if(u)switch(h&&h[0].fileName&&h[0].lineNumber&&h[0].columnNumber&&(l={location:`${h[0].fileName}:${h[0].lineNumber}:${h[0].columnNumber}`,file:h[0].fileName.split("/").slice(-1),line:g[0].lineNumber}),o.name){case"SyntaxError":switch(u.type){case"INVALIDTOKEN":t._friendlyError(eq("fes.globalErrors.syntax.invalidToken",{url:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Illegal_character#What_went_wrong"}));break;case"UNEXPECTEDTOKEN":t._friendlyError(eq("fes.globalErrors.syntax.unex
7pectedToken",{url:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Unexpected_token#What_went_wrong"}));break;case"REDECLAREDVARIABLE":{let r=u.match[1];t._friendlyError(eq("fes.globalErrors.syntax.redeclaredVariable",{symbol:r,url:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter#what_went_wrong"}));break}case"MISSINGINITIALIZER":t._friendlyError(eq("fes.globalErrors.syntax.missingInitializer",{url:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Missing_initializer_in_const#what_went_wrong"}));break;case"BADRETURNORYIELD":t._friendlyError(eq("fes.globalErrors.syntax.badReturnOrYield",{url:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Bad_return_or_yield#what_went_wrong"}))}break;case"ReferenceError":switch(u.type){case"NOTDEFINED":{let r=u.match[1];if(r&&((r,n)=>{i||s();let o={},a=999999;if(i.forEach(t=>{let n=((t,r)=>{let n=t.length,i=r.length;if(0===n)return r;if(0===i)return t;let s=[],o=[];for(let t=0;t<i+1;t++)o[t]=t;s=o;for(let a=1;a<n+1;a++){o=[];for(let n=0;n<i+1;n++)if(0===n)o[n]=a;else{let i=t[a-1],u=r[n-1],l=999999,h=+(i.toLowerCase()!==u.toLowerCase());l=(l=(l=l>h+s[n-1]?h+s[n-1]:l)>1+o[n-1]?1+o[n-1]:l)>1+s[n]?1+s[n]:l,o[n]=l}s=o}return o[i]})(r,t.name);o[n]?o[n].push(t):o[n]=[t],n<a&&(a=n)}),a>Math.min(2,r.length))return!1;let u=o[a].filter(t=>t.name!==r);if(0!==u.length){let i,s,o=t._getErrorStackParser().parse(n);if(o&&o[0]&&o[0].fileName&&o[0].lineNumber&&o[0].columnNumber&&(i={location:`${o[0].fileName}:${o[0].lineNumber}:${o[0].columnNumber}`,file:o[0].fileName.split("/").slice(-1),line:o[0].lineNumber}),1===u.length)s=eq("fes.misspelling",{name:r,actualName:u[0].name,type:u[0].type,location:i?eq("fes.location",i):"",count:u.length});else{let t=u.map(t=>d("▶️ "+t.name+("function"===t.type?"()":""),t.name)).join("\n");s=eq("fes.misspelling",{name:r,suggestions:t,location:i?eq("fes.location",i):"",count:u.length})}return t._friendlyError(s,1===u.length?u[0].name:void 0),!0}return!1})(r,o))break;t._friendlyError(eq("fes.globalErrors.reference.notDefined",{url:"https://p5js.org/examples/data-variable-scope.html",symbol:r,location:l?eq("fes.location",l):""})),g&&f(g);break}case"CANNOTACCESS":{let r=u.match[1];t._friendlyError(eq("fes.globalErrors.reference.cannotAccess",{url:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_lexical_declaration_before_init#what_went_wrong",symbol:r,location:l?eq("fes.location",l):""})),g&&f(g)}}break;case"TypeError":switch(u.type){case"NOTFUNC":{let r=u.match[1].split("."),n={url:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_a_function#What_went_wrong",symbol:r[r.length-1],obj:r.slice(0,r.length-1).join("."),location:l?eq("fes.location",l):""};r.length>1?t._friendlyError(eq("fes.globalErrors.type.notfuncObj",n)):t._friendlyError(eq("fes.globalErrors.type.notfunc",n)),g&&f(g);break}case"READNULL":{let r=u.match[1];t._friendlyError(eq("fes.globalErrors.type.readFromNull",{url:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property#what_went_wrong",symbol:r,location:l?eq("fes.location",l):""})),g&&f(g);break}case"READUDEFINED":{let r=u.match[1];t._friendlyError(eq("fes.globalErrors.type.readFromUndefined",{url:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property#what_went_wrong",symbol:r,location:l?eq("fes.location",l):""})),g&&f(g);break}case"CONSTASSIGN":t._friendlyError(eq("fes.globalErrors.type.constAssign",{url:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_const_assignment#what_went_wrong",location:l?eq("fes.location",l):""})),g&&f(g)}}}},t._checkForUserDefinedFunctions=p,t._fesLogger=null,t._fesLogCache={},window.addEventListener("load",p,!1),window.addEventListener("error",t._fesErrorMonitor,!1),window.addEventListener("unhandledrejection",t._fesErrorMonitor,!1)}i=null;let u="https://github.com/processing/p5.js/wiki/p5.js-overview#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup";s=()=>{let t={},n=r=>Object.getOwnPropertyNames(r).filter(r=>"_"!==r[0]&&!(r in t)&&(t[r]=!0,!0)).map(t=>{let n;return n="function"==typeof r[t]?"function":t===t.toUpperCase()?"constant":"variable",{name:t,type:n}});(i=[].concat(n(r),n(o.v))).sort((t,r)=>r.name.length-t.name.length)};let l=(t,r)=>{r||(r=console.log.bind(console)),i||s(),i.some(n=>{if(t.message&&null!==t.message.match(`\\W?${n.name}\\W`)){let t="function"===n.type?`${n.name}()`:n.name;return"undefined"!=typeof IS_MINIFIED?r(`Did you just try to use p5.js's ${t} ${n.type}? If so, you may want to move it into your sketch's setup() function.
8
9For more details, see: ${u}`):r(eq("fes.misusedTopLevel",{symbolName:t,symbolType:n.type,url:u})),!0}})};r._helpForMisusedAtTopLevelCode=l,"complete"!==document.readyState&&(window.addEventListener("error",l,!1),window.addEventListener("load",()=>{window.removeEventListener("error",l,!1)}))}function eZ(){let t=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(t){return void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(r)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):void 0},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];let r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(r)},this).map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let r=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),s=this.extractLocation(n?n[1]:i.pop());return{functionName:i.join(" ")||void 0,fileName:["eval","<anonymous>"].indexOf(s[0])>-1?void 0:s[0],lineNumber:s[1],columnNumber:s[2],source:t}},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(t){return!t.match(n)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return{functionName:t};{let r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=t.match(r),i=n&&n[1]?n[1]:void 0,s=this.extractLocation(t.replace(r,""));return{functionName:i,fileName:s[0],lineNumber:s[1],columnNumber:s[2],source:t}}},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){let r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),i=[];for(let t=2,s=n.length;t<s;t+=2){let s=r.exec(n[t]);
9s&&i.push({fileName:s[2],lineNumber:s[1],source:n[t]})}return i},parseOpera10:function(t){let r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split("\n"),i=[];for(let t=0,s=n.length;t<s;t+=2){let s=r.exec(n[t]);s&&i.push({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:n[t]})}return i},parseOpera11:function(r){return r.stack.split("\n").filter(function(r){return!!r.match(t)&&!r.match(/^Error created at/)},this).map(function(t){let r,n=t.split("@"),i=this.extractLocation(n.pop()),s=n.shift()||"",o=s.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return s.match(/\(([^)]*)\)/)&&(r=s.replace(/^[^(]+\(([^)]*)\)$/,"$1")),{functionName:o,args:void 0===r||"[arguments not available]"===r?void 0:r.split(","),fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t}},this)}}}function eY(t,r){t._getErrorStackParser=function(){return new eZ}}function eX(t,r,n){function i(n,i){var s;for(let o in Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(s=n._zod).traits??(s.traits=new Set),n._zod.traits.add(t),r(n,i),a.prototype)o in n||Object.defineProperty(n,o,{value:a.prototype[o].bind(n)});n._zod.constr=a,n._zod.def=i}let s=n?.Parent??Object;class o extends s{}function a(t){var r;let s=n?.Parent?new o:this;for(let n of(i(s,t),(r=s._zod).deferred??(r.deferred=[]),s._zod.deferred))n();return s}return Object.defineProperty(o,"name",{value:t}),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:r=>!!n?.Parent&&r instanceof n.Parent||r?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}"undefined"!=typeof p5&&eH(p5,p5.prototype),"undefined"!=typeof p5&&eY(p5,p5.prototype),Object.freeze({status:"aborted"}),Symbol("zod_brand");class eJ extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}let eK={};function eQ(t){return t&&Object.assign(eK,t),eK}let e0=/^[cC][^\s-]{8,}$/,e1=/^[0-9a-z]+$/,e2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,e5=/^[0-9a-vA-V]{20}$/,e3=/^[A-Za-z0-9]{27}$/,e8=/^[a-zA-Z0-9_-]{21}$/,e4=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,e6=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,e9=t=>t?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,e7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,te=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,tr=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ti=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ts=/^[A-Za-z0-9_-]*$/,to=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,ta=/^\+(?:[0-9]){6,14}[0-9]$/,tu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tl=RegExp(`^${tu}$`);function th(t){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof t.precision?-1===t.precision?`${r}`:0===t.precision?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${t.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}let tc=/^\d+$/,td=/^-?\d+(?:\.\d+)?/i,tp=/true|false/i,tf=/^[^A-Z]*$/,tg=/^[^a-z]*$/;function tm(t,r){return"bigint"==typeof r?r.toString():r}function ty(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}}}}function tv(t){let r=+!!t.startsWith("^"),n=t.endsWith("$")?t.length-1:t.length;return t.slice(r,n)}function tb(t,r,n){Object.defineProperty(t,r,{get(){{let i=n();return t[r]=i,i}},set(n){Object.defineProperty(t,r,{value:n})},configurable:!0})}function tx(t,r,n){Object.defineProperty(t,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function t_(t){return JSON.stringify(t)}let tD=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function tA(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}let tC=ty(()=>
9{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(t){return!1}});function tE(t){if(!1===tA(t))return!1;let r=t.constructor;if(void 0===r)return!0;let n=r.prototype;return!1!==tA(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}let tw=new Set(["string","number","symbol"]);function tS(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tF(t,r,n){let i=new t._zod.constr(r??t._zod.def);return(!r||n?.parent)&&(i._zod.parent=t),i}function tN(t){if(!t)return{};if("string"==typeof t)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return(delete t.message,"string"==typeof t.error)?{...t,error:()=>t.error}:t}let tB={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tk(t,r=0){for(let n=r;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function tM(t,r){return r.map(r=>(r.path??(r.path=[]),r.path.unshift(t),r))}function tT(t){return"string"==typeof t?t:t?.message}function tI(t,r,n){let i={...t,path:t.path??[]};return t.message||(i.message=tT(t.inst?._zod.def?.error?.(t))??tT(r?.error?.(t))??tT(n.customError?.(t))??tT(n.localeError?.(t))??"Invalid input"),delete i.inst,delete i.continue,r?.reportInput||delete i.input,i}function tO(t){return Array.isArray(t)?"array":"string"==typeof t?"string":"unknown"}function tL(...t){let[r,n,i]=t;return"string"==typeof r?{message:r,code:"custom",input:n,inst:i}:{...r}}let tP=eX("$ZodCheck",(t,r)=>{var n;t._zod??(t._zod={}),t._zod.def=r,(n=t._zod).onattach??(n.onattach=[])}),tR={number:"number",bigint:"bigint",object:"date"},tz=eX("$ZodCheckLessThan",(t,r)=>{tP.init(t,r);let n=tR[typeof r.value];t._zod.onattach.push(t=>{let n=t._zod.bag,i=(r.inclusive?n.maximum:n.exclusiveMaximum)??1/0;r.value<i&&(r.inclusive?n.maximum=r.value:n.exclusiveMaximum=r.value)}),t._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:r.value,input:i.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),tU=eX("$ZodCheckGreaterThan",(t,r)=>{tP.init(t,r);let n=tR[typeof r.value];t._zod.onattach.push(t=>{let n=t._zod.bag,i=(r.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;r.value>i&&(r.inclusive?n.minimum=r.value:n.exclusiveMinimum=r.value)}),t._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:r.value,input:i.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),t$=eX("$ZodCheckMultipleOf",(t,r)=>{tP.init(t,r),t._zod.onattach.push(t=>{var n;(n=t._zod.bag).multipleOf??(n.multipleOf=r.value)}),t._zod.check=n=>{if(typeof n.value!=typeof r.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%r.value===BigInt(0):0===function(t,r){let n=(t.toString().split(".")[1]||"").length,i=(r.toString().split(".")[1]||"").length,s=n>i?n:i;return Number.parseInt(t.toFixed(s).replace(".",""))%Number.parseInt(r.toFixed(s).replace(".",""))/10**s}(n.value,r.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:t,continue:!r.abort})}}),tj=eX("$ZodCheckNumberFormat",(t,r)=>{tP.init(t,r),r.format=r.format||"float64";let n=r.format?.includes("int"),i=n?"int":"number",[s,o]=tB[r.format];t._zod.onattach.push(t=>{let i=t._zod.bag;i.format=r.format,i.minimum=s,i.maximum=o,n&&(i.pattern=tc)}),t._zod.check=a=>{let u=a.value;if(n){if(!Number.isInteger(u))return void a.issues.push({expected:i,format:r.format,code:"invalid_type",input:u,inst:t});if(!Number.isSafeInteger(u))return void(u>0?a.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,continue:!r.abort}):a.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,continue:!r.abort}))}u<s&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:s,inclusive:!0,inst:t,continue:!r.abort}),u>o&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:o,inst:t})}}),tV=eX("$ZodCheckMaxLength",(t,r)=>{var n;tP.init(t,r),(n=t._zod.def).when??(n.when=t=>{let r=t.value;return null!=r&&void 0!==r.length}),t._zod.onattach.push(t=>{let n=t._zod.bag.maximum??1/0;r.maximum<n&&(t._zod.bag.maximum=r.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=r.maximum)return;let s=tO(i);n.issues.push({origin:s,code:"too_big",maximum:r.maximum,inclusive:!0,input:i,inst:t,continue:!r.abort})}}),tG=eX("$ZodCheckMinLength",(t,r)=>{var n;tP.init(t,r),(n=t._zod.def).when??(n.when=t=>{let r=t.value;return null!=r&&void 0!==r.length}),t._zod.onattach.push(t=>{let n=t._zod.bag.minimum??-1/0;r.minimum>n&&(t._zod.bag.minimum=r.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=r.minimum)return;let s=tO(i);n.issues.push({origin:s,code:"too_small",minimum:r.minimum,inclusive:!0,input:i,inst:t,continue:!r.abort})}}),tq=eX("$ZodCheckLengthEquals",(t,r)=>{var n;tP.init(t,r),(n=t._zod.def).when??(n.when=t=>{let r=t.value;return null!=r&&void 0!==r.length}),t._zod.onattach.push(t=>{let n=t._zod.bag;n.minimum=r.length,n.maximum=r.length,n.length=r.length}),t._zod.check=n=>{let i=n.value,s=i.length;if(s===r.length)return;let o=tO(i),a=s>r.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!r.abort})}}),tW=eX("$ZodCheckStringFormat",(t,r)=>{var n,i;tP.init(t,r),t._zod.onattach.push(t=>{let n=t._zod.bag;n.format=r.format,r.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(r.pattern))}),r.pattern?(n=t._zod).check??(n.check=n=>{r.pattern.lastIndex=0,r.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:r.format,input:n.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:t,continue:!r.abort})}):(i=t._zod).check??(i.check=()=>{})}),tH=eX("$ZodCheckRegex",(t,r)=>{tW.init(t,r),t._zod.check=n=>{r.pattern.lastIndex=0,r.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:t,continue:!r.abort})}}),tZ=eX("$ZodCheckLowerCase",(t,r)=>{r.pattern??(r.pattern=tf),tW.init(t,r)}),tY=eX("$ZodCheckUpperCase",(t,r)=>{r.pattern??(r.pattern=tg),tW.init(t,r)}),tX=eX("$ZodCheckIncludes",(t,r)=>{tP.init(t,r);let n=tS(r.includes),i=new RegExp("number"==typeof r.position?`^.{${r.position}}${n}`:n);r.pattern=i,t._zod.onattach.push(t=>{let r=t._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(i)}),t._zod.check=n=>
9{n.value.includes(r.includes,r.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:n.value,inst:t,continue:!r.abort})}}),tJ=eX("$ZodCheckStartsWith",(t,r)=>{tP.init(t,r);let n=RegExp(`^${tS(r.prefix)}.*`);r.pattern??(r.pattern=n),t._zod.onattach.push(t=>{let r=t._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=n=>{n.value.startsWith(r.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:n.value,inst:t,continue:!r.abort})}}),tK=eX("$ZodCheckEndsWith",(t,r)=>{tP.init(t,r);let n=RegExp(`.*${tS(r.suffix)}$`);r.pattern??(r.pattern=n),t._zod.onattach.push(t=>{let r=t._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=n=>{n.value.endsWith(r.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:n.value,inst:t,continue:!r.abort})}}),tQ=eX("$ZodCheckOverwrite",(t,r)=>{tP.init(t,r),t._zod.check=t=>{t.value=r.tx(t.value)}});class t0{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if("function"==typeof t){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split("\n").filter(t=>t),n=Math.min(...r.map(t=>t.length-t.trimStart().length));for(let t of r.map(t=>t.slice(n)).map(t=>" ".repeat(2*this.indent)+t))this.content.push(t)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(t=>`  ${t}`)].join("\n"))}}let t1=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),Object.defineProperty(t,"message",{get:()=>JSON.stringify(r,tm,2),enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},t2=eX("$ZodError",t1),t5=eX("$ZodError",t1,{Parent:Error}),t3=t=>(r,n,i,s)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},a=r._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new eJ;if(a.issues.length){let r=new(s?.Err??t)(a.issues.map(t=>tI(t,o,eQ())));throw tD(r,s?.callee),r}return a.value},t8=t3(t5),t4=t=>async(r,n,i,s)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},a=r._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let r=new(s?.Err??t)(a.issues.map(t=>tI(t,o,eQ())));throw tD(r,s?.callee),r}return a.value},t6=t4(t5),t9=t=>(r,n,i)=>{let s=i?{...i,async:!1}:{async:!1},o=r._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new eJ;return o.issues.length?{success:!1,error:new(t??t2)(o.issues.map(t=>tI(t,s,eQ())))}:{success:!0,data:o.value}},t7=t9(t5),re=t=>async(r,n,i)=>{let s=i?Object.assign(i,{async:!0}):{async:!0},o=r._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(t=>tI(t,s,eQ())))}:{success:!0,data:o.value}},rt=re(t5),rr={major:4,minor:0,patch:0},rn=eX("$ZodType",(t,r)=>{var n;t??(t={}),t._zod.def=r,t._zod.bag=t._zod.bag||{},t._zod.version=rr;let i=[...t._zod.def.checks??[]];for(let r of(t._zod.traits.has("$ZodCheck")&&i.unshift(t),i))for(let n of r._zod.onattach)n(t);if(0===i.length)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let r=(t,r,n)=>{let i,s=tk(t);for(let o of r){if(o._zod.def.when){if(!o._zod.def.when(t))continue}else if(s)continue;let r=t.issues.length,a=o._zod.check(t);if(a instanceof Promise&&n?.async===!1)throw new eJ;if(i||a instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await a,t.issues.length!==r&&(s||(s=tk(t,r)))});else{if(t.issues.length===r)continue;s||(s=tk(t,r))}}return i?i.then(()=>t):t};t._zod.run=(n,s)=>{let o=t._zod.parse(n,s);if(o instanceof Promise){if(!1===s.async)throw new eJ;return o.then(t=>r(t,i,s))}return r(o,i,s)}}t["~standard"]={validate:r=>{try{let n=t7(t,r);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return rt(t,r).then(t=>t.success?{value:t.data}:{issues:t.error?.issues})}},vendor:"zod",version:1}}),ri=eX("$ZodString",(t,r)=>{rn.init(t,r),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??(t=>{let r=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${r}$`)})(t._zod.bag),t._zod.parse=(n,i)=>{if(r.coerce)try{n.value=String(n.value)}catch(t){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),rs=eX("$ZodStringFormat",(t,r)=>{tW.init(t,r),ri.init(t,r)}
9),ro=eX("$ZodGUID",(t,r)=>{r.pattern??(r.pattern=e6),rs.init(t,r)}),ra=eX("$ZodUUID",(t,r)=>{if(r.version){let t={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(void 0===t)throw Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=e9(t))}else r.pattern??(r.pattern=e9());rs.init(t,r)}),ru=eX("$ZodEmail",(t,r)=>{r.pattern??(r.pattern=e7),rs.init(t,r)}),rl=eX("$ZodURL",(t,r)=>{rs.init(t,r),t._zod.check=n=>{try{let i=n.value,s=new URL(i),o=s.href;r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:to.source,input:n.value,inst:t,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:t,continue:!r.abort})),!i.endsWith("/")&&o.endsWith("/")?n.value=o.slice(0,-1):n.value=o;return}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!r.abort})}}}),rh=eX("$ZodEmoji",(t,r)=>{r.pattern??(r.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rs.init(t,r)}),rc=eX("$ZodNanoID",(t,r)=>{r.pattern??(r.pattern=e8),rs.init(t,r)}),rd=eX("$ZodCUID",(t,r)=>{r.pattern??(r.pattern=e0),rs.init(t,r)}),rp=eX("$ZodCUID2",(t,r)=>{r.pattern??(r.pattern=e1),rs.init(t,r)}),rf=eX("$ZodULID",(t,r)=>{r.pattern??(r.pattern=e2),rs.init(t,r)}),rg=eX("$ZodXID",(t,r)=>{r.pattern??(r.pattern=e5),rs.init(t,r)}),rm=eX("$ZodKSUID",(t,r)=>{r.pattern??(r.pattern=e3),rs.init(t,r)}),ry=eX("$ZodISODateTime",(t,r)=>{r.pattern??(r.pattern=function(t){let r=th({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-]\\d{2}:\\d{2})");let i=`${r}(?:${n.join("|")})`;return RegExp(`^${tu}T(?:${i})$`)}(r)),rs.init(t,r)}),rv=eX("$ZodISODate",(t,r)=>{r.pattern??(r.pattern=tl),rs.init(t,r)}),rb=eX("$ZodISOTime",(t,r)=>{r.pattern??(r.pattern=RegExp(`^${th(r)}$`)),rs.init(t,r)}),rx=eX("$ZodISODuration",(t,r)=>{r.pattern??(r.pattern=e4),rs.init(t,r)}),r_=eX("$ZodIPv4",(t,r)=>{r.pattern??(r.pattern=te),rs.init(t,r),t._zod.onattach.push(t=>{t._zod.bag.format="ipv4"})}),rD=eX("$ZodIPv6",(t,r)=>{r.pattern??(r.pattern=tt),rs.init(t,r),t._zod.onattach.push(t=>{t._zod.bag.format="ipv6"}),t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!r.abort})}}}),rA=eX("$ZodCIDRv4",(t,r)=>{r.pattern??(r.pattern=tr),rs.init(t,r)}),rC=eX("$ZodCIDRv6",(t,r)=>{r.pattern??(r.pattern=tn),rs.init(t,r),t._zod.check=n=>{let[i,s]=n.value.split("/");try{if(!s)throw Error();let t=Number(s);if(`${t}`!==s||t<0||t>128)throw Error();new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!r.abort})}}});function rE(t){if(""===t)return!0;if(t.length%4!=0)return!1;try{return atob(t),!0}catch{return!1}}let rw=eX("$ZodBase64",(t,r)=>{r.pattern??(r.pattern=ti),rs.init(t,r),t._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{rE(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!r.abort})}}),rS=eX("$ZodBase64URL",(t,r)=>{r.pattern??(r.pattern=ts),rs.init(t,r),t._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{!function(t){if(!ts.test(t))return!1;let r=t.replace(/[-_]/g,t=>"-"===t?"+":"/");return rE(r.padEnd(4*Math.ceil(r.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!r.abort})}}),rF=eX("$ZodE164",(t,r)=>{r.pattern??(r.pattern=ta),rs.init(t,r)}),rN=eX("$ZodJWT",(t,r)=>{rs.init(t,r),t._zod.check=n=>{!function(t,r=null){try{let n=t.split(".");if(3!==n.length)return!1;let[i]=n;if(!i)return!1;let s=JSON.parse(atob(i));if("typ"in s&&s?.typ!=="JWT"||!s.alg||r&&(!("alg"in s)||s.alg!==r))return!1;return!0}catch{return!1}}(n.value,r.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!r.abort})}}),rB=eX("$ZodNumber",(t,r)=>{rn.init(t,r),t._zod.pattern=t._zod.bag.pattern??td,t._zod.parse=(n,i)=>{if(r.coerce)try{n.value=Number(n.value)}catch(t){}let s=n.value;if("number"==typeof s&&!Number.isNaN(s)&&Number.isFinite(s))return n;let o="number"==typeof s?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:t,...o?{received:o}:{}}),n}}),rk=eX("$ZodNumber",(t,r)=>{tj.init(t,r),rB.init(t,r)}),rM=eX("$ZodBoolean",(t,r)=>{rn.init(t,r),t._zod.pattern=tp,t._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch(t){}let s=n.value;return"boolean"==typeof s||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:t}),n}}),rT=eX("$ZodAny",(t,r)=>{rn.init(t,r),t._zod.parse=t=>t}),rI=eX("$ZodUnknown",(t,r)=>{rn.init(t,r),t._zod.parse=t=>t}),rO=eX("$ZodNever",(t,r)=>{rn.init(t,r),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)});function rL(t,r,n){t.issues.length&&r.issues.push(...tM(n,t.issues)),r.value[n]=t.value}let rP=eX("$ZodArray",(t,r)=>{rn.init(t,r),t._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:t}),n;n.value=Array(s.length);let o=[];for(let t=0;t<s.length;t++){let a=s[t],u=r.element._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(r=>rL(r,n,t))):rL(u,n,t)}return o.length?Promise.all(o).then(()=>n):n}});function rR(t,r,n){t.issues.length&&r.issues.push(...tM(n,t.issues)),r.value[n]=t.value}function rz(t,r,n,i){t.issues.length?void 0===i[n]?n in i?r.value[n]=void 0:r.value[n]=t.value:r.
9issues.push(...tM(n,t.issues)):void 0===t.value?n in i&&(r.value[n]=void 0):r.value[n]=t.value}let rU=eX("$ZodObject",(t,r)=>{let n,i;rn.init(t,r);let s=ty(()=>{let t=Object.keys(r.shape);for(let n of t)if(!(r.shape[n]instanceof rn))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=function(t){return Object.keys(t).filter(r=>"optional"===t[r]._zod.optin&&"optional"===t[r]._zod.optout)}(r.shape);return{shape:r.shape,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}});tb(t._zod,"propValues",()=>{let t=r.shape,n={};for(let r in t){let i=t[r]._zod;if(i.values)for(let t of(n[r]??(n[r]=new Set),i.values))n[r].add(t)}return n});let o=!eK.jitless,a=o&&tC.value,u=r.catchall;t._zod.parse=(l,h)=>{i??(i=s.value);let c=l.value;if(!tA(c))return l.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),l;let d=[];if(o&&a&&h?.async===!1&&!0!==h.jitless)n||(n=(t=>{let r=new t0(["shape","payload","ctx"]),n=s.value,i=t=>{let r=t_(t);return`shape[${r}]._zod.run({ value: input[${r}], issues: [] }, ctx)`};r.write("const input = payload.value;");let o=Object.create(null),a=0;for(let t of n.keys)o[t]=`key_${a++}`;for(let t of(r.write("const newResult = {}"),n.keys))if(n.optionalKeys.has(t)){let n=o[t];r.write(`const ${n} = ${i(t)};`);let s=t_(t);r.write(`
10        if (${n}.issues.length) {
11          if (input[${s}] === undefined) {
12            if (${s} in input) {
13              newResult[${s}] = undefined;
14            }
15          } else {
16            payload.issues = payload.issues.concat(
17              ${n}.issues.map((iss) => ({
18                ...iss,
19                path: iss.path ? [${s}, ...iss.path] : [${s}],
20              }))
21            );
22          }
23        } else if (${n}.value === undefined) {
24          if (${s} in input) newResult[${s}] = undefined;
25        } else {
26          newResult[${s}] = ${n}.value;
27        }
28        `)}else{let n=o[t];r.write(`const ${n} = ${i(t)};`),r.write(`
29          if (${n}.issues.length) payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
30            ...iss,
31            path: iss.path ? [${t_(t)}, ...iss.path] : [${t_(t)}]
32          })));`),r.write(`newResult[${t_(t)}] = ${n}.value`)}r.write("payload.value = newResult;"),r.write("return payload;");let u=r.compile();return(r,n)=>u(t,r,n)})(r.shape)),l=n(l,h);else{l.value={};let t=i.shape;for(let r of i.keys){let n=t[r],i=n._zod.run({value:c[r],issues:[]},h),s="optional"===n._zod.optin&&"optional"===n._zod.optout;i instanceof Promise?d.push(i.then(t=>s?rz(t,l,r,c):rR(t,l,r))):s?rz(i,l,r,c):rR(i,l,r)}}if(!u)return d.length?Promise.all(d).then(()=>l):l;let p=[],f=i.keySet,g=u._zod,m=g.def.type;for(let t of Object.keys(c)){if(f.has(t))continue;if("never"===m){p.push(t);continue}let r=g.run({value:c[t],issues:[]},h);r instanceof Promise?d.push(r.then(r=>rR(r,l,t))):rR(r,l,t)}return(p.length&&l.issues.push({code:"unrecognized_keys",keys:p,input:c,inst:t}),d.length)?Promise.all(d).then(()=>l):l}});function r$(t,r,n,i){for(let n of t)if(0===n.issues.length)return r.value=n.value,r;return r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:t.map(t=>t.issues.map(t=>tI(t,i,eQ())))}),r}let rj=eX("$ZodUnion",(t,r)=>{rn.init(t,r),tb(t._zod,"optin",()=>r.options.some(t=>"optional"===t._zod.optin)?"optional":void 0),tb(t._zod,"optout",()=>r.options.some(t=>"optional"===t._zod.optout)?"optional":void 0),tb(t._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),tb(t._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){let t=r.options.map(t=>t._zod.pattern);return RegExp(`^(${t.map(t=>tv(t.source)).join("|")})$`)}}),t._zod.parse=(n,i)=>{let s=!1,o=[];for(let t of r.options){let r=t._zod.run({value:n.value,issues:[]},i);if(r instanceof Promise)o.push(r),s=!0;else{if(0===r.issues.length)return r;o.push(r)}}return s?Promise.all(o).then(r=>r$(r,n,t,i)):r$(o,n,t,i)}}),rV=eX("$ZodIntersection",(t,r)=>{rn.init(t,r),t._zod.parse=(t,n)=>{let i=t.value,s=r.left._zod.run({value:i,issues:[]},n),o=r.right._zod.run({value:i,issues:[]},n);
32return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([r,n])=>rG(t,r,n)):rG(t,s,o)}});function rG(t,r,n){if(r.issues.length&&t.issues.push(...r.issues),n.issues.length&&t.issues.push(...n.issues),tk(t))return t;let i=function t(r,n){if(r===n||r instanceof Date&&n instanceof Date&&+r==+n)return{valid:!0,data:r};if(tE(r)&&tE(n)){let i=Object.keys(n),s=Object.keys(r).filter(t=>-1!==i.indexOf(t)),o={...r,...n};for(let i of s){let s=t(r[i],n[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(r)&&Array.isArray(n)){if(r.length!==n.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let s=0;s<r.length;s++){let o=t(r[s],n[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i.push(o.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}(r.value,n.value);if(!i.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return t.value=i.data,t}let rq=eX("$ZodTuple",(t,r)=>{rn.init(t,r);let n=r.items,i=n.length-[...n].reverse().findIndex(t=>"optional"!==t._zod.optin);t._zod.parse=(s,o)=>{let a=s.value;if(!Array.isArray(a))return s.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),s;s.value=[];let u=[];if(!r.rest){let r=a.length>n.length,o=a.length<i-1;if(r||o)return s.issues.push({input:a,inst:t,origin:"array",...r?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length}}),s}let l=-1;for(let t of n){if(++l>=a.length&&l>=i)continue;let r=t._zod.run({value:a[l],issues:[]},o);r instanceof Promise?u.push(r.then(t=>rW(t,s,l))):rW(r,s,l)}if(r.rest)for(let t of a.slice(n.length)){l++;let n=r.rest._zod.run({value:t,issues:[]},o);n instanceof Promise?u.push(n.then(t=>rW(t,s,l))):rW(n,s,l)}return u.length?Promise.all(u).then(()=>s):s}});function rW(t,r,n){t.issues.length&&r.issues.push(...tM(n,t.issues)),r.value[n]=t.value}let rH=eX("$ZodEnum",(t,r)=>{rn.init(t,r);let n=function(t){let r=Object.values(t).filter(t=>"number"==typeof t);return Object.entries(t).filter(([t,n])=>-1===r.indexOf(+t)).map(([t,r])=>r)}(r.entries);t._zod.values=new Set(n),t._zod.pattern=RegExp(`^(${n.filter(t=>tw.has(typeof t)).map(t=>"string"==typeof t?tS(t):t.toString()).join("|")})$`),t._zod.parse=(r,i)=>{let s=r.value;return t._zod.values.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:t}),r}}),rZ=eX("$ZodLiteral",(t,r)=>{rn.init(t,r),t._zod.values=new Set(r.values),t._zod.pattern=RegExp(`^(${r.values.map(t=>"string"==typeof t?tS(t):t?t.toString():String(t)).join("|")})$`),t._zod.parse=(n,i)=>{let s=n.value;return t._zod.values.has(s)||n.issues.push({code:"invalid_value",values:r.values,input:s,inst:t}),n}}),rY=eX("$ZodTransform",(t,r)=>{rn.init(t,r),t._zod.parse=(t,n)=>{let i=r.transform(t.value,t);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(r=>(t.value=r,t));if(i instanceof Promise)throw new eJ;return t.value=i,t}}),rX=eX("$ZodOptional",(t,r)=>{rn.init(t,r),t._zod.optin="optional",t._zod.optout="optional",tb(t._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),tb(t._zod,"pattern",()=>{let t=r.innerType._zod.pattern;return t?RegExp(`^(${tv(t.source)})?$`):void 0}),t._zod.parse=(t,n)=>"optional"===r.innerType._zod.optin?r.innerType._zod.run(t,n):void 0===t.value?t:r.innerType._zod.run(t,n)}),rJ=eX("$ZodNullable",(t,r)=>{rn.init(t,r),tb(t._zod,"optin",()=>r.innerType._zod.optin),tb(t._zod,"optout",()=>r.innerType._zod.optout),tb(t._zod,"pattern",()=>{let t=r.innerType._zod.pattern;return t?RegExp(`^(${tv(t.source)}|null)$`):void 0}),tb(t._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),t._zod.parse=(t,n)=>null===t.value?t:r.innerType._zod.run(t,n)}),rK=eX("$ZodDefault",(t,r)=>{rn.init(t,r),t._zod.optin="optional",tb(t._zod,"values",()=>r.innerType._zod.values),t._zod.parse=(t,n)=>{if(void 0===t.value)return t.value=r.defaultValue,t;let i=r.innerType._zod.run(t,n);return i instanceof Promise?i.then(t=>rQ(t,r)):rQ(i,r)}});function rQ(t,r){return void 0===t.value&&(t.value=r.defaultValue),t}let r0=eX("$ZodPrefault",(t,r)=>{rn.init(t,r),t._zod.optin="optional",tb(t._zod,"values",()=>r.innerType._zod.values),t._zod.parse=(t,n)=>(void 0===t.value&&(t.value=r.defaultValue),r.innerType._zod.run(t,n))}),r1=eX("$ZodNonOptional",(t,r)=>{rn.init(t,r),tb(t._zod,"values",()=>{let t=r.innerType._zod.values;return t?new Set([...t].filter(t=>void 0!==t)):void 0}),t._zod.parse=(n,i)=>{let s=r.innerType._zod.run(n,i);return s instanceof Promise?s.then(r=>r2(r,t)):r2(s,t)}});function r2(t,r){return t.issues.length||void 0!==t.value||t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:r}),t}let r5=eX("$ZodCatch",(t,r)=>{rn.init(t,r),t._zod.optin="optional",tb(t._zod,"optout",()=>r.innerType._zod.optout),tb(t._zod,"values",()=>r.innerType._zod.values),t._zod.parse=(t,n)=>{let i=r.innerType._zod.run(t,n);return i instanceof Promise?i.then(i=>(t.value=i.value,i.issues.length&&(t.value=r.catchValue({...t,error:{issues:i.issues.map(t=>tI(t,n,eQ()))},input:t.value}),t.issues=[]),t)):(t.value=i.value,i.issues.length&&(t.value=r.catchValue({...t,error:{issues:i.issues.map(t=>tI(t,n,eQ()))},input:t.value}),t.issues=[]),t)}}),r3=eX("$ZodPipe",(t,r)=>{rn.init(t,r),tb(t._zod,"values",()=>r.in._zod.values),tb(t._zod,"optin",()=>r.in._zod.optin),tb(t._zod,"optout",()=>r.out._zod.optout),t._zod.parse=(t,n)=>{let i=r.in._zod.run(t,n);return i instanceof Promise?i.then(t=>r8(t,r,n)):r8(i,r,n)}});function r8(t,r,n){return tk(t)?t:r.out._zod.run({value:t.value,issues:t.issues},n)}let r4=eX("$ZodReadonly",(t,r)=>{rn.init(t,r),tb(t._zod,"propValues",()=>r.innerType._zod.propValues),tb(t._zod,"values",()=>r.innerType._zod.values),tb(t._zod,"optin",()=>r.innerType._zod.optin),tb(t._zod,"optout",()=>r.innerType._zod.optout),t._zod.parse=(t,n)=>{let i=r.innerType._zod.run(t,n);return i instanceof Promise?i.then(r6):r6(i)}});function r6(t){return t.value=Object.freeze(t.value),t}let r9=eX("$ZodCustom",(t,r)=>{tP.init(t,r),rn.init(t,r),t._zod.parse=(t,r)=>t,t._zod.check=n=>{let i=n.value,s=r.fn(i);if(s instanceof Promise)return s.then(r=>r7(r,n,i,t));r7(s,n,i,t)}});function r7(t,r,n,i){if(!t){let t={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),r.issues.push(tL(t))}}Symbol("ZodOutput"),Symbol("ZodInput");class ne{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&"object"==typeof r&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}
32let nt=new ne;function nr(t,r){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...tN(r)})}function nn(t){return new t({type:"unknown"})}function ni(t,r){return new tz({check:"less_than",...tN(r),value:t,inclusive:!1})}function ns(t,r){return new tz({check:"less_than",...tN(r),value:t,inclusive:!0})}function no(t,r){return new tU({check:"greater_than",...tN(r),value:t,inclusive:!1})}function na(t,r){return new tU({check:"greater_than",...tN(r),value:t,inclusive:!0})}function nu(t,r){return new t$({check:"multiple_of",...tN(r),value:t})}function nl(t,r){return new tV({check:"max_length",...tN(r),maximum:t})}function nh(t,r){return new tG({check:"min_length",...tN(r),minimum:t})}function nc(t,r){return new tq({check:"length_equals",...tN(r),length:t})}function nd(t){return new tQ({check:"overwrite",tx:t})}function np(t,r,n){return new t({type:"array",element:r,...tN(n)})}let nf=eX("ZodISODateTime",(t,r)=>{ry.init(t,r),nS.init(t,r)}),ng=eX("ZodISODate",(t,r)=>{rv.init(t,r),nS.init(t,r)}),nm=eX("ZodISOTime",(t,r)=>{rb.init(t,r),nS.init(t,r)}),ny=eX("ZodISODuration",(t,r)=>{rx.init(t,r),nS.init(t,r)}),nv=(t,r)=>{t2.init(t,r),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>(function(t,r){let n=r||function(t){return t.message},i={_errors:[]},s=t=>{for(let r of t.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(t=>s({issues:t}));else if("invalid_key"===r.code)s({issues:r.issues});else if("invalid_element"===r.code)s({issues:r.issues});else if(0===r.path.length)i._errors.push(n(r));else{let t=i,s=0;for(;s<r.path.length;){let i=r.path[s];s===r.path.length-1?(t[i]=t[i]||{_errors:[]},t[i]._errors.push(n(r))):t[i]=t[i]||{_errors:[]},t=t[i],s++}}};return s(t),i})(t,r)},flatten:{value:r=>(function(t,r=t=>t.message){let n={},i=[];for(let s of t.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(r(s))):i.push(r(s));return{formErrors:i,fieldErrors:n}})(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get:()=>0===t.issues.length}})};eX("ZodError",nv);let nb=eX("ZodError",nv,{Parent:Error}),nx=t3(nb),n_=t4(nb),nD=t9(nb),nA=re(nb),nC=eX("ZodType",(t,r)=>(rn.init(t,r),t.def=r,Object.defineProperty(t,"_def",{value:r}),t.check=(...n)=>t.clone({...r,checks:[...r.checks??[],...n.map(t=>"function"==typeof t?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),t.clone=(r,n)=>tF(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t),t.parse=(r,n)=>nx(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>nD(t,r,n),t.parseAsync=async(r,n)=>n_(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>nA(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(function(t,r={}){return new im({type:"custom",check:"custom",fn:t,...tN(r)})}(r,n)),t.superRefine=r=>t.check(function(t){let r=function(t){let r=new tP({check:"custom"});return r._zod.check=t,r}(n=>(n.addIssue=t=>{"string"==typeof t?n.issues.push(tL(t,n.value,r._zod.def)):(t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=r),t.continue??(t.continue=!r._zod.def.abort),n.issues.push(tL(t)))},t(n.value,n)));return r}(r)),t.overwrite=r=>t.check(nd(r)),t.optional=()=>is(t),t.nullable=()=>ia(t),t.nullish=()=>is(ia(t)),t.nonoptional=r=>new ih({type:"nonoptional",innerType:t,...tN(r)}),t.array=()=>np(n2,t,void 0),t.or=r=>n8([t,r]),t.and=r=>new n4({type:"intersection",left:t,right:r}),t.transform=r=>ip(t,new ir({type:"transform",transform:r})),t.default=r=>(function(t,r){return new iu({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():r}})})(t,r),t.prefault=r=>(function(t,r){return new il({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():r}})})(t,r),t.catch=r=>(function(t,r){return new ic({type:"catch",innerType:t,catchValue:"function"==typeof r?r:()=>r})})(t,r),t.pipe=r=>ip(t,r),t.readonly=()=>new ig({type:"readonly",innerType:t}),t.describe=r=>{let n=t.clone();return nt.add(n,{description:r}),n},Object.defineProperty(t,"description",{get:()=>nt.get(t)?.description,configurable:!0}),t.meta=(...r)=>{if(0===r.length)return nt.get(t);let n=t.clone();return nt.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),nE=eX("_ZodString",(t,r)=>{ri.init(t,r),nC.init(t,r);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(function(t,r){return new tH({check:"string_format",format:"regex",...tN(r),pattern:t})}(...r)),t.includes=(...r)=>t.check(function(t,r){return new tX({check:"string_format",format:"includes",...tN(r),includes:t})}(...r)),t.startsWith=(...r)=>t.check(function(t,r){return new tJ({check:"string_format",format:"starts_with",...tN(r),prefix:t})}(...r)),t.endsWith=(...r)=>t.check(function(t,r){return new tK({check:"string_format",format:"ends_with",...tN(r),suffix:t})}(...r)),t.min=(...r)=>t.check(nh(...r)),t.max=(...r)=>t.check(nl(...r)),t.length=(...r)=>t.check(nc(...r)),t.nonempty=(...r)=>t.check(nh(1,...r)),t.lowercase=r=>t.check(new tZ({check:"string_format",format:"lowercase",...tN(r)})),t.uppercase=r=>
32t.check(new tY({check:"string_format",format:"uppercase",...tN(r)})),t.trim=()=>t.check(nd(t=>t.trim())),t.normalize=(...r)=>t.check(function(t){return nd(r=>r.normalize(t))}(...r)),t.toLowerCase=()=>t.check(nd(t=>t.toLowerCase())),t.toUpperCase=()=>t.check(nd(t=>t.toUpperCase()))}),nw=eX("ZodString",(t,r)=>{ri.init(t,r),nE.init(t,r),t.email=r=>t.check(new nF({type:"string",format:"email",check:"string_format",abort:!1,...tN(r)})),t.url=r=>t.check(new nk({type:"string",format:"url",check:"string_format",abort:!1,...tN(r)})),t.jwt=r=>t.check(new nW({type:"string",format:"jwt",check:"string_format",abort:!1,...tN(r)})),t.emoji=r=>t.check(new nM({type:"string",format:"emoji",check:"string_format",abort:!1,...tN(r)})),t.guid=r=>t.check(nr(nN,r)),t.uuid=r=>t.check(new nB({type:"string",format:"uuid",check:"string_format",abort:!1,...tN(r)})),t.uuidv4=r=>t.check(new nB({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...tN(r)})),t.uuidv6=r=>t.check(new nB({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...tN(r)})),t.uuidv7=r=>t.check(new nB({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...tN(r)})),t.nanoid=r=>t.check(new nT({type:"string",format:"nanoid",check:"string_format",abort:!1,...tN(r)})),t.guid=r=>t.check(nr(nN,r)),t.cuid=r=>t.check(new nI({type:"string",format:"cuid",check:"string_format",abort:!1,...tN(r)})),t.cuid2=r=>t.check(new nO({type:"string",format:"cuid2",check:"string_format",abort:!1,...tN(r)})),t.ulid=r=>t.check(new nL({type:"string",format:"ulid",check:"string_format",abort:!1,...tN(r)})),t.base64=r=>t.check(new nV({type:"string",format:"base64",check:"string_format",abort:!1,...tN(r)})),t.base64url=r=>t.check(new nG({type:"string",format:"base64url",check:"string_format",abort:!1,...tN(r)})),t.xid=r=>t.check(new nP({type:"string",format:"xid",check:"string_format",abort:!1,...tN(r)})),t.ksuid=r=>t.check(new nR({type:"string",format:"ksuid",check:"string_format",abort:!1,...tN(r)})),t.ipv4=r=>t.check(new nz({type:"string",format:"ipv4",check:"string_format",abort:!1,...tN(r)})),t.ipv6=r=>t.check(new nU({type:"string",format:"ipv6",check:"string_format",abort:!1,...tN(r)})),t.cidrv4=r=>t.check(new n$({type:"string",format:"cidrv4",check:"string_format",abort:!1,...tN(r)})),t.cidrv6=r=>t.check(new nj({type:"string",format:"cidrv6",check:"string_format",abort:!1,...tN(r)})),t.e164=r=>t.check(new nq({type:"string",format:"e164",check:"string_format",abort:!1,...tN(r)})),t.datetime=r=>t.check(new nf({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...tN(r)})),t.date=r=>t.check(new ng({type:"string",format:"date",check:"string_format",...tN(r)})),t.time=r=>t.check(new nm({type:"string",format:"time",check:"string_format",precision:null,...tN(r)})),t.duration=r=>t.check(new ny({type:"string",format:"duration",check:"string_format",...tN(r)}))}),nS=eX("ZodStringFormat",(t,r)=>{rs.init(t,r),nE.init(t,r)}),nF=eX("ZodEmail",(t,r)=>{ru.init(t,r),nS.init(t,r)}),nN=eX("ZodGUID",(t,r)=>{ro.init(t,r),nS.init(t,r)}),nB=eX("ZodUUID",(t,r)=>{ra.init(t,r),nS.init(t,r)}),nk=eX("ZodURL",(t,r)=>{rl.init(t,r),nS.init(t,r)}),nM=eX("ZodEmoji",(t,r)=>{rh.init(t,r),nS.init(t,r)}),nT=eX("ZodNanoID",(t,r)=>{rc.init(t,r),nS.init(t,r)}),nI=eX("ZodCUID",(t,r)=>{rd.init(t,r),nS.init(t,r)}),nO=eX("ZodCUID2",(t,r)=>{rp.init(t,r),nS.init(t,r)}),nL=eX("ZodULID",(t,r)=>{rf.init(t,r),nS.init(t,r)}),nP=eX("ZodXID",(t,r)=>{rg.init(t,r),nS.init(t,r)}),nR=eX("ZodKSUID",(t,r)=>{rm.init(t,r),nS.init(t,r)}),nz=eX("ZodIPv4",(t,r)=>{r_.init(t,r),nS.init(t,r)}),nU=eX("ZodIPv6",(t,r)=>{rD.init(t,r),nS.init(t,r)}),n$=eX("ZodCIDRv4",(t,r)=>{rA.init(t,r),nS.init(t,r)}),nj=eX("ZodCIDRv6",(t,r)=>{rC.init(t,r),nS.init(t,r)}),nV=eX("ZodBase64",(t,r)=>{rw.init(t,r),nS.init(t,r)}),nG=eX("ZodBase64URL",(t,r)=>{rS.init(t,r),nS.init(t,r)}),nq=eX("ZodE164",(t,r)=>{rF.init(t,r),nS.init(t,r)}),nW=eX("ZodJWT",(t,r)=>{rN.init(t,r),nS.init(t,r)}),nH=eX("ZodNumber",(t,r)=>{rB.init(t,r),nC.init(t,r),t.gt=(r,n)=>t.check(no(r,n)),t.gte=(r,n)=>t.check(na(r,n)),t.min=(r,n)=>t.check(na(r,n)),t.lt=(r,n)=>t.check(ni(r,n)),t.lte=(r,n)=>t.check(ns(r,n)),t.max=(r,n)=>t.check(ns(r,n)),t.int=r=>t.check(nX(r)),t.safe=r=>t.check(nX(r)),t.positive=r=>t.check(no(0,r)),t.nonnegative=r=>t.check(na(0,r)),t.negative=r=>t.check(ni(0,r)),t.nonpositive=r=>t.check(ns(0,r)),t.multipleOf=(r,n)=>t.check(nu(r,n)),t.step=(r,n)=>t.check(nu(r,n)),t.finite=()=>t;let n=t._zod.bag;t.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,t.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function nZ(t){return new nH({type:"number",checks:[],...tN(t)})}let nY=eX("ZodNumberFormat",(t,r)=>{rk.init(t,r),nH.init(t,r)});function nX(t){return new nY({type:"number",check:"number_format",abort:!1,format:"safeint",...tN(t)})}let nJ=eX("ZodBoolean",(t,r)=>{rM.init(t,r),nC.init(t,r)}),nK=eX("ZodAny",(t,r)=>{rT.init(t,r),nC.init(t,r)});function nQ(){return new nK({type:"any"})}let n0=eX("ZodUnknown",(t,r)=>{rI.init(t,r),nC.init(t,r)}),n1=eX("ZodNever",(t,r)=>{rO.init(t,r),nC.init(t,r)}),n2=eX("ZodArray",(t,r)=>{rP.init(t,r),nC.init(t,r),t.element=r.element,t.min=(r,n)=>t.check(nh(r,n)),t.nonempty=r=>t.check(nh(1,r)),t.max=(r,n)=>t.check(nl(r,n)),t.length=(r,n)=>t.check(nc(r,n)),t.unwrap=()=>t.element}),n5=eX("ZodObject",(t,r)=>{rU.init(t,r),nC.init(t,r),tb(t,"shape",()=>r.shape),t.keyof=()=>(function(t,r){return new n7({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(t=>[t,t])):t,...tN(void 0)})})(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:nn(n0)}),t.loose=()=>t.clone({...t._zod.def,catchall:nn(n0)}),t.strict=()=>t.clone({...t._zod.def,catchall:new n1({type:"never",...tN(void 0)})}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>(function(t,r){if(!tE(r))throw Error("Invalid input to extend: expected a plain object");let n={...t._zod.def,get shape(){let n={...t._zod.def.shape,...r};return tx(this,"shape",n),n},checks:[]};return tF(t,n)})(t,r),t.merge=r=>(function(t,r){return tF(t,{...t._zod.def,get shape(){let n={...t._zod.def.shape,...r._zod.def.shape};return tx(this,"shape",n),n},catchall:r._zod.def.catchall,checks:[]})})(t,r),t.pick=r=>(function(t,r){let n={},i=t._zod.def;for(let t in r){if(!(t in i.shape))throw Error(`Unrecognized key: "${t}"`);r[t]&&(n[t]=i.shape[t])}return tF(t,{...t._zod.def,shape:n,checks:[]})})(t,r),t.omit=r=>(function(t,r){let n={...t._zod.def.shape},i=t._zod.def;for(let t in r){if(!(t in i.shape))throw Error(`Unrecognized key: "${t}"`);r[t]&&delete n[t]}return tF(t,{...t._zod.def,shape:n,checks:[]})})(t,r),t.partial=(...r)=>(function(t,r,n){let i=r._zod.def.shape,s={...i};if(n)for(let r in n){if(!(r in i))throw Error(`Unrecognized key: "${r}"`);n[r]&&(s[r]=t?new t({type:"optional",innerType:i[r]}):i[r])}else for(let r in i)s[r]=t?new t({type:"optional",innerType:i[r]}):i[r];return tF(r,{...r._zod.def,shape:s,checks:[]})})(ii,t,r[0]),t.required=(...r)=>(function(t,r,n){let i=r._zod.def.shape,s={...i};if(n)for(let r in n){if(!(r in s))throw Error(`Unrecognized key: "${r}"`);n[r]&&(s[r]=new t({type:"nonoptional",innerType:i[r]}))}else for(let r in i)s[r]=new t({type:"nonoptional",innerType:i[r]});return tF(r,{...r._zod.def,shape:s,checks:[]})})(ih,t,r[0])}),n3=eX("ZodUnion",(t,r)=>{rj.init(t,r),nC.init(t,r),t.options=r.options});function n8(t,r){return new n3({type:"union",options:t,...tN(r)})}let n4=eX("ZodIntersection",(t,r)=>{rV.init(t,r),nC.init(t,r)}),n6=eX("ZodTuple",(t,r)=>{rq.init(t,r),nC.init(t,r),t.rest=r=>t.clone({...t._zod.def,rest:r})});function n9(t,r,n){let i=r instanceof rn,s=i?n:r;return new n6({type:"tuple",items:t,rest:i?r:null,...tN(s)})}let n7=eX("ZodEnum",(t,r)=>{rH.init(t,r),nC.init(t,r),t.enum=r.entries,t.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));t.extract=(t,i)=>{let s={};for(let i of t)if(n.has(i))s[i]=r.entries[i];else throw Error(`Key ${i} not found in enum`);return new n7({...r,checks:[],...tN(i),entries:s})},t.exclude=(t,i)=>{let s={...r.entries};for(let r of t)if(n.has(r))delete s[r];else throw Error(`Key ${r} not found in enum`);return new n7({...r,checks:[],...tN(i),entries:s})}}),ie=eX("ZodLiteral",(t,r)=>{rZ.init(t,r),nC.init(t,r),t.values=new Set(r.values),Object.defineProperty(t,"value",{get(){if
32(r.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function it(t,r){return new ie({type:"literal",values:Array.isArray(t)?t:[t],...tN(r)})}let ir=eX("ZodTransform",(t,r)=>{rY.init(t,r),nC.init(t,r),t._zod.parse=(n,i)=>{n.addIssue=i=>{"string"==typeof i?n.issues.push(tL(i,n.value,r)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!0),n.issues.push(tL(i)))};let s=r.transform(n.value,n);return s instanceof Promise?s.then(t=>(n.value=t,n)):(n.value=s,n)}}),ii=eX("ZodOptional",(t,r)=>{rX.init(t,r),nC.init(t,r),t.unwrap=()=>t._zod.def.innerType});function is(t){return new ii({type:"optional",innerType:t})}let io=eX("ZodNullable",(t,r)=>{rJ.init(t,r),nC.init(t,r),t.unwrap=()=>t._zod.def.innerType});function ia(t){return new io({type:"nullable",innerType:t})}let iu=eX("ZodDefault",(t,r)=>{rK.init(t,r),nC.init(t,r),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap}),il=eX("ZodPrefault",(t,r)=>{r0.init(t,r),nC.init(t,r),t.unwrap=()=>t._zod.def.innerType}),ih=eX("ZodNonOptional",(t,r)=>{r1.init(t,r),nC.init(t,r),t.unwrap=()=>t._zod.def.innerType}),ic=eX("ZodCatch",(t,r)=>{r5.init(t,r),nC.init(t,r),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap}),id=eX("ZodPipe",(t,r)=>{r3.init(t,r),nC.init(t,r),t.in=r.in,t.out=r.out});function ip(t,r){return new id({type:"pipe",in:t,out:r})}let ig=eX("ZodReadonly",(t,r)=>{r4.init(t,r),nC.init(t,r)}),im=eX("ZodCustom",(t,r)=>{r9.init(t,r),nC.init(t,r)});function iy(t,r){let n=tN(r);return n.abort??(n.abort=!0),new im({type:"custom",check:"custom",fn:t??(()=>!0),...n})}function iv(t,r={error:`Input not instance of ${t.name}`}){let n=new im({type:"custom",check:"custom",fn:r=>r instanceof t,abort:!0,...tN(r)});return n._zod.bag.Class=t,n}class ib{constructor(t){this._def=t,this.def=t}implement(t){if("function"!=typeof t)throw Error("implement() must be called with a function");let r=(...n)=>{let i=this._def.input?t8(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let s=t(...i);return this._def.output?t8(this._def.output,s,void 0,{callee:r}):s};return r}implementAsync(t){if("function"!=typeof t)throw Error("implement() must be called with a function");let r=async(...n)=>{let i=this._def.input?await t6(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let s=await t(...i);return this._def.output?t6(this._def.output,s,void 0,{callee:r}):s};return r}input(...t){let r=this.constructor;return new r(Array.isArray(t[0])?{type:"function",input:new rq({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}:{type:"function",input:t[0],output:this._def.output})}output(t){return new this.constructor({type:"function",input:this._def.input,output:t})}}function ix(t){return new ib({type:"function",input:Array.isArray(t?.input)?function(t,r,n,i){let s=void 0;return new t({type:"tuple",items:r,rest:null,...tN(s)})}(rq,t?.input):t?.input??np(rP,nn(rI)),output:t?.output??nn(rI)})}var i_={p5:{describe:{overloads:[["String","FALLBACK|LABEL?"]]},describeElement:{overloads:[["String","String","FALLBACK|LABEL?"]]},textOutput:{overloads:[["FALLBACK|LABEL?"]]},gridOutput:{overloads:[["FALLBACK|LABEL?"]]},p5:{overloads:[["Object","String|HTMLElement"]]},color:{overloads:[["Number","Number?"],["Number","Number","Number","Number?"],["String"],["Number[]"],["p5.Color"]]},red:{overloads:[["p5.Color|Number[]|String"]]},green:{overloads:[["p5.Color|Number[]|String"]]},blue:{overloads:[["p5.Color|Number[]|String"]]},alpha:{overloads:[["p5.Color|Number[]|String"]]},hue:{overloads:[["p5.Color|Number[]|String"]]},saturation:{overloads:[["p5.Color|Number[]|String"]]},brightness:{overloads:[["p5.Color|Number[]|String"]]},lightness:{overloads:[["p5.Color|Number[]|String"]]},lerpColor:{overloads:[["p5.Color","p5.Color","Number"]]},paletteLerp:{overloads:[["[p5.Color|String|Number|Number[], Number][]","Number"]]},beginClip:{overloads:[["Object?"]]},endClip:{overloads:[[]]},clip:{overloads:[["Function","Object?"]]},background:{overloads:[["p5.Color"],["String","Number?"],["Number","Number?"],["Number","Number","Number","Number?"],["Number[]"],["p5.Image","Number?"]]},clear:{overloads:[["Number?","Number?","Number?","Number?"],[]]},colorMode:{overloads:[["RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH","Number?"],["RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH","Number","Number","Number","Number?"]]},fill:{overloads:[["Number","Number","Number","Number?"],["String"],["Number","Number?"],["Number[]"],["p5.Color"]]},noFill:{overloads:[[]]},noStroke:{overloads:[[]]},stroke:{overloads:[["Number","Number","Number","Number?"],["String"],["Number","Number?"],["Number[]"],["p5.Color"]]}
vendor: 19,319 bytes, line 32
32,erase:{overloads:[["Number?","Number?"]]},noErase:{overloads:[[]]},blendMode:{overloads:[["BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|REMOVE|SUBTRACT"]]},print:{overloads:[["Any"],["String|Number|Array"]]},cursor:{overloads:[["ARROW|CROSS|HAND|MOVE|TEXT|WAIT|String","Number?","Number?"]]},frameRate:{overloads:[["Number"],[]]},getTargetFrameRate:{overloads:[[]]},noCursor:{overloads:[[]]},windowResized:{overloads:[["UIEvent?"]]},fullscreen:{overloads:[["Boolean?"]]},pixelDensity:{overloads:[["Number?"],[]]},displayDensity:{overloads:[[]]},getURL:{overloads:[[]]},getURLPath:{overloads:[[]]},getURLParams:{overloads:[[]]},worldToScreen:{overloads:[["Number|p5.Vector","Number","Number?"]]},screenToWorld:{overloads:[["Number|p5.Vector","Number","Number?"]]},setup:{overloads:[[]]},draw:{overloads:[[]]},createCanvas:{overloads:[["Number?","Number?","P2D|WEBGL|P2DHDR?","HTMLCanvasElement?"],["Number?","Number?","HTMLCanvasElement?"]]},resizeCanvas:{overloads:[["Number","Number","Boolean?"]]},noCanvas:{overloads:[[]]},createGraphics:{overloads:[["Number","Number","P2D|WEBGL?","HTMLCanvasElement?"],["Number","Number","HTMLCanvasElement?"]]},createFramebuffer:{overloads:[["Object?"]]},clearDepth:{overloads:[["Number?"]]},noLoop:{overloads:[[]]},loop:{overloads:[[]]},isLooping:{overloads:[[]]},redraw:{overloads:[["Integer?"]]},applyMatrix:{overloads:[["Array"],["Number","Number","Number","Number","Number","Number"],["Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number"]]},resetMatrix:{overloads:[[]]},rotate:{overloads:[["Number","p5.Vector|Number[]?"]]},rotateX:{overloads:[["Number"]]},rotateY:{overloads:[["Number"]]},rotateZ:{overloads:[["Number"]]},scale:{overloads:[["Number|p5.Vector|Number[]","Number?","Number?"],["p5.Vector|Number[]"]]},shearX:{overloads:[["Number"]]},shearY:{overloads:[["Number"]]},translate:{overloads:[["Number","Number","Number?"],["p5.Vector"]]},push:{overloads:[[]]},pop:{overloads:[[]]},storeItem:{overloads:[["String","String|Number|Boolean|Object|Array"]]},getItem:{overloads:[["String"]]},clearStorage:{overloads:[[]]},removeItem:{overloads:[["String"]]},select:{overloads:[["String","String|p5.Element|HTMLElement?"]]},selectAll:{overloads:[["String","String|p5.Element|HTMLElement?"]]},createElement:{overloads:[["String","String?"]]},removeElements:{overloads:[[]]},addElement:{overloads:[[]]},createDiv:{overloads:[["String?"]]},createP:{overloads:[["String?"]]},createSpan:{overloads:[["String?"]]},createImg:{overloads:[["String","String"],["String","String","String?","Function?"]]},createA:{overloads:[["String","String","String?"]]},createSlider:{overloads:[["Number","Number","Number?","Number?"]]},createButton:{overloads:[["String","String?"]]},createCheckbox:{overloads:[["String?","Boolean?"]]},createSelect:{overloads:[["Boolean?"],["Object"]]},createRadio:{overloads:[["Object?"],["String?"],[]]},createColorPicker:{overloads:[["String|p5.Color?"]]},createInput:{overloads:[["String?","String?"],["String?"]]},createFileInput:{overloads:[["Function","Boolean?"]]},setMoveThreshold:{overloads:[["Number"]]},setShakeThreshold:{overloads:[["Number"]]},deviceMoved:{overloads:[[]]},deviceTurned:{overloads:[[]]},deviceShaken:{overloads:[[]]},keyPressed:{overloads:[["KeyboardEvent?"]]},keyReleased:{overloads:[["KeyboardEvent?"]]},keyTyped:{overloads:[["KeyboardEvent?"]]},keyIsDown:{overloads:[["Number|String"]]},mouseMoved:{overloads:[["MouseEvent?"]]},mouseDragged:{overloads:[["MouseEvent?"]]},mousePressed:{overloads:[["MouseEvent?"]]},mouseReleased:{overloads:[["MouseEvent?"]]},mouseClicked:{overloads:[["MouseEvent?"]]},doubleClicked:{overloads:[["MouseEvent?"]]},mouseWheel:{overloads:[["WheelEvent?"]]},requestPointerLock:{overloads:[[]]},exitPointerLock:{overloads:[[]]},createImage:{overloads:[["Integer","Integer"]]},saveCanvas:{overloads:[["p5.Framebuffer|p5.Element|HTMLCanvasElement","String?","String?"],["String?","String?"]]},saveFrames:{overloads:[["String","String","Number","Number","function(Array)?"]]},loadImage:{overloads:[["String|Request","function(p5.Image)?","function(Event)?"]]},saveGif:{overloads:[["String","Number","Object?"]]},image:{overloads:[["p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture|p5.Renderer|p5.Graphics","Number","Number","Number?","Number?"],["p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture","Number","Number","Number","Number","Number","Number","Number?","Number?","CONTAIN|COVER?","LEFT|RIGHT|CENTER?","TOP|BOTTOM|CENTER?"]]},tint:{overloads:[["Number","Number","Number","Number?"],["String"],["Number","Number?"],["Number[]"],["p5.Color"]]},noTint:{overloads:[[]]},imageMode:{overloads:[["CORNER|CORNERS|CENTER"]]},blend:{overloads:[["p5.Image","Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer","BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"],["Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer","BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"]]},copy:{overloads:[["p5.Image|p5.Element","Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer"],["Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer"]]},filter:{overloads:[["THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|BLUR|ERODE|DILATE|BLUR","Number?","Boolean?"],["p5.Shader"]]},get:{overloads:[["Number","Number","Number","Number"],[],["Number","Number"]]},loadPixels:{overloads:[[]]},set:{overloads:[["Number","Number","Number|Number[]|Object"]]},updatePixels:{overloads:[["Number?","Number?","Number?","Number?"],[]]},loadJSON:{overloads:[["String|Request","Function?","Function?"]]},loadStrings:{overloads:[["String|Request","Function?","Function?"]]},loadTable:{overloads:[["String|Request","String?","String?","Function?","Function?"]]},loadXML:{overloads:[["String|Request","Function?","Function?"]]},loadBytes:{overloads:[["String|Request","Function?","Function?"]]},loadBlob:{overloads:[["String|Request","Function?","Function?"]]},httpGet:{overloads:[["String|Request","String?","Function?","Function?"],["String|Request","Function","Function?"]]},httpPost:{overloads:[["String|Request","Object|Boolean?","String?","Function?","Function?"],["String|Request","Object|Boolean","Function?","Function?"],["String|Request","Function?","Function?"]]},httpDo:{overloads:[["String|Request","String?","String?","Object?","Function?","Function?"],["String|Request","Function?","Function?"]]},createWriter:{overloads:[["String","String?"]]},write:{overloads:[["String|Number|Array"]]},close:{overloads:[[]]},save:{overloads:[["Object|String?","String?","Boolean|String?"]]},saveJSON:{overloads:[["Array|Object","String","Boolean?"]]},saveStrings:{overloads:[["String[]","String","String?","Boolean?"]]},saveTable:{overloads:[["p5.Table","String","String?"]]},abs:{overloads:[["Number"]]},ceil:{overloads:[["Number"]]},constrain:{overloads:[["Number","Number","Number"]]},dist:{overloads:[["Number","Number","Number","Number"],["Number","Number","Number","Number","Number","Number"],["p5.Vector"]]},exp:{overloads:[["Number"]]},floor:{overloads:[["Number"]]},lerp:{overloads:[["Number","Number","Number"]]},log:{overloads:[["Number"]]},mag:{overloads:[["Number","Number"]]},map:{overloads:[["Number","Number","Number","Number","Number","Boolean?"]]},max:{overloads:[["Number","Number"],["Number[]"]]},min:{overloads:[["Number","Number"],["Number[]"]]},norm:{overloads:[["Number","Number","Number"]]},pow:{overloads:[["Number","Number"]]},round:{overloads:[["Number","Number?"]]},sq:{overloads:[["Number"]]},sqrt:{overloads:[["Number"]]},fract:{overloads:[["Number"]]},createVector:{overloads:[["...Number[]"]]},noise:{overloads:[["Number","Number?","Number?"]]},noiseDetail:{overloads:[["Number","Number"]]},noiseSeed:{overloads:[["Number"]]},randomSeed:{overloads:[["Number"]]},random:{overloads:[["Number?","Number?"],["Array"]]},randomGaussian:{overloads:[["Number?","Number?"]]},acos:{overloads:[["Number"]]},asin:{overloads:[["Number"]]},atan:{overloads:[["Number"]]},atan2:{overloads:[["Number","Number"]]},cos:{overloads:[["Number"]]},sin:{overloads:[["Number"]]},tan:{overloads:[["Number"]]},degrees:{overloads:[["Number"]]},radians:{overloads:[["Number"]]},angleMode:{overloads:[["RADIANS|DEGREES"],[]]},arc:{overloads:[["Number","Number","Number","Number","Number","Number","CHORD|PIE|OPEN?","Integer?"]]},ellipse:{overloads:[["Number","Number","Number","Number?"],["Number","Number","Number","Number","Integer?"]]},circle:{overloads:[["Number","Number","Number"]]},line:{overloads:[["Number","Number","Number","Number"],["Number","Number","Number","Number","Number","Number"]]},point:{overloads:[["Number","Number","Number?"],["p5.Vector"]]},quad:{overloads:[["Number","Number","Number","Number","Number","Number","Number","Number","Integer?","Integer?"],["Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Integer?","Integer?"]]},rect:{overloads:[["Number","Number","Number","Number?","Number?","Number?","Number?","Number?"],["Number","Number","Number","Number","Integer?","Integer?"]]},square:{overloads:[["Number","Number","Number","Number?","Number?","Number?","Number?"]]},triangle:{overloads:[["Number","Number","Number","Number","Number","Number"]]},ellipseMode:{overloads:[["CENTER|RADIUS|CORNER|CORNERS"]]},noSmooth:{overloads:[[]]},rectMode:{overloads:[["CENTER|RADIUS|CORNER|CORNERS"]]},smooth:{overloads:[[]]},strokeCap:{overloads:[["ROUND|SQUARE|PROJECT"]]},strokeJoin:{overloads:[["MITER|BEVEL|ROUND"]]},strokeWeight:{overloads:[["Number"]]},bezier:{overloads:[["Number","Number","Number","Number","Number","Number","Number","Number"],["Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number"]]},bezierPoint:{overloads:[["Number","Number","Number","Number","Number"]]},bezierTangent:{overloads:[["Number","Number","Number","Number","Number"]]},spline:{overloads:[["Number","Number","Number","Number","Number","Number","Number","Number"],["Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number","Number"]]},splinePoint:{overloads:[["Number","Number","Number","Number","Number"]]},splineTangent:{overloads:[["Number","Number","Number","Number","Number"]]},bezierOrder:{overloads:[["Number"],[]]},splineVertex:{overloads:[["Number","Number"],["Number","Number","Number?"],["Number","Number","Number?","Number?"],["Number","Number","Number","Number?","Number?"]]},splineProperty:{overloads:[["String",null],["String"]]},splineProperties:{overloads:[["Object"],[]]},vertex:{overloads:[["Number","Number"],["Number","Number","Number?","Number?"],["Number","Number","Number","Number?","Number?"]]},beginContour:{overloads:[[]]},endContour:{overloads:[["OPEN|CLOSE?"]]},beginShape:{overloads:[["POINTS|LINES|TRIANGLES|TRIANGLE_FAN|TRIANGLE_STRIP|QUADS|QUAD_STRIP|PATH?"]]},bezierVertex:{overloads:[["Number","Number","Number?","Number?"],["Number","Number","Number","Number?","Number?"]]},endShape:{overloads:[["CLOSE?","Integer?"]]},normal:{overloads:[["p5.Vector"],["Number","Number","Number"]]},vertexProperty:{overloads:[["String","Number|Number[]"]]},loadFont:{overloads:[["String","String?","Object?","Function?","Function?"],["String","Function?","Function?"]]},text:{overloads:[["String|Object|Array|Number|Boolean","Number","Number","Number?","Number?"]]},textAlign:{overloads:[["LEFT|CENTER|RIGHT","TOP|BOTTOM|CENTER|BASELINE?"]]},textAscent:{overloads:[["String?"]]},textDescent:{overloads:[["String?"]]},textLeading:{overloads:[["Number"]]},textFont:{overloads:[["p5.Font|String|Object","Number?"]]},textSize:{overloads:[["Number"],[]]},textStyle:{overloads:[["NORMAL|ITALIC|BOLD|BOLDITALIC"],[]]},textWidth:{overloads:[["String"]]},textWrap:{overloads:[["WORD|CHAR"],[]]},textBounds:{overloads:[["String","Number","Number","Number?","Number?"]]},textDirection:{overloads:[["String"],[]]},textProperty:{overloads:[["String",null],["String"]]},textProperties:{overloads:[["Object"],[]]},fontBounds:{overloads:[["String","Number","Number","Number?","Number?"]]},fontWidth:{overloads:[["String"]]},fontAscent:{overloads:[[]]},fontDescent:{overloads:[[]]},textWeight:{overloads:[["Number"],[]]},float:{overloads:[["String"],["String[]"]]},int:{overloads:[["String|Boolean|Number"],["Array"]]},str:{overloads:[["String|Boolean|Number"]]},boolean:{overloads:[["String|Boolean|Number"],["Array"]]},byte:{overloads:[["String|Boolean|Number"],["Array"]]},char:{overloads:[["String|Number"],["Array"]]},unchar:{overloads:[["String"],["String[]"]]},hex:{overloads:[["Number","Number?"],["Number[]","Number?"]]},unhex:{overloads:[["String"],["String[]"]]},day:{overloads:[[]]},hour:{overloads:[[]]},minute:{overloads:[[]]},millis:{overloads:[[]]},month:{overloads:[[]]},second:{overloads:[[]]},year:{overloads:[[]]},nf:{overloads:[["Number|String","Integer|String?","Integer|String?"],["Number[]","Integer|String?","Integer|String?"]]},nfc:{overloads:[["Number|String","Integer|String?"],["Number[]","Integer|String?"]]},nfp:{overloads:[["Number","Integer?","Integer?"],["Number[]","Integer?","Integer?"]]},nfs:{overloads:[["Number","Integer?","Integer?"],["Array","Integer?","Integer?"]]},splitTokens:{overloads:[["String","String?"]]},shuffle:{overloads:[["Array","Boolean?"]]},strokeMode:{overloads:[["String"]]},buildGeometry:{overloads:[["Function"]]},freeGeometry:{overloads:[["p5.Geometry"]]},plane:{overloads:[["Number?","Number?","Integer?","Integer?"]]},box:{overloads:[["Number?","Number?","Number?","Integer?","Integer?"]]},sphere:{overloads:[["Number?","Integer?","Integer?"]]},cylinder:{overloads:[["Number?","Number?","Integer?","Integer?","Boolean?","Boolean?"]]},cone:{overloads:[["Number?","Number?","Integer?","Integer?","Boolean?"]]},ellipsoid:{overloads:[["Number?","Number?","Number?","Integer?","Integer?"]]},torus:{overloads:[["Number?","Number?","Integer?","Integer?"]]},curveDetail:{overloads:[["Number"]]},orbitControl:{overloads:[["Number?","Number?","Number?","Object?"]]},debugMode:{overloads:[[],["GRID|AXES"],["GRID|AXES","Number?","Number?","Number?","Number?","Number?"],["GRID|AXES","Number?","Number?","Number?","Number?"],["Number?","Number?","Number?","Number?","Number?","Number?","Number?","Number?","Number?"]]},noDebugMode:{overloads:[[]]},ambientLight:{overloads:[["Number","Number","Number","Number?"],["Number","Number?"],["String"],["Number[]"],["p5.Color"]]},specularColor:{overloads:[["Number","Number","Number"],["Number"],["String"],["Number[]"],["p5.Color"]]},directionalLight:{overloads:[["Number","Number","Number","Number","Number","Number"],["Number","Number","Number","p5.Vector"],["p5.Color|Number[]|String","Number","Number","Number"],["p5.Color|Number[]|String","p5.Vector"]]},pointLight:{overloads:[["Number","Number","Number","Number","Number","Number"],["Number","Number","Number","p5.Vector"],["p5.Color|Number[]|String","Number","Number","Number"],["p5.Color|Number[]|String","p5.Vector"]]},imageLight:{overloads:[["p5.image"]]},panorama:{overloads:[["p5.Image"]]},lights:{overloads:[[]]},lightFalloff:{overloads:[["Number","Number","Number"]]},spotLight:{overloads:[["Number","Number","Number","Number","Number","Number","Number","Number","Number","Number?","Number?"],["p5.Color|Number[]|String","p5.Vector","p5.Vector","Number?","Number?"],["Number","Number","Number","p5.Vector","p5.Vector","Number?","Number?"],["p5.Color|Number[]|String","Number","Number","Number","p5.Vector","Number?","Number?"],["p5.Color|Number[]|String","p5.Vector","Number","Number","Number","Number?","Number?"],["Number","Number","Number","Number","Number","Number","p5.Vector","Number?","Number?"],["Number","Number","Number","p5.Vector","Number","Number","Number","Number?","Number?"],["p5.Color|Number[]|String","Number","Number","Number","Number","Number","Number","Number?","Number?"]]},noLights:{overloads:[[]]},loadModel:{overloads:[["String|Request","String?","Boolean","function(p5.Geometry)?","function(Event)?"],["String|Request","String?","function(p5.Geometry)?","function(Event)?"],["String|Request","Object?"]]},model:{overloads:[["p5.Geometry","Number?"]]},createModel:{overloads:[["String","String?","Boolean","function(p5.Geometry)?","function(Event)?"],["String","String?","function(p5.Geometry)?","function(Event)?"],["String","String?","Object?"]]},loadShader:{overloads:[["String|Request","String|Request","Function?","Function?"]]},createShader:{overloads:[["String","String","Object?"]]},loadFilterShader:{overloads:[["String","Function?","Function?"]]},createFilterShader:{overloads:[["String"]]},shader:{overloads:[["p5.Shader"]]},strokeShader:{overloads:[["p5.Shader"]]},imageShader:{overloads:[["p5.Shader"]]},baseMaterialShader:{overloads:[[]]},baseFilterShader:{overloads:[[]]},baseNormalShader:{overloads:[[]]},baseColorShader:{overloads:[[]]},baseStrokeShader:{overloads:[[]]},resetShader:{overloads:[[]]},texture:{overloads:[["p5.Image|p5.MediaElement|p5.Graphics|p5.Texture|p5.Framebuffer|p5.FramebufferTexture"]]},textureMode:{overloads:[["IMAGE|NORMAL"]]},textureWrap:{overloads:[["CLAMP|REPEAT|MIRROR","CLAMP|REPEAT|MIRROR?"]]},normalMaterial:{overloads:[[]]},ambientMaterial:{overloads:[["Number","Number","Number"],["Number"],["p5.Color|Number[]|String"]]},emissiveMaterial:{overloads:[["Number","Number","Number","Number?"],["Number"],["p5.Color|Number[]|String"]]},specularMaterial:{overloads:[["Number","Number?"],["Number","Number","Number","Number?"],["p5.Color|Number[]|String"]]},shininess:{overloads:[["Number"]]},metalness:{overloads:[["Number"]]},camera:{overloads:[["Number?","Number?","Number?","Number?","Number?","Number?","Number?","Number?","Number?"]]},perspective:{overloads:[["Number?","Number?","Number?","Number?"]]},linePerspective:{overloads:[["Boolean"],[]]},ortho:{overloads:[["Number?","Number?","Number?","Number?","Number?","Number?"]]},frustum:{overloads:[["Number?","Number?","Number?","Number?","Number?","Number?"]]},createCamera:{overloads:[[]]},setCamera:{overloads:[["p5.Camera"]]},saveObj:{overloads:[["String?"]]},saveStl:{overloads:[["String?","Object?"]]},setAttributes:{overloads:[["String","Boolean"],["Object"]]},remove:{overloads:[[]]},createVideo:{overloads:[["String|String[]","Function?"]]},createAudio:{overloads:[[],["String|String[]?","Function?"]]},createCapture:{overloads:[["AUDIO|VIDEO|Object?","Object?","Function?"]]}},"p5.Geometry":{flipV:{overloads:[[]]},calculateBoundingBox:{overloads:[[]]},clearColors:{overloads:[[]]},flipU:{overloads:[[]]},computeFaces:{overloads:[[]]},computeNormals:{overloads:[["FLAT|SMOOTH?","Object?"]]},makeEdgesFromFaces:{overloads:[[]]},normalize:{overloads:[[]]},vertexProperty:{overloads:[["String","Number|Number[]","Number?"]]}},"p5.Color":{toString:{overloads:[["String?"]]},setRed:{overloads:[["Number"]]},setGreen:{overloads:[["Number"]]},setBlue:{overloads:[["Number"]]},setAlpha:{overloads:[["Number"]]}},"p5.Graphics":{reset:{overloads:[[]]},remove:{overloads:[[]]},createFramebuffer:{overloads:[["Object?"]]}},"p5.Element":{remove:{overloads:[[]]}
32,parent:{overloads:[["String|p5.Element|Object"],[]]},child:{overloads:[[],["String|p5.Element?"]]},html:{overloads:[[],["String?","Boolean?"]]},id:{overloads:[["String"],[]]},class:{overloads:[["String"],[]]},addClass:{overloads:[["String"]]},removeClass:{overloads:[["String"]]},hasClass:{overloads:[[null]]},toggleClass:{overloads:[[null]]},center:{overloads:[["String?"]]},position:{overloads:[[],["Number?","Number?","String?"]]},show:{overloads:[[]]},hide:{overloads:[[]]},size:{overloads:[[],["Number|AUTO?","Number|AUTO?"]]},style:{overloads:[["String"],["String","String|p5.Color"]]},attribute:{overloads:[[],["String","String"]]},removeAttribute:{overloads:[["String"]]},value:{overloads:[[],["String|Number"]]},mousePressed:{overloads:[["Function|Boolean"]]},doubleClicked:{overloads:[["Function|Boolean"]]},mouseWheel:{overloads:[["Function|Boolean"]]},mouseReleased:{overloads:[["Function|Boolean"]]},mouseClicked:{overloads:[["Function|Boolean"]]},mouseMoved:{overloads:[["Function|Boolean"]]},mouseOver:{overloads:[["Function|Boolean"]]},mouseOut:{overloads:[["Function|Boolean"]]},dragOver:{overloads:[["Function|Boolean"]]},dragLeave:{overloads:[["Function|Boolean"]]},changed:{overloads:[["Function|Boolean"]]},input:{overloads:[["Function|Boolean"]]},drop:{overloads:[["Function","Function?"]]},draggable:{overloads:[["p5.Element?"]]}},"p5.MediaElement":{play:{overloads:[[]]},stop:{overloads:[[]]},pause:{overloads:[[]]},loop:{overloads:[[]]},noLoop:{overloads:[[]]},autoplay:{overloads:[["Boolean?"]]},volume:{overloads:[[],["Number"]]},speed:{overloads:[[],["Number"]]},time:{overloads:[[],["Number"]]},duration:{overloads:[[]]},onended:{overloads:[["Function"]]},connect:{overloads:[["AudioNode|Object"]]},disconnect:{overloads:[[]]},showControls:{overloads:[[]]},hideControls:{overloads:[[]]},addCue:{overloads:[["Number","Function","Object?"]]},removeCue:{overloads:[["Number"]]},clearCues:{overloads:[[]]}},"p5.Image":{pixelDensity:{overloads:[["Number?"]]},loadPixels:{overloads:[[]]},updatePixels:{overloads:[["Integer","Integer","Integer","Integer"]]},get:{overloads:[["Number","Number","Number","Number"],[],["Number","Number"]]},set:{overloads:[["Number","Number","Number|Number[]|Object"]]},resize:{overloads:[["Number","Number"]]},copy:{overloads:[["p5.Image|p5.Element","Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer"],["Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer"]]},mask:{overloads:[["p5.Image"]]},filter:{overloads:[["THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|ERODE|DILATE|BLUR","Number?"]]},blend:{overloads:[["p5.Image","Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer","BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"],["Integer","Integer","Integer","Integer","Integer","Integer","Integer","Integer","BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"]]},save:{overloads:[["String","String?"]]},reset:{overloads:[[]]},getCurrentFrame:{overloads:[[]]},setFrame:{overloads:[["Number"]]},numFrames:{overloads:[[]]},play:{overloads:[[]]},pause:{overloads:[[]]},delay:{overloads:[["Number","Number?"]]}},"p5.Table":{addRow:{overloads:[["p5.TableRow?"]]},removeRow:{overloads:[["Integer"]]},getRow:{overloads:[["Integer"]]},getRows:{overloads:[[]]},findRow:{overloads:[["String","Integer|String"]]},findRows:{overloads:[["String","Integer|String"]]},matchRow:{overloads:[["String|RegExp","String|Integer"]]},matchRows:{overloads:[["String","String|Integer?"]]},getColumn:{overloads:[["String|Number"]]},clearRows:{overloads:[[]]},addColumn:{overloads:[["String?"]]},getColumnCount:{overloads:[[]]},getRowCount:{overloads:[[]]},removeTokens:{overloads:[["String","String|Integer?"]]},trim:{overloads:[["String|Integer?"]]},removeColumn:{overloads:[["String|Integer"]]},set:{overloads:[["Integer","String|Integer","String|Number"]]},setNum:{overloads:[["Integer","String|Integer","Number"]]},setString:{overloads:[["Integer","String|Integer","String"]]},get:{overloads:[["Integer","String|Integer"]]},getNum:{overloads:[["Integer","String|Integer"]]},getString:{overloads:[["Integer","String|Integer"]]},getObject:{overloads:[["String?"]]},getArray:{overloads:[[]]}},"p5.TableRow":{set:{overloads:[["String|Integer","String|Number"]]},setNum:{overloads:[["String|Integer","Number|String"]]},setString:{overloads:[["String|Integer","String|Number|Boolean|Object"]]},get:{overloads:[["String|Integer"]]},getNum:{overloads:[["String|Integer"]]},getString:{overloads:[["String|Integer"]]}},"p5.XML":{getParent:{overloads:[[]]},getName:{overloads:[[]]},setName:{overloads:[["String"]]},hasChildren:{overloads:[[]]},listChildren:{overloads:[[]]},getChildren:{overloads:[["String?"]]},getChild:{overloads:[["String|Integer"]]},addChild:{overloads:[["p5.XML"]]},removeChild:{overloads:[["String|Integer"]]},getAttributeCount:{overloads:[[]]},listAttributes:{overloads:[[]]},hasAttribute:{overloads:[["String"]]},getNum:{overloads:[["String","Number?"]]},getString:{overloads:[["String","Number?"]]},setAttribute:{overloads:[["String","Number|String|Boolean"]]},getContent:{overloads:[["String?"]]},serialize:{overloads:[[]]}},"p5.Vector":{getValue:{overloads:[["Number"]]},setValue:{overloads:[["Number","Number"]]},set:{overloads:[["Number?","Number?","Number?"],["p5.Vector|Number[]"]]},copy:{overloads:[[],["p5.Vector"]]},add:{overloads:[["Number|Array","Number?","Number?"],["p5.Vector|Number[]"],["p5.Vector","p5.Vector","p5.Vector?"]]},rem:{overloads:[["Number","Number","Number"],["p5.Vector|Number[]"],["p5.Vector","p5.Vector"]]},sub:{overloads:[["Number","Number?","Number?"],["p5.Vector|Number[]"],["p5.Vector","p5.Vector","p5.Vector?"]]},mult:{overloads:[["Number","Number","Number?"],["Number[]"],["p5.Vector"],[],["p5.Vector","Number","p5.Vector?"],["p5.Vector","p5.Vector","p5.Vector?"],["p5.Vector","Number[]","p5.Vector?"]]},div:{overloads:[["Number"],["Number","Number","Number?"],["Number[]"],["p5.Vector"],[],["p5.Vector","Number","p5.Vector?"],["p5.Vector","p5.Vector","p5.Vector?"],["p5.Vector","Number[]","p5.Vector?"]]},mag:{overloads:[[],["p5.Vector"]]},magSq:{overloads:[[],["p5.Vector"]]},dot:{overloads:[["Number","Number?","Number?"],["p5.Vector"],[],["p5.Vector","p5.Vector"]]},cross:{overloads:[["p5.Vector"],[],["p5.Vector","p5.Vector"]]},normalize:{overloads:[[],["p5.Vector","p5.Vector?"]]},limit:{overloads:[["Number"],[],["p5.Vector","Number","p5.Vector?"]]},setMag:{overloads:[["Number"],[],["p5.Vector","Number","p5.Vector?"]]},heading:{overloads:[[],["p5.Vector"]]},setHeading:{overloads:[["Number"]]},rotate:{overloads:[["Number"],[],["p5.Vector","Number","p5.Vector?"]]},angleBetween:{overloads:[["p5.Vector"],[],["p5.Vector","p5.Vector"]]},lerp:{overloads:[["Number","Number","Number","Number"],["p5.Vector","Number"],[],["p5.Vector","p5.Vector","Number","p5.Vector?"]]},slerp:{overloads:[["p5.Vector","Number"],[],["p5.Vector","p5.Vector","Number","p5.Vector?"]]},reflect:{overloads:[["p5.Vector"],[],["p5.Vector","p5.Vector","p5.Vector?"]]},array:{overloads:[[],["p5.Vector"]]},equals:{overloads:[["Number?","Number?","Number?"],["p5.Vector|Array"],[],["p5.Vector|Array","p5.Vector|Array"]]},fromAngle:{overloads:[["Number","Number?"]]},fromAngles:{overloads:[["Number","Number","Number?"]]},random2D:{overloads:[[]]},random3D:{overloads:[[]]},dist:{overloads:[[],["p5.Vector","p5.Vector"]]}},"p5.Font":{textToPaths:{overloads:[["String","Number","Number","Number?","Number?","Object?"]]},textToPoints:{overloads:[["String","Number","Number","Object?"]]},textToContours:{overloads:[["String","Number","Number","Object?"]]},textToModel:{overloads:[["String","Number","Number","Number","Number","Object?"]]}},"p5.Camera":{perspective:{overloads:[["Number?","Number?","Number?","Number?"]]},ortho:{overloads:[["Number?","Number?","Number?","Number?","Number?","Number?"]]},frustum:{overloads:[["Number?","Number?","Number?","Number?","Number?","Number?"]]},pan:{overloads:[["Number"]]},tilt:{overloads:[["Number"]]},lookAt:{overloads:[["Number","Number","Number"]]},camera:{overloads:[["Number?","Number?","Number?","Number?","Number?","Number?","Number?","Number?","Number?"]]},move:{overloads:[["Number","Number","Number"]]},setPosition:{overloads:[["Number","Number","Number"]]},set:{overloads:[["p5.Camera"]]},slerp:{overloads:[["p5.Camera","p5.Camera","Number"]]}},"p5.Framebuffer":{resize:{overloads:[["Number","Number"]]},pixelDensity:{overloads:[["Number?"]]},autoSized:{overloads:[["Boolean?"]]},createCamera:{overloads:[[]]},remove:{overloads:[[]]},begin:{overloads:[[]]},end:{overloads:[[]]},draw:{overloads:[["Function"]]},get:{overloads:[["Number","Number","Number","Number"],[],["Number","Number"]]}},"p5.Shader":{version:{overloads:[[]]},inspectHooks:{overloads:[[]]},modify:{overloads:[["Object?"]]},copyToContext:{overloads:[["p5|p5.Graphics"]]},setUniform:{overloads:[["String","Boolean|Number|Number[]|p5.Image|p5.Graphics|p5.MediaElement|p5.Texture"]]}}};function iD(t,r,n){var i;let s=new Map,a=Object.keys(t).reduce((r,n)=>(n.match(/^[A-Z]/)&&!n.match(/^[A-Z][A-Z0-9]*$/)&&t[n]instanceof Function&&(r[n]=t[n]),r),{}),u={};for(let[t,r]of Object.entries(o.v))u[t]=r;let l={Any:nQ(),Array:np(n2,nQ(),void 0),Boolean:new nJ({type:"boolean",...tN(void 0)}),Function:ix(),Integer:nZ().int(),Number:nZ(),Object:(i={},new n5({type:"object",get shape(){return tx(this,"shape",{...i}),this.shape},...tN(void 0)})),String:new nw({type:"string",...tN(void 0)})};Object.assign(l,["AudioNode","HTMLCanvasElement","HTMLElement","KeyboardEvent","MouseEvent","RegExp","TouchEvent","UIEvent","WheelEvent"].reduce((t,r)=>(t[r]=iy(t=>t instanceof globalThis[r],{message:`Expected a ${r}`}),t),{}));let h=["first","second","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth"];function c(t){let r=t.lastIndexOf(".");
32return{funcName:t.slice(r+1),funcClass:t.slice(0,-1!==r?r:0)||"p5"}}function d(t){let r=0;for(let n=0;n<t.length;n++)if("["===t[n])r++;else if("]"===t[n]&&--r<0)return!1;return 0===r}r.generateZodSchemasForFunc=function(t){let{funcName:n,funcClass:i}=c(t),s=i_[i][n];if(!s)return;let o=[];s.hasOwnProperty("overloads")&&(o=s.overloads);let h=t=>{let n;if(!t)return nQ();if(t in u)n=it(u[t]);else if(t.match(/^[A-Z][A-Z0-9]*$/)&&t in r)n=it(r[t]);else if(t.startsWith("function"))n=ix();else if(/^p5\.[a-zA-Z0-9]+$/.exec(t)||"p5"===t)n=iv(a[t.substring(t.indexOf(".")+1)]);else if(l[t])n=l[t];else if(t.startsWith("[")&&t.endsWith("]")&&d(t.slice(1,-1)))n=n9(t.slice(1,-1).split(/, */g).map(t=>h(t)));else if(t.match(/^[A-Z]/)&&t in window)n=iv(window[t]);else if(t.includes("|")&&t.split("|").every(t=>d(t)))n=n8(t.split("|").map(t=>h(t)).filter(t=>void 0!==t));else if(t.endsWith("[]"))n=np(n2,h(t.slice(0,-2)),void 0);else throw Error(`Unsupported type '${t}' in parameter validation. Please report this issue.`);return n},p=o.flatMap(t=>(t=>{if(!t.some(t=>t?.endsWith("?")))return[t];let r=t.filter(t=>null===t||!t.endsWith("?")).length,n=[];for(let i=r;i<=t.length;i++)n.push(t.slice(0,i));return n})(t).map(t=>{let r,n=t.map(t=>(t=>{let r=t?.endsWith("?");t=t?.replace(/\?$/,"");let n=t?.startsWith("...")&&t?.endsWith("[]"),i=h(t=t?.replace(/^\.\.\.(.+)\[\]$/,"$1"));return"function"===i.def.type&&(i=iy(t=>t instanceof Function)),r&&(i=i.optional()),{schema:i,rest:n}})(t)).filter(t=>void 0!==t.schema);n.at(-1)?.rest&&(r=n.pop());let i=n9(n.map(t=>t.schema));return r&&(i=i.rest(r.schema)),i}));return 1===p.length?p[0]:n8(p)},r.findClosestSchema=function(t,r){if(!(t instanceof n3))return t;let n=t.def.options[0],i=1/0;return t.def.options.forEach(t=>{let s=(t=>{let n=1/0;if(!(t instanceof n6))return console.warn("Schema below is not a tuple: "),printZodSchema(t),n;let i=r.length,s=t.def.items,o=s.length,a=s.filter(t=>!t.isOptional()).length;n=i>=a&&i<=o?0:4*Math.abs(i<a?a-i:i-o);for(let t=0;t<Math.min(s.length,r.length);t++){let i=s[t],o=r[t];!i.safeParse(o).success&&n++}return n})(t);s<i&&(n=t,i=s)}),n},r.friendlyParamError=function(r,n,i){let s="\uD83C\uDF38 p5.js says: ",o=!1,a=r.issues[0],u=(t,r,n)=>{let i=n?`at the ${h[n]} parameter`:"",s=t?`, but received ${t}`:"";return`Expected ${r} ${i}${s}`};switch(a.code){case"invalid_union":(t=>{let r,n=new Set;if(t.errors.forEach(s=>{let o=s[0];if(o){if(r||(r=o.message),"invalid_type"===o.code)r=o.message.split(", received ")[1],n.add(o.expected);else if("invalid_value"===o.code)n.add("constant (please refer to documentation for allowed values)"),r=i[t.path[0]];else if("custom"===o.code){let t=o.message.match(/Input not instance of (\w+)/);t&&n.add(t[1]),r=void 0}}}),n.size>0){t.path?.length>0&&i[t.path[0]]instanceof Promise&&(s+="Did you mean to put `await` before a loading function? An unexpected Promise was found. ",o=!0);let a=Array.from(n).join(" or "),l=t.path.join(".");s+=u(r,a,l)}})(a);break;case"too_small":{let t=a.minimum;s+=`Expected at least ${t} argument${t>1?"s":""}, but received fewer`;break}case"invalid_type":s+=u(a.message.split(", received ")[1],a.expected,a.path.join("."));break;case"too_big":{let t=a.maximum;s+=`Expected at most ${t} argument${t>1?"s":""}, but received more`;break}default:console.log("Zod error object",a)}if(s+=` in ${n}().`,"too_big"===a.code||"too_small"===a.code){let t=(t=>{let{funcName:r,funcClass:n}=c(t);return`https://p5js.org/reference/${n}/${r}`})(n);s+=` For more information, see ${t}.`}return o?t._error(this,s):console.log(s),s},r.validate=function(n,i){if(t.disableFriendlyErrors)return;if(Array.isArray(i)||(i=Array.from(i)),Array.isArray(i)&&i.length>0&&i.every(t=>void 0===t))return{success:!1,error:`🌸 p5.js says: All arguments for ${n}() are undefined. There is likely an error in the code.`};let o=s.get(n);if(!o){if(!(o=r.generateZodSchemasForFunc(n)))return;s.set(n,o)}try{return{success:!0,data:o.parse(i)}}catch(s){let t=r.findClosestSchema(o,i).safeParse(i).error;return{success:!1,error:r.friendlyParamError(t,n,i)}}},n.presetup=function(){for(let r of Object.keys(t))"function"==typeof t[r]&&r[0]!==r[0].toLowerCase()&&(a[r]=t[r]);if(!0!==t.disableParameterValidator){let t=["validate"];for(let r in this)if(!t.includes(r)&&!r.startsWith("_")&&"function"==typeof this[r]){let t=this[r];this[r]=function(...n){return this.validate(r,n),t.call(this,...n
32)}}}}}"undefined"!=typeof p5&&iD(p5,p5.prototype);var iA=n(9579);function iC(t,r,n){n(t,r)}function iE(t,r,n){}var iw={};iw.Program=iw.BlockStatement=iw.StaticBlock=function(t,r,n){for(var i=0,s=t.body;i<s.length;i+=1)n(s[i],r,"Statement")},iw.Statement=iC,iw.EmptyStatement=iE,iw.ExpressionStatement=iw.ParenthesizedExpression=iw.ChainExpression=function(t,r,n){return n(t.expression,r,"Expression")},iw.IfStatement=function(t,r,n){n(t.test,r,"Expression"),n(t.consequent,r,"Statement"),t.alternate&&n(t.alternate,r,"Statement")},iw.LabeledStatement=function(t,r,n){return n(t.body,r,"Statement")},iw.BreakStatement=iw.ContinueStatement=iE,iw.WithStatement=function(t,r,n){n(t.object,r,"Expression"),n(t.body,r,"Statement")},iw.SwitchStatement=function(t,r,n){n(t.discriminant,r,"Expression");for(var i=0,s=t.cases;i<s.length;i+=1)n(s[i],r)},iw.SwitchCase=function(t,r,n){t.test&&n(t.test,r,"Expression");for(var i=0,s=t.consequent;i<s.length;i+=1)n(s[i],r,"Statement")},iw.ReturnStatement=iw.YieldExpression=iw.AwaitExpression=function(t,r,n){t.argument&&n(t.argument,r,"Expression")},iw.ThrowStatement=iw.SpreadElement=function(t,r,n){return n(t.argument,r,"Expression")},iw.TryStatement=function(t,r,n){n(t.block,r,"Statement"),t.handler&&n(t.handler,r),t.finalizer&&n(t.finalizer,r,"Statement")},iw.CatchClause=function(t,r,n){t.param&&n(t.param,r,"Pattern"),n(t.body,r,"Statement")},iw.WhileStatement=iw.DoWhileStatement=function(t,r,n){n(t.test,r,"Expression"),n(t.body,r,"Statement")},iw.ForStatement=function(t,r,n){t.init&&n(t.init,r,"ForInit"),t.test&&n(t.test,r,"Expression"),t.update&&n(t.update,r,"Expression"),n(t.body,r,"Statement")},iw.ForInStatement=iw.ForOfStatement=function(t,r,n){n(t.left,r,"ForInit"),n(t.right,r,"Expression"),n(t.body,r,"Statement")},iw.ForInit=function(t,r,n){"VariableDeclaration"===t.type?n(t,r):n(t,r,"Expression")},iw.DebuggerStatement=iE,iw.FunctionDeclaration=function(t,r,n){return n(t,r,"Function")},iw.VariableDeclaration=function(t,r,n){for(var i=0,s=t.declarations;i<s.length;i+=1)n(s[i],r)},iw.VariableDeclarator=function(t,r,n){n(t.id,r,"Pattern"),t.init&&n(t.init,r,"Expression")},iw.Function=function(t,r,n){t.id&&n(t.id,r,"Pattern");for(var i=0,s=t.params;i<s.length;i+=1)n(s[i],r,"Pattern");n(t.body,r,t.expression?"Expression":"Statement")},iw.Pattern=function(t,r,n){"Identifier"===t.type?n(t,r,"VariablePattern"):"MemberExpression"===t.type?n(t,r,"MemberPattern"):n(t,r)},iw.VariablePattern=iE,iw.MemberPattern=iC,iw.RestElement=function(t,r,n){return n(t.argument,r,"Pattern")},iw.ArrayPattern=function(t,r,n){for(var i=0,s=t.elements;i<s.length;i+=1){var o=s[i];o&&n(o,r,"Pattern")}},iw.ObjectPattern=function(t,r,n){for(var i=0,s=t.properties;i<s.length;i+=1){var o=s[i];"Property"===o.type?(o.computed&&n(o.key,r,"Expression"),n(o.value,r,"Pattern")):"RestElement"===o.type&&n(o.argument,r,"Pattern")}},iw.Expression=iC,iw.ThisExpression=iw.Super=iw.MetaProperty=iE,iw.ArrayExpression=function(t,r,n){for(var i=0,s=t.elements;i<s.length;i+=1){var o=s[i];o&&n(o,r,"Expression")}},iw.ObjectExpression=function(t,r,n){for(var i=0,s=t.properties;i<s.length;i+=1)n(s[i],r)},iw.FunctionExpression=iw.ArrowFunctionExpression=iw.FunctionDeclaration,iw.SequenceExpression=function(t,r,n){for(var i=0,s=t.expressions;i<s.length;i+=1)n(s[i],r,"Expression")},iw.TemplateLiteral=function(t,r,n){for(var i=0,s=t.quasis;i<s.length;i+=1)n(s[i],r);for(var o=0,a=t.expressions;o<a.length;o+=1)n(a[o],r,"Expression")},iw.TemplateElement=iE,iw.UnaryExpression=iw.UpdateExpression=function(t,r,n){n(t.argument,r,"Expression")},iw.BinaryExpression=iw.LogicalExpression=function(t,r,n){n(t.left,r,"Expression"),n(t.right,r,"Expression")},iw.AssignmentExpression=iw.AssignmentPattern=function(t,r,n){n(t.left,r,"Pattern"),n(t.right,r,"Expression")},iw.ConditionalExpression=function(t,r,n){n(t.test,r,"Expression"),n(t.consequent,r,"Expression"),n(t.alternate,r,"Expression")},iw.NewExpression=iw.CallExpression=function(t,r,n){if(n(t.callee,r,"Expression"),t.arguments)for(var i=0,s=t.arguments;i<s.length;i+=1)n(s[i],r,"Expression")},iw.MemberExpression=function(t,r,n){n(t.object,r,"Expression"),t.computed&&n(t.property,r,"Expression")},iw.ExportNamedDeclaration=iw.ExportDefaultDeclaration=function(t,r,n){t.declaration&&n(t.declaration,r,"ExportNamedDeclaration"===t.type||t.declaration.id?"Statement":"Expression"),t.source&&n(t.source,r,"Expression")},iw.ExportAllDeclaration=function(t,r,n){t.exported&&n(t.exported,r),n(t.source,r,"Expression")},iw.ImportDeclaration=function(t,r,n){for(var i=0,s=t.specifiers;i<s.length;i+=1)n(s[i],r);n(t.source,r,"Expression")},iw.ImportExpression=function(t,r,n){n(t.source,r,"Expression")},iw.ImportSpecifier=iw.ImportDefaultSpecifier=iw.ImportNamespaceSpecifier=iw.Identifier=iw.PrivateIdentifier=iw.Literal=iE,iw.TaggedTemplateExpression=function(t,r,n){n(t.tag,r,"Expression"),n(t.quasi,r,"Expression")},iw.ClassDeclaration=iw.ClassExpression=function(t,r,n){return n(t,r,"Class")},iw.Class=function(t,r,n){t.id&&n(t.id,r,"Pattern"),t.superClass&&n(t.superClass,r,"Expression"),n(t.body,r)},iw.ClassBody=function(t,r,n){for(var i=0,s=t.body;i<s.length;i+=1)n(s[i],r)},iw.MethodDefinition=iw.PropertyDefinition=iw.Property=function(t,r,n){t.computed&&n(t.key,r,"Expression"),t.value&&n(t.value,r,"Expression")};let iS=["setup","draw","preload","deviceMoved","deviceTurned","deviceShaken","doubleClicked","mousePressed","mouseReleased","mouseMoved","mouseDragged","mouseClicked","mouseWheel","touchStarted","touchMoved","touchEnded","keyPressed","keyReleased","keyTyped","windowResized"],iF={fetchScript:async function(t){if(!t.src)return t.textContent;try{return await fetch(t.src).then(t=>t.text())}catch(t){return console.error("Error fetching script:",t),""}},extractUserDefinedVariablesAndFuncs:function(t){let r={variables:[],functions:[]};try{var n,i,s;
32n=(0,iA.qg)(t,{ecmaVersion:2021,sourceType:"module",locations:!0}),i={VariableDeclarator(t){"Identifier"===t.id.type&&r[t.init&&["ArrowFunctionExpression","FunctionExpression"].includes(t.init.type)?"functions":"variables"].push({name:t.id.name,line:t.loc.start.line+-1})},FunctionDeclaration(t){t.id&&"Identifier"===t.id.type&&r.functions.push({name:t.id.name,line:t.loc.start.line+-1})},ClassDeclaration(t){t.id&&"Identifier"===t.id.type&&r.variables.push({name:t.id.name,line:t.loc.start.line+-1})}},s||(s=iw),function t(r,n,o){var a=o||r.type;s[a](r,n,t),i[a]&&i[a](r,n)}(n,void 0,void 0)}catch(t){console.error("Error parsing code:",t)}return r},checkForConstsAndFuncs:function(t,r){let n=[...t.variables,...t.functions];function i(t,r,n){let i=`https://p5js.org/reference/p5/${r}`;return`${t} "${r}" on line ${n} is being redeclared and conflicts with a p5.js ${t.toLowerCase()}. p5.js reference: ${i}`}for(let{name:t,line:r}of n)if(void 0!==o.v[t])return console.log(i("Constant",t,r)),!0;let s=new Set(Object.getOwnPropertyNames(r.prototype).filter(t=>!t.startsWith("_")&&"constructor"!==t));for(let{name:t,line:r}of n)if(!iS.includes(t)&&s.has(t))return console.log(i("Function",t,r)),!0;return!1},getUserCode:async function(){let t=document.querySelectorAll("script"),r=t[t.length-1];return await iF.fetchScript(r)},runFES:async function(t){let r=await iF.getUserCode(),n=iF.extractUserDefinedVariablesAndFuncs(r);iF.checkForConstsAndFuncs(n,t)}};function iN(t,r,n){n.presetup=async function(){t.disableFriendlyErrors||t.disableSketchChecker||iF.runFES(t)}}function iB(t,r){t._friendlyFileLoadError=function(r,n){let{message:i,method:s}=((t,r)=>{let n=eq("fes.fileLoadError.suggestion",{filePath:r,url:"https://github.com/processing/p5.js/wiki/Local-server"});switch(t){case 0:return{message:eq("fes.fileLoadError.image",{suggestion:n}),method:"loadImage"};case 1:return{message:eq("fes.fileLoadError.xml",{suggestion:n}),method:"loadXML"};case 2:return{message:eq("fes.fileLoadError.table",{suggestion:n}),method:"loadTable"};case 3:return{message:eq("fes.fileLoadError.strings",{suggestion:n}),method:"loadStrings"};case 4:return{message:eq("fes.fileLoadError.font",{suggestion:n}),method:"loadFont"};case 5:return{message:eq("fes.fileLoadError.json",{suggestion:n}),method:"loadJSON"};case 6:return{message:eq("fes.fileLoadError.bytes",{suggestion:n}),method:"loadBytes"};case 7:return{message:eq("fes.fileLoadError.large"),method:"loadX"};case 8:return{message:eq("fes.fileLoadError.gif"),method:"loadImage"}}})(r,n);t._friendlyError(i,s,3)}}function ik(t,r){r.storeItem=function(r,n){"string"!=typeof r&&console.log(`The argument that you passed to storeItem() - ${r} is not a string.`),r.endsWith("p5TypeID")&&console.log(`The argument that you passed to storeItem() - ${r} must not end with 'p5TypeID'.`),void 0===n&&console.log("You cannot store undefined variables using storeItem().");let i=typeof n;switch(i){case"number":case"boolean":n=n.toString();break;case"object":n instanceof t.Color?(i="p5.Color",n=n.toString()):n instanceof t.Vector&&(i="p5.Vector",n=[n.x,n.y,n.z]),n=JSON.stringify(n)}localStorage.setItem(r,n);let s=`${r}p5TypeID`;localStorage.setItem(s,i)},r.getItem=function(t){let r=localStorage.getItem(t),n=localStorage.getItem(`${t}p5TypeID`);if(void 0===n)console.log(`Unable to determine type of item stored under ${t}in local storage. Did you save the item with something other than setItem()?`);else if(null!==r)switch(n){case"number":r=parseFloat(r);break;case"boolean":r="true"===r;break;case"object":r=JSON.parse(r);break;case"p5.Color":r=this.color(JSON.parse(r));break;case"p5.Vector":r=JSON.parse(r),r=this.createVector(...r)}return r},r.clearStorage=function(){Object.keys(localStorage).forEach(t=>{t.endsWith("p5TypeID")&&this.removeItem(t.replace("p5TypeID",""))})},r.removeItem=function(t){"string"!=typeof t&&console.log(`The argument that you passed to removeItem() - ${t} is not a string.`),localStorage.removeItem(t),localStorage.removeItem(`${t}p5TypeID`)}}function iM(t,r){function n(t,r,n){(r._userNode?r._userNode:document.body).appendChild(t);let i=n?new f.z(t,r):new p.H(t,r);return r._elements.push(i),i}r.select=function(t,r){let n=this._getContainer(r).querySelector(t);return n?this._wrapElement(n):null},r.selectAll=function(t,r){let n=[],i=this._getContainer(r).querySelectorAll(t);if(i)for(let t=0;t<i.length;t++){let r=this._wrapElement(i[t]);n.push(r)}return n},r._getContainer=function(t){let r=document;return"string"==typeof t?r=document.querySelector(t)||document:t instanceof p.H?r=t.elt:t instanceof HTMLElement&&(r=t),r},r._wrapElement=function(t){let r=Array.prototype.slice.call(t.children);if("INPUT"===t.tagName&&"checkbox"===t.type){let r=new p.H(t,this);return r.checked=function(...t){return 0===t.length?this.elt.checked:(t[0]?this.elt.checked=!0:this.elt.checked=!1,this)},r}return"VIDEO"===t.tagName||"AUDIO"===t.tagName?new f.z(t,this):"SELECT"===t.tagName?this.createSelect(new p.H(t,this)):r.length>0&&r.every(function(t){return"INPUT"===t.tagName||"LABEL"===t.tagName})&&("DIV"===t.tagName||"SPAN"===t.tagName)?this.createRadio(new p.H(t,this)):new p.H(t,this)},r.createElement=function(t,r){let i=document.createElement(t);return void 0!==r&&(i.innerHTML=r),n(i,this)},r.removeElements=function(t){this._elements.filter(t=>!(t.elt instanceof HTMLCanvasElement)).map(t=>t.remove())},r.createDiv=function(t=""){let r=document.createElement("div");return r.innerHTML=t,n(r,this)},r.createP=function(t=""){let r=document.createElement("p");return r.innerHTML=t,n(r,this)},r.createSpan=function(t=""){let r=document.createElement("span");return r.innerHTML=t,n(r,this)},r.createImg=function(){let t,r=document.createElement("img"),i=arguments;return i.length>1&&"string"==typeof i[1]&&(r.alt=i[1]),i.length>2&&"string"==typeof i[2]&&(r.crossOrigin=i[2]),r.src=i[0],t=n(r,this),r.addEventListener("load",function(){t.width=r.offsetWidth||r.width,t.height=r.offsetHeight||r.height;let n=i[i.length-1];"function"==typeof n&&n(t)}),t},r.createA=function(t,r,i){let s=document.createElement("a");return s.href=t,s.innerHTML=r,i&&(s.target=i),n(s,this)},r.createSlider=function(t,r,i,s){let o=document.createElement("input");return o.type="range",o.min=t,o.max=r,0===s?o.step=1e-18:s&&(o.step=s),"number"==typeof i&&(o.value=i),n(o,this)},r.createButton=function(t,r){let i=document.createElement("button");return i.innerHTML=t,r&&(i.value=r),n(i,this)},r.createCheckbox=function(...t){let r=document.createElement("div"),i=document.createElement("input");i.type="checkbox";let s=document.createElement("label");s.appendChild(i),r.appendChild(s);let o=n(r,this);if(o.checked=function(...t){let r=o.elt.firstElementChild.getElementsByTagName("input")[0];if(r)if(0===t.length)return r.checked;else t[0]?r.checked=!0:r.checked=!1;return o},this.value=function(t){return o.value=t,this},t[0]){o.value(t[0]);let r=document.createElement("span");r.innerHTML=t[0],s.appendChild(r)}return t[1]&&(i.checked=!0),o},r.createSelect=function(...t){let r,i=t[0];if(i instanceof p.H&&i.elt instanceof HTMLSelectElement)r=i,this.elt=i.elt;else if(i instanceof HTMLSelectElement)r=n(i,this),this.elt=i;else{let t=document.createElement("select");i&&"boolean"==typeof i&&t.setAttribute("multiple","true"),r=n(t,this),this.elt=t}return r.option=function(t,r){let n;if(void 0!==t){for(let r=0;r<this.elt.length;r+=1)if(this.elt[r].textContent===t){n=r;break}if(void 0!==n)!1===r?this.elt.remove(n):this.elt[n].value=r;else{let n=document.createElement("option");n.textContent=t,n.value=void 0===r?t:r,this.elt.appendChild(n),this._pInst._elements.push(n)}}},r.selected=function(t){if(void 0!==t){for(let r=0;r<this.elt.length;r+=1)this.elt[r].value.toString()===t.toString()&&(this.elt.selectedIndex=r);return this}if(!this.elt.getAttribute("multiple"))return this.elt.value;{let t=[];for(let r of this.elt.selectedOptions)t.push(r.value);return t}},r.disable=function(t){if("string"==typeof t)for(let r=0;r<this.elt.length;r++)this.elt[r].value.toString()===t&&(this.elt[r].disabled=!0,this.elt[r].selected=!1);else this.elt.disabled=!0;return this},r.enable=function(t){if("string"==typeof t)for(let r=0;r<this.elt.length;r++)this.elt[r].value.toString()===t&&(this.elt[r].disabled=!1,this.elt[r].selected=!1);else{this.elt.disabled=!1;for(let t=0;t<this.elt.length;t++)this.elt[t].disabled=!1,this.elt[t].selected=!1}return this},r};let i=0;r.createRadio=function(...t){let r,s,o,a=t[0];a instanceof p.H&&(a.elt instanceof HTMLDivElement||a.elt instanceof HTMLSpanElement)?(r=a,this.elt=a.elt):a instanceof HTMLDivElement||a instanceof HTMLSpanElement?(r=n(a,this),this.elt=a,s=a,"string"==typeof t[1]&&(o=t[1])):("string"==typeof a&&(o=a),r=n(s=document.createElement("div"),this),this.elt=s),r._name=o||`radioOption_${i++}`;let u=t=>t instanceof HTMLInputElement&&"radio"===t.type,l=t=>t instanceof HTMLLabelElement;return r._getOptionsArray=function(){return Array.from(this.elt.children).filter(t=>u(t)||l(t)&&u(t.firstElementChild)).map(t=>u(t)?t:t.firstElementChild)},r.option=function(t,n){let i,s,o;for(let n of r._getOptionsArray())if(n.value===t){i=n;break}return void 0===i&&((i=document.createElement("input")).setAttribute("type","radio"),i.setAttribute("value",t)),i.setAttribute("name",r._name),l(i.parentElement)?s=i.parentElement:(s=document.createElement("label")).insertAdjacentElement("afterbegin",i),s.lastElementChild instanceof HTMLSpanElement?o=s.lastElementChild:(o=document.createElement("span"),i.insertAdjacentElement("afterend",o)),o.innerHTML=void 0===n?t:n,this.elt.appendChild(s),i},r.remove=function(t){for(let n of r._getOptionsArray())if(n.value===t)return void(l(n.parentElement)?n.parentElement.remove():n.remove())},r.value=function(){let t="";for(let n of r._getOptionsArray())if(n.checked){t=n.value;break}return t},r.selected=function(t){let n=null;if(void 0===t){for(let t of r._getOptionsArray())if(t.checked){n=t;break}}
32else for(let i of(r._getOptionsArray().forEach(t=>{t.checked=!1,t.removeAttribute("checked")}),r._getOptionsArray()))i.value===t&&(i.setAttribute("checked",!0),i.checked=!0,n=i);return n},r.disable=function(t=!0){for(let n of r._getOptionsArray())n.setAttribute("disabled",t)},r},r.createColorPicker=function(r){let i,s=document.createElement("input");s.type="color",r?r instanceof t.Color?s.value=r.toString("#rrggbb"):(this.push(),this.colorMode("rgb"),s.value=this.color(r).toString("#rrggbb"),this.pop()):s.value="#000000";let o=this;return(i=n(s,this)).color=function(){o.push(),r&&r.mode&&o.colorMode(r.mode,...r?.maxes&&r.maxes[r.mode]||[]);let t=o.color(this.elt.value);return o.pop(),t},i},r.createInput=function(t="",r="text"){let i=document.createElement("input");return i.setAttribute("value",t),i.setAttribute("type",r),n(i,this)},r.createFileInput=function(t,r=!1){if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return void console.log("The File APIs are not fully supported in this browser. Cannot create element.");let i=document.createElement("input");return i.setAttribute("type","file"),r&&i.setAttribute("multiple",!0),i.addEventListener("change",function(r){for(let n of r.target.files)y.Z._load(n,t)},!1),n(i,this)}}function iT(t,r){r.deviceOrientation=window.innerWidth/window.innerHeight>1?"landscape":"portrait",r.accelerationX=0,r.accelerationY=0,r.accelerationZ=0,r.pAccelerationX=0,r.pAccelerationY=0,r.pAccelerationZ=0,r._updatePAccelerations=function(){this.pAccelerationX=this.accelerationX,this.pAccelerationY=this.accelerationY,this.pAccelerationZ=this.accelerationZ},r.rotationX=0,r.rotationY=0,r.rotationZ=0,r.pRotationX=0,r.pRotationY=0,r.pRotationZ=0;let n=0,i=0,s=0,o="clockwise",a="clockwise",u="clockwise";r.pRotateDirectionX=void 0,r.pRotateDirectionY=void 0,r.pRotateDirectionZ=void 0,r._updatePRotations=function(){this.pRotationX=this.rotationX,this.pRotationY=this.rotationY,this.pRotationZ=this.rotationZ},r.turnAxis=void 0;let l=.5,h=30;r.setMoveThreshold=function(t){l=t},r.setShakeThreshold=function(t){h=t},r._ondeviceorientation=function(t){this._updatePRotations(),this.rotationX=this._fromDegrees(t.beta),this.rotationY=this._fromDegrees(t.gamma),this.rotationZ=this._fromDegrees(t.alpha),this._handleMotion()},r._ondevicemotion=function(t){this._updatePAccelerations(),this.accelerationX=2*t.acceleration.x,this.accelerationY=2*t.acceleration.y,this.accelerationZ=2*t.acceleration.z,this._handleMotion()},r._handleMotion=function(){90===window.orientation||-90===window.orientation?this.deviceOrientation="landscape":0===window.orientation?this.deviceOrientation="portrait":void 0===window.orientation&&(this.deviceOrientation="undefined");let t=this._isGlobal?window:this;if("function"==typeof t.deviceMoved&&(Math.abs(this.accelerationX-this.pAccelerationX)>l||Math.abs(this.accelerationY-this.pAccelerationY)>l||Math.abs(this.accelerationZ-this.pAccelerationZ)>l)&&t.deviceMoved(),"function"==typeof t.deviceTurned){let r=this._toDegrees(this.rotationX)+180,l=this._toDegrees(this.pRotationX)+180,h=n+180;r-l>0&&r-l<270||r-l<-270?o="clockwise":(r-l<0||r-l>270)&&(o="counter-clockwise"),o!==this.pRotateDirectionX&&(h=r),Math.abs(r-h)>90&&270>Math.abs(r-h)&&(h=r,this.turnAxis="X",t.deviceTurned()),this.pRotateDirectionX=o,n=h-180;let c=this._toDegrees(this.rotationY)+180,d=this._toDegrees(this.pRotationY)+180,p=i+180;c-d>0&&c-d<270||c-d<-270?a="clockwise":(c-d<0||c-this.pRotationY>270)&&(a="counter-clockwise"),a!==this.pRotateDirectionY&&(p=c),Math.abs(c-p)>90&&270>Math.abs(c-p)&&(p=c,this.turnAxis="Y",t.deviceTurned()),this.pRotateDirectionY=a,i=p-180;let f=this._toDegrees(this.rotationZ),g=this._toDegrees(this.pRotationZ);f-g>0&&f-g<270||f-g<-270?u="clockwise":(f-g<0||f-g>270)&&(u="counter-clockwise"),u!==this.pRotateDirectionZ&&(s=f),Math.abs(f-s)>90&&270>Math.abs(f-s)&&(s=f,this.turnAxis="Z",t.deviceTurned()),this.pRotateDirectionZ=u,this.turnAxis=void 0}if("function"==typeof t.deviceShaken){let r,n;null!==this.pAccelerationX&&(r=Math.abs(this.accelerationX-this.pAccelerationX),n=Math.abs(this.accelerationY-this.pAccelerationY)),r+n>h&&t.deviceShaken()}}}function iI(t,r){r.keyIsPressed=!1,r.key="",r.code="",r.keyCode=0,r._onkeydown=function(t){if(this._downKeys[t.code])return;this.keyIsPressed=!0,this.keyCode=t.which,this.key=t.key,this.code=t.code,this._downKeyCodes[t.code]=!0,this._downKeys[t.key]=!0;let r=this._isGlobal?window:this;"function"!=typeof r.keyPressed||t.charCode||!1===r.keyPressed(t)&&t.preventDefault()},r._onkeyup=function(t){let r=this._isGlobal?window:this;if("function"==typeof r.keyReleased&&!1===r.keyReleased(t)&&t.preventDefault(),delete this._downKeyCodes[t.code],delete this._downKeys[t.key],this._areDownKeys()){let t=Object.keys(this._downKeyCodes).pop();
32this.code=t;let r=Object.keys(this._downKeys).pop();this.key=r}else this.keyIsPressed=!1,this.key="",this.code=""},r._onkeypress=function(t){if(t.which===this._lastKeyCodeTyped&&t.repeat)return;this._lastKeyCodeTyped=t.which,this.key=t.key||String.fromCharCode(t.which)||t.which;let r=this._isGlobal?window:this;"function"==typeof r.keyTyped&&!1===r.keyTyped(t)&&t.preventDefault()},r._onblur=function(t){this._downKeys={}},r.keyIsDown=function(t){return!["Alt","Shift","Control","Meta"].includes(t)&&"string"==typeof t&&t.length>1?this._downKeyCodes[t]||this._downKeys[t]||!1:this._downKeys[t]||this._downKeyCodes[t]||!1},r._areDownKeys=function(){for(let t in this._downKeys)if(this._downKeys.hasOwnProperty(t)&&!0===this._downKeys[t])return!0;return!1}}function iO(t,r){r.movedX=0,r.movedY=0,r._hasMouseInteracted=!1,r.mouseX=0,r.mouseY=0,r.pmouseX=0,r.pmouseY=0,r.winMouseX=0,r.winMouseY=0,r.pwinMouseX=0,r.pwinMouseY=0,r.mouseButton={left:!1,right:!1,center:!1},r.touches=[],r._activePointers=new Map,r.mouseIsPressed=!1,r._updatePointerCoords=function(t){if(null!==this._curElement){let r=this._curElement.elt,n=r.scrollWidth/this.width||1,i=r.scrollHeight/this.height||1;if("touch"==t.pointerType){let t=[];for(let s of this._activePointers.values())t.push(function(t,r,n,i){let s=t.getBoundingClientRect();return{x:(i.clientX-s.left)/r,y:(i.clientY-s.top)/n,winX:i.clientX,winY:i.clientY,id:i.pointerId}}(r,n,i,s));this.touches=t}let s=function(t,r,n,i){let s=t.getBoundingClientRect();return{x:(i.clientX-s.left)/r,y:(i.clientY-s.top)/n,winX:i.clientX,winY:i.clientY}}(r,n,i,t);this.movedX=t.movementX||0,this.movedY=t.movementY||0,this.mouseX=s.x,this.mouseY=s.y,this.winMouseX=s.winX,this.winMouseY=s.winY,this._hasMouseInteracted||(this._updateMouseCoords(),this._hasMouseInteracted=!0)}},r._updateMouseCoords=function(){this.pmouseX=this.mouseX,this.pmouseY=this.mouseY,this.pwinMouseX=this.winMouseX,this.pwinMouseY=this.winMouseY,this._pmouseWheelDeltaY=this._mouseWheelDeltaY},r._setMouseButton=function(t){this.mouseButton.left=Array.from(this._activePointers.values()).some(t=>(1&t.buttons)!=0),this.mouseButton.center=Array.from(this._activePointers.values()).some(t=>(4&t.buttons)!=0),this.mouseButton.right=Array.from(this._activePointers.values()).some(t=>(2&t.buttons)!=0)},r._onpointermove=function(t){let r=this._isGlobal?window:this;this._updatePointerCoords(t),this._activePointers.set(t.pointerId,t),this._setMouseButton(t),this.mouseIsPressed||"function"!=typeof r.mouseMoved?this.mouseIsPressed&&"function"==typeof r.mouseDragged&&!1===r.mouseDragged(t)&&t.preventDefault():!1===r.mouseMoved(t)&&t.preventDefault()},r._onpointerdown=function(t){let r=this._isGlobal?window:this;this.mouseIsPressed=!0,this._activePointers.set(t.pointerId,t),this._setMouseButton(t),this._updatePointerCoords(t),"function"==typeof r.mousePressed&&!1===r.mousePressed(t)&&t.preventDefault()},r._onpointerup=function(t){let r=this._isGlobal?window:this;this.mouseIsPressed=!1,this._activePointers.delete(t.pointerId),this._setMouseButton(t),this._updatePointerCoords(t),"function"==typeof r.mouseReleased&&!1===r.mouseReleased(t)&&t.preventDefault()},r._ondragend=r._onpointerup,r._ondragover=r._onpointermove,r._onclick=function(t){let r=this._isGlobal?window:this;"function"==typeof r.mouseClicked&&!1===r.mouseClicked(t)&&t.preventDefault()},r._ondblclick=function(t){let r=this._isGlobal?window:this;"function"==typeof r.doubleClicked&&!1===r.doubleClicked(t)&&t.preventDefault()},r._mouseWheelDeltaY=0,r._pmouseWheelDeltaY=0,r._onwheel=function(t){let r=this._isGlobal?window:this;this._mouseWheelDeltaY=t.deltaY,"function"==typeof r.mouseWheel&&(t.delta=t.deltaY,!1===r.mouseWheel(t)&&t.preventDefault())},r.requestPointerLock=function(){let t=this._curElement.elt;return(t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock,t.requestPointerLock)?(t.requestPointerLock(),!0):(console.log("requestPointerLock is not implemented in this browser"),!1)},r.exitPointerLock=function(){document.exitPointerLock()}}"undefined"!=typeof p5&&iN(p5,p5.prototype),"undefined"!=typeof p5&&iB(p5,p5.prototype),"undefined"!=typeof p5&&ik(p5,p5.prototype),"undefined"!=typeof p5&&iM(p5,p5.prototype),"undefined"!=typeof p5&&iT(p5,p5.prototype),"undefined"!=typeof p5&&iI(p5,p5.prototype),"undefined"!=typeof p5&&iO(p5,p5.prototype);var iL=n(3618);class iP{constructor(t){this.columns=[],this.rows=[]}toString(t=","){let r=this.rows.map(t=>t.arr);return this.columns.some(t=>null===t)||(r=[this.columns,...r]),(0,iL.A)(r,{separator:t})}addRow(t){let r=t||new p5.TableRow;if(void 0===r.arr||void 0===r.obj)throw Error(`invalid TableRow: ${r}`);return r.table=this,this.rows.push(r),r}removeRow(t){this.rows[t].table=null;let r=this.rows.splice(t+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(r)}getRow(t){return this.rows[t]}getRows(){return this.rows}findRow(t,r){if("string"==typeof r){for(let n=0;n<this.rows.length;n++)if(this.rows[n].obj[this.columns.indexOf(r)]===t)return this.rows[n]}else for(let n=0;n<this.rows.length;n++)if(this.rows[n].arr[r]===t)return this.rows[n];return null}findRows(t,r){let n=[];if("string"==typeof r)for(let i=0;i<this.rows.length;i++)this.rows[i].obj[this.columns.indexOf(r)]===t&&n.push(this.rows[i]);else for(let i=0;i<this.rows.length;i++)this.rows[i].arr[r]===t&&n.push(this.rows[i]);return n}matchRow(t,r){if("number"==typeof r){for(let n=0;n<this.rows.length;n++)if(this.rows[n].arr[r].match(t))return this.rows[n]}else for(let n=0;n<this.rows.length;n++)if(this.rows[n].obj[this.columns.indexOf(r)].match(t))return this.rows[n];return null}matchRows(t,r){let n=[];if("number"==typeof r)for(let i=0;i<this.rows.length;i++)this.rows[i].arr[r].match(t)&&n.push(this.rows[i]);else for(let i=0;i<this.rows.length;i++)this.rows[i].obj[this.columns.indexOf(r)].match(t)&&n.push(this.rows[i]);return n}getColumn(t){let r=[];if("string"==typeof t)for(let n=0;n<this.rows.length;n++)r.push(this.rows[n].obj[this.columns.indexOf(t)]);else for(let n=0;n<this.rows.length;n++)r.push(this.rows[n].arr[t]);return r}clearRows(){delete this.rows,this.rows=[]}addColumn(t){this.columns.push(t||null)}getColumnCount(){return this.columns.length}getRowCount(){return this.rows.length}removeTokens(t,r){let n=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),i=[];for(let r=0;r<t.length;r++)i.push(n(t.charAt(r)));let s=RegExp(i.join("|"),"g");if(void 0===r)for(let t=0;t<this.columns.length;t++)for(let r=0;r<this.rows.length;r++){let n=this.rows[r].arr[t];n=n.replace(s,""),this.rows[r].arr[t]=n,this.rows[r].obj[this.columns[t]]=n}else if("string"==typeof r)for(let t=0;t<this.rows.length;t++){let n=this.rows[t].obj[r];n=n.replace(s,""),this.rows[t].obj[r]=n;let i=this.columns.indexOf(r);this.rows[t].arr[i]=n}else for(let t=0;t<this.rows.length;t++){let n=this.rows[t].arr[r];n=n.replace(s,""),this.rows[t].arr[r]=n,this.rows[t].obj[this.columns[r]]=n}}trim(t){let r=RegExp(" ","g");if(void 0===t)for(let t=0;t<this.columns.length;t++)for(let n=0;n<this.rows.length;n++){let i=this.rows[n].arr[t];i=i.replace(r,""),this.rows[n].arr[t]=i,this.rows[n].obj[this.columns[t]]=i}else if("string"==typeof t)for(let n=0;n<this.rows.length;n++){let i=this.rows[n].obj[t];i=i.replace(r,""),this.rows[n].obj[t]=i;let s=this.columns.indexOf(t);this.rows[n].arr[s]=i}else for(let n=0;n<this.rows.length;n++){let i=this.rows[n].arr[t];i=i.replace(r,""),this.rows[n].arr[t]=i,this.rows[n].obj[this.columns[t]]=i}}
32removeColumn(t){let r,n;"string"==typeof t?(r=t,n=this.columns.indexOf(t)):(n=t,r=this.columns[t]);let i=this.columns.splice(n+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(i);for(let t=0;t<this.rows.length;t++){let i=this.rows[t].arr,s=i.splice(n+1,i.length);i.pop(),this.rows[t].arr=i.concat(s),delete this.rows[t].obj[r]}}set(t,r,n){this.rows[t].set(r,n)}setNum(t,r,n){this.rows[t].setNum(r,n)}setString(t,r,n){this.rows[t].setString(r,n)}get(t,r){return"string"==typeof r?this.rows[t].get(this.columns.indexOf(r)):this.rows[t].get(r)}getNum(t,r){return this.rows[t].getNum(r)}getString(t,r){return this.rows[t].getString(r)}getObject(t){let r,n={};for(let i=0;i<this.rows.length;i++)if(r=this.rows[i].obj,"string"==typeof t)if(this.columns.indexOf(t)>=0)n[r[t]]=r;else throw Error(`This table has no column named "${t}"`);else n[i]=this.rows[i].obj;return n}getArray(){let t=[];for(let r=0;r<this.rows.length;r++)t.push(this.rows[r].arr);return t}}function iR(t,r){t.Table=iP}"undefined"!=typeof p5&&iR(p5,p5.prototype);class iz{constructor(t=[]){this.arr=t,this.obj=Object.fromEntries(t.entries()),this.table=null}set(t,r){if("string"==typeof t){let n=this.table.columns.indexOf(t);if(n>=0)this.obj[t]=r,this.arr[n]=r;else throw Error(`This table has no column named "${t}"`)}else if(t<this.table.columns.length){this.arr[t]=r;let n=this.table.columns[t];this.obj[n]=r}else throw Error(`Column #${t} is out of the range of this table`)}setNum(t,r){let n=parseFloat(r);this.set(t,n)}setString(t,r){let n=r.toString();this.set(t,n)}get(t){return"string"==typeof t?this.obj[this.table.columns.indexOf(t)]:this.arr[t]}getNum(t){let r;if("NaN"===(r="string"==typeof t?parseFloat(this.obj[this.table.columns.indexOf(t)]):parseFloat(this.arr[t])).toString())throw`Error: ${this.obj[t]} is NaN (Not a Number)`;return r}getString(t){return"string"==typeof t?this.obj[this.table.columns.indexOf(t)].toString():this.arr[t].toString()}}function iU(t,r){t.TableRow=iz}function i$(t,r){r.abs=Math.abs,r.ceil=Math.ceil,r.constrain=function(t,r,n){return Math.max(Math.min(t,n),r)},r.dist=function(...t){return 4===t.length?Math.hypot(t[2]-t[0],t[3]-t[1]):6===t.length?Math.hypot(t[3]-t[0],t[4]-t[1],t[5]-t[2]):void 0},r.exp=Math.exp,r.floor=Math.floor,r.lerp=function(t,r,n){return n*(r-t)+t},r.log=Math.log,r.mag=function(t,r){return Math.hypot(t,r)},r.map=function(t,r,n,i,s,o){let a=(t-r)/(n-r)*(s-i)+i;return o?i<s?this.constrain(a,i,s):this.constrain(a,s,i):a},r.max=function(...t){let r=t=>{let r=-1/0;for(let n of t)r=Math.max(r,n);return r};return r(t[0]instanceof Array?t[0]:t)},r.min=function(...t){let r=t=>{let r=1/0;for(let n of t)r=Math.min(r,n);return r};return r(t[0]instanceof Array?t[0]:t)},r.norm=function(t,r,n){return this.map(t,r,n,0,1)},r.pow=Math.pow,r.round=function(t,r){if(!r)return Math.round(t);let n=Math.pow(10,r);return Math.round(t*n)/n},r.sq=t=>t*t,r.sqrt=Math.sqrt,r.fract=function(t){let r=0,n=Number(t);if(isNaN(n)||Math.abs(n)===1/0)return n;if(n<0&&(n=-n,r=1),String(n).includes(".")&&!String(n).includes("e")){let t=String(n);return Math.abs(r-(t=Number("0"+t.slice(t.indexOf(".")))))}return n<1?Math.abs(r-n):0}}function ij(t,r){let n,i=4,s=.5,o=t=>.5*(1-Math.cos(t*Math.PI));r.noise=function(t,r=0,a=0){let u,l,h,c,d;if(null==n){n=Array(4096);for(let t=0;t<4096;t++)n[t]=Math.random()}t<0&&(t=-t),r<0&&(r=-r),a<0&&(a=-a);let p=Math.floor(t),f=Math.floor(r),g=Math.floor(a),m=t-p,y=r-f,v=a-g,b=0,x=.5;for(let t=0;t<i;t++){let t=p+(f<<4)+(g<<8);u=o(m),l=o(y),h=n[4095&t],h+=u*(n[t+1&4095]-h),c=n[t+16&4095],c+=u*(n[t+16+1&4095]-c),h+=l*(c-h),t+=256,c=n[4095&t],c+=u*(n[t+1&4095]-c),d=n[t+16&4095],d+=u*(n[t+16+1&4095]-d),c+=l*(d-c),h+=o(v)*(c-h),b+=h*x,x*=s,p<<=1,f<<=1,y*=2,g<<=1,v*=2,(m*=2)>=1&&(p++,m--),y>=1&&(f++,y--),v>=1&&(g++,v--)}return b},r.noiseDetail=function(t,r){t>0&&(i=t),r>0&&(s=r)},r.noiseSeed=function(t){let r,i,s={setSeed(t){i=r=(null==t?0x100000000*Math.random():t)>>>0},getSeed:()=>r,rand:()=>(i=(1664525*i+0x3c6ef35f)%0x100000000)/0x100000000};s.setSeed(t),n=Array(4096);for(let t=0;t<4096;t++)n[t]=s.rand()}}function iV(t,r){let n="_lcg_random_state",i=0;r._lcg=function(t){return this[t]=(1664525*this[t]+0x3c6ef35f)%0x100000000,this[t]/0x100000000},r._lcgSetSeed=function(t,r){this[t]=(null==r?0x100000000*Math.random():r)>>>0},r.randomSeed=function(t){this._lcgSetSeed(n,t),this._gaussian_previous=!1},r.random=function(t,r){let i;if(i=null!=this[n]?this._lcg(n):Math.random(),void 0===t)return i;if(void 0===r)if(t instanceof Array)return t[Math.floor(i*t.length)];else return i*t;if(t>r){let n=t;t=r,r=n}return i*(r-t)+t},r.randomGaussian=function(t,r=1){let n,s,o,a;if(this._gaussian_previous)n=i,this._gaussian_previous=!1;else{do a=(s=this.random(2)-1)*s+(o=this.random(2)-1)*o;while(a>=1);n=s*(a=Math.sqrt(-2*Math.log(a)/a)),i=o*a,this._gaussian_previous=!0}return n*r+(t||0)}}function iG(t,r){r.createVector=function(r,n,i){return this instanceof t?new t.Vector(this._fromRadians.bind(this),this._toRadians.bind(this),...arguments):new t.Vector(r,n,i)},r.createMatrix=function(...r){return new t.Matrix(...r)}}function iq(t,r){r.float=function(t){return t instanceof Array?t.map(parseFloat):parseFloat(t)},r.int=function(t,n=10){if(t===1/0||"Infinity"===t)return 1/0;if(t===-1/0||"-Infinity"===t)return-1/0;if("string"==typeof t)return parseInt(t,n);if("number"==typeof t)return 0|t;if("boolean"==typeof t)return+!!t;else if(t instanceof Array)return t.map(t=>r.int(t,n))},r.str=function(t){return t instanceof Array?t.map(r.str):String(t)},r.boolean=function(t){return"number"==typeof t?0!==t:"string"==typeof t?"true"===t.toLowerCase():"boolean"==typeof t?t:t instanceof Array?t.map(r.boolean):void 0},r.byte=function(t){let n=r.int(t,10);return"number"==typeof n?(n+128)%256-128:n instanceof Array?n.map(r.byte):void 0},r.char=function(t){return"number"!=typeof t||isNaN(t)?t instanceof Array?t.map(r.char):"string"==typeof t?r.char(parseInt(t,10)):void 0:String.fromCharCode(t)},r.unchar=function(t){return"string"==typeof t&&1===t.length?t.charCodeAt(0):t instanceof Array?t.map(r.unchar):void 0},r.hex=function(t,n){if(n=null==n?n=8:n,t instanceof Array)return t.map(t=>r.hex(t,n));
32if(t===1/0||t===-1/0)return(t===1/0?"F":"0").repeat(n);if("number"==typeof t){t<0&&(t=0xffffffff+t+1);let r=Number(t).toString(16).toUpperCase();for(;r.length<n;)r=`0${r}`;return r.length>=n&&(r=r.substring(r.length-n,r.length)),r}},r.unhex=function(t){return t instanceof Array?t.map(r.unhex):parseInt(`0x${t}`,16)}}function iW(t,r){function n(t,r,n){let i=t<0,[s,o]=(t=Math.abs(t)).toString().split(".");if(void 0===n){s=s.padStart(r,"0");let t=o?s+"."+o:s;return i?"-"+t:t}{let a=t.toFixed(n);[s,o]=a.toString().split("."),s=s.padStart(r,"0");let u=void 0===o?s:s+"."+o;return i?"-"+u:u}}function i(t,r){let n=(t=t.toString()).indexOf("."),i=-1!==n?t.substring(n):"",s=-1!==n?t.substring(0,n):t;if(s=s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),0===r)i="";else if(void 0!==r)if(r>i.length){let t=r-(i+=-1===n?".":"").length+1;for(let r=0;r<t;r++)i+="0"}else i=i.substring(0,r+1);return s+i}function s(t){return parseFloat(t)>0?`+${t.toString()}`:t.toString()}function o(t){return parseFloat(t)>=0?` ${t.toString()}`:t.toString()}r.nf=function(t,r,i){return t instanceof Array?t.map(t=>n(t,r,i)):"[object Arguments]"!==Object.prototype.toString.call(t)?n(t,r,i):3===t.length?this.nf(t[0],t[1],t[2]):2===t.length?this.nf(t[0],t[1]):this.nf(t[0])},r.nfc=function(t,r){return t instanceof Array?t.map(t=>i(t,r)):i(t,r)},r.nfp=function(...t){let n=r.nf.apply(this,t);return n instanceof Array?n.map(s):s(n)},r.nfs=function(...t){let n=r.nf.apply(this,t);return n instanceof Array?n.map(o):o(n)},r.splitTokens=function(t,r){let n;if(void 0!==r){let t=r,i=/\]/g.exec(t),s=/\[/g.exec(t);s&&i?(t=t.slice(0,i.index)+t.slice(i.index+1),s=/\[/g.exec(t),t=t.slice(0,s.index)+t.slice(s.index+1),n=RegExp(`[\\[${t}\\]]`,"g")):i?(t=t.slice(0,i.index)+t.slice(i.index+1),n=RegExp(`[${t}\\]]`,"g")):s?(t=t.slice(0,s.index)+t.slice(s.index+1),n=RegExp(`[${t}\\[]`,"g")):n=RegExp(`[${t}]`,"g")}else n=/\s/g;return t.split(n).filter(t=>t)},r.shuffle=function(t,r){let n=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t),i,s,o=(t=r||n?t
32:t.slice()).length;for(;o>1;)i=this.random(0,1)*o|0,s=t[--o],t[o]=t[i],t[i]=s;return t}}function iH(t,r){r.day=function(){return new Date().getDate()},r.hour=function(){return new Date().getHours()},r.minute=function(){return new Date().getMinutes()},r.millis=function(){return -1===this._millisStart?0:window.performance.now()-this._millisStart},r.month=function(){return new Date().getMonth()+1},r.second=function(){return new Date().getSeconds()},r.year=function(){return new Date().getFullYear()}}function iZ(t,r){r.orbitControl=function(t,r,n,i){this._assert3d("orbitControl");let s=this._renderer.states.curCamera;void 0===t&&(t=1),void 0===r&&(r=t),void 0===n&&(n=1),"object"!=typeof i&&(i={}),!0!==this.contextMenuDisabled&&(this.canvas.oncontextmenu=()=>!1,this.contextMenuDisabled=!0),!0!==this.wheelDefaultDisabled&&(this.canvas.onwheel=()=>!1,this.wheelDefaultDisabled=!0);let{disableTouchActions:o=!0}=i;!0!==this.touchActionsDisabled&&o&&(this.canvas.style["touch-action"]="none",this.touchActionsDisabled=!0);let{freeRotation:a=!1}=i,u=[];this.touches.forEach(t=>{this._renderer.prevTouches.forEach(r=>{if(t.id===r.id){let n={x:t.x,y:t.y,px:r.x,py:r.y};u.push(n)}})}),this._renderer.prevTouches=this.touches;let h=0,c=0,d=0,p=0,f=0,g=this.height<this.width?this.height:this.width,m=!1;if(u.length>0){if(m=u[0].x>0&&u[0].x<this.width&&u[0].y>0&&u[0].y<this.height,1===u.length){let n=u[0];c=-t*(n.x-n.px)/g,d=r*(n.y-n.py)/g}else{let t=u[0],r=u[1],i=Math.hypot(t.x-r.x,t.y-r.y);h=-(i-Math.hypot(t.px-r.px,t.py-r.py))*n*4e-4,p=.5*(t.x+r.x)-.5*(t.px+r.px),f=.5*(t.y+r.y)-.5*(t.py+r.py)}this.touches.length>0?m&&(this._renderer.executeRotateAndMove=!0,this._renderer.executeZoom=!0):(this._renderer.executeRotateAndMove=!1,this._renderer.executeZoom=!1)}else m=this.mouseX>0&&this.mouseX<this.width&&this.mouseY>0&&this.mouseY<this.height,0!==this._mouseWheelDeltaY?(h=Math.sign(this._mouseWheelDeltaY)*n*.01,this._mouseWheelDeltaY=0,m&&(this._renderer.executeZoom=!0)):this._renderer.executeZoom=!1,this.mouseIsPressed?(this.mouseButton.left?(c=-t*this.movedX/g,d=r*this.movedY/g):this.mouseButton.right&&(p=this.movedX,f=this.movedY*s.yScale),m&&(this._renderer.executeRotateAndMove=!0)):this._renderer.executeRotateAndMove=!1;if(0!==h&&this._renderer.executeZoom&&(this._renderer.zoomVelocity+=h),Math.abs(this._renderer.zoomVelocity)>.001?(a?s._orbitFree(0,0,this._renderer.zoomVelocity):s._orbit(0,0,this._renderer.zoomVelocity),0!==s.projMatrix.mat4[15]&&(s.projMatrix.mat4[0]*=Math.pow(10,-this._renderer.zoomVelocity),s.projMatrix.mat4[5]*=Math.pow(10,-this._renderer.zoomVelocity),this._renderer.states.setValue("uPMatrix",this._renderer.states.uPMatrix.clone()),this._renderer.states.uPMatrix.mat4[0]=s.projMatrix.mat4[0],this._renderer.states.uPMatrix.mat4[5]=s.projMatrix.mat4[5]),this._renderer.zoomVelocity*=.85):this._renderer.zoomVelocity=0,(0!==c||0!==d)&&this._renderer.executeRotateAndMove&&this._renderer.rotateVelocity.add(.6*c,.6*d),this._renderer.rotateVelocity.magSq()>1e-6?(a?s._orbitFree(-this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0):s._orbit(this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0),this._renderer.rotateVelocity.mult(.85)):this._renderer.rotateVelocity.set(0,0),(0!==p||0!==f)&&this._renderer.executeRotateAndMove){let t=2*p/this.width,r=-(2*f)/this.height;this._renderer.moveVelocity.add(.15*t,.15*r)}if(this._renderer.moveVelocity.magSq()>1e-6){let t,r,n=s._getLocalAxes(),i=s.eyeX-s.centerX,o=s.eyeY-s.centerY,a=s.eyeZ-s.centerZ,u=Math.sqrt(i*i+o*o+a*a),h=new l.M(s.centerX,s.centerY,s.centerZ);h=s.cameraMatrix.multiplyPoint(h),h=this._renderer.states.uPMatrix.multiplyAndNormalizePoint(h),h.x-=this._renderer.moveVelocity.x,h.y-=this._renderer.moveVelocity.y;let c=this._renderer.states.uPMatrix.mat4;0===c[15]?(t=(c[8]+h.x)/c[0]*u,r=(c[9]+h.y)/c[5]*u):(t=(h.x-c[12])/c[0],r=(h.y-c[13])/c[5]),s.setPosition(s.eyeX+t*n.x[0]+r*n.y[0],s.eyeY+t*n.x[1]+r*n.y[1],s.eyeZ+t*n.x[2]+r*n.y[2]),this._renderer.moveVelocity.mult(.85)}else this._renderer.moveVelocity.set(0,0);return this},r.debugMode=function(...r){this._assert3d("debugMode");for(let r=t.lifecycleHooks.postdraw.length-1;r>=0;r--)(t.lifecycleHooks.postdraw[r].toString()===this._grid().toString()||t.lifecycleHooks.postdraw[r].toString()===this._axesIcon().toString())&&t.lifecycleHooks.postdraw.splice(r,1);r[0]===o.G?t.lifecycleHooks.postdraw.push(this._grid(r[1],r[2],r[3],r[4],r[5])):r[0]===o.A?t.lifecycleHooks.postdraw.push(this._axesIcon(r[1],r[2],r[3],r[4])):(t.lifecycleHooks.postdraw.push(this._grid(r[0],r[1],r[2],r[3],r[4])),t.lifecycleHooks.postdraw.push(this._axesIcon(r[5],r[6],r[7],r[8])))},r.noDebugMode=function(){this._assert3d("noDebugMode");for(let r=t.lifecycleHooks.postdraw.length-1;r>=0;r--)(t.lifecycleHooks.postdraw[r].toString()===this._grid().toString()||t.lifecycleHooks.postdraw[r].toString()===this._axesIcon().toString())&&t.lifecycleHooks.postdraw.splice(r,1)},r._grid=function(t,r,n,i,s){void 0===t&&(t=this.width/2),void 0===r&&(r=4>Math.round(t/30)?4:Math.round(t/30)),void 0===n&&(n=0),void 0===i&&(i=0),void 0===s&&(s=0);let o=t/r,a=t/2;return function(){this.push(),this.stroke(255*this._renderer.states.curStrokeColor[0],255*this._renderer.states.curStrokeColor[1],255*this._renderer.states.curStrokeColor[2]),this._renderer.states.setValue("uModelMatrix",this._renderer.states.uModelMatrix.clone()),this._renderer.states.uModelMatrix.reset();for(let t=0;t<=r;t++)this.beginShape(this.LINES),this.vertex(-a+n,i,t*o-a+s),this.vertex(+a+n,i,t*o-a+s),this.endShape();for(let t=0;t<=r;t++)this.beginShape(this.LINES),this.vertex(t*o-a+n,i,-a+s),this.vertex(t*o-a+n,i,+a+s),this.endShape();this.pop()}},r._axesIcon=function(t,r,n,i){return void 0===t&&(t=this.width/20>40?this.width/20:40),void 0===r&&(r=-this.width/4),void 0===n&&(n=r),void 0===i&&(i=r),()=>{this.push(),this._renderer.states.setValue("uModelMatrix",this._renderer.states.uModelMatrix.clone()),this._renderer.states.uModelMatrix.reset(),this.strokeWeight(2),this.stroke(255,0,0),this.beginShape(this.LINES),this.vertex(r,n,i),this.vertex(r+t,n,i),this.endShape(),this.stroke(0,255,0),this.beginShape(this.LINES),this.vertex(r,n,i),this.vertex(r,n+t,i),this.endShape(),this.stroke(0,0,255),this.beginShape(this.LINES),this.vertex(r,n,i),this.vertex(r,n,i+t),this.endShape(),this.pop()}}}async function iY(t){try{return(await fetch(t,{method:"HEAD"})).ok}catch(t){return!1}}function iX(t,r){async function n(t){let r=null,n={},{data:i}=await (0,c.a)(t,"text"),s=i.split("\n");for(let t=0;t<s.length;++t){let i=s[t].trim().split(/\s+/);"newmtl"===i[0]?n[r=i[1]]={}:"Kd"===i[0]?n[r].diffuseColor=[parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])]:"Ka"===i[0]?n[r].ambientColor=[parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])]:"Ks"===i[0]?n[r].specularColor=[parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])]:"map_Kd"===i[0]&&(n[r].texturePath=i[1])}return n}function i(t,r,n={}){let s={v:[],vt:[],vn:[]},o={},a=null,u=!1,h=!1;for(let i=0;i<r.length;++i){let c=r[i].trim().split(/\b\s+/);if(c.length>0){if("usemtl"===c[0])a=c[1];else if("v"===c[0]||"vn"===c[0]){let t=new l.M(parseFloat(c[1]),parseFloat(c[2]),parseFloat(c[3]));s[c[0]].push(t)}else if("vt"===c[0]){let t=[parseFloat(c[1]),1-parseFloat(c[2])];s[c[0]].push(t)}else if("f"===c[0])for(let r=3;r<c.length;++r){let i=[],d=[1,r-1,r];for(let r=0;r<d.length;++r){let p=c[d[r]],f=p.split("/");for(let t=0;t<f.length;t++)f[t]=parseInt(f[t])-1;if(o[p]||(o[p]={}),void 0===o[p][a]){let r=t.vertices.length;if(t.vertices.push(s.v[f[0]].copy()),t.uvs.push(s.vt[f[1]]?s.vt[f[1]].slice():[0,0]),t.vertexNormals.push(s.vn[f[2]]?s.vn[f[2]].copy():new l.M),o[p][a]=r,i.push(r),a&&n[a]&&n[a].diffuseColor){u=!0;let r=n[a].diffuseColor;t.vertexColors.push(r[0]),t.vertexColors.push(r[1]),t.vertexColors.push(r[2]),t.vertexColors.push(1)}else h=!0}else i.push(o[p][a])}i[0]!==i[1]&&i[0]!==i[2]&&i[1]!==i[2]&&t.faces.push(i)}}}if(0===t.vertexNormals.length&&t.computeNormals(),u===h)throw Error("Model coloring is inconsistent. Either all vertices should have colors or none should.");return t}function s(t,r){if(function(t){let r=new DataView(t),n=[115,111,108,105,100];for(let t=0;t<5;t++)if(function(t,r,n){for(let i=0,s=t.length;i<s;i++)if(t[i]!==r.getUint8(n+i,!1))return!1;return!0}(n,r,t))return!1;return!0}(r))!function(t,r){let n,i,s,o=new DataView(r),a=o.getUint32(80,!0),u,h,c,d=!1,p;for(let t=0;t<70;t++)0x434f4c4f===o.getUint32(t,!1)&&82===o.getUint8(t+4)&&61===o.getUint8(t+5)&&(d=!0,p=[],n=o.getUint8(t+6)/255,i=o.getUint8(t+7)/255,s=o.getUint8(t+8)/255
32);for(let r=0;r<a;r++){let a=84+50*r,f=o.getFloat32(a,!0),g=o.getFloat32(a+4,!0),m=o.getFloat32(a+8,!0);if(d){let t=o.getUint16(a+48,!0);(32768&t)==0?(u=(31&t)/31,h=(t>>5&31)/31,c=(t>>10&31)/31):(u=n,h=i,c=s)}let y=new l.M(f,g,m);for(let r=1;r<=3;r++){let n=a+12*r,i=new l.M(o.getFloat32(n,!0),o.getFloat32(n+4,!0),o.getFloat32(n+8,!0));t.vertices.push(i),t.vertexNormals.push(y),d&&p.push(u,h,c)}t.faces.push([3*r,3*r+1,3*r+2]),t.uvs.push([0,0],[0,0],[0,0])}}(t,r);else{let n=new DataView(r);if(!("TextDecoder"in window))return console.warn("Sorry, ASCII STL loading only works in browsers that support TextDecoder (https://caniuse.com/#feat=textencoder)"),t;!function(t,r){let n,i,s="",o=[];for(let a=0;a<r.length;++a){let u=r[a].trim(),h=u.split(" ");for(let t=0;t<h.length;++t)""===h[t]&&h.splice(t,1);if(0!==h.length)switch(s){case"":if("solid"!==h[0]){console.error(u),console.error(`Invalid state "${h[0]}", should be "solid"`);return}s="solid";break;case"solid":if("facet"!==h[0]||"normal"!==h[1]){console.error(u),console.error(`Invalid state "${h[0]}", should be "facet normal"`);return}n=new l.M(parseFloat(h[2]),parseFloat(h[3]),parseFloat(h[4])),t.vertexNormals.push(n,n,n),s="facet normal";break;case"facet normal":if("outer"!==h[0]||"loop"!==h[1]){console.error(u),console.error(`Invalid state "${h[0]}", should be "outer loop"`);return}s="vertex";break;case"vertex":if("vertex"===h[0])i=new l.M(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3])),t.vertices.push(i),t.uvs.push([0,0]),o.push(t.vertices.indexOf(i));else if("endloop"===h[0])t.faces.push(o),o=[],s="endloop";else{console.error(u),console.error(`Invalid state "${h[0]}", should be "vertex" or "endloop"`);return}break;case"endloop":if("endfacet"!==h[0]){console.error(u),console.error(`Invalid state "${h[0]}", should be "endfacet"`);return}s="endfacet";break;case"endfacet":if("endsolid"===h[0]);else if("facet"===h[0]&&"normal"===h[1])n=new l.M(parseFloat(h[2]),parseFloat(h[3]),parseFloat(h[4])),t.vertexNormals.push(n,n,n),s="facet normal";else{console.error(u),console.error(`Invalid state "${h[0]}", should be "endsolid" or "facet normal"`);return}break;default:console.error(`Invalid state "${s}"`)}}}(t,new TextDecoder("utf-8").decode(n).split("\n"))}return t}r.loadModel=async function(r,o,a,u,l){let h=!1,d=!1;"object"==typeof o?(a=o.normalize||!1,u=o.successCallback,l=o.failureCallback,h=(o=o.fileType||o).flipU||!1,d=o.flipV||!1):("function"==typeof arguments[arguments.length-1]&&("function"==typeof arguments[arguments.length-2]?(u=arguments[arguments.length-2],l=arguments[arguments.length-1]):u=arguments[arguments.length-1]),"string"==typeof o?"boolean"!=typeof a&&(a=!1):"boolean"==typeof o?(a=o,o=r.slice(-4)):(o=r.slice(-4),a=!1)),".obj"!==o.toLowerCase()&&".stl"!==o.toLowerCase()&&(o=".obj");let p=new S.V(void 0,void 0,void 0,this._renderer);async function f(t){let i=[];for(let s of t){let t=s.match(/^mtllib (.+)/);if(t){let s="",o=t[1],a=r.split("/");a.length>1?(a.pop(),s=a.join("/")+"/"+o):s=o,i.push(iY(s).then(t=>t?n(s):(console.warn(`MTL file not found or error in parsing; proceeding without materials: ${s}`),{})).catch(t=>(console.warn(`Error loading MTL file: ${s}`,t),{})))}}try{let t=await Promise.all(i);return Object.assign({},...t)}catch(t){return{}}}p.gid=`${r}|${a}`;try{if(o.match(/\.stl$/i)){let{data:t}=await (0,c.a)(r,"arrayBuffer");if(s(p,t),a&&p.normalize(),h&&p.flipU(),d&&p.flipV(),p._makeTriangleEdges(),u)return u(p);return p}if(o.match(/\.obj$/i)){let{data:t}=await (0,c.a)(r,"text"),n=t.split("\n"),s=await f(n);if(i(p,n,s),a&&p.normalize(),h&&p.flipU(),d&&p.flipV(),p._makeTriangleEdges(),u)return u(p);return p}}catch(n){if(t._friendlyFileLoadError(3,r),l)return l(n);throw n}},r.model=function(t,r=1){this._assert3d("model"),this._renderer.model(t,r)};let o=0;r.createModel=function(r,n=" ",a){let u,l,h=!1,c=!1,d=!1;a&&"object"==typeof a?(h=a.normalize||!1,u=a.successCallback,l=a.failureCallback,c=a.flipU||!1,d=a.flipV||!1):"boolean"==typeof a?(h=a,u=arguments[3],l=arguments[4]):(u="function"==typeof arguments[2]?arguments[2]:void 0,l=arguments[3]);let p=new t.Geometry;if(p.gid=`${n}|${h}|${o++}`,n.match(/\.stl$/i))try{let t=new TextEncoder().encode(r).buffer;s(p,t)}catch(r){l?l(r):t._friendlyError("Error during parsing: "+r.message);return}else if(n.match(/\.obj$/i))try{let t=r.split("\n");
32i(p,t)}catch(r){l?l(r):t._friendlyError("Error during parsing: "+r.message);return}else t._friendlyFileLoadError(3,r),l?l():t._friendlyError("Sorry, the file type is invalid. Only OBJ and STL files are supported.");return h&&p.normalize(),c&&p.flipU(),d&&p.flipV(),p._makeTriangleEdges(),"function"==typeof u&&u(p),p}}"undefined"!=typeof p5&&iU(p5,p5.prototype),"undefined"!=typeof p5&&i$(p5,p5.prototype),"undefined"!=typeof p5&&ij(p5,p5.prototype),"undefined"!=typeof p5&&iV(p5,p5.prototype),"undefined"!=typeof p5&&iG(p5,p5.prototype),"undefined"!=typeof p5&&iq(p5,p5.prototype),"undefined"!=typeof p5&&iW(p5,p5.prototype),"undefined"!=typeof p5&&iH(p5,p5.prototype),"undefined"!=typeof p5&&iZ(p5,p5.prototype),"undefined"!=typeof p5&&iX(p5,p5.prototype);let iJ={IDEOGRAPHIC:"ideographic",_CTX_MIDDLE:"middle",_TEXT_BOUNDS:"_textBoundsSingle",_FONT_BOUNDS:"_fontBoundsSingle",HANGING:"hanging",START:"start",END:"end"};function iK(t,r){let n,i,s=/\r?\n/g,o=/,\s+/,a=/^".*"$/,u=/\t/g,l=RegExp("(?:wght|wdth|ital|slnt|opsz)");["text","textAlign","textAscent","textDescent","textLeading","textMode","textFont","textSize","textStyle","textWidth","textWrap","textBounds","textDirection","textProperty","textProperties","fontBounds","fontWidth","fontAscent","fontDescent","textWeight"].forEach(n=>{r[n]=function(...t){if(!(n in d.R.prototype))throw Error(`Renderer2D.prototype.${n} is not defined.`);return this._renderer[n](...t)},t.Graphics.prototype[n]=function(...t){return this._renderer[n](...t)}});let h={textAlign:{default:r.LEFT,type:"Context2d"},textBaseline:{default:r.BASELINE,type:"Context2d"},textFont:{default:{family:"sans-serif"}},textLeading:{default:15},textSize:{default:12},textWrap:{default:r.WORD},fontStretch:{default:r.NORMAL,isShorthand:!0},fontWeight:{default:r.NORMAL,isShorthand:!0},lineHeight:{default:r.NORMAL,isShorthand:!0},fontVariant:{default:r.NORMAL,isShorthand:!0},fontStyle:{default:r.NORMAL,isShorthand:!0},direction:{default:"inherit"}},c=["font","direction","fontKerning","fontStretch","fontVariantCaps","letterSpacing","textAlign","textBaseline","textRendering","wordSpacing"],p=Object.keys(h).filter(t=>h[t].isShorthand),f=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"];if(d.R.prototype.text=function(t,r,n,i,s){let o=this.textDrawingContext().textBaseline;({x:r,y:n,width:i,height:s}=this._handleRectMode(r,n,i,s));let a=this._processLines(t,i,s);(a=this._positionLines(r,n,i,s,a)).forEach(t=>this._renderText(t.text,t.x,t.y)),this.textDrawingContext().textBaseline=o},d.R.prototype.textBounds=function(t,r,n,i,s){return this._computeBounds(iJ._TEXT_BOUNDS,t,r,n,i,s).bounds},d.R.prototype.fontBounds=function(t,r,n,i,s){return this._computeBounds(iJ._FONT_BOUNDS,t,r,n,i,s).bounds},d.R.prototype.textWidth=function(t){return Math.max(...this._processLines(t).map(t=>this._textWidthSingle(t)))},d.R.prototype.fontWidth=function(t){return Math.max(...this._processLines(t).map(t=>this._fontWidthSingle(t)))},d.R.prototype.textAscent=function(t=""){return t.length?this.textDrawingContext().measureText(t).actualBoundingBoxAscent:this.fontAscent()},d.R.prototype.fontAscent=function(){return this.textDrawingContext().measureText("_").fontBoundingBoxAscent},d.R.prototype.textDescent=function(t=""){return t.length?this.textDrawingContext().measureText(t).actualBoundingBoxDescent:this.fontDescent()},d.R.prototype.fontDescent=function(){return this.textDrawingContext().measureText("_").fontBoundingBoxDescent},d.R.prototype.textAlign=function(t,n){return void 0!==t?(this.states.setValue("textAlign",t),void 0!==n&&(n===r.CENTER&&(n=iJ._CTX_MIDDLE),this.states.setValue("textBaseline",n)),this._applyTextProperties()):{horizontal:this.states.textAlign,vertical:this.states.textBaseline}},d.R.prototype._currentTextFont=function(){return this.states.textFont.font||this.states.textFont.family},d.R.prototype.textFont=function(r,n,i){if(0==arguments.length)return this._currentTextFont();let s=r;if(r instanceof t.Font?s=r.face.family:r.data instanceof Uint8Array?(s=r.name.fontFamily,r.name?.fontSubfam
32ily&&(s+="-"+r.name.fontSubfamily)):"string"==typeof r&&void 0===n&&/[.0-9]+(%|em|p[xt])/.test(s)&&({family:s,size:n}=this._directSetFontString(s)),"string"!=typeof s)throw Error("null font in textFont()");return 2==arguments.length&&"object"==typeof n&&(i=n,n=void 0),this.states.setValue("textFont",{font:r,family:s,size:n}),void 0!==n&&this._setTextSize(n),"object"==typeof i&&this.textProperties(i),this._applyTextProperties()},d.R.prototype._directSetFontString=function(t,r=0){r&&console.log('_directSetFontString"'+t+'"');let n=p.reduce((t,r)=>(t[r]=h[r].default,t),{}),i=this._cachedDiv(n);i.style.font=t;let s=getComputedStyle(i);return p.forEach(t=>{this.states[t]=s[t],r&&console.log("  this.states."+t+'="'+s[t]+'"')}),{family:s.fontFamily,size:s.fontSize}},d.R.prototype.textLeading=function(t){return"number"==typeof t?(this.states.setValue("leadingSet",!0),this.states.setValue("textLeading",t),this._applyTextProperties()):this.states.textLeading},d.R.prototype.textWeight=function(r){if("number"==typeof r){this.states.setValue("fontWeight",r),this._applyTextProperties(),t.prototype._isSafari()||this._setCanvasStyleProperty("font-variation-settings",`"wght" ${r}`);return}return this.states.fontWeight},d.R.prototype.textSize=function(t){return void 0!==t?(this._setTextSize(t),this._applyTextProperties()):this.states.textSize},d.R.prototype.textStyle=function(t){return void 0!==t?(this.states.setValue("fontStyle",t),this._applyTextProperties()):this.states.fontStyle},d.R.prototype.textWrap=function(t){return t===r.WORD||t===r.CHAR?(this.states.setValue("textWrap",t),this._pInst):this.states.textWrap},d.R.prototype.textDirection=function(t){return void 0!==t?(this.states.setValue("direction",t),this._applyTextProperties()):this.states.direction},d.R.prototype.textProperty=function(t,r,n){let i=!1,s=n?.debug||!1;if(void 0===r){let r=this.textProperties();if(t in r)return r[t];throw Error('Unknown text option "'+t+'"')}return t in this.states&&this.states[t]!==r?(this.states[t]=r,i=!0,s&&console.log("this.states."+t+'="'+options[t]+'"')):t in this.textDrawingContext()?(this._setContextProperty(t,r,s),i=!0):t in this.textCanvas().style?(this._setCanvasStyleProperty(t,r,s),i=!0):console.warn('Ignoring unknown text option: "'+t+'"\n'),i?this._applyTextProperties():this._pInst},d.R.prototype.textProperties=function(t){if(void 0!==t)return Object.keys(t).forEach(r=>{this.textProperty(r,t[r])}),this._pInst;let r=this.textDrawingContext();return t=c.reduce((t,n)=>(t[n]=r[n],t),{}),Object.keys(h).forEach(n=>{if(h[n]?.type==="Context2d")t[n]=r[n];else if("textFont"===n){let r=this._currentTextFont();"object"==typeof r&&"_pInst"in r&&(r=Object.assign({},r),delete r._pInst),t[n]=r}else t[n]=this.states[n]}),t},d.R.prototype.textMode=function(){},d.R.prototype._currentTextFont=function(){return this.states.textFont.font||this.states.textFont.family},d.R.prototype._computeBounds=function(r,n,i,s,o,a,u){let l=this.textDrawingContext(),h=l.textBaseline,{textLeading:c,textAlign:d}=this.states;({width:o,height:a}=this._rectModeAdjust(i,s,o,a));let p=this._processLines(n,o,a),f=p.map((t,n)=>this[r].bind(this)(t,i,s+n*c));p.length>1&&f.forEach(r=>r.x+=t.Renderer2D.prototype._xAlignOffset.call(this,d,o)),void 0!==a&&t.Renderer2D.prototype._yAlignOffset.call(this,f,a);let g=f[0];return p.length>1&&(g=this._aggregateBounds(f),u?.ignoreRectMode||this._rectModeAlign(g,o||0,a||0)),l.textBaseline=h,{bounds:g,lines:p}},d.R.prototype._rectModeAdjust=function(t,n,i,s){if(void 0!==i)switch(this.states.rectMode){case r.CENTER:break;case r.CORNERS:i-=t,s-=n;break;case r.RADIUS:i*=2,s*=2}return{x:t,y:n,width:i,height:s}},d.R.prototype._setCanvasStyleProperty=function(t,r,n){let i=r.toString();n&&console.log("canvas.style."+t+'="'+i+'"'),"fontVariationSettings"===t&&this._handleFontVariationSettings(i),this.textCanvas().style[t]=i,this.textCanvas().style[t]},d.R.prototype._handleFontVariationSettings=function(t,r=!1){"object"==typeof t&&(t=Object.keys(t).map(r=>r+" "+t[r]).join(", ")),t.split(o).forEach(t=>{t=t.replace(/["']/g,"");let n=l.exec(t);if(n&&n.length){let i=n[0],s=parseFloat(parseFloat(t.replace(i,"").trim()).toFixed(3));switch(i){case"wght":return r&&console.log("setting font-weight="+s),this.states.fontWeight!==s&&this.textWeight(s),s;case"wdth":break;case"ital":r&&console.log("setting font-style="+(s?"italic":"normal"));break;case"slnt":r&&console.log("setting font-style="+(s?"oblique":"normal"));break;case"opsz":r&&console.log("setting font-optical-size="+s)}}})},d.R.prototype._setContextProperty=function(t,r,i=!1){if(this.textDrawingContext()[t]===r)return this._pInst;(n??=[]).push([t,r]),i&&console.log("queued context2d."+t+'="'+r+'"')},d.R.prototype._handleRectMode=function(t,n,i,s){let o=this.states.rectMode;if(void 0!==i)switch(o){case r.RADIUS:i*=2,t-=i/2,void 0!==s&&(s*=2,n-=s/2);break;case r.CENTER:t-=i/2,void 0!==s&&(n-=s/2);break;case r.CORNERS:i-=t,void 0!==s&&(s-=n)}return{x:t,y:n,width:i,height:s}},d.R.prototype._fontSizePx=function(t,{family:r}=this.states.textFont){if(!isNaN(t)&&""!==t.trim())return parseFloat(t);let n=this._cachedDiv({fontSize:t});n.style.fontSize=t,n.style.fontFamily=r;let i=parseFloat(getComputedStyle(n).fontSize);if("number"!=typeof i)throw Error("textSize: invalid font-size");return i},d.R.prototype._cachedDiv=function(t){if(void 0===i){let r=document.createElement("div");r.ariaHidden="true",r.style.display="none",Object.entries(t).forEach(([t,n])=>{r.style[t]=n}),this.textCanvas().appendChild(r),i=r}return i},d.R.prototype._aggregateBounds=function(t){let r=Math.min(...t.map(t=>t.x)),n=Math.min(...t.map(t=>t.y)),i=Math.max(...t.map(t=>t.y+t.h));return{x:r,y:n,w:Math.max(...t.map(t=>t.x+t.w))-r,h:i-n}},d.R.prototype._processLines=function(t,n,i){void 0!==n&&this.textDrawingContext().textBaseline===r.BASELINE&&(this.drawingContext.textBaseline=r.TOP);let s=this._splitOnBreaks(t.toString()),o=s.length>1,a=void 0!==n,u=a&&s.some(t=>this._textWidthSingle(t)>n),{textLeading:l,textWrap:h}=this.states;if((o||u)&&a&&(s=this._lineate(h,s,n)),a&&void 0!==i){if(void 0===l)throw Error("leading is required if height is specified");for(let t=0;t<s.length;t++)if(l*(t+1)>i){s=s.slice(0,t);break}}return s},d.R.prototype._xAlignOffset=function(t,n){switch(t){case r.LEFT:return 0;case r.CENTER:return n/2;case r.RIGHT:return n;case iJ.START:return 0;case iJ.END:throw Error("textBounds: END not yet supported for textAlign");default:return 0}},d.R.prototype._rectModeAlign=function(t,n,i){if(void 0!==n){switch(this.states.rectMode){case r.CENTER:t.x-=(n-t.w)/2,t.y-=(i-t.h)/2;break;case r.CORNERS:t.w+=t.x,t.h+=t.y;break;case r.RADIUS:t.x-=(n-t.w)/2,t.y-=(i-t.h)/2,t.w/=2,t.h/=2}return t}},d.R.prototype._rectModeAlignRevert=function(t,n,i){if(void 0!==n){switch(this.states.rectMode){case r.CENTER:t.x+=(n-t.w)/2,t.y+=(i-t.h)/2;break;case r.CORNERS:t.w-=t.x,t.h-=t.y;break;case r.RADIUS:t.x+=(n-t.w)/2,t.y+=(i-t.h)/2,t.w*=2,t.h*=2}return t}},d.R.prototype._textWidthSingle=function(t){let r=this.textDrawingContext().measureText(t),n=r.actualBoundingBoxLeft;return r.actualBoundingBoxRight+n},d.R.prototype._fontWidthSingle=function(t){return this.textDrawingContext().measureText(t).width},d.R.prototype._textBoundsSingle=function(t,r=0,n=0){let i=this.textDrawingContext().measureText(t),s=i.actualBoundingBoxAscent,o=i.actualBoundingBoxDescent,a=i.actualBoundingBoxLeft;return{x:r-a,y:n-s,w:i.actualBoundingBoxRight+a,h:s+o}},d.R.prototype._fontBoundsSingle=function(t,r=0,n=0){let i=this.textDrawingContext().measureText(t),s=i.fontBoundingBoxAscent,o=i.fontBoundingBoxDescent;return{x:r-=this._xAlignOffset(this.states.textAlign,i.width),y:n-s,w:i.width,h:s+o}},d.R.prototype._setTextSize=function(t){if("string"==typeof t&&(t=this._fontSizePx(t)),"number"==typeof t){if(this.states.textSize!==t)return this.states.setValue("textSize",t),this.states.leadingSet||this.states.setValue("textLeading",1.275*this.states.textSize),!0}else console.warn("textSize: invalid size: "+t);return!1},d.R.prototype._lineate=function(t,n,i=1/0,s={}){let o=s.splitChar??(t===r.WORD?" ":""),a,u,l,h,c=[];for(let t=0;t<n.length;t++){a="",h=n[t].split(o);for(let t=0;t<h.length;t++)u=`${a+h[t]}`+o,l=this._textWidthSingle(u),a.length>0&&l>i?(c.push(a.trim()),a=`${h[t]}`+o):a=u;c.push(a.trim())}return c},d.R.prototype._splitOnBreaks=function(t){return t&&0!==t.length?t.replace(u,"  ").split(s):[""]},d.R.prototype._parseFontFamily=function(t){return t.split(o).map(t=>((t=t.trim()).indexOf(" ")>-1&&!a.test(t)&&(t=`"${t}"`),t)).join(", ")},d.R.prototype._applyFontString=function(){let{textFont:t,textSize:n,lineHeight:i,fontStyle:s,fontWeight:o,fontVariant:a}=this.states,u=this.textDrawingContext(),l=this._parseFontFamily(t.family),h=s!==r.NORMAL?`${s} `:"",c=o!==r.NORMAL?`${o} `:"",d=a!==r.NORMAL?`${a} `:"",p=`${n}px`+(i!==r.NORMAL?`/${i} `:" "),f=`${h}${d}${c}${p}${l}`.trim();return u.font=f,(u.font===f||f===u.font)&&!0},d.R.prototype._applyTextProperties=function(t=!1){this._applyFontString();let r=this.textDrawingContext();r.direction=this.states.direction,r.textAlign=this.states.textAlign,r.textBaseline=this.states.textBaseline;let i=this.states.fontStretch;for(f.includes(i)&&r.fontStretch!==i&&(r.fontStretch=i);n?.length;){let[i,s]=n.shift();t&&console.log('apply context property "'+i+'" = "'+s+'"'),r[i]=s,r[i]!==s&&(console.warn(`Unable to set '${i}' property on context2d. It may not be supported.`),console.log('Expected "'+s+'" but got: "'+r[i]+'"'))}return this._pInst},t.Renderer2D&&(t.Renderer2D.prototype.textCanvas=function(){return this.canvas},t.Renderer2D.prototype.textDrawingContext=function(){return this.drawingContext},t.Renderer2D.prototype._renderText=function(t,r,n,i,s){let o=this.states,a=this.textDrawingContext();n<s||n>=i||(this.push(),o.strokeColor&&o.strokeSet&&a.strokeText(t,r,n),!this._clipping&&o.fillColor&&(o.fillSet||this._setFill("#000000"),a.fillText(t,r,n)),this.pop())}
32,t.Renderer2D.prototype._positionLines=function(t,n,i,s,o){let{textLeading:a,textAlign:u}=this.states,l,h=Array(o.length),c=void 0===i?0:i;for(let i=0;i<o.length;i++){switch(u){case iJ.START:throw Error("textBounds: START not yet supported for textAlign");case r.LEFT:l=t;break;case r.CENTER:l=t+c/2;break;case r.RIGHT:l=t+c;break;case iJ.END:throw Error("textBounds: END not yet supported for textAlign")}h[i]={text:o[i],x:l,y:n+i*a}}return this._yAlignOffset(h,void 0===s?0:s)},t.Renderer2D.prototype._yAlignOffset=function(t,n){if(void 0===n)throw Error("_yAlignOffset: height is required");let{textLeading:i,textBaseline:s}=this.states,o=0,a=n-i*(t.length-1);switch(s){case r.TOP:case r.BASELINE:break;case iJ._CTX_MIDDLE:o=a/2;break;case r.BOTTOM:o=a;break;case iJ.IDEOGRAPHIC:console.warn("textBounds: IDEOGRAPHIC not yet supported for textBaseline");break;case iJ.HANGING:console.warn("textBounds: HANGING not yet supported for textBaseline")}return t.forEach(t=>t.y+=o),t}),t.RendererGL){t.RendererGL.prototype.textCanvas=function(){return this._textCanvas||(this._textCanvas=document.createElement("canvas"),this._textCanvas.width=1,this._textCanvas.height=1,this._textCanvas.style.display="none",this.canvas.parentElement.insertBefore(this._textCanvas,this.canvas)),this._textCanvas},t.RendererGL.prototype.textDrawingContext=function(){if(!this._textDrawingContext){let t=this.textCanvas();this._textDrawingContext=t.getContext("2d")}return this._textDrawingContext};let n=t.RendererGL.prototype.remove;t.RendererGL.prototype.remove=function(){this._textCanvas&&this._textCanvas.parentElement.removeChild(this._textCanvas),n.call(this)},t.RendererGL.prototype._positionLines=function(t,n,i,s,o){let{textLeading:a,textAlign:u}=this.states,l=o.map(t=>this._fontWidthSingle(t)),h,c=Array(o.length),d=void 0===i?Math.max(0,...l):i;for(let s=0;s<o.length;s++){switch(u){case iJ.START:throw Error("textBounds: START not yet supported for textAlign");case r.LEFT:h=t;break;case r.CENTER:h=t+(d-l[s])/2-d/2+(i||0)/2;break;case r.RIGHT:h=t+d-l[s]-d+(i||0);break;case iJ.END:throw Error("textBounds: END not yet supported for textAlign")}c[s]={text:o[s],x:h,y:n+s*a}}return this._yAlignOffset(c,void 0===s?0:s)},t.RendererGL.prototype._yAlignOffset=function(t,n){if(void 0===n)throw Error("_yAlignOffset: height is required");let{textLeading:i,textBaseline:s,textSize:o,textFont:a}=this.states,u=0,l=t.length,h=o*l+(i-o)*(l-1);switch(s){case r.TOP:u=o;break;case r.BASELINE:break;case iJ._CTX_MIDDLE:u=-h/2+o+(n||0)/2;break;case r.BOTTOM:u=-(h-o)+(n||0);break;default:console.warn(`${s} is not supported in WebGL mode.`)}return u+=this.states.textFont.font?._verticalAlign(o)||0,t.forEach(t=>t.y+=u),t}}}"undefined"!=typeof p5&&iK(p5,p5.prototype);var iQ=n(8389);let i0
vendor: 18,355 bytes, line 32
32=[{category:"control character",hexrange:["0000","001f"]},{category:"basic latin",hexrange:["0000","007f"]},{category:"latin-1 supplement",hexrange:["0080","00ff"]},{category:"latin extended-a",hexrange:["0100","017f"]},{category:"latin extended-b",hexrange:["0180","024f"]},{category:"ipa extensions",hexrange:["0250","02af"]},{category:"spacing modifier letters",hexrange:["02b0","02ff"]},{category:"combining diacritical marks",hexrange:["0300","036f"]},{category:"greek and coptic",hexrange:["0370","03ff"]},{category:"cyrillic",hexrange:["0400","04ff"]},{category:"cyrillic supplement",hexrange:["0500","052f"]},{category:"armenian",hexrange:["0530","058f"]},{category:"hebrew",hexrange:["0590","05ff"]},{category:"arabic",hexrange:["0600","06ff"]},{category:"syriac",hexrange:["0700","074f"]},{category:"arabic supplement",hexrange:["0750","077f"]},{category:"thaana",hexrange:["0780","07bf"]},{category:"nko",hexrange:["07c0","07ff"]},{category:"samaritan",hexrange:["0800","083f"]},{category:"mandaic",hexrange:["0840","085f"]},{category:"syriac supplement",hexrange:["0860","086f"]},{category:"arabic extended-b",hexrange:["0870","089f"]},{category:"arabic extended-a",hexrange:["08a0","08ff"]},{category:"devanagari",hexrange:["0900","097f"]},{category:"bengali",hexrange:["0980","09ff"]},{category:"gurmukhi",hexrange:["0a00","0a7f"]},{category:"gujarati",hexrange:["0a80","0aff"]},{category:"oriya",hexrange:["0b00","0b7f"]},{category:"tamil",hexrange:["0b80","0bff"]},{category:"telugu",hexrange:["0c00","0c7f"]},{category:"kannada",hexrange:["0c80","0cff"]},{category:"malayalam",hexrange:["0d00","0d7f"]},{category:"sinhala",hexrange:["0d80","0dff"]},{category:"thai",hexrange:["0e00","0e7f"]},{category:"lao",hexrange:["0e80","0eff"]},{category:"tibetan",hexrange:["0f00","0fff"]},{category:"myanmar",hexrange:["1000","109f"]},{category:"georgian",hexrange:["10a0","10ff"]},{category:"hangul jamo",hexrange:["1100","11ff"]},{category:"ethiopic",hexrange:["1200","137f"]},{category:"ethiopic supplement",hexrange:["1380","139f"]},{category:"cherokee",hexrange:["13a0","13ff"]},{category:"unified canadian aboriginal syllabics",hexrange:["1400","167f"]},{category:"ogham",hexrange:["1680","169f"]},{category:"runic",hexrange:["16a0","16ff"]},{category:"tagalog",hexrange:["1700","171f"]},{category:"hanunoo",hexrange:["1720","173f"]},{category:"buhid",hexrange:["1740","175f"]},{category:"tagbanwa",hexrange:["1760","177f"]},{category:"khmer",hexrange:["1780","17ff"]},{category:"mongolian",hexrange:["1800","18af"]},{category:"unified canadian aboriginal syllabics extended",hexrange:["18b0","18ff"]},{category:"limbu",hexrange:["1900","194f"]},{category:"tai le",hexrange:["1950","197f"]},{category:"new tai lue",hexrange:["1980","19df"]},{category:"khmer symbols",hexrange:["19e0","19ff"]},{category:"buginese",hexrange:["1a00","1a1f"]},{category:"tai tham",hexrange:["1a20","1aaf"]},{category:"combining diacritical marks extended",hexrange:["1ab0","1aff"]},{category:"balinese",hexrange:["1b00","1b7f"]},{category:"sundanese",hexrange:["1b80","1bbf"]},{category:"batak",hexrange:["1bc0","1bff"]},{category:"lepcha",hexrange:["1c00","1c4f"]},{category:"ol chiki",hexrange:["1c50","1c7f"]},{category:"cyrillic extended-c",hexrange:["1c80","1c8f"]},{category:"georgian extended",hexrange:["1c90","1cbf"]},{category:"sundanese supplement",hexrange:["1cc0","1ccf"]},{category:"vedic extensions",hexrange:["1cd0","1cff"]},{category:"phonetic extensions",hexrange:["1d00","1d7f"]},{category:"phonetic extensions supplement",hexrange:["1d80","1dbf"]},{category:"combining diacritical marks supplement",hexrange:["1dc0","1dff"]},{category:"latin extended additional",hexrange:["1e00","1eff"]},{category:"greek extended",hexrange:["1f00","1fff"]},{category:"general punctuation",hexrange:["2000","206f"]},{category:"superscripts and subscripts",hexrange:["2070","209f"]},{category:"currency symbols",hexrange:["20a0","20cf"]},{category:"combining diacritical marks for symbols",hexrange:["20d0","20ff"]},{category:"letterlike symbols",hexrange:["2100","214f"]},{category:"number forms",hexrange:["2150","218f"]},{category:"arrows",hexrange:["2190","21ff"]},{category:"mathematical operators",hexrange:["2200","22ff"]},{category:"miscellaneous technical",hexrange:["2300","23ff"]},{category:"control pictures",hexrange:["2400","243f"]},{category:"optical character recognition",hexrange:["2440","245f"]},{category:"enclosed alphanumerics",hexrange:["2460","24ff"]},{category:"box drawing",hexrange:["2500","257f"]},{category:"block elements",hexrange:["2580","259f"]},{category:"geometric shapes",hexrange:["25a0","25ff"]},{category:"miscellaneous symbols",hexrange:["2600","26ff"]},{category:"dingbats",hexrange:["2700","27bf"]},{category:"miscellaneous mathematical symbols-a",hexrange:["27c0","27ef"]},{category:"supplemental arrows-a",hexrange:["27f0","27ff"]},{category:"braille patterns",hexrange:["2800","28ff"]},{category:"supplemental arrows-b",hexrange:["2900","297f"]},{category:"miscellaneous mathematical symbols-b",hexrange:["2980","29ff"]},{category:"supplemental mathematical operators",hexrange:["2a00","2aff"]},{category:"miscellaneous symbols and arrows",hexrange:["2b00","2bff"]},{category:"glagolitic",hexrange:["2c00","2c5f"]},{category:"latin extended-c",hexrange:["2c60","2c7f"]},{category:"coptic",hexrange:["2c80","2cff"]},{category:"georgian supplement",hexrange:["2d00","2d2f"]},{category:"tifinagh",hexrange:["2d30","2d7f"]},{category:"ethiopic extended",hexrange:["2d80","2ddf"]},{category:"cyrillic extended-a",hexrange:["2de0","2dff"]},{category:"supplemental punctuation",hexrange:["2e00","2e7f"]},{category:"cjk radicals supplement",hexrange:["2e80","2eff"]},{category:"kangxi radicals",hexrange:["2f00","2fdf"]},{category:"ideographic description characters",hexrange:["2ff0","2fff"]},{category:"cjk symbols and punctuation",hexrange:["3000","303f"]},{category:"hiragana",hexrange:["3040","309f"]},{category:"katakana",hexrange:["30a0","30ff"]},{category:"bopomofo",hexrange:["3100","312f"]},{category:"hangul compatibility jamo",hexrange:["3130","318f"]},{category:"kanbun",hexrange:["3190","319f"]},{category:"bopomofo extended",hexrange:["31a0","31bf"]},{category:"cjk strokes",hexrange:["31c0","31ef"]},{category:"katakana phonetic extensions",hexrange:["31f0","31ff"]},{category:"enclosed cjk letters and months",hexrange:["3200","32ff"]},{category:"cjk compatibility",hexrange:["3300","33ff"]},{category:"cjk unified ideographs extension a",hexrange:["3400","4dbf"]},{category:"yijing hexagram symbols",hexrange:["4dc0","4dff"]},{category:"cjk unified ideographs",hexrange:["4e00","9fff"]},{category:"yi syllables",hexrange:["a000","a48f"]},{category:"yi radicals",hexrange:["a490","a4cf"]},{category:"lisu",hexrange:["a4d0","a4ff"]},{category:"vai",hexrange:["a500","a63f"]},{category:"cyrillic extended-b",hexrange:["a640","a69f"]},{category:"bamum",hexrange:["a6a0","a6ff"]},{category:"modifier tone letters",hexrange:["a700","a71f"]},{category:"latin extended-d",hexrange:["a720","a7ff"]},{category:"syloti nagri",hexrange:["a800","a82f"]},{category:"common indic number forms",hexrange:["a830","a83f"]},{category:"phags-pa",hexrange:["a840","a87f"]},{category:"saurashtra",hexrange:["a880","a8df"]},{category:"devanagari extended",hexrange:["a8e0","a8ff"]},{category:"kayah li",hexrange:["a900","a92f"]},{category:"rejang",hexrange:["a930","a95f"]},{category:"hangul jamo extended-a",hexrange:["a960","a97f"]},{category:"javanese",hexrange:["a980","a9df"]},{category:"myanmar extended-b",hexrange:["a9e0","a9ff"]},{category:"cham",hexrange:["aa00","aa5f"]},{category:"myanmar extended-a",hexrange:["aa60","aa7f"]},{category:"tai viet",hexrange:["aa80","aadf"]},{category:"meetei mayek extensions",hexrange:["aae0","aaff"]},{category:"ethiopic extended-a",hexrange:["ab00","ab2f"]},{category:"latin extended-e",hexrange:["ab30","ab6f"]},{category:"cherokee supplement",hexrange:["ab70","abbf"]},{category:"meetei mayek",hexrange:["abc0","abff"]},{category:"hangul syllables",hexrange:["ac00","d7af"]},{category:"hangul jamo extended-b",hexrange:["d7b0","d7ff"]},{category:"high surrogates",hexrange:["d800","db7f"]},{category:"high private use surrogates",hexrange:["db80","dbff"]},{category:"low surrogates",hexrange:["dc00","dfff"]},{category:"private use area",hexrange:["e000","f8ff"]},{category:"cjk compatibility ideographs",hexrange:["f900","faff"]},{category:"alphabetic presentation forms",hexrange:["fb00","fb4f"]},{category:"arabic presentation forms-a",hexrange:["fb50","fdff"]},{category:"variation selectors",hexrange:["fe00","fe0f"]},{category:"vertical forms",hexrange:["fe10","fe1f"]},{category:"combining half marks",hexrange:["fe20","fe2f"]},{category:"cjk compatibility forms",hexrange:["fe30","fe4f"]},{category:"small form variants",hexrange:["fe50","fe6f"]},{category:"arabic presentation forms-b",hexrange:["fe70","feff"]},{category:"halfwidth and fullwidth forms",hexrange:["ff00","ffef"]},{category:"specials",hexrange:["fff0","ffff"]},{category:"linear b syllabary",hexrange:["10000","1007f"]},{category:"linear b ideograms",hexrange:["10080","100ff"]},{category:"aegean numbers",hexrange:["10100","1013f"]},{category:"ancient greek numbers",hexrange:["10140","1018f"]},{category:"ancient symbols",hexrange:["10190","101cf"]},{category:"phaistos disc",hexrange:["101d0","101ff"]},{category:"lycian",hexrange:["10280","1029f"]},{category:"carian",hexrange:["102a0","102df"]},{category:"coptic epact numbers",hexrange:["102e0","102ff"]},{category:"old italic",hexrange:["10300","1032f"]},{category:"gothic",hexrange:["10330","1034f"]},{category:"old permic",hexrange:["10350","1037f"]},{category:"ugaritic",hexrange:["10380","1039f"]},{category:"old persian",hexrange:["103a0","103df"]},{category:"deseret",hexrange:["10400","1044f"]},{category:"shavian",hexrange:["10450","1047f"]},{category:"osmanya",hexrange:["10480","104af"]},{category:"osage",hexrange:["104b0","104ff"]},{category:"elbasan",hexrange:["10500","1052f"]},{category:"caucasian albanian",hexrange:["10530","1056f"]},{category:"vithkuqi",hexrange:["10570","105bf"]},{category:"linear a",hexrange:["10600","1077f"]},{category:"latin extended-f",hexrange:["10780","107bf"]},{category:"cypriot syllabary",hexrange:["10800","1083f"]},{category:"imperial aramaic",hexrange:["10840","1085f"]},{category:"palmyrene",hexrange:["10860","1087f"]},{category:"nabataean",hexrange:["10880","108af"]},{category:"hatran",hexrange:["108e0","108ff"]},{category:"phoenician",hexrange:["10900","1091f"]},{category:"lydian",hexrange:["10920","1093f"]},{category:"meroitic hieroglyphs",hexrange:["10980","1099f"]},{category:"meroitic cursive",hexrange:["109a0","109ff"]},{category:"kharoshthi",hexrange:["10a00","10a5f"]},{category:"old south arabian",hexrange:["10a60","10a7f"]},{category:"old north arabian",hexrange:["10a80","10a9f"]},{category:"manichaean",hexrange:["10ac0","10aff"]},{category:"avestan",hexrange:["10b00","10b3f"]},{category:"inscriptional parthian",hexrange:["10b40","10b5f"]},{category:"inscriptional pahlavi",hexrange:["10b60","10b7f"]},{category:"psalter pahlavi",hexrange:["10b80","10baf"]},{category:"old turkic",hexrange:["10c00","10c4f"]},{category:"old hungarian",hexrange:["10c80","10cff"]},{category:"hanifi rohingya",hexrange:["10d00","10d3f"]},{category:"rumi numeral symbols",hexrange:["10e60","10e7f"]},{category:"yezidi",hexrange:["10e80","10ebf"]},{category:"arabic extended-c",hexrange:["10ec0","10eff"]},{category:"old sogdian",hexrange:["10f00","10f2f"]},{category:"sogdian",hexrange:["10f30","10f6f"]},{category:"old uyghur",hexrange:["10f70","10faf"]},{category:"chorasmian",hexrange:["10fb0","10fdf"]},{category:"elymaic",hexrange:["10fe0","10fff"]},{category:"brahmi",hexrange:["11000","1107f"]},{category:"kaithi",hexrange:["11080","110cf"]},{category:"sora sompeng",hexrange:["110d0","110ff"]},{category:"chakma",hexrange:["11100","1114f"]},{category:"mahajani",hexrange:["11150","1117f"]},{category:"sharada",hexrange:["11180","111df"]},{category:"sinhala archaic numbers",hexrange:["111e0","111ff"]},{category:"khojki",hexrange:["11200","1124f"]},{category:"multani",hexrange:["11280","112af"]},{category:"khudawadi",hexrange:["112b0","112ff"]},{category:"grantha",hexrange:["11300","1137f"]},{category:"newa",hexrange:["11400","1147f"]},{category:"tirhuta",hexrange:["11480","114df"]},{category:"siddham",hexrange:["11580","115ff"]},{category:"modi",hexrange:["11600","1165f"]},{category:"mongolian supplement",hexrange:["11660","1167f"]},{category:"takri",hexrange:["11680","116cf"]},{category:"ahom",hexrange:["11700","1174f"]},{category:"dogra",hexrange:["11800","1184f"]},{category:"warang citi",hexrange:["118a0","118ff"]},{category:"dives akuru",hexrange:["11900","1195f"]},{category:"nandinagari",hexrange:["119a0","119ff"]},{category:"zanabazar square",hexrange:["11a00","11a4f"]},{category:"soyombo",hexrange:["11a50","11aaf"]},{category:"unified canadian aboriginal syllabics extended-a",hexrange:["11ab0","11abf"]},{category:"pau cin hau",hexrange:["11ac0","11aff"]},{category:"devanagari extended-a",hexrange:["11b00","11b5f"]},{category:"bhaiksuki",hexrange:["11c00","11c6f"]},{category:"marchen",hexrange:["11c70","11cbf"]},{category:"masaram gondi",hexrange:["11d00","11d5f"]},{category:"gunjala gondi",hexrange:["11d60","11daf"]},{category:"makasar",hexrange:["11ee0","11eff"]},{category:"kawi",hexrange:["11f00","11f5f"]},{category:"lisu supplement",hexrange:["11fb0","11fbf"]},{category:"tamil supplement",hexrange:["11fc0","11fff"]},{category:"cuneiform",hexrange:["12000","123ff"]},{category:"cuneiform numbers and punctuation",hexrange:["12400","1247f"]},{category:"early dynastic cuneiform",hexrange:["12480","1254f"]},{category:"cypro-minoan",hexrange:["12f90","12fff"]},{category:"egyptian hieroglyphs",hexrange:["13000","1342f"]},{category:"egyptian hieroglyph format controls",hexrange:["13430","1345f"]},{category:"anatolian hieroglyphs",hexrange:["14400","1467f"]},{category:"bamum supplement",hexrange:["16800","16a3f"]},{category:"mro",hexrange:["16a40","16a6f"]},{category:"tangsa",hexrange:["16a70","16acf"]},{category:"bassa vah",hexrange:["16ad0","16aff"]},{category:"pahawh hmong",hexrange:["16b00","16b8f"]},{category:"medefaidrin",hexrange:["16e40","16e9f"]},{category:"miao",hexrange:["16f00","16f9f"]},{category:"ideographic symbols and punctuation",hexrange:["16fe0","16fff"]},{category:"tangut",hexrange:["17000","187ff"]},{category:"tangut components",hexrange:["18800","18aff"]},{category:"khitan small script",hexrange:["18b00","18cff"]},{category:"tangut supplement",hexrange:["18d00","18d7f"]},{category:"kana extended-b",hexrange:["1aff0","1afff"]},{category:"kana supplement",hexrange:["1b000","1b0ff"]},{category:"kana extended-a",hexrange:["1b100","1b12f"]},{category:"small kana extension",hexrange:["1b130","1b16f"]},{category:"nushu",hexrange:["1b170","1b2ff"]},{category:"duployan",hexrange:["1bc00","1bc9f"]},{category:"shorthand format controls",hexrange:["1bca0","1bcaf"]},{category:"znamenny musical notation",hexrange:["1cf00","1cfcf"]},{category:"byzantine musical symbols",hexrange:["1d000","1d0ff"]},{category:"musical symbols",hexrange:["1d100","1d1ff"]},{category:"ancient greek musical notation",hexrange:["1d200","1d24f"]},{category:"kaktovik numerals",hexrange:["1d2c0","1d2df"]},{category:"mayan numerals",hexrange:["1d2e0","1d2ff"]},{category:"tai xuan jing symbols",hexrange:["1d300","1d35f"]},{category:"counting rod numerals",hexrange:["1d360","1d37f"]},{category:"mathematical alphanumeric symbols",hexrange:["1d400","1d7ff"]},{category:"sutton signwriting",hexrange:["1d800","1daaf"]},{category:"latin extended-g",hexrange:["1df00","1dfff"]},{category:"glagolitic supplement",hexrange:["1e000","1e02f"]},{category:"cyrillic extended-d",hexrange:["1e030","1e08f"]},{category:"nyiakeng puachue hmong",hexrange:["1e100","1e14f"]},{category:"toto",hexrange:["1e290","1e2bf"]},{category:"wancho",hexrange:["1e2c0","1e2ff"]},{category:"nag mundari",hexrange:["1e4d0","1e4ff"]},{category:"ethiopic extended-b",hexrange:["1e7e0","1e7ff"]},{category:"mende kikakui",hexrange:["1e800","1e8df"]},{category:"adlam",hexrange:["1e900","1e95f"]},{category:"indic siyaq numbers",hexrange:["1ec70","1ecbf"]},{category:"ottoman siyaq numbers",hexrange:["1ed00","1ed4f"]},{category:"arabic mathematical alphabetic symbols",hexrange:["1ee00","1eeff"]},{category:"mahjong tiles",hexrange:["1f000","1f02f"]},{category:"domino tiles",hexrange:["1f030","1f09f"]},{category:"playing cards",hexrange:["1f0a0","1f0ff"]},{category:"enclosed alphanumeric supplement",hexrange:["1f100","1f1ff"]},{category:"enclosed ideographic supplement",hexrange:["1f200","1f2ff"]},{category:"miscellaneous symbols and pictographs",hexrange:["1f300","1f5ff"]},{category:"emoticons (emoji)",hexrange:["1f600","1f64f"]},{category:"ornamental dingbats",hexrange:["1f650","1f67f"]},{category:"transport and map symbols",hexrange:["1f680","1f6ff"]},{category:"alchemical symbols",hexrange:["1f700","1f77f"]},{category:"geometric shapes extended",hexrange:["1f780","1f7ff"]},{category:"supplemental arrows-c",hexrange:["1f800","1f8ff"]},{category:"supplemental symbols and pictographs",hexrange:["1f900","1f9ff"]},{category:"chess symbols",hexrange:["1fa00","1fa6f"]},{category:"symbols and pictographs extended-a",hexrange:["1fa70","1faff"]},{category:"symbols for legacy computing",hexrange:["1fb00","1fbff"]},{category:"cjk unified ideographs extension b",hexrange:["20000","2a6df"]},{category:"cjk unified ideographs extension c",hexrange:["2a700","2b73f"]},{category:"cjk unified ideographs extension d",hexrange:["2b740","2b81f"]},{category:"cjk unified ideographs extension e",hexrange:["2b820","2ceaf"]},{category:"cjk unified ideographs extension f",hexrange:["2ceb0","2ebef"]},{category:"cjk unified ideographs extension i",hexrange:["2ebf0","2ee5f"]},{category:"cjk compatibility ideographs supplement",hexrange:["2f800","2fa1f"]},{category:"cjk unified ideographs extension g",hexrange:["30000","3134f"]},{category:"cjk unified ideographs extension h",hexrange:["31350","323af"]},{category:"tags",hexrange:["e0000","e007f"]},{category:"variation selectors supplement",hexrange:["e0100","e01ef"]},{category:"supplementary private use area-a",hexrange:["f0000","fffff"]},{category:"supplementary private use area-b",hexrange:["100000","10ffff"]}]
32,i1={inflate:n(1210).UD};var i2={};i2.parse=function(t){let r;var n=i2.B,i=function(t,r,n,i){var s=i2.T,o={cmap:s.cmap,head:s.head,hhea:s.hhea,maxp:s.maxp,hmtx:s.hmtx,name:s.name,"OS/2":s.OS2,post:s.post,loca:s.loca,kern:s.kern,glyf:s.glyf,"CFF ":s.CFF,GSUB:s.GSUB,CBLC:s.CBLC,CBDT:s.CBDT,"SVG ":s.SVG,COLR:s.colr,CPAL:s.cpal,sbix:s.sbix,fvar:s.fvar,gvar:s.gvar,avar:s.avar,HVAR:s.HVAR},a={_data:t,_index:r,_offset:n};for(var u in o){var l=i2.findTable(t,u,n);if(l){var h=l[0],c=i[h];null==c&&(c=o[u].parseTab(t,h,l[1],a)),a[u]=i[h]=c}}return a},s=new Uint8Array(t);119==s[0]&&(r=s,s=function(t){var r=n.readUshort(t,12),i=new Uint8Array(n.readUint(t,16)),s=12+16*r;n.writeASCII(i,0,"OTTO"),n.writeUshort(i,4,r);for(var o=44,a=0;a<r;a++){var u=n.readASCII(t,o,4),l=n.readUint(t,o+4),h=n.readUint(t,o+8),c=n.readUint(t,o+12);o+=20;var d=t.slice(l,l+h);h!=c&&(d=i1.inflate(d));var p=12+16*a;n.writeASCII(i,p,u),n.writeUint(i,p+8,s),n.writeUint(i,p+12,c),i.set(d,s),s+=c}return i}(s));var o={};if("ttcf"==n.readASCII(s,0,4)){var a=4;n.readUshort(s,a),a+=2,n.readUshort(s,a),a+=2;var u=n.readUint(s,a);a+=4;for(var l=[],h=0;h<u;h++){var c=n.readUint(s,a);a+=4,l.push(i(s,h,c,o))}return l}var d=i(s,0,0,o);d._compressedData=r;var p=d.fvar;if(p){for(var f=[d],h=0;h<p[1].length;h++){var g=p[1][h],m={};for(var y in f.push(m),d)m[y]=d[y];m._index=h;var v=m.name=JSON.parse(JSON.stringify(m.name));v.fontSubfamily=g[0],null==g[3]&&(g[3]=(v.fontFamily+"-"+v.fontSubfamily).replaceAll(" ","")),v.postScriptName=g[3]}return f}return[d]},i2.findTable=function(t,r,n){for(var i=i2.B,s=i.readUshort(t,n+4),o=n+12,a=0;a<s;a++){var u=i.readASCII(t,o,4);i.readUint(t,o+4);var l=i.readUint(t,o+8),h=i.readUint(t,o+12);if(u==r)return[l,h];o+=16}return null},i2.T={},i2.B={readFixed:function(t,r){return(t[r]<<8|t[r+1])+(t[r+2]<<8|t[r+3])/65540},readF2dot14:function(t,r){return i2.B.readShort(t,r)/16384},readInt:function(t,r){var n=i2.B.t.uint8;return n[0]=t[r+3],n[1]=t[r+2],n[2]=t[r+1],n[3]=t[r],i2.B.t.int32[0]},readInt8:function(t,r){return i2.B.t.uint8[0]=t[r],i2.B.t.int8[0]},readShort:function(t,r){return i2.B.t.uint16[0]=t[r]<<8|t[r+1],i2.B.t.int16[0]},readUshort:function(t,r){return t[r]<<8|t[r+1]},writeUshort:function(t,r,n){t[r]=n>>8&255,t[r+1]=255&n},readUshorts:function(t,r,n){for(var i=[],s=0;s<n;s++){var o=i2.B.readUshort(t,r+2*s);i.push(o)}return i},readUint:function(t,r){var n=i2.B.t.uint8;return n[3]=t[r],n[2]=t[r+1],n[1]=t[r+2],n[0]=t[r+3],i2.B.t.uint32[0]},writeUint:function(t,r,n){t[r]=n>>24&255,t[r+1]=n>>16&255,t[r+2]=n>>8&255,t[r+3]=(0|n)&255},readUint64:function(t,r){return 0x100000000*i2.B.readUint(t,r)+i2.B.readUint(t,r+4)},readASCII:function(t,r,n){for(var i="",s=0;s<n;s++)i+=String.fromCharCode(t[r+s]);return i},writeASCII:function(t,r,n){for(var i=0;i<n.length;i++)t[r+i]=n.charCodeAt(i)},readUnicode:function(t,r,n){for(var i="",s=0;s<n;s++)i+=String.fromCharCode(t[r++]<<8|t[r++]);return i},_tdec:window.TextDecoder?new window.TextDecoder:null,readUTF8:function(t,r,n){var i=i2.B._tdec;return i&&0==r&&n==t.length?i.decode(t):i2.B.readASCII(t,r,n)},readBytes:function(t,r,n){for(var i=[],s=0;s<n;s++)i.push(t[r+s]);return i},readASCIIArray:function(t,r,n){for(var i=[],s=0;s<n;s++)i.push(String.fromCharCode(t[r+s]));return i},t:function(){var t=new ArrayBuffer(8);return{buff:t,int8:new Int8Array(t),uint8:new Uint8Array(t),int16:new Int16Array(t),uint16:new Uint16Array(t),int32:new Int32Array(t),uint32:new Uint32Array(t)}}()},i2.T.CFF={parseTab:function(t,r,n){var i=i2.B,s=i2.T.CFF;(t=new Uint8Array(t.buffer,r,n))[r=0],t[++r],t[++r],t[++r],r++;var o=[];r=s.readIndex(t,r,o);for(var a=[],u=0;u<o.length-1;u++)a.push(i.readASCII(t,r+o[u],o[u+1]-o[u]));r+=o[o.length-1];var l=[];r=s.readIndex(t,r,l);for(var h=[],u=0;u<l.length-1;u++)h.push(s.readDict(t,r+l[u],r+l[u+1]));r+=l[l.length-1];var c=h[0],d=[];r=s.readIndex(t,r,d);for(var p=[],u=0;u<d.length-1;u++)p.push(i.readASCII(t,r+d[u],d[u+1]-d[u]));if(r+=d[d.length-1],s.readSubrs(t,r,c),c.CharStrings&&(c.CharStrings=s.readBytes(t,c.CharStrings)),c.ROS){r=c.FDArray;var f=[];r=s.readIndex(t,r,f),c.FDArray=[];for(var u=0;u<f.length-1;u++){var g=s.readDict(t,r+f[u],r+f[u+1]);s._readFDict(t,g,p),c.FDArray.push(g)}r+=f[f.length-1],r=c.FDSelect,c.FDSelect=[];var m=t[r];if(r++,3==m){var y=i.readUshort(t,r);r+=2;
32for(var u=0;u<y+1;u++)c.FDSelect.push(i.readUshort(t,r),t[r+2]),r+=3}else throw m}return c.charset&&(c.charset=s.readCharset(t,c.charset,c.CharStrings.length)),s._readFDict(t,c,p),c},_readFDict:function(t,r,n){var i,s=i2.T.CFF;for(var o in r.Private&&(i=r.Private[1],r.Private=s.readDict(t,i,i+r.Private[0]),r.Private.Subrs&&s.readSubrs(t,i+r.Private.Subrs,r.Private)),r)-1!=["FamilyName","FontName","FullName","Notice","version","Copyright"].indexOf(o)&&(r[o]=n[r[o]-426+35])},readSubrs:function(t,r,n){n.Subrs=i2.T.CFF.readBytes(t,r);var i=n.Subrs.length+1;n.Bias=i<1240?107:i<33900?1131:32768},readBytes:function(t,r){i2.B;var n=[];r=i2.T.CFF.readIndex(t,r,n);for(var i=[],s=n.length-1,o=t.byteOffset+r,a=0;a<s;a++){var u=n[a];i.push(new Uint8Array(t.buffer,o+u,n[a+1]-u))}return i},tableSE:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],glyphByUnicode:function(t,r){for(var n=0;n<t.charset.length;n++)if(t.charset[n]==r)return n;return -1},glyphBySE:function(t,r){return r<0||r>255?-1:i2.T.CFF.glyphByUnicode(t,i2.T.CFF.tableSE[r])},readCharset:function(t,r,n){var i=i2.B,s=[".notdef"],o=t[r];if(r++,0==o)for(var a=0;a<n;a++){var u=i.readUshort(t,r);r+=2,s.push(u)}else if(1==o||2==o)for(;s.length<n;){var u=i.readUshort(t,r);r+=2;var l=0;1==o?(l=t[r],r++):(l=i.readUshort(t,r),r+=2);for(var a=0;a<=l;a++)s.push(u),u++}else throw"error: format: "+o;return s},readIndex:function(t,r,n){var i=i2.B,s=i.readUshort(t,r)+1,o=t[r+=2];if(r++,1==o)for(var a=0;a<s;a++)n.push(t[r+a]);else if(2==o)for(var a=0;a<s;a++)n.push(i.readUshort(t,r+2*a));else if(3==o)for(var a=0;a<s;a++)n.push(0xffffff&i.readUint(t,r+3*a-1));else if(4==o)for(var a=0;a<s;a++)n.push(i.readUint(t,r+4*a));else if(1!=s)throw"unsupported offset size: "+o+", count: "+s;return(r+=s*o)-1},getCharString:function(t,r,n){var i=i2.B,s=t[r],o=t[r+1];t[r+2],t[r+3],t[r+4];var a=1,u=null,l=null;s<=20&&(u=s,a=1),12==s&&(u=100*s+o,a=2),21<=s&&s<=27&&(u=s,a=1),28==s&&(l=i.readShort(t,r+1),a=3),29<=s&&s<=31&&(u=s,a=1),32<=s&&s<=246&&(l=s-139,a=1),247<=s&&s<=250&&(l=(s-247)*256+o+108,a=2),251<=s&&s<=254&&(l=-(256*(s-251))-o-108,a=2),255==s&&(l=i.readInt(t,r+1)/65535,a=5),n.val=null!=l?l:"o"+u,n.size=a},readCharString:function(t,r,n){for(var i=r+n,s=i2.B,o=[];r<i;){var a=t[r],u=t[r+1];t[r+2],t[r+3],t[r+4];var l=1,h=null,c=null;a<=20&&(h=a,l=1),12==a&&(h=100*a+u,l=2),(19==a||20==a)&&(h=a,l=2),21<=a&&a<=27&&(h=a,l=1),28==a&&(c=s.readShort(t,r+1),l=3),29<=a&&a<=31&&(h=a,l=1),32<=a&&a<=246&&(c=a-139,l=1),247<=a&&a<=250&&(c=(a-247)*256+u+108,l=2),251<=a&&a<=254&&(c=-(256*(a-251))-u-108,l=2),255==a&&(c=s.readInt(t,r+1)/65535,l=5),o.push(null!=c?c:"o"+h),r+=l}return o},readDict:function(t,r,n){for(var i=i2.B,s={},o=[];r<n;){var a=t[r],u=t[r+1];t[r+2],t[r+3],t[r+4];var l=1,h=null,c=null;if(28==a&&(c=i.readShort(t,r+1),l=3),29==a&&(c=i.readInt(t,r+1),l=5),32<=a&&a<=246&&(c=a-139,l=1),247<=a&&a<=250&&(c=(a-247)*256+u+108,l=2),251<=a&&a<=254&&(c=-(256*(a-251))-u-108,l=2),255==a)throw c=i.readInt(t,r+1)/65535,l=5,"unknown number";if(30==a){var d=[];for(l=1;;){var p=t[r+l];l++;var f=p>>4,g=15&p;if(15!=f&&d.push(f),15!=g&&d.push(g),15==g)break}for(var m="",y=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],v=0;v<d.length;v++)m+=y[d[v]];c=parseFloat(m)}if(a<=21){var b=["version","Notice","FullName","FamilyName","Weight","FontBBox","BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StdHW","StdVW","escape","UniqueID","XUID","charset","Encoding","CharStrings","Private","Subrs","defaultWidthX","nominalWidthX"];if(h=b[a],l=1,12==a){var b=["Copyright","isFixedPitch","ItalicAngle","UnderlinePosition","UnderlineThickness","PaintType","CharstringType","FontMatrix","StrokeWidth","BlueScale","BlueShift","BlueFuzz","StemSnapH","StemSnapV","ForceBold","","","LanguageGroup","ExpansionFactor","initialRandomSeed","SyntheticBase","PostScript","BaseFontName","BaseFontBlend","","","","","","","ROS","CIDFontVersion","CIDFontRevision","CIDFontType","CIDCount","UIDBase","FDArray","FDSelect","FontName"];h=b[u],l=2}}null!=h?(s[h]=1==o.length?o[0]:o,o=[]):o.push(c),r+=l}return s}},i2.T.cmap={parseTab:function(t,r,n){var i={tables:[],ids:{},off:r};t=new Uint8Array(t.buffer,r,n),r=0;var s=i2.B,o=s.readUshort,a=i2.T.cmap;o(t,r);var u=o(t,r+=2);r+=2;
32for(var l=[],h=0;h<u;h++){var c=o(t,r),d=o(t,r+=2);r+=2;var p=s.readUint(t,r);r+=4;var f="p"+c+"e"+d,g=l.indexOf(p);if(-1==g){g=i.tables.length;var m={};l.push(p);var y=m.format=o(t,p);0==y?m=a.parse0(t,p,m):4==y?m=a.parse4(t,p,m):6==y?m=a.parse6(t,p,m):12==y&&(m=a.parse12(t,p,m)),i.tables.push(m)}null!=i.ids[f]&&console.log("multiple tables for one platform+encoding: "+f),i.ids[f]=g}return i},parse0:function(t,r,n){var i=i2.B;r+=2;var s=i.readUshort(t,r);r+=2,i.readUshort(t,r),r+=2,n.map=[];for(var o=0;o<s-6;o++)n.map.push(t[r+o]);return n},parse4:function(t,r,n){var i=i2.B,s=i.readUshort,o=i.readUshorts,a=r,u=s(t,r+=2);s(t,r+=2);var l=s(t,r+=2)>>>1;n.searchRange=s(t,r+=2),n.entrySelector=s(t,r+=2),n.rangeShift=s(t,r+=2),n.endCount=o(t,r+=2,l),r+=2*l,n.startCount=o(t,r+=2,l),r+=2*l,n.idDelta=[];for(var h=0;h<l;h++)n.idDelta.push(i.readShort(t,r)),r+=2;return n.idRangeOffset=o(t,r,l),n.glyphIdArray=o(t,r+=2*l,a+u-r>>1),n},parse6:function(t,r,n){var i=i2.B;r+=2,i.readUshort(t,r),r+=2,i.readUshort(t,r),r+=2,n.firstCode=i.readUshort(t,r),r+=2;var s=i.readUshort(t,r);r+=2,n.glyphIdArray=[];for(var o=0;o<s;o++)n.glyphIdArray.push(i.readUshort(t,r)),r+=2;return n},parse12:function(t,r,n){var i=i2.B.readUint;i(t,r+=4),i(t,r+=4);var s=3*i(t,r+=4);r+=4;for(var o=n.groups=new Uint32Array(s),a=0;a<s;a+=3)o[a]=i(t,r+(a<<2)),o[a+1]=i(t,r+(a<<2)+4),o[a+2]=i(t,r+(a<<2)+8);return n}},i2.T.CBLC={parseTab:function(t,r,n){var i=i2.B,s=r;i.readUshort(t,r),r+=2,i.readUshort(t,r),r+=2;var o=i.readUint(t,r);r+=4;for(var a=[],u=0;u<o;u++){var l=i.readUint(t,r);r+=4,i.readUint(t,r),r+=4,i.readUint(t,r),r+=4,r+=4,r+=24,i.readUshort(t,r),r+=2,i.readUshort(t,r),r+=2,r+=4;for(var h=s+l,c=0;c<3;c++){var d=i.readUshort(t,h);h+=2;var p=i.readUshort(t,h);h+=2;var f=i.readUint(t,h);h+=4;var g=p-d+1,m=s+l+f,y=i.readUshort(t,m);if(m+=2,1!=y)throw y;var v=i.readUshort(t,m);m+=2;var b=i.readUint(t,m);m+=4;for(var x=[],_=0;_<g;_++){var D=i.readUint(t,m+4*_);x.push(b+D)}a.push([d,p,v,x])}}return a}},i2.T.CBDT={parseTab:function(t,r,n){return i2.B,new Uint8Array(t.buffer,t.byteOffset+r,n)}},i2.T.glyf={parseTab:function(t,r,n,i){for(var s=[],o=i.maxp.numGlyphs,a=0;a<o;a++)s.push(null);return s},_parseGlyf:function(t,r){var n,i=i2.B,s=t._data,o=t.loca;if(o[r]==o[r+1])return null;var a=i2.findTable(s,"glyf",t._offset)[0]+o[r],u={};if(u.noc=i.readShort(s,a),a+=2,u.xMin=i.readShort(s,a),a+=2,u.yMin=i.readShort(s,a),a+=2,u.xMax=i.readShort(s,a),a+=2,u.yMax=i.readShort(s,a),a+=2,u.xMin>=u.xMax||u.yMin>=u.yMax)return null;if(u.noc>0){u.endPts=[];for(var l=0;l<u.noc;l++)u.endPts.push(i.readUshort(s,a)),a+=2;var h=i.readUshort(s,a);if(a+=2,s.length-a<h)return null;u.instructions=i.readBytes(s,a,h),a+=h;var c=u.endPts[u.noc-1]+1;u.flags=[];for(var l=0;l<c;l++){var d=s[a];if(a++,u.flags.push(d),(8&d)!=0){var p=s[a];a++;for(var f=0;f<p;f++)u.flags.push(d),l++}}u.xs=[];for(var l=0;l<c;l++){var g=(2&u.flags[l])!=0,m=(16&u.flags[l])!=0;g?(u.xs.push(m?s[a]:-s[a]),a++):m?u.xs.push(0):(u.xs.push(i.readShort(s,a)),a+=2)}u.ys=[];for(var l=0;l<c;l++){var g=(4&u.flags[l])!=0,m=(32&u.flags[l])!=0;
vendor: 7,275 bytes, line 32
32g?(u.ys.push(m?s[a]:-s[a]),a++):m?u.ys.push(0):(u.ys.push(i.readShort(s,a)),a+=2)}for(var y=0,v=0,l=0;l<c;l++)y+=u.xs[l],v+=u.ys[l],u.xs[l]=y,u.ys[l]=v}else{u.parts=[];do{n=i.readUshort(s,a),a+=2;var b={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(u.parts.push(b),b.glyphIndex=i.readUshort(s,a),a+=2,1&n){var x=i.readShort(s,a);a+=2;var _=i.readShort(s,a);a+=2}else{var x=i.readInt8(s,a);a++;var _=i.readInt8(s,a);a++}2&n?(b.m.tx=x,b.m.ty=_):(b.p1=x,b.p2=_),8&n?(b.m.a=b.m.d=i.readF2dot14(s,a),a+=2):64&n?(b.m.a=i.readF2dot14(s,a),a+=2,b.m.d=i.readF2dot14(s,a),a+=2):128&n&&(b.m.a=i.readF2dot14(s,a),a+=2,b.m.b=i.readF2dot14(s,a),a+=2,b.m.c=i.readF2dot14(s,a),a+=2,b.m.d=i.readF2dot14(s,a),a+=2)}while(32&n);if(256&n){var D=i.readUshort(s,a);a+=2,u.instr=[];for(var l=0;l<D;l++)u.instr.push(s[a]),a++}}return u}},i2.T.head={parseTab:function(t,r,n){var i=i2.B,s={};return i.readFixed(t,r),r+=4,s.fontRevision=i.readFixed(t,r),r+=4,i.readUint(t,r),r+=4,i.readUint(t,r),r+=4,s.flags=i.readUshort(t,r),r+=2,s.unitsPerEm=i.readUshort(t,r),r+=2,s.created=i.readUint64(t,r),r+=8,s.modified=i.readUint64(t,r),r+=8,s.xMin=i.readShort(t,r),r+=2,s.yMin=i.readShort(t,r),r+=2,s.xMax=i.readShort(t,r),r+=2,s.yMax=i.readShort(t,r),r+=2,s.macStyle=i.readUshort(t,r),r+=2,s.lowestRecPPEM=i.readUshort(t,r),r+=2,s.fontDirectionHint=i.readShort(t,r),r+=2,s.indexToLocFormat=i.readShort(t,r),r+=2,s.glyphDataFormat=i.readShort(t,r),r+=2,s}},i2.T.hhea={parseTab:function(t,r,n){var i=i2.B,s={};i.readFixed(t,r),r+=4;for(var o=["ascender","descender","lineGap","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","res0","res1","res2","res3","metricDataFormat","numberOfHMetrics"],a=0;a<o.length;a++){var u=o[a],l="advanceWidthMax"==u||"numberOfHMetrics"==u?i.readUshort:i.readShort;s[u]=l(t,r+2*a)}return s}},i2.T.hmtx={parseTab:function(t,r,n,i){for(var s=i2.B,o=[],a=[],u=i.maxp.numGlyphs,l=i.hhea.numberOfHMetrics,h=0,c=0,d=0;d<l;)h=s.readUshort(t,r+(d<<2)),c=s.readShort(t,r+(d<<2)+2),o.push(h),a.push(c),d++;for(;d<u;)o.push(h),a.push(c),d++;return{aWidth:o,lsBearing:a}}},i2.T.kern={parseTab:function(t,r,n,i){var s=i2.B,o=i2.T.kern;if(1==s.readUshort(t,r))return o.parseV1(t,r,n,i);var a=s.readUshort(t,r+2);r+=4;for(var u={glyph1:[],rval:[]},l=0;l<a;l++){r+=2;var n=s.readUshort(t,r);r+=2;var h=s.readUshort(t,r);r+=2;var c=h>>>8;0==(c&=15)&&(r=o.readFormat0(t,r,u))}return u},parseV1:function(t,r,n,i){var s=i2.B,o=i2.T.kern;s.readFixed(t,r);var a=s.readUint(t,r+4);r+=8;for(var u={glyph1:[],rval:[]},l=0;l<a;l++){s.readUint(t,r),r+=4;var h=s.readUshort(t,r);r+=2,s.readUshort(t,r),r+=2,0==(255&h)&&(r=o.readFormat0(t,r,u))}return u},readFormat0:function(t,r,n){var i=i2.B,s=i.readUshort,o=-1,a=s(t,r);s(t,r+2),s(t,r+4),s(t,r+6),r+=8;for(var u=0;u<a;u++){var l=s(t,r),h=s(t,r+=2);r+=2;var c=i.readShort(t,r);r+=2,l!=o&&(n.glyph1.push(l),n.rval.push({glyph2:[],vals:[]}));var d=n.rval[n.rval.length-1];d.glyph2.push(h),d.vals.push(c),o=l}return r}},i2.T.loca={parseTab:function(t,r,n,i){var s=i2.B,o=[],a=i.head.indexToLocFormat,u=i.maxp.numGlyphs+1;if(0==a)for(var l=0;l<u;l++)o.push(s.readUshort(t,r+(l<<1))<<1);if(1==a)for(var l=0;l<u;l++)o.push(s.readUint(t,r+(l<<2)));return o}},i2.T.maxp={parseTab:function(t,r,n){var i=i2.B,s=i.readUshort,o={};return i.readUint(t,r),o.numGlyphs=s(t,r+=4),r+=2,o}},i2.T.name={parseTab:function(t,r,n){var i=i2.B,s={};i.readUshort(t,r),r+=2;var o=i.readUshort(t,r);r+=2;for(var a=i.readUshort(t,r),u=(r+=2)-6+a,l=["copyright","fontFamily","fontSubfamily","ID","fullName","version","postScriptName","trademark","manufacturer","designer","description","urlVendor","urlDesigner","licence","licenceURL","---","typoFamilyName","typoSubfamilyName","compatibleFull","sampleText","postScriptCID","wwsFamilyName","wwsSubfamilyName","lightPalette","darkPalette"],h=i.readUshort,c=0;c<o;c++){var d,p=h(t,r),f=h(t,r+=2),g=h(t,r+=2),m=h(t,r+=2),y=h(t,r+=2),v=h(t,r+=2);r+=2;var b=u+v;0==p||3==p&&0==f||1==p&&25==f?d=i.readUnicode(t,b,y/2):0==f?d=i.readASCII(t,b,y):1==f||3==f||4==f||5==f||10==f?d=i.readUnicode(t,b,y/2):1==p?(d=i.readASCII(t,b,y),console.log("reading unknown MAC encoding "+f+" as ASCII")):(console.log("unknown encoding "+f+", platformID: "+p),d=i.readASCII(t,b,y));var x="p"+p+","+g.toString(16);null==s[x]&&(s[x]={});var _=l[m];null==_&&(_="_"+m),s[x][_]=d,s[x]._lang=g}var D=i2.T.name.selectOne(s),A="fontFamily";if(null==D[A])for(var C in s)null!=s[C][A]&&(D[A]=s[C][A]);return D},selectOne:function(t){var r,n="postScriptName";for(var i in t)if(null!=t[i][n]&&1033==t[i]._lang)return t[i];for(var i in t)if(null!=t[i][n]&&0==t[i]._lang)return t[i];for(var i in t)if(null!=t[i][n]&&3084==t[i]._lang)return t[i];for(var i in t)if(null!=t[i][n])return t[i];for(var i in t){r=t[i];break}return console.log("returning name table with languageID "+r._lang),null==r[n]&&null!=r.ID&&(r[n]=r.ID),r}},i2.T.OS2={parseTab:function(t,r,n){var i=i2.B.readUshort(t,r);r+=2;var s=i2.T.OS2,o={};if(0==i)s.version0(t,r,o);else if(1==i)s.version1(t,r,o);else if(2==i||3==i||4==i)s.version2(t,r,o);else if(5==i)s.version5(t,r,o);else throw"unknown OS/2 table version: "+i;return o},version0:function(t,r,n){var i=i2.B;return n.xAvgCharWidth=i.readShort(t,r),r+=2,n.usWeightClass=i.readUshort(t,r),r+=2,n.usWidthClass=i.readUshort(t,r),r+=2,n.fsType=i.readUshort(t,r),r+=2,n.ySubscriptXSize=i.readShort(t,r),r+=2,n.ySubscriptYSize=i.readShort(t,r),r+=2,n.ySubscriptXOffset=i.readShort(t,r),r+=2,n.ySubscriptYOffset=i.readShort(t,r),r+=2,n.ySuperscriptXSize=i.readShort(t,r),r+=2,n.ySuperscriptYSize=i.readShort(t,r),r+=2,n.ySuperscriptXOffset=i.readShort(t,r),r+=2,n.ySuperscriptYOffset=i.readShort(t,r),r+=2,n.yStrikeoutSize=i.readShort(t,r),r+=2,n.yStrikeoutPosition=i.readShort(t,r),r+=2,n.sFamilyClass=i.readShort(t,r),r+=2,n.panose=i.readBytes(t,r,10),r+=10,n.ulUnicodeRange1=i.readUint(t,r),r+=4,n.ulUnicodeRange2=i.readUint(t,r),r+=4,n.ulUnicodeRange3=i.readUint(t,r),r+=4,n.ulUnicodeRange4=i.readUint(t,r),r+=4,n.achVendID=i.readASCII(t,r,4),r+=4,n.fsSelection=i.readUshort(t,r),r+=2,n.usFirstCharIndex=i.readUshort(t,r),r+=2,n.usLastCharIndex=i.readUshort(t,r),r+=2,n.sTypoAscender=i.readShort(t,r),r+=2,n.sTypoDescender=i.readShort(t,r),r+=2,n.sTypoLineGap=i.readShort(t,r),r+=2,n.usWinAscent=i.readUshort(t,r),r+=2,n.usWinDescent=i.readUshort(t,r),r+=2},version1:function(t,r,n){var i=i2.B;return r=i2.T.OS2.version0(t,r,n),n.ulCodePageRange1=i.readUint(t,r),r+=4,n.ulCodePageRange2=i.readUint(t,r),r+=4},version2:function(t,r,n){var i=i2.B,s=i.readUshort;return r=i2.T.OS2.version1(t,r,n),n.sxHeight=i.readShort(t,r),r+=2,n.sCapHeight=i.readShort(t,r),n.usDefault=s(t,r+=2),n.usBreak=s(t,r+=2),n.usMaxContext=s(t,r+=2),r+=2},version5:function(t,r,n){var i=i2.B.readUshort;return r=i2.T.OS2.version2(t,r,n),n.usLowerOpticalPointSize=i(t,r),n.usUpperOpticalPointSize=i(t,r+=2),r+=2}},i2.T.post={parseTab:function(t,r,n){var i=i2.B,s={};return s.version=i.readFixed(t,r),r+=4,s.italicAngle=i.readFixed(t,r),r+=4,s.underlinePosition=i.readShort(t,r),r+=2,s.underlineThickness=i.readShort(t,r),r+=2,s}},i2.T.SVG={parseTab:function(t,r,n){var i=i2.B,s={entries:[],svgs:[]},o=r;i.readUshort(t,r),r+=2;var a=i.readUint(t,r);r+=4,i.readUint(t,r),r+=4,r=a+o;var u=i.readUshort(t,r);r+=2;
32for(var l=0;l<u;l++){var h=i.readUshort(t,r);r+=2;var c=i.readUshort(t,r);r+=2;var d=i.readUint(t,r);r+=4;var p=i.readUint(t,r);r+=4;var f=new Uint8Array(t.buffer,o+d+a,p);31==f[0]&&139==f[1]&&8==f[2]&&(f=i1.inflate(f));for(var g=i.readUTF8(f,0,f.length),m=h;m<=c;m++)s.entries[m]=s.svgs.length;s.svgs.push(g)}return s}},i2.T.sbix={parseTab:function(t,r,n,i){for(var s=i.maxp.numGlyphs,o=i2.B,a=o.readUint(t,r+4),u=[],l=a-1;l<a;l++)for(var h=r+o.readUint(t,r+8+4*l),c=0;c<s;c++){var d=o.readUint(t,h+4+4*c),p=o.readUint(t,h+4+4*c+4);if(d==p){u[c]=null;continue}var f=h+d,g=o.readASCII(t,f+4,4);if("png "!=g)throw g;u[c]=new Uint8Array(t.buffer,t.byteOffset+f+8,p-d-8)}return u}},i2.T.colr={parseTab:function(t,r,n){var i=i2.B,s=r;r+=2;var o=i.readUshort(t,r);r+=2;var a=i.readUint(t,r);r+=4;var u=i.readUint(t,r);r+=4;var l=i.readUshort(t,r);r+=2;for(var h={},c=s+a,d=0;d<o;d++)h["g"+i.readUshort(t,c)]=[i.readUshort(t,c+2),i.readUshort(t,c+4)],c+=6;var p=[];c=s+u;for(var d=0;d<l;d++)p.push(i.readUshort(t,c),i.readUshort(t,c+2)),c+=4;return[h,p]}},i2.T.cpal={parseTab:function(t,r,n){var i=i2.B,s=r,o=i.readUshort(t,r);if(r+=2,0==o){i.readUshort(t,r),r+=2,i.readUshort(t,r),r+=2;var a=i.readUshort(t,r);r+=2;var u=i.readUint(t,r);return r+=4,new Uint8Array(t.buffer,s+u,4*a)}throw o}},i2.T.GSUB={parseTab:function(t,r,n,i){var s=i2.B,o=s.readUshort;s.readUint;var a=r;o(t,a),o(t,a+=2),o(t,a+=2);var u=o(t,a+=2);o(t,a+=2),a+=2;var l={},h=o(t,a=r+u);a+=2;for(var c=0;c<h;c++){var d=s.readASCII(t,a,4);o(t,a+=4),a+=2,l[d]=!0}return l}},i2.T.fvar={parseTab:function(t,r,n,i){var s=i.name,o=r,a=i2.B,u=[],l=[];o+=8;var h=a.readUshort(t,o);o+=2,o+=2;var c=a.readUshort(t,o);o+=2;var d=a.readUshort(t,o);o+=2;for(var p=0;p<h;p++){var f=a.readASCII(t,o,4),g=a.readFixed(t,o+4),m=a.readFixed(t,o+8),y=a.readFixed(t,o+12),v=a.readUshort(t,o+16),b=a.readUshort(t,o+18);u.push([f,g,m,y,v,s["_"+b]]),o+=20}for(var p=0;p<c;p++){for(var x=a.readUshort(t,o),_=null,v=a.readUshort(t,o+2),D=[],A=0;A<h;A++)D.push(a.readFixed(t,o+4+4*A));o+=4+4*h,(3&d)==2&&(_=a.readUshort(t,o),o+=2),l.push([s["_"+x],v,D,_])}return[u,l]}},i2.T.gvar=function(){var t=i2.B;function r(r,n,i){for(var s=[],o=0;o<i;o++)s.push(t.readF2dot14(r,n+2*o));return s}function n(r,n,i){var s=r[n];if(n++,0==s)return[[],n];127<s&&(s=(127&s)<<8|r[n++]);for(var o=[],a=0;o.length<s;){var u=r[n];n++;var l=(128&u)!=0;u=(127&u)+1;for(var h=0;h<u;h++){var c=0;l?(c=t.readUshort(r,n),n+=2):(c=r[n],n++),a+=c,o.push(a)}}return[o,n]}return{parseTab:function(i,s,o,a){var u=s+4,l=t.readUshort(i,u);u+=2;var h=t.readUshort(i,u);u+=2;var c=t.readUint(i,u);u+=4;var d=t.readUshort(i,u);u+=2,t.readUshort(i,u),u+=2;var p=t.readUint(i,u);u+=4;for(var f=[],g=0;g<d+1;g++)f.push(t.readUint(i,u+4*g));var m=[],y=[],v=[];u=s+c;for(var g=0;g<h;g++){var b=r(i,u+g*l*2,l),x=[],_=[];m.push(b),y.push(x),v.push(_);for(var D=0;D<l;D++)x[D]=Math.min(b[D],0),_[D]=Math.max(b[D],0)}for(var A=new Int8Array(i.buffer),C=[],g=0;g<d;g++){u=s+p+f[g];var E=t.readUshort(i,u);u+=2;var w=32768&E;E&=4095;var S=t.readUshort(i,u),F=function(n,i,s,o,a){for(var u=[],l=0;l<s;l++){var h=t.readUshort(n,i);i+=2;var c=t.readUshort(n,i),d=61440&c;c&=4095,i+=2;var p=null,f=null,g=null;32768&d&&(p=r(n,i,o),i+=2*o),16384&d&&(f=r(n,i,o),i+=2*o),16384&d&&(g=r(n,i,o),i+=2*o),u.push([h,c,d,f,p,g])}return u}(i,u+=2,E,l),N=[];C.push(N),u=s+p+f[g]+S;var B=null;if(w){var k=n(i,u);B=k[0],u=k[1]}for(var M=0;M<E;M++){var T=F[M],I=u+T[0],O=B;if(8192&T[2]){var k=n(i,u);O=k[0],u=k[1]}for(var L=[];u<I;){var P=i[u++],R=(63&P)+1;if(128&P)for(var D=0;D<R;D++)L.push(0);else if(64&P){for(var D=0;D<R;D++)L.push(t.readShort(i,u+2*D));u+=2*R}else{for(var D=0;D<R;D++)L.push(A[u+D]);u+=R}}var z=T[1];if(N.push([[T[3]?T[3]:y[z],T[4]?T[4]:m[z],T[5]?T[5]:v[z]],L,0==O.length?null:O]),0!=O.length&&2*O.length!=L.length)throw"e"}}return C}}}(),i2.T.avar={parseTab:function(t,r,n,i){var s=r,o=i2.B,a=[];s+=6;var u=o.readUshort(t,s);s+=2;for(var l=0;l<u;l++){var h=o.readUshort(t,s);s+=2;var c=[];a.push(c);for(var d=0;d<h;d++){var p=o.readF2dot14(t,s),f=o.readF2dot14(t,s+2);s+=4,c.push(p,f)}}return a}},i2.T.HVAR={parseTab:function(t,r,n,i){var s=r,o=i2.B;s+=4;var a=o.readUint(t,s);s+=4;var u=o.readUint(t,s);s+=4;var l=o.readUint(t,s);s+=4;var h=o.readUint(t,s);if(s+=4,0!=l||0!=h)throw l;var c=s=r+a,d=o.readUshort(t,s);if(s+=2,1!=d)throw"e";var p=o.readUint(t,s);s+=4;var f=o.readUshort(t,s);s+=2;for(var g=[],m=0;m<f;m++)g.push(o.readUint(t,s+4*m));s+=4*f,s=c+p;var y=o.readUshort(t,s);s+=2;var v=o.readUshort(t,s);s+=2;for(var b=[],m=0;m<v;m++){var x=[[],[],[]];b.push(x);for(var _=0;_<y;_++)x[0].push(o.readF2dot14(t,s+0)),x[1].push(o.readF2dot14(t,s+2)),x[2].push(o.readF2dot14(t,s+4)),s+=6}for(var D=new Int8Array(t.buffer),A=[],m=0;m<g.length;m++){s=r+a+g[m];var C=[];A.push(C);var E=o.readUshort(t,s);s+=2;var w=o.readUshort(t,s);if(s+=2,32768&w)throw"e";var v=o.readUshort(t,s);s+=2;for(var S=[],_=0;_<v;_++)S.push(o.readUshort(t,s+2*_));s+=2*v;for(var F=0;F<E;F++){for(var N=[],B=0;B<v;B++)N.push(B<w?o.readShort(t,s):D[s]),s+=B<w?2:1;var k=Array(b.length);k.fill(0),C.push(k);for(var _=0;_<S.length;_++)k[S[_]]=N[_]}}s=r+u;var d=t[s++];if(0!=d)throw"e";var M=t[s++],T=o.readUshort(t,s);s+=2;for(var I=((48&M)>>4)+1,O=[],m=0;m<T;m++){var L=0;1==I?L=t[s++]:(L=o.readUshort(t,s),s+=2);var P=L>>(15&M)+1,R=L&(1<<(15&M)+1)-1;O.push(A[P][R])}return[b,O]}},i2.U=function(){var t,r,n=function(t,r,n){t.cmds.push("M"),t.crds.push(r,n)},i=function(t,r,n){t.cmds.push("L"),t.crds.push(r,n)},s=function(t,r,n,i,s,o,a){t.cmds.push("C"),t.crds.push(r,n,i,s,o,a)},o=function(t,r,n,i,s){t.cmds.push("Q"),t.crds.push(r,n,i,s)},a=function(t){t.cmds.push("Z")};function u(t,r,n){for(var i=0,s=~~(t.length/r);i+1!=s;){var o=i+(s-i>>>1);t[o*r]<=n?i=o:s=o}return i*r}for(var l=[9,10,11,12,13,32,133,160,5760,6158,8232,8233,8239,8288,12288,65279],h={},c=0;c<l.length;c++)h[l[c]]=1;for(var c=8192;c<=8205;c++)h[c]=1;function d(t,r){if(null==t._ctab){for(var n=t.cmap,i=-1,s=["p3e10","p0e4","p3e1","p1e0","p0e3","p0e1","p3e0","p3e5"],o=0;o<s.length;o++)if(null!=n.ids[s[o]]){i=n.ids[s[o]];break}if(-1==i)throw"no familiar platform and encoding!";t._ctab=n.tables[i]}var a=t._ctab,l=a.format,c=-1;if(0==l)c=r>=a.map.length?0:a.map[r];else if(4==l){var d=a.endCount;if(c=0,r<=d[d.length-1]){var p=u(d,1,r);(d[p]<r&&p++,r>=a.startCount[p])&&(c=65535&(0!=a.idRangeOffset[p]?a.glyphIdArray[r-a.startCount[p]+(a.idRangeOffset[p]>>1)-(a.idRangeOffset.length-p)]:r+a.idDelta[p]))}}else if(6==l){var f=r-a.firstCode,g=a.glyphIdArray;c=f<0||f>=g.length?0:g[f]}else if(12==l){var m=a.groups;if(c=0,r<=m[m.length-2]){var o=u(m,3,r);m[o]<=r&&r<=m[o+1]&&(c=m[o+2]+(r-m[o]))}}else throw"unknown cmap table format "+a.format;var y=t["SVG "],v=t.loca;return 0!=c&&null==t["CFF "]&&(null==y||null==y.entries[c])&&v&&v[c]==v[c+1]&&null==h[r]&&(c=0),c}function p(t,r,u,l){var h={cmds:[],crds:[]};t.fvar&&(null==l&&(l=t.fvar[1][t._index][2]),l=g(t,l));var c=t["SVG "],d=t["CFF "],m=t.COLR,y=t.CBLC,v=t.CBDT,b=t.sbix,x=window.UPNG,_=null;if(y&&x)for(var D=0;D<y.length;D++)y[D][0]<=r&&r<=y[D][1]&&(_=y[D]);if(_||b&&b[r]){if(_&&17!=_[2])throw"not a PNG";null==t.__tmp&&(t.__tmp={});var A=t.__tmp["g"+r];if(null==A){if(b)E=(C=b[r]).length;else{var C,E,w=_[3][r-_[0]]+5;E=v[w+1]<<16|v[w+2]<<8|v[w+3],w+=4,C=new Uint8Array(v.buffer,v.byteOffset+w,E)}for(var S="",D=0;D<E;D++)S+=String.fromCharCode(C[D]);A=t.__tmp["g"+r]="data:image/png;base64,"+btoa(S)}h.cmds.push(A);var F=1.15*t.head.unitsPerEm,N=Math.round(F),B=Math.round(F),k=Math.round(-(.15*B));
32h.crds.push(0,B+k,N,B+k,N,k,0,k)}else if(c&&c.entries[r]){var M=c.entries[r];if(null!=M){if("number"==typeof M){var T=c.svgs[M];if("string"==typeof T){var I=new DOMParser().parseFromString(T,"image/svg+xml");T=c.svgs[M]=I.getElementsByTagName("svg")[0]}M=i2.U.SVG.toPath(T,r),c.entries[r]=M}h=M}}else if(!0!=u&&m&&m[0]["g"+r]&&m[0]["g"+r][1]>1){function O(t){var r=t.toString(16);return(1==r.length?"0":"")+r}for(var L=t.CPAL,P=m[0]["g"+r],D=0;D<P[1];D++){var R=P[0]+D,z=m[1][2*R],U=4*m[1][2*R+1],$=p(t,z,z==r),j="#"+O(L[U+2])+O(L[U+1])+O(L[U+0]);h.cmds.push(j),h.cmds=h.cmds.concat($.cmds),h.crds=h.crds.concat($.crds),h.cmds.push("X")}}else if(d){var V=d.Private,G={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:V?V.defaultWidthX:0,open:!1};if(d.ROS){for(var q=0;d.FDSelect[q+2]<=r;)q+=2;V=d.FDArray[d.FDSelect[q+1]].Private}!function t(r,o,u,l,h){for(var c=o.stack,d=o.nStems,p=o.haveWidth,f=o.width,g=o.open,m=0,y=o.x,v=o.y,b=0,x=0,_=0,D=0,A=0,C=0,E=0,w=0,S=0,F=0,N=i2.T.CFF,B=l.nominalWidthX,k={val:0,size:0};m<r.length;){N.getCharString(r,m,k);var M=k.val;if(m+=k.size,"o1"==M||"o18"==M)c.length%2==0||p||(f=c.shift()+B),d+=c.length>>1,c.length=0,p=!0;else if("o3"==M||"o23"==M)c.length%2==0||p||(f=c.shift()+B),d+=c.length>>1,c.length=0,p=!0;else if("o4"==M)c.length>1&&!p&&(f=c.shift()+B,p=!0),g&&a(h),n(h,y,v+=c.pop()),g=!0;else if("o5"==M)for(;c.length>0;)y+=c.shift(),i(h,y,v+=c.shift());else if("o6"==M||"o7"==M)for(var T=c.length,I="o6"==M,O=0;O<T;O++){var L=c.shift();I?y+=L:v+=L,I=!I,i(h,y,v)}else if("o8"==M||"o24"==M){for(var T=c.length,P=0;P+6<=T;)b=y+c.shift(),x=v+c.shift(),_=b+c.shift(),D=x+c.shift(),y=_+c.shift(),v=D+c.shift(),s(h,b,x,_,D,y,v),P+=6;"o24"==M&&(y+=c.shift(),i(h,y,v+=c.shift()))}else if("o11"==M)break;else if("o1234"==M||"o1235"==M||"o1236"==M||"o1237"==M)"o1234"==M&&(b=y+c.shift(),x=v,_=b+c.shift(),D=x+c.shift(),S=_+c.shift(),F=D,A=S+c.shift(),C=D,E=A+c.shift(),w=v,y=E+c.shift(),s(h,b,x,_,D,S,F),s(h,A,C,E,w,y,v)),"o1235"==M&&(b=y+c.shift(),x=v+c.shift(),_=b+c.shift(),D=x+c.shift(),S=_+c.shift(),F=D+c.shift(),A=S+c.shift(),C=F+c.shift(),E=A+c.shift(),w=C+c.shift(),y=E+c.shift(),v=w+c.shift(),c.shift(),s(h,b,x,_,D,S,F),s(h,A,C,E,w,y,v)),"o1236"==M&&(b=y+c.shift(),x=v+c.shift(),_=b+c.shift(),D=x+c.shift(),S=_+c.shift(),F=D,A=S+c.shift(),C=D,E=A+c.shift(),w=C+c.shift(),y=E+c.shift(),s(h,b,x,_,D,S,F),s(h,A,C,E,w,y,v)),"o1237"==M&&(b=y+c.shift(),x=v+c.shift(),_=b+c.shift(),D=x+c.shift(),S=_+c.shift(),F=D+c.shift(),A=S+c.shift(),C=F+c.shift(),Math.abs((E=A+c.shift())-y)>Math.abs((w=C+c.shift())-v)?y=E+c.shift():v=w+c.shift(),s(h,b,x,_,D,S,F),s(h,A,C,E,w,y,v));else if("o14"==M){if(c.length>0&&4!=c.length&&!p&&(f=c.shift()+u.nominalWidthX,p=!0),4==c.length){var R=c.shift(),z=c.shift(),U=c.shift(),$=c.shift(),j=N.glyphBySE(u,U),V=N.glyphBySE(u,$);t(u.CharStrings[j],o,u,l,h),o.x=R,o.y=z,t(u.CharStrings[V],o,u,l,h)}g&&(a(h),g=!1)}else if("o19"==M||"o20"==M)c.length%2==0||p||(f=c.shift()+B),d+=c.length>>1,c.length=0,p=!0,m+=d+7>>3;else if("o21"==M)c.length>2&&!p&&(f=c.shift()+B,p=!0),v+=c.pop(),y+=c.pop(),g&&a(h),n(h,y,v),g=!0;else if("o22"==M)c.length>1&&!p&&(f=c.shift()+B,p=!0),y+=c.pop(),g&&a(h),n(h,y,v),g=!0;else if("o25"==M){for(;c.length>6;)y+=c.shift(),i(h,y,v+=c.shift());b=y+c.shift(),x=v+c.shift(),_=b+c.shift(),D=x+c.shift(),y=_+c.shift(),v=D+c.shift(),s(h,b,x,_,D,y,v)}else if("o26"==M)for(c.length%2&&(y+=c.shift());c.length>0;)b=y,x=v+c.shift(),_=b+c.shift(),D=x+c.shift(),y=_,v=D+c.shift(),s(h,b,x,_,D,y,v);else if("o27"==M)for(c.length%2&&(v+=c.shift());c.length>0;)b=y+c.shift(),x=v,_=b+c.shift(),D=x+c.shift(),y=_+c.shift(),v=D,s(h,b,x,_,D,y,v);else if("o10"==M||"o29"==M){var G="o10"==M?l:u;if(0==c.length)console.log("error: empty stack");else{var q=c.pop(),W=G.Subrs[q+G.Bias];o.x=y,o.y=v,o.nStems=d,o.haveWidth=p,o.width=f,o.open=g,t(W,o,u,l,h),y=o.x,v=o.y,d=o.nStems,p=o.haveWidth,f=o.width,g=o.open}}else if("o30"==M||"o31"==M){var T,H=c.length,P=0,Z="o31"==M;for(T=-3&H,P+=H-T;P<T;)Z?(b=y+c.shift(),x=v,_=b+c.shift(),v=(D=x+c.shift())+c.shift(),T-P==5?(y=_+c.shift(),P++):y=_,Z=!1):(b=y,x=v+c.shift(),_=b+c.shift(),D=x+c.shift(),y=_+c.shift(),T-P==5?(v=D+c.shift(),P++):v=D,Z=!0),s(h,b,x,_,D,y,v),P+=4}else if("o"==(M+"").charAt(0))throw console.log("Unknown operation: "+M,r),M;else c.push(M)}o.x=y,o.y=v,o.nStems=d,o.haveWidth=p,o.width=f,o.open=g}(d.CharStrings[r],G,d,V,h)}else t.glyf&&function t(r,s,u,l){var h=s.glyf[r];null==h&&(h=s.glyf[r]=i2.T.glyf._parseGlyf(s,r)),null!=h&&(h.noc>-1?function(t,r,s,u,l){var h=t.xs,c=t.ys;if(r.fvar&&l){h=h.slice(0),c=c.slice(0);for(var d=r.gvar,p=d?d[s]:null,g=0;g<p.length;g++){var m=f(p[g][0],l);if(!(m<1e-9)){var y=p[g][1],v=p[g][2];if(v&&(y=p[g][1]=function(t,r,n,i,s){var o=n.length,a=Array(2*o+8);a.fill(0);for(var u=0;u<o;u++){var l=0,h=0,c=r.indexOf(u);if(-1!=c)l=t[c],h=t[r.length+c];else{for(var d=0;s[d]<u;)d++;for(var p=0==d?0:s[d-1]+1,f=s[d],g=-1,m=-1,y=0;y<r.length;y++){var v=r[y];v<p||v>f||v>=o||(g=y,-1==m&&(m=y))}for(var y=0;y<r.length;y++){var v=r[y];if(!(v<p)&&!(v>f)&&!(v>=o)&&(v<u&&(g=y),u<v)){m=y;break}}for(var b=0;b<2;b++){var x=0==b?n:i,_=b*r.length,D=0,A=x[r[g]],C=x[r[m]],E=x[u],w=t[_+g],S=t[_+m];if(A==C)D=w==S?w:0;else if(E<=Math.min(A,C))D=A<C?w:S;else if(Math.max(A,C)<=E)D=A<C?S:w;else{var F=(E-A)/(C-A);D=F*S+(1-F)*w}0==b?l=D:h=D}}a[u]=l,a[o+4+u]=h}return a}(y,v,h,c,t.endPts),p[g][2]=null),y.length==2*h.length+8)for(var b=0;b<h.length;b++)h[b]+=m*y[b],c[b]+=m*y[b+h.length+4]}}}for(var x=0;x<t.noc;x++){for(var _=0==x?0:t.endPts[x-1]+1,D=t.endPts[x],b=_;b<=D;b++){var A=b==_?D:b-1,C=b==D?_:b+1,E=1&t.flags[b],w=1&t.flags[A],S=1&t.flags[C],F=h[b],N=c[b];
32if(b==_)if(E)if(w)n(u,h[A],c[A]);else{n(u,F,N);continue}else w?n(u,h[A],c[A]):n(u,Math.floor((h[A]+F)*.5),Math.floor((c[A]+N)*.5));E?w&&i(u,F,N):S?o(u,F,N,h[C],c[C]):o(u,F,N,Math.floor((F+h[C])*.5),Math.floor((N+c[C])*.5))}a(u)}}(h,s,r,u,l):function(r,n,i,s,o){var a=[0,0,0,0,0,0],u=[0,0,0,0,0,0],l=r.parts.length;if(n.fvar&&o)for(var h=n.gvar,c=h?h[i]:null,d=0;d<c.length;d++){var p=f(c[d][0],o);if(!(p<1e-6)){var g=c[d][1],m=c[d][2];if(null==m)for(var y=0;y<l;y++)a[y]+=p*g[y],u[y]+=p*g[y+l+4];else for(var v=0;v<m.length;v++){var y=m[v];a[y]+=p*g[0],u[y]+=p*g[0+l]}}}for(var v=0;v<l;v++){var b={cmds:[],crds:[]},x=r.parts[v];t(x.glyphIndex,n,b,o);for(var _=x.m,D=_.tx+a[v],A=_.ty+u[v],y=0;y<b.crds.length;y+=2){var C=b.crds[y],E=b.crds[y+1];s.crds.push(C*_.a+E*_.c+D),s.crds.push(C*_.b+E*_.d+A)}for(var y=0;y<b.cmds.length;y++)s.cmds.push(b.cmds[y])}}(h,s,r,u,l))}(r,t,h,l);return{cmds:h.cmds,crds:h.crds}}function f(t,r){r.length;for(var n=1,i=t[0],s=t[1],o=t[2],a=0;a<r.length;a++)n*=i[a]>s[a]||s[a]>o[a]||i[a]<0&&o[a]>0&&0!=s[a]||0==s[a]?1:r[a]<i[a]||r[a]>o[a]?0:r[a]==s[a]?1:r[a]<s[a]?(r[a]-i[a])/(s[a]-i[a]):(o[a]-r[a])/(o[a]-s[a]);return n}function g(t,r){for(var n=t.fvar,i=t.avar,s=n?n[0]:null,o=[],a=0;a<s.length;a++){var u=s[a][1],l=s[a][2],h=s[a][3],c=Math.max(u,Math.min(h,r[a]));if(c<l?o[a]=(l-c)/(u-l):c>l?o[a]=(c-l)/(h-l):o[a]=0,i&&-1!=o[a]){for(var d=i[a],p=0;p<d.length&&!(d[p]>=o[a]);p+=2);var f=(o[a]-d[p-2])/(d[p]-d[p-2]);o[a]=f*d[p+1]+(1-f)*d[p-1]}}return o}return{shape:function(t,r,n){null==n&&(n={}),n.ltr,n.fts;var i=n.axs;t.fvar&&null==i&&(i=t.fvar[1][t._index][2]);var s=t.HVAR;i&&s&&(i=g(t,i));for(var o=[],a=0;a<r.length;a++){var u=r.codePointAt(a);u>65535&&a++,o.push(d(t,u))}for(var l=[],a=0;a<o.length;a++){var h=function(t,r,n,i){var s=r[n],o=r[n+1],a=t.kern;if(a){var u=a.glyph1.indexOf(s);if(-1!=u){var l=a.rval[u].glyph2.indexOf(o);if(-1!=l)return[0,0,a.rval[u].vals[l],0]}}return[0,0,0,0]}(t,o,a),c=o[a],p=t.hmtx.aWidth[c]+h[2];if(s&&s[1][c])for(var m=s[1][c],y=0;y<s[0].length;y++)p+=f(s[0][y],i)*m[y];l.push({g:c,cl:a,dx:0,dy:0,ax:p,ay:0})}return l},shapeToPath:function(t,r,n){var i,s,o=[],a=[],u=0,l=0;n&&(i=n.clr,s=n.axs);for(var h=0;h<r.length;h++){for(var c=r[h],d=p(t,c.g,!1,s),f=d.crds,g=0;g<f.length;g+=2)a.push(f[g]+u+c.dx),a.push(f[g+1]+l+c.dy);i&&o.push(i);for(var g=0;g<d.cmds.length;g++)o.push(d.cmds[g]);var m=o.length;i&&0!=m&&"X"!=o[m-1]&&o.push("X"),u+=c.ax,l+=c.ay}return{cmds:o,crds:a}},codeToGlyph:d,glyphToPath:p,pathToSVG:function(t,r){var n=t.cmds,i=t.crds;function s(t){return parseFloat(t.toFixed(r))}null==r&&(r=5);for(var o=[],a=0,u={M:2,L:2,Q:4,C:6},l=0,h=0,c=0,d=0,p=0,f=0,g=0;g<n.length;g++){var m,y,v,b,x=n[g],_=u[x]?u[x]:0,D=[];if("L"==x)m=i[a]-l,y=i[a+1]-h,v=s(m+c),b=s(y+d),"Z"==n[g+1]&&i[a]==p&&i[a+1]==f?(v=m,b=y):0==v&&0==b||(0==v?D.push("v",b):0==b?D.push("h",v):D.push("l",v,b));else{D.push(x.toLowerCase());for(var A=0;A<_;A+=2)m=i[a+A]-l,y=i[a+A+1]-h,v=s(m+c),b=s(y+d),D.push(v,b)}0!=_&&(c+=m-v,d+=y-b);for(var A=0;A<D.length;A++)o.push(D[A]);0!=_&&(a+=_,l=i[a-2],h=i[a-1]),"M"==x&&(p=l,f=h),"Z"==x&&(l=p,h=f)}return function(t){for(var r=[],n=!1,i="",s=0;s<t.length;s++){var o=t[s],a="number"==typeof o;if(!a){if(o==i&&1==o.length&&"m"!=o)continue;i=o}n&&a&&o>=0&&r.push(" "),r.push(o),n=a}return r.join("")}(o)},SVGToPath:function(t){var r={cmds:[],crds:[]};return i2.U.SVG.svgToPath(t,r),{cmds:r.cmds,crds:r.crds}},pathToContext:function(n,i){for(var s=0,o=n.cmds,a=n.crds,u=0;u<o.length;u++){var l=o[u];if("M"==l)i.moveTo(a[s],a[s+1]),s+=2;else if("L"==l)i.lineTo(a[s],a[s+1]),s+=2;else if("C"==l)i.bezierCurveTo(a[s],a[s+1],a[s+2],a[s+3],a[s+4],a[s+5]),s+=6;else if("Q"==l)i.quadraticCurveTo(a[s],a[s+1],a[s+2],a[s+3]),s+=4;else if("d"==l[0]){var h=window.UPNG,c=a[s],d=a[s+1],p=a[s+2],f=a[s+3],g=a[s+4],m=a[s+5],y=a[s+6],v=a[s+7];if(s+=8,null==h){i.moveTo(c,d),i.lineTo(p,f),i.lineTo(g,m),i.lineTo(y,v),i.closePath();continue}for(var b=p-c,x=f-d,_=y-c,D=v-d,A=atob(l.slice(22)),C=new Uint8Array(A.length),E=0;E<A.length;E++)C[E]=A.charCodeAt(E);for(var w=h.decode(C.buffer),S=w.width,F=w.height,N=new Uint8Array(h.toRGBA8(w)[0]),B=i.getTransform(),k=Math.sqrt(Math.abs(B.a*B.d-B.b*B.c))*Math.sqrt(_*_+D*D)/F;k<.5;){var M=function(t,r,n,i){for(var s=r>>1,o=n>>1,a=new Uint8Array(s*o*4),u=new Uint32Array(t.buffer),l=new Uint32Array(a.buffer),h=0;h<o;h++)for(var c=0;c<s;c++){var d=h*s+c,p=(h<<1)*r+(c<<1),f=u[p],g=u[p+1],m=u[p+r],y=u[p+r+1],v=f>>>24,b=g>>>24,x=m>>>24,_=y>>>24,D=v+b+x+_;if(1020==D){var A=(f>>>0&255)+(g>>>0&255)+(m>>>0&255)+(y>
32>>0&255)+2>>>2,C=(f>>>8&255)+(g>>>8&255)+(m>>>8&255)+(y>>>8&255)+2>>>2,E=(f>>>16&255)+(g>>>16&255)+(m>>>16&255)+(y>>>16&255)+2>>>2;l[d]=-0x1000000|E<<16|C<<8|A}else if(0==D)l[d]=0;else{var A=(f>>>0&255)*v+(g>>>0&255)*b+(m>>>0&255)*x+(y>>>0&255)*_,C=(f>>>8&255)*v+(g>>>8&255)*b+(m>>>8&255)*x+(y>>>8&255)*_,E=(f>>>16&255)*v+(g>>>16&255)*b+(m>>>16&255)*x+(y>>>16&255)*_,w=1/D;A=~~(A*w+.5),C=~~(C*w+.5),E=~~(E*w+.5),l[d]=D+2>>>2<<24|E<<16|C<<8|A}}return{buff:a,w:s,h:o}}(N,S,F);N=M.buff,S=M.w,F=M.h,k*=2}null==t&&(r=(t=document.createElement("canvas")).getContext("2d")),(t.width!=S||t.height!=F)&&(t.width=S,t.height=F),r.putImageData(new ImageData(new Uint8ClampedArray(N.buffer),S,F),0,0),i.save(),i.transform(b,x,_,D,c,d),i.scale(1/S,1/F),i.drawImage(t,0,0),i.restore()}else if("#"==l.charAt(0)||"r"==l.charAt(0))i.beginPath(),i.fillStyle=l;else if("O"==l.charAt(0)&&"OX"!=l){i.beginPath();var T=l.split("-");i.lineWidth=parseFloat(T[2]),i.lineCap=["butt","round","square"][parseFloat(T[3])],i.lineJoin=["miter","round","bevel"][parseFloat(T[4])],i.miterLimit=parseFloat(T[5]),i.lineDashOffset=parseFloat(T[6]),i.setLineDash(T[7].split(",").map(parseFloat)),i.strokeStyle=T[1]}else"Z"==l?i.closePath():"X"==l?i.fill():"OX"==l&&i.stroke()}},initHB:function(t,r){var n=function(t){var r=0;return(0xffffff80&t)==0?r=1:(0xfffff800&t)==0?r=2:(0xffff0000&t)==0?r=3:(0xffe00000&t)==0&&(r=4),r};fetch(t).then(function(t){return t.arrayBuffer()}).then(function(t){return WebAssembly.instantiate(t)}).then(function(t){console.log("HB ready");var i,s,o,a,u,l,h,c,d,p,f,g=t.instance.exports,m=g.memory;i2.U.shapeHB=(s=function(t){for(var r=g.hb_buffer_get_length(t),n=[],i=g.hb_buffer_get_glyph_infos(t,0)>>>2,s=g.hb_buffer_get_glyph_positions(t,0)>>>2,o=0;o<r;++o){var l=i+5*o,h=s+5*o;n.push({g:a[l+0],cl:a[l+2],ax:u[h+0],ay:u[h+1],dx:u[h+2],dy:u[h+3]})}return n},function(t,r,y){var v=t._data,b=t.name.postScriptName,x=y.ltr,_=y.fts,D=y.axs;if(t.fvar&&null==D&&(D=t.fvar[1][t._index][2]),o=new Uint8Array(m.buffer),a=new Uint32Array(m.buffer),u=new Int32Array(m.buffer),l=new Float32Array(m.buffer),h!=b&&(null!=c&&(g.hb_blob_destroy(c),g.free(d),g.hb_face_destroy(p),g.hb_font_destroy(f)),d=g.malloc(v.byteLength),o.set(v,d),c=g.hb_blob_create(d,v.byteLength,2,0,0),p=g.hb_face_create(c,t._index),f=g.hb_font_create(p),h=b),null==window.TextEncoder)return void alert("Your browser is too old. Please, update it.");null==i&&(i=new window.TextEncoder("utf8"));var A=g.hb_buffer_create(),C=i.encode(r),E=C.length,w=g.malloc(E);o.set(C,w),g.hb_buffer_add_utf8(A,w,E,0,E),g.free(w);var S=i2.B,F=0;if(_){F=g.malloc(16*_.length);for(var N=0;N<_.length;N++){var B=_[N],k=F+16*N,M=k>>>2;S.writeASCII(o,k,B[0].split("").reverse().join("")),a[M+1]=B[1],a[M+2]=B[2],a[M+3]=B[3]}}var T=0;if(D&&t.fvar){var I=t.fvar[0];T=g.malloc(8*D.length);for(var N=0;N<D.length;N++){var k=T+8*N,M=k>>>2;S.writeASCII(o,k,I[N][0].split("").reverse().join("")),l[M+1]=D[N]}}D&&g.hb_font_set_variations(f,T,D.length),g.hb_buffer_set_direction(A,x?4:5),g.hb_buffer_guess_segment_properties(A),g.hb_shape(f,A,F,_?_.length:0);var O=s(A);g.hb_buffer_destroy(A),_&&g.free(F),D&&g.free(T);var L=O.slice(0);x||L.reverse();for(var P=0,R=0,N=1;N<L.length;N++){for(var z=L[N],U=z.cl;;){var $=r.codePointAt(P),j=n($);if(R+j<=U)R+=j,P+=$<=65535?1:2;else break}z.cl=P}return O}),r()})}}}();var i5=n(2374);let i3={M:2,L:2,C:6,Q:4},i8=["ttf","otf","woff"],i4=RegExp(`\\.(${i8.join("|")})`,"i"),i6=RegExp(`([^/]+)(\\.(?:${i8.join("|")}))`,"i"),i9="Sorry, only TTF, OTF and WOFF files are supported.",i7=["weight","stretch","style"];class se{constructor(t,r,n,i,s){if(!(r instanceof FontFace))throw Error("FontFace is required");this._pInst=t,this.name=n,this.path=i,this.data=s,this.face=r}static hasGlyphData(t){let{font:r}=t;return"object"==typeof r&&void 0!==r.data}fontBounds(t,r,n,i,s,o){({width:i,height:s,options:o}=this._parseArgs(i,s,o));let a=o?.graphics?._renderer||this._pInst._renderer;if(!a)throw Error("p5 or graphics required for fontBounds()");return a.fontBounds(t,r,n,i,s)}textBounds(t,r,n,i,s,o){({width:i,height:s,options:o}=this._parseArgs(i,s,o));let a=o?.graphics?._renderer||this._pInst._renderer;if(!a)throw Error("p5 or graphics required for fontBounds()");return a.textBounds(t,r,n,i,s)}textToPaths(t,r,n,i,s,o){if({width:i,height:s,options:o}=this._parseArgs(i,s,o),!this.data)throw Error('No font data available for "'+this.name+'"\nTry downloading a local copy of the font file');return this._lineateAndPathify(t,r,n,i,s,o).map(t=>t.glyphs).flat().map(t=>t.path.commands).flat()}textToPoints(t,r,n,i,s,o){return this.textToContours(t,r,n,i,s,o).reduce((t,r)=>(t.push(...r),t),[])}textToContours(t,r=0,n=0,i,s,o){({width:i,height:s,options:o}=this._parseArgs(i,s,o));let a=this.textToPaths(t,r,n,i,s,o),u=[];for(let t of a)"M"===t[0]&&u.push([]),u[u.length-1].push(t);return u.map(t=>(function(t,r,n){let i=(t,r)=>{let n=t.length;return t[r<0?r%n+n:r%n]},s=(0,i5.createFromCommands)(sn(t)),o=((t,r)=>{if("object"!=typeof t)t=r;else for(let n in r)void 0===t[n]&&(t[n]=r[n]);return t})(r,{sampleFactor:.1,simplifyThreshold:0}),a=Math.max(1,Math.ceil(s.getTotalLength()*o.sampleFactor)),u=[],l=n._pInst.angleMode(),h=n._pInst.DEGREES;for(let t=0;t<a;t++){let r=s.getTotalLength()*(1===a?0:t/(a-1));u.push({...s.getPointAtLength(r),get angle(){let t=s.getAngleAtLength(r);if(l===h)return 180*t/Math.PI;return t},get alpha(){return this.angle}})}return o.simplifyThreshold&&((t,r)=>{r=r||0;for(let n=t.length-1;t.length>3&&n>=0;--n)collinear(i(t,n-1),i(t,n),i(t,n+1),r)&&t.splice(n%t.length,1)})(u,o.simplifyThreshold),u})(t,o,this))}textToModel(t,r,n,i,s,o){({width:i,height:s,options:o}=this._parseArgs(i,s,o));let a=o?.extrude||0,u=this.textToContours(t,r,n,i,s,o),l=this._pInst.buildGeometry(()=>
32{if(0===a){let t=this._pInst._renderer._validateFaces;for(let t of(this._pInst._renderer._validateFaces=!0,this._pInst.beginShape(),this._pInst.normal(0,0,1),u)){for(let{x:r,y:n}of(this._pInst.beginContour(),t))this._pInst.vertex(r,n);this._pInst.endContour(this._pInst.CLOSE)}this._pInst.endShape(),this._pInst._renderer._validateFaces=t}else{let t=this._pInst._renderer._validateFaces;for(let t of(this._pInst._renderer._validateFaces=!0,[1,-1])){for(let r of(this._pInst.beginShape(),u)){for(let{x:n,y:i}of(this._pInst.beginContour(),r))this._pInst.vertex(n,i,t*a*.5);this._pInst.endContour(this._pInst.CLOSE)}this._pInst.endShape()}for(let r of(this._pInst._renderer._validateFaces=t,u)){for(let t of(this._pInst.beginShape(this._pInst.QUAD_STRIP),r))for(let r of[-1,1])this._pInst.vertex(t.x,t.y,r*a*.5);this._pInst.endShape()}}});if(0!==a){for(let t of(l.computeNormals(),l.faces))if(t.every(t=>l.vertices[t].z<=-(.5*a)+.1)){for(let r of t)l.vertexNormals[r].set(0,0,-1);t.reverse()}}return l}variations(){let t={};if(this.data){let r=this.face?.axes;r&&r.forEach(r=>{t[r.tag]=r.value})}return i7.forEach(r=>{let n=this.face[r];"normal"!==n&&(t[r]=t[r]||n)}),t}metadata(){let t=this.data?.name||{};for(let r in this.face)/^load/.test(r)||(t[r]=t[r]||this.face[r]);return t}static async list(t=!1){if(t){console.log("There are",document.fonts.size,"font-faces\n");let t=0;for(let r of document.fonts.values()){for(let t in console.log("FontFace: {"),r)console.log("  "+t+": "+r[t]);console.log("}\n"),"loaded"===r.status&&t++}console.log(t+" loaded")}return await Array.from(document.fonts)}_verticalAlign(t){let{sCapHeight:r}=this.data?.["OS/2"]||{},{unitsPerEm:n=1e3}=this.data?.head||{},{ascender:i=0,descender:s=0}=this.data?.hhea||{};return((r||i+s)/2-i/2)*t/n}_lineateAndPathify(t,r,n,i,s,o={}){let a=o?.graphics?._renderer||this._pInst._renderer,u=a.drawingContext.textBaseline,{lines:l,bounds:h}=a._computeBounds(iJ._FONT_BOUNDS,t,r,n,i,s,{ignoreRectMode:!0,...o});l=this._position(a,l,h,i,s);let c=this.data?.head?.unitsPerEm||1e3,d=a.states.textSize/c,p=this._currentAxes(a),f=l.map(t=>this._lineToGlyphs(t,{scale:d,axs:p}));return a.drawingContext.textBaseline=u,f}_currentAxes(t){let r;return(this.data?.fvar?.length??0)>0&&(r=this.data.fvar[0].map(([r,n,i,s,o,a])=>{if(!t)return i;if("wght"===r)return t.states.fontWeight;if("wdth"===r)return 100;if(!t.textCanvas().style.fontVariationSettings)return i;{let n=RegExp(`\\b${r}s+(d+)`).exec(t.textCanvas().style.fontVariationSettings);return n?parseInt(n[1]):i}})),r}_textToPathPoints(t,r,n,i,s,o){({width:i,height:s,options:o}=this._parseArgs(i,s,o));let a=this.textToPaths(t,r,n,i,s,o),u=(t,r,n,i)=>{if(fn.dist(r.x,r.y,n.x,n.y)>i){let s={x:(r.x+n.x)/2,y:(r.y+n.y)/2};t.push(s),u(t,r,s,i),u(t,s,n,i)}},l=[],{textSize:h}=this._pInst._renderer.states,c=h/this.data.head.unitsPerEm*500;for(let t=0;t<a.length;t++){let{type:r,data:n}=a[t];if("Z"!==r){let t={x:n[n.length-2],y:n[n.length-1]};"L"===r&&l.length&&!o?.nodivide>0&&u(l,l[l.length-1],t,c),l.push(t)}}return l}_parseArgs(t,r,n={}){return"object"==typeof t?(n=t,t=r=void 0):"object"==typeof r&&(n=r,r=void 0),{width:t,height:r,options:n}}_position(t,r,n,i,s){let{textAlign:a,textLeading:u}=t.states,l=this._measureTextDefault(t,"X").fontBoundingBoxAscent;return r.map((r,h)=>{let c=n.x,d=n.y+h*u+l,p=t._fontWidthSingle(r);if(a===o.C?c+=(n.w-p)/2:a===o.R&&(c+=n.w-p),void 0!==i)switch(t.states.rectMode){case o.C:c-=i/2,d-=s/2;break;case o.a:c-=i,d-=s}return{text:r,x:c,y:d}})}_lineToGlyphs(t,{scale:r=1,axs:n}={}){if(!this.data)throw Error('No font data available for "'+this.name+'"\nTry downloading a local copy of the font file');let i=i2.U.shape(this.data,t.text,{axs:n});return t.glyphShapes=i,t.glyphs=this._shapeToPaths(i,t,{scale:r,axs:n}),t}_positionGlyphs(t,r){let n=r?.graphics?._renderer||this._pInst._renderer,i=this._currentAxes(n),s=i2.U.shape(this.data,t,{axs:i}),o=[],a=0;for(let t of s)o.push({x:a,index:t.g,shape:t}),a+=t.ax;return o}_singleShapeToPath(t,{scale:r=1,x:n=0,y:i=0,lineX:s=0,lineY:o=0,axs:a}={}){let u=this.data,l=0,{g:h,ax:c,ay:d,dx:p,dy:f}=t,{crds:g,cmds:m}=i2.U.glyphToPath(u,h,!0,a),y={path:{commands:[]}};for(let t=0;t<m.length;t++){let a=m[t],u=[a];if(a in i3){let t=i3[a];for(let a=0;a<t;a+=2){let t=g[a+l]+n+p,h=g[a+l+1]+i+f,c=s+t*r,d=o+-(h*r);u.push(c),u.push(d)}l+=t}y.path.commands.push(u)}return{glyph:y,ax:c,ay:d}}_shapeToPaths(t,r,{scale:n=1,axs:i}={}){let s=0,o=0,a=[];if(t.length!==r.text.length)throw Error("Invalid shape data");for(let u=0;u<t.length;u++){let{glyph:l,ax:h,ay:c}=this._singleShapeToPath(t[u],{scale:n,x:s,y:o,lineX:r.x,lineY:r.y,axs:i});a.push(l),s+=h,o+=c}return a}_measureTextDefault(t,r){let{textAlign:n,textBaseline:i}=t.states,s=t.textDrawingContext();s.textAlign="left",s.textBaseline="alphabetic";let o=s.measureText(r);return s.textAlign=n,s.textBaseline=i,o}drawPaths(t,r,n){t.strokeStyle=n?.stroke||t.strokeStyle,t.fillStyle=n?.fill||t.fillStyle,t.beginPath(),r.forEach(([r,...n])=>{"M"===r?t.moveTo(...n):"L"===r?t.lineTo(...n):"C"===r?t.bezierCurveTo(...n):"Q"===r?t.quadraticCurveTo(...n):"Z"===r&&t.closePath()}),n?.fill&&t.fill(),n?.stroke&&t.stroke()}_pathsToCommands(t,r){let n=[];for(let i=0;i<t.length;i++){let{x:s,y:o,path:a}=t[i],{crds:u,cmds:l}=a;for(let t=0,i=0;i<l.length;i++){let a=l[i],h={type:a,data:[]};if("M"==a||"L"==a)h.data.push(s+u[t]*r,o+-(u[t+1]*r)),t+=2;else if("C"==a){for(let n=0;n<6;n+=2)h.data.push(s+u[t+n]*r,o+-(u[t+n+1]*r));t+=6}else if("Q"==a){for(let n=0;n<4;n+=2)h.data.push(s+u[t+n]*r,o+-(u[t+n+1]*r));t+=4}n.push(h)}}return n}}async function st(t,r,n,i,s){let o=function(t,r,n,i){t.includes(" ")&&(t="'"+t+"'");let s=i?._compressedData??i?._data;if(!s){if(!i4.test(r))throw Error(i9);r.startsWith("url(")||(r="url("+r+")"),s=r}if((i?.fvar?.length??0)>0)for(let[t,r,s,o,a,u]of(n=n||{}
32,i.fvar[0]))"wght"===t?n.weight=`${r} ${o}`:"wdth"===t&&(n.stretch=`${r}% ${o}%`);let o=new FontFace(t,s,n);if("error"===o.status)throw Error('Failed to create FontFace for "'+t+'"');return o}(r,n,i,s);return"loaded"!==o.status&&await o.load(),document.fonts.add(o),await document.fonts.ready,new se(t,o,r,n,s)}function sr(t,r){t.Font=se,r.parseFontData=async function(t){let n=t instanceof Uint8Array?t:await r.loadBytes(t);if(!n)throw Error("Failed to load font data");let i=i2.parse(n);if(0===i.length||void 0===i[0].cmap)throw Error("parsing font data");return i[0]},r.loadFont=async function(...t){let n,{path:i,name:s,success:o,error:a,options:{sets:u,...l}={}}=function(...t){let r,n,i,s,o=t.shift();("string"!=typeof o||0===o.length)&&p5._friendlyError(i9,"p5.loadFont"),"string"==typeof t[0]&&(r=t.shift());for(let r=0;r<t.length;r++){let o=t[r];"function"==typeof o?n?i=o:n=o:"object"==typeof o&&(s=o)}return{path:o,name:r,success:n,error:i,options:s}}(...t),h=i.includes("@font-face");if(!h){let t=await fetch(i,{method:"HEAD"});t.headers.get("content-type")?.startsWith("text/css")&&(h=!0,i=await fetch(i).then(t=>t.text()))}if(h){let t,n=new CSSStyleSheet;await n.replace(i);let s=[];for(let t of n.cssRules)if(t instanceof CSSFontFaceRule){var c;let n=t.style,i=((c=n.getPropertyValue("font-family")).startsWith('"')||c.startsWith("'"))&&c.at(0)===c.at(-1)?c.slice(1,-1).replace(/\/(['"])/g,"$1"):c,o=n.getPropertyValue("src"),a={...l||{}};for(let t of n)"font-family"!==t&&"src"!==t&&(a[t.replace(/^font-/,"").split("-").map((t,r)=>0===r?t:`${t[0].toUpperCase()}${t.slice(1)}`).join("")]=n.getPropertyValue(t));s.push({name:i,src:o,fontDescriptors:a,loadWithData:async()=>{let t;try{let n=/url\(([^\)]+)\)/.exec(o);if(n){let i=n[1];/^['"]/.exec(i)&&i.at(0)===i.at(-1)&&(i=i.slice(1,-1)),t=await r.parseFontData(i)}}catch(t){}return st(this,i,o,a,t)},loadWithoutData:()=>st(this,i,o,a)})}let o=((u=u||["latin"])instanceof Array?u:[u]).map(t=>t.toLowerCase()),a=i0.filter(t=>o.some(r=>t.category.includes(r)&&t.category.includes("ext")===r.includes("ext"))),h=new Set(iQ.T.parse(a.map(t=>`U+${t.hexrange[0]}-${t.hexrange[1]}`))),d=0,p=0;for(let r of s){if(!r.fontDescriptors.unicodeRange)continue;let n=[...new Set(iQ.T.parse(r.fontDescriptors.unicodeRange.split(/,\s*/g))).values()].filter(t=>h.has(t)).length,i={style:"normal",weight:400,...l},s=Object.keys(r.fontDescriptors).filter(t=>r.fontDescriptors[t]===i[t]).length;(s>p||s===p&&n>=d)&&(p=s,d=n,t=r)}let f=t||s.at(-1);for(let t of s)t!==f&&t.loadWithoutData();return f?.loadWithData()}try{let t=await r.parseFontData(i);s=s||function(t,r){let n,i=t?.name;if(i){if(i.fullName)return i.fullName;i.familyName&&(n=i.familyName)}if(!n){let t=i6.exec(r);n=t&&t.length>=3?t[1]:r}return n.includes(" ")&&(n=n.replace(/ /g,"_")),n}(t,i),n=await st(this,s,i,l,t)}catch(r){let t=s||i.substring(i.lastIndexOf("/")+1).replace(/\.[^/.]+$/,"");console.warn(`WARN: No glyph data for '${t}', retrying as FontFace`);try{n=await st(this,t,i,l)}catch(t){if(a)return a(t);throw t}}return o?o(n):n}}let sn=t=>t.map(t=>{let r=t[0];switch(r){case"Z":return{type:r};case"M":case"L":{let[,n,i]=t;return{type:r,x:n,y:i}}case"Q":{let[,n,i,s,o]=t;return{type:r,x1:n,y1:i,x:s,y:o}}case"C":{let[,n,i,s,o,a,u]=t;return{type:r,x1:n,y1:i,x2:s,y2:o,x:a,y:u}}default:throw Error(`Unexpected path command: ${r}`)}});"undefined"!=typeof p5&&sr(p5,p5.prototype);var si=n(2455),ss="// Based on https://github.com/patriciogonzalezvivo/lygia/blob/main/generative/noise.glsl (MIT)\n// Adapted for use in p5.strands\n\nvec2 random2(vec2 st) {\n  st = vec2(dot(st, vec2(127.1, 311.7)),\n            dot(st, vec2(269.5, 183.3)));\n  return -1.0 + 2.0 * fract(sin(st) * 43758.5453123);\n}\n\nfloat baseNoise(vec2 st) {\n  vec2 i = floor(st);\n  vec2 f = fract(st);\n\n  vec2 a = random2(i);\n  vec2 b = random2(i + vec2(1.0, 0.0));\n  vec2 c = random2(i + vec2(0.0, 1.0));\n  vec2 d = random2(i + vec2(1.0, 1.0));\n\n  vec2 u = f * f * (3.0 - 2.0 * f);\n\n  return mix(mix(dot(a, f - vec2(0.0, 0.0)), \n                 dot(b, f - vec2(1.0, 0.0)), u.x),\n             mix(dot(c, f - vec2(0.0, 1.0)), \n                 dot(d, f - vec2(1.0, 1.0)), u.x), u.y);\n}\n\n// Fractal noise using 4 octaves\nfloat noise(vec2 st) {\n  float result = 0.0;\n  float amplitude = 1.0;\n  float frequency = 1.0;\n\n  for (int i = 0; i < 4;
32 i++) {\n    result += amplitude * baseNoise(st * frequency);\n    frequency *= 2.0;\n    amplitude *= 0.5;\n  }\n\n  return result;\n}\n";function so(t,r){let n,i,s=t.Shader.prototype.modify;function o(t){switch(t){case"+":return"add";case"-":return"sub";case"*":return"mult";case"/":return"div";case"%":return"mod";case"==":case"===":return"equalTo";case">":return"greaterThan";case">=":return"greaterThanEqualTo";case"<":return"lessThan";case"&&":return"and";case"||":return"or"}}function a(t){return"CallExpression"===t.type&&(t.callee?.type==="Identifier"&&t.callee?.name.startsWith("uniform")||t.callee?.type==="MemberExpression"&&t.callee?.property.name.startsWith("uniform"))}t.Shader.prototype.modify=function(r,n={}){if(!(r instanceof Function))return s.call(this,r);{let a;{var i,o;let s=`(${r.toString()})`,l=(0,iA.qg)(s,{ecmaVersion:2021,locations:!1});o=[],i=void 0,i=iw,function t(r,n,s){var a=s||r.type,l=r!==o[o.length-1];l&&o.push(r),i[a](r,n,t),u[a]&&u[a](r,n||o,o),l&&o.pop()}(l,{varyings:{}},void 0);let h=si.generate(l),c=Object.keys(n),d=Function("__p5",...c,h.slice(h.indexOf("{")+1,h.lastIndexOf("}")).replaceAll(";",""));a=()=>d(t,...c.map(t=>n[t]))}let l=new P(a,this,!1).generate();return s.call(this,l)}};let u={UnaryExpression(t,r,n){if(n.some(a))return;let i={type:"Literal",value:t.operator},s=t=>{t.type="CallExpression",t.callee={type:"Identifier",name:"__p5.unaryNode"},t.arguments=[t.argument,i]};if("MemberExpression"===t.type){let r=t.argument.property.name;[["x","y","z","w"],["r","g","b","a"],["s","t","p","q"]].some(t=>[...r].every(r=>t.includes(r)))&&"MemberExpression"===t.argument.type?(t.type="MemberExpression",t.object={type:"CallExpression",callee:{type:"Identifier",name:"__p5.unaryNode"},arguments:[t.argument.object,i]},t.property={type:"Identifier",name:r}):s(t)}else s(t);delete t.argument,delete t.operator},VariableDeclarator(t,r,n){if(!n.some(a)){if(a(t.init)){let r={type:"Literal",value:t.id.name};t.init.arguments.unshift(r)}if(t.init.callee&&t.init.callee.name?.startsWith("varying")){let n={type:"Literal",value:t.id.name};t.init.arguments.unshift(n),r.varyings[t.id.name]=n}}},Identifier(t,r,n){n.some(a)||r.varyings[t.name]&&!_ancestors.some(r=>"AssignmentExpression"===r.type&&r.left===t)&&(t.type="ExpressionStatement",t.expression={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t.name},property:{type:"Identifier",name:"getValue"}},arguments:[]})},ArrayExpression(t,r,n){if(n.some(a))return;let i=JSON.parse(JSON.stringify(t));t.type="CallExpression",t.callee={type:"Identifier",name:"__p5.dynamicNode"},t.arguments=[i]},AssignmentExpression(t,r,n){if(!n.some(a)){if("="!==t.operator){let r=o(t.operator.replace("=","")),n={type:"CallExpression",callee:{type:"MemberExpression",object:t.left,property:{type:"Identifier",name:r}},arguments:[t.right]};t.operator="=",t.right=n}r.varyings[t.left.name]&&(t.type="ExpressionStatement",t.expression={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t.left.name},property:{type:"Identifier",name:"bridge"}},arguments:[t.right]})}},BinaryExpression(t,r,n){if(!n.some(a)){if(["Literal","ArrayExpression","Identifier"].includes(t.left.type)){let r={type:"CallExpression",callee:{type:"Identifier",name:"__p5.dynamicNode"},arguments:[t.left]};t.left=r}t.type="CallExpression",t.callee={type:"MemberExpression",object:t.left,property:{type:"Identifier",name:o(t.operator)}},t.arguments=[t.right]}}};class l{constructor(t,r){if(new.target===l)throw TypeError("Cannot construct BaseNode instances directly. This is an abstract class.");if(this.type=r,this.componentNames=[],this.componentsChanged=!1,this.isInternal=t,this.usedIn=[],this.dependsOn=[],this.srcLine=null,this.usedInConditional=!1,!0===n.srcLocations&&!1===t)try{throw Error("StackCapture")}catch(n){let t=n.stack.split("\n"),r=5;B(this)&&r--,this.srcLine=t[r].trim()}}addVectorComponents(){if(this.type.startsWith("vec")){let t=parseInt(this.type.slice(3));for(let r of(this.componentNames=["x","y","z","w"].slice(0,t),this.componentNames)){let t=new g(this,r,"float",!0);Object.defineProperty(this,r,{get:()=>t,set(r){this.componentsChanged=!0,O(this)?this.node.value=r:t=r}})}}}forceTemporaryVariable(){F(this)&&I(this.parent)&&k(this)||(this.useTemp=!0)}assertUsedInConditional(t){this.usedInConditional=!0,this.usedIn.push(t),this.forceTemporaryVariable()}isUsedInConditional(){return this.usedInConditional}
32checkConditionalDependencies(t){t.ifs.forEach(r=>{let n=()=>r.dependsOn.length===r.dependsOnSatisfied.length;!(r.insertionPoint>-1)&&r.usedIn.length&&(r.dependsOn.some(t=>t.node===this)&&!r.dependsOnSatisfied.includes(this)&&r.dependsOnSatisfied.push(this),r.usedIn.includes(this)&&!r.usedInSatisfied.includes(this)&&r.usedInSatisfied.push(this),n()&&r.usedInSatisfied.length>=1&&r.saveState(t,n(),r.usedInSatisfied.length>=1))})}toGLSLBase(t){let r;if(this.shouldUseTemporaryVariable()){let n=t.declarations.length;r=this.getTemporaryVariable(t);let i=t.declarations.length-1-n;i=i>0?i:void 0,this.dependsOn.forEach(r=>{if(r.isVector){let n=r.originalComponents.map((t,n)=>t===r.currentComponents[n]);t.updateComponents(r.node,i,n)}else t.updateComponents(r.node,i)})}else r=this.toGLSL(t);return this.checkConditionalDependencies(t),r}shouldUseTemporaryVariable(){var t;if(this.componentsChanged||T(this)||this.useTemp)return!0;if(this.isInternal||k(this)||M(this)||"sampler2D"===this.type)return!1;return 0+2*(t=this,t instanceof p)+2*B(this)+3*N(this)+this.usedIn.length>=4}getTemporaryVariable(t){if(!this.temporaryVariable){this.temporaryVariable=`temp_${t.getNextID()}`;let r="";this.srcLine&&(r+=`
33// From ${this.srcLine}
34`),r+="  "+this.type+" "+this.temporaryVariable+" = "+this.toGLSL(t)+";",t.declarations.push(r)}return this.temporaryVariable}add(t){return j(this,this.enforceType(t),"+")}sub(t){return j(this,this.enforceType(t),"-")}mult(t){return j(this,this.enforceType(t),"*")}div(t){return j(this,this.enforceType(t),"/")}mod(t){return j(this,this.enforceType(t),"%")}enforceType(t){if(E(t)){if(!L(t.type)||!L(t.type))throw TypeError(`You've tried to perform an operation on a struct of type: ${t.type}. Try accessing a member on that struct with '.'`);return(S(this)||N(this))&&w(t)?new c(t):t}return"number"==typeof t?w(this)?new h(t):new c(t):Array.isArray(t)?q.dynamicVector(t):q[this.type](t)}toFloat(){return S(this)?this:w(this)?new c(this):void 0}toGLSL(t){throw TypeError("Not supposed to call this function on BaseNode, which is an abstract class.")}}class h extends l{constructor(t=0,r=!1){super(r,"int"),this.x=t}toGLSL(t){if(E(this.x)){let r=this.x.toGLSLBase(t);return w(this.x.type)?r:`int(${r})`}return"number"==typeof this.x?`${Math.floor(this.x)}`:`int(${this.x})`}}class c extends l{constructor(t=0,r=!1,n=!1){if(super(r,"float"),Array.isArray(t)&&(t=t[0]),n){let{parent:t,name:r}=n;this.name=r,this.parent=t}this.x=t}toGLSL(t){if(E(this.x)){let r=this.x.toGLSLBase(t);return S(this.x)?r:`float(${r})`}return"number"==typeof this.x?`${this.x.toFixed(4)}`:`float(${this.x})`}}class d extends l{constructor(t,r,n=!1){super(n,r),this.originalValues=z(t,parseInt(r.slice(3))),this.componentNames=["x","y","z","w"].slice(0,this.originalValues.length)}addVectorComponents(){let t=this.originalValues;this.componentsChanged=!1,this.componentNames.forEach((r,n)=>{let i={name:r,parent:this},s=F(t[n])?t[n]:new c(t[n],!0,i);Object.defineProperty(this,r,{get:()=>s,set(t){this.componentsChanged=!0,O(this)?this.node.value=t:s=F(t)?t:new c(t,!0,i)}})}),this.originalValues=this.componentNames.map(t=>this[t])}toGLSL(t){if(this.componentsChanged&&this.defined||this.oldName)return this.temporaryVariable;{let r=this.componentNames.map((r,n)=>this.originalValues[n].toGLSLBase(t)).join(", ");return this.defined=!0,`${this.type}(${r})`}}}class p extends l{constructor(t,r,n,i=!1){let s,o=t=>{let n,i=0,s=r.every((r,s)=>{let o=C(r),a=t.args[s];return"genType"===a&&((void 0===n||"float"===n&&o.startsWith("vec"))&&(n=o),a=n),i+=o===a,o===a||"float"===o&&a.startsWith("vec")});return{...t,valid:s,similarity:i,genType:n}};if(Array.isArray(n)){let i=n.filter(t=>t.args.length===r.length);if(0===i.length){let i=new Set,s=[];n.forEach(t=>
34i.add(t.args.length)),i.forEach(t=>s.push(`${t}`));let o=s.join(" or ");throw Error(`Function '${t}' has ${n.length} variants which expect ${o} arguments, but ${r.length} arguments were provided.`)}s=i.reduce(function(t,r){return(r=o(r)).valid&&(!t||r.similarity>t.similarity)&&(t=r),t},null)}else s=o(n);if(!s||!s.valid){let i=t=>`(${t.map(t=>t).join(", ")})`,s=Array.isArray(n)?n.map(t=>i(t.args)).join(" or "):i(n.args),o=i(r.map(t=>C(t)));throw Error(`Function '${t}' was called with wrong arguments. Most likely, you provided mixed lengths vectors as arguments.
35Expected argument types: ${s}
36Provided argument types: ${o}
37All of the arguments with expected type 'genType' should have a matching type. If one of those is different, try to find where it was created.
38        `)}if(r.length!==s.args.length)throw Error(`Function '${t}' expects ${s.args.length} arguments, but ${r.length} were provided.`);r=r.map((t,r)=>(E(t)?S(t)&&"genType"===s.args[r]&&"float"!==s.genType&&(t=q[s.genType](t)):t=q["genType"===s.args[r]?s.genType:s.args[r]](t),t)),"genType"===s.returnType&&(s.returnType=s.genType),super(i,s.returnType),this.name=t,this.args=r,this.argumentTypes=s.args}deconstructArgs(t){return this.args.map((r,n)=>(w(r)&&"float"!=this.argumentTypes[n]&&(r=r.toFloat()),r.toGLSLBase(t),r.toGLSLBase(t))).join(", ")}toGLSL(t){return`${this.name}(${this.deconstructArgs(t)})`}}class f extends l{constructor(t,r,n=!1){super(n,r),this.name=t}toGLSL(t){return`${this.name}`}}class g extends l{constructor(t,r,n,i=!1){super(i,n),this.parent=t,this.componentName=r,this.type=n}toGLSL(t){let r=this.parent.toGLSLBase(t);return k(this.parent)||T(this.parent)||(r=`(${r})`),`${r}.${this.componentName}`}}class m extends f{constructor(t,r,n=!1){super(t,r,n),this.timesChanged=0,this.tempVars=0}getValue(){let t,r=n.context;if(!r.varyings[this.name]||!this.timesChanged)return this;let i=r.varyings[this.name].splice(0,this.timesChanged);return i.forEach((n,s)=>{let{value:o}=n;if(r.declarations.push(`  ${this.name} = ${o.toGLSLBase(r)};`),s===i.length-1){let n=`${this.name}_${this.tempVars++}`;t=$(new f(n,this.type,!0)),r.declarations.push(`  ${this.type} ${n} = ${this.name};`)}}),this.timesChanged=0,t}bridge(t){(!E(t)||this.type.startsWith("vec")&&"float"===C(t))&&(t=q[this.type](t)),n.registerVarying(this,t),this.timesChanged+=1}}class y extends l{constructor(t,r,n,i=!1){for(let s of(super(i,null),this.operator=n,this.left=t,this.right=r,[t,r]))s.usedIn.push(this);this.type=this.determineType()}determineType(){if(["==",">",">=","<","<=","||","!","&&"].includes(this.operator))return"bool";if(this.left.type===this.right.type)return this.left.type;if(N(this.left)&&S(this.right))return this.left.type;if(N(this.right)&&S(this.left))return this.right.type;if(S(this.left)&&w(this.right)||w(this.left)&&S(this.right))return"float";else throw Error("Incompatible types for binary operator")}processOperand(t,r){if(t.temporaryVariable)return t.temporaryVariable;let n=t.toGLSLBase(r);return B(t)&&!t.temporaryVariable&&(n=`(${n})`),"float"===this.type&&w(t)&&(n=`float(${n})`),n}toGLSL(t){let r=this.processOperand(this.left,t),n=this.processOperand(this.right,t);return`${r} ${this.operator} ${n}`}}class v extends y{constructor(t,r,n){super(t,r,n)}toGLSL(t){return N(this)||S(this)?`mod(${this.left.toGLSLBase(t)}, ${this.right.toGLSLBase(t)})`:`${this.processOperand(t,this.left)} % ${this.processOperand(t,this.right)}`}}class b extends l{constructor(t,r,n=!1){super(n,t.type),this.node=t,this.operator=r}toGLSL(t){var r;let n=this.node.toGLSLBase(t);return k(this.node)||T(this.node)||(r=this.node)instanceof c||r instanceof h||r instanceof d||(n=`(${n})`),`${this.operator}${n}`}}function x(t){let r=new D;return t(),i=null,r}l.prototype.equalTo=function(t){return j(this,this.enforceType(t),"==")},l.prototype.greaterThan=function(t){return j(this,this.enforceType(t),">")},l.prototype.greaterThanEqualTo=function(t){return j(this,this.enforceType(t),">=")},l.prototype.lessThan=function(t){return j(this,this.enforceType(t),"<")},l.prototype.lessThanEqualTo=function(t){return j(this,this.enforceType(t),"<=")},l.prototype.not=function(){return new b(this.condition,"!",!0)},l.prototype.or=function(t){return new j(this,this.enforceType(t),"||",!0)},l.prototype.and=function(t){return new j(this,this.enforceType(t),"&&",!0)};class _{constructor(t,r){this.dependsOn=[],this.usedIn=[],this.dependsOnSatisfied=[],this.usedInSatisfied=[],this.states=[],this.if(t,r),this.insertionPoint=-1,this.elseIfs=[],this.elseBranch=null,n.context.
38ifs.push(this)}if(t,r){this.condition=t,this.conditionString=t.toGLSL(n.context),this.ifBranch=x(r),this.ifBranch.parent=this}elseIf(t,r){let n=x(r);return r.parent=this,this.elseIfs.push({condition:t,elseBranch:n}),this}else(t){return this.elseBranch=x(t),this.elseBranch.parent=this,this}thenDiscard(){return new A(this.condition)}saveState(t,r,n){this.states.push({line:t.declarations.length,usedInSatisfied:r,dependsOnSatisfied:n}),this.insertionPoint=t.declarations.length-1}toGLSL(t){let r=t.declarations.length;this.dependsOn.forEach(r=>t.updateComponents(r.node));let n=t.declarations.length;this.insertionPoint+=n-r;let i=[`
39  if (${this.conditionString}) {`,`
40    ${this.ifBranch.toGLSL(t)}`,`
41  }`];return this.elseIfs.length&&this.elseIfs.forEach(r=>{let{condition:n,elseBranch:s}=r;i.push(` else if (${n.toGLSL(t)}) {`),i.push(`
42    ${s.toGLSL(t)}`),i.push(`
43  }`)}),this.elseBranch&&(i.push(" else {"),i.push(`
44    ${this.elseBranch.toGLSL(t)}`),i.push(`
45  }
46`)),i.push("\n"),i.flat().join("")}}r.assign=function(t,r){if(!i)throw new error('assign() is supposed to be used inside of conditional branchs. Use the "=" operator as normal otherwise.');i.assign(t,r)};class D{constructor(){i=this,this.statements=[],this.assignments=[],this.dependsOn=[],this.declarations=[];let t=null;Object.defineProperty(this,"parent",{get:()=>
46t,set(r){r.dependsOn.push(...this.dependsOn),t=r}})}assign(t,r){E(r)&&r.type===t.type?this.assignments.push({node:t,value:r}):(r=q[t.type](r),this.declarations.push(r),this.assignments.push({node:t})),t=t.parent?t.parent:t,r=r.parent?r.parent:r,![t,r].some(t=>this.dependsOn.some(r=>r.node===t))&&(t.assertUsedInConditional(this),this.dependsOn.push(R(t)),r.shouldUseTemporaryVariable()&&(r.assertUsedInConditional(this),this.dependsOn.push(R(r))))}toGLSL(t){let r=0;return this.assignments.forEach(({node:n,value:i})=>{let s,o;if(i)o=i.toGLSLBase(t);else{let n=this.declarations[r];r++,n.temporaryVariable=`temp_${t.getNextID()}`,this.statements.push(`${n.type} ${n.temporaryVariable} = ${n.toGLSL(t)};`),o=n.toGLSLBase(t)}k(n)||T(n)?s=`${n.toGLSLBase(t)} = ${o};`:F(n)&&n.name?s=`${n.parent.toGLSLBase(t)}.${n.name} = ${o};`:(n.temporaryVariable=`temp_${t.getNextID()}`,s=`${n.type} ${n.toGLSLBase(t)} = ${o};`),this.statements.push(s)}),this.statements.join(`
47    `)}}class A{constructor(t){this.condition=t}toGLSL(t){t.discardConditions.push(`if (${this.condition}{discard;})`)}}function C(t){return E(t)?t.type:Array.isArray(t)&&t.length>1?`vec${t.length}`:"number"==typeof t||Array.isArray(t)&&1===t.length?"float":void 0}function E(t){return t instanceof l}function w(t){return E(t)&&"int"===t.type}function S(t){return E(t)&&"float"===t.type}function F(t){return t instanceof c}function N(t){return E(t)&&("vec2"===t.type||"vec3"===t.type||"vec4"===t.type)}function B(t){return t instanceof y}function k(t){return t instanceof f||t instanceof g}function M(t){return t instanceof _||t instanceof D}function T(t){return t.temporaryVariable}function I(t){return t instanceof d}function O(t){return t instanceof b}function L(t){return["int","float","vec2","vec3","vec4","sampler2D"].includes(t)}t.dynamicNode=function(t){return E(t)?t:"number"==typeof t?new c(t):Array.isArray(t)?q.dynamicVector(t):void 0},t.unaryNode=function(r,n){return $(new b(r=t.dynamicNode(r),n))};class P{constructor(t,r,i){n=this,this.userCallback=t,this.srcLocations=i,this.cleanup=()=>{},this.generateHookOverrides(r),this.output={vertexDeclarations:new Set,fragmentDeclarations:new Set,uniforms:{}},this.uniformNodes=[],this.resetGLSLContext(),this.isGenerating=!1}generate(){let r=t.disableFriendlyErrors;return t.disableFriendlyErrors=!0,this.isGenerating=!0,this.userCallback(),this.output.vertexDeclarations=[...this.output.vertexDeclarations].join("\n"),this.output.fragmentDeclarations=[...this.output.fragmentDeclarations].join("\n"),this.isGenerating=!1,this.cleanup(),t.disableFriendlyErrors=r,this.output}generateHookOverrides(i){let s={...i.hooks.vertex,...i.hooks.fragment},o={},a={};Object.keys(s).forEach(s=>{let u=i.hookTypes(s);this[u.name]=function(r){let n=[],i=[];u.parameters.forEach(t=>{if(L(t.type.typeName))n.push(V(t.name,t.type.typeName,!0));else{let r={};t.type.properties.forEach(n=>{r[n.name]=V(`${t.name}.${n.name}`,n.type.typeName,!0)}),n.push(r)}let r=t.type.qualifiers.length>0?t.type.qualifiers.join(" "):"";i.push(`${r} ${t.type.typeName} ${t.name}`.trim())});let o=r(...n),a=u.returnType,l={};L(a.typeName)?(E(o)?S(o)&&a.typeName.startsWith("vec")&&(o=q[a.typeName](o)):o=q[a.typeName](o),l.notAProperty=o.toGLSLBase(this.context),this.context.updateComponents(o)):Object.entries(o).forEach(([r,n])=>{n=t.dynamicNode(n),l[r]=n.toGLSLBase(this.context),this.context.updateComponents(n)}),this.context.ifs.forEach(t=>{if(0===t.usedIn.length)return;let r=t.toGLSL(this.context);this.context.declarations.splice(t.insertionPoint,0,r)});let h=[`(${i.join(", ")}) {`,...this.context.declarations,`
48  ${u.returnType.typeName} finalReturnValue;`];for(let t in Object.entries(l).forEach(([t,r])=>{let n=a.properties?`.${t}`:"";h.push(`  finalReturnValue${n} = ${r};`)}),this.context.declarations=[],this.context.varyings){let r=this.context.varyings[t],n=[];r.forEach(t=>{let{node:r,value:i}=t;n.push(`  ${r.name} = ${i.toGLSLBase(this.context)};`),n.unshift(...this.context.declarations),r.timesChanged=0}),h.push(...n)}h.push("  return finalReturnValue;","}"),this.output[s]=h.join("\n"),this.resetGLSLContext()},o[u.name]=window[u.name],a[u.name]=r[u.name],window[u.name]=function(t){n[u.name](t)},r[u.name]=function(t){n[u.name](t)}}),this.cleanup=()=>{for(let t in o)window[t]=o[t];for(let t in a)r[t]=a[t]}}registerVarying(t,r){Array.isArray(this.context.varyings[t.name])||(this.context.varyings[t.name]=[]),this.context.varyings[t.name].push({node:t,value:r}),this.output.vertexDeclarations.add(`OUT ${t.type} ${t.name};`),this.output.fragmentDeclarations.add(`IN ${t.type} ${t.name};`)}
48resetGLSLContext(){this.uniformNodes.forEach(t=>{t.usedIn=[],t.temporaryVariable=void 0}),this.context={id:0,getNextID(){return this.id++},declarations:[],varyings:[],ifs:[],updateComponents:function(t,r,n){if(t.componentsChanged){n||(n=t.componentNames.map(()=>!0));let i=[];if(I(t))t.componentNames.forEach((r,s)=>{if(n[s]&&t[r]!==t.originalValues[s]){let n=q.float(t[r]),s=`  ${t.temporaryVariable}.${r} = ${n.toGLSLBase(this)};`;i.push(s)}});else{let r=t.componentNames.map(r=>t[r]),n=q[t.type](r),s=`  ${t.temporaryVariable} = ${n.toGLSLBase(this)};`;i.push(s)}r?this.declarations.splice(r,0,...i):this.declarations.push(...i),t.componentsChanged=!1}}},this.uniformNodes=[]}}function R(t){return N(t)?{node:t,isVector:!0,originalComponents:[...t.componentNames.map(r=>t[r])],get currentComponents(){return t.componentNames.map(r=>t[r])}}:{node:t,isVector:!1}}function z(t,r){return Array.isArray(t)||(t=[t]),1!==(t=(t=t.flat()).map(t=>N(t)?t.componentNames.map(r=>t[r]):t).flat()).length||I(t[0])||(t=Array(r).fill(t[0])),t}r.If=function(t,r){return new _(t,r)},r.instanceID=function(){return V("gl_InstanceID","int")},r.getTexture=function(...t){return G("getTexture",t,{args:["sampler2D","vec2"],returnType:"vec4",isp5Function:!0})};let U={int:"Int",float:"Float",vec2:"Vector2",vec3:"Vector3",vec4:"Vector4",sampler2D:"Texture"};function $(t,r){if(t.type.startsWith("vec")||r){let r=parseInt(t.type.slice(3));(t=new Proxy(t,function(t){let r=[["x","y","z","w"],["r","g","b","a"],["s","t","p","q"]].map(r=>r.slice(0,t));return{get(t,n,i){if(n in t)return Reflect.get(...arguments);for(let i of r)if([...n].every(t=>i.includes(t))){if(1===n.length)return t[r[0][i.indexOf(n[0])]];let s=[...n].map(n=>{let s=i.indexOf(n);return t[r[0][s]]});return q[`vec${n.length}`](s)}},set(t,n,i,s){for(let o of r){let a=[...n];if(a.every(t=>o.includes(t))){let u=Array.isArray(i)?i:Array(n.length).fill(i);return a.forEach((n,i)=>{let a=o.indexOf(n);Reflect.set(t,r[0][a],u[i],s)}),!0}}return Reflect.set(...arguments)}}}(r))).addVectorComponents()}return t}function j(t,r,n,i){return $("%"===n?new v(t,r):new y(t,r,n,i))}function V(t,r,n){return $(new f(t,r,n))}function G(t,r,n,i){let s=new p(t,r,n,i);return(s=$(s)).dependsOn=s.args.map(t=>R(t)),s.args.map(t=>t.usedIn.filter(t=>
48M(t)).map(t=>t instanceof D?t.parent:t)).flat().forEach(t=>t.usedIn.push(s)),s}let q={int:t=>new h(t),float:t=>new c(t),vec2:t=>$(new d(t,"vec2")),vec3:t=>$(new d(t,"vec3")),vec4:t=>$(new d(t,"vec4")),dynamicVector:function(t){let r=function(t){let r=0;if(Array.isArray(t))for(let n of t)N(n)?r+=parseInt(n.type.slice(3)):r+=1;else N(t)&&(r+=parseInt(val.type.slice(3)));if(![2,3,4].includes(r))throw Error(`You have attempted to construct a vector with ${r} values. Only vec2, vec3, and vec4 types are supported.`);return r}(t);return this[`vec${r}`](t)}};for(let i in U){let s=U[i],o=`uniform${s}`;if(P.prototype[o]=function(...t){let[r,...n]=t;!i.startsWith("vec")||n[0]instanceof Function?this.output.uniforms[`${i} ${r}`]=n[0]:(n=z(n,parseInt(i.slice(3))),this.output.uniforms[`${i} ${r}`]=n);let s=V(r,i,!1);return this.uniformNodes.push(s),s},r[o]=function(...t){return n[o](...t)},"sampler2D"===i)continue;let a=`varying${s}`;P.prototype[a]=function(t){return $(new m(t,i,!1))},r[a]=function(t){return n[a](t)};let u=r[i];r[i]=function(...r){return n?.isGenerating?(r=i.startsWith("vec")?z(r,parseInt(i.slice(3))):r[0],q[i](r)):u?u.apply(this,r):void t._friendlyError(`It looks like you've called ${i} outside of a shader's modify() function.`)}}Object.entries({acos:{args:["genType"],returnType:"genType",isp5Function:!0},acosh:{args:["genType"],returnType:"genType",isp5Function:!1},asin:{args:["genType"],returnType:"genType",isp5Function:!0},asinh:{args:["genType"],returnType:"genType",isp5Function:!1},atan:[{args:["genType"],returnType:"genType",isp5Function:!1},{args:["genType","genType"],returnType:"genType",isp5Function:!1}],atanh:{args:["genType"],returnType:"genType",isp5Function:!1},cos:{args:["genType"],returnType:"genType",isp5Function:!0},cosh:{args:["genType"],returnType:"genType",isp5Function:!1},degrees:{args:["genType"],returnType:"genType",isp5Function:!0},radians:{args:["genType"],returnType:"genType",isp5Function:!0},sin:{args:["genType"],returnType:"genType",isp5Function:!0},sinh:{args:["genType"],returnType:"genType",isp5Function:!1},tan:{args:["genType"],returnType:"genType",isp5Function:!0},tanh:{args:["genType"],returnType:"genType",isp5Function:!1},abs:{args:["genType"],returnType:"genType",isp5Function:!0},ceil:{args:["genType"],returnType:"genType",isp5Function:!0},clamp:{args:["genType","genType","genType"],returnType:"genType",isp5Function:!1},dFdx:{args:["genType"],returnType:"genType",isp5Function:!1},dFdy:{args:["genType"],returnType:"genType",isp5Function:!1},exp:{args:["genType"],returnType:"genType",isp5Function:!0},exp2:{args:["genType"],returnType:"genType",isp5Function:!1},floor:{args:["genType"],returnType:"genType",isp5Function:!0},fma:{args:["genType","genType","genType"],returnType:"genType",isp5Function:!1},fract:{args:["genType"],returnType:"genType",isp5Function:!0},fwidth:{args:["genType"],returnType:"genType",isp5Function:!1},inversesqrt:{args:["genType"],returnType:"genType",isp5Function:!0},log:{args:["genType"],returnType:"genType",isp5Function:!0},log2:{args:["genType"],returnType:"genType",isp5Function:!1},max:[{args:["genType","genType"],returnType:"genType",isp5Function:!0},{args:["genType","float"],returnType:"genType",isp5Function:!0}],min:[{args:["genType","genType"],returnType:"genType",isp5Function:!0},{args:["genType","float"],returnType:"genType",isp5Function:!0}],mix:[{args:["genType","genType","genType"],returnType:"genType",isp5Function:!1},{args:["genType","genType","float"],returnType:"genType",isp5Function:!1}],pow:{args:["genType","genType"],returnType:"genType",isp5Function:!0},round:{args:["genType"],returnType:"genType",isp5Function:!0},roundEven:{args:["genType"],returnType:"genType",isp5Function:!1},smoothstep:[{args:["genType","genType","genType"],returnType:"genType",isp5Function:!1},{args:["float","float","genType"],returnType:"genType",isp5Function:!1}],sqrt:{args:["genType"],returnType:"genType",isp5Function:!0},step:{args:["genType","genType"],returnType:"genType",isp5Function:!1},trunc:{args:["genType"],returnType:"genType",isp5Function:!1},cross:{args:["vec3","vec3"],returnType:"vec3",isp5Function:!0},distance:{args:["genType","genType"],returnType:"float",isp5Function:!0},dot:{args:["genType","genType"],returnType:"float",isp5Function:!0},faceforward:{args:["genType","genType","genType"],returnType:"genType",isp5Function:!1},length:{args:["genType"],returnType:"float",isp5Function:!1},normalize:{args:["genType"],returnType:"genType",isp5Function:!0},reflect:{args:["genType","genType"],returnType:"genType",isp5Function:!1},refract:{args:["genType","genType","float"],returnType:"genType",isp5Function:!1},texture:{args:["sampler2D","vec2"],returnType:"vec4",isp5Function:!0}}
48).forEach(([i,s])=>{if(Array.isArray(s)?s[0].isp5Function:s.isp5Function){let t=r[i];r[i]=function(...r){return n?.isGenerating?G(i,r,s):t.apply(this,r)}}else r[i]=function(...r){if(n?.isGenerating)return new G(i,r,s);t._friendlyError(`It looks like you've called ${i} outside of a shader's modify() function.`)}});let W=r.lerp;r.lerp=function(...t){return n?.isGenerating?this.mix(...t):W.apply(this,t)};let H=r.noise;r.noise=function(...t){return n?.isGenerating?(n.output.vertexDeclarations.add(ss),n.output.fragmentDeclarations.add(ss),G("noise",2===t.length?[r.vec2(t[0],t[1])]:t,{args:["vec2"],returnType:"float"})):H.apply(this,t)}}"undefined"!=typeof p5&&p5.registerAddon(so);let sa="undefined"==typeof IS_MINIFIED?ew.use(e$).use(eG).init({fallbackLng:"en",nestingPrefix:"$tr(",nestingSuffix:")",defaultNS:"translation",returnEmptyString:!1,interpolation:{escapeValue:!1},detection:{checkWhitelist:!1,order:["querystring","navigator","htmlTag","path","subdomain"],caches:[]},backend:{fallback:"en",loadPath:"https://cdn.jsdelivr.net/npm/p5/translations/{{lng}}/{{ns}}.json"},partialBundledLanguages:!0,resources:ej}).then(t=>{eq=t},t=>console.debug(`Translations failed to load (${t})`)):Promise.resolve();!function(t){t.registerAddon(b.A),t.registerAddon(x.A),t.registerAddon(_.A),t.registerAddon(D.A),t.registerAddon(k.Ay)}(L),function(t){t.registerAddon(P),t.registerAddon(R),t.registerAddon(z),t.registerAddon(U),t.registerAddon(j)}(L),function(t){t.registerAddon(g.c),t.registerAddon(g.a),t.registerAddon(A.A)}(L),function(t){t.registerAddon(eH),t.registerAddon(eY),t.registerAddon(iD),t.registerAddon(iN),t.registerAddon(iB)}(L),L.registerAddon(ik),function(t){t.registerAddon(iM),t.registerAddon(p.A),t.registerAddon(f.A),t.registerAddon(y.A)}(L),function(t){t.registerAddon(iT),t.registerAddon(iI),t.registerAddon(iO)}(L),function(t){t.registerAddon(c.i),t.registerAddon(c.b),t.registerAddon(d.i),t.registerAddon(C.A),t.registerAddon(c.s),t.registerAddon(c.t)}(L),function(t){t.registerAddon(c.d),t.registerAddon(iR),t.registerAddon(iU),t.registerAddon(v.A)}(L),function(t){t.registerAddon(i$),t.registerAddon(ij),t.registerAddon(iV),t.registerAddon(M.A),t.registerAddon(iG),t.registerAddon(l.A)}(L),function(t){t.registerAddon(iq),t.registerAddon(iW),t.registerAddon(iH)}(L),function(t){(0,c.r)(t,t.prototype),(0,c.p)(t,t.prototype),iZ(t,t.prototype),(0,c.l)(t,t.prototype),iX(t,t.prototype),(0,c.m)(t,t.prototype),function(t,r){c.R.prototype.maxCachedGlyphs=function(){return 200},se.prototype._getFontInfo=function(t){this._fontInfos=this._fontInfos||{};let r=JSON.stringify(t);if(this._fontInfos[r])return this._fontInfos[r];{let n=new a(this,{axs:t});return this._fontInfos[r]=n,n}};class n{constructor(t,r){this.width=t,this.height=r,this.infos=[]}findImage(t){let r,n,i=this.width*this.height;if(t>i)throw Error("font is too complex to render in 3D");for(let s=this.infos.length-1;s>=0;--s){let o=this.infos[s];if(o.index+t<i){r=o,n=o.imageData;break}}if(!r){try{n=new ImageData(this.width,this.height)}catch(s){let t=document.getElementsByTagName("canvas")[0],r=!t;t||((t=document.createElement("canvas")).style.display="none",document.body.appendChild(t));let i=t.getContext("2d");i&&(n=i.createImageData(this.width,this.height)),r&&document.body.removeChild(t)}r={index:0,imageData:n},this.infos.push(r)}let s=r.index;return r.index+=t,n._dirty=!0,{imageData:n,index:s}}}function i(t,r,n,i,s){let o=t.imageData.data,a=4*t.index++;o[a++]=r,o[a++]=n,o[a++]=i,o[a++]=s}let s=Math.sqrt(3);class a{constructor(t,{axs:r}={}){this.font=t,this.axs=r,this.strokeImageInfos=new n(64,64),this.colDimImageInfos=new n(64,64),this.rowDimImageInfos=new n(64,64),this.colCellImageInfos=new n(64,64),this.rowCellImageInfos=new n(64,64),this.glyphInfos={}}getGlyphInfo(t){let r,n,o,a,u,h=this.glyphInfos[t.index];if(h)return h;let c=this.axs,{glyph:{path:{commands:d}}}=this.font._singleShapeToPath(t.shape,{axs:c}),p=1/0,f=-1/0,g=1/0,m=-1/0;for(let t of d)for(let r=1;r<t.length;r+=2)p=Math.min(p,t[r]),f=Math.max(f,t[r]),g=Math.min(g,t[r+1]),m=Math.max(m,t[r+1]);if(p>=f||g>=m||!d.length)return this.glyphInfos[t.index]={};let y=f-p,v=m-g,b=sn(d),x=[],_=[],D=[];for(r=8;r>=0;--r)D.push([]);for(r=8;r>=0;--r)_.push([]);function A(t,r,n){let i=x.length;function s(t,r,n){for(let i=t.length;i-- >0;){let s=t[i];r>s&&(r=s),n<s&&(n=s)}return{min:r,max:n}}x.push(n);
48let o=s(t,1,0),a=Math.max(Math.floor(9*o.min-.5),0),u=Math.min(Math.ceil(9*o.max+.5),9);for(let t=a;t<u;++t)D[t].push(i);let l=s(r,1,0),h=Math.max(Math.floor(9*l.min-.5),0),c=Math.min(Math.ceil(9*l.max+.5),9);for(let t=h;t<c;++t)_[t].push(i)}function C(t){var r;return(r=255*t)<0?0:r>255?255:r}class E{constructor(t,r,n,i){this.p0=t,this.c0=r,this.c1=n,this.p1=i}toQuadratic(){return{x:this.p0.x,y:this.p0.y,x1:this.p1.x,y1:this.p1.y,cx:((this.c0.x+this.c1.x)*3-(this.p0.x+this.p1.x))/4,cy:((this.c0.y+this.c1.y)*3-(this.p0.y+this.p1.y))/4}}quadError(){return l.M.sub(l.M.sub(this.p1,this.p0),l.M.mult(l.M.sub(this.c1,this.c0),3)).mag()/2}split(t){let r=l.M.lerp(this.p0,this.c0,t),n=l.M.lerp(this.c0,this.c1,t),i=l.M.lerp(r,n,t);this.c1=l.M.lerp(this.c1,this.p1,t),this.c0=l.M.lerp(n,this.c1,t);let s=l.M.lerp(i,this.c0,t),o=new E(this.p0,r,i,s);return this.p0=s,o}splitInflections(){let t=l.M.sub(this.c0,this.p0),r=l.M.sub(l.M.sub(this.c1,this.c0),t),n=l.M.sub(l.M.sub(l.M.sub(this.p1,this.c1),t),l.M.mult(r,2)),i=[],s=r.x*n.y-r.y*n.x;if(0!==s){let o=t.x*n.y-t.y*n.x,a=t.x*r.y-t.y*r.x,u=o*o-4*s*a;if(u>=0){s<0&&(s=-s,o=-o,a=-a);let t=Math.sqrt(u),r=(-o-t)/(2*s),n=(-o+t)/(2*s);r>0&&r<1&&(i.push(this.split(r)),n=1-(1-n)/(1-r)),n>0&&n<1&&i.push(this.split(n))}}return i.push(this),i}}function w(t,r,n,i){let s=(t+n)/2,o=(r+i)/2;A([t,n],[r,i],{x:t,y:r,cx:s,cy:o})}function S(t,r,n,i){return 1e-5>Math.abs(n-t)&&1e-5>Math.abs(i-r)}for(let t of b){let r=(t.x-p)/y,i=(t.y-g)/v;if(!S(n,o,r,i)){switch(t.type){case"M":a=r,u=i;break;case"L":w(n,o,r,i);break;case"Q":{let s=(t.x1-p)/y,a=(t.y1-g)/v;A([n,r,s],[o,i,a],{x:n,y:o,cx:s,cy:a});break}case"Z":S(n,o,a,u)?x.push({x:n,y:o}):(w(n,o,a,u),x.push({x:a,y:u}));break;case"C":{let a=(t.x1-p)/y,u=(t.y1-g)/v,h=function(t,r,n,i,o,a,u,h){let c=new E(new l.M(t,r),new l.M(n,i),new l.M(o,a),new l.M(u,h)).splitInflections(),d=[],p=30/s;for(let t of c){let r,n=[];for(;!((r=p/t.quadError())>=.125);){let i=Math.pow(r,1/3),s=t.split(i),o=t.split(1-i/(1-i));d.push(s),n.push(t),t=o}r<1&&d.push(t.split(.5)),d.push(t),Array.prototype.push.apply(d,n.reverse())}return d}(n,o,a,u,(t.x2-p)/y,(t.y2-g)/v,r,i);for(let t=0;t<h.length;t++){let r=h[t].toQuadratic();A([r.x,r.x1,r.cx],[r.y,r.y1,r.cy],r)}break}default:throw Error(`unknown command type: ${t.type}`)}n=r,o=i}}let F=x.length,N=this.strokeImageInfos.findImage(F),B=N.index;for(let t=0;t<F;++t){let r=x[t];i(N,C(r.x),C(r.y),C(r.cx),C(r.cy))}function k(t,r,n){let s=t.length,o=r.findImage(s),a=o.index,u=0;for(let r=0;r<s;++r)u+=t[r].length;let l=n.findImage(u);for(let r=0;r<s;++r){let n=t[r],s=n.length,a=l.index;i(o,a>>7,127&a,s>>7,127&s);for(let t=0;t<s;++t){let r=n[t]+B;i(l,r>>7,127&r,0,0)}}return{cellImageInfo:l,dimOffset:a,dimImageInfo:o}}return(h=this.glyphInfos[t.index]={glyph:t,uGlyphRect:[p,g,f,m],strokeImageInfo:N,strokes:x,colInfo:k(D,this.colDimImageInfos,this.colCellImageInfos),rowInfo:k(_,this.rowDimImageInfos,this.rowCellImageInfos)}).uGridOffset=[h.colInfo.dimOffset,h.rowInfo.dimOffset],h}}c.R.prototype._renderText=function(r,n,i,s,a){if(!this.states.textFont||"string"==typeof this.states.textFont)return void console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.");if(i>=s||!this.states.fillColor)return;if(!t.Font.hasGlyphData(this.states.textFont))return void console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts with glyph data are supported");this.push();let u=this.states.strokeColor,h=this.states.drawMode;this.states.setValue("strokeColor",null),this.states.setValue("drawMode",o.T);let{font:c}=this.states.textFont;if(!c)throw Error("In WebGL mode, textFont() needs to be given the result of loadFont() instead of a font family name.");let d=c._currentAxes(this),p=c._getFontInfo(d),f=this.states.textSize/(c.data?.head?.unitsPerEm||1e3);this.translate(n,i,0),this.scale(f,f,1);let g=this.GL,m=!this._defaultFontShader,y=this._getFontShader();y.init(),y.bindShader(),m&&(y.setUniform("uGridImageSize",[64,64]),y.setUniform("uCellsImageSize",[64,64]),y.setUniform("uStrokeImageSize",[64,64]),y.setUniform("uGridSize",[9,9]));let v=this.states.fillSet?this.states.curFillColor:[0,0,0,255];this._setGlobalUniforms(y),this._applyColorBlend(v);let b=this.geometryBufferCache.getGeometryByID("glyph");for(let t of(b||((b=this._textGeom=new S.V(1,1,function(){for(let t=0;t<=1;t++)for(let r=0;r<=1;r++)this.vertices.push(new l.M(r,t,0)),this.uvs.push(r,t)},this)).gid="glyph",b.computeFaces().computeNormals(),this.geometryBufferCache.ensureCached(b)),this.buffers.text))t._prepareBuffer(b,y);
48this._bindBuffer(this.geometryBufferCache.cache.glyph.indexBuffer,g.ELEMENT_ARRAY_BUFFER),y.setUniform("uMaterialColor",v),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),this.glyphDataCache=this.glyphDataCache||new Set;try{for(let t of c._positionGlyphs(r)){let r=p.getGlyphInfo(t);if(r.uGlyphRect){let n=r.rowInfo,i=r.colInfo;for(let t of[r.strokeImageInfo.imageData,n.cellImageInfo.imageData,n.dimImageInfo.imageData,i.cellImageInfo.imageData,i.dimImageInfo.imageData])this.glyphDataCache.delete(t),this.glyphDataCache.add(t);for(;this.glyphDataCache.size>this.maxCachedGlyphs();){let t=this.glyphDataCache.values().next().value;this.glyphDataCache.delete(t);let r=this.textures.get(t);r&&(r.remove(),this.textures.delete(t))}y.setUniform("uSamplerStrokes",r.strokeImageInfo.imageData),y.setUniform("uSamplerRowStrokes",n.cellImageInfo.imageData),y.setUniform("uSamplerRows",n.dimImageInfo.imageData),y.setUniform("uSamplerColStrokes",i.cellImageInfo.imageData),y.setUniform("uSamplerCols",i.dimImageInfo.imageData),y.setUniform("uGridOffset",r.uGridOffset),y.setUniform("uGlyphRect",r.uGlyphRect),y.setUniform("uGlyphOffset",t.x),y.bindTextures(),g.drawElements(g.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)}}}finally{y.unbindShader(),this.states.setValue("strokeColor",u),this.states.setValue("drawMode",h),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),this.pop()}}}(t,t.prototype),(0,B.A)(t,t.prototype),(0,N.A)(t,t.prototype),(0,E.A)(t,t.prototype),(0,S.A)(t,t.prototype),(0,c.c)(t,t.prototype),(0,c.f)(t,t.prototype),(0,F.A)(t,t.prototype),(0,c.s)(t,t.prototype),(0,c.t)(t,t.prototype),so(t,t.prototype)}(L),function(t){t.registerAddon(iK),t.registerAddon(sr)}(L),Promise.all([new Promise((t,r)=>{"complete"===document.readyState?t():window.addEventListener("load",t,!1)}),sa]).then(()=>{if(void 0!==window._setupDone)return void console.warn("p5.js seems to have been imported multiple times. Please remove the duplicate import");if(!window.mocha){let t=new Event("p5Ready");window.dispatchEvent(t),(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!L.instance&&new L}})},2989:(t,r,n)=>{n(6077).x,n(428),r.SourceNode=n(9633).SourceNode},3618:(t,r,n)=>{"use strict";function i(t,r,n=t=>t){let s=Object.create(null);if(s.options=r||{},s.reviver=n,s.value="",s.entry=[],s.output=[],s.col=1,s.row=1,s.options.delimiter=void 0===s.options.delimiter?'"':r.delimiter,s.options.delimiter.length>1||0===s.options.delimiter.length)throw Error(`CSVError: delimiter must be one character [${s.options.separator}]`);if(s.options.separator=void 0===s.options.separator?",":r.separator,s.options.separator.length>1||0===s.options.separator.length)throw Error(`CSVError: separator must be one character [${s.options.separator}]`);let l=RegExp(`${u(s.options.delimiter)}|${u(s.options.separator)}|\r
49|
50|\r|[^${u(s.options.delimiter)}${u(s.options.separator)}\r
51]+`,"y"),h=/^(\r\n|\n|\r)$/,c=[],d="",p=0;for(;null!==(c=l.exec(t));)switch(d=c[0],p){case 0:switch(!0){case d===s.options.delimiter:p=3;break;case d===s.options.separator:p=0,o(s);break;case h.test(d):p=0,o(s),a(s);break;default:s.value+=d,p=2}break;case 2:switch(!0){case d===s.options.separator:p=0,o(s);break;case h.test(d):p=0,o(s),a(s);break;default:throw p=4,Error(`CSVError: Illegal state [row:${s.row}, col:${s.col}]`)}break;case 3:!0==(d===s.options.delimiter)?p=4:(p=3,s.value+=d);break;case 4:switch(!0){case d===s.options.delimiter:p=3,s.value+=d;break;case d===s.options.separator:p=0,o(s);break;case h.test(d):p=0,o(s),a(s);break;default:throw Error(`CSVError: Illegal state [row:${s.row}, col:${s.col}]`)}}return 0!==s.entry.length&&(o(s),a(s)),s.output}function s(t,r={},n=t=>t){let i=Object.create(null);if(i.options=r,i.options.eof=void 0===i.options.eof||i.options.eof,i.row=1,i.col=1,i.output="",i.options.delimiter=void 0===i.options.delimiter?'"':r.delimiter,i.options.delimiter.length>1||0===i.options.delimiter.length)throw Error(`CSVError: delimiter must be one character [${i.options.separator}]`);if(i.options.separator=void 0===i.options.separator?",":r.separator,i.options.separator.length>1||0===i.options.separator.length)throw Error(`CSVError: separator must be one character [${i.options.separator}]`);let o=RegExp(`${u(i.options.delimiter)}|${u(i.options.separator)}|\r
52|
53|\r`);return t.forEach((r,s)=>{let a="";switch(i.col=1,r.forEach((t,s)=>{"string"==typeof t&&(t=t.replace(RegExp(i.options.delimiter,"g"),`${i.options.delimiter}${i.options.delimiter}`),t=o.test(t)?`${i.options.delimiter}${t}${i.options.delimiter}`:t),a+=n(t,i.row,i.col),s!==r.length-1&&(a+=i.options.separator),i.col++}),!0){case i.options.eof:case!i.options.eof&&s!==t.length-1:i.output+=`${a}
54`;break;default:i.output+=`${a}`}i.row++}),i.output}function o(t){let r=t.options.typed?function(t){switch(!0){case"true"===t:case"false"===t:return"true"===t;case/.\./.test(t):return parseFloat(t);case isFinite(t):return parseInt(t);default:return t}}(t.value):t.value;t.entry.push(t.reviver(r,t.row,t.col)),t.value="",t.col++}function a(t){t.output.push(t.entry),t.entry=[],t.row++,t.col=1}function u(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}n.d(r,{A:()=>s,q:()=>i})},3767:(t,r,n)=>{"use strict";n.r(r),n.d(r,{en_translation:()=>i,es_translation:()=>s,hi_translation:()=>u,ja_translation:()=>l,ko_translation:()=>o,zh_translation:()=>a});
54let i=JSON.parse('{"fes":{"autoplay":"The media that tried to play (with \'{{src}}\') wasn\'t allowed to by this browser, most likely due to the browser\'s autoplay policy.\\n\\n+ More info: {{url}}","checkUserDefinedFns":"It seems that you may have accidentally written {{name}} instead of {{actualName}}. Please correct it if it\'s not intentional.","fileLoadError":{"bytes":"It looks like there was a problem loading your file. {{suggestion}}","font":"It looks like there was a problem loading your font. {{suggestion}}","gif":"There was some trouble loading your GIF. Make sure that your GIF is using 87a or 89a encoding.","image":"It looks like there was a problem loading your image. {{suggestion}}","json":"It looks like there was a problem loading your JSON file. {{suggestion}}","large":"If your large file isn\'t fetched successfully, we recommend splitting the file into smaller segments and fetching those.","strings":"It looks like there was a problem loading your text file. {{suggestion}}","suggestion":"Try checking if the file path ({{filePath}}) is correct, hosting the file online, or running a local server.\\n\\n+ More info: {{url}}","table":"It looks like there was a problem loading your table file. {{suggestion}}","xml":"It looks like there was a problem loading your XML file. {{suggestion}}"},"friendlyParamError":{"type_EMPTY_VAR":"{{location}} {{func}}() was expecting {{formatType}} for the {{position}} parameter, received an empty variable instead. If not intentional, this is often a problem with scope.\\n\\n+ More info: {{url}}","type_TOO_FEW_ARGUMENTS":"{{location}} {{func}}() was expecting at least {{minParams}} arguments, but received only {{argCount}}.","type_TOO_MANY_ARGUMENTS":"{{location}} {{func}}() was expecting no more than {{maxParams}} arguments, but received {{argCount}}.","type_WRONG_TYPE":"{{location}} {{func}}() was expecting {{formatType}} for the {{position}} parameter, received {{argType}} instead."},"globalErrors":{"reference":{"cannotAccess":"\\n{{location}} \\"{{symbol}}\\" is used before declaration. Make sure you have declared the variable before using it.\\n\\n+ More info: {{url}}","notDefined":"\\n{{location}} \\"{{symbol}}\\" is not defined in the current scope. If you have defined it in your code, you should check its scope, spelling, and letter-casing (JavaScript is case-sensitive).\\n\\n+ More info: {{url}}"},"stackSubseq":"└[{{location}}] \\n\\t Called from line {{line}} in {{func}}()\\n","stackTop":"┌[{{location}}] \\n\\t Error at line {{line}} in {{func}}()\\n","syntax":{"badReturnOrYield":"\\nSyntax Error - return lies outside of a function. Make sure you’re not missing any brackets, so that return lies inside a function.\\n\\n+ More info: {{url}}","invalidToken":"\\nSyntax Error - Found a symbol that JavaScript doesn\'t recognize or didn\'t expect at it\'s place.\\n\\n+ More info: {{url}}","missingInitializer":"\\nSyntax Error - A const variable is declared but not initialized. In JavaScript, an initializer for a const is required. A value must be specified in the same statement in which the variable is declared. Check the line number in the error and assign the const variable a value.\\n\\n+ More info: {{url}}","redeclaredVariable":"\\nSyntax Error - \\"{{symbol}}\\" is being redeclared. JavaScript doesn\'t allow declaring a variable more than once. Check the line number in error for redeclaration of the variable.\\n\\n+ More info: {{url}}","unexpectedToken":"\\nSyntax Error - Symbol present at a place that wasn\'t expected.\\nUsually this is due to a typo. Check the line number in the error for anything missing/extra.\\n\\n+ More info: {{url}}"},"type":{"constAssign":"\\n{{location}} A const variable is being re-assigned. In javascript, re-assigning a value to a constant is not allowed. If you want to re-assign new values to a variable, make sure it is declared as var or let.\\n\\n+ More info: {{url}}","notfunc":"\\n{{location}} \\"{{symbol}}\\" could not be called as a function.\\nCheck the spelling, letter-casing (JavaScript is case-sensitive) and its type.\\n\\n+ More info: {{url}}","notfuncObj":"\\n{{location}} \\"{{symbol}}\\" could not be called as a function.\\nVerify whether \\"{{obj}}\\" has \\"{{symbol}}\\" in it and check the spelling, letter-casing (JavaScript is case-sensitive) and its type.\\n\\n+ More info: {{url}}","readFromNull":"\\n{{location}} The property of null can\'t be read. In javascript the value null indicates that an object has no value.\\n\\n+ More info: {{url}}","readFromUndefined":"\\n{{location}}
54 Cannot read property of undefined. Check the line number in error and make sure the variable which is being operated is not undefined.\\n\\n + More info: {{url}}"}},"libraryError":"{{location}} An error with message \\"{{error}}\\" occurred inside the p5js library when {{func}} was called. If not stated otherwise, it might be an issue with the arguments passed to {{func}}.","location":"[{{file}}, line {{line}}]","misspelling":"{{location}} It seems that you may have accidentally written \\"{{name}}\\" instead of \\"{{actualName}}\\". Please correct it to {{actualName}} if you wish to use the {{type}} from p5.js.","misspelling_plural":"{{location}} It seems that you may have accidentally written \\"{{name}}\\".\\nYou may have meant one of the following: \\n{{suggestions}}","misusedTopLevel":"Did you just try to use p5.js\'s {{symbolName}} {{symbolType}}? If so, you may want to move it into your sketch\'s setup() function.\\n\\n+ More info: {{url}}","preloadDisabled":"The preload() function has been removed in p5.js 2.0. Please load assets in setup() using async / await keywords or callbacks instead. See https://dev.to/limzykenneth/asynchronous-p5js-20-458f for more information.","positions":{"p_1":"first","p_10":"tenth","p_11":"eleventh","p_12":"twelfth","p_2":"second","p_3":"third","p_4":"fourth","p_5":"fifth","p_6":"sixth","p_7":"seventh","p_8":"eighth","p_9":"ninth"},"pre":"\\n\uD83C\uDF38 p5.js says: {{message}}","sketchReaderErrors":{"reservedConst":"you have used a p5.js reserved variable \\"{{symbol}}\\" make sure you change the variable name to something else.\\n\\n+ More info: {{url}}","reservedFunc":"you have used a p5.js reserved function \\"{{symbol}}\\" make sure you change the function name to something else.\\n\\n+ More info: {{url}}"},"welcome":"Welcome! This is your friendly debugger. To turn me off, switch to using p5.min.js.","wrongPreload":"{{location}} An error with message \\"{{error}}\\" occurred inside the p5js library when \\"{{func}}\\" was called. If not stated otherwise, it might be due to \\"{{func}}\\" being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function."}}'),s=JSON.parse('{"fes":{"autoplay":"Su browser impid\xedo un medio tocar (de \'{{src}}\'), posiblemente porque las reglas de autoplay. Para aprender m\xe1s, visite {{link}}.","checkUserDefinedFns":"","fileLoadError":{"bytes":"","font":"","gif":"","image":"","json":"","large":"","strings":"","suggestion":"","table":"","xml":""},"friendlyParamError":{"type_EMPTY_VAR":"","type_TOO_FEW_ARGUMENTS":"","type_TOO_MANY_ARGUMENTS":"","type_WRONG_TYPE":""},"globalErrors":{"reference":{"cannotAccess":"","notDefined":""},"stackSubseq":"","stackTop":"","syntax":{"badReturnOrYield":"","invalidToken":"","missingInitializer":"","redeclaredVariable":"","unexpectedToken":""},"type":{"constAssign":"","notfunc":"","notfuncObj":"","readFromNull":"","readFromUndefined":""}},"libraryError":"","location":"","misspelling":"","misspelling_plural":"","misusedTopLevel":"","positions":{"p_1":"","p_10":"","p_11":"","p_12":"","p_2":"","p_3":"","p_4":"","p_5":"","p_6":"","p_7":"","p_8":"","p_9":""},"pre":"\uD83C\uDF38 p5.js dice: {{message}}","sketchReaderErrors":{"reservedConst":"","reservedFunc":""},"welcome":"","wrongPreload":""}}'),o=JSON.parse('{"fes":{"autoplay":"미디어(\'{{src}}\')가 이 브라우저에서는 재생되지 않았습니다. 사용하고 계신 브라우저의 자동 재생 정책 때문일 수 있습니다.\\n\\n+ 추가 정보: {{url}}","checkUserDefinedFns":"혹시 {{actualName}} 대신 {{name}}를 쓴 것이 아닌지 살펴보세요.","fileLoadError":{"bytes":"파일을 로드하는 중에 문제가 발생했습니다. {{suggestion}}","font":"글꼴을 로드하는 중에 문제가 발생했습니다. {{suggestion}}","gif":"GIF 파일을 로드하는 중에 문제가 발생했습니다. GIF 파일의 인코딩 방식이 87a이거나 89a인지를 확인해보세요.","image":"이미지를 로드하는 중에 문제가 발생했습니다. {{suggestion}}
54","json":"JSON 파일을 로드하는 중에 문제가 발생했습니다. {{suggestion}}","large":"용량이 큰 파일을 한꺼번에 로드하는 중에 문제가 발생했습니다. 파일 용량을 줄여 보세요.","strings":"텍스트 파일을 로드하는 중에 문제가 발생했습니다. {{suggestion}}","suggestion":"파일 경로({{filePath}})가 올바른지 확인해보세요. 혹은 해당 파일을 호스팅 서비스를 이용하거나 로컬 서버를 구동하여 웹에 올리는 방법을 고려해 보세요.\\n\\n+ 추가 정보: {{url}}","table":"테이블 파일을 로드하는 중에 문제가 발생했습니다. {{suggestion}}","xml":"XML 파일을 로드하는 중에 문제가 발생했습니다. {{suggestion}}"},"friendlyParamError":{"type_EMPTY_VAR":"{{location}} {{formatType}} 타입 값을 받는 {{func}}()의 {{position}} 매개변수(parameter)에 아무 값도 전달되지 않았습니다. 범위(scope)와 관련된 문제일 수 있습니다.\\n\\n+ 추가 정보: {{url}}","type_TOO_FEW_ARGUMENTS":"{{location}} 최소 {{minParams}}개의 인수(argument)를 받는 함수 {{func}}()에 인수가 {{argCount}}개만 입력되었습니다.","type_TOO_MANY_ARGUMENTS":"{{location}} 최대 {{maxParams}}개의 인수(argument)를 받는 함수 {{func}}()에 인수가 {{argCount}}개나 입력되었습니다.","type_WRONG_TYPE":"{{location}} {{formatType}} 타입의 값을 받는 {{func}}()의 {{position}} 매개변수(parameter)에 {{argType}} 타입의 값이 입력되었습니다."},"globalErrors":{"reference":{"cannotAccess":"\\n{{location}} \\"{{symbol}}\\"가 선언되지 않은 채 사용되었습니다. 변수를 사용하기 전, 먼저 선언했는지 확인해보세요.\\n\\n+ 추가 정보: {{url}}","notDefined":"\\n{{location}} \\"{{symbol}}\\"은 현재 범위(scope) 안에 정의되지 않았습니다. 만약 정의를 했다면, 해당 범위와 오탈자, 대소문자 등을 확인해보세요 (자바스크립트에서는 대소문자를 구분합니다).\\n\\n+ 추가 정보: {{url}}"},"stackSubseq":"└[{{location}}] \\n\\t {{func}}()에 있는 줄{{line}}에서 호출\\n","stackTop":"┌[{{location}}] \\n\\t {{func}}()에 있는 줄{{line}}에서 오류 발생\\n","syntax":{"badReturnOrYield":"\\n구문 오류 - 대괄호가 제대로 쓰였는지 확인해 본 후, return을 함수 안에 넣어주세요.\\n\\n+ 추가 정보: {{url}}","invalidToken":"\\n구문 오류 - 자바스크립트가 인식할 수 없거나, 적합하지 않은 기호나 문구가 입력되었습니다.\\n\\n+ 추가 정보: {{url}}","missingInitializer":"\\n구문 오류 - const 변수가 선언되었지만 초기화되지 않았습니다. 변수가 선언된 명령문 안에서 값을 지정해주세요.\\n\\n+ 추가 정보: {{url}}","redeclaredVariable":"\\n구문 오류 - 이미 선언된 \\"{{symbol}}\\"가 재선언되었습니다. 자바스크립트에서는 같은 변수를 한 번 이상 선언할 수 없습니다.\\n\\n+ 추가 정보: {{url}}","unexpectedToken":"\\n구문 오류 - 입력된 문구가 예상하지 못한 위치에 있습니다.보통 이런 상황은 오탈자 때문에 일어나는 경우가 많습니다. 누락되거나 추가된 내용이 없는지 확인하세요.\\n\\n+ 추가 정보: {{url}}"},"type":{"constAssign":"\\n{{location}} const 변수가 재지정되었습니다. 자바스크립트에서는 const 변수에 다른 값을 여러 번 지정할 수 없으므로 새로운 값을 여러 번 지정하시려면, const 대신 var나 let을 써서 변수를 선언해 주세요.\\n\\n+ 추가 정보: {{url}}","notfunc":"\\n{{location}} \\"{{symbol}}\\"는 함수로 호출할 수 없습니다. 타입과 오탈자, 대소문자 등을 확인해주세요.\\n\\n+ 추가 정보: {{url}}","notfuncObj":"\\n{{location}} \\"{{symbol}}\\"는 함수로 호출할 수 없습니다. \\"{{obj}}\\"가 \\"{{symbol}}\\"를 가지고 있는지 살펴보고, 타입과 오탈자, 대소문자 등을 확인해주세요.\\n\\n+ 추가 정보: {{url}}","readFromNull":"\\n{{location}} null의 속성(property)을 읽을 수 없습니다. 자바스크립트에서 null이란, 객체(object)에 주어진 값이 비어있다는 뜻입니다.\\n\\n+ 추가 정보: {{url}}","readFromUndefined":"\\n{{location}} undefined의 속성(property)을 읽을 수 없습니다. 혹시 연산 중인 변수가 정의되지 않았는지 확인하세요.\\n\\n+ 추가 정보: {{url}}"}},"libraryError":"{{location}} 함수 {{func}}가 호출되었을 때,  \\"{{error}}\\" 오류가 p5js 라이브러리 내에서 발생했습니다. 함수 {{func}}에 전달한 인수(argument)가 문제일 수 있습니다.","location":"[{{file}}, 줄{{line}}]","misspelling":"{{location}}
54 혹시 p5.js의 {{type}}를 사용하시려면 \\"{{name}}\\"를 {{actualName}}로 고쳐 보세요.","misspelling_plural":"{{location}} 혹시 p5.js의 {{type}}를 사용하시려면 \\"{{name}}\\"를 다음 중 하나로 고쳐보세요: \\n{{suggestions}}","misusedTopLevel":"{{location}} 혹시 p5.js의 {{symbolType}} 타입 {{symbolName}}을 사용하셨나요? 그렇다면 {{symbolName}}을 작성 중인 setup() 함수의 대괄호 안으로 옮겨보세요.\\n\\n+ 추가 정보: {{url}}","positions":{"p_1":"1번째","p_10":"10번째","p_11":"11번째","p_12":"12번째","p_2":"2번째","p_3":"3번째","p_4":"4번째","p_5":"5번째","p_6":"6번째","p_7":"7번째","p_8":"8번째","p_9":"9번째"},"pre":"\\n\uD83C\uDF38 p5.js says: {{message}}","sketchReaderErrors":{"reservedConst":"p5.js에서 이미 쓰고 있는 변수 \\"{{symbol}}\\"를 사용하셨습니다. 해당 변수를 다른 이름으로 바꾸어 주세요.\\n\\n+ 추가 정보: {{url}}","reservedFunc":"p5.js에서 이미 쓰고 있는 함수 \\"{{symbol}}\\"를 사용하셨습니다. 해당 함수를 다른 이름으로 바꾸어 주세요.\\n\\n+ 추가 정보: {{url}}"},"welcome":"{{logo}} 환영합니다, 이 메세지는 에러를 찾는 디버깅 안내문입니다. 안내가 필요없는 경우 p5.js대신 p5.min.js를 사용하세요.","wrongPreload":"{{location}} \\"{{func}}\\"가 호출되며 p5js 라이브러리 내부에서 다음 오류가 발생했습니다: \\"{{error}}\\".\\n\\n 함수 \\"{{func}}\\"가 preload()에서 호출되었기 때문일 수 있습니다. preload() 함수 안에서는 지정된 함수(예: loadImage, loadJSON, loadFont, loadStrings 등)만 호출할 수 있습니다."}}'),a=JSON.parse('{"fes":{"autoplay":"尝试播放(使用\'{{src}}\')的媒体在此浏览器中被禁止,很可能是由于浏览器的自动播放策略。\\n\\n+ 更多信息:{{url}}","checkUserDefinedFns":"看起来您可能在{{name}}处意外写错了,应该是{{actualName}}。如果这不是故意的,请进行更正。","fileLoadError":{"bytes":"似乎在加载文件时出现了问题。{{suggestion}}","font":"似乎在加载字体时出现了问题。{{suggestion}}","gif":"加载GIF时出现了问题。请确保您的GIF使用87a或89a编码。","image":"似乎在加载图像时出现了问题。{{suggestion}}","json":"似乎在加载JSON文件时出现了问题。{{suggestion}}","large":"如果您无法成功获取大型文件,我们建议将文件分割成较小的段并获取这些段。","strings":"似乎在加载文本文件时出现了问题。{{suggestion}}","suggestion":"尝试检查文件路径({{filePath}})是否正确,将文件托管在线上或运行本地服务器。\\n\\n+ 更多信息:{{url}}","table":"似乎在加载表格文件时出现了问题。{{suggestion}}","xml":"似乎在加载XML文件时出现了问题。{{suggestion}}"},"friendlyParamError":{"type_EMPTY_VAR":"{{location}} {{func}}() 期望的是{{formatType}}类型的{{position}}参数,而接收到了一个空变量。如果这不是故意的,通常是作用域的问题。\\n\\n+ 更多信息:{{url}}","type_TOO_FEW_ARGUMENTS":"{{location}} {{func}}() 期望至少{{minParams}}个参数,但只收到了{{argCount}}个。","type_TOO_MANY_ARGUMENTS":"{{location}} {{func}}() 期望最多{{maxParams}}个参数,但收到了{{argCount}}个。","type_WRONG_TYPE":"{{location}} {{func}}() 期望的是{{formatType}}类型的{{position}}参数,而接收到了{{argType}}类型。"},"globalErrors":{"reference":{"cannotAccess":"\\n{{location}} 在声明之前使用了\\"{{symbol}}\\"。请确保在使用之前已经声明了该变量。\\n\\n+ 更多信息:{{url}}","notDefined":"\\n{{location}} 在当前范围中未定义\\"{{symbol}}\\"。如果您已经在代码中定义了它,请检查其作用域、拼写和大小写(JavaScript区分大小写)。\\n\\n+ 更多信息:{{url}}"},"stackSubseq":"└[{{location}}] \\n\\t 在{{func}}()中的第{{line}}行调用\\n","stackTop":"┌[{{location}}] \\n\\t 在{{func}}()的第{{line}}行出现错误\\n","syntax":{"badReturnOrYield":"\\n语法错误 - return位于函数外部。请确保没有漏掉任何括号,以便return位于函数内部。\\n\\
54n+ 更多信息:{{url}}","invalidToken":"\\n语法错误 - 发现了JavaScript不识别或不期望的符号。\\n\\n+ 更多信息:{{url}}","missingInitializer":"\\n语法错误 - 声明了一个const变量但没有初始化。在JavaScript中,const必须要有初始值。在同一语句中必须指定值来声明变量。请检查错误中的行号并给const变量赋值。\\n\\n+ 更多信息:{{url}}","redeclaredVariable":"\\n语法错误 - \\"{{symbol}}\\" 正在被重新声明。JavaScript不允许重复声明变量。请检查错误中的行号是否重新声明了该变量。\\n\\n+ 更多信息:{{url}}","unexpectedToken":"\\n语法错误 - 符号出现在不应该出现的位置。\\n通常这是由于拼写错误。请检查错误中的行号是否有缺少或多余的内容。\\n\\n+ 更多信息:{{url}}"},"type":{"constAssign":"\\n{{location}} 正在重新赋值const变量。在JavaScript中,不允许对常量进行重新赋值。如果要给变量重新赋值,请确保声明为var或let。\\n\\n+ 更多信息:{{url}}","notfunc":"\\n{{location}} 无法将\\"{{symbol}}\\" 调用为函数。\\n请检查拼写、大小写(JavaScript区分大小写)和其类型。\\n\\n+ 更多信息:{{url}}","notfuncObj":"\\n{{location}} 无法将\\"{{symbol}}\\" 调用为函数。\\n请验证\\"{{obj}}\\"是否包含\\"{{symbol}}\\",并检查拼写、大小写(JavaScript区分大小写)和其类型。\\n\\n+ 更多信息:{{url}}","readFromNull":"\\n{{location}} 无法读取null的属性。在JavaScript中,null表示对象没有值。\\n\\n+ 更多信息:{{url}}","readFromUndefined":"\\n{{location}} 无法读取undefined的属性。请检查错误中的行号并确保正在操作的变量不是undefined。\\n\\n+ 更多信息:{{url}}"}},"libraryError":"{{location}} 在调用{{func}}时,在p5js库内部出现了一条错误消息\\"{{error}}\\"。除非另有说明,否则可能是与传递给{{func}}的参数有关的问题。","location":"[{{file}},第{{line}}行]","misspelling":"{{location}} 看起来您可能在{{name}}处意外写错了,应该是\\"{{actualName}}\\"。如果希望使用p5.js中的{{type}},请将其更正为{{actualName}}。","misspelling_plural":"{{location}} 看起来您可能在{{name}}处意外写错了。\\n您可能指的是以下之一:\\n{{suggestions}}","misusedTopLevel":"您刚刚尝试使用了p5.js的{{symbolType}} {{symbolName}}吗?如果是,请将其移到您的sketch的setup()函数中。\\n\\
54n+ 更多信息:{{url}}","positions":{"p_1":"第一","p_10":"第十","p_11":"第十一","p_12":"第十二","p_2":"第二","p_3":"第三","p_4":"第四","p_5":"第五","p_6":"第六","p_7":"第七","p_8":"第八","p_9":"第九"},"pre":"\\n\uD83C\uDF38 p5.js 说:{{message}}","sketchReaderErrors":{"reservedConst":"您使用了p5.js的保留变量\\"{{symbol}}\\",请确保将变量名更改为其他名称。\\n\\n+ 更多信息:{{url}}","reservedFunc":"您使用了p5.js的保留函数\\"{{symbol}}\\",请确保将函数名更改为其他名称。\\n\\n+ 更多信息:{{url}}"},"welcome":"欢迎!这是您友好的调试程序。要关闭我,请切换到使用p5.min.js。","wrongPreload":"{{location}} 在调用\\"{{func}}\\"时,在p5js库内部出现了一条错误消息\\"{{error}}\\"。除非另有说明,否则可能是由于在preload中调用了\\"{{func}}\\"。preload函数之外不应该包含除load函数(loadImage、loadJSON、loadFont、loadStrings等)以外的内容。"}}'),u=JSON.parse('{"fes":{"autoplay":"जिस मीडिया को चलाने की कोशिश की गई (\'{{src}}\' के साथ) उसे इस ब्राउज़र द्वारा अनुमति नहीं दी गई, संभवतः ब्राउज़र की स्वत: प्ले नीति के कारण।\\n\\n+ अधिक जानकारी: {{url}}","checkUserDefinedFns":"ऐसा लगता है कि आपने गलती से {{actualName}} की जगह {{name}} लिख दिया है। यदि यह जानबूझकर नहीं किया गया है तो कृपया इसे सुधारें।","fileLoadError":{"bytes":"ऐसा लगता है कि आपकी फ़ाइल लोड करने में कोई समस्या थी। {{suggestion}}","font":"ऐसा लगता है कि आपका मुद्रलिपि लोड करने में कोई समस्या थी। {{suggestion}}","gif":"आपकी GIF लोड करने में कुछ समस्या हुई। सुनिश्चित करें कि आपका GIF 87a या 89a एन्कोडिंग का उपयोग कर रहा है।","image":"ऐसा लगता है कि आपकी छवि लोड करने में कोई समस्या थी। {{suggestion}}","json":"ऐसा लगता है कि आपकी JSON फ़ाइल लोड करने में कोई समस्या थी। {{suggestion}}","large":"यदि आपकी बड़ी फ़ाइल सफलतापूर्वक नहीं लाई गई है, तो हम फ़ाइल को छोटे खंडों में विभाजित करने और उन्हें लाने की सलाह देते हैं।","strings":"ऐसा लगता है कि आपकी पाठ फ़ाइल लोड करने में कोई समस्या थी। {{suggestion}}","suggestion":"यह जाँचने का प्रयास करें कि फ़ाइल पथ ({{filePath}}) सही है या नहीं, फ़ाइल को ऑनलाइन होस्ट करना, या स्थानीय सर्वर चलाना।\\n\\n+ अधिक जानकारी: {{url}}","table":"ऐसा लगता है कि आपकी तालिका फ़ाइल लोड करने में कोई समस्या थी। {{suggestion}}","xml":"ऐसा लगता है कि आपकी XML फ़ाइल लोड करने में कोई समस्या थी। {{suggestion}}"},"friendlyParamError":{"type_EMPTY_VAR":"{{location}} {{func}}() {{position}} प्राचल के लिए {{formatType}} की अपेक्षा कर रहा था, इसके बजाय एक खाली चर प्राà
54¤ªà¥à¤¤ हुआ। यदि जानबूझकर नहीं किया गया है, तो यह अक्सर दायरे के साथ एक समस्या है।\\n\\n+ अधिक जानकारी:{{url}}","type_TOO_FEW_ARGUMENTS":"{{location}} {{func}}() कम से कम {{minParams}} तर्कों की अपेक्षा थी, लेकिन केवल प्राप्त हुए {{argCount}}.","type_TOO_MANY_ARGUMENTS":"{{location}} {{func}}() {{maxParams}} से अधिक तर्कों की अपेक्षा नहीं कर रहा था, लेकिन प्राप्त हुआ {{argCount}}.","type_WRONG_TYPE":"{{location}} {{func}}() {{position}} प्राचल के लिए {{formatType}} की अपेक्षा कर रहा था, इसके बजाय {{argType}} प्राप्त हुआ।"},"globalErrors":{"reference":{"cannotAccess":"\\n{{location}} \\"{{symbol}}\\" घोषणा से पहले प्रयोग किया जाता है। सुनिश्चित करें कि आपने चर का उपयोग करने से पहले उसे घोषित कर दिया है।\\n\\n+ अधिक जानकारी: {{url}}","notDefined":"\\n{{location}} \\"{{symbol}}\\" वर्तमान दायरे में परिभाषित नहीं है। यदि आपने इसे अपने कोड में परिभाषित किया है, तो आपको इसका दायरा, वर्तनी और अक्षर-आवरण जांचना चाहिए (JavaScript केस-संवेदी है)।\\n\\n+ अधिक जानकारी: {{url}}"},"stackSubseq":"└[{{location}}] \\n\\t {{func}}() में पंक्ति {{line}} से आह्वान किया गया\\n","stackTop":"┌[{{location}}] \\n\\t {{func}}() में पंक्ति {{line}} पर त्रुटि\\n","syntax":{"badReturnOrYield":"\\nवाक्य - विन्यास त्रुटि - रिटर्न किसी फ़ंक्शन के बाहर होता है। सुनिश्चित करें कि आपसे कोई कोष्ठक नहीं छूट रहा है, ताकि रिटर्न किसी फ़ंक्शन के अंदर हो।\\n\\n+ अधिक जानकारी: {{url}}","invalidToken":"\\nवाक्य - विन्यास त्रुटि - एक ऐसा प्रतीक मिला जिसे जावास्क्रिप्ट नहीं पहचानता या अपने स्थान पर अपेक्षित नहीं था।\\n\\n+ अधिक जानकारी: {{url}}","missingInitializer":"\\nवाक्य - विन्यास त्रुटि - एक नियत चर घोषित किया गया है लेकिन प्रारंभ नहीं किया गया है। जावास्क्रिप्ट में, एक नियत के लिए प्रारंभà
54¤•र्ता की आवश्यकता होती है। एक मान उसी कथन में निर्दिष्ट किया जाना चाहिए जिसमें चर घोषित किया गया है। त्रुटि में पंक्ति संख्या की जाँच करें और स्थिरांक चर को एक मान निर्दिष्ट करें।\\n\\n+ अधिक जानकारी: {{url}}","redeclaredVariable":"\\nवाक्य - विन्यास त्रुटि - \\"{{symbol}}\\" पुनः घोषित किया जा रहा है। जावास्क्रिप्ट एक चर को एक से अधिक बार घोषित करने की अनुमति नहीं देता है। चर की पुनः घोषणा के लिए त्रुटि वाली पंक्ति संख्या की जाँच करें।\\n\\n+ अधिक जानकारी: {{url}}","unexpectedToken":"\\nवाक्य - विन्यास त्रुटि - प्रतीक ऐसे स्थान पर मौजूद है जिसकी अपेक्षा नहीं थी।\\nआम तौर पर यह टंकण त्रुटि के कारण होता है। किसी भी गुम/अतिरिक्त चीज़ के लिए त्रुटि में पंक्ति नंबर की जाँच करें।\\n\\n+ अधिक जानकारी: {{url}}"},"type":{"constAssign":"\\n{{location}} एक नियत चर को फिर से असाइन किया जा रहा है। जावास्क्रिप्ट में, किसी स्थिरांक को दोबारा मान निर्दिष्ट करने की अनुमति नहीं है। यदि आप किसी चर के लिए नए मान पुनः निर्दिष्ट करना चाहते हैं, तो सुनिश्चित करें कि इसे var या Let के रूप में घोषित किया गया है।\\n\\n+ अधिक जानकारी: {{url}}","notfunc":"\\n{{location}} \\"{{symbol}}\\" फ़ंक्शन के रूप में नहीं बुलाया जा सका।\\nवर्तनी, अक्षर-आवरण (जावास्क्रिप्ट केस-संवेदी है) और उसके प्रकार की जाँच करें।\\n\\n+ अधिक जानकारी: {{url}}","notfuncObj":"\\n{{location}} \\"{{symbol}}\\" फ़ंक्शन के रूप में नहीं बुलाया जा सका।\\nसत्यापित करें कि क्या \\"{{obj}}\\" में \\"{{symbol}}\\" है और वर्तनी, अक्षर-आवरण (जावास्क्रिप्ट केस-संवेदी है) और उसके प्रकार की जांच करें।\\n\\n+ अधिक जानकारी: {{url}}","readFromNull":"\\n{{location}} null की संपत्ति को पढ़ा नहीं जा सकता. जावास्क्रिप्ट में मान null इंगित करता है कि किसी ऑब्जेक्ट का कोई मूल्य नहीं है।\\n\\n+ अधिक जानकारी: {{url}}","readFromUndefined":"\\n{{location}} undefined की संपत्ति नहीं पढ़ सकता. त्रुटि वाली पंक्ति संख्या की जाँच करें और सुनिश्चित करें कि जो चर संचालित किया जा रहा है वह अपरिभाषित नहीं है।\\n\\n + अधिक जानकारी: {{url}}"}},"libraryError":"{{location}} जब {{func}} को आह्वान किया गया तो p5js लाइब्रेरी के अंदर \\"{{error}}
54\\" संदेश के साथ एक त्रुटि उत्पन्न हुई। यदि अन्यथा नहीं कहा गया है, तो यह {{func}} को दिए गए तर्कों के साथ एक समस्या हो सकती है।","location":"[{{file}}, पंक्ति {{line}}]","misspelling":"{{location}} ऐसा लगता है कि आपने गलती से \\"{{actualName}}\\" के स्थान पर \\"{{name}}\\" लिख दिया होगा। यदि आप p5.js से {{type}} का उपयोग करना चाहते हैं तो कृपया इसे सही करके {{actualName}} कर दें।","misspelling_plural":"{{location}} ऐसा लगता है कि आपने गलती से \\"{{name}}\\" लिख दिया होगा।\\nआपका मतलब निम्नलिखित में से कोई एक हो सकता है: \\n{{suggestions}}","misusedTopLevel":"क्या आपने अभी p5.js के {{symbolName}} {{symbolType}} का उपयोग करने का प्रयास किया? यदि ऐसा है, तो आप इसे अपने रेखा-चित्र के setup() फ़ंक्शन में ले जाना चाह सकते हैं।\\n\\n+ अधिक जानकारी: {{url}}","positions":{"p_1":"पहला","p_10":"दसवां","p_11":"ग्यारहवें","p_12":"बारहवें","p_2":"दूसरा","p_3":"तीसरा","p_4":"चौथी","p_5":"पांचवां","p_6":"छठा","p_7":"सातवीं","p_8":"आठवाँ","p_9":"नौवां"},"pre":"\\n\uD83C\uDF38 p5.js कहता है: {{message}}","sketchReaderErrors":{"reservedConst":"आपने एक p5.js आरक्षित चर \\"{{symbol}}\\" का उपयोग किया है, सुनिश्चित करें कि आपने चर नाम को किसी और चीज़ में बदल दिया है।\\n\\n+ अधिक जानकारी: {{url}}","reservedFunc":"आपने एक p5.js आरक्षित फ़ंक्शन \\"{{symbol}}\\" का उपयोग किया है, सुनिश्चित करें कि आपने फ़ंक्शन का नाम किसी और चीज़ में बदल दिया है।\\n\\n+ अधिक जानकारी: {{url}}"},"welcome":"स्वागत! यह आपका मित्रवत डिबगर है. मुझे बंद करने के लिए, p5.min.js का उपयोग करें।","wrongPreload":"{{location}} जब \\"{{func}}\\" को आह्वान किया गया तो p5js लाइब्रेरी के अंदर \\"{{error}}\\" संदेश के साथ एक त्रुटि उत्पन्न हुई। यदि अन्यथा नहीं कहा गया है, तो यह \\"{{func}}\\" को प्रीलोड से आह्वान किए जाने के कारण हो सकता है। प्रीलोड फ़ंक्शन के अंदर लोड आह्वान (लोडछवि, लोडजेएसओएन, लोडमुद्रलिपि, लोडस्ट्रिंग्स इत्यादि) के अलावा कुछ भी नहीं होना चाहिए।"}}'),l=JSON.parse('{"fes":{"autoplay":"再生しようとしたメディア({{src}})は、ブラウザから許可されませんでした。おそらくはブラウザの自動再生ポリシーによるものです。\\n\\n+ 詳細情報: {{url}}","checkUserDefinedFns":"{{actualName}} ではなく、誤って {{name}} と書いてしまったようです。これが意図的でなければ修正してください。","fileLoadError":{"bytes":"ファイルをロードする際に問題が発生したようです。 {{suggestion}}","font":"フォントをロードする際に問題が発生したようです。 {{suggestion}}","gif":"GIFをロードする際に問題が発生しました。GIFのエンコーディングが 87a または 89a であることを確認してください。","image":"画像をロードする際に問題が発生したようです。 {{suggestion}}","json":"JSONファイルをロードする際に問題が発生したようです。 {{suggestion}}","large":"大きなファイルを正常に取得できない場合は、ファイルをより小さなセグメントに分割して、それらを取得することをおすすめします。","strings":"テキストファイルをロードする際に問題が発生したようです。 {{suggestion}}","suggestion":"まずはファイルパス({{filePath}})が正しいかを確認し、次にファイルがオンラインでホストされているか、ローカルサーバーを実行しているかを確認してみてください。\\n\\n+ 詳細情報: {{url}}","table":"テーブルファイルをロードする際に問題が発生したようです。 {{suggestion}}","xml":"XMLファイルをロードする際に問題が発生したようです。 {{suggestion}}"},"friendlyParamError":{"type_EMPTY_VAR":"{{location}} {{func}}()は{{position}}引数に {{formatType}} を期待していましたが、空の変数を受け取りました。これが意図的でなければ、通常はスコープの問題です。\\n\\n+ 詳細情報: {{url}}","type_TOO_FEW_ARGUMENTS":"{{location}} {{func}}()は少なくとも{{minParams}}個の引数を期待していましたが、{{argCount}}個しか受け取っていません。","type_TOO_MANY_ARGUMENTS":"{{location}} {{func}}()は最大{{maxParams}}個の引数を期待していますが、{{argCount}}個を受け取りました。","type_WRONG_TYPE":"{{location}} {{func}}()は{{position}}引数に {{formatType}}タイプを期待していましたが、{{argType}}タイプを受け取りました。"},"globalErrors":{"reference":{"cannotAccess":"\\n{{location}} \\"{{symbol}}\\" が宣言前に使用されています。変数を使用する前に必ず宣言してください。\\n\\n+ 詳細情報:: {{url}}","notDefined":"\\n{{location}} \\"{{symbol}}\\" が現在のスコープに定義されていません。コード内で定義している場合は、そのスコープ、スペル、大文字と小文字(JavaScriptは大文字と小文字を区別します)を確認してください。\\n\\n+ 詳細情報: {{url}}"},"stackSubseq":"└[{{location}}] \\n\\t {{line}}行目( {{func}}()内 )から呼び出されました\\n","stackTop":"┌[{{location}}] \\n\\t {{line}}行目( {{func}}()内 )でエラーが発生しました\\n","syntax":{"badReturnOrYield":"\\n構文エラー - returnが関数外で使用されています。括弧を忘れずに、returnが関数内で使用されていることを確認してください。\\n\\n+ 詳細情報: {{url}}
54","invalidToken":"\\n構文エラー - JavaScriptが認識しないか、期待していないシンボルが見つかりました。\\n\\n+ 詳細情報: {{url}}","missingInitializer":"\\n構文エラー - 定数が宣言されていますが初期化されていません。JavaScriptでは const には初期値が必要です。変数を宣言する際に同じ文内で値を指定する必要があります。エラーの行番号を確認して定数に値を割り当ててください。\\n\\n+ 詳細情報: {{url}}","redeclaredVariable":"\\n構文エラー - \\"{{symbol}}\\" が再宣言されています。JavaScriptでは変数を再宣言することはできません。エラーの行番号でその変数が再宣言されていないか確認してください。\\n\\n+ 詳細情報: {{url}}","unexpectedToken":"\\n構文エラー - 予期しない場所にシンボルがあります。\\n通常はタイプミスが原因です。エラー内の行番号を確認し、不足や余分なものがないか確認してください。\\n\\n+ 詳細情報: {{url}}"},"type":{"constAssign":"\\n{{location}} 定数に再代入しています。JavaScriptでは定数に対する再代入は許可されていません。変数に再代入したい場合は、 var または let で宣言してください。\\n\\n+ 詳細情報: {{url}}","notfunc":"\\n{{location}} \\"{{symbol}}\\" を関数として呼び出すことができません。\\nスペル、大文字と小文字(JavaScriptは大文字と小文字を区別します)、そのタイプを確認してください。\\n\\n+ 詳細情報: {{url}}","notfuncObj":"\\n{{location}} \\"{{symbol}}\\" を関数として呼び出すことができません。\\n{{obj}} の中に \\"{{symbol}}\\" があるかどうか、スペル、大文字と小文字(JavaScriptは大文字と小文字を区別します)、およびそのタイプを確認してください。\\n\\n+ 詳細情報: {{url}}","readFromNull":"\\n{{location}} null のプロパティを読み取ることができません。JavaScriptでは、null はオブジェクトが値を持たないことを意味します。\\n\\n+ 詳細情報: {{url}}","readFromUndefined":"\\n{{location}} undefined のプロパティを読み取ることができません。エラーの行番号を確認し、操作しようとしている変数が undefined でないことを確認してください。\\n\\n+ 詳細情報: {{url}}"}},"libraryError":"{{location}} {{func}} を呼び出した際に、p5jsライブラリ内でメッセージ \\"{{error}}\\" のエラーが発生しました。特に記述がなければ、 {{func}} に渡された引数に関する問題があることが多いです。","location":"[{{file}}, {{line}}行目]","misspelling":"{{location}} \\"{{actualName}}\\" ではなく、誤って \\"{{name}}\\" と書いてしまったようです。p5.js内の {{type}} を使用したい場合は、 {{actualName}} に修正してください。","misspelling_plural":"{{location}} もしかすると誤って \\"{{name}}\\" と書いているかもしれません。\\n以下のいずれかの候補があります: \\n{{suggestions}}","misusedTopLevel":"p5.jsの {{symbolType}} {{symbolName}} を使用しようとしましたか?もしそうなら、それをスケッチの setup()関数内に移動させてください。\\n\\n+ 詳細情報: {{url}}","positions":{"p_1":"第1","p_10":"第10","p_11":"第11","p_12":"第12","p_2":"第2","p_3":"第3","p_4":"第4","p_5":"第5","p_6":"第6","p_7":"第7","p_8":"第8","p_9":"第9"},"pre":"\\n\uD83C\uDF38 p5.jsが言っています: {{message}}","sketchReaderErrors":{"reservedConst":"p5.jsの予約済み変数 \\"{{symbol}}\\" を使用しました。変数名を他の名前に変更してください。\\n\\n+ 詳細情報: {{url}}","reservedFunc":"p5.jsの予約済み関数 \\"{{symbol}}\\" を使用しました。関数名を他の名前に変更してください。\\n\\n+ 詳細情報: {{url}}"},"welcome":"ようこそ!これはあなたのフレンドリーなデバッガーです。オフにするには、p5.min.jsに切り替えてください。","wrongPreload":"{{location}} p5.jsライブラリ内部で \\"{{error}}\\" というメッセージのエラーが発生しました。特に記載がない場合、preloadから \\"{{func}}\\" が呼び出されたことが原因かもしれません。load呼び出し(loadImage、loadJSON、loadFont、loadStringsなど)以外のものは、preload関数の中に入れてはなりません。"}}')},4064:(t,r)=>{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
54+/".split("");r.encode=function(t){if(0<=t&&t<n.length)return n[t];throw TypeError("Must be between 0 and 63: "+t)},r.decode=function(t){return 65<=t&&t<=90?t-65:97<=t&&t<=122?t-97+26:48<=t&&t<=57?t-48+52:43==t?62:47==t?63:-1}},4263:(t,r,n)=>{"use strict";n.d(r,{A:()=>a,z:()=>s});var i=n(6373);n(9321),n(4962),n(74),n(1024),n(5311);class s extends i.H{constructor(t,r){super(t,r);let n=this;this.elt.crossOrigin="anonymous",this._prevTime=0,this._cueIDCounter=0,this._cues=[],this.pixels=[],this._pixelsState=this,this._pixelDensity=1,this._modified=!1,this._frameOnCanvas=-1,Object.defineProperty(n,"src",{get(){let t=n.elt.children[0].src,r=n.elt.src===window.location.href?"":n.elt.src;return t===window.location.href?r:t},set(r){for(let t=0;t<n.elt.children.length;t++)n.elt.removeChild(n.elt.children[t]);let i=document.createElement("source");i.src=r,t.appendChild(i),n.elt.src=r,n.modified=!0}}),n._onended=function(){},n.elt.onended=function(){n._onended(n)}}play(){let t;return this.elt.currentTime===this.elt.duration&&(this.elt.currentTime=0),this.elt.readyState>1||this.elt.load(),(t=this.elt.play())&&t.catch&&t.catch(t=>{"NotAllowedError"===t.name?"undefined"==typeof IS_MINIFIED?p5._friendlyAutoplayError(this.src):console.error(t):console.error("Media play method encountered an unexpected error",t)}),this}stop(){return this.elt.pause(),this.elt.currentTime=0,this}pause(){return this.elt.pause(),this}loop(){return this.elt.setAttribute("loop",!0),this.play(),this}noLoop(){return this.elt.removeAttribute("loop"),this}_setupAutoplayFailDetection(){let t=setTimeout(()=>{"undefined"==typeof IS_MINIFIED?p5._friendlyAutoplayError(this.src):console.error(e)},500);this.elt.addEventListener("play",()=>clearTimeout(t),{passive:!0,once:!0})}autoplay(t){let r=this.elt.getAttribute("autoplay");if(this.elt.setAttribute("autoplay",t),t&&!r){let t=()=>this._setupAutoplayFailDetection();4===this.elt.readyState?t():this.elt.addEventListener("canplay",t,{passive:!0,once:!0})}return this}volume(t){if(void 0===t)return this.elt.volume;this.elt.volume=t}speed(t){if(void 0===t)return this.presetPlaybackRate||this.elt.playbackRate;this.loadedmetadata?this.elt.playbackRate=t:this.presetPlaybackRate=t}time(t){return void 0===t?this.elt.currentTime:(this.elt.currentTime=t,this)}duration(){return this.elt.duration}_ensureCanvas(){this.canvas||(this.canvas=document.createElement("canvas"),this.drawingContext=this.canvas.getContext("2d"),this.setModified(!0));let t=this._frameOnCanvas!==this._pInst.frameCount;this.loadedmetadata&&t&&(this.canvas.width!==this.elt.width&&(this.canvas.width=this.elt.width,this.canvas.height=this.elt.height,this.width=this.canvas.width,this.height=this.canvas.height),this.drawingContext.clearRect(0,0,this.canvas.width,this.canvas.height),!0===this.flipped&&(this.drawingContext.save(),this.drawingContext.scale(-1,1),this.drawingContext.translate(-this.canvas.width,0)),this.drawingContext.drawImage(this.elt,0,0,this.canvas.width,this.canvas.height),!0===this.flipped&&this.drawingContext.restore(),this.setModified(!0),this._frameOnCanvas=this._pInst.frameCount)}loadPixels(...t){return this._ensureCanvas(),p5.Renderer2D.prototype.loadPixels.apply(this,t)}updatePixels(t,r,n,i){return this.loadedmetadata&&(this._ensureCanvas(),p5.Renderer2D.prototype.updatePixels.call(this,t,r,n,i)),this.setModified(!0),this}get(...t){return this._ensureCanvas(),p5.Renderer2D.prototype.get.apply(this,t)}_getPixel(...t){return this.loadPixels(),p5.Renderer2D.prototype._getPixel.apply(this,t)}set(t,r,n){this.loadedmetadata&&(this._ensureCanvas(),p5.Renderer2D.prototype.set.call(this,t,r,n),this.setModified(!0))}copy(...t){this._ensureCanvas(),p5.prototype.copy.apply(this,t)}mask(...t){this.loadPixels(),this.setModified(!0),p5.Image.prototype.mask.apply(this,t)}isModified(){return this._modified}setModified(t){this._modified=t}onended(t){return this._onended=t,this}connect(t){let r,n;if("function"==typeof fn.getAudioContext)r=fn.getAudioContext(),n=p5.soundOut.input;else try{n=(r=t.context).destination}catch(t){throw"connect() is meant to be used with Web Audio API or p5.sound.js"}this.audioSourceNode||(this.audioSourceNode=r.createMediaElementSource(this.elt),this.audioSourceNode.connect(n)),t?t.input?this.audioSourceNode.connect(t.input):this.audioSourceNode.connect(t):this.audioSourceNode.connect(n)}disconnect(){if(this.audioSourceNode)this.audioSourceNode.disconnect();else throw"nothing to disconnect"}showControls(){this.elt.style["text-align"]="inherit",this.elt.controls=!0}hideControls(){this.elt.controls=!1}addCue(t,r,n){let i=this._cueIDCounter++,s=new o(r,t,i,n);return this._cues.push(s),this.elt.ontimeupdate||(this.elt.ontimeupdate=this._onTimeUpdate.bind(this)),i}removeCue(t){for(let r=0;r<this._cues.length;r++)this._cues[r].id===t&&(console.log(t),this._cues.splice(r,1));0===this._cues.length&&(this.elt.ontimeupdate=null)}clearCues(){this._cues=[],this.elt.ontimeupdate=null}_onTimeUpdate(){let t=this.time();for(let r=0;r<this._cues.length;r++){let n=this._cues[r].time,i=this._cues[r].val;this._prevTime<n&&n<=t&&this._cues[r].callback(i)}this._prevTime=t}}class o{constructor(t,r,n,i){this.callback=t,this.time=r,this.id=n,this.val=i}}function a(t,r){function n(t,r,n){(r._userNode?r._userNode:document.body).appendChild(t);let o=n?new s(t,r):new i.H(t,r);return r._elements.push(o),o}function o(t,r,i,s){let o=document.createElement(r);for(let t of("string"==typeof(i=i||"")&&(i=[i]),i)){let r=document.createElement("source");r.setAttribute("src",t),o.appendChild(r)}let a=n(o,t,!0);if(a.loadedmetadata=!1,o.addEventListener("loadedmetadata",()=>{a.width=o.videoWidth,a.height=o.videoHeight,0===a.elt.width&&(a.elt.width=o.videoWidth),0===a.elt.height&&(a.elt.height=o.videoHeight),a.presetPlaybackRate&&(
54a.elt.playbackRate=a.presetPlaybackRate,delete a.presetPlaybackRate),a.loadedmetadata=!0}),"function"==typeof s){let t=()=>{s(a),o.removeEventListener("canplaythrough",t)};o.addEventListener("canplaythrough",t)}return a}r.createVideo=function(t,r){return o(this,"video",t,r)},r.createAudio=function(t,r){return o(this,"audio",t,r)},r.VIDEO="video",r.AUDIO="audio",void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(t){let r=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return r?new Promise(function(n,i){r.call(navigator,t,n,i)}):Promise.reject(Error("getUserMedia is not implemented in this browser"))}),r.createCapture=function(...i){let s,o;if(!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia))throw new DOMException("getUserMedia not supported in this browser");let a=!0,u=!0,l=!1;for(let t of i)t===r.VIDEO?u=!1:t===r.AUDIO?a=!1:"object"==typeof t?(void 0!==t.flipped&&(l=t.flipped,delete t.flipped),s=Object.assign({},s,t)):"function"==typeof t&&(o=t);s=Object.assign({},{video:a,audio:u},s);let h=document.createElement("video");h.setAttribute("playsinline",""),navigator.mediaDevices.getUserMedia(s).then(function(t){try{"srcObject"in h?h.srcObject=t:h.src=window.URL.createObjectURL(t)}catch(r){h.src=t}}).catch(r=>{"NotFoundError"===r.name&&t._friendlyError("No webcam found on this device","createCapture"),"NotAllowedError"===r.name&&t._friendlyError("Access to the camera was denied","createCapture"),console.error(r)});let c=n(h,this,!0);return c.loadedmetadata=!1,h.addEventListener("loadedmetadata",function(){h.play(),h.width?(c.width=h.width,c.height=h.height,l&&(c.elt.style.transform="scaleX(-1)")):(c.width=c.elt.width=h.videoWidth,c.height=c.elt.height=h.videoHeight),c.loadedmetadata=!0,o&&o(h.srcObject)}),c.flipped=l,c},t.MediaElement=s}"undefined"!=typeof p5&&a(p5,p5.prototype)},4306:(t,r,n)=>{"use strict";function i(t){return"string"===s(t)}function s(t){return(Object.prototype.toString.call(t).match(/^\[object\s+(.*?)\]$/)[1]||"").toLowerCase()}function o(t,{precision:r,unit:n}){return a(t)?"none":function(t,r){if(0===t)return 0;let n=~~t,i=0;n&&r&&(i=~~Math.log10(Math.abs(n))+1);let s=10**(r-i);return Math.floor(t*s+.5)/s}(t,r)+(n??"")}function a(t){return Number.isNaN(t)||t instanceof Number&&t?.none}n.d(r,{$I:()=>a,Ed:()=>y,GJ:()=>p,GW:()=>c,HV:()=>h,Kg:()=>i,NW:()=>s,_b:()=>d,ah:()=>v,g1:()=>o,kR:()=>m,pG:()=>g,qE:()=>f,qQ:()=>l});let u={deg:1,grad:.9,rad:180/Math.PI,turn:360};function l(t){if(!t)return;t=t.trim();let r=/^-?[\d.]+$/,n=/%|deg|g?rad|turn$/,i=t.match(/^([a-z]+)\((.+?)\)$/i);if(i){let t=[];return i[2].replace(/\/?\s*(none|[-\w.]+(?:%|deg|g?rad|turn)?)/g,(i,s)=>{let o=s.match(n),a=s;if(o){let t=o[0],r=a.slice(0,-t.length);"%"===t?(a=new Number(r/100)).type="<percentage>":((a=new Number(r*u[t])).type="<angle>",a.unit=t)}else r.test(a)?(a=new Number(a)).type="<number>":"none"===a&&((a=new Number(NaN)).none=!0);i.startsWith("/")&&((a=a instanceof Number?a:new Number(a)).alpha=!0),"object"==typeof a&&a instanceof Number&&(a.raw=s),t.push(a)}),{name:i[1].toLowerCase(),rawName:i[1],rawArgs:i[2],args:t}}}function h(t){return t[t.length-1]}function c(t,r,n){return isNaN(t)?r:isNaN(r)?t:t+(r-t)*n}function d(t,r,n){var i;return c(r[0],r[1],(i=t[0],(n-i)/(t[1]-i)))}function p(t){return t.map(t=>t.split("|").map(t=>{let r=(t=t.trim()).match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);if(r){let t=new String(r[1]);return t.range=[+r[2],+r[3]],t}return t}))}function f(t,r,n){return Math.max(Math.min(n,r),t)}function g(t,r){return Math.sign(t)===Math.sign(r)?t:-t}function m(t,r){return g(Math.abs(t)**r,t)}function y(t,r){return 0===r?0:t/r}function v(t,r,n=0,i=t.length){for(;n<i;){let s=n+i>>1;t[s]<r?n=s+1:i=s}return n}},4574:(t,r,n)=>{"use strict";n.d(r,{A:()=>s});var i=n(5311);function s(t,r){r.ellipseMode=function(t){return(t===i.e||t===i.i||t===i.a||t===i.C)&&this._renderer.states.setValue("ellipseMode",t),this},r.noSmooth=function(){return this._renderer.isP3D?this.setAttributes("antialias",!1):"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.
54imageSmoothingEnabled=!1),this},r.rectMode=function(t){return(t===i.e||t===i.i||t===i.a||t===i.C)&&this._renderer.states.setValue("rectMode",t),this},r.smooth=function(){return this._renderer.isP3D?this.setAttributes("antialias",!0):"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!0),this},r.strokeCap=function(t){return(t===i.j||t===i.S||t===i.k)&&this._renderer.strokeCap(t),this},r.strokeJoin=function(t){return(t===i.j||t===i.B||t===i.l)&&this._renderer.strokeJoin(t),this},r.strokeWeight=function(t){return this._renderer.strokeWeight(t),this}}"undefined"!=typeof p5&&s(p5,p5.prototype)},4576:(t,r,n)=>{"use strict";n.d(r,{uq:()=>l});var i=n(5056),s=n(9855);n(5311);let o=t=>{if(Math.sqrt(Array.from(t).length)%1!=0)throw Error("Array length must be a perfect square.");return!0},a=Array,u=t=>Array.isArray(t);"undefined"!=typeof Float32Array&&(a=Float32Array,u=t=>Array.isArray(t)||t instanceof Float32Array);class l extends s.zE{matrix;#s;constructor(...t){if(super(...t),u(t[0])&&o(t[0])){let r=Math.sqrt(Array.from(t[0]).length);this.#s=r,this.matrix=a.from(t[0])}else"number"==typeof t[0]&&(this.#s=Number(t[0]),this.matrix=this.#o(t[0]));return this}get mat3(){return 3===this.#s?this.matrix:void 0}get mat4(){return 4===this.#s?this.matrix:void 0}add(t){if(this.matrix.length!==t.matrix.length)throw Error("Matrices must be of the same dimension to add.");for(let r=0;r<this.matrix.length;r++)this.matrix[r]+=t.matrix[r];return this}setElement(t,r){return t>=0&&t<this.matrix.length&&(this.matrix[t]=r),this}reset(){return this.matrix=this.#o(this.#s),this}set(t){let r=a.from([...arguments]);return(t instanceof l?r=a.from(t.matrix):u(t)&&(r=a.from(t)),r.length!==this.matrix.length)?p5._friendlyError(`Expected same dimensions values but received different ${r.length}.`,"p5.Matrix.set"):this.matrix=r,this}get(){return new l(this.matrix)}copy(){return new l(this.matrix)}clone(){return this.copy()}diagonal(){let t=[];for(let r=0;r<this.#s;r++)t.push(this.matrix[r*(this.#s+1)]);return t}row(t){let r=[];for(let n=0;n<this.#s;n++)r.push(this.matrix[n*this.#s+t]);return new i.M(...r)}column(t){let r=[];for(let n=0;n<this.#s;n++)r.push(this.matrix[t*this.#s+n]);return new i.M(...r)}transpose(t){return 4===this.#s?this.#a(t):3===this.#s?this.#u(t):this.#l(t)}mult(t){let r;return(t===this||t===this.matrix?r=this.copy().matrix:t instanceof l?r=t.matrix:u(t)&&o(t)?r=t:o(arguments)&&(r=Array.from(arguments)),4===this.#s&&16===r.length)?this.#h(r):3===this.#s&&9===r.length?this.#c(r):this.#d(r)}multiplyVec(t,r){void 0===r&&(r=t.copy());for(let n=0;n<this.#s;n++)r.values[n]=this.row(n).dot(t);return r}invert(t){if(4===this.#s)return this.#p(t);if(3===this.#s)return this.#f(t);throw Error("Invert is not implemented for N>4 at the moment, we are working on it")}createSubMatrix3x3(){if(4===this.#s){let t=new l(3);return t.mat3[0]=this.matrix[0],t.mat3[1]=this.matrix[1],t.mat3[2]=this.matrix[2],t.mat3[3]=this.matrix[4],t.mat3[4]=this.matrix[5],t.mat3[5]=this.matrix[6],t.mat3[6]=this.matrix[8],t.mat3[7]=this.matrix[9],t.mat3[8]=this.matrix[10],t}throw Error("Matrix dimension must be 4 to create a 3x3 submatrix.")}inverseTranspose4x4({mat4:t}){if(3!==this.#s)throw Error("This function only works with 3\xd73 matrices.");this.matrix[0]=t[0],this.matrix[1]=t[1],this.matrix[2]=t[2],this.matrix[3]=t[4],this.matrix[4]=t[5],this.matrix[5]=t[6],this.matrix[6]=t[8],this.matrix[7]=t[9],this.matrix[8]=t[10];let r=this.invert();if(r)r.transpose(this.matrix);else for(let t=0;t<9;t++)this.matrix[t]=0;return this}apply(t){let r;if(t===this||t===this.matrix)r=this.copy().matrix;else if(t instanceof l)r=t.matrix;else if(u(t))r=t;else{if(16!=arguments.length)return;r=arguments}let n=this.matrix,i=n[0],s=n[4],o=n[8],a=n[12];n[0]=r[0]*i+r[1]*s+r[2]*o+r[3]*a,n[4]=r[4]*i+r[5]*s+r[6]*o+r[7]*a,n[8]=r[8]*i+r[9]*s+r[10]*o+r[11]*a,n[12]=r[12]*i+r[13]*s+r[14]*o+r[15]*a;let h=n[1],c=n[5],d=n[9],p=n[13];n[1]=r[0]*h+r[1]*c+r[2]*d+r[3]*p,n[5]=r[4]*h+r[5]*c+r[6]*d+r[7]*p,n[9]=r[8]*h+r[9]*c+r[10]*d+r[11]*p,n[13]=r[12]*h+r[13]*c+r[14]*d+r[15]*p;let f=n[2],g=n[6],m=n[10],y=n[14];n[2]=r[0]*f+r[1]*g+r[2]*m+r[3]*y,n[6]=r[4]*f+r[5]*g+r[6]*m+r[7]*y,n[10]=r[8]*f+r[9]*g+r[10]*m+r[11]*y,n[14]=r[12]*f+r[13]*g+r[14]*m+r[15]*y;let v=n[3],b=n[7],x=n[11],_=n[15];return n[3]=r[0]*v+r[1]*b+r[2]*x+r[3]*_,n[7]=r[4]*v+r[5]*b+r[6]*x+r[7]*_,n[11]=r[8]*v+r[9]*b+r[10]*x+r[11]*_,n[15]=r[12]*v+r[13]*b+r[14]*x+r[15]*_,this}scale(t,r,n){return t instanceof i.M?(r=t.y,n=t.z,t=t.x):t instanceof Array&&(r=t[1],n=t[2],t=t[0]),this.matrix[0]*=t,this.matrix[
541]*=t,this.matrix[2]*=t,this.matrix[3]*=t,this.matrix[4]*=r,this.matrix[5]*=r,this.matrix[6]*=r,this.matrix[7]*=r,this.matrix[8]*=n,this.matrix[9]*=n,this.matrix[10]*=n,this.matrix[11]*=n,this}rotate4x4(t,r,n,s){r instanceof i.M?(n=r.y,s=r.z,r=r.x):r instanceof Array&&(n=r[1],s=r[2],r=r[0]);let o=Math.sqrt(r*r+n*n+s*s);r*=1/o,n*=1/o,s*=1/o;let a=this.matrix[0],u=this.matrix[1],l=this.matrix[2],h=this.matrix[3],c=this.matrix[4],d=this.matrix[5],p=this.matrix[6],f=this.matrix[7],g=this.matrix[8],m=this.matrix[9],y=this.matrix[10],v=this.matrix[11],b=Math.sin(t),x=Math.cos(t),_=1-x,D=r*r*_+x,A=n*r*_+s*b,C=s*r*_-n*b,E=r*n*_-s*b,w=n*n*_+x,S=s*n*_+r*b,F=r*s*_+n*b,N=n*s*_-r*b,B=s*s*_+x;return this.matrix[0]=a*D+c*A+g*C,this.matrix[1]=u*D+d*A+m*C,this.matrix[2]=l*D+p*A+y*C,this.matrix[3]=h*D+f*A+v*C,this.matrix[4]=a*E+c*w+g*S,this.matrix[5]=u*E+d*w+m*S,this.matrix[6]=l*E+p*w+y*S,this.matrix[7]=h*E+f*w+v*S,this.matrix[8]=a*F+c*N+g*B,this.matrix[9]=u*F+d*N+m*B,this.matrix[10]=l*F+p*N+y*B,this.matrix[11]=h*F+f*N+v*B,this}translate(t){let r=t[0],n=t[1],i=t[2]||0;return this.matrix[12]+=this.matrix[0]*r+this.matrix[4]*n+this.matrix[8]*i,this.matrix[13]+=this.matrix[1]*r+this.matrix[5]*n+this.matrix[9]*i,this.matrix[14]+=this.matrix[2]*r+this.matrix[6]*n+this.matrix[10]*i,this.matrix[15]+=this.matrix[3]*r+this.matrix[7]*n+this.matrix[11]*i,this}rotateX(t){this.rotate4x4(t,1,0,0)}rotateY(t){this.rotate4x4(t,0,1,0)}rotateZ(t){this.rotate4x4(t,0,0,1)}perspective(t,r,n,i){let s=1/Math.tan(t/2),o=1/(n-i);return this.matrix[0]=s/r,this.matrix[1]=0,this.matrix[2]=0,this.matrix[3]=0,this.matrix[4]=0,this.matrix[5]=s,this.matrix[6]=0,this.matrix[7]=0,this.matrix[8]=0,this.matrix[9]=0,this.matrix[10]=(i+n)*o,this.matrix[11]=-1,this.matrix[12]=0,this.matrix[13]=0,this.matrix[14]=2*i*n*o,this.matrix[15]=0,this}ortho(t,r,n,i,s,o){let a=1/(t-r),u=1/(n-i),l=1/(s-o);return this.matrix[0]=-2*a,this.matrix[1]=0,this.matrix[2]=0,this.matrix[3]=0,this.matrix[4]=0,this.matrix[5]=-2*u,this.matrix[6]=0,this.matrix[7]=0,this.matrix[8]=0,this.matrix[9]=0,this.matrix[10]=2*l,this.matrix[11]=0,this.matrix[12]=(t+r)*a,this.matrix[13]=(i+n)*u,this.matrix[14]=(o+s)*l,this.matrix[15]=1,this}multiplyVec4(t,r,n,i){let s=[,,,,],o=this.matrix;return s[0]=o[0]*t+o[4]*r+o[8]*n+o[12]*i,s[1]=o[1]*t+o[5]*r+o[9]*n+o[13]*i,s[2]=o[2]*t+o[6]*r+o[10]*n+o[14]*i,s[3]=o[3]*t+o[7]*r+o[11]*n+o[15]*i,s}multiplyPoint({x:t,y:r,z:n}){let s=this.multiplyVec4(t,r,n,1);return new i.M(s[0],s[1],s[2])}multiplyAndNormalizePoint({x:t,y:r,z:n}){let s=this.multiplyVec4(t,r,n,1);return s[0]/=s[3],s[1]/=s[3],s[2]/=s[3],new i.M(s[0],s[1],s[2])}multiplyDirection({x:t,y:r,z:n}){let s=this.multiplyVec4(t,r,n,0);return new i.M(s[0],s[1],s[2])}multiplyVec3(t,r){return void 0===r&&(r=t.copy()),r.x=this.row(0).dot(t),r.y=this.row(1).dot(t),r.z=this.row(2).dot(t),r}#o(t){if(3===t)return new a([1,0,0,0,1,0,0,0,1]);if(4===t)return new a([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);let r=new a(t*t).fill(0);for(let n=0;n<t;n++)r[n*t+n]=1;return r}#h(t){let r=this.matrix[0],n=this.matrix[1],i=this.matrix[2],s=this.matrix[3];return this.matrix[0]=r*t[0]+n*t[4]+i*t[8]+s*t[12],this.matrix[1]=r*t[1]+n*t[5]+i*t[9]+s*t[13],this.matrix[2]=r*t[2]+n*t[6]+i*t[10]+s*t[14],this.matrix[3]=r*t[3]+n*t[7]+i*t[11]+s*t[15],r=this.matrix[4],n=this.matrix[5],i=this.matrix[6],s=this.matrix[7],this.matrix[4]=r*t[0]+n*t[4]+i*t[8]+s*t[12],this.matrix[5]=r*t[1]+n*t[5]+i*t[9]+s*t[13],this.matrix[6]=r*t[2]+n*t[6]+i*t[10]+s*t[14],this.matrix[7]=r*t[3]+n*t[7]+i*t[11]+s*t[15],r=this.matrix[8],n=this.matrix[9],i=this.matrix[10],s=this.matrix[11],this.matrix[8]=r*t[0]+n*t[4]+i*t[8]+s*t[12],this.matrix[9]=r*t[1]+n*t[5]+i*t[9]+s*t[13],this.matrix[10]=r*t[2]+n*t[6]+i*t[10]+s*t[14],this.matrix[11]=r*t[3]+n*t[7]+i*t[11]+s*t[15],r=this.matrix[12],n=this.matrix[13],i=this.matrix[14],s=this.matrix[15],this.matrix[12]=r*t[0]+n*t[4]+i*t[8]+s*t[12],this.matrix[13]=r*t[1]+n*t[5]+i*t[9]+s*t[13],this.matrix[14]=r*t[2]+n*t[6]+i*t[10]+s*t[14],this.matrix[15]=r*t[3]+n*t[7]+i*t[11]+s*t[15],this}#d(t){if(t.length!==this.matrix.length)throw Error("Matrices must be of the same dimension to multiply.");let r=new a(this.matrix.length).fill(0);for(let n=0;n<this.#s;n++)for(let i=0;i<this.#s;i++)for(let s=0;s<this.#s;s++)r[n*this.#s+i]+=this.matrix[n*this.#s+s]*t[s*this.#s+i];return this.matrix=r,this}#c(t){let r=this.mat3[0],n=this.mat3[1],i=this.mat3[2];return this.mat3[0]=r*t[0]+n*t[3]+i*t[6],this.mat3[1]=r*t[1]+n*t[4]+i*t[7],this.mat3[2]=r*t[2]+n*t[5]+i*t[8],r=this.mat3[3],n=this.mat3[4],i=this.mat3[5],this.mat3[3]=r*t[0]+n*t[3]+i*t[6],this.mat3[4]=r*t[1]+n*t[4]+i*t[7],this.mat3[5]=r*t[2]+n*t[5]+i*t[8],r=this.mat3[6],n=this.mat3[7],i=this.mat3[8],this.mat3[6]=r*t[0]+n*t[3]+i*t[6],this.mat3[7]=r*t[1]+n*t[4]+i*t[7],this.mat3[8]=r*t[2]+n*t[5]+i*t[8],this}#l(){let t=this.#s;for(let r=0;r<t;r++)for(let n=0;n<t;n++)this.matrix[r*t+n]=this.matrix[n*t+r];return this}#a(t){let r,n,i,s,o,a;return console.log("====> 4x4"),t instanceof l?(r=t.matrix[1],n=t.matrix[2],i=t.matrix[3],s=t.matrix[6],o=t.matrix[7],a=t.matrix[11],this.matrix[0]=t.matrix[0],this.matrix[
541]=t.matrix[4],this.matrix[2]=t.matrix[8],this.matrix[3]=t.matrix[12],this.matrix[4]=r,this.matrix[5]=t.matrix[5],this.matrix[6]=t.matrix[9],this.matrix[7]=t.matrix[13],this.matrix[8]=n,this.matrix[9]=s,this.matrix[10]=t.matrix[10],this.matrix[11]=t.matrix[14],this.matrix[12]=i,this.matrix[13]=o,this.matrix[14]=a,this.matrix[15]=t.matrix[15]):u(t)&&(r=t[1],n=t[2],i=t[3],s=t[6],o=t[7],a=t[11],this.matrix[0]=t[0],this.matrix[1]=t[4],this.matrix[2]=t[8],this.matrix[3]=t[12],this.matrix[4]=r,this.matrix[5]=t[5],this.matrix[6]=t[9],this.matrix[7]=t[13],this.matrix[8]=n,this.matrix[9]=s,this.matrix[10]=t[10],this.matrix[11]=t[14],this.matrix[12]=i,this.matrix[13]=o,this.matrix[14]=a,this.matrix[15]=t[15]),this}#u(t){void 0===t&&(t=this.mat3);let r=t[1],n=t[2],i=t[5];return this.mat3[0]=t[0],this.mat3[1]=t[3],this.mat3[2]=t[6],this.mat3[3]=r,this.mat3[4]=t[4],this.mat3[5]=t[7],this.mat3[6]=n,this.mat3[7]=i,this.mat3[8]=t[8],this}#p(t){let r,n,i,s,o,a,h,c,d,p,f,g,m,y,v,b;t instanceof l?(r=t.matrix[0],n=t.matrix[1],i=t.matrix[2],s=t.matrix[3],o=t.matrix[4],a=t.matrix[5],h=t.matrix[6],c=t.matrix[7],d=t.matrix[8],p=t.matrix[9],f=t.matrix[10],g=t.matrix[11],m=t.matrix[12],y=t.matrix[13],v=t.matrix[14],b=t.matrix[15]):u(t)&&(r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],h=t[6],c=t[7],d=t[8],p=t[9],f=t[10],g=t[11],m=t[12],y=t[13],v=t[14],b=t[15]);let x=r*a-n*o,_=r*h-i*o,D=r*c-s*o,A=n*h-i*a,C=n*c-s*a,E=i*c-s*h,w=d*y-p*m,S=d*v-f*m,F=d*b-g*m,N=p*v-f*y,B=p*b-g*y,k=f*b-g*v,M=x*k-_*B+D*N+A*F-C*S+E*w;return M?(M=1/M,this.matrix[0]=(a*k-h*B+c*N)*M,this.matrix[1]=(i*B-n*k-s*N)*M,this.matrix[2]=(y*E-v*C+b*A)*M,this.matrix[3]=(f*C-p*E-g*A)*M,this.matrix[4]=(h*F-o*k-c*S)*M,this.matrix[5]=(r*k-i*F+s*S)*M,this.matrix[6]=(v*D-m*E-b*_)*M,this.matrix[7]=(d*E-f*D+g*_)*M,this.matrix[8]=(o*B-a*F+c*w)*M,this.matrix[9]=(n*F-r*B-s*w)*M,this.matrix[10]=(m*C-y*D+b*x)*M,this.matrix[11]=(p*D-d*C-g*x)*M,this.matrix[12]=(a*S-o*N-h*w)*M,this.matrix[13]=(r*N-n*S+i*w)*M,this.matrix[14]=(y*_-m*A-v*x)*M,this.matrix[15]=(d*A-p*_+f*x)*M,this):null}#f(){let t=this.mat3[0],r=this.mat3[1],n=this.mat3[2],i=this.mat3[3],s=this.mat3[4],o=this.mat3[5],a=this.mat3[6],u=this.mat3[7],l=this.mat3[8],h=l*s-o*u,c=-l*i+o*a,d=u*i-s*a,p=t*h+r*c+n*d;return p?(p=1/p,this.mat3[0]=h*p,this.mat3[1]=(-l*r+n*u)*p,this.mat3[2]=(o*r-n*s)*p,this.mat3[3]=c*p,this.mat3[4]=(l*t-n*a)*p,this.mat3[5]=(-o*t+n*i)*p,this.mat3[6]=d*p,this.mat3[7]=(-u*t+r*a)*p,this.mat3[8]=(s*t-r*i)*p,this):null}#g(){if(4!==this.#s)throw Error("Determinant is only implemented for 4x4 matrices. We are working on it.");let t=this.matrix[0]*this.matrix[5]-this.matrix[1]*this.matrix[4],r=this.matrix[0]*this.matrix[6]-this.matrix[2]*this.matrix[4],n=this.matrix[0]*this.matrix[7]-this.matrix[3]*this.matrix[4],i=this.matrix[1]*this.matrix[6]-this.matrix[2]*this.matrix[5],s=this.matrix[1]*this.matrix[7]-this.matrix[3]*this.matrix[5],o=this.matrix[2]*this.matrix[7]-this.matrix[3]*this.matrix[6],a=this.matrix[8]*this.matrix[13]-this.matrix[9]*this.matrix[12],u=this.matrix[8]*this.matrix[14]-this.matrix[10]*this.matrix[12],l=this.matrix[8]*this.matrix[15]-this.matrix[11]*this.matrix[12],h=this.matrix[9]*this.matrix[14]-this.matrix[10]*this.matrix[13],c=this.matrix[9]*this.matrix[15]-this.matrix[11]*this.matrix[13];return t*(this.matrix[10]*this.matrix[15]-this.matrix[11]*this.matrix[14])-r*c+n*h+i*l-s*u+o*a}}},4590:(t,r,n)=>{"use strict";n.d(r,{Ay:()=>u,FL:()=>o,ie:()=>a});var i=n(2586),s=n(1925);let o={D50:[.3457/.3585,1,.8251046025104602],D65:[.3127/.329,1,1.0890577507598784]};function a(t){return Array.isArray(t)?t:o[t]}function u(t,r,n,l={}){if(t=a(t),r=a(r),!t||!r)throw TypeError(`Missing white point to convert ${!t?"from":""}${!t&&!r?"/":""}${!r?"to":""}`);if(t===r)return n;let h={W1:t,W2:r,XYZ:n,options:l};if(i.A.run("chromatic-adaptation-start",h),h.M||(h.W1===o.D65&&h.W2===o.D50?h.M=[[1.0479297925449969,.022946870601609652,-.05019226628920524],[.02962780877005599,.9904344267538799,-.017073799063418826],[-.009243040646204504,.015055191490298152,.7518742814281371]]:h.W1===o.D50&&h.W2===o.D65&&(h.M=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.02104
541441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]])),i.A.run("chromatic-adaptation-end",h),h.M)return(0,s.A)(h.M,h.XYZ);throw TypeError("Only Bradford CAT with white points D50 and D65 supported for now.")}},4867:(t,r,n)=>{"use strict";n.d(r,{AQ:()=>w,Ay:()=>N,Om:()=>S,yp:()=>C});var i=n(74),s=n(5056),o=n(5311);function a(t){let r=0;for(let n=1;n<t.length;n++)r+=t[n-1].position.dist(t[n].position);return r}n(1024);class u{constructor(t){for(let[r,n]of Object.entries(t))this[r]=n}}class l{vertices;_shape=null;_primitivesIndex=null;_contoursIndex=null;isClosing=!1;constructor(...t){if(this.constructor===l)throw Error("ShapePrimitive is an abstract class: it cannot be instantiated.");if(t.length>0)this.vertices=t;else throw Error("At least one vertex must be passed to the constructor.")}get vertexCount(){return this.vertices.length}get vertexCapacity(){throw Error("Getter vertexCapacity must be implemented.")}get _firstInterpolatedVertex(){return this.startVertex()}get canOverrideAnchor(){return!1}accept(t){throw Error("Method accept() must be implemented.")}addToShape(t){let r=t.at(-1);if(0===r.primitives.length)r.primitives.push(this);else{let n,i,s=t.at(-1,-1),o=s instanceof this.constructor,a=s.vertexCapacity-s.vertexCount;o&&a>0?(n=this.vertices.splice(0,a),i=this.vertices,s.vertices.push(...n),i.length>0&&r.primitives.push(this)):r.primitives.push(this)}if(this.vertices.length>0){let r=t.at(-1);this._primitivesIndex=r.primitives.length-1,this._contoursIndex=t.contours.length-1,this._shape=t}return t.at(-1,-1)}get _nextPrimitive(){return this._belongsToShape?this._shape.at(this._contoursIndex,this._primitivesIndex+1):null}get _belongsToShape(){return null!==this._shape}handlesClose(){return!1}close(t){throw Error("Unimplemented!")}}class h{#m;primitives;constructor(t=o.m){this.#m=t,this.primitives=[]}get kind(){let t=0===this.primitives.length,r=this.#m===o.m;return t&&r?o.E:this.#m}accept(t){for(let r of this.primitives)r.accept(t)}}class c extends l{#y=1;get vertexCapacity(){return this.#y}accept(t){t.visitAnchor(this)}getEndVertex(){return this.vertices[0]}}class d extends l{constructor(...t){if(super(...t),this.constructor===d)throw Error("Segment is an abstract class: it cannot be instantiated.")}get _previousPrimitive(){return this._belongsToShape?this._shape.at(this._contoursIndex,this._primitivesIndex-1):null}getStartVertex(){return this._previousPrimitive.getEndVertex()}getEndVertex(){return this.vertices.at(-1)}}class p extends d{#y=1;get vertexCapacity(){return this.#y}accept(t){t.visitLineSegment(this)}}class f extends d{#v;#y;constructor(t,...r){super(...r);let n=Array.isArray(t)?t[0]:t;this.#v=n,this.#y=n}get order(){return this.#v}get vertexCapacity(){return this.#y}#b;hullLength(){return void 0===this.#b&&(this.#b=a([this.getStartVertex(),...this.vertices])),this.#b}accept(t){t.visitBezierSegment(this)}}class g extends d{#y=1/0;_splineProperties={ends:o.I,tightness:0};get vertexCapacity(){return this.#y}accept(t){t.visitSplineSegment(this)}get _comesAfterSegment(){return this._previousPrimitive instanceof d}get canOverrideAnchor(){return this._splineProperties.ends===o.t}get _firstInterpolatedVertex(){return this._splineProperties.ends===o.t?this._comesAfterSegment?this.vertices[1]:this.vertices[0]:this.getStartVertex()}get _chainedToSegment(){if(!this._belongsToShape||!this._comesAfterSegment)return!1;{let t=this._firstInterpolatedVertex.position;return this.getStartVertex().position.equals(t)}}addToShape(t){let r=super.addToShape(t);if(this._splineProperties.ends=t._splineProperties.ends,this._splineProperties.tightness=t._splineProperties.tightness,this._splineProperties.ends!==o.t)return r;let n=!this._belongsToShape,i=t.at(-1,-1);if(n&&2===i.vertices.length&&i._comesAfterSegment&&!i._chainedToSegment){let t,r,n=i._firstInterpolatedVertex.position,s=i.getStartVertex().position;console.warn((t=n.array(),r=s.array(),`Spline does not start where previous path segment ends:
55      second spline vertex at (${t})
56      expected to be at (${r}).`))}return r}getEndVertex(){return this._splineProperties.ends===o.I?super.getEndVertex():this._splineProperties.ends===o.t?this.vertices.at(-2):this.getStartVertex()}getControlPoints(){let t=[];for(let r of(this._comesAfterSegment&&t.push(this.getStartVertex()),t.push(this.getStartVertex()),this.vertices))t.push(r);let r=this.getStartVertex();return this._splineProperties.ends===o.I?(t.unshift(r),t.push(this.vertices.at(-1))):this._splineProperties.ends===o.J&&(t.unshift(this.vertices.at(-1)),t.push(r,this.vertices.at(0))),t}handlesClose(){return!!this._belongsToShape&&2===this._shape.at(this._contoursIndex).primitives.length&&1===this._primitivesIndex}close(){this._splineProperties.ends=o.J}}class m extends l{#y=1;get vertexCapacity(){return this.#y}accept(t){t.visitPoint(this)}}class y extends l{#y=2;get vertexCapacity(){return this.#y}accept(t){t.visitLine(this)}}class v extends l{#y=3;get vertexCapacity(){return this.#y}accept(t){t.visitTriangle(this)}}class b extends l{#y=4;get vertexCapacity(){return this.#y}accept(t){t.visitQuad(this)}}class x extends l{#y=1/0;get vertexCapacity(){return this.#y}accept(t){t.visitTriangleFan(this)}}class _ extends l{#y=1/0;get vertexCapacity(){return this.#y}accept(t){t.visitTriangleStrip(this)}}class D extends l{#y=1/0;get vertexCapacity(){return this.#y}accept(t){t.visitQuadStrip(this)}}class A{creators;constructor(){let t=new Map;t.set(`vertex-${o.E}`,(...t)=>new c(...t)),t.set(`vertex-${o.m}`,(...t)=>new p(...t)),t.set(`vertex-${o.o}`,(...t)=>new m(...t)),t.set(`vertex-${o.L}`,(...t)=>new y(...t)),t.set(`vertex-${o.p}`,(...t)=>new v(...t)),t.set(`vertex-${o.Q}`,(...t)=>new b(...t)),t.set(`vertex-${o.q}`,(...t)=>new x(...t)),t.set(`vertex-${o.r}`,(...t)=>new _(...t)),t.set(`vertex-${o.s}`,(...t)=>new D(...t)),t.set(`bezierVertex-${o.E}`,(t,...r)=>new c(...r)),t.set(`bezierVertex-${o.m}`,(t,...r)=>new f(t,...r)),t.set(`splineVertex-${o.E}`,(...t)=>new c(...t)),t.set(`splineVertex-${o.m}`,(...t)=>new g(...t)),this.creators=t}get(t,r){let n=`${t}-${r}`;return this.creators.get(n)}set(t,r,n){let i=`${t}-${r}`;this.creators.set(i,n)}clear(){this.creators.clear()}}class C{#x;#_;#D;#A=3;kind=null;contours=[];_splineProperties={tightness:0,ends:o.I};userVertexProperties=null;constructor(t,r=new A){for(let n in this.#_=t,this.#x=t,this.#D=r,this.#x)"position"!==n&&"textureCoordinates"!==n&&(this[n]=function(t){this.#x[n]=t})}serializeToArray(t){if(null==t)return[];if(t instanceof Number)return[t];if(t instanceof Array)return t;if(t.array instanceof Function)return t.array();
56throw Error(`Can't convert ${t} to array!`)}vertexToArray(t){let r=[];for(let n in this.#x){if(this.userVertexProperties&&n in this.userVertexProperties)continue;let i=t[n];r.push(...this.serializeToArray(i))}for(let n in this.userVertexProperties)n in t?r.push(...this.serializeToArray(t[n])):r.push(...Array(this.userVertexProperties[n]).fill(0));return r}hydrateValue(t,r){if(null===r)return null;if(r instanceof Number)return t.shift();if(r instanceof Array){let n=[];for(let i=0;i<r.length;i++)n.push(t.shift());return n}if(r instanceof s.M)return new s.M(t.shift(),t.shift(),t.shift());if(r instanceof i.C){let r=[t.shift(),t.shift(),t.shift(),t.shift()];return new i.C(r)}}arrayToVertex(t){let r={},n=[...t];for(let t in this.#x){if(this.userVertexProperties&&t in this.userVertexProperties)continue;let i=this.#x[t];r[t]=this.hydrateValue(n,i)}for(let t in this.userVertexProperties){let i=this.#x[t];r[t]=this.hydrateValue(n,i)}return r}arrayScale(t,r){return t.map(t=>t*r)}arraySum(t,...r){return t.map((t,n)=>{let i=t;for(let t=0;t<r.length;t++)i+=r[t][n];return i})}arrayMinus(t,r){return t.map((t,n)=>t-r[n])}evaluateCubicBezier([t,r,n,i],s){return this.arraySum(this.arrayScale(t,Math.pow(1-s,3)),this.arrayScale(r,3*Math.pow(1-s,2)*s),this.arrayScale(n,3*(1-s)*Math.pow(s,2)),this.arrayScale(i,Math.pow(s,3)))}evaluateQuadraticBezier([t,r,n],i){return this.arraySum(this.arrayScale(t,Math.pow(1-i,2)),this.arrayScale(r,2*(1-i)*i),this.arrayScale(n,i*i))}catmullRomToBezier(t,r){let n=1-r,i=[];for(let r=0;r+3<t.length;r++){let[s,o,a,u]=t.slice(r,r+4),l=this.arraySum(o,this.arrayScale(this.arrayMinus(a,s),n/6)),h=this.arraySum(a,this.arrayScale(this.arrayMinus(o,u),n/6));i.push([l,h,a])}return i}at(t,r,n){let i;switch(i=this.contours.at(t),arguments.length){case 1:return i;case 2:return i.primitives.at(r);case 3:return i.primitives.at(r).vertices.at(n)}}reset(){this.#x={...this.#_},this.kind=null,this.contours=[],this.userVertexProperties=null}vertexProperty(t,r){this.userVertexProperties=this.userVertexProperties||{};let n=this.vertexPropertyKey(t),i=Array.isArray(r)?r:[r];this.userVertexProperties[n]||(this.userVertexProperties[n]=i.length),this.#x[n]=i}vertexPropertyName(t){return t.replace(/Src$/,"")}vertexPropertyKey(t){return t+"Src"}bezierOrder(...t){this.#A=t}splineProperty(t,r){this._splineProperties[t]=r}splineProperties(t){if(!t)return this._splineProperties;for(let r in t)this.splineProperty(r,t[r])}#C(t,r){return this.#x.position=t,void 0!==r&&(this.#x.textureCoordinates=r),new u(this.#x)}#E(t,r,...n){let i=this.#D.get(t,r);return"bezierVertex"===t?i(this.#A,...n):i(...n)}#w(t,r,n){let i=this.at(-1).kind,s=this.#C(r,n);return this.#E(t,i,s).addToShape(this)}vertex(t,r,{isClosing:n=!1}={}){this.#w("vertex",t,r).isClosing=n}bezierVertex(t,r){this.#w("bezierVertex",t,r)}splineVertex(t,r){this.#w("splineVertex",t,r)}arcVertex(t,r){this.#w("arcVertex",t,r)}beginContour(t=o.m){this.at(-1)?.kind===o.E&&this.contours.pop(),this.contours.push(new h(t))}endContour(t=o.O,r=this.contours.length-1){let n=this.at(r);if(t===o.n){let t=n.kind===o.m,i=this.at(r,0,0),s=Object.hasOwn(i,"position"),a=this.at(r,-1);if(t&&s)if(a.handlesClose())a.close(i);else{let t=this.contours.splice(r+1,this.contours.length-r-1),n=this.#x;for(let t in this.#x={...n},i)["position","textureCoordinates"].includes(t)||(this.#x[t]=i[t]);this.vertex(i.position,i.textureCoordinates,{isClosing:!0}),this.#x=n,this.contours.push(...t)}}}beginShape(t=o.m){this.kind=t,this.beginContour(t)}endShape(t=o.O){t===o.n&&this.endContour(t,0)}accept(t){for(let r of this.contours)r.accept(t)}}class E{constructor(){if(this.constructor===E)throw Error("PrimitiveVisitor is an abstract class: it cannot be instantiated.")}visitAnchor(t){throw Error("Method visitAnchor() has not been implemented.")}visitLineSegment(t){throw Error("Method visitLineSegment() has not been implemented.")}visitBezierSegment(t){throw Error("Method visitBezierSegment() has not been implemented.")}visitSplineSegment(t){throw Error("Method visitSplineSegment() has not been implemented.")}visitArcSegment(t){throw Error("Method visitArcSegment() has not been implemented.")}visitPoint(t){throw Error("Method visitPoint() has not been implemented.")}visitLine(t){throw Error("Method visitLine() has not been implemented.")}visitTriangle(t){throw Error("Method visitTriangle() has not been implemented.")}visitQuad(t){throw Error("Method visitQuad() has not been implemented.")}visitTriangleFan(t){throw Error("Method visitTriangleFan() has not been implemented.")}visitTriangleStrip(t){throw Error("Method visitTriangleStrip() has not been implemented.")}visitQuadStrip(t){throw Error("Method visitQuadStrip() has not been implemented.")}}
56class w extends E{path=new Path2D;strokeWeight;constructor({strokeWeight:t}){super(),this.strokeWeight=t}visitAnchor(t){let r=t.getEndVertex();this.path.moveTo(r.position.x,r.position.y)}visitLineSegment(t){if(t.isClosing)this.path.closePath();else{let r=t.getEndVertex();this.path.lineTo(r.position.x,r.position.y)}}visitBezierSegment(t){let[r,n,i]=t.vertices;switch(t.order){case 2:this.path.quadraticCurveTo(r.position.x,r.position.y,n.position.x,n.position.y);break;case 3:this.path.bezierCurveTo(r.position.x,r.position.y,n.position.x,n.position.y,i.position.x,i.position.y)}}visitSplineSegment(t){let r=t._shape;if(t._splineProperties.ends===o.t&&!t._comesAfterSegment){let r=t._firstInterpolatedVertex;this.path.moveTo(r.position.x,r.position.y)}let n=t.getControlPoints().map(t=>r.vertexToArray(t));for(let i of r.catmullRomToBezier(n,t._splineProperties.tightness).map(t=>t.map(t=>r.arrayToVertex(t)))){let t=i.flatMap(t=>[t.position.x,t.position.y]);this.path.bezierCurveTo(...t)}}visitPoint(t){let{x:r,y:n}=t.vertices[0].position;this.path.moveTo(r,n),this.path.lineTo(r+1e-5,n)}visitLine(t){let{x:r,y:n}=t.vertices[0].position,{x:i,y:s}=t.vertices[1].position;this.path.moveTo(r,n),this.path.lineTo(i,s)}visitTriangle(t){let[r,n,i]=t.vertices;this.path.moveTo(r.position.x,r.position.y),this.path.lineTo(n.position.x,n.position.y),this.path.lineTo(i.position.x,i.position.y),this.path.closePath()}visitQuad(t){let[r,n,i,s]=t.vertices;this.path.moveTo(r.position.x,r.position.y),this.path.lineTo(n.position.x,n.position.y),this.path.lineTo(i.position.x,i.position.y),this.path.lineTo(s.position.x,s.position.y),this.path.closePath()}visitTriangleFan(t){let[r,...n]=t.vertices;for(let t=0;t<n.length-1;t++){let i=n[t],s=n[t+1];this.path.moveTo(r.position.x,r.position.y),this.path.lineTo(i.position.x,i.position.y),this.path.lineTo(s.position.x,s.position.y),this.path.closePath()}}visitTriangleStrip(t){for(let r=0;r<t.vertices.length-2;r++){let n=t.vertices[r],i=t.vertices[r+1],s=t.vertices[r+2];this.path.moveTo(n.position.x,n.position.y),this.path.lineTo(i.position.x,i.position.y),this.path.lineTo(s.position.x,s.position.y),this.path.closePath()}}visitQuadStrip(t){for(let r=0;r<t.vertices.length-3;r+=2){let n=t.vertices[r],i=t.vertices[r+1],s=t.vertices[r+2],o=t.vertices[r+3];this.path.moveTo(n.position.x,n.position.y),this.path.lineTo(i.position.x,i.position.y),this.path.lineTo(o.position.x,o.position.y),this.path.lineTo(s.position.x,s.position.y),this.path.closePath()}}}class S extends E{contours=[];curveDetail;constructor({curveDetail:t=1}={}){super(),this.curveDetail=t}lastContour(){return this.contours[this.contours.length-1]}visitAnchor(t){this.contours.push([]);let r=t._nextPrimitive;r?.canOverrideAnchor?this.lastContour().push(r._firstInterpolatedVertex):this.lastContour().push(t.getEndVertex())}visitLineSegment(t){this.lastContour().push(t.getEndVertex())}visitBezierSegment(t){let r=this.lastContour(),n=Math.max(1,Math.ceil(t.hullLength()*this.curveDetail)),i=[t.getStartVertex(),...t.vertices].map(r=>t._shape.vertexToArray(r));for(let s=0;s<n;s++){let o=(s+1)/n;r.push(t._shape.arrayToVertex(3===t.order?t._shape.evaluateCubicBezier(i,o):t._shape.evaluateQuadraticBezier(i,o)))}}visitSplineSegment(t){let r=t._shape,n=this.lastContour(),i=t.getControlPoints().map(t=>r.vertexToArray(t)),s=r.catmullRomToBezier(i,t._splineProperties.tightness),o=r.vertexToArray(t._firstInterpolatedVertex);for(let t of s){let i=[o,...t],s=Math.max(1,Math.ceil(a(i.map(t=>r.arrayToVertex(t)))*this.curveDetail));for(let t=0;t<s;t++){let o=(t+1)/s;n.push(r.arrayToVertex(r.evaluateCubicBezier(i,o)))}o=t[2]}}visitPoint(t){this.contours.push(t.vertices.slice())}visitLine(t){this.contours.push(t.vertices.slice())}visitTriangle(t){this.contours.push(t.vertices.slice())}visitQuad(t){this.contours.push(t.vertices.slice())}visitTriangleFan(t){this.contours.push(t.vertices.slice())}visitTriangleStrip(t){this.contours.push(t.vertices.slice())}visitQuadStrip(t){this.contours.push(t.vertices.slice())}}class F extends E{constructor(){super()}}
56function N(t,r){t.Shape=C,t.Contour=h,t.ShapePrimitive=l,t.Vertex=u,t.Anchor=c,t.Segment=d,t.LineSegment=p,t.BezierSegment=f,t.SplineSegment=g,t.Point=m,t.Line=y,t.Triangle=v,t.Quad=b,t.TriangleFan=x,t.TriangleStrip=_,t.QuadStrip=D,t.PrimitiveVisitor=E,t.PrimitiveToPath2DConverter=w,t.PrimitiveToVerticesConverter=S,t.PointAtLengthGetter=F,r.bezierOrder=function(t){return this._renderer.bezierOrder(t)},r.splineVertex=function(...t){let r=0,n=0,i=0,s=0,o=0;2===t.length?[r,n]=t:4===t.length?[r,n,s,o]=t:3===t.length?[r,n,i]=t:5===t.length&&([r,n,i,s,o]=t),this._renderer.splineVertex(r,n,i,s,o)},r.splineProperty=function(t,r){return this._renderer.splineProperty(t,r)},r.splineProperties=function(t){return this._renderer.splineProperties(t)},r.vertex=function(t,r){let n,i,s;n=i=s=0,3==arguments.length?n=arguments[2]:4==arguments.length?(i=arguments[2],s=arguments[3]):5==arguments.length&&(n=arguments[2],i=arguments[3],s=arguments[4]),this._renderer.vertex(t,r,n,i,s)},r.beginContour=function(t){this._renderer.beginContour(t)},r.endContour=function(t=o.O){this._renderer.endContour(t)}}"undefined"!=typeof p5&&N(p5,p5.prototype)},4922:(t,r,n)=>{"use strict";n.d(r,{k:()=>s});var i=n(5311);let s={[i.$]:3,[i.U]:4,[i.Z]:.5}},4962:(t,r,n)=>{"use strict";n.d(r,{A:()=>o,_:()=>i});class i{constructor(t){if(t)this.DOM=t;else{let t=document.implementation.createDocument(null,"doc");this.DOM=t.createElement("root")}}getParent(){return new i(this.DOM.parentElement)}getName(){return this.DOM.tagName}setName(t){let r=this.DOM.innerHTML,n=this.DOM.attributes,i=document.implementation.createDocument(null,"default").createElement(t);i.innerHTML=r;for(let t=0;t<n.length;t++)i.setAttribute(n[t].nodeName,n[t].nodeValue);this.DOM=i}hasChildren(){return this.DOM.children.length>0}listChildren(){let t=[];for(let r=0;r<this.DOM.childNodes.length;r++)t.push(this.DOM.childNodes[r].nodeName);return t}getChildren(t){return t?s(this.DOM.getElementsByTagName(t)):s(this.DOM.children)}getChild(t){if("string"!=typeof t)return new i(this.DOM.children[t]);for(let r of this.DOM.children)if(r.tagName===t)return new i(r)}addChild(t){t instanceof i&&this.DOM.appendChild(t.DOM)}removeChild(t){let r=-1;if("string"==typeof t){for(let n=0;n<this.DOM.children.length;n++)if(this.DOM.children[n].tagName===t){r=n;break}}else r=t;-1!==r&&this.DOM.removeChild(this.DOM.children[r])}getAttributeCount(){return this.DOM.attributes.length}listAttributes(){let t=[];for(let r of this.DOM.attributes)t.push(r.nodeName);return t}hasAttribute(t){let r={};for(let t of this.DOM.attributes)r[t.nodeName]=t.nodeValue;return!!r[t]}getNum(t,r){let n={};for(let t of this.DOM.attributes)n[t.nodeName]=t.nodeValue;return Number(n[t])||r||0}getString(t,r){let n={};for(let t of this.DOM.attributes)n[t.nodeName]=t.nodeValue;return n[t]?String(n[t]):r||null}setAttribute(t,r){this.DOM.setAttribute(t,r)}getContent(t){return this.DOM.textContent.replace(/\s\s+/g,",")||t||null}setContent(t){this.DOM.children.length||(this.DOM.textContent=t)}serialize(){return new XMLSerializer().serializeToString(this.DOM)}}function s(t){let r=[];for(let n=0;n<t.length;n++)r.push(new i(t[n]));return r}function o(t,r){t.XML=i}"undefined"!=typeof p5&&o(p5,p5.prototype)},5056:(t,r,n)=>{"use strict";n.d(r,{A:()=>u,M:()=>a});var i=n(5311);let s=function(t,r){return 0!==t&&(this.x=this.x%t),0!==r&&(this.y=this.y%r),this},o=function(t,r,n){return 0!==t&&(this.x=this.x%t),0!==r&&(this.y=this.y%r),0!==n&&(this.z=this.z%n),this};class a{constructor(...t){let r=t.map(t=>t||0);"function"==typeof t[0]&&(this.isPInst=!0,this._fromRadians=t[0],this._toRadians=t[1],r=t.slice(2).map(t=>t||0));let n=r.length;0===n?(this.dimensions=2,this._values=[0,0,0]):(this.dimensions=n,this._values=r)}get values(){return this._values}set values(t){let r=t.length;0===r?(this.dimensions=2,this._values=[0,0,0]):(this.dimensions=r,this._values=t.slice())}get x(){return this._values[0]||0}getValue(t){if(t<this._values.length)return this._values[t];p5._friendlyError("The index parameter is trying to set a value outside the bounds of the vector","p5.Vector.setValue")}setValue(t,r){t<this._values.length?this._values[t]=r:p5._friendlyError("The index parameter is trying to set a value outside the bounds of the vector","p5.Vector.setValue")}get y(){return this._values[1]||0}get z(){return this._values[2]||0}get w(){return this._values[3]||0}set x(t){this._values.length>1&&(this._values[0]=t)}set y(t){this._values.length>1&&(this._values[1]=t)}set z(t){this._values.length>2&&(this._values[2]=t)}set w(t){this._values.length>3&&(this._values[3]=t)}toString(){return`[${this.values.join(", ")}]`}set(...t){return t[0]instanceof a?this.values=t[0].values.slice():Array.isArray(t[0])?this.values=t[0].map(t=>t||0):this.values=t.map(t=>t||0),this.dimensions=this.values.length,this}copy(){return this.isPInst?new a(this._fromRadians,this._toRadians,...this.values):new a(...this.values)}add(...t){return t[0]instanceof a?t=t[0].values:Array.isArray(t[0])&&(t=t[0]),t.forEach((t,r)=>{this.values[r]=(this.values[r]||0)+(t||0)}),this}rem(t,r,n){if(t instanceof a){if([t.x,t.y,t.z].every(Number.isFinite)){let r=parseFloat(t.x),n=parseFloat(t.y),i=parseFloat(t.z);return o.call(this,r,n,i)}}else if(Array.isArray(t)){if(t.every(t=>
56Number.isFinite(t))){if(2===t.length)return s.call(this,t[0],t[1]);if(3===t.length)return o.call(this,t[0],t[1],t[2])}}else if(1==arguments.length){if(Number.isFinite(arguments[0])&&0!==arguments[0])return this.x=this.x%arguments[0],this.y=this.y%arguments[0],this.z=this.z%arguments[0],this}else if(2==arguments.length){let t=[...arguments];if(t.every(t=>Number.isFinite(t))&&2===t.length)return s.call(this,t[0],t[1])}else if(3==arguments.length){let t=[...arguments];if(t.every(t=>Number.isFinite(t))&&3===t.length)return o.call(this,t[0],t[1],t[2])}}sub(...t){return t[0]instanceof a?t[0].values.forEach((t,r)=>{this.values[r]-=t||0}):Array.isArray(t[0])?t[0].forEach((t,r)=>{this.values[r]-=t||0}):t.forEach((t,r)=>{this.values[r]-=t||0}),this}mult(...t){if(1===t.length&&t[0]instanceof a){let r=t[0],n=Math.min(this.values.length,r.values.length);for(let t=0;t<n;t++)if(Number.isFinite(r.values[t])&&"number"==typeof r.values[t])this._values[t]*=r.values[t];else{console.warn("p5.Vector.prototype.mult:","v contains components that are either undefined or not finite numbers");break}}else if(1===t.length&&Array.isArray(t[0])){let r=t[0],n=Math.min(this.values.length,r.length);for(let t=0;t<n;t++)if(Number.isFinite(r[t])&&"number"==typeof r[t])this._values[t]*=r[t];else{console.warn("p5.Vector.prototype.mult:","arr contains elements that are either undefined or not finite numbers");break}}else if(1===t.length&&"number"==typeof t[0]&&Number.isFinite(t[0]))for(let r=0;r<this._values.length;r++)this._values[r]*=t[0];return this}div(...t){if(0===t.length)return this;if(1===t.length&&t[0]instanceof a){let r=t[0];if(r._values.every(t=>Number.isFinite(t)&&"number"==typeof t)){if(r._values.some(t=>0===t))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;this._values=this._values.map((t,n)=>t/r._values[n])}else console.warn("p5.Vector.prototype.div:","vector contains components that are either undefined or not finite numbers");return this}if(1===t.length&&Array.isArray(t[0])){let r=t[0];if(r.every(t=>Number.isFinite(t)&&"number"==typeof t)){if(r.some(t=>0===t))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;this._values=this._values.map((t,n)=>t/r[n])}else console.warn("p5.Vector.prototype.div:","array contains components that are either undefined or not finite numbers");return this}if(t.every(t=>Number.isFinite(t)&&"number"==typeof t)){if(t.some(t=>0===t))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;this._values=this._values.map((r,n)=>r/t[0])}else console.warn("p5.Vector.prototype.div:","arguments contain components that are either undefined or not finite numbers");return this}mag(){return Math.sqrt(this.magSq())}magSq(){return this._values.reduce((t,r)=>t+r*r,0)}dot(...t){return t[0]instanceof a?this.dot(...t[0]._values):this._values.reduce((r,n,i)=>r+n*(t[i]||0),0)}cross(t){let r=this.y*t.z-this.z*t.y,n=this.z*t.x-this.x*t.z,i=this.x*t.y-this.y*t.x;return this.isPInst?new a(this._fromRadians,this._toRadians,r,n,i):new a(r,n,i)}dist(t){return t.copy().sub(this).mag()}normalize(){let t=this.mag();return 0!==t&&this.mult(1/t),this}limit(t){let r=this.magSq();return r>t*t&&this.div(Math.sqrt(r)).mult(t),this}setMag(t){return this.normalize().mult(t)}heading(){let t=Math.atan2(this.y,this.x);return this.isPInst?this._fromRadians(t):t}setHeading(t){this.isPInst&&(t=this._toRadians(t));let r=this.mag();return this.x=r*Math.cos(t),this.y=r*Math.sin(t),this}rotate(t){let r=this.heading()+t;this.isPInst&&(r=this._toRadians(r));let n=this.mag();return this.x=Math.cos(r)*n,this.y=Math.sin(r)*n,this}angleBetween(t){if(0==this.magSq()*t.magSq())return NaN;let r=this.cross(t),n=Math.atan2(r.mag(),this.dot(t))*Math.sign(r.z||1);return this.isPInst&&(n=this._fromRadians(n)),n}lerp(t,r,n,i){return t instanceof a?this.lerp(t.x,t.y,t.z,r):(this.x+=(t-this.x)*i||0,this.y+=(r-this.y)*i||0,this.z+=(n-this.z)*i||0,this)}slerp(t,r){if(0===r)return this;if(1===r)return this.set(t);let n=this.mag(),i=t.mag();if(0==n*i)return this.mult(1-r).add(t.x*r,t.y*r,t.z*r),this;let s=this.cross(t),o=s.mag(),a=Math.atan2(o,this.dot(t));if(o>0)s.x/=o,s.y/=o,s.z/=o;else{if(a<.5*Math.PI)return this.mult(1-r).add(t.x*r,t.y*r,t.z*r),this;0===this.z&&0===t.z?s.set(0,0,1):0!==this.x?s.set(this.y,-this.x,0).normalize():s.set(1,0,0)}let u=s.cross(this),l=1-r+r*i/n,h=l*Math.cos(r*a),c=l*Math.sin(r*a);return this.x=this.x*h+u.x*c,this.y=this.y*h+u.y*c,this.z=this.z*h+u.z*c,this}reflect(t){let r=a.normalize(t);return this.sub(r.mult(2*this.dot(r)))}array(){return[this.x||0,this.y||0,this.z||0]}equals(...t){let r;r=t[0]instanceof a?t[0]._values:Array.isArray(t[0])?t[0]:t;for(let t=0;t<this._values.length;t++)if(this._values[t]!==(r[t]||0))return!1;return!0}clampToZero(){for(let t=0;t<this._values.length;t++)this._values[t]=this._clampToZero(this._values[t]);return this}_clampToZero(t){return Math.abs((t||0)-0)<=Number.EPSILON?0:t}static fromAngle(t,r){return void 0===r&&(r=1),new a(r*Math.cos(t),r*Math.sin(t),0)}static fromAngles(t,r,n){void 0===n&&(n=1);let i=Math.cos(r),s=Math.cos(t),o=Math.sin(t);return new a(n*o*Math.sin(r),-n*s,n*o*i)}static random2D(){return this.fromAngle(Math.random()*i.f)}static random3D(){let t=Math.random()*i.f,r=2*Math.random()-1,n=Math.sqrt(1-r*r);return new a(n*Math.cos(t),n*Math.sin(t),r)}static copy(t){return t.copy(t)}static add(t,r,n){return n?n.set(t):(n=t.copy(),3==arguments.length&&p5._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.add")),n.add(r),n}static rem(t,r){if(t instanceof a&&r instanceof a){let n=t.copy();return n.rem(r),n}}static sub(t,r,n){return n?n.set(t):(n=t.copy(),3==arguments.length&&p5._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.sub")),n.sub(r),n}static mult(t,r,n){return n?n.set(t):(n=t.copy(),3==arguments.length&&p5._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.mult")),n.mult(r),n}static rotate(t,r,n){return 2==arguments.length?n=t.copy():(n instanceof a||p5._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.rotate"),n.set(t)),n.rotate(r),n}static div(t,r,n){return n?n.set(t):(n=t.copy(),3==arguments.length&&p5._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.div")),n.div(r),n}static dot(t,r){return t.dot(r)}static cross(t,r){return t.cross(r)}static dist(t,r){return t.dist(r)}static lerp(t,r,n,i){return i?i.set(t):(i=t.copy(),4==arguments.length&&p5._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.lerp")),i.lerp(r,n),i}static slerp(t,r,n,i){return i?i.set(t):(i=t.copy(),4==arguments.length&&p5._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.slerp")),i.slerp(r,n),i}static mag(t){return t.mag()}static magSq(t){return t.magSq()}static normalize(t,r){return arguments.length<2?r=t.copy():(r instanceof a||p5._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.normalize"),r.set(t)),r.n
56ormalize()}static limit(t,r,n){return arguments.length<3?n=t.copy():(n instanceof a||p5._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.limit"),n.set(t)),n.limit(r)}static setMag(t,r,n){return arguments.length<3?n=t.copy():(n instanceof a||p5._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.setMag"),n.set(t)),n.setMag(r)}static heading(t){return t.heading()}static angleBetween(t,r){return t.angleBetween(r)}static reflect(t,r,n){return arguments.length<3?n=t.copy():(n instanceof a||p5._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.reflect"),n.set(t)),n.reflect(r)}static array(t){return t.array()}static equals(t,r){let n;return t instanceof a?n=t:t instanceof Array?n=new a().set(t):p5._friendlyError("The v1 parameter should be of type Array or p5.Vector","p5.Vector.equals"),n.equals(r)}}function u(t,r){t.Vector=a}"undefined"!=typeof p5&&u(p5,p5.prototype)},5191:(t,r,n)=>{"use strict";n.d(r,{A:()=>s,U:()=>i});class i{constructor(t=128){this.length=0,this.data=new Float32Array(t),this.initialLength=t}dataArray(){return this.subArray(0,this.length)}clear(){this.length=0}rescale(){if(this.length<this.data.length/2){let t=new Float32Array(1<<Math.ceil(Math.log2(this.length)));t.set(this.data.subarray(0,this.length),0),this.data=t}}reset(){this.clear(),this.data=new Float32Array(this.initialLength)}push(...t){this.ensureLength(this.length+t.length),this.data.set(t,this.length),this.length+=t.length}slice(t,r){return this.data.slice(t,Math.min(r,this.length))}subArray(t,r){return this.data.subarray(t,Math.min(r,this.length))}ensureLength(t){for(;this.data.length<t;){let t=new Float32Array(2*this.data.length);t.set(this.data,0),this.data=t}}}function s(t,r){t.DataArray=i}"undefined"!=typeof p5&&s(p5,p5.prototype)},5311:(t,r,n)=>{"use strict";n.d(r,{$:()=>ev,A:()=>eI,B:()=>W,C:()=>S,D:()=>x,E:()=>P,F:()=>eN,G:()=>eT,H:()=>p,I:()=>e$,J:()=>eV,K:()=>ep,L:()=>k,M:()=>f,N:()=>eb,O:()=>U,P:()=>o,Q:()=>O,R:()=>E,S:()=>G,T:()=>eA,U:()=>eg,V:()=>em,W:()=>m,X:()=>ed,Y:()=>ey,Z:()=>ec,_:()=>ef,a:()=>C,a0:()=>a,a1:()=>eC,a2:()=>eM,a3:()=>ek,a4:()=>X,a5:()=>et,a6:()=>K,a7:()=>Q,a8:()=>ee,a9:()=>en,aA:()=>eF,aB:()=>ez,aC:()=>e_,aD:()=>eU,aa:()=>er,ab:()=>ei,ac:()=>es,ad:()=>eo,ae:()=>ea,af:()=>eu,ag:()=>el,ah:()=>eh,ai:()=>J,aj:()=>j,ak:()=>$,al:()=>s,am:()=>ex,an:()=>N,ao:()=>w,ap:()=>eL,aq:()=>eO,ar:()=>F,as:()=>eD,at:()=>eS,au:()=>eR,av:()=>eP,aw:()=>h,ax:()=>c,ay:()=>eE,az:()=>ew,b:()=>l,c:()=>d,d:()=>g,e:()=>D,f:()=>b,g:()=>y,h:()=>v,i:()=>A,j:()=>q,k:()=>V,l:()=>H,m:()=>R,n:()=>z,o:()=>B,p:()=>M,q:()=>T,r:()=>I,s:()=>L,t:()=>ej,u:()=>Y,v:()=>eG,w:()=>Z,x:()=>_,y:()=>eB,z:()=>u});let i=Math.PI,s="2.0.5",o="p2d",a="webgl",u="webgl2",l="default",h="simple",c="full",d="crosshair",p="pointer",f="move",g="text",m="wait",y=i/2,v=i,b=2*i,x=i/180,_=180/i,D="corner",A="corners",C="radius",E="right",w="left",S="center",F="bottom",N="alphabetic",B=0,k=1,M=4,T=6,I=5,O="quads",L="quad_strip",P=7,R=8,z="close",U="open",$="chord",j="pie",V="square",G="butt",q="round",W="bevel",H="miter",Z="auto",Y="source-over",X="destination-out",J="lighter",K="darken",Q="lighten",ee="difference",et="subtract",er="exclusion",en="multiply",ei="screen",es="copy",eo="overlay",ea="hard-light",eu="soft-light",el="color-dodge",eh="color-burn",ec="threshold",ed="gray",ep="opaque",ef="invert",eg="posterize",em="dilate",ey="erode",ev="blur",eb="normal",ex="WORD",e_="linear",eD="fill",eA="texture",eC="image",eE="nearest",ew="repeat",eS="clamp",eF="mirror",eN="flat",eB="smooth",ek="#000000",eM="#FFFFFF",eT="grid",eI="axes",eO="contain",eL="cover",eP="unsigned-byte",eR="unsigned-int",ez="float",eU="half-float",e$=Symbol("include"),ej=Symbol("exclude"),eV=Symbol("join");var eG=Object.freeze({__proto__:null,ADD:J,ALT:"Alt",ARROW:l,AUTO:Z,AXES:eI,BACKSPACE:"Backspace",BASELINE:N,BEVEL:W,BEZIER:"bezier",BLEND:Y,BLUR:ev,BOLD:"bold",BOLDITALIC:"bold italic",BOTTOM:F,BURN:eh,CENTER:S,CHAR:"CHAR",CHORD:$,CLAMP:eS,CLOSE:z,CONTAIN:eO,CONTROL:"Control",CORNER:D,CORNERS:A,COVER:eL,CROSS:d,CURVE:"curve",DARKEST:K,DEG_TO_RAD:x,DELETE:"Delete",DIFFERENCE:ee,DILATE:em,DODGE:el,DOWN_ARROW:"ArrowDown",EMPTY_PATH:P,ENTER:"Enter",ERODE:ey,ESCAPE:"Escape",EXCLUDE:ej,EXCLUSION:er,FALLBACK:"fallback",FILL:eD,FLAT:eN,FLOAT:ez,FULL:c,GRAY:ed,GRID:eT,HALF_FLOAT:eU,HALF_PI:y,HAND:p,HARD_LIGHT:ea,IMAGE:eC,IMMEDIATE:"immediate",INCLUDE:e$,INVERT:ef,ITALIC:"italic",JOIN:eV,LABEL:"label",LANDSCAPE:"landscape",LEFT:w,LEFT_ARROW:"ArrowLeft",LIGHTEST:Q,LINEAR:e_,LINES:k,LINE_LOOP:2,LINE_STRIP:3,MIRROR:eF,MITER:H,MOVE:f,MULTIPLY:en,NEAREST:eE,NORMAL:eb,OPAQUE:ep,OPEN:U,OPTION:"Alt",OVERLAY:eo,P2D:o,P2DHDR:"p2d-hdr",PATH:R,PI:v,PIE:j,POINTS:B,PORTRAIT:"portrait",POSTERIZE:eg,PROJECT:V,QUADRATIC:"quadratic",QUADS:O,QUAD_STRIP:L,QUARTER_PI:i/4,RADIUS:C,RAD_TO_DEG:_,REMOVE:X,REPEAT:ew,REPLACE:es,RETURN:"Enter",RIGHT:E,RIGHT_ARROW:"ArrowRight",ROUND:q,SCREEN:ei,SHIFT:"Shift",SIMPLE:h,SMOOTH:eB,SOFT_LIGHT:eu,SQUARE:G,STROKE:"stroke",SUBTRACT:et,TAB:"Tab",TAU:2*i,TESS:"tess",TEXT:g,TEXTURE:eA,THRESHOLD:ec,TOP:"top",TRIANGLES:M,TRIANGLE_FAN:T,TRIANGLE_STRIP:I,TWO_PI:b,UNSIGNED_BYTE:eP,UNSIGNED_INT:eR,UP_ARROW:"ArrowUp",VERSION:s,WAIT:m,WEBGL:a,WEBGL2:u,WORD:ex,_CTX_MIDDLE:"middle",_DEFAULT_FILL:eM,_DEFAULT_LEADMULT:1.25,_DEFAULT_STROKE:ek,_DEFAULT_TEXT_FILL:"#000000"})},5450:(t,r,n)=>{"use strict";n.d(r,{A:()=>a});var i=n(5311);n(9742);var s=n(2510),o=n(4576);n(5056),n(9855),n(5191),n(6686),n(7189);class a{constructor(t){this.renderer=t,t._pInst.push(),this.identityMatrix=new o.uq(4),t.states.setValue("uModelMatrix",new o.uq(4)),this.geometry=new s.V(void 0,void 0,void 0,this.renderer),this.geometry.gid=`_p5_GeometryBuilder_${a.nextGeometryId}`,a.nextGeometryId++,this.hasTransform=!1}transformVertices(t){return this.hasTransform?t.map(t=>this.renderer.states.uModelMatrix.multiplyPoint(t)):t}transformNormals(t){return this.hasTransform?t.map(t=>this.renderer.scratchMat3.multiplyVec(t)):t}addGeometry(t){this.hasTransform=!this.renderer.states.uModelMatrix.mat4.every((t,r)=>t===this.identityMatrix.mat4[r]),this.hasTransform&&this.renderer.scratchMat3.inverseTranspose4x4(this.renderer.states.uModelMatrix);let r=this.geometry.vertices.length;this.geometry.vertices.push(...this.transformVertices(t.vertices)),this.geometry.vertexNormals.push(...this.transformNormals(t.vertexNormals)),this.geometry.uvs.push(...t.uvs);let n=t.userVertexProperties,i=this.geometry.userVertexProperties,s=this.geometry.vertices.length-t.vertices.length;for(let r in i){if(r in n)continue;let s=i[r],o=Array(s.getDataSize()*t.vertices.length).fill(0);s.pushDirect(o)}for(let t in n){let r=n[t],o=r.getSrcArray(),a=r.getDataSize();if(s>0&&!(t in i)){let r=Array(a*s).fill(0);this.geometry.vertexProperty(t,r,a)}this.geometry.vertexProperty(t,o,a)}this.renderer.states.fillColor&&this.geometry.faces.push(...t.faces.map(t=>t.map(t=>t+r))),this.renderer.states.strokeColor&&this.geometry.edges.push(...t.edges.map(t=>t.map(t=>t+r)));let o=[...t.vertexColors];for(;o.length<4*t.vertices.length;)o.push(...this.renderer.states.curFillColor);this.geometry.vertexColors.push(...o)}addImmediate(t,r,{validateFaces:n=!1}={}){let s=[];if(this.renderer.states.fillColor)if(r===i.r||r===i.s)for(let r=2;r<t.vertices.length;r++)r%2==0?s.push([r,r-1,r-2]):s.push([r,r-2,r-1]);else if(r===i.q)for(let r=2;r<t.vertices.length;r++)s.push([0,r-1,r]);else for(let r=0;r<t.vertices.length;r+=3)(!n||t.vertices[r].copy().sub(t.vertices[r+1]).cross(t.vertices[r].copy().sub(t.vertices[r+2])).magSq()>0)&&s.push([r,r+1,r+2]);this.addGeometry(Object.assign({},t,{faces:s}))}addRetained(t){this.addGeometry(t)}finish(){return this.renderer._pInst.pop(),this.geometry}}a.nextGeometryId=0},5570:(t,r,n)=>{"use strict";n.d(r,{A:()=>s});var i=n(7666);function s(t,r){r.blend=function(...r){this._renderer?this._renderer.blend(...r):t.Renderer2D.prototype.blend.apply(this,r)},r.copy=function(...t){let n,i,s,o,a,u,l,h,c;if(9===t.length)n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],u=t[5],l=t[6],h=t[7],c=t[8];else if(8===t.length)n=this,i=t[0],s=t[1],o=t[2],a=t[3],u=t[4],l=t[5],h=t[6],c=t[7];else throw Error("Signature not supported");r._copyHelper(this,n,i,s,o,a,u,l,h,c)},r._copyHelper=(t,r,n,i,s,o,a,u,l,h)=>{let c=r.canvas.width/r.width,d=0,p=0;r._renderer&&r._renderer.isP3D&&(d=r.width/2,p=r.height/2),t._renderer&&t._renderer.isP3D?(t.push(),t.resetMatrix(),t.noLights(),t.blendMode(t.BLEND),t.imageMode(t.CORNER),t._renderer.image(r,n+d,i+p,s,o,a,u,l,h),t.pop()):t.drawingContext.drawImage(r.canvas,c*(n+d),c*(i+p),c*s,c*o,a,u,l,h)},r.getFilterGraphicsLayer=function(){return this._renderer.getFilterGraphicsLayer()},r.filter=function(...r){let{shader:n,operation:s,value:o,useWebGL:a}=function(...r){let n={shader:void 0,operation:void 0,value:void 0,useWebGL:!0};return r[0]instanceof t.Shader?n.shader=r[0]:(n.operation=r[0],r.length>1&&"number"==typeof r[1]&&(n.value=r[1]),!1===r[r.length-1]&&(n.useWebGL=!1)),n}(...r);
56return this._renderer.isP3D&&n?void this._renderer.filter(n):a||this._renderer.isP3D?void(!a&&this._renderer.isP3D&&console.warn("filter() with useWebGL=false is not supported in WEBGL"),this._renderer.isP3D?this._renderer.filter(s,o):(n?this._renderer.filterRenderer.setOperation(s,o,n):this._renderer.filterRenderer.setOperation(s,o),this._renderer.filterRenderer.applyFilter())):void(void 0!==this.canvas?i.A.apply(this.canvas,i.A[s],o):i.A.apply(this.elt,i.A[s],o))},r.get=function(t,r,n,i){return this._renderer.get(...arguments)},r.loadPixels=function(){this._renderer.loadPixels()},r.set=function(t,r,n){this._renderer.set(t,r,n)},r.updatePixels=function(t,r,n,i){0!==this.pixels.length&&this._renderer.updatePixels(t,r,n,i)}}"undefined"!=typeof p5&&s(p5,p5.prototype)},6074:t=>{!function(){"use strict";function r(t){if(null==t)return!1;switch(t.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(t){switch(t.type){case"IfStatement":if(null!=t.alternate)return t.alternate;return t.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return t.body}return null}t.exports={isExpression:function(t){if(null==t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:r,isIterationStatement:function(t){if(null==t)return!1;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(t){return r(t)||null!=t&&"FunctionDeclaration"===t.type},isProblematicIfStatement:function(t){var r;if("IfStatement"!==t.type||null==t.alternate)return!1;r=t.consequent;do{if("IfStatement"===r.type&&null==r.alternate)return!0;r=n(r)}while(r);return!1},trailingStatement:n}}()},6077:(t,r,n)=>{var i=n(7512),s=n(8391),o=n(1121).C,a=n(6234).P;function u(t){t||(t={}),this._file=s.getArg(t,"file",null),this._sourceRoot=s.getArg(t,"sourceRoot",null),this._skipValidation=s.getArg(t,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new a,this._sourcesContents=null}u.prototype._version=3,u.fromSourceMap=function(t){var r=t.sourceRoot,n=new u({file:t.file,sourceRoot:r});return t.eachMapping(function(t){var i={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(i.source=t.source,null!=r&&(i.source=s.relative(r,i.source)),i.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(i.name=t.name)),n.addMapping(i)}),t.sources.forEach(function(i){var o=i;null!==r&&(o=s.relative(r,i)),n._sources.has(o)||n._sources.add(o);var a=t.sourceContentFor(i);null!=a&&n.setSourceContent(i,a)}),n},u.prototype.addMapping=function(t){var r=s.getArg(t,"generated"),n=s.getArg(t,"original",null),i=s.getArg(t,"source",null),o=s.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),null!=i&&(i=String(i),this._sources.has(i)||this._sources.add(i)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:i,name:o})},u.prototype.setSourceContent=function(t,r){var n=t;null!=this._sourceRoot&&(n=s.relative(this._sourceRoot,n)),null!=r?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},u.prototype.applySourceMap=function(t,r,n){var i=r;if(null==r){if(null==t.file)throw Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=t.file}var a=this._sourceRoot;null!=a&&(i=s.relative(a,i));var u=new o,l=new o;this._mappings.unsortedForEach(function(r){if(r.source===i&&null!=r.originalLine){var o=t.originalPositionFor({line:r.originalLine,column:r.originalColumn});null!=o.source&&(r.source=o.source,null!=n&&(r.source=s.join(n,r.source)),null!=a&&(r.source=s.relative(a,r.source)),r.originalLine=o.line,r.originalColumn=o.column,null!=o.name&&(r.name=o.name))}var h=r.source;
56null==h||u.has(h)||u.add(h);var c=r.name;null==c||l.has(c)||l.add(c)},this),this._sources=u,this._names=l,t.sources.forEach(function(r){var i=t.sourceContentFor(r);null!=i&&(null!=n&&(r=s.join(n,r)),null!=a&&(r=s.relative(a,r)),this.setSourceContent(r,i))},this)},u.prototype._validateMapping=function(t,r,n,i){if(r&&"number"!=typeof r.line&&"number"!=typeof r.column)throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!t||!("line"in t)||!("column"in t)||!(t.line>0)||!(t.column>=0)||r||n||i){if(!t||!("line"in t)||!("column"in t)||!r||!("line"in r)||!("column"in r)||!(t.line>0)||!(t.column>=0)||!(r.line>0)||!(r.column>=0)||!n)throw Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},u.prototype._serializeMappings=function(){for(var t,r,n,o,a=0,u=1,l=0,h=0,c=0,d=0,p="",f=this._mappings.toArray(),g=0,m=f.length;g<m;g++){if(r=f[g],t="",r.generatedLine!==u)for(a=0;r.generatedLine!==u;)t+=";",u++;else if(g>0){if(!s.compareByGeneratedPositionsInflated(r,f[g-1]))continue;t+=","}t+=i.encode(r.generatedColumn-a),a=r.generatedColumn,null!=r.source&&(o=this._sources.indexOf(r.source),t+=i.encode(o-d),d=o,t+=i.encode(r.originalLine-1-h),h=r.originalLine-1,t+=i.encode(r.originalColumn-l),l=r.originalColumn,null!=r.name&&(n=this._names.indexOf(r.name),t+=i.encode(n-c),c=n)),p+=t}return p},u.prototype._generateSourcesContent=function(t,r){return t.map(function(t){if(!this._sourcesContents)return null;null!=r&&(t=s.relative(r,t));var n=s.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},u.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},u.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.x=u},6234:(t,r,n)=>{var i=n(8391);function s(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}s.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)},s.prototype.add=function(t){var r,n,s,o,a;(r=this._last,n=r.generatedLine,s=t.generatedLine,o=r.generatedColumn,a=t.generatedColumn,s>n||s==n&&a>=o||0>=i.compareByGeneratedPositionsInflated(r,t))?this._last=t:this._sorted=!1,this._array.push(t)},s.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.P=s},6363:(t,r,n)=>{"use strict";function i(t,r){r.bezier=function(...t){return(this._renderer.states.strokeColor||this._renderer.states.fillColor)&&this._renderer.bezier(...t),this},r.bezierPoint=function(t,r,n,i,s){let o=1-s;return Math.pow(o,3)*t+3*Math.pow(o,2)*s*r+3*o*Math.pow(s,2)*n+Math.pow(s,3)*i},r.bezierTangent=function(t,r,n,i,s){let o=1-s;return 3*i*Math.pow(s,2)-3*n*Math.pow(s,2)+6*n*o*s-6*r*o*s+3*r*Math.pow(o,2)-3*t*Math.pow(o,2)},r.spline=function(...t){return(this._renderer.states.strokeColor||this._renderer.states.fillColor)&&this._renderer.spline(...t),this},r.splinePoint=function(t,r,n,i,s){let o=this._renderer.states.splineProperties.tightness,a=s*s*s,u=s*s;return t*((o-1)/2*a+(1-o)*u+(o-1)/2*s)+r*((o+3)/2*a+(-5-o)/2*u+1)+n*((-3-o)/2*a+(o+2)*u+(1-o)/2*s)+i*((1-o)/2*a+(o-1)/2*u)},r.splineTangent=function(t,r,n,i,s){let o=this._renderer.states.splineProperties.tightness,a=s*s*3,u=2*s;return t*((o-1)/2*a+(1-o)*u+(o-1)/2)+r*((o+3)/2*a+(-5-o)/2*u)+n*((-3-o)/2*a+(o+2)*u+(1-o)/2)+i*((1-o)/2*a+(o-1)/2*u)}}n.d(r,{A:()=>i}),"undefined"!=typeof p5&&i(p5,p5.prototype)},6373:(t,r,n)=>{"use strict";n.d(r,{A:()=>u,H:()=>a});var i=n(9321),s=n(74),o=n(5311);n(4962),n(1024);class a{width;height;elt;constructor(t,r){this.elt=t,this._pInst=this._pixelsState=r,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight}remove(){if(this.stop){this.stop();let t=this.elt.srcObject;
56null!==t&&t.getTracks().forEach(t=>{t.stop()})}let t=this._pInst;if(t&&!t._elements&&t._pInst&&(t=t._pInst),t&&t._elements){let r=t._elements.indexOf(this);-1!==r&&t._elements.splice(r,1)}for(let t in this._events)this.elt.removeEventListener(t,this._events[t]);this.elt&&this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt)}parent(t){return void 0===t?this.elt.parentNode:("string"==typeof t?("#"===t[0]&&(t=t.substring(1)),t=document.getElementById(t)):t instanceof a&&(t=t.elt),t.appendChild(this.elt),this)}child(t){return void 0===t?this.elt.childNodes:("string"==typeof t?("#"===t[0]&&(t=t.substring(1)),t=document.getElementById(t)):t instanceof a&&(t=t.elt),t instanceof HTMLElement&&this.elt.appendChild(t),this)}html(...t){return 0===t.length?this.elt.innerHTML:(t[1]?this.elt.insertAdjacentHTML("beforeend",t[0]):this.elt.innerHTML=t[0],this)}id(t){return void 0===t?this.elt.id:(this.elt.id=t,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)}class(t){return void 0===t?this.elt.className:(this.elt.className=t,this)}addClass(t){return this.elt.className?this.hasClass(t)||(this.elt.className=this.elt.className+" "+t):this.elt.className=t,this}removeClass(t){return this.elt.classList.remove(t),this}hasClass(t){return this.elt.classList.contains(t)}toggleClass(t){return this.elt.classList.contains(t)?this.elt.classList.remove(t):this.elt.classList.add(t),this}center(t){let r=this.elt.style.display,n="none"===this.elt.style.display,i="none"===this.parent().style.display,s={x:this.elt.offsetLeft,y:this.elt.offsetTop};n&&this.show(),i&&this.parent().show(),this.elt.style.display="block",this.position(0,0);let o=Math.abs(this.parent().offsetWidth-this.elt.offsetWidth),a=Math.abs(this.parent().offsetHeight-this.elt.offsetHeight);return"both"===t||void 0===t?this.position(o/2+this.parent().offsetLeft,a/2+this.parent().offsetTop):"horizontal"===t?this.position(o/2+this.parent().offsetLeft,s.y):"vertical"===t&&this.position(s.x,a/2+this.parent().offsetTop),this.style("display",r),n&&this.hide(),i&&this.parent().hide(),this}position(...t){if(0===t.length)return{x:this.elt.offsetLeft,y:this.elt.offsetTop};{let r="absolute";return("static"===t[2]||"fixed"===t[2]||"relative"===t[2]||"sticky"===t[2]||"initial"===t[2]||"inherit"===t[2])&&(r=t[2]),this.elt.style.position=r,this.elt.style.left=t[0]+"px",this.elt.style.top=t[1]+"px",this.x=t[0],this.y=t[1],this}}show(){return this.elt.style.display="block",this}hide(){return this.elt.style.display="none",this}size(t,r){if(0==arguments.length)return{width:this.elt.offsetWidth,height:this.elt.offsetHeight};{let n=t,i=r,s=o.w;if(n!==s||i!==s){if(n===s?n=r*this.width/this.height:i===s&&(i=t*this.height/this.width),this.elt instanceof HTMLCanvasElement){let t,r={},s=this.elt.getContext("2d");for(t in s)r[t]=s[t];for(t in this.elt.setAttribute("width",n*this._pInst._pixelDensity),this.elt.setAttribute("height",i*this._pInst._pixelDensity),this.elt.style.width=n+"px",this.elt.style.height=i+"px",this._pInst.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),r)this.elt.getContext("2d")[t]=r[t]}else this.elt.style.width=n+"px",this.elt.style.height=i+"px",this.elt.width=n,this.elt.height=i;this.width=n,this.height=i,this._pInst&&this._pInst._curElement&&this._pInst._curElement.elt===this.elt&&(this._pInst.width=n,this._pInst.height=i)}return this}}style(t,r){if(r instanceof s.C&&(r=r.toString()),void 0===r)if(-1===t.indexOf(":"))return window.getComputedStyle(this.elt).getPropertyValue(t);else{let r=t.split(";");for(let t=0;t<r.length;t++){let n=r[t].split(":");n[0]&&n[1]&&(this.elt.style[n[0].trim()]=n[1].trim())}}else if(this.elt.style[t]=r,"width"===t||"height"===t||"left"===t||"top"===t){let r=window.getComputedStyle(this.elt).getPropertyValue(t).replace(/[^\d.]/g,"");this[t]=Math.round(parseFloat(r,10))}return this}_translate(...t){this.elt.style.position="absolute";let r="";return this.elt.style.transform&&(r=(r=this.elt.style.transform.replace(/translate3d\(.*\)/g,"")).replace(/translate[X-Z]?\(.*\)/g,"")),2===t.length?this.elt.style.transform="translate("+t[0]+"px, "+t[1]+"px)":t.length>2&&(this.elt.style.transform="translate3d("+t[0]+"px,"+t[1]+"px,"+t[2]+"px)",3===t.length?this.elt.parentElement.style.perspective="1000px":this.elt.parentElement.style.perspective=t[3]+"px"),this.elt.style.transform+=r,this}_rotate(...t){let r="";return this.elt.style.transform&&(r=(r=this.elt.style.transform.replace(/rotate3d\(.*\)/g,"")).replace(/rotate[X-Z]?\(.*\)/g,"")),1===t.length?this.elt.style.transform="rotate("+t[0]+"deg)":2===t.length?this.elt.style.transform="rotate("+t[0]+"deg, "+t[1]+"deg)":3===t.length&&(this.elt.style.transform="rotateX("+t[0]+"deg)",this.elt.style.transform+="rotateY("+t[1]+"deg)",this.elt.style.transform+="rotateZ("+t[2]+"deg)"),this.elt.style.transform+=r,this}attribute(t,r){if(null==this.elt.firstChild||"checkbox"!==this.elt.firstChild.type&&"radio"!==this.elt.firstChild.type)return void 0===r?this.elt.getAttribute(t):(this.elt.setAttribute(t,r),this);if(void 0===r)return this.elt.firstChild.getAttribute(t);for(let n=0;n<this.elt.childNodes.length;n++)this.elt.childNodes[n].setAttribute(t,r)}removeAttribute(t){if(null!=this.elt.firstChild&&("checkbox"===this.elt.firstChild.type||"radio"===this.elt.firstChild.type))for(let r=0;r<this.elt.childNodes.length;r++)this.elt.childNodes[r].removeAttribute(t);return this.elt.removeAttribute(t),this}value(...t){return t.length>0?(this.elt.value=t[0],this):"range"===this.elt.type?parseFloat(this.elt.value):this.elt.value}mousePressed(t){return a._adjustListener("pointerdown",function(r){return this._pInst.mouseIsPressed=!0,this._pInst._activePointers.set(r.pointerId,r),this._pInst._setMouseButton(r),this._pInst._updatePointerCoords(r),t.call(this,r)},this),this}doubleClicked(t){return a._adjustListener("dblclick",t,this),this}mouseWheel(t){return a._adjustListener("wheel",t,this),this}mouseReleased(t){return a._adjustListener("pointerup",t,this),this}mouseClicked(t){return a._adjustListener("click",t,this),this}mouseMoved(t){return a._adjustListener("pointermove",t,this),this}mouseOver(t){return a._adjustListener("pointerover",t,this),this}mouseOut(t){return a._adjustListener("pointerout",t,this),this}dragOver(t){return a._adjustListener("dragover",t,this),this}dragLeave(t){return a._adjustListener("dragleave",t,this),this}changed(t){return a._adjustListener("change",t,this),this}input(t){return a._adjustListener("input",t,this),this}drop(t,r){if(window.File&&window.FileReader&&window.FileList&&window.Blob){if(!this._dragDisabled){this._dragDisabled=!0;let t=function(t){t.preventDefault()};this.elt.addEventListener("dragover",t),this.elt.addEventListener("dragleave",t)}a._attachListener("drop",function(n){for(let s of(n.preventDefault(),"function"==typeof r&&r.call(this,n),n.dataTransfer.files))i.Z._load(s,t)},this)}else console.log("The File APIs are not fully supported in this browser.");return this}draggable(t){let r="ontouchstart"in window,n=0,i=0,s=0,o=0,a,u=r?"touchend":"mou
56seup",l=r?"touchmove":"mousemove";function h(a){if(a=a||window.event,r){let t=a.changedTouches;n=s-parseInt(t[0].clientX),i=o-parseInt(t[0].clientY),s=parseInt(t[0].clientX),o=parseInt(t[0].clientY)}else n=s-parseInt(a.clientX),i=o-parseInt(a.clientY),s=parseInt(a.clientX),o=parseInt(a.clientY);t.style.left=t.offsetLeft-n+"px",t.style.top=t.offsetTop-i+"px"}function c(){document.removeEventListener(u,c,!1),document.removeEventListener(l,h,!1)}return void 0===t?a=t=this.elt:t!==this.elt&&t.elt!==this.elt&&(t=t.elt,a=this.elt),a.addEventListener(r?"touchstart":"mousedown",function(t){if(t=t||window.event,r){let r=t.changedTouches;s=parseInt(r[0].clientX),o=parseInt(r[0].clientY)}else s=parseInt(t.clientX),o=parseInt(t.clientY);return document.addEventListener(u,c,!1),document.addEventListener(l,h,!1),!1},!1),a.style.cursor="move",this}static _adjustListener(t,r,n){return!1===r?a._detachListener(t,n):a._attachListener(t,r,n),this}static _attachListener(t,r,n){n._events[t]&&a._detachListener(t,n);let i=r.bind(n);n.elt.addEventListener(t,i,!1),n._events[t]=i}static _detachListener(t,r){let n=r._events[t];r.elt.removeEventListener(t,n,!1),r._events[t]=null}}function u(t,r){t.Element=a}"undefined"!=typeof p5&&u(p5,p5.prototype)},6589:(t,r)=>{!function t(r){"use strict";var n,i,s,o,a,u;function l(t){var r,n,i={};for(r in t)t.hasOwnProperty(r)&&("object"==typeof(n=t[r])&&null!==n?i[r]=l(n):i[r]=n);return i}function h(t,r){this.parent=t,this.key=r}function c(t,r,n,i){this.node=t,this.path=r,this.wrap=n,this.ref=i}
vendor: 4,394 bytes, line 56
56function d(){}function p(t){return null!=t&&"object"==typeof t&&"string"==typeof t.type}function f(t,r){return(t===n.ObjectExpression||t===n.ObjectPattern)&&"properties"===r}function g(t,r){for(var n=t.length-1;n>=0;--n)if(t[n].node===r)return!0;return!1}function m(t,r){return new d().traverse(t,r)}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},s={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal
56:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:o={},Skip:a={},Remove:u={}},h.prototype.replace=function(t){this.parent[this.key]=t},h.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},d.prototype.path=function(){var t,r,n,i,s;function o(t,r){if(Array.isArray(r))for(n=0,i=r.length;n<i;++n)t.push(r[n]);else t.push(r)}if(!this.__current.path)return null;for(t=2,s=[],r=this.__leavelist.length;t<r;++t)o(s,this.__leavelist[t].path);return o(s,this.__current.path),s},d.prototype.type=function(){return this.current().type||this.__current.wrap},d.prototype.parents=function(){var t,r,n;for(t=1,n=[],r=this.__leavelist.length;t<r;++t)n.push(this.__leavelist[t].node);return n},d.prototype.current=function(){return this.__current.node},d.prototype.__execute=function(t,r){var n,i;return i=void 0,n=this.__current,this.__current=r,this.__state=null,t&&(i=t.call(this,r.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,i},d.prototype.notify=function(t){this.__state=t},d.prototype.skip=function(){this.notify(a)},d.prototype.break=function(){this.notify(o)},d.prototype.remove=function(){this.notify(u)},d.prototype.__initialize=function(t,r){this.visitor=r,this.root=t,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===r.fallback?this.__fallback=Object.keys:"function"==typeof r.fallback&&(this.__fallback=r.fallback),this.__keys=s,r.keys&&(this.__keys=Object.assign(Object.create(this.__keys),r.keys))},d.prototype.traverse=function(t,r){var n,i,s,u,l,h,d,m,y,v,b,x;for(this.__initialize(t,r),x={},n=this.__worklist,i=this.__leavelist,n.push(new c(t,null,null,null)),i.push(new c(null,null,null,null));n.length;){if((s=n.pop())===x){if(s=i.pop(),h=this.__execute(r.leave,s),this.__state===o||h===o)return;continue}if(s.node){if(h=this.__execute(r.enter,s),this.__state===o||h===o)return;if(n.push(x),i.push(s),this.__state===a||h===a)continue;if(l=(u=s.node).type||s.wrap,!(v=this.__keys[l]))if(this.__fallback)v=this.__fallback(u);else throw Error("Unknown node type "+l+".");for(m=v.length;(m-=1)>=0;)if(b=u[d=v[m]]){if(Array.isArray(b)){for(y=b.length;(y-=1)>=0;)if(!(!b[y]||g(i,b[y]))){if(f(l,v[m]))s=new c(b[y],[d,y],"Property",null);else{if(!p(b[y]))continue;s=new c(b[y],[d,y],null,null)}n.push(s)}}else if(p(b)){if(g(i,b))continue;n.push(new c(b,d,null,null))}}}}},d.prototype.replace=function(t,r){var n,i,s,l,d,g,m,y,v,b,x,_,D;function A(t){var r,i,s,o;if(t.ref.remove()){for(i=t.ref.key,o=t.ref.parent,r=n.length;r--;)if((s=n[r]).ref&&s.ref.parent===o){if(s.ref.key<i)break;--s.ref.key}}}for(this.__initialize(t,r),x={},n=this.__worklist,i=this.__leavelist,_={root:t},g=new c(t,null,null,new h(_,"root")),n.push(g),i.push(g);n.length;){if((g=n.pop())===x){if(g=i.pop(),void 0!==(d=this.__execute(r.leave,g))&&d!==o&&d!==a&&d!==u&&g.ref.replace(d),(this.__state===u||d===u)&&A(g),this.__state===o||d===o)return _.root;continue}if(void 0!==(d=this.__execute(r.enter,g))&&d!==o&&d!==a&&d!==u&&(g.ref.replace(d),g.node=d),(this.__state===u||d===u)&&(A(g),g.node=null),this.__state===o||d===o)break;if(s=g.node){if(n.push(x),i.push(g),this.__state!==a&&d!==a){if(l=s.type||g.wrap,!(v=this.__keys[l]))if(this.__fallback)v=this.__fallback(s);else throw Error("Unknown node type "+l+".");for(m=v.length;(m-=1)>=0;)if(b=s[D=v[m]])if(Array.isArray(b)){for(y=b.length;(y-=1)>=0;
56)if(b[y]){if(f(l,v[m]))g=new c(b[y],[D,y],"Property",new h(b,y));else{if(!p(b[y]))continue;g=new c(b[y],[D,y],null,new h(b,y))}n.push(g)}}else p(b)&&n.push(new c(b,D,null,new h(s,D)))}}}return _.root},r.Syntax=n,r.traverse=m,r.replace=function(t,r){return new d().replace(t,r)},r.attachComments=function(t,r,n){var s,o,a,u,h=[];if(!t.range)throw Error("attachComments needs range information");if(!n.length){if(r.length){for(a=0,o=r.length;a<o;a+=1)(s=l(r[a])).extendedRange=[0,t.range[0]],h.push(s);t.leadingComments=h}return t}for(a=0,o=r.length;a<o;a+=1)h.push(function(t,r){var n;return n=function(t,r){var n,i,s,o;for(i=t.length,s=0;i;)r(t[o=s+(n=i>>>1)])?i=n:(s=o+1,i-=n+1);return s}(r,function(r){return r.range[0]>t.range[0]}),t.extendedRange=[t.range[0],t.range[1]],n!==r.length&&(t.extendedRange[1]=r[n].range[0]),(n-=1)>=0&&(t.extendedRange[0]=r[n].range[1]),t}(l(r[a]),n));return u=0,m(t,{enter:function(t){for(var r;u<h.length&&!((r=h[u]).extendedRange[1]>t.range[0]);)r.extendedRange[1]===t.range[0]?(t.leadingComments||(t.leadingComments=[]),t.leadingComments.push(r),h.splice(u,1)):u+=1;return u===h.length?i.Break:h[u].extendedRange[0]>t.range[1]?i.Skip:void 0}}),u=0,m(t,{leave:function(t){for(var r;u<h.length&&(r=h[u],!(t.range[1]<r.extendedRange[0]));)t.range[1]===r.extendedRange[0]?(t.trailingComments||(t.trailingComments=[]),t.trailingComments.push(r),h.splice(u,1)):u+=1;return u===h.length?i.Break:h[u].extendedRange[0]>t.range[1]?i.Skip:void 0}}),t},r.VisitorKeys=s,r.VisitorOption=i,r.Controller=d,r.cloneEnvironment=function(){return t({})},r}(r)},6686:(t,r,n)=>{"use strict";n.d(r,{N:()=>o,P:()=>s});var i=n(7189);function s(t,r,n){let s=o(r,n)[0],a=t;a instanceof Blob||(a=new Blob([t])),i.saveAs(a,s)}function o(t,r){r&&!0!==r&&"true"!==r||(r=""),t||(t="untitled");let n="";return t&&t.includes(".")&&(n=t.split(".").pop()),r&&n!==r&&(n=r,t=`${t}.${n}`),[t,n]}},6777:(t,r,n)=>{"use strict";n.d(r,{A:()=>a});var i=n(7280),s=n(4306),o=n(8781);function a(t){if(Array.isArray(t))return t.map(a);if(!t)throw TypeError("Empty color reference");(0,s.Kg)(t)&&(t=(0,o.A)(t));let r=t.space||t.spaceId;return r instanceof i.A||(t.space=i.A.get(r)),void 0===t.alpha&&(t.alpha=1),t}},6796:(t,r,n)=>{"use strict";n.d(r,{A:()=>s});var i=n(5311),s={modeAdjust:function(t,r,n,s,o){let a;return o===i.e?a={x:t,y:r,w:Math.abs(n),h:Math.abs(s)}:o===i.i?a={x:Math.min(t,n),y:Math.min(r,s),w:Math.abs(n-t),h:Math.abs(s-r)}:o===i.a?a={x:t-(n=Math.abs(n)),y:r-(s=Math.abs(s)),w:2*n,h:2*s}:o===i.C&&(a={x:t-.5*(n=Math.abs(n)),y:r-.5*(s=Math.abs(s)),w:n,h:s}),a}}},7189:function(t,r,n){var i,s=s||function(t){"use strict";if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var r=t.document,n=function(){return t.URL||t.webkitURL||t},i=r.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in i,o=function(t){var r=new MouseEvent("click");t.dispatchEvent(r)},a=/constructor/i.test(t.HTMLElement)||t.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent),l=function(r){(t.setImmediate||t.setTimeout)(function(){throw r},0)},h=function(t){setTimeout(function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()},4e4)},c=function(t,r,n){for(var i=(r=[].concat(r)).length;i--;){var s=t["on"+r[i]];if("function"==typeof s)try{s.call(t,n||t)}catch(t){l(t)}}},d=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},p=function(r,l,p){p||(r=d(r));var f,g=this,m="application/octet-stream"===r.type,y=function(){c(g,"writestart progress write writeend".split(" "))};if(g.readyState=g.INIT,s){f=n().createObjectURL(r),setTimeout(function(){i.href=f,i.download=l,o(i),y(),h(f),g.readyState=g.DONE});return}!function(){if((u||m&&a)&&t.FileReader){var i=new FileReader;i.onloadend=function(){var r=u?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(r,"_blank")||(t.location.href=r),r=void 0,g.readyState=g.DONE,y()},i.readAsDataURL(r),g.readyState=g.INIT;return}f||(f=n().createObjectURL(r)),m?t.location.href=f:t.open(f,"_blank")||(t.location.href=f),g.readyState=g.DONE,y(),h(f)}()},f=p.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,r,n){return r=r||t.name||"download",n||(t=d(t)),navigator.msSaveOrOpenBlob(t,r)}:(f.abort=function(){},f.readyState=f.INIT=0,f.WRITING=1,f.DONE=2,f.error=f.onwritestart=f.onprogress=f.onwrite=f.onabort=f.onerror=f.onwriteend=null,function(t,r,n){return new p(t,r||t.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);t.exports?t.exports.saveAs=s:null!==n.amdD&&null!==n.amdO&&(void 0===(i=(function(){return s}).call(r,n,r,t))||(t.exports=i))},7280:(t,r,n)=>{"use strict";n.d(r,{A:()=>u});var i=n(4306),s=n(4590),o=n(2586),a=n(6777);class u{constructor(t){this.id=t.id,this.name=t.name,this.base=t.base?u.get(t.base):null,this.aliases=t.aliases,this.base&&(this.fromBase=t.fromBase,this.toBase=t.toBase);let r=t.coords??this.base.coords;for(let t in r)"name"in r[t]||(r[t].name=t);this.coords=r;let n=t.white??this.base.white??"D65";for(let r in this.white=(0,s.ie)(n),this.formats=t.formats??{},this.formats){let t=this.formats[r];t.type||="function",t.name||=r}this.formats.color?.id||(this.formats.color={...this.formats.color??{},id:t.cssId||this.id}),t.gamutSpace?this.gamutSpace="self"===t.gamutSpace?this:u.get(t.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(t,r)=>!0),this.referred=t.referred,Object.defineProperty(this,"path",{value:(function(t){let r=[t];for(let n=t;n=n.base;)r.push(n);return r})(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),o.A.run("colorspace-init-end",this)}inGamut(t,{epsilon:r=75e-6}={}){if(!this.equals(this.gamutSpace))return t=this.to(this.gamutSpace,t),this.gamutSpace.inGamut(t,{epsilon:r});let n=Object.values(this.coords);return t.every((t,i)=>{let s=n[i];if("angle"!==s.type&&s.range){if(Number.isNaN(t))return!0;let[n,i]=s.range;return(void 0===n||t>=n-r)&&(void 0===i||t<=i+r)}return!0})}get isUnbounded(){return Object.values(this.coords).every(t=>!("range"in t))}get cssId(){return this.formats?.color?.id||this.id}get isPolar(){for(let t in this.coords)if("angle"===this.coords[t].type)return!0;return!1}getFormat(t){let r;return"object"==typeof t?t=l(t,this):(r="default"===t?Object.values(this.formats)[0]:this.formats[t])?r=l(r,this):null}equals(t){return!!t&&(this===t||this.id===t||this.id===t.id)}to(t,r){let n,i;if(1==arguments.length){let n=(0,a.A)(t);[t,r]=[n.space,n.coords]}if(t=u.get(t),this.equals(t))return r;r=r.map(t=>Number.isNaN(t)?0:t);let s=this.path,o=t.path;for(let t=0;t<s.length;t++)if(s[t].equals(o[t]))n=s[t],i=t;else break;if(!n)throw Error(`Cannot convert between color spaces ${this} and ${t}: no connection space was found`);for(let t=s.length-1;t>i;t--)r=s[t].toBase(r);for(let t=i+1;t<o.length;t++)r=o[t].fromBase(r);return r}from(t,r){if(1==arguments.length){let n=(0,a.A)(t);[t,r]=[n.space,n.coords]}return(t=u.get(t)).to(this,r)}toString(){return`${this.name} (${this.id})`}getMinCoords(){let t=[];for(let r in this.coords){let n=this.coords[r],i=n.range||n.refRange;t.push(i?.min??0)}return t}static registry={};static get all(){return[...new Set(Object.values(u.registry))]}static register(t,r){if(1==arguments.length&&(r=arguments[0],t=r.id),r=this.get(r),this.registry[t]&&this.registry[t]!==r)throw Error(`Duplicate color space registration: '${t}'`);if(this.registry[t]=r,1==arguments.length&&r.aliases)for(let t of r.aliases)this.register(t,r);return r}static get(t,...r){if(!t||t instanceof u)return t;if("string"===(0,i.NW)(t)){let r=u.registry[t.toLowerCase()];if(!r)throw TypeError(`No color space found with id = "${t}"`);return r}if(r.length)return u.get(...r);throw TypeError(`${t} is not a valid color space`)}
56static resolveCoord(t,r){let n,s,o=(0,i.NW)(t);if("string"===o?t.includes(".")?[n,s]=t.split("."):[n,s]=[,t]:Array.isArray(t)?[n,s]=t:(n=t.space,s=t.coordId),(n=u.get(n))||(n=r),!n)throw TypeError(`Cannot resolve coordinate reference ${t}: No color space specified and relative references are not allowed here`);if("number"===(o=(0,i.NW)(s))||"string"===o&&s>=0){let t=Object.entries(n.coords)[s];if(t)return{space:n,id:t[0],index:s,...t[1]}}n=u.get(n);let a=s.toLowerCase(),l=0;for(let t in n.coords){let r=n.coords[t];if(t.toLowerCase()===a||r.name?.toLowerCase()===a)return{space:n,id:t,index:l,...r};l++}throw TypeError(`No "${s}" coordinate found in ${n.name}. Its coordinates are: ${Object.keys(n.coords).join(", ")}`)}static DEFAULT_FORMAT={type:"functions",name:"color"}}function l(t,{coords:r}={}){if(t.coords&&!t.coordGrammar){t.type||="function",t.name||="color",t.coordGrammar=(0,i.GJ)(t.coords);let n=Object.entries(r).map(([r,n],i)=>{let s=t.coordGrammar[i][0],o=n.range||n.refRange,a=s.range,u="";return"<percentage>"==s?(a=[0,100],u="%"):"<angle>"==s&&(u="deg"),{fromRange:o,toRange:a,suffix:u}});t.serializeCoords=(t,r)=>t.map((t,s)=>{let{fromRange:o,toRange:a,suffix:u}=n[s];return o&&a&&(t=(0,i._b)(o,a,t)),t=(0,i.g1)(t,{precision:r,unit:u})})}return t}},7406:(t,r,n)=>{"use strict";n.d(r,{T:()=>i});class i{constructor(t){this.renderer=t,this.cache={}}numCached(){return Object.keys(this.cache).length}isCached(t){return void 0!==this.cache[t]}getGeometryByID(t){return this.cache[t]?.geometry}getCached(t){return this.getCachedID(t.gid)}getCachedID(t){return this.cache[t]}ensureCached(t){let r=t.gid;if(!r)throw Error("The p5.Geometry you passed in has no gid property!");if(this.isCached(t.gid))return this.getCached(t);let n=this.renderer.GL;if(this.freeBuffers(r),Object.keys(this.cache).length>1e3){let t=Object.keys(this.cache)[0];this.freeBuffers(t)}let i={};this.cache[r]=i,i.geometry=t;let s=i.indexBuffer;if(t.faces.length){s||(s=i.indexBuffer=n.createBuffer());let r=t.faces.flat(),o=r.some(t=>t>65535),a=o?Uint32Array:Uint16Array;this.renderer._bindBuffer(s,n.ELEMENT_ARRAY_BUFFER,r,a),i.indexBufferType=o?n.UNSIGNED_INT:n.UNSIGNED_SHORT}else s&&(n.deleteBuffer(s),i.indexBuffer=null);return i}freeBuffers(t){let r=this.cache[t];if(!r)return;delete this.cache[t];let n=this.renderer.GL;function i(t){for(let i of t)r[i.dst]&&(n.deleteBuffer(r[i.dst]),r[i.dst]=null)}r.indexBuffer&&n.deleteBuffer(r.indexBuffer),i(this.renderer.buffers.stroke),i(this.renderer.buffers.fill),i(this.renderer.buffers.user)}}},7512:(t,r,n)=>{var i=n(4064);r.encode=function(t){var r,n="",s=t<0?(-t<<1)+1:(t<<1)+0;do r=31&s,(s>>>=5)>0&&(r|=32),n+=i.encode(r);while(s>0);return n},r.decode=function(t,r,n){var s,o,a,u,l=t.length,h=0,c=0;do{if(r>=l)throw Error("Expected more digits in base 64 VLQ value.");if(-1===(u=i.decode(t.charCodeAt(r++))))throw Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(32&u),u&=31,h+=u<<c,c+=5}while(a);o=(s=h)>>1,n.value=(1&s)==1?-o:o,n.rest=r}},7607:(t,r,n)=>{!function(){"use strict";r.ast=n(6074),r.code=n(8911),r.keyword=n(7905)}()},7666:(t,r,n)=>{"use strict";let i,s,o,a;n.d(r,{A:()=>u});let u={_toPixels(t){if(t instanceof ImageData)return t.data;if(t.getContext("2d"))return t.getContext("2d").getImageData(0,0,t.width,t.height).data;if(t.getContext("webgl")){let r=t.getContext("webgl"),n=new Uint8Array(r.drawingBufferWidth*r.drawingBufferHeight*4);return r.readPixels(0,0,t.width,t.height,r.RGBA,r.UNSIGNED_BYTE,n),n}},_getARGB(t,r){let n=4*r;return t[n+3]<<24&0xff000000|t[n]<<16&0xff0000|t[n+1]<<8&65280|255&t[n+2]},_setPixels(t,r){let n=0;for(let i=0,s=t.length;i<s;i++)t[(n=4*i)+0]=(0xff0000&r[i])>>>16,t[n+1]=(65280&r[i])>>>8,t[n+2]=255&r[i],t[n+3]=(0xff000000&r[i])>>>24},_toImageData:t=>t instanceof ImageData?t:t.getContext("2d").getImageData(0,0,t.width,t.height),_createImageData(t,r){return u._tmpCanvas=document.createElement("canvas"),u._tmpCtx=u._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(t,r)},apply(t,r,n){let i=t.getContext("2d"),s=i.getImageData(0,0,t.width,t.height),o=r(s,n);o instanceof ImageData?i.putImageData(o,0,0,0,0,t.width,t.height):i.putImageData(s,0,0,0,0,t.width,t.height)},threshold(t,r=.5){let n=u._toPixels(t),i=Math.floor(255*r);for(let t=0;t<n.length;t+=4){let r,s=n[t];r=255*(.2126*s+.7152*n[t+1]+.0722*n[t+2]>=i),n[t]=n[t+1]=n[t+2]=r}},gray(t){let r=u._toPixels(t);for(let t=0;t<r.length;t+=4){let n=r[t],i=.2126*n+.7152*r[t+1]+.0722*r[t+2];r[t]=r[t+1]=r[t+2]=i}},opaque(t){let r=u._toPixels(t);for(let t=0;t<r.length;t+=4)r[t+3]=255;return r},invert(t){let r=u._toPixels(t);for(let t=0;t<r.length;t+=4)r[t]=255-r[t],r[t+1]=255-r[t+1],r[t+2]=255-r[t+2]},posterize(t,r=4){let n=u._toPixels(t);if(r<2||r>255)throw Error("Level must be greater than 2 and less than 255 for posterize");let i=r-1;for(let t=0;t<n.length;t+=4){let s=n[t],o=n[t+1],a=n[t+2];n[t]=(s*r>>8)*255/i,n[t+1]=(o*r>>8)*255/i,n[t+2]=(a*r>>8)*255/i}},dilate(t){let r,n,i,s,o,a,l,h,c,d,p,f,g,m,y,v,b,x=u._toPixels(t),_=0,D=x.length?x.length/4:0,A=new Int32Array(D);for(;_<D;)for(r=_,n=_+t.width;_<n;)i=s=u._getARGB(x,_),l=_-1,a=_+1,h=_-t.width,c=_+t.width,l<r&&(l=_),a>=n&&(a=_),h<0&&(h=0),c>=D&&(c=_),f=u._getARGB(x,h),p=u._getARGB(x,l),g=u._getARGB(x,c),d=u._getARGB(x,a),o=77*(i>>16&255)+151*(i>>8&255)+28*(255&i),y=77*(p>>16&255)+151*(p>>8&255)+28*(255&p),m=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),v=77*(f>>16&255)+151*(f>>
568&255)+28*(255&f),b=77*(g>>16&255)+151*(g>>8&255)+28*(255&g),y>o&&(s=p,o=y),m>o&&(s=d,o=m),v>o&&(s=f,o=v),b>o&&(s=g,o=b),A[_++]=s;u._setPixels(x,A)},erode(t){let r,n,i,s,o,a,l,h,c,d,p,f,g,m,y,v,b,x=u._toPixels(t),_=0,D=x.length?x.length/4:0,A=new Int32Array(D);for(;_<D;)for(r=_,n=_+t.width;_<n;)i=s=u._getARGB(x,_),l=_-1,a=_+1,h=_-t.width,c=_+t.width,l<r&&(l=_),a>=n&&(a=_),h<0&&(h=0),c>=D&&(c=_),f=u._getARGB(x,h),p=u._getARGB(x,l),g=u._getARGB(x,c),d=u._getARGB(x,a),o=77*(i>>16&255)+151*(i>>8&255)+28*(255&i),y=77*(p>>16&255)+151*(p>>8&255)+28*(255&p),m=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),v=77*(f>>16&255)+151*(f>>8&255)+28*(255&f),b=77*(g>>16&255)+151*(g>>8&255)+28*(255&g),y<o&&(s=p,o=y),m<o&&(s=d,o=m),v<o&&(s=f,o=v),b<o&&(s=g,o=b),A[_++]=s;u._setPixels(x,A)},blur(t,r){!function(t,r){let n,l,h,c,d,p,f,g,m,y,v,b,x,_,D=u._toPixels(t),A=t.width,C=t.height,E=A*C,w=new Int32Array(E);for(let t=0;t<E;t++)w[t]=u._getARGB(D,t);let S=new Int32Array(E),F=new Int32Array(E),N=new Int32Array(E),B=new Int32Array(E),k=0;for(!function(t){let r=3.5*t|0;if(i!==(r=r<1?1:r<248?r:248)){let t,n,u,l;o=new Int32Array(s=1+(i=r)<<1),a=Array(s);for(let t=0;t<s;t++)a[t]=new Int32Array(256);for(let t=1,i=r-1;t<r;t++){o[r+t]=o[i]=n=i*i,u=a[r+t],l=a[i--];for(let t=0;t<256;t++)u[t]=l[t]=n*t}t=o[r]=r*r,u=a[r];for(let r=0;r<256;r++)u[r]=t*r}}(r),b=0;b<C;b++){for(v=0;v<A;v++){if(c=h=l=d=n=0,(p=v-i)<0)y=-p,p=0;else{if(p>=A)break;y=0}for(x=y;x<s&&!(p>=A);x++){let t=w[p+k];d+=(_=a[x])[(-0x1000000&t)>>>24],l+=_[(0xff0000&t)>>16],h+=_[(65280&t)>>8],c+=_[255&t],n+=o[x],p++}S[f=k+v]=d/n,F[f]=l/n,N[f]=h/n,B[f]=c/n}k+=A}for(b=0,k=0,m=(g=-i)*A;b<C;b++){for(v=0;v<A;v++){if(c=h=l=d=n=0,g<0)y=f=-g,p=v;else{if(g>=C)break;y=0,f=g,p=v+m}for(x=y;x<s&&!(f>=C);x++)d+=(_=a[x])[S[p]],l+=_[F[p]],h+=_[N[p]],c+=_[B[p]],n+=o[x],f++,p+=A;w[v+k]=d/n<<24|l/n<<16|h/n<<8|c/n}k+=A,m+=A,g++}u._setPixels(D,w)}(t,r)}}},7905:(t,r,n)=>{!function(){"use strict";var r=n(8911);function i(t,r){return(!!r||"yield"!==t)&&s(t,r)}function s(t,r){if(r&&function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(t))return!0;switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}}function o(t,r){return"null"===t||"true"===t||"false"===t||i(t,r)}function a(t,r){return"null"===t||"true"===t||"false"===t||s(t,r)}function u(t){var n,i,s;if(0===t.length||(s=t.charCodeAt(0),!r.isIdentifierStartES5(s)))return!1;for(n=1,i=t.length;n<i;++n)if(s=t.charCodeAt(n),!r.isIdentifierPartES5(s))return!1;return!0}function l(t){var n,i,s,o,a;if(0===t.length)return!1;for(n=0,a=r.isIdentifierStartES6,i=t.length;n<i;++n){if(55296<=(s=t.charCodeAt(n))&&s<=56319){if(++n>=i||!(56320<=(o=t.charCodeAt(n))&&o<=57343))return!1;s=(s-55296)*1024+(o-56320)+65536}if(!a(s))return!1;a=r.isIdentifierPartES6}return!0}t.exports={isKeywordES5:i,isKeywordES6:s,isReservedWordES5:o,isReservedWordES6:a,isRestrictedWord:function(t){return"eval"===t||"arguments"===t},isIdentifierNameES5:u,isIdentifierNameES6:l,isIdentifierES5:function(t,r){return u(t)&&!o(t,r)},isIdentifierES6:function(t,r){return l(t)&&!a(t,r)}}}()},8273:(t,r,n)=>{"use strict";function i(t,r){r.beginShape=function(t){this._renderer.beginShape(...arguments)},r.bezierVertex=function(...t){this._renderer.bezierVertex(...t)},r.endShape=function(t,r=1){r<1&&(console.log("\uD83C\uDF38 p5.js says: You can not have less than one instance"),r=1),this._renderer.endShape(t,r)},r.normal=function(t,r,n){return this._assert3d("normal"),this._renderer.normal(...arguments),this},r.vertexProperty=function(t,r){this._renderer.vertexProperty(t,r)}}n.d(r,{A:()=>i}),"undefined"!=typeof p5&&i(p5,p5.prototype)},8389:(t,r)=>{"use strict";r.T=function(){function t(){}return t.parse=function(r){for(var n=new Set,i=0;i<r.length;i++){var s=r[i];
56if(!t.REGEXP.test(s))throw TypeError('"'+s+'" is invalid unicode-range.');var o=s.match(t.REGEXP),a=o[1],u=o[2],l=o[3];if(a){if(/\?[^?]+$/.test(a))throw TypeError('"'+s+'" is invalid unicode-range.');if(a.includes("?"))for(var h=a.replace(/\?/g,"0"),c=a.replace(/\?/g,"F"),d=t.parse(["U+"+h+"-"+c]),p=0;p<d.length;p++){var f=d[p];n.add(f)}else n.add(parseInt(a,16))}if(u&&l)for(var g=parseInt(u,16),m=parseInt(l,16),f=g;f<=m;f++)n.add(f)}return Array.from(n).sort(function(t,r){return t-r})},t.stringify=function(r){for(var n,i=Array.from(new Set(r)).sort(function(t,r){return t-r}),s=[],o=0;o<i.length;o++){var a=i[o],u=i[o-1];n&&a-u!=1&&(s.push(t.rangeString(n,u)),n=a),n||(n=a),o===i.length-1&&(n===a?s.push(t.rangeString(a)):s.push(t.rangeString(n,a)))}return s},t.rangeString=function(t,r){return r&&t!==r?"U+"+t.toString(16)+"-"+r.toString(16):"U+"+t.toString(16)},t.REGEXP=/^u\+(?:([0-9a-f]?[0-9a-f?]{1,5})|([0-9a-f]{1,6})-([0-9a-f]{1,6}))?$/i,t}()},8391:(t,r)=>{r.getArg=function(t,r,n){if(r in t)return t[r];if(3==arguments.length)return n;throw Error('"'+r+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function s(t){var r=t.match(n);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function o(t){var r="";return t.scheme&&(r+=t.scheme+":"),r+="//",t.auth&&(r+=t.auth+"@"),t.host&&(r+=t.host),t.port&&(r+=":"+t.port),t.path&&(r+=t.path),r}function a(t){var n=t,i=s(t);if(i){if(!i.path)return t;n=i.path}for(var a,u=r.isAbsolute(n),l=n.split(/\/+/),h=0,c=l.length-1;c>=0;c--)"."===(a=l[c])?l.splice(c,1):".."===a?h++:h>0&&(""===a?(l.splice(c+1,h),h=0):(l.splice(c,2),h--));return(""===(n=l.join("/"))&&(n=u?"/":"."),i)?(i.path=n,o(i)):n}function u(t,r){""===t&&(t="."),""===r&&(r=".");var n=s(r),u=s(t);if(u&&(t=u.path||"/"),n&&!n.scheme)return u&&(n.scheme=u.scheme),o(n);if(n||r.match(i))return r;if(u&&!u.host&&!u.path)return u.host=r,o(u);var l="/"===r.charAt(0)?r:a(t.replace(/\/+$/,"")+"/"+r);return u?(u.path=l,o(u)):l}r.urlParse=s,r.urlGenerate=o,r.normalize=a,r.join=u,r.isAbsolute=function(t){return"/"===t.charAt(0)||n.test(t)},r.relative=function(t,r){""===t&&(t="."),t=t.replace(/\/$/,"");for(var n=0;0!==r.indexOf(t+"/");){var i=t.lastIndexOf("/");if(i<0||(t=t.slice(0,i)).match(/^([^\/]+:\/)?\/*$/))return r;++n}return Array(n+1).join("../")+r.substr(t.length+1)};var l=!("__proto__"in Object.create(null));function h(t){return t}function c(t){if(!t)return!1;var r=t.length;if(r<9||95!==t.charCodeAt(r-1)||95!==t.charCodeAt(r-2)||111!==t.charCodeAt(r-3)||116!==t.charCodeAt(r-4)||111!==t.charCodeAt(r-5)||114!==t.charCodeAt(r-6)||112!==t.charCodeAt(r-7)||95!==t.charCodeAt(r-8)||95!==t.charCodeAt(r-9))return!1;for(var n=r-10;n>=0;n--)if(36!==t.charCodeAt(n))return!1;return!0}function d(t,r){return t===r?0:null===t?1:null===r?-1:t>r?1:-1}r.toSetString=l?h:function(t){return c(t)?"$"+t:t},r.fromSetString=l?h:function(t){return c(t)?t.slice(1):t},r.compareByOriginalPositions=function(t,r,n){var i=d(t.source,r.source);return 0!==i||0!=(i=t.originalLine-r.originalLine)||0!=(i=t.originalColumn-r.originalColumn)||n||0!=(i=t.generatedColumn-r.generatedColumn)||0!=(i=t.generatedLine-r.generatedLine)?i:d(t.name,r.name)},r.compareByGeneratedPositionsDeflated=function(t,r,n){var i=t.generatedLine-r.generatedLine;return 0!==i||0!=(i=t.generatedColumn-r.generatedColumn)||n||0!==(i=d(t.source,r.source))||0!=(i=t.originalLine-r.originalLine)||0!=(i=t.originalColumn-r.originalColumn)?i:d(t.name,r.name)},r.compareByGeneratedPositionsInflated=function(t,r){var n=t.generatedLine-r.generatedLine;return 0!==n||0!=(n=t.generatedColumn-r.generatedColumn)||0!==(n=d(t.source,r.source))||0!=(n=t.originalLine-r.originalLine)||0!=(n=t.originalColumn-r.originalColumn)?n:d(t.name,r.name)},r.parseSourceMapInput=function(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))},r.computeSourceURL=function(t,r,n){if(r=r||"",t&&("/"!==t[t.length-1]&&"/"!==r[0]&&(t+="/"),r=t+r),n){var i=s(n);if(!i)throw Error("sourceMapURL could not be parsed");if(i.path){var l=i.path.lastIndexOf("/");l>=0&&(i.path=i.path.substring(0,l+1))}r=u(o(i),r)}return a(r)}},8497:(t,r,n)=>{"use strict";n.d(r,{I:()=>c,R:()=>f,i:()=>d,r:()=>g});var i=n(74),s=n(5311),o=n(7666),a=n(5056),u=n(4867);class l{#S={};constructor(t){for(let r in t)this[r]=t[r]}setValue(t,r){t in this.#S||(this.#S[t]=this[t]),this[t]=r}getDiff(){let t=this.#S;return this.#S={},t}getModified(){return this.#S}applyDiff(t){for(let t in this.#S)this[t]=this.#S[t];this.#S=t}}var h=n(6686);class c{constructor(t,r){this.width=t,this.height=r,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),this._pixelsState=this,this._pixelDensity=1,this.gifProperties=null,this._modified=!1,this.pixels=[]}pixelDensity(t){return void 0!==t?(t<=0&&(t=1),this._pixelDensity=t,this.width/=t,this.height/=t,this):this._pixelDensity}_animateGif(t){let r=this.gifProperties,n=t._lastRealFrameTime||window.performance.now();if(0===r.lastChangeTime&&(r.lastChangeTime=n),r.playing){r.timeDisplayed=n-r.lastChangeTime;let t=r.frames[r.displayIndex].delay;if(r.timeDisplayed>=t){let i=Math.floor(r.timeDisplayed/t);if(r.timeDisplayed=0,r.lastChangeTime=n,r.displayIndex+=i,r.loopCount=Math.floor(r.displayIndex/r.numFrames),null!==r.loopLimit&&r.loopCount>=r.loopLimit)r.playing=!1;else{let t=r.displayIndex%r.numFrames;
56this.drawingContext.putImageData(r.frames[t].image,0,0),r.displayIndex=t,this.setModified(!0)}}}}loadPixels(){let t=this._pixelsState,r=this._pixelDensity,n=this.width*r,i=this.height*r,s=this.drawingContext.getImageData(0,0,n,i);t.imageData=s,this.pixels=t.pixels=s.data,this.setModified(!0)}updatePixels(t,r,n,i){let s=this._pixelsState,o=this._pixelDensity;void 0===t&&void 0===r&&void 0===n&&void 0===i&&(t=0,r=0,n=this.width,i=this.height),t*=o,r*=o,n*=o,i*=o,this.gifProperties&&(this.gifProperties.frames[this.gifProperties.displayIndex].image=s.imageData),this.drawingContext.putImageData(s.imageData,t,r,0,0,n,i),this.setModified(!0)}get(t,r,n,i){let s=this._pixelsState,o=this._pixelDensity,a=this.canvas;if(void 0===t&&void 0===r)t=r=0,n=s.width,i=s.height;else if(t*=o,r*=o,void 0===n&&void 0===i)return t<0||r<0||t>=a.width||r>=a.height?[0,0,0,0]:this._getPixel(t,r);let u=new c(n*o,i*o);return u.pixelDensity(o),u.canvas.getContext("2d").drawImage(a,t,r,n*o,i*o,0,0,n*o,i*o),u}_getPixel(t,r){let n;return[(n=this.drawingContext.getImageData(t,r,1,1).data)[0],n[1],n[2],n[3]]}set(t,r,n){t=Math.floor(t),r=Math.floor(r);let i=this._pixelsState;if(n instanceof c)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pixelDensity,this._pixelDensity),this.drawingContext.clearRect(t,r,n.width,n.height),this.drawingContext.drawImage(n.canvas,t,r),this.drawingContext.restore();else{let s=0,o=0,a=0,u=0,l=4*(r*this._pixelDensity*(this.width*this._pixelDensity)+t*this._pixelDensity);if(i.imageData||i.loadPixels(),"number"==typeof n)l<i.pixels.length&&(s=n,o=n,a=n,u=255);else if(Array.isArray(n)){if(n.length<4)throw Error("pixel array must be of the form [R, G, B, A]");l<i.pixels.length&&(s=n[0],o=n[1],a=n[2],u=n[3])}else n instanceof p5.Color&&l<i.pixels.length&&([s,o,a,u]=n._getRGBA([255,255,255,255]));for(let n=0;n<this._pixelDensity;n++)for(let h=0;h<this._pixelDensity;h++)l=4*((r*this._pixelDensity+h)*this.width*this._pixelDensity+(t*this._pixelDensity+n)),i.pixels[l]=s,i.pixels[l+1]=o,i.pixels[l+2]=a,i.pixels[l+3]=u}this.setModified(!0)}resize(t,r){0===t&&0===r?(t=this.canvas.width,r=this.canvas.height):0===t?t=this.canvas.width*r/this.canvas.height:0===r&&(r=this.canvas.height*t/this.canvas.width),t=Math.floor(t),r=Math.floor(r);let n=document.createElement("canvas");if(n.width=t,n.height=r,this.gifProperties){let n=this.gifProperties,i=(t,r)=>{let n=0;for(let i=0;i<r.height;i++)for(let s=0;s<r.width;s++){let o=Math.floor(s*t.width/r.width),a=(Math.floor(i*t.height/r.height)*t.width+o)*4;r.data[n++]=t.data[a++],r.data[n++]=t.data[a++],r.data[n++]=t.data[a++],r.data[n++]=t.data[a++]}};for(let s=0;s<n.numFrames;s++){let o=this.drawingContext.createImageData(t,r);i(n.frames[s].image,o),n.frames[s].image=o}}n.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,n.width,n.height),this.canvas.width=this.width=t,this.canvas.height=this.height=r,this.drawingContext.drawImage(n,0,0,t,r,0,0,t,r),this.pixels.length>0&&this.loadPixels(),this.setModified(!0)}copy(...t){let r,n,i,s,o,a,u,l,h;if(9===t.length)r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],u=t[6],l=t[7],h=t[8];else if(8===t.length)r=this,n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],u=t[5],l=t[6],h=t[7];else throw Error("Signature not supported");this._copyHelper(this,r,n,i,s,o,a,u,l,h)}_copyHelper(t,r,n,i,s,o,a,u,l,h){let c=r.canvas.width/r.width,d=0,p=0;r._renderer&&r._renderer.isP3D&&(d=r.width/2,p=r.height/2),t._renderer&&t._renderer.isP3D?(t.push(),t.resetMatrix(),t.noLights(),t.blendMode(t.BLEND),t.imageMode(t.CORNER),t._renderer.image(r,n+d,i+p,s,o,a,u,l,h),t.pop()):t.drawingContext.drawImage(r.canvas,c*(n+d),c*(i+p),c*s,c*o,a,u,l,h)}mask(t){void 0===t&&(t=this);let r=this.drawingContext.globalCompositeOperation,n=this._pixelDensity,i=1;t instanceof f&&(i=t._pInst._renderer._pixelDensity);let s=[t,0,0,i*t.width,i*t.height,0,0,n*this.width,n*this.height];if(this.drawingContext.globalCompositeOperation="destination-in",this.gifProperties){for(let t=0;t<this.gifProperties.frames.length;t++)this.drawingContext.putImageData(this.gifProperties.frames[t].image,0,0
56),this.copy(...s),this.gifProperties.frames[t].image=this.drawingContext.getImageData(0,0,n*this.width,n*this.height);this.drawingContext.putImageData(this.gifProperties.frames[this.gifProperties.displayIndex].image,0,0)}else this.copy(...s);this.drawingContext.globalCompositeOperation=r,this.setModified(!0)}filter(t,r){o.A.apply(this.canvas,o.A[t],r),this.setModified(!0)}blend(...t){let r=this.drawingContext.globalCompositeOperation,n=t[t.length-1],i=Array.prototype.slice.call(t,0,t.length-1);this.drawingContext.globalCompositeOperation=n,this.copy(...i),this.drawingContext.globalCompositeOperation=r,this.setModified(!0)}setModified(t){this._modified=t}isModified(){return this._modified}save(t,r){if(this.gifProperties)!function(t,r){let n=t.gifProperties,i=n.loopLimit;1===i?i=null:null===i&&(i=0);let s=new Uint8Array(t.width*t.height*n.numFrames),o=[],a={};for(let r=0;r<n.numFrames;r++){let i=new Set,s=n.frames[r].image.data,u=s.length,l=new Uint32Array(t.width*t.height);for(let t=0,r=0;t<u;t+=4,r++){let n=s[t+0],o=n<<16|s[t+1]<<8|(0|s[t+2]);i.add(o),l[r]=o}let h=[...i].sort().toString();void 0===a[h]?a[h]={freq:1,frames:[r]}:(a[h].freq+=1,a[h].frames.push(r)),o.push(l)}let u=[],l=Object.keys(a).sort(function(t,r){return a[r].freq-a[t].freq}),c=l[0].split(",").map(t=>parseInt(t));u=u.concat(a[c].frames);let d=new Set(c);for(let t=1;t<l.length;t++){let r=l[t].split(",").map(t=>parseInt(t)).filter(t=>!d.has(t));if(c.length+r.length<=256){for(let t=0;t<r.length;t++)c.push(r[t]),d.add(r[t]);u=u.concat(a[l[t]].frames)}}u=new Set(u);let p={};for(let t=0;t<c.length;t++)p[c[t]]||(p[c[t]]=t);let f=1;for(;f<c.length;)f<<=1;c.length=f;let g={loop:i,palette:new Uint32Array(c)},m=new omggif.GifWriter(s,t.width,t.height,g),y={};for(let r=0;r<n.numFrames;r++){let i=!u.has(r),s=i?[]:c,a=new Uint8Array(t.width*t.height),l={},h=new Set;o[r].forEach((t,n)=>{i?(void 0===l[t]&&(l[t]=s.length,s.push(t)),a[n]=l[t]):a[n]=p[t],r>0&&o[r-1][n]!==t&&h.add(t)});let d={},f=s.filter(t=>!h.has(t));if(f.length>0){let t=f[0],n=i?l[t]:p[t];if(r>0){for(let t=0;t<o[r].length;t++)o[r-1][t]===o[r][t]&&(a[t]=n);d.transparent=n,y.frameOpts.disposal=1}}if(d.delay=n.frames[r].delay/10,i){let t=1;for(;t<s.length;)t<<=1;s.length=t,d.palette=new Uint32Array(s)}r>0&&m.addFrame(0,0,t.width,t.height,y.pixelPaletteIndex,y.frameOpts),y={pixelPaletteIndex:a,frameOpts:d}}y.frameOpts.disposal=1,m.addFrame(0,0,t.width,t.height,y.pixelPaletteIndex,y.frameOpts);let v=new Blob([s.slice(0,m.end())],{type:"image/gif"});(0,h.P)(v,r,"gif")}(this,t);else{let n,i=this.canvas;switch(r=r||(0,h.N)(t,r)[1]||"png"){default:n="image/png";break;case"webp":n="image/webp";break;case"jpeg":case"jpg":n="image/jpeg"}i.toBlob(n=>{(0,h.P)(n,t,r)},n)}}async toBlob(){return new Promise(t=>{this.canvas.toBlob(t)})}reset(){if(this.gifProperties){let t=this.gifProperties;t.playing=!0,t.timeSinceStart=0,t.timeDisplayed=0,t.lastChangeTime=0,t.loopCount=0,t.displayIndex=0,this.drawingContext.putImageData(t.frames[0].image,0,0)}}getCurrentFrame(){if(this.gifProperties){let t=this.gifProperties;return t.displayIndex%t.numFrames}}setFrame(t){if(this.gifProperties){let r=this.gifProperties;t<r.numFrames&&t>=0?(r.timeDisplayed=0,r.lastChangeTime=0,r.displayIndex=t,this.drawingContext.putImageData(r.frames[t].image,0,0)):console.log("Cannot set GIF to a frame number that is higher than total number of frames or below zero.")}}numFrames(){if(this.gifProperties)return this.gifProperties.numFrames}play(){this.gifProperties&&(this.gifProperties.playing=!0)}pause(){this.gifProperties&&(this.gifProperties.playing=!1)}delay(t,r){if(this.gifProperties){let n=this.gifProperties;if(r<n.numFrames&&r>=0)n.frames[r].delay=t;else for(let r of n.frames)r.delay=t}}}function d(t,r){t.Image=c}"undefined"!=typeof p5&&d(p5,p5.prototype);class p{constructor(t={}){for(let r in t)this[r]=t[r]}clone(){return new p(this)}}class f{static states={strokeColor:null,strokeSet:!1,fillColor:null,fillSet:!1,tint:null,imageMode:s.e,rectMode:s.e,ellipseMode:s.C,strokeWeight:1,textFont:{family:"sans-serif"},textLeading:15,leadingSet:!1,textSize:12,textAlign:s.ao,textBaseline:s.an,bezierOrder:3,splineProperties:new p({ends:s.I,tightness:0}),textWrap:s.am,fontStyle:s.N,fontStretch:s.N,fontWeight:s.N,lineHeight:s.N,fontVariant:s.N,direction:"inherit"};constructor(t,r,n,s){this._pInst=t,this._isMainCanvas=s,this.pixels=[],this._pixelDensity=Math.ceil(window.devicePixelRatio)||1,this.width=r,this.height=n,this._events={},s&&(this._isMainCanvas=!0),this.states=new l(f.states),this.states.strokeColor=new i.C([0,0,0]),this.states.fillColor=new i.C([1,1,1]),this._pushPopStack=[],this._pushPopDepth=0,this._clipping=!1,this._clipInvert=!1,this._currentShape=void 0}get currentShape(){return this._currentShape||(this._currentShape=new u.yp(this.getCommonVertexProperties())),this._currentShape}remove(){}pixelDensity(t){let r;return"number"==typeof t?(t!==this._pixelDensity&&(this._pixelDensity=t),r=this,this.resize(this.width,this.height)):r=this._pixelDensity,r}push(){this._pushPopDepth++,this._pushPopStack.push(this.states.getDiff())}pop(){this._pushPopDepth--;let t=this._pushPopStack.pop()||{},r=this.states.getModified();this.states.applyDiff(t),this.updateShapeVertexProperties(r),this.updateShapeProperties(r)}bezierOrder(t){if(void 0===t)return this.states.bezierOrder;this.states.setValue("bezierOrder",t),this.updateShapeProperties()}bezierVertex(t,r,n=0,i=0,s=0){let o=new a.M(t,r,n),u=this.getSupportedIndividualVertexProperties().textureCoordinates?new a.M(i,s):void 0;this.currentShape.bezierVertex(o,u)}splineProperty(t,r){if(void 0===r)return this.states.splineProperties[t];this.states.setValue("splineProperties",this.states.splineProperties.clone()),this.states.splineProperties[t]=r,this.updateShapeProperties()}splineProperties(t){if(!t)return{...this.states.splineProperties};for(let r in t)this.splineProperty(r,t[r])}splineVertex(t,r,n=0,i=0,s=0){let o=new a.M(t,r,n),u=this.getSupportedIndividualVertexProperties().textureCoordinates?new a.M(i,s):void 0;this.currentShape.splineVertex(o,u)}curveDetail(t){if(void 0===t)return this.states.curveDetail;this.states.setValue("curveDetail",t)}beginShape(...t){this.currentShape.reset(),this.updateShapeVertexProperties(),this.currentShape.beginShape(...t)}endShape(...t){this.currentShape.endShape(...t),this.drawShape(this.currentShape)}beginContour(t){this.currentShape.beginContour(t)}endContour(t){this.currentShape.endContour(t)}drawShape(t,r){throw Error("Unimplemented")}vertex(t,r,n=0,i=0,s=0){let o=new a.M(t,r,n),u=this.getSupportedIndividualVertexProperties().textureCoordinates?new a.M(i,s):void 0;this.currentShape.vertex(o,u)}bezier(t,r,n,i,s,o,a,u){let l=this._pInst.bezierOrder();return this._pInst.bezierOrder(l),this._pInst.beginShape(),this._pInst.bezierVertex(t,r),this._pInst.bezierVertex(n,i),this._pInst.bezierVertex(s,o),this._pInst.bezierVertex(a,u),this._pInst.endShape(),this}spline(...t){if(8===t.length){let[r,n,i,s,o,a,u,l]=t;this._pInst.beginShape(),this._pInst.splineVertex(r,n),this._pInst.splineVertex(i,s),this._pInst.splineVertex(o,a),this._pInst.splineVertex(u,l),this._pInst.endShape()}else if(12===t.length){let[r,n,i,s,o,a,u,l,h,c,d,p]=t;this._pInst.beginShape(),this._pInst.splineVertex(r,n,i),this._pInst.splineVertex(s,o,a),this._pInst.splineVertex(u,l,h),this._pInst.splineVertex(c,d,p),this._pInst.endShape()}return this}beginClip(t={}){if(this._clipping)throw Error("It looks like you're trying to clip while already in the middle of clipping. Did you forget to endClip()?");this._clipping=!0,this._clipInvert=t.invert}endClip(){if(!this._clipping)throw Error("It looks like you've called endClip() without beginClip(). Did 
56you forget to call beginClip() first?");this._clipping=!1}resize(t,r){this.width=t,this.height=r}get(t,r,n,i){let s=this._pixelDensity,o=this.canvas;if(void 0===t&&void 0===r)t=r=0,n=this.width,i=this.height;else if(t*=s,r*=s,void 0===n&&void 0===i)return t<0||r<0||t>=o.width||r>=o.height?[0,0,0,0]:this._getPixel(t,r);let a=new c(n*s,i*s);return a.pixelDensity(s),a.canvas.getContext("2d").drawImage(o,t,r,n*s,i*s,0,0,n*s,i*s),a}scale(t,r){}fill(...t){this.states.setValue("fillSet",!0),this.states.setValue("fillColor",this._pInst.color(...t)),this.updateShapeVertexProperties()}noFill(){this.states.setValue("fillColor",null)}strokeWeight(t){if(void 0===t)return this.states.strokeWeight;this.states.setValue("strokeWeight",t)}stroke(...t){this.states.setValue("strokeSet",!0),this.states.setValue("strokeColor",this._pInst.color(...t)),this.updateShapeVertexProperties()}noStroke(){this.states.setValue("strokeColor",null)}getCommonVertexProperties(){return{}}getSupportedIndividualVertexProperties(){return{textureCoordinates:!1}}updateShapeProperties(t){if(!t||t.bezierOrder||t.splineProperties){let t=this.currentShape;t.bezierOrder(this.states.bezierOrder),t.splineProperty("ends",this.states.splineProperties.ends),t.splineProperty("tightness",this.states.splineProperties.tightness)}}updateShapeVertexProperties(t){let r=this.getCommonVertexProperties();if(!t||Object.keys(t).some(t=>t in r)){let t=this.currentShape;for(let n in r)t[n](r[n])}}_applyDefaults(){return this}}function g(t,r){t.Renderer=f}},8715:(t,r,n)=>{"use strict";n.d(r,{A:()=>s});var i=n(5311);function s(t,r){let n=r.DEGREES="degrees",s=r.RADIANS="radians";r._angleMode=s,r.acos=function(t){return this._fromRadians(Math.acos(t))},r.asin=function(t){return this._fromRadians(Math.asin(t))},r.atan=function(t){return this._fromRadians(Math.atan(t))},r.atan2=function(t,r){return this._fromRadians(Math.atan2(t,r))},r.cos=function(t){return Math.cos(this._toRadians(t))},r.sin=function(t){return Math.sin(this._toRadians(t))},r.tan=function(t){return Math.tan(this._toRadians(t))},r.degrees=t=>t*i.x,r.radians=t=>t*i.D,r.angleMode=function(t){if(void 0===t)return this._angleMode;if(t===n||t===s){if(t===this._angleMode)return;t===s?(this.pRotationX=this.pRotationX*i.D,this.pRotationY=this.pRotationY*i.D,this.pRotationZ=this.pRotationZ*i.D):(this.pRotationX=this.pRotationX*i.x,this.pRotationY=this.pRotationY*i.x,this.pRotationZ=this.pRotationZ*i.x),this._angleMode=t}},r._toRadians=function(t){return this._angleMode===n?t*i.D:t},r._toDegrees=function(t){return this._angleMode===s?t*i.x:t},r._fromRadians=function(t){return this._angleMode===n?t*i.x:t},r._fromDegrees=function(t){return this._angleMode===s?t*i.D:t}}"undefined"!=typeof p5&&s(p5,p5.prototype)},8781:(t,r,n)=>{"use strict";n.d(r,{A:()=>h});var i=n(4306),s=n(2586),o=n(7280),a=n(172);let u=new Set(["<number>","<percentage>","<angle>"]);function l(t,r,n,s){return Object.entries(t.coords).map(([t,o],a)=>{let l,h=r.coordGrammar[a],c=s[a],d=c?.type;if(!(l=c.none?h.find(t=>u.has(t)):h.find(t=>t==d))){let r=o.name||t;throw TypeError(`${d??c.raw} not allowed for ${r} in ${n}()`)}let p=l.range;"<percentage>"===d&&(p||=[0,1]);let f=o.range||o.refRange;return p&&f&&(s[a]=i._b(p,f,s[a])),l})}function h(t,{meta:r}={}){let n={str:String(t)?.trim()};if(s.A.run("parse-start",n),n.color)return n.color;if(n.parsed=i.qQ(n.str),n.parsed){let t=n.parsed.name;if("color"===t){let t=n.parsed.args.shift(),i=t.startsWith("--")?t.substring(2):`--${t}`,s=[t,i],u=n.parsed.rawArgs.indexOf("/")>0?n.parsed.args.pop():1;for(let i of o.A.all){let o=i.getFormat("color");if(o&&(s.includes(o.id)||o.ids?.filter(t=>s.includes(t)).length)){let s,h=Object.keys(i.coords).map((t,r)=>n.parsed.args[r]||0);return o.coordGrammar&&(s=l(i,o,"color",h)),r&&Object.assign(r,{formatId:"color",types:s}),o.id.startsWith("--")&&!t.startsWith("--")&&a.A.warn(`${i.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${o.id}) instead of color(${t}).`),t.startsWith("--")&&!o.id.startsWith("--")&&a.A.warn(`${i.name} is a standard space and supported in the CSS spec. Use color(${o.id}) instead of prefixed color(${t}).`),{spaceId:i.id,coords:h,alpha:u}}}let h="",c=t in o.A.registry?t:i;
56if(c in o.A.registry){let t=o.A.registry[c].formats?.color?.id;t&&(h=`Did you mean color(${t})?`)}throw TypeError(`Cannot parse color(${t}). `+(h||"Missing a plugin?"))}for(let s of o.A.all){let o=s.getFormat(t);if(o&&"function"===o.type){let a,u=1;(o.lastAlpha||i.HV(n.parsed.args).alpha)&&(u=n.parsed.args.pop());let h=n.parsed.args;return o.coordGrammar&&(a=l(s,o,t,h)),r&&Object.assign(r,{formatId:o.name,types:a}),{spaceId:s.id,coords:h,alpha:u}}}}else for(let t of o.A.all)for(let i in t.formats){let s=t.formats[i];if("custom"!==s.type||s.test&&!s.test(n.str))continue;let o=s.parse(n.str);if(o)return o.alpha??=1,r&&(r.formatId=i),o}throw TypeError(`Could not parse ${t} as a color. Missing a plugin?`)}},8911:t=>{!function(){"use strict";var r,n,i,s,o,a;function u(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(Math.floor((t-65536)/1024)+55296)+String.fromCharCode((t
vendor: 9,489 bytes, line 56
56-65536)%1024+56320)}for(n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},
56r
vendor: 15,269 bytes, line 56
56={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},
56i=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],a=0,s=Array(128);a<128;++a)s[a]=a>=97&&a<=122||a>=65&&a<=90||36===a||95===a;for(a=0,o=Array(128);a<128;++a)o[a]=a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||36===a||95===a;t.exports={isDecimalDigit:function(t){return 48<=t&&t<=57},isHexDigit:function(t){return 48<=t&&t<=57||97<=t&&t<=102||65<=t&&t<=70},isOctalDigit:function(t){return t>=48&&t<=55},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&i.indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStartES5:function(t){return t<128?s[t]:n.NonAsciiIdentifierStart.test(u(t))},isIdentifierPartES5:function(t){return t<128?o[t]:n.NonAsciiIdentifierPart.test(u(t))},isIdentifierStartES6:function(t){return t<128?s[t]:r.NonAsciiIdentifierStart.test(u(t))},isIdentifierPartES6:function(t){return t<128?o[t]:r.NonAsciiIdentifierPart.test(u(t))}}}()},8983:(t,r)=>{"use strict";function n(t,r,n,i){for(var s=t[r++],o=1<<s,a=o+1,u=a+1,l=s+1,h=(1<<l)-1,c=0,d=0,p=0,f=t[r++],g=new Int32Array(4096),m=null;;){for(;c<16&&0!==f;)d|=t[r++]<<c,c+=8,1===f?f=t[r++]:--f;if(c<l)break;var y=d&h;if(d>>=l,c-=l,y===o){u=a+1,h=(1<<(l=s+1))-1,m=null;continue}if(y===a)break;for(var v=y<u?y:m,b=0,x=v;x>o;)x=g[x]>>8,++b;var _=x;if(p+b+ +(v!==y)>i)return void console.log("Warning, gif stream longer than expected.");n[p++]=_;var D=p+=b;for(v!==y&&(n[p++]=_),x=v;b--;)x=g[x],n[--D]=255&x,x>>=8;null!==m&&u<4096&&(g[u++]=m<<8|_,u>=h+1&&l<12&&(++l,h=h<<1|1)),m=y}return p!==i&&console.log("Warning, gif stream shorter than expected."),n}try{r.e=function(t,r,n,i){var s=0,i=void 0===i?{}:i,o=void 0===i.loop?null:i.loop,a=void 0===i.palette?null:i.palette;if(r<=0||n<=0||r>65535||n>65535)throw Error("Width/Height invalid.");function u(t){var r=t.length;if(r<2||r>256||r&r-1)throw Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return r}t[s++]=71,t[s++]=73,t[s++]=70,t[s++]=56,t[s++]=57,t[s++]=97;var l=0,h=0;if(null!==a){for(var c=u(a);c>>=1;)++l;if(c=1<<l,--l,void 0!==i.background){if((h=i.background)>=c)throw Error("Background index out of range.");if(0===h)throw Error("Background index explicitly passed as 0.")}}if(t[s++]=255&r,t[s++]=r>>8&255,t[s++]=255&n,t[s++]=n>>8&255,t[s++]=128*(null!==a)|l,t[s++]=h,t[s++]=0,null!==a)for(var d=0,p=a.length;d<p;++d){var f=a[d];t[s++]=f>>16&255,t[s++]=f>>8&255,t[s++]=255&f}if(null!==o){if(o<0||o>65535)throw Error("Loop count invalid.");t[s++]=33,t[s++]=255,t[s++]=11,t[s++]=78,t[s++]=69,t[s++]=84,t[s++]=83,t[s++]=67,t[s++]=65,t[s++]=80,t[
56s++]=69,t[s++]=50,t[s++]=46,t[s++]=48,t[s++]=3,t[s++]=1,t[s++]=255&o,t[s++]=o>>8&255,t[s++]=0}var g=!1;this.addFrame=function(r,n,i,o,l,h){if(!0===g&&(--s,g=!1),h=void 0===h?{}:h,r<0||n<0||r>65535||n>65535)throw Error("x/y invalid.");if(i<=0||o<=0||i>65535||o>65535)throw Error("Width/Height invalid.");if(l.length<i*o)throw Error("Not enough pixels for the frame size.");var c=!0,d=h.palette;if(null==d&&(c=!1,d=a),null==d)throw Error("Must supply either a local or global palette.");for(var p=u(d),f=0;p>>=1;)++f;p=1<<f;var m=void 0===h.delay?0:h.delay,y=void 0===h.disposal?0:h.disposal;if(y<0||y>3)throw Error("Disposal out of range.");var v=!1,b=0;if(void 0!==h.transparent&&null!==h.transparent&&(v=!0,(b=h.transparent)<0||b>=p))throw Error("Transparent color index.");if((0!==y||v||0!==m)&&(t[s++]=33,t[s++]=249,t[s++]=4,t[s++]=y<<2|!0===v,t[s++]=255&m,t[s++]=m>>8&255,t[s++]=b,t[s++]=0),t[s++]=44,t[s++]=255&r,t[s++]=r>>8&255,t[s++]=255&n,t[s++]=n>>8&255,t[s++]=255&i,t[s++]=i>>8&255,t[s++]=255&o,t[s++]=o>>8&255,t[s++]=!0===c?128|f-1:0,!0===c)for(var x=0,_=d.length;x<_;++x){var D=d[x];t[s++]=D>>16&255,t[s++]=D>>8&255,t[s++]=255&D}return s=function(t,r,n,i){t[r++]=n;var s=r++,o=1<<n,a=o-1,u=o+1,l=u+1,h=n+1,c=0,d=0;function p(n){for(;c>=n;)t[r++]=255&d,d>>=8,c-=8,r===s+256&&(t[s]=255,s=r++)}function f(t){d|=t<<c,c+=h,p(8)}var g=i[0]&a,m={};f(o);for(var y=1,v=i.length;y<v;++y){var b=i[y]&a,x=g<<8|b,_=m[x];if(void 0===_){for(d|=g<<c,c+=h;c>=8;)t[r++]=255&d,d>>=8,c-=8,r===s+256&&(t[s]=255,s=r++);4096===l?(f(o),l=u+1,h=n+1,m={}):(l>=1<<h&&++h,m[x]=l++),g=b}else g=_}return f(g),f(u),p(1),s+1===r?t[s]=0:(t[s]=r-s-1,t[r++]=0),r}(t,s,f<2?2:f,l)},this.end=function(){return!1===g&&(t[s++]=59,g=!0),s},this.getOutputBuffer=function(){return t},this.setOutputBuffer=function(r){t=r},this.getOutputBufferPosition=function(){return s},this.setOutputBufferPosition=function(t){s=t}},r.u=function(t){var r=0;if(71!==t[r++]||73!==t[r++]||70!==t[r++]||56!==t[r++]||(t[r++]+1&253)!=56||97!==t[r++])throw Error("Invalid GIF 87a/89a header.");var i=t[r++]|t[r++]<<8,s=t[r++]|t[r++]<<8,o=t[r++],a=1<<(7&o)+1;t[r++],t[r++];var u=null,l=null;o>>7&&(u=r,l=a,r+=3*a);var h=!0,c=[],d=0,p=null,f=0,g=null;for(this.width=i,this.height=s;h&&r<t.length;)switch(t[r++]){case 33:switch(t[r++]){case 255:if(11!==t[r]||78==t[r+1]&&69==t[r+2]&&84==t[r+3]&&83==t[r+4]&&67==t[r+5]&&65==t[r+6]&&80==t[r+7]&&69==t[r+8]&&50==t[r+9]&&46==t[r+10]&&48==t[r+11]&&3==t[r+12]&&1==t[r+13]&&0==t[r+16])r+=14,g=t[r++]|t[r++]<<8,r++;else for(r+=12;;){var m=t[r++];if(!(m>=0))throw Error("Invalid block size");if(0===m)break;r+=m}break;case 249:if(4!==t[r++]||0!==t[r+4])throw Error("Invalid graphics extension block.");var y=t[r++];d=t[r++]|t[r++]<<8,p=t[r++],(1&y)==0&&(p=null),f=y>>2&7,r++;break;case 254:for(;;){var m=t[r++];if(!(m>=0))throw Error("Invalid block size");if(0===m)break;r+=m}break;default:throw Error("Unknown graphic control label: 0x"+t[r-1].toString(16))}break;case 44:var v=t[r++]|t[r++]<<8,b=t[r++]|t[r++]<<8,x=t[r++]|t[r++]<<8,_=t[r++]|t[r++]<<8,D=t[r++],A=D>>7,C=D>>6&1,E=1<<(7&D)+1,w=u,S=l,F=!1;if(A){var F=!0;w=r,S=E,r+=3*E}var N=r;for(r++;;){var m=t[r++];if(!(m>=0))throw Error("Invalid block size");if(0===m)break;r+=m}c.push({x:v,y:b,width:x,height:_,has_local_palette:F,palette_offset:w,palette_size:S,data_offset:N,data_length:r-N,transparent_index:p,interlaced:!!C,delay:d,disposal:f});break;case 59:h=!1;break;default:throw Error("Unknown gif block: 0x"+t[r-1].toString(16))}this.numFrames=function(){return c.length},this.loopCount=function(){return g},this.frameInfo=function(t){if(t<0||t>=c.length)throw Error("Frame index out of range.");return c[t]},this.decodeAndBlitFrameBGRA=function(r,s){var o=this.frameInfo(r),a=o.width*o.height,u=new Uint8Array(a);n(t,o.data_offset,u,a);var l=o.palette_offset,h=o.transparent_index;null===h&&(h=256);var c=o.width,d=i-c,p=c,f=(o.y*i+o.x)*4,g=((o.y+o.height)*i+o.x)*4,m=f,y=4*d;!0===o.interlaced&&(y+=4*i*7);for(var v=8,b=0,x=u.length;b<x;++b){var _=u[b];if(0===p&&(m+=y,p=c,m>=g&&(y=4*d+4*i*(v-1),m=f+(c+d)*(v<<1),v>>=1)),_===h)m+=4;else{var D=t[l+3*_],A=t[l+3*_+1],C=t[l+3*_+2];s[m++]=C,s[m++]=A,s[m++]=D,s[m++]=255}--p}},this.decodeAndBlitFrameRGBA=function(r,s){var o=this.frameInfo(r),a=o.width*o.height,u=new Uint8Array(a);n(t,o.data_offset,u,a);var l=o.palette_offset,h=o.transparent_index;
56null===h&&(h=256);var c=o.width,d=i-c,p=c,f=(o.y*i+o.x)*4,g=((o.y+o.height)*i+o.x)*4,m=f,y=4*d;!0===o.interlaced&&(y+=4*i*7);for(var v=8,b=0,x=u.length;b<x;++b){var _=u[b];if(0===p&&(m+=y,p=c,m>=g&&(y=4*d+4*i*(v-1),m=f+(c+d)*(v<<1),v>>=1)),_===h)m+=4;else{var D=t[l+3*_],A=t[l+3*_+1],C=t[l+3*_+2];s[m++]=D,s[m++]=A,s[m++]=C,s[m++]=255}--p}}}}catch(t){}},9184:(t,r,n)=>{"use strict";n.d(r,{A:()=>o});var i=n(5311),s=n(6796);function o(t,r){r._normalizeArcAngles=(t,r,n,s,o)=>{let a;return t-=i.f*Math.floor(t/i.f),r-=i.f*Math.floor(r/i.f),a=Math.min(Math.abs(t-r),i.f-Math.abs(t-r)),o&&(t=t<=i.g?Math.atan(n/s*Math.tan(t)):t>i.g&&t<=3*i.g?Math.atan(n/s*Math.tan(t))+i.h:Math.atan(n/s*Math.tan(t))+i.f,r=r<=i.g?Math.atan(n/s*Math.tan(r)):r>i.g&&r<=3*i.g?Math.atan(n/s*Math.tan(r))+i.h:Math.atan(n/s*Math.tan(r))+i.f),t>r&&(r+=i.f),{start:t,stop:r,correspondToSamePoint:a<1e-5}},r.arc=function(t,r,n,i,o,a,u,l){if(!this._renderer.states.strokeColor&&!this._renderer.states.fillColor||o===a)return this;o=this._toRadians(o),a=this._toRadians(a);let h=s.A.modeAdjust(t,r,n,i,this._renderer.states.ellipseMode),c=this._normalizeArcAngles(o,a,h.w,h.h,!0);return c.correspondToSamePoint?this._renderer.ellipse([h.x,h.y,h.w,h.h,l]):(this._renderer.arc(h.x,h.y,h.w,h.h,c.start,c.stop,u,l),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("arc",[h.x,h.y,h.w,h.h,c.start,c.stop,u])),this},r.ellipse=function(t,r,n,i,s){return this._renderEllipse(...arguments)},r.circle=function(...t){let r=t.slice(0,2);return r.push(t[2],t[2]),this._renderEllipse(...r)},r._renderEllipse=function(t,r,n,i,o){if(!this._renderer.states.strokeColor&&!this._renderer.states.fillColor)return this;void 0===i&&(i=n);let a=s.A.modeAdjust(t,r,n,i,this._renderer.states.ellipseMode);return this._renderer.ellipse([a.x,a.y,a.w,a.h,o]),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("ellipse",[a.x,a.y,a.w,a.h]),this},r.line=function(...t){return this._renderer.states.strokeColor&&this._renderer.line(...t),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("line",t),this},r.point=function(...r){return this._renderer.states.strokeColor&&(1===r.length&&r[0]instanceof t.Vector?this._renderer.point.call(this._renderer,r[0].x,r[0].y,r[0].z):(this._renderer.point(...r),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("point",r))),this},r.quad=function(...t){return(this._renderer.states.strokeColor||this._renderer.states.fillColor)&&(this._renderer.isP3D&&t.length<12?this._renderer.quad.call(this._renderer,t[0],t[1],0,t[2],t[3],0,t[4],t[5],0,t[6],t[7],0,t[8],t[9]):(this._renderer.quad(...t),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("quadrilateral",t))),this},r.rect=function(...t){return this._renderRect(...t)},r.square=function(t,r,n,i,s,o,a){return this._renderRect.call(this,t,r,n,n,i,s,o,a)},r._renderRect=function(){if(this._renderer.states.strokeColor||this._renderer.states.fillColor){3==arguments.length&&(arguments[3]=arguments[2]);let t=s.A.modeAdjust(arguments[0],arguments[1],arguments[2],arguments[3],this._renderer.states.rectMode);this._renderer.states.rectMode===i.e&&(t.w=arguments[2],t.h=arguments[3]);let r=[t.x,t.y,t.w,t.h];for(let t=4;t<arguments.length;t++)r[t]=arguments[t];this._renderer.rect(r),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("rectangle",[t.x,t.y,t.w,t.h])}return this},r.triangle=function(...t){return(this._renderer.states.strokeColor||this._renderer.states.fillColor)&&this._renderer.triangle(t),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("triangle",t),this}}"undefined"!=typeof p5&&o(p5,p5.prototype)},9321:(t,r,n)=>{"use strict";n.d(r,{A:()=>o,Z:()=>s});var i=n(4962);class s{constructor(t,r){this.file=t,this._pInst=r;let n=t.type.split("/");this.type=n[0],this.subtype=n[1],this.name=t.name,this.size=t.size,this.data=void 0}static _createLoader(t,r){let n=new FileReader;return n.onload=function(n){let o=new s(t);if("application/json"===o.file.type)o.data=JSON.parse(n.target.result);else if("text/xml"===o.file.type){let t=new DOMParser().parseFromString(n.target.result,"text/xml");o.data=new i._(t.documentElement)}else o.data=n.target.result;r(o)},n}static _load(t,r){if(/^text\//.test(t.type)||"application/json"===t.type)s._createLoader(t,r).readAsText(t);else if(/^(video|audio)\//.test(t.type)){let n=new s(t);n.data=URL.createObjectURL(t),r(n)}else s._createLoader(t,r).readAsDataURL(t)}}function o(t,r){t.File=s}"undefined"!=typeof p5&&o(p5,p5.prototype)},9327:(t,r,n)=>{"use strict";n.d(r,{A:()=>
56o});var i=n(5311),s=n(74);function o(t,r){r.beginClip=function(t={}){this._renderer.beginClip(t)},r.endClip=function(){this._renderer.endClip()},r.clip=function(t,r){this._renderer.beginClip(r),t(),this._renderer.endClip(r)},r.background=function(...t){return this._renderer.background(...t),this},r.clear=function(...t){let r=t[0]||0,n=t[1]||0,i=t[2]||0,s=t[3]||0;return this._renderer.clear(r,n,i,s),this},r.colorMode=function(t,r,n,i,o){if([s.R,s.b,s.H,s.d,s.e,s.L,s.f,s.O,s.g].includes(t)){this._renderer.states.setValue("colorMode",t),this._renderer.states.setValue("colorMaxes",this._renderer.states.colorMaxes.clone());let s=this._renderer.states.colorMaxes[t];2==arguments.length?(s[0]=r,s[1]=r,s[2]=r,s[3]=r):4==arguments.length?(s[0]=r,s[1]=n,s[2]=i):5==arguments.length&&(s[0]=r,s[1]=n,s[2]=i,s[3]=o)}return this._renderer.states.colorMode},r.fill=function(...t){return this._renderer.fill(...t),this},r.noFill=function(){return this._renderer.noFill(),this},r.noStroke=function(){return this._renderer.states.setValue("strokeColor",null),this},r.stroke=function(...t){return this._renderer.stroke(...t),this},r.erase=function(t=255,r=255){return this._renderer.erase(t,r),this},r.noErase=function(){return this._renderer.noErase(),this},r.blendMode=function(t){t===i.N&&(console.warn("NORMAL has been deprecated for use in blendMode. defaulting to BLEND instead."),t=i.u),this._renderer.blendMode(t)}}n(1024),"undefined"!=typeof p5&&o(p5,p5.prototype)},9331:(t,r,n)=>{"use strict";n.d(r,{V:()=>d});var i=n(5311),s=n(2510),o=n(9605),a=n.n(o),u=n(5056),l=n(1935);n(5191),n(6686),n(7189);let h={vertices:1,vertexNormals:1,vertexColors:4,vertexStrokeColors:4,uvs:2},c=Object.values(h).reduce((t,r)=>t+r);class d{constructor(t){this.renderer=t,this.shapeMode=i.m,this.geometry=new s.V(void 0,void 0,void 0,this.renderer),this.geometry.gid="__IMMEDIATE_MODE_GEOMETRY__",this.contourIndices=[],this._useUserVertexProperties=void 0,this._bezierVertex=[],this._quadraticVertex=[],this._curveVertex=[],this.isProcessingVertices=!1,this._tessy=this._initTessy(),this.tessyVertexSize=c,this.bufferStrides={...h}}constructFromContours(t,r){this._useUserVertexProperties&&this._resetUserVertexProperties(),this.geometry.reset(),this.contourIndices=[],this.shapeMode=t.contours[0].kind;let n=!!this.renderer.states.strokeColor,s={};if(t.userVertexProperties)for(let r in this._useUserVertexProperties=!0,t.userVertexProperties){let n=t.vertexPropertyName(r),i=this.geometry._userVertexPropertyHelper(n,[],t.userVertexProperties[r]);s[r]=i,this.tessyVertexSize+=i.getDataSize(),this.bufferStrides[i.getSrcName()]=i.getDataSize(),this.renderer.buffers.user.push(new l.f(i.getDataSize(),i.getSrcName(),i.getDstName(),n,this.renderer))}else this._useUserVertexProperties=!1;for(let t of r)for(let r of(this.contourIndices.push(this.geometry.vertices.length),t)){if(this.shapeMode===i.Q&&this.geometry.vertices.length%6==3)for(let t in this.bufferStrides){let r=this.bufferStrides[t],n=this.geometry[t];n.push(...n.slice(n.length-3*r,n.length-2*r),...n.slice(n.length-r,n.length))}for(let t in this.geometry.vertices.push(r.position),this.geometry.vertexNormals.push(r.normal||new u.M(0,0,0)),this.geometry.uvs.push(r.textureCoordinates.x,r.textureCoordinates.y),this.renderer.states.fillColor?this.geometry.vertexColors.push(...r.fill.array()):this.geometry.vertexColors.push(0,0,0,0),this.renderer.states.strokeColor?this.geometry.vertexStrokeColors.push(...r.stroke.array()):this.geometry.vertexStrokeColors.push(0,0,0,0),s){let n=s[t];t in r&&n.setCurrentData(r[t]),n.pushCurrentData()}}n&&(this.geometry.edges=this._calculateEdges(this.shapeMode,this.geometry.vertices)),n&&!this.renderer.geometryBuilder&&this.geometry._edgesToVertices(),this.shapeMode===i.m?(this.isProcessingVertices=!0,this._tesselateShape(),this.isProcessingVertices=!1):this.shapeMode===i.s?this.shapeMode=i.r:this.shapeMode===i.Q&&(this.shapeMode=i.p),this.renderer.states.textureMode===i.a1&&null!==this.renderer.states._tex&&this.renderer.states._tex.width>0&&this.renderer.states._tex.height>0&&(this.geometry.uvs=this.geometry.uvs.map((t,r)=>r%2==0?t/this.renderer.states._tex.width:t/this.renderer.states._tex.height))}_resetUserVertexProperties(){let t=this.geometry.userVertexProperties;for(let r in t){let n=t[r];delete this.bufferStrides[r],n.delete()}this._useUserVertexProperties=!1,this.tessyVertexSize=c,this.geometry.userVertexProperties={}}_calculateEdges(t,r){let n=[],s=0,o=this.contourIndices.slice(),a=-1;switch(t){case i.r:for(s=0;s<r.length-2;s++)n.push([s,s+1]),n.push([s,s+2]);n.push([s,s+1]);break;case i.q:for(s=1;s<r.length-1;s++)n.push([0,s]),n.push([s,s+1]);n.push([0,r.length-1]);break;case i.p:for(s=0;s<r.length-2;s+=3)n.push([s,s+1]),n.push([s+1,s+2]),n.push([s+2,s]);break;case i.L:for(s=0;s<r.length-1;s+=2)n.push([s,s+1]);break;case i.Q:for(s=0;s<r.length-5;s+=6)n.push([s,s+1]),n.push([s+1,s+2]),n.push([s+2,s+5]),n.push([s+5,s]);break;case i.s:for(s=0;s<r.length-2;s+=2)n.push([s,s+1]),n.push([s+1,s+3]),n.push([s,s+2]);n.push([s,s+1]);break;default:for(s=0;s<r.length;s++)s===o[0]?a=o.shift():r[a]&&r[s].equals(r[a])?n.push([s-1,a]):n.push([s-1,s])}return n}_tesselateShape(){this.shapeMode=i.p;let t=[];for(let r=0;r<this.geometry.vertices.length;r++)for(let n in this.contourIndices.length>0&&this.contourIndices[0]===r&&(this.contourIndices.shift(),t.push([])),t[t.length-1].push(this.geometry.vertices[r].x,this.geometry.vertices[r].y,this.geometry.vertices[r].z,this.geometry.uvs[2*r],this.geometry.uvs[2*r+1],this.geometry.vertexColors[4*r],this.geometry.vertexColors[4*r+1],this.geometry.vertexColors[4*r+2],this.geometry.vertexColors[4*r+3],this.geometry.vertexNormals[r].x,this.geometry.vertexNormals[r].y,this.geometry.vertexNormals[r].z),this.geometry.userVertexProperties){let i=this.geometry.userVertexProperties[n],s=r*i.getDataSize(),o=s+i.getDataSize(),a=i.getSrcArray().slice(s,o);t[t.length-1].push(...a)}let r=this._triangulate(t),n=this.geometry.vertices;for(let t in this.geometry.vertices=[],this.geometry.vertexNormals=[],this.geometry.uvs=[],this.geometry.userVertexProperties)this.geometry.userVertexProperties[t].resetSrcArray();let s=[];for(let t=0,n=r.length;t<n;t+=this.tessyVertexSize){s.push(...r.slice(t+5,t+9)),this.geometry.vertexNormals.push(new u.M(...r.slice(t+9,t+12)));{let n=12;for(let i in this.geometry.userVertexProperties){let s=this.geometry.userVertexProperties[i],o=s.getDataSize(),a=t+n,u=a+o;s.setCurrentData(r.slice(a,u)),s.pushCurrentData(),n+=o}}this.geometry.vertices.push(new u.M(...r.slice(t,t+3))),this.geometry.uvs.push(...r.slice(t+3,t+5))}if(this.renderer.geometryBuilder){let t=new Map;this.geometry.edges=this.geometry.edges.map(r=>r.map(r=>{if(!t.has(r)){let i=n[r],s=this.geometry.vertices.findIndex(t=>i.x===t.x&&i.y===t.y&&i.z===t.z);if(-1===s){let t=1/0,r=0;for(let n=0;n<this.geometry.vertices.length;n++){let s=this.geometry.vertices[n],o=i.x-s.x,a=i.y-s.y,u=i.z-s.z,l=o*o+a*a+u*u;l<t&&(t=l,r=n)}s=r}t.set(r,s)}return t.get(r)}))}this.geometry.vertexColors=s}_initTessy(){let t=(t,r,n)=>{let i=Array(this.tessyVertexSize).fill(0);for(let t=0;t<n.length;t++)for(let s=0;s<i.length;s++)0!==n[t]&&r[t]&&(i[s]+=r[t][s]*n[t]);return i},r=new(a()).GluTesselator;return r.gluTessCallback(a().gluEnum.GLU_TESS_VERTEX_DATA,function(t,r){for(let n of t)r.push(n)}),r.gluTessCallback(a().gluEnum.GLU_TESS_BEGIN,function(t){t!==a().primitiveType.GL_TRIANGLES&&console.log(`expected TRIANGLES but got type: ${t}`)}),r.gluTessCallback(a().gluEnum.GLU_TESS_ERROR,function(t){console.log("error callback"),
56console.log(`error number: ${t}`)}),r.gluTessCallback(a().gluEnum.GLU_TESS_COMBINE,t),r.gluTessCallback(a().gluEnum.GLU_TESS_EDGE_FLAG,function(t){}),r.gluTessProperty(a().gluEnum.GLU_TESS_WINDING_RULE,a().windingRule.GLU_TESS_WINDING_NONZERO),r}_triangulate(t){let r=t[0]?t[0][2]:void 0,n=!0;for(let i of t)for(let t=0;t<i.length;t+=this.tessyVertexSize)if(i[t+2]!==r){n=!1;break}n?this._tessy.gluTessNormal(0,0,1):this._tessy.gluTessNormal(0,0,0);let i=[];for(let r of(this._tessy.gluTessBeginPolygon(i),t)){this._tessy.gluTessBeginContour();for(let t=0;t<r.length;t+=this.tessyVertexSize){let n=r.slice(t,t+this.tessyVertexSize);this._tessy.gluTessVertex(n,n)}this._tessy.gluTessEndContour()}return this._tessy.gluTessEndPolygon(),i}}},9605:function(t){"use strict";function r(t,r){return t.b===r.b&&t.a===r.a}function n(t,r){return t.b<r.b||t.b===r.b&&t.a<=r.a}function i(t,r,n){var i=r.b-t.b,s=n.b-r.b;return 0<i+s?i<s?r.a-t.a+i/(i+s)*(t.a-n.a):r.a-n.a+s/(i+s)*(n.a-t.a):0}function s(t,r,n){var i=r.b-t.b,s=n.b-r.b;return 0<i+s?(r.a-n.a)*i+(r.a-t.a)*s:0}function o(t,r){return t.a<r.a||t.a===r.a&&t.b<=r.b}function a(t,r,n){var i=r.a-t.a,s=n.a-r.a;return 0<i+s?i<s?r.b-t.b+i/(i+s)*(t.b-n.b):r.b-n.b+s/(i+s)*(n.b-t.b):0}function u(t,r,n){var i=r.a-t.a,s=n.a-r.a;return 0<i+s?(r.b-n.b)*i+(r.b-t.b)*s:0}function l(t,r,n,i){return(t=0>t?0:t)<=(n=0>n?0:n)?0===n?(r+i)/2:r+t/(t+n)*(i-r):i+n/(t+n)*(r-i)}function h(t){var r=g(t.b);return y(r,t.c),y(r.b,t.c),v(r,t.a),r}function c(t,r){var n=!1,i=!1;t!==r&&(r.a!==t.a&&(i=!0,x(r.a,t.a)),r.d!==t.d&&(n=!0,_(r.d,t.d)),m(r,t),i||(y(r,t.a),t.a.c=t),n||(v(r,t.d),t.d.a=t))}function d(t){var r=t.b,n=!1;t.d!==t.b.d&&(n=!0,_(t.d,t.b.d)),t.c===t?x(t.a,null):(t.b.d.a=J(t),t.a.c=t.c,m(t,J(t)),n||v(t,t.d)),r.c===r?(x(r.a,null),_(r.d,null)):(t.d.a=J(r),r.a.c=r.c,m(r,J(r))),b(t)}function p(t){var r=g(t),n=r.b;return m(r,t.e),r.a=t.b.a,y(n,r.a),r.d=n.d=t.d,r=r.b,m(t.b,J(t.b)),m(t.b,r),t.b.a=r.a,r.b.a.c=r.b,r.b.d=t.b.d,r.f=t.f,r.b.f=t.b.f,r}function f(t,r){var n=!1,i=g(t),s=i.b;return r.d!==t.d&&(n=!0,_(r.d,t.d)),m(i,t.e),m(s,r),i.a=t.b.a,s.a=r.a,i.d=s.d=t.d,t.d.a=s,n||v(i,t.d),i}function g(t){var r=new X,n=new X,i=t.b.h;return n.h=i,i.b.h=r,r.h=t,t.b.h=n,r.b=n,r.c=r,r.e=n,n.b=r,n.c=n,n.e=r}function m(t,r){var n=t.c,i=r.c;n.b.e=r,i.b.e=t,t.c=i,r.c=n}function y(t,r){var n=r.f,i=new Q(r,n);n.e=i,r.f=i,n=i.c=t;do n.a=i,n=n.c;while(n!==t)}function v(t,r){var n=r.d,i=new Y(r,n);n.b=i,r.d=i,i.a=t,i.c=r.c,n=t;do n.d=i,n=n.e;while(n!==t)}function b(t){var r=t.h;t=t.b.h,r.b.h=t,t.b.h=r}function x(t,r){var n=t.c,i=n;do i.a=r,i=i.c;while(i!==n);n=t.f,(i=t.e).f=n,n.e=i}function _(t,r){var n=t.a,i=n;do i.d=r,i=i.e;while(i!==n);n=t.d,(i=t.b).d=n,n.b=i}function D(t){var r=0;return Math.abs(t[1])>Math.abs(t[0])&&(r=1),Math.abs(t[2])>Math.abs(t[r])&&(r=2),r}var A,C=4*1e150;function E(t,r){t.f+=r.f,t.b.f+=r.b.f}function w(t,r,o){return(t=t.a,r=r.a,o=o.a,r.b.a===t)?o.b.a===t?n(r.a,o.a)?0>=s(o.b.a,r.a,o.a):0<=s(r.b.a,o.a,r.a):0>=s(o.b.a,t,o.a):o.b.a===t?0<=s(r.b.a,t,r.a):(r=i(r.b.a,t,r.a))>=(t=i(o.b.a,t,o.a))}function S(t){t.a.i=null;var r=t.e;r.a.c=r.c,r.c.a=r.a,t.e=null}function F(t,r){d(t.a),t.c=!1,t.a=r,r.i=t}function N(t){var r=t.a.a;do t=ec(t);while(t.a.a===r);return t.c&&(r=f(eh(t).a.b,t.a.e),F(t,r),t=ec(t)),t}function B(t,r,n){var i=new el;return i.a=n,i.e=V(t.f,r.e,i),n.i=i}function k(t,r){switch(t.s){case 100130:return 0!=(1&r);case 100131:return 0!==r;case 100132:return 0<r;case 100133:return 0>r;case 100134:return 2<=r||-2>=r}return!1}function M(t){var r=t.a,n=r.d;n.c=t.d,n.a=r,S(t)}function T(t,r,n){for(t=r,r=r.a;t!==n;){t.c=!1;var i=eh(t),s=i.a;if(s.a!==r.a){if(!i.c){M(t);break}F(i,s=f(r.c.b,s.b))}r.c!==s&&(c(J(s),s),c(r,s)),M(t),r=i.a,t=i}return r}function I(t,r,n,i,s,o){var a=!0;do B(t,r,n.b),n=n.c;while(n!==i);for(null===s&&(s=eh(r).a.b.c);(n=(i=eh(r)).a.b).a===s.a;)n.c!==s&&(c(J(n),n),c(J(s),n)),i.f=r.f-n.f,i.d=k(t,i.f),r.b=!0,!a&&R(t,r)&&(E(n,s),S(r),d(s)),a=!1,r=i,s=n;r.b=!0,o&&U(t,r)}function O(t,r,n,i,s){var o=[r.g[0],r.g[1],r.g[2]];r.d=null,r.d=t.o&&t.o(o,n,i,t.c)||null,null===r.d&&(s?t.n||(Z(t,100156),t.n=!0):r.d=n[0])}function L(t,r,n){var i=[null,null,null,null];i[0]=r.a.d,i[1]=n.a.d,O(t,r.a,i,[.5,.5,0,0],!1),c(r,n)}function P(t,r,n,i,s){var o=Math.abs(r.b-t.b)+Math.abs(r.a-t.a),a=Math.abs(n.b-t.b)+Math.abs(n.a-t.a),u=s+1;i[s]=.5*a/(o+a),i[u]=.5*o/(o+a),t.g[0]+=i[s]*r.g[0]+i[u]*n.g[0],t.g[1]+=i[s]*r.g[1]+i[u]*n.g[1],t.g[2]+=i[s]*r.g[2]+i[u]*n.g[2]}function R(t,i){var o=eh(i),a=i.a,u=o.a;if(n(a.a,u.a)){if(0<s(u.b.a,a.a,u.a))return!1;if(r(a.a,u.a)){if(a.a!==u.a){var o=t.e,l=a.a.h;if(0<=l){var o=o.b,h=o.d,d=o.e,f=o.c,g=f[l];h[g]=h[o.a],f[h[g]]=g,g<=--o.a&&(1>=g||n(d[h[g>>1]],d[h[g]])?ea(o,g):eu(o,g)),d[l]=null,f[l]=o.b,o.b=l}else for(o.c[-(l+1)]=null;0<o.a&&null===o.c[o.d[o.a-1]];)--o.a;L(t,J(u),a)}}else p(u.b),c(a,J(u)),i.b=o.b=!0}else{if(0>s(a.b.a,u.a,a.a))return!1;ec(i).b=i.b=!0,p(a.b),c(J(u),a)}return!0}function z(t,h){var d=eh(h),f=h.a,g=d.a,m=f.a,y=g.a,v=f.b.a,b=g.b.a,x=new Q;if(s(v,t.a,m),s(b,t.a,y),m===y||Math.min(m.a,v.a)>Math.max(y.a,b.a))return!1;if(n(m,y)){if(0<s(b,m,y))return!1}else if(0>s(v,y,m))return!1;var _,D,A=v,C=m,E=b,w=y;
vendor: 7,994 bytes, line 56
56if(n(A,C)||(_=A,A=C,C=_),n(E,w)||(_=E,E=w,w=_),n(A,E)||(_=A,A=E,E=_,_=C,C=w,w=_),n(E,C)?n(C,w)?(0>(_=i(A,E,C))+(D=i(E,C,w))&&(_=-_,D=-D),x.b=l(_,E.b,D,C.b)):(0>(_=s(A,E,C))+(D=-s(A,w,C))&&(_=-_,D=-D),x.b=l(_,E.b,D,w.b)):x.b=(E.b+C.b)/2,o(A,C)||(_=A,A=C,C=_),o(E,w)||(_=E,E=w,w=_),o(A,E)||(_=A,A=E,E=_,_=C,C=w,w=_),o(E,C)?o(C,w)?(0>(_=a(A,E,C))+(D=a(E,C,w))&&(_=-_,D=-D),x.a=l(_,E.a,D,C.a)):(0>(_=u(A,E,C))+(D=-u(A,w,C))&&(_=-_,D=-D),x.a=l(_,E.a,D,w.a)):x.a=(E.a+C.a)/2,n(x,t.a)&&(x.b=t.a.b,x.a=t.a.a),A=n(m,y)?m:y,n(A,x)&&(x.b=A.b,x.a=A.a),r(x,m)||r(x,y))return R(t,h),!1;if(!r(v,t.a)&&0<=s(v,t.a,x)||!r(b,t.a)&&0>=s(b,t.a,x)){if(b===t.a)return p(f.b),c(g.b,f),f=eh(h=N(h)).a,T(t,eh(h),d),I(t,h,J(f),f,f,!0),!0;if(v===t.a){p(g.b),c(f.e,J(g)),y=(m=d=h).a.b.a;do m=ec(m);while(m.a.b.a===y);return m=eh(h=m).a.b.c,d.a=J(g),g=T(t,d,null),I(t,h,g.c,f.b.c,m,!0),!0}return 0<=s(v,t.a,x)&&(ec(h).b=h.b=!0,p(f.b),f.a.b=t.a.b,f.a.a=t.a.a),0>=s(b,t.a,x)&&(h.b=d.b=!0,p(g.b),g.a.b=t.a.b,g.a.a=t.a.a),!1}return p(f.b),p(g.b),c(J(g),f),f.a.b=x.b,f.a.a=x.a,f.a.h=et(t.e,f.a),f=f.a,g=[0,0,0,0],x=[m.d,v.d,y.d,b.d],f.g[0]=f.g[1]=f.g[2]=0,P(f,m,v,g,0),P(f,y,b,g,2),O(t,f,x,g,!0),ec(h).b=h.b=d.b=!0,!1}function U(t,r){for(var i=eh(r);;){for(;i.b;)r=i,i=eh(i);if(!r.b&&(i=r,null===(r=ec(r))||!r.b))break;r.b=!1;var o,a=r.a,u=i.a;if(o=a.b.a!==u.b.a)t:{var l=eh(o=r),h=o.a,f=l.a,g=void 0;if(n(h.b.a,f.b.a)){if(0>s(h.b.a,f.b.a,h.a)){o=!1;break t}ec(o).b=o.b=!0,g=p(h),c(f.b,g),g.d.c=o.d}else{if(0<s(f.b.a,h.b.a,f.a)){o=!1;break t}o.b=l.b=!0,g=p(f),c(h.e,f.b),g.b.d.c=o.d}o=!0}if(o&&(i.c?(S(i),d(u),u=(i=eh(r)).a):r.c&&(S(r),d(a),a=(r=ec(i)).a)),a.a!==u.a){if(a.b.a===u.b.a||r.c||i.c||a.b.a!==t.a&&u.b.a!==t.a)R(t,r);else if(z(t,r))break}a.a===u.a&&a.b.a===u.b.a&&(E(u,a),S(r),d(a),r=ec(i))}}function $(t,r){var n=new el,i=h(t.b);i.a.b=C,i.a.a=r,i.b.a.b=-C,i.b.a.a=r,t.a=i.b.a,n.a=i,n.f=0,n.d=!1,n.c=!1,n.h=!0,n.b=!1,i=V(i=t.f,i.a,n),n.e=i}function j(t){this.a=new G,this.b=t,this.c=w}function V(t,r,n){do r=r.c;while(null!==r.b&&!t.c(t.b,r.b,n));return t=new G(n,r.a,r),r.a.c=t,r.a=t}function G(t,r,n){this.b=t||null,this.a=r||this,this.c=n||this}function q(){this.d=W,this.p=this.b=this.q=null,this.j=[0,0,0],this.s=100130,this.n=!1,this.o=this.a=this.e=this.f=null,this.m=!1,this.c=this.r=this.i=this.k=this.l=this.h=null}var W=0;function H(t,r){if(t.d!==r)for(;t.d!==r;)if(t.d<r)switch(t.d){case W:Z(t,100151),t.u(null);break;case 1:Z(t,100152),t.t()}else switch(t.d){case 2:Z(t,100154),t.v();break;case 1:Z(t,100153),t.w()}}function Z(t,r){t.p&&t.p(r,t.c)}function Y(t,r){this.b=t||this,this.d=r||this,this.a=null,this.c=!1}function X(){this.h=this,this.i=this.d=this.a=this.e=this.c=this.b=null,this.f=0}function J(t){return t.b.e}function K(){this.c=new Q,this.a=new Y,this.b=new X,this.d=new X,this.b.b=this.d,this.d.b=this.b}function Q(t,r){this.e=t||this,this.f=r||this,this.d=this.c=null,this.g=[0,0,0],this.h=this.a=this.b=0}function ee(){this.c=[],this.d=null,this.a=0,this.e=!1,this.b=new en}function et(t,r){if(t.e){var n,i=t.b,s=++i.a;return 2*s>i.f&&(i.f*=2,i.c=ei(i.c,i.f+1)),0===i.b?n=s:(n=i.b,i.b=i.c[i.b]),i.e[n]=r,i.c[n]=s,i.d[s]=n,i.h&&eu(i,s),n}return i=t.a++,t.c[i]=r,-(i+1)}function er(t){if(0===t.a)return eo(t.b);var r=t.c[t.d[t.a-1]];if(0!==t.b.a&&n(es(t.b),r))return eo(t.b);do--t.a;while(0<t.a&&null===t.c[t.d[t.a-1]]);return r}function en(){this.d=ei([0],33),this.e=[null,null],this.c=[0,0],this.a=0,this.f=32,this.b=0,this.h=!1,this.d[1]=1}function ei(t,r){for(var n=Array(r),i=0;i<t.length;i++)n[i]=t[i];for(;i<r;i++)n[i]=0;return n}function es(t){return t.e[t.d[1]]}function eo(t){var r=t.d,n=t.e,i=t.c,s=r[1],o=n[s];return 0<t.a&&(r[1]=r[t.a],i[r[1]]=1,n[s]=null,i[s]=t.b,t.b=s,0<--t.a&&ea(t,1)),o}function ea(t,r){for(var i=t.d,s=t.e,o=t.c,a=r,u=i[a];;){var l=a<<1;l<t.a&&n(s[i[l+1]],s[i[l]])&&(l+=1);var h=i[l];if(l>t.a||n(s[u],s[h])){i[a]=u,o[u]=a;break}i[a]=h,o[h]=a,a=l}}function eu(t,r){for(var i=t.d,s=t.e,o=t.c,a=r,u=i[a];;){var l=a>>1,h=i[l];if(0===l||n(s[h],s[u])){i[a]=u,o[u]=a;break}i[a]=h,o[h]=a,a=l}}function el(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function eh(t){return t.e.c.b}function ec(t){return t.e.a.b}(A=q.prototype).x=function(){H(this,W)},A.B=function(t,r){switch(t){case 100142:return;case 100140:switch(r){case 100130:case 100131:case 100132:case 100133:case 100134:this.s=r;return}break;case 100141:this.m=!!r;return;default:Z(this,100900);return}Z(this,100901)},A.y=function(t){switch(t){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:Z(this,100900)}return!1},A.A=function(t,r,n){this.j[0]=t,this.j[1]=r,this.j[2]=n},A.z=function(t,r){var n=r||null;switch(t){case 100100:case 100106:this.h=n;break;case 100104:case 100110:this.l=n;break;case 100101:case 100107:this.k=n;break;case 100102:case 100108:this.i=n;break;case 100103:case 100109:this.p=n;break;case 100105:case 100111:this.o=n;break;case 100112:this.r=n;break;default:Z(this,100900)}},A.C=function(t,r){var n=!1,i=[0,0,0];H(this,2);for(var s=0;3>s;++s){var o=t[s];-1e150>o&&(o=-1e150,n=!0),1e150<o&&(o=1e150,n=!0),i[s]=o}n&&Z(this,100155),null===(n=this.q)?c(n=h(this.b),n.b):(p(n),n=n.e),n.a.d=r,n.a.g[0]=i[0],n.a.g[1]=i[1],n.a.g[2]=i[2],n.f=1,n.b.f=-1,this.q=n},A.u=function(t){H(this,W),this.d=1,this.b=new K,this.c=t},A.t=function(){H(this,1),this.d=2,this.q=null},A.v=function(){H(this,2),this.d=1},A.w=function(){H(this,1),this.d=W;var t,i,o=this.j[0],a=this.j[1],u=this.j[2],l=!1,h=[o,a,u];if(0===o&&0===a&&0===u){for(var a=[-2*1e150,-2*1e150,-2*1e150],g=[2*1e150,2*1e150,2*1e150],u=[],y=[],l=this.b.c,o=l.e;o!==l;o=o.e)for(var v=0;3>v;++v){var _=o.g[v];_<g[v]&&(g[v]=_,y[v]=o),_>a[v]&&(a[v]=_,u[v]=o)}if(o=0,a[1]-g[1]>a[0]-g[0]&&(o=1),a[2]-g[2]>a[o]-g[o]&&(o=2),g[o]>=a[o])h[0]=0,h[1]=0,h[2]=1;else{for(a=0,g=y[o],u=u[o],y=[0,0,0],g=[g.g[0]-u.g[0],g.g[1]-u.g[1],g.g[2]-u.g[2]],v=[0,0,0],o=l.e;o!==l;o=o.e)v[0]=o.g[0]-u.g[0],v[1]=o.g[1]-u.g[1],v[2]=o.g[2]-u.g[2],y[0]=g[1]*v[2]-g[2]*v[1],y[1]=g[2]*v[0]-g[0]*v[2],y[2]=g[0]*v[1]-g[1]*v[0],(_=y[0]*y[0]+y[1]*y[1]+y[2]*y[2])>a&&(a=_,h[0]=y[0],h[1]=y[1],h[2]=y[2]);0>=a&&(h[0]=h[1]=h[2]=0,h[D(g)]=1)}l=!0}for(y=D(h),o=this.b.c,a=(y+1)%3,u=(y+2)%3,y=0<h[y]?1:-1,h=o.e;h!==o;h=h.e)h.b=h.g[a],h.a=y*h.g[u];if(l){for(h=0,o=(l=this.b.a).b;o!==l;o=o.b)if(!(0>=(a=o.a).f))do h+=(a.a.b-a.b.a.b)*(a.a.a+a.b.a.a),a=a.e;while(a!==o.a);if(0>h)for(l=(h=this.b.c).e;l!==h;l=l.e)l.a=-l.a}for(this.n=!1,o=(h=this.b.b).h;o!==h;o=l)l=o.h,a=o.e,r(o.a,o.b.a)&&o.e.e!==o&&(L(this,a,o),d(o),a=(o=a).e),a.e===o&&(a!==o&&((a===l||a===l.b)&&(l=l.h),d(a)),(o===l||o===l.b)&&(l=l.h),d(o));for(this.e=h=new ee,o=(l=this.b.c).e;o!==l;o=o.e)o.h=et(h,o);for(function(t){t.d=[];for(var r,i=0;i<t.a;i++)t.d[i]=i;t.d.sort((r=t.c,function(t,i){return n(r[t],r[i])?1:-1})),t.e=!0,function(t){for(var r=t.a;1<=r;--r)ea(t,r);t.h=!0}(t.b)}(h),this.f=new j(this),$(this,-C),$(this,C);null!==(h=er(this.e));){for(;;){t:if(0===(o=this.e).a)l=es(o.b);else if(l=o.c[o.d[o.a-1]],0!==o.b.a&&n(o=es(o.b),l)){l=o;break t}if(null===l||!r(l,h))break;l=er(this.e),L(this,h.c,l.c)}!function t(i,o){i.a=o;for(var a=o.c;null===a.i;)if((a=a.c)===o.c){var a=i,u=o,l=new el;l.a=u.c.b;var h=a.f,g=h.a;do g=g.a;while(null!==g.b&&!h.c(h.b,l,g.b));var h=g.b,m=eh(h),l=h.a,g=m.a;if(0===s(l.b.a,u,l.a))r((l=h.a).a,u)||r(l.b.a,u)||(p(l.b),h.c&&(d(l.c),h.c=!1),c(u.c,l),t(a,u));else{var y=n(g.b.a,l.b.a)?h:m,m=void 0;h.d||y.c?(m=y===h?f(u.c.b,l.e):f(g.b.c.b,u.c).b,y.c?F(y,m):(l=a,(h=B(a,h,m)).f=ec(h).f+h.a.f,h.d=k(l,h.f)),t(a,u)):I(a,h,u.c,u.c,null,!0)}return}if(h=(l=eh(a=N(a.i))).a,(l=T(i,l,null)).c===h){var h=l,l=h.c,g=eh(a),m=a.a,y=g.a,v=!1;m.b.a!==y.b.a&&z(i,a),r(m.a,i.a)&&(c(J(l),m),l=eh(a=N(a)).a,T(i,eh(a),g),v=!0),r(y.a,i.a)&&(c(h,J(y)),h=T(i,g,null),v=!0),v?I(i,a,h.c,l,l,!0):(u=n(y.a,m.a)?J(y):m,I(i,a,u=f(h.c.b,u),u.c,u.c,!1),u.b.i.c=!0,U(i,a))}else I(i,a,l.c,h,h,!0)}(this,h)}for(h=0,this.a=this.f.a.a.b.a.a;null!==(l=this.f.a.a.b);)l.h||++h,S(l);for(this.f=null,(h=this.e).b=null,h.d=null,this.e=h.c=null,o=(h=this.b).a.b;o!==h.a;
56o=l)l=o.b,(o=o.a).e.e===o&&(E(o.c,o),d(o));if(!this.n){if(h=this.b,this.m)for(o=h.b.h;o!==h.b;o=l)l=o.h,o.b.d.c!==o.d.c?o.f=o.d.c?1:-1:d(o);else for(o=h.a.b;o!==h.a;o=l)if(l=o.b,o.c){for(o=o.a;n(o.b.a,o.a);o=o.c.b);for(;n(o.a,o.b.a);o=o.e);for(a=o.c.b,u=void 0;o.e!==a;)if(n(o.b.a,a.a)){for(;a.e!==o&&(n((t=a.e).b.a,t.a)||0>=s(a.a,a.b.a,a.e.b.a));)a=(u=f(a.e,a)).b;a=a.c.b}else{for(;a.e!==o&&(n((i=o.c.b).a,i.b.a)||0<=s(o.b.a,o.a,o.c.b.a));)o=(u=f(o,o.c.b)).b;o=o.e}for(;a.e.e!==o;)a=(u=f(a.e,a)).b}if(this.h||this.i||this.k||this.l)if(this.m){for(l=(h=this.b).a.b;l!==h.a;l=l.b)if(l.c){this.h&&this.h(2,this.c),o=l.a;do this.k&&this.k(o.a.d,this.c),o=o.e;while(o!==l.a);this.i&&this.i(this.c)}}else{for(h=this.b,l=!!this.l,o=!1,a=-1,u=h.a.d;u!==h.a;u=u.d)if(u.c){o||(this.h&&this.h(4,this.c),o=!0),y=u.a;do l&&a!==(g=+!y.b.d.c)&&(a=g,this.l&&this.l(!!a,this.c)),this.k&&this.k(y.a.d,this.c),y=y.e;while(y!==u.a)}o&&this.i&&this.i(this.c)}if(this.r){for(o=(h=this.b).a.b;o!==h.a;o=l)if(l=o.b,!o.c){u=(a=o.a).e,y=void 0;do u=(y=u).e,y.d=null,null===y.b.d&&(y.c===y?x(y.a,null):(y.a.c=y.c,m(y,J(y))),(g=y.b).c===g?x(g.a,null):(g.a.c=g.c,m(g,J(g))),b(y));while(y!==a);a=o.d,(o=o.b).d=a,a.b=o}this.r(this.b),this.c=this.b=null;return}}this.b=this.c=null},this.libtess={GluTesselator:q,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}},q.prototype.gluDeleteTess=q.prototype.x,q.prototype.gluTessProperty=q.prototype.B,q.prototype.gluGetTessProperty=q.prototype.y,q.prototype.gluTessNormal=q.prototype.A,q.prototype.gluTessCallback=q.prototype.z,q.prototype.gluTessVertex=q.prototype.C,q.prototype.gluTessBeginPolygon=q.prototype.u,q.prototype.gluTessBeginContour=q.prototype.t,q.prototype.gluTessEndContour=q.prototype.v,q.prototype.gluTessEndPolygon=q.prototype.w,t.exports=this.libtess},9633:(t,r,n)=>{var i=n(6077).x,s=n(8391),o=/(\r?\n)/,a="$$$isSourceNode$$$";function u(t,r,n,i,s){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==r?null:r,this.source=null==n?null:n,this.name=null==s?null:s,this[a]=!0,null!=i&&this.add(i)}u.fromStringWithSourceMap=function(t,r,n){var i=new u,a=t.split(o),l=0,h=function(){return t()+(t()||"");function t(){return l<a.length?a[l++]:void 0}},c=1,d=0,p=null;return r.eachMapping(function(t){if(null!==p)if(c<t.generatedLine)f(p,h()),c++,d=0;else{var r=a[l]||"",n=r.substr(0,t.generatedColumn-d);a[l]=r.substr(t.generatedColumn-d),d=t.generatedColumn,f(p,n),p=t;return}for(;c<t.generatedLine;)i.add(h()),c++;if(d<t.generatedColumn){var r=a[l]||"";i.add(r.substr(0,t.generatedColumn)),a[l]=r.substr(t.generatedColumn),d=t.generatedColumn}p=t},this),l<a.length&&(p&&f(p,h()),i.add(a.splice(l).join(""))),r.sources.forEach(function(t){var o=r.sourceContentFor(t);null!=o&&(null!=n&&(t=s.join(n,t)),i.setSourceContent(t,o))}),i;function f(t,r){if(null===t||void 0===t.source)i.add(r);else{var o=n?s.join(n,t.source):t.source;i.add(new u(t.originalLine,t.originalColumn,o,r,t.name))}}},u.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(t){this.add(t)},this);else if(t[a]||"string"==typeof t)t&&this.children.push(t);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},u.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[a]||"string"==typeof t)this.children.unshift(t);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},u.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)(r=this.children[n])[a]?r.walk(t):""!==r&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},u.prototype.join=function(t){var r,n,i=this.children.length;if(i>0){for(n=0,r=[];n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this},u.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];
56return n[a]?n.replaceRight(t,r):"string"==typeof n?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},u.prototype.setSourceContent=function(t,r){this.sourceContents[s.toSetString(t)]=r},u.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][a]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(s.fromSetString(i[r]),this.sourceContents[i[r]])},u.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t},u.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new i(t),s=!1,o=null,a=null,u=null,l=null;return this.walk(function(t,i){r.code+=t,null!==i.source&&null!==i.line&&null!==i.column?((o!==i.source||a!==i.line||u!==i.column||l!==i.name)&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:r.line,column:r.column},name:i.name}),o=i.source,a=i.line,u=i.column,l=i.name,s=!0):s&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,s=!1);for(var h=0,c=t.length;h<c;h++)10===t.charCodeAt(h)?(r.line++,r.column=0,h+1===c?(o=null,s=!1):s&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:r.line,column:r.column},name:i.name})):r.column++}),this.walkSourceContents(function(t,r){n.setSourceContent(t,r)}),{code:r.code,map:n}},r.SourceNode=u},9742:(t,r,n)=>{"use strict";n.d(r,{A:()=>s});var i=n(4576);function s(t,r){t.Matrix=i.uq}n(5056),n(5311),n(9855),"undefined"!=typeof p5&&s(p5,p5.prototype)},9821:(t,r,n)=>{"use strict";n.d(r,{A:()=>u});var i=n(7280),s=n(1925),o=n(4590),a=n(817);class u extends i.A{constructor(t){t.coords||(t.coords={r:{range:[0,1],name:"Red"},g:{range:[0,1],name:"Green"},b:{range:[0,1],name:"Blue"}}),t.base||(t.base=a.A),t.toXYZ_M&&t.fromXYZ_M&&(t.toBase??=r=>{let n=(0,s.A)(t.toXYZ_M,r);return this.white!==this.base.white&&(n=(0,o.Ay)(this.white,this.base.white,n)),n},t.fromBase??=r=>(r=(0,o.Ay)(this.base.white,this.white,r),(0,s.A)(t.fromXYZ_M,r))),t.referred??="display",super(t)}}},9829:(t,r,n)=>{"use strict";n.d(r,{A:()=>o,k:()=>s});var i=n(5056);n(5311);class s{constructor(t,r,n,s){this.w=t,this.vec=new i.M(r,n,s)}static fromAxisAngle(t,r,n,o){let a=Math.cos(t/2),u=new i.M(r,n,o).normalize().mult(Math.sin(t/2));return new s(a,u.x,u.y,u.z)}conjugate(){return new s(this.w,-this.vec.x,-this.vec.y,-this.vec.z)}multiply(t){return new s(this.w*t.w-this.vec.x*t.vec.x-this.vec.y*t.vec.y-this.vec.z-t.vec.z,this.w*t.vec.x+this.vec.x*t.w+this.vec.y*t.vec.z-this.vec.z*t.vec.y,this.w*t.vec.y-this.vec.x*t.vec.z+this.vec.y*t.w+this.vec.z*t.vec.x,this.w*t.vec.z+this.vec.x*t.vec.y-this.vec.y*t.vec.x+this.vec.z*t.w)}rotateVector(t){return i.M.mult(t,this.w*this.w-this.vec.dot(this.vec)).add(i.M.mult(this.vec,2*t.dot(this.vec))).add(i.M.mult(this.vec,2*this.w).cross(t)).clampToZero()}rotateBy(t){return t.multiply(this).multiply(t.conjugate()).vec.clampToZero()}}function o(t,r){t.Quat=s}"undefined"!=typeof p5&&o(p5,p5.prototype)},9855:(t,r,n)=>{"use strict";n.d(r,{zE:()=>i});"undefined"!=typeof Float32Array&&Float32Array;class i{#F=null;constructor(...t){if(this.constructor===i)throw Error("Class is of abstract type and can't be instantiated");["add","setElement","reset","set","get","copy","clone","diagonal","row","column","transpose","mult","multiplyVec","invert","createSubMatrix3x3","inverseTranspose4x4","apply","scale","rotate4x4","translate","rotateX","rotateY","rotateZ","perspective","ortho","multiplyVec4","multiplyPoint","multiplyAndNormalizePoint","multiplyDirection","multiplyVec3"].forEach(t=>{if(void 0===this[t])throw Error(`${t}() method must be implemented`)})}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.