<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">let ysdk,timerAdId;function initSDK(){YaGames.init({adv:{onAdvClose:e=&gt;{console.info("adv closed!"),window.focus()}}}).then(e=&gt;{(ysdk=e).adv.showFullscreenAdv(),timerAdId=setInterval(()=&gt;ysdk.adv.showFullscreenAdv(),2e5)})}window.onload=function(){with(paper.setup("canvas"),paper){let center=view.center.clone(),mouse=view.center.clone(),height=view.size.height,width=view.size.width,dead=!0,pauseText=document.getElementById("pause-text"),gText=document.getElementById("start"),menu=document.getElementById("menu"),menuButton=document.getElementById("menu-button"),backButton=document.getElementById("back-button"),clearButton=document.getElementById("clear-button"),saveButton=document.getElementById("save-button"),colorButtons=document.getElementById("color-buttons"),otherButtons=document.getElementById("other-buttons"),start=!1,coloringCount=13,colorings=[],loadings=0,selectedColoring=0,selectedColor=1,selectedRadius=3,selectedIntense=0,wall=new Path.Rectangle(new Point(0,0),view.size);wall.fillColor="white";let drawings=new Group,openMenu=!0,colors=["255, 255, 255, ","244, 67, 54, ","156, 39, 176, ","63, 81, 181, ","3, 169, 244, ","76, 175, 80, ","255, 235, 59, ","255, 152, 0, ","255, 87, 34, ","93, 64, 55, ","158, 158, 158, ","0, 0, 0, "],rads=[height/200,height/100,height/60,height/40,height/25,height/15],intenses=[1,.8,.6,.5,.3,.1],colorItems=[],radItems=[],intenItems=[],pathLine;for(let i=0;i&lt;colors.length;++i){let colorItem=document.createElement("div");colorItem.id="color-item",colorItem.title="Color",colorItem.style.backgroundColor="rgba("+colors[i]+"1)",i==selectedColor&amp;&amp;colorItem.classList.add("selected"),colorItem.onclick=function(e){colorItems[selectedColor].classList.remove("selected"),colorItem.classList.add("selected"),selectedColor=i;for(let e=0;e&lt;intenItems.length;++e)intenItems[e].style.backgroundColor="rgba("+colors[selectedColor]+intenses[e]+")"},colorItems[i]=colorItem,colorButtons.appendChild(colorItem)}for(let i=0;i&lt;rads.length;++i){let radItem=document.createElement("div");radItem.id="other-item",radItem.title="Radius "+(i+1),radItem.style.fontSize=i+2+"vh",radItem.style.backgroundColor="#fff",radItem.innerHTML='&lt;i class="material-icons"&gt;fiber_manual_record&lt;/i&gt;',i==selectedRadius&amp;&amp;radItem.classList.add("selected"),radItem.onclick=function(e){radItems[selectedRadius].classList.remove("selected"),radItem.classList.add("selected"),selectedRadius=i},radItems[i]=radItem,otherButtons.appendChild(radItem)}for(let i=0;i&lt;intenses.length;++i){let intenItem=document.createElement("div");intenItem.id="other-item",intenItem.title="Intensity "+intenses[i],intenItem.style.backgroundColor="rgba("+colors[selectedColor]+intenses[i]+")",i==selectedIntense&amp;&amp;intenItem.classList.add("selected"),intenItem.onclick=function(e){intenItems[selectedIntense].classList.remove("selected"),intenItem.classList.add("selected"),selectedIntense=i},intenItems[i]=intenItem,otherButtons.appendChild(intenItem)}function loading(){if(loadings===coloringCount){gText.innerHTML="SELECT COLORING",gText.style.margin="5vh",menu.style.display="block",menuButton.style.color="white",menuButton.innerHTML='&lt;i class="material-icons"&gt;close&lt;/i&gt;',menuButton.style.display="flex";for(let e=0;e&lt;coloringCount+1;++e){let t=document.createElement("div");t.id="menu-item",e&lt;coloringCount?t.style.backgroundImage='url("images/'+(e+1)+'.svg")':t.innerHTML="EMPTY",t.onclick=function(t){selectedColoring!=e&amp;&amp;(selectedColoring&lt;coloringCount&amp;&amp;(colorings[selectedColoring].visible=!1),selectedColoring=e,e&lt;coloringCount&amp;&amp;(colorings[selectedColoring].visible=!0),drawings.removeChildren()),menuButtonToggle()},menu.appendChild(t)}start=!0}else gText.innerHTML="LOADING "+Math.round(100*loadings/coloringCount)+"%"}for(let i=0;i&lt;coloringCount;++i)colorings.push(0),project.importSVG("images/"+(i+1)+".svg",e=&gt;imgOnLoad(e,i));function imgOnLoad(e,t){colorings[t]=e.clone(),e.remove(),colorings[t].bounds.height=height,colorings[t].bounds.width=height,colorings[t].position=center,t!=selectedColoring&amp;&amp;(colorings[t].visible=!1),++loadings,loading()}function menuButtonToggle(){(openMenu=!openMenu)?(menuButton.title="Close",menuButton.style.color="white",menuButton.style.backgroundColor="rgb(0, 200, 83)",menuButton.innerHTML='&lt;i class="material-icons"&gt;close&lt;/i&gt;',pauseText.style.display="flex",dead=!0):(menuButton.title="Select",menuButton.style.color="rgb(0, 200, 83)",menuButton.style.backgroundColor="white",menuButton.innerHTML='&lt;i class="material-icons"&gt;collections&lt;/i&gt;',pauseText.style.display="none",dead=!1)}menuButton.onclick=function(e){menuButtonToggle()},saveButton.onclick=function(e){saveButton.getElementsByTagName("a")[0].href=document.getElementById("canvas").toDataURL("image/png").replace(/^data:image\/[^;]/,"data:application/octet-stream")},backButton.onclick=function(e){drawings.hasChildren()&amp;&amp;drawings.removeChildren(drawings.children.length-1)},clearButton.onclick=function(e){drawings.hasChildren()&amp;&amp;drawings.removeChildren()},view.onMouseDown=function(e){dead||(mouse=e.point,(pathLine=new Path).strokeWidth=2*rads[selectedRadius],pathLine.strokeColor="rgba("+colors[selectedColor]+intenses[selectedIntense]+")",pathLine.strokeCap="round",pathLine.strokeJoin="round",pathLine.insertAbove(drawings),pathLine.add(mouse))},view.onMouseDrag=function(e){dead||(mouse=e.point,pathLine.add(mouse))},view.onMouseUp=function(e){dead||(mouse=e.point,pathLine.add(mouse),drawings.addChild(pathLine))},view.onResize=function(e){wall.bounds=view.bounds;let t=drawings.position.clone();drawings.bounds.height=view.size.height*drawings.bounds.height/height,drawings.bounds.width=view.size.height*drawings.bounds.width/height,drawings.position.x=view.center.x+view.size.height*(t.x-center.x)/height,drawings.position.y=view.size.height*t.y/height;for(let e of drawings.children)e.strokeWidth=view.size.height*e.strokeWidth/height;center=view.center.clone(),height=view.size.height,width=view.size.width,rads=[height/200,height/100,height/60,height/40,height/25,height/15];for(let e=0;e&lt;coloringCount;++e)colorings[e].bounds.height=height,colorings[e].bounds.width=height,colorings[e].position=center}}};</pre></body></html>