0x5b01ad62…e13fsent to0xbb5471c2…a250·#16,088,763·view on Etherscan
(()=>{"use strict";const t=new class{constructor(){this.useA=!1;let t=function(t){let e=parseInt(t.substr(0,8),16),n=parseInt(t.substr(8,8),16),r=parseInt(t.substr(16,8),16),o=parseInt(t.substr(24,8),16);return function(){e|=0,n|=0,r|=0,o|=0;let t=(e+n|0)+o|0;return o=o+1|0,e=n^n>>>9,n=r+(r<<3)|0,r=r<<21|r>>>11,r=r+t|0,(t>>>0)/4294967296}};this.prngA=new t(tokenData.hash.substr(2,32)),this.prngB=new t(tokenData.hash.substr(34,32));for(let t=0;t<1e6;t+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}};function e(){return t.random_dec()}function n(t,n){return t+e()*(n-t)}function r(t){return t[Math.floor(e()*t.length)]}function o(t){let n=0;const r=e(),o=t.reduce(((t,[e,n])=>t+n),0);return(t.map((([t,e])=>(n+=1*e/o??1,[t,e,n]))).find((([t,e,n])=>r<n))??t[t.length-1])[0]}function a(t){for(let n=t.length-1;n>0;n--){const r=Math.floor(e()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}let l,i=!1;const s=(t,n)=>{var r,o,a,s;if(i)r=l,i=!1;else{do{s=(o=e()-1)*o+(a=e()-1)*a}while(s>=1);r=o*(s=Math.sqrt(-2*Math.log(s)/s)),l=a*s,i=!0}return r*(n||1)+(t||0)};function c(t,e=0,n=0){return{tG:t.tG.map((([t,r])=>[t+e,r+n]))}}function d(t){t.tG=t.tG.map((([t,e])=>[t,1-e])).reverse()}function u(t,e,n,r){return t.map((t=>({...t,...r,layerHeight:t.noLayerHeight?void 0:1,tG:t.tG.map((([t,e])=>({y:n?1-t:t,x:e}))),isInverted:e})))}const h=[[-.12,.1],[-.06,.2],[0,.4],[.06,.2],[.12,.1]],f=[[-.15,.1],[-.075,.2],[0,.4],[.075,.2],[.15,.1]],g=[[-.225,.2],[-.15,.2],[-.075,.2],[0,.2],[.075,.2]],m=[[-.2,.2],[-.1,.2],[0,.2],[.1,.2],[.2,.2]],y=[[-.18,.2],[-.12,.2],[-.06,.2],[0,.2],[.06,.2]],p=[[-.12,.2],[-.06,.2],[0,.2],[.06,.2],[.12,.2]],M=[[-.24,.2],[-.18,.2],[-.12,.15],[-.06,.15],[0,.15],[.06,.1],[.12,.05]],G=[[-.15,.2],[-.075,.2],[0,.2],[.075,.2],[.15,.2]],x=[[-.12,.1],[-.06,.2],[0,.4],[.06,.2],[.12,.1]],b=[[-.12,.2],[-.09,.2],[-.06,.2],[-.03,.2],[0,.2]],D=[[0,.25],[.05,.25],[.1,.25],[.15,.25]],w=[[{code:"A",getLayers:(t,e,n,r,o,a)=>{const l={td:20,tm:.02,dd:100,dm:.0075};let i=!1,s=!1;e()>=.65&&(e()<.5?i=!0:s=!0);const g=r(h),m=r(h),y=r(f),p=r(f);let M=.75;!i&&s&&(M=.4),i&&s&&(M=.6),M+=g+m,t&&(M=1-M);let G=[{tG:[[.025,-.15],[.1,0],[.15,.1],[.5,.9],[.55,.95],[.6,1],[.65,1.15]]},{tG:[[-.2,-.15],[-.12,0],[0,.1],[.2,.4],[.35,.6],[.5,1],[.525,1.15]]},{tG:[[-.2,-.1],[-.12,.5],[0,.6],[.2,.75],[.3,1],[.35,1.15]]}].map((t=>c(t,g,y)));i&&G.forEach(d);let x=[{tG:[[1.15,-.15],[1.07,0],[1,.15],[.8,.3],[.75,.55],[.7,.6],[.6,.8],[.6,1],[.65,1.15]]},{tG:[[1.2,-.15],[1.12,0],[1,.2],[.85,.3],[.75,.6],[.7,1],[.7,1.15]]},t?void 0:{tG:[[1.2,-.1],[1.12,.05],[1,.25],[.9,.3],[.8,.6],[.85,1],[.875,1.15]]}].filter(Boolean).map((t=>c(t,m,p)));return s&&x.forEach(d),{layers:u(G,!t,t,l).concat(u(x,t,t,l)),sunX:M}}},.24],[{code:"B",getLayers:(t,e,n,r,o,a)=>{const l=e()>=.5,i=r(g),s=r(m);let h=1.5+i;t&&(h=1-h);const f=[{tG:[[1.15,-.2],[.95,0],[.65,.25],[.55,.45],[.6,.7],[.85,1],[1.1,1.2]]},{tG:[[1.05,-.2],[.75,0],[.375,.35],[.425,.75],[.7,1],[.95,1.2]]},{tG:[[.75,-.2],[.55,0],[.425,.15],[.25,.55],[.275,.7],[.55,1],[.85,1.2]]},{tG:[[.175,-.2],[.2,0],[.1,.15],[.35,.75],[.2,1],[.1875,1.05],[.225,1.2]]}].map((t=>c(t,i,s)));return l&&f.forEach(d),{layers:u(f,!t,t,{td:20,tm:.02,dd:100,dm:.0075}),sunX:h}}},.12],[{code:"C",getLayers:(t,e,n,r,o,a)=>{const l={td:20,tm:.02,dd:100,dm:.0075},i=e()>=.6,s=e()>=.6,h=r(y),f=r(p);let g=1.2;s&&(g=.7),g+=h+f,t&&(g=1-g);const m=[.35,.45];let M=[{tG:[[.675,0],[.725,.2],[.55,.35],[...m]],noLayerHeight:!0},{tG:[[.6,0],[.5,.1],[...m],[.4,.5],[.4,.55],[.35,.675],[.6,1]]},{tG:[[.5,0],[.225,.5],[.275,.65],[.5,1]]},{tG:[[-.18,.675],[0,.75],[.15,.8],[.35,1]]}].map((t=>c(t,h)));i&&M.forEach(d);let G=[{tG:[[1.12,.5],[1,.6],[.85,.7],[.7,1]]},{tG:[[1.12,.7],[1,.8],[.85,.925],[.8,1]]}].map((t=>c(t,f)));return s&&G.forEach(d),{layers:u(M,!t,t,l).concat(u(G,t,t,l)),sunX:g}}},.2],[{code:"D",getLayers:(t,e,n,r,o,a)=>{const l=e()>=.6,i=r(M),s=r(G);let h=2+i;t&&(h=1-h);const f=[.62,.45],g=[.93,1.05],m=[{tG:[[.5,-.15],[.45,0],[.4,.1],[...f],[.9,.7],[.99,.85],[.95,1],[...g],[.95,1.15]],noLayerHeight:!0},{tG:[[.9,-.15],[.8,0],[...f],[.4,1],[.3,1.15]]},{tG:[[.2,-.15],[.25,0],[.35,.5],[.9,1],[...g],[1.05,1.15]]},{tG:[[0,-.15],[.1,0],[.25,.65],[.6,1],[.75,1.15]]}].map((t=>c(t,i,s)));return l&&m.forEach(d),{layers:u(m,!t,t,{td:20,tm:.02,dd:100,dm:.0075}),sunX:h}}},.12],[{code:"E",getLayers:(t,e,n,r,o,a)=>{const l={td:20,tm:.02,dd:100,dm:.0075},i=e()>=.7,s=!!i&&e()>=.7,h=r(x),f=r(x);let g=.7;i&&s&&(g=.3),i&&!s&&(g=.5),g+=h+f,t&&(g=1-g);let m=[{tG:[[.55,0],[.55,.1],[.3,.3],[.3,.4],[0,.65],[-.12,.7]]},{tG:[[.25,0],[.35,.15],[.3,.3],[0,.5],[-.12,.575]]}].map((t=>c(t,h)));i&&m.forEach(d);let y=[{tG:[[1.12,.425],[1,.5],[.63,.7],[.35,1],[.3,1.12]]},{tG:[[1.12,.65],[1,.7],[.75,.8],[.65,1],[.61,1.12]]},{tG:[[1.12,.5],[1,.55],[.8875,.65],[.8,1],[.775,1.12]]}].map((t=>c(t,f)));return s&&y.forEach(d),{layers:u(m,!t,t,l).concat(u(y,t,t,l)),sunX:g}}},.14],[{code:"F",getLayers:(t,e,n,r,o,a)=>{const l={td:30,tm:.04,dd:150,dm:.002},i=r(b),s=-1*r(b);let d=.25;function h(t,n,r,o){let a=0,l=.03,i=r+l;for(;!(Math.abs(i-r)>.05&&(null==o||Math.abs(o-i)>.05))&&a++<100;){const a=t+(n/2+e()*(n/2)),s=Math.min(Math.abs(a-r),null==o?Number.MAX_SAFE_INTEGER:Math.abs(o-a));s>l&&(l=s,i=a)}return i}function f(t){const n=.4+.4*e(),r=t[1][0],o=t[2][0]-t[1][0],a=n-(.05+.1*e()),l=n+(.05+.1*e()),i=e();let s;s=i<.3?-.15:i<.5?.05:i<.7?.125:.25;const c=h(r+o*a,s,t[1][0]),d=h(r+o*a,s,c,t[2][0]);return[t[0],t[1],[c,a],[d,l],t[2],t[3]]}d+=i+s,t&&(d=1-d);const g=[c({tG:f([[.15,-.15],[.2,0],[.65,1],[.75,1.15]])},i,r(D)),c({tG:f([[.2,-.15],[.1,0],[.55,1],[.6,1.15]])},i,r(D))],m=[c({tG:f([[.3,-.15],[.35,0],[.75,1],[.8,1.15]])},s,r(D)),c({tG:f([[.475,-.15],[.5,0],[.9,1],[.95,1.15]])},s,r(D))];return{layers:u(g,!t,t,l).concat(u(m,t,t,l)),sunX:d}}},.18]],v={name:"Grainy",xDis:4,yDis:1,xDen:750,yDen:320,eYDis:0,aDRP:1,xDisp:(t,n)=>n?0:-1*r([128,128,64,32,16,4,2,1,1,0,0,-1,-1])*Math.sin(50*e()/25)*t/2e3};let k,B;function I(t,e,r,o,a){if(!o)return 0;null==k&&(k=function(){const t=Math.PI/2,e=()=>n(.06,.18),r=e(),o=[[-1*t,r],[t,r]];let a=-1*t+r;for(;a<-1*t+1.5;){const t=e();a+=t,o.unshift([a,t]),a+=t}for(a=t-r;a>1*t-1.5;){const t=e();a-=t,o.push([a,t]),a-=t}return o}()),null==B&&(B=n(.15,.2));const l=Math.atan((t-r.center.x*P)/(e-r.center.y*N));for(const t of k)if(l>t[0]-t[1]&&l<t[0]+t[1])return Math.max(0,Math.min(1,1-a(Math.abs(l-t[0])/t[1],B)));return 0}const{code:L,primary:E,secondary:A}=r([{code:"A",primary:{c:[177,90,10],bg:[186,100,16,.5],fg:[[360,100,83],[48,87,53],[31,93,50],[270,100,66]]},secondary:{c:[177,90,10],bg:[186,100,16,.5],fg:[[360,71,95],[48,93,93],[31,44,89],[270,13,89]]}},{code:"B",primary:{c:[190,100,12],bg:[192,95,17,.5],fg:[[43,100,71],[148,83,60],[163,57,56]]},secondary:{c:[190,100,12],bg:[192,95,17,.5],fg:[[43,70,96],[148,54,95],[163,100,98]]}},{code:"C",primary:{c:[196,100,10],bg:[198,95,16,.5],fg:[[39,92,46],[330,50,66],[337,68,51]]},secondary:{c:[196,100,10],bg:[198,95,16,.5],fg:[[39,70,96],[330,38,88],[337,100,96]]}},{code:"D",primary:{c:[207,82,22],bg:[207,58,30,.5],fg:[[328,67,75],[41,83,52],[335,76,58],[266,35,52],[172,83,65]]},secondary:{c:[207,82,22],bg:[207,58,30,.5],fg:[[328,73,97],[41,63,92],[335,47,94],[266,4,87],[172,29,90]]}},{code:"E",primary:{c:[210,91,26],bg:[202,86,31,.5],fg:[[360,100,66],[306,82,66],[31,96,62],[254,88,73]]},secondary:{c:[210,91,26],bg:[202,86,31,.5],fg:[[360,65,89],[306,49,92],[31,54,91],[254,100,98]]}},{code:"F",primary:{c:[212,55,14],bg:[212,54,22,.5],fg:[[33,98,52],[46,99,51],[192,68,46],[196,75,79]]},secondary:{c:[212,55,14],bg:[212,54,22,.5],fg:[[33,94,90],[46,78,94],[192,17,94],[196,44,97]]}},{code:"G",primary:{c:[219,36,17],bg:[219,34,23,.5],fg:[[2,84,69],[312,56,54],[282,80,80],[236,100,65]]},secondary:{c:[219,36,17],bg:[219,34,23,.5],fg:[[2,67,90],[312,100,94],[282,100,97],[236,100,96]]}},{code:"H",primary:{c:[232,100,54],bg:[220,100,54,.5],fg:[[342,95,85],[28,100,68],[301,82,71],[191,90,76]]},secondary:{c:[232,100,54],bg:[220,100,54,.5],fg:[[342,100,99],[28,100,94],[301,25,92],[191,85,96]]}},{code:"I",primary:{c:[262,36,18],bg:[261,32,28,.5],fg:[[334,97,87],[38,89,55],[264,43,54],[203,90,76]]},secondary:{c:[262,36,18],bg:[261,32,28,.5],fg:[[334,97,93],[38,99,95],[264,59,96],[203,100,98]]}}]),S=o([["Layered",.85],["Gradient",.15]]);let R=e(),H="None";R>=.66&&(H="Moderate"),R>=.76&&(H="Severe"),R>=.86&&(H="Total");const C=16/9,X=C,P=1.8838383838383836,N=1,T=.06,z=.1714,_=v,F=o(w),Y=e()>=.5,{layers:j,sunX:U}=F.getLayers(Y,e,r,o,s,n),W={None:0,Moderate:.25,Severe:.5,Total:1}[H],q=function(t,e){var n;return{center:{x:-.2,y:t+=(n=e(0,.025),-.05,.05,Math.min(.05,Math.max(-.05,n)))}}}(U,s);let O=parseInt(new URLSearchParams(window.location.search).get("size")??0,10)||Math.min(window.innerHeight/C,window.innerWidth);const $=()=>O;function J(t,e){if(t<0||t>P||e<0||e>N)return!0}const K=()=>{const t={td:1,tm:0,dd:1,dm:0,layerHeight:.7,isBackground:!0};return[{tG:[{x:0,y:0},{x:1,y:0}],...t},{tG:[{x:0,y:0},{x:1,y:0}],...t,isInverted:!0}]};parseInt(new URLSearchParams(window.location.search).get("size")??0,10),new p5((t=>{let o,l,i,c,d,u,h,f,g;const m=[];let y,p;function M(){o=!0,l=1,i=!1,c=!0,t.frameRate(60)}function G(t){const n=e()<.5;if(1===t.fg.length)return null==t.l?[t.fg[0],t.fg[0]]:n?[t.fg[0],t.l]:[t.l,t.fg[0]];let o,a;for(;!o||!a;)o=r(t.fg),a=r(t.fg.filter((t=>t.join(",")!==o.join(","))).filter((t=>(n?t[0]-o[0]:o[0]-t[0])<180)));return[n?o:a,n?a:o]}function x(t,e,n){let[r,o,a,l]=t,[i,s,c,d]=e;Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const u=[(r+n*(i-r))%360,o+n*(s-o),a+n*(c-a)];return null==l&&null==d||u.push((l??1)+n*((d??1)-(l??1))),u}function b(t,e,n){if(e.noStroke(),!n&&!o&&!i)return void e.noLoop();if(n||e.loop(),!n&&i){if(d<0)return void(-30===d?(c=!0,d=0):d--);if(d>u-1)return void(d===u-1+30?(c=!1,d=u-1):d++)}let r,a,s,g;(n||o&&1===l)&&e.background(...E.c);for(let u=0;u<f[0].length;u++)for(let m=0;m<f.length;m++)if(n||o&&f[m][u]===l-1||i&&h[m][u]===d){r=Math.round((T+1.6577777777777776*m/(P/z))*t()),s=Math.round((T+.88*u/(N/z))*t()),a=Math.round((T+1.6577777777777776*(m+1)/(P/z))*t()),g=Math.round((T+.88*(u+1)/(N/z))*t());const l=n&&h[m][u]<d||o&&h[m][u]<d||i&&h[m][u]===d&&c;e.fill(...l?A.c:E.c),e.rectMode(e.CORNERS),e.rect(s,r,g,a)}for(const l of m)for(const u of l.columnLayers)for(let f=0;f<u.length;f++)for(let m=0;m<u[f].length;m++){if(null==u[f][m])continue;const{x:M,y:G,isInSun:b,resolutionThreshold:D}=u[f][m],w=1e3/e.pixelDensity();if(t()<w&&D>Math.max(100,t())/w)continue;const v=Math.floor(M/z),k=Math.floor(G/z),B=(T+1.6577777777777776/P*M)*t(),I=(T+.88/N*G)*t();if(!n&&(o||i)&&(B<r||B>a||I<s||I>g))continue;const L=n&&h[v][k]<d||o&&h[v][k]<d||i&&c;let R=l.isBackground?1:((u[f].length-m)/u[f].length)**_.aDRP;if(b&&(R*=1-b),R>.001){let n;if("Layered"===S)n=e.color(...L?l.alternateColor:l.color);else if("Gradient"===S){const t=L?p:y;n=l.isBackground?e.color(...L?A.bg:E.bg):x(t[0],t[1],M/P)}e.fill(e.hue(n),e.saturation(n),e.lightness(n),e.alpha(n)*R),e.ellipse(I,B,.001*t())}}if(!n){if(o){if(l===u)return e.noLoop(),o=!1,!0;l++}i&&(d+=c?1:-1)}}t.setup=()=>{!function(){g=[...K(),...j];for(let t=0;t<g.length;t++){const o=g[t],a={template:[],detail:[],columnLayers:[],height:o.layerHeight??0,isBackground:o.isBackground,isInverted:o.isInverted,color:o.isBackground?E.bg:r(E.fg),alternateColor:o.isBackground?A.bg:r(A.fg)},l=P/o.td;a.template=new Array(o.td+1).fill(void 0);for(const{x:t,y:e}of o.tG)a.template[Math.round(t*o.td)]={x:Math.round(t*o.td)/o.td*P,y:e,isGuideline:!0};for(let t=0;t<a.template.length;t++){const e=t*l;if(null==a.template[t]){const r=o.tG.findIndex((e=>e.x>t/o.td))-1,l=o.tG[r];if(null==l)continue;const i=o.tG[r+1];if(null==i)continue;const s=l.y+(i.y-l.y)*(e-l.x*P)/(i.x*P-l.x*P);let c;for(;;){if(o.isBackground){c=s;break}if(c=s+n(-o.tm,o.tm),l.y===i.y)break;if(!(c>=Math.max(l.y,i.y)||c<=Math.min(l.y,i.y)))break}a.template[t]={x:e,y:c}}}a.template=a.template.filter(Boolean);let i,c=a.template[0].y;for(let t=1;t<a.template.length;t++){i=a.template[t].y;const e=a.template[t].x,r=Math.round(o.dd/o.td),s=l/r;for(let l=0;l<r;l++){const r=a.template[t-1].x+l*s;a.detail.push({x:r,y:c});const d=s*(i-c)/(e-r);c+=n(d-o.dm,d+o.dm)}}a.detail.push({x:a.template[a.template.length-1].x,y:c});for(let r=0;r<3;r++){const r=[],l=Math.min(...a.detail.map((t=>t.y))),i=Math.max(...a.detail.map((t=>t.y))),c=!a.isInverted||a.isBackground?Math.min(i+a.height,N):Math.max(l-a.height,0),d=1/_.xDen,u=Math.round(a.detail[0].x*_.xDen/P),h=Math.round(a.detail[a.detail.length-1].x*_.xDen/P)-u;for(let l=0;l<h;l++){const i=(u+l)*d*P,f=(a.detail.length-1)*l/(h-1)%1,g=Math.floor((a.detail.length-1)*l/(h-1)),m=Math.ceil((a.detail.length-1)*l/(h-1));let y,p;a.isBackground?a.isInverted?(y=1-a.height+n(-.3,.3),p=1):(y=0,p=a.height+n(-.3,.3)):(y=a.detail[g].y+f*(a.detail[m].y-a.detail[g].y),p=a.isInverted?c-(1-c)*e():c+(1-c)*e());const M=!a.isInverted||a.isBackground?Math.round(_.yDen*(p-y))*1.25**t:Math.round(_.yDen*(y-p))*1.25**t,G=!a.isInverted||a.isBackground?1/(M-1)*(p-y):1/(M-1)*(y-p);y+=n(-_.eYDis*G,_.eYDis*G);const x=[];for(let t=0;t<M;t++){const r=!a.isInverted||a.isBackground?y+t*G+G*n(-_.yDis/2,_.yDis/2):y-t*G+G*n(-_.yDis/2,_.yDis/2),l=i+(d/2+d*n(.5*-_.xDis,.5*_.xDis)+_.xDisp(t,a.isBackground))*P;x.push(J(l,r)?void 0:{x:l,y:r,isInSun:I(l,r,q,o.isBackground,s),resolutionThreshold:e()})}r.push(x)}a.columnLayers.push(r)}m.push(a)}}(),y=G(E),p=a(G(A)),h=new Array(Math.ceil(P/z)).fill(0).map((t=>new Array(Math.ceil(N/z)).fill(0))),u=h.flat().length;const o=a(new Array(u).fill(0).map(((t,e)=>e)));for(let t=0;t<h.length;t++)for(let e=0;e<h[t].length;e++)h[t][e]=o[t*h[t].length+e];f=new Array(Math.ceil(P/z)).fill(0).map((t=>new Array(Math.ceil(N/z)).fill(0)));const l=a(new Array(u).fill(0).map(((t,e)=>e)));for(let t=0;t<f.length;t++)for(let e=0;e<f[t].length;e++)f[t][e]=l[t*f[t].length+e];M(),d=Math.floor(W*u),t.randomSeed(1e3*e()),t.noiseSeed(1e3*e()),t.noiseDetail(2),t.createCanvas(Math.round(1*$()),Math.round(X*$())),t.colorMode(t.HSL),t.angleMode(t.DEGREES),t.frameRate(60)},t.draw=()=>{b($,t)},t.windowResized=()=>{var e;[/HeadlessChrome/i].some((t=>navigator.userAgent.match(t)))||(M(),e=Math.min(window.innerHeight/X,window.innerWidth),O=e,t.resizeCanvas(1*$(),X*$()))},t.keyPressed=()=>{const e={48:0,49:.25,50:.5,51:.75,52:1}[t.keyCode];if(null!=e&&(M(),d=Math.floor(e*u),console.log(`Setting glitch percentage to ${Math.round(100*e)}%`),t.loop()),83===t.keyCode){if(o)return;i&&(i=!1,t.frameRate(60)),console.log("Downloading print...");const e=t.createGraphics(Math.round(3946),Math.round(7015.11111111111));e.colorMode(t.HSL),e.angleMode(t.DEGREES),e.pixelDensity(1),b((()=>3946),e,!0),e.save("corral-print.png"),console.log("Download of print complete.")}},t.mouseClicked=()=>{o||(i?(i=!1,t.frameRate(60)):(i=!0,t.frameRate(10),t.loop()))}}))})();