-
Notifications
You must be signed in to change notification settings - Fork 0
/
updatedjs.js
1 lines (1 loc) · 52.6 KB
/
updatedjs.js
1
var uo=Object.defineProperty;var fo=(t,e,o)=>e in t?uo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var $e=(t,e,o)=>(fo(t,typeof e!="symbol"?e+"":e,o),o);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const l of n)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function o(n){const l={};return n.integrity&&(l.integrity=n.integrity),n.referrerPolicy&&(l.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?l.credentials="include":n.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(n){if(n.ep)return;n.ep=!0;const l=o(n);fetch(n.href,l)}})();function q(){}function ho(t,e){for(const o in e)t[o]=e[o];return t}function Yt(t){return t()}function Pt(){return Object.create(null)}function se(t){t.forEach(Yt)}function wt(t){return typeof t=="function"}function We(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ve;function Ot(t,e){return t===e?!0:(Ve||(Ve=document.createElement("a")),Ve.href=e,t===Ve.href)}function po(t){return Object.keys(t).length===0}function gt(t,...e){if(t==null){for(const r of e)r(void 0);return q}const o=t.subscribe(...e);return o.unsubscribe?()=>o.unsubscribe():o}function wo(t){let e;return gt(t,o=>e=o)(),e}function go(t,e,o){t.$$.on_destroy.push(gt(e,o))}function et(t,e,o,r){if(t){const n=Vt(t,e,o,r);return t[0](n)}}function Vt(t,e,o,r){return t[1]&&r?ho(o.ctx.slice(),t[1](r(e))):o.ctx}function tt(t,e,o,r){if(t[2]&&r){const n=t[2](r(o));if(e.dirty===void 0)return n;if(typeof n=="object"){const l=[],s=Math.max(e.dirty.length,n.length);for(let i=0;i<s;i+=1)l[i]=e.dirty[i]|n[i];return l}return e.dirty|n}return e.dirty}function ot(t,e,o,r,n,l){if(n){const s=Vt(e,o,r,l);t.p(s,n)}}function rt(t){if(t.ctx.length>32){const e=[],o=t.ctx.length/32;for(let r=0;r<o;r++)e[r]=-1;return e}return-1}const bo=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function u(t,e){t.appendChild(e)}function N(t,e,o){t.insertBefore(e,o||null)}function R(t){t.parentNode&&t.parentNode.removeChild(t)}function mo(t,e){for(let o=0;o<t.length;o+=1)t[o]&&t[o].d(e)}function p(t){return document.createElement(t)}function G(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t){return document.createTextNode(t)}function L(){return K(" ")}function vo(){return K("")}function P(t,e,o,r){return t.addEventListener(e,o,r),()=>t.removeEventListener(e,o,r)}function Z(t){return function(e){return e.preventDefault(),t.call(this,e)}}function yo(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function _o(t){return function(e){e.target===this&&t.call(this,e)}}function c(t,e,o){o==null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o)}function xo(t){return Array.from(t.childNodes)}function ze(t,e){e=""+e,t.data!==e&&(t.data=e)}function V(t,e){t.value=e==null?"":e}function T(t,e,o,r){o==null?t.style.removeProperty(e):t.style.setProperty(e,o,r?"important":"")}function zt(t,e){return new t(e)}let Le;function Ie(t){Le=t}function ko(){if(!Le)throw new Error("Function called outside component initialization");return Le}function Co(t){ko().$$.on_mount.push(t)}function Ao(t,e){const o=t.$$.callbacks[e.type];o&&o.slice().forEach(r=>r.call(this,e))}const Ae=[],Re=[];let Ee=[];const ct=[],Xt=Promise.resolve();let ut=!1;function Zt(){ut||(ut=!0,Xt.then(qt))}function bt(){return Zt(),Xt}function ft(t){Ee.push(t)}function Eo(t){ct.push(t)}const nt=new Set;let ke=0;function qt(){if(ke!==0)return;const t=Le;do{try{for(;ke<Ae.length;){const e=Ae[ke];ke++,Ie(e),Mo(e.$$)}}catch(e){throw Ae.length=0,ke=0,e}for(Ie(null),Ae.length=0,ke=0;Re.length;)Re.pop()();for(let e=0;e<Ee.length;e+=1){const o=Ee[e];nt.has(o)||(nt.add(o),o())}Ee.length=0}while(Ae.length);for(;ct.length;)ct.pop()();ut=!1,nt.clear(),Ie(t)}function Mo(t){if(t.fragment!==null){t.update(),se(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ft)}}function So(t){const e=[],o=[];Ee.forEach(r=>t.indexOf(r)===-1?e.push(r):o.push(r)),o.forEach(r=>r()),Ee=e}const Ze=new Set;let xe;function Kt(){xe={r:0,c:[],p:xe}}function Gt(){xe.r||se(xe.c),xe=xe.p}function re(t,e){t&&t.i&&(Ze.delete(t),t.i(e))}function pe(t,e,o,r){if(t&&t.o){if(Ze.has(t))return;Ze.add(t),xe.c.push(()=>{Ze.delete(t),r&&(o&&t.d(1),r())}),t.o(e)}else r&&r()}function Uo(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Po(t,e,o){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=o,o(t.$$.ctx[r]))}function dt(t){t&&t.c()}function qe(t,e,o){const{fragment:r,after_update:n}=t.$$;r&&r.m(e,o),ft(()=>{const l=t.$$.on_mount.map(Yt).filter(wt);t.$$.on_destroy?t.$$.on_destroy.push(...l):se(l),t.$$.on_mount=[]}),n.forEach(ft)}function Ke(t,e){const o=t.$$;o.fragment!==null&&(So(o.after_update),se(o.on_destroy),o.fragment&&o.fragment.d(e),o.on_destroy=o.fragment=null,o.ctx=[])}function Oo(t,e){t.$$.dirty[0]===-1&&(Ae.push(t),Zt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function mt(t,e,o,r,n,l,s=null,i=[-1]){const f=Le;Ie(t);const a=t.$$={fragment:null,ctx:[],props:l,update:q,not_equal:n,bound:Pt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:Pt(),dirty:i,skip_bound:!1,root:e.target||f.$$.root};s&&s(a.root);let g=!1;if(a.ctx=o?o(t,e.props||{},(h,b,...m)=>{const v=m.length?m[0]:b;return a.ctx&&n(a.ctx[h],a.ctx[h]=v)&&(!a.skip_bound&&a.bound[h]&&a.bound[h](v),g&&Oo(t,h)),b}):[],a.update(),g=!0,se(a.before_update),a.fragment=r?r(a.ctx):!1,e.target){if(e.hydrate){const h=xo(e.target);a.fragment&&a.fragment.l(h),h.forEach(R)}else a.fragment&&a.fragment.c();e.intro&&re(t.$$.fragment),qe(t,e.target,e.anchor),qt()}Ie(f)}class vt{constructor(){$e(this,"$$");$e(this,"$$set")}$destroy(){Ke(this,1),this.$destroy=q}$on(e,o){if(!wt(o))return q;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(o),()=>{const n=r.indexOf(o);n!==-1&&r.splice(n,1)}}$set(e){this.$$set&&!po(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const zo="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(zo);const Ce=[];function Io(t,e){return{subscribe:yt(t,e).subscribe}}function yt(t,e=q){let o;const r=new Set;function n(i){if(We(t,i)&&(t=i,o)){const f=!Ce.length;for(const a of r)a[1](),Ce.push(a,t);if(f){for(let a=0;a<Ce.length;a+=2)Ce[a][0](Ce[a+1]);Ce.length=0}}}function l(i){n(i(t))}function s(i,f=q){const a=[i,f];return r.add(a),r.size===1&&(o=e(n,l)||q),i(t),()=>{r.delete(a),r.size===0&&o&&(o(),o=null)}}return{set:n,update:l,subscribe:s}}function Wt(t,e,o){const r=!Array.isArray(t),n=r?[t]:t;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=e.length<2;return Io(o,(s,i)=>{let f=!1;const a=[];let g=0,h=q;const b=()=>{if(g)return;h();const v=e(r?a[0]:a,s,i);l?s(v):h=wt(v)?v:q},m=n.map((v,d)=>gt(v,w=>{a[d]=w,g&=~(1<<d),f&&b()},()=>{g|=1<<d}));return f=!0,b(),function(){se(m),h(),f=!1}})}const Qe=typeof location!="undefined",Qt=typeof history!="undefined",ht=Qt&&oo(history.pushState),Jt=typeof window!="undefined",$t=Jt&&window!==window.parent,Lo=Qe&&(location.protocol==="file:"||/[-_\w]+[.][\w]+$/i.test(location.pathname)),eo=Jt&&Qt&&Qe&&!$t,Be=!ht||Lo,_t="#!",oe={array:{separator:",",format:"bracket"},convertTypes:!0,breakHooks:!0,hashbang:!1,anchor:!1,scroll:!1,focus:!1,nesting:3,sideEffect:eo,base:""};function Ro(){const t=xt().pathname;if(!t)return;const e=kt(),o=Me(t,e);return Ne(o)}function xt(){if(!Qe)return{};if(Be){const t=location.hash;return new URL(t.indexOf(_t)===0?t.substring(2):t.substring(1),"file:")}return location}function kt(){return Qe&&Be?location.pathname:"/"}function It(t){Be&&(t=_t+t);const e=kt();return(e[e.length-1]==="/"?e.substring(0,e.length-1):e)+t}function pt(t){t=Me(t,xt().origin);const e=kt();return t=Me(t,e),Be&&(t=Me(t,_t)),Ne(t)}function To(t,e=""){const o=Me(to(e),"#");if(t&&oe.scroll){const r=Ge(oe.scroll)?{...oe.scroll,...t}:t,{top:n=0,left:l=0}=t,{scrollHeight:s,scrollWidth:i}=document.documentElement;if(n<=s&&l<=i)return Xe(r);const f=jo(a=>{if(!a[0])return f();(!n||a[0].contentRect.height>=n)&&(!l||a[0].contentRect.width>=l)&&(f(),Xe(r))},document.documentElement)}else if(o&&oe.anchor){const r=Ge(oe.anchor)?oe.anchor:{},n=document.getElementById(o);if(n)return Xe(r,n);const l=Fo(()=>{const s=document.getElementById(o);s&&(l(),Xe(r,s))})}}function Bo(t="",{decode:e=decodeURIComponent}={}){return t?t.replace("?","").replace(/\+/g," ").split("&").filter(Boolean).reduce((o,r)=>{let[n,l]=r.split(/=(.*)/,2);n=e(n||""),l=e(l||"");let s=ro(n,l);return o=Object.keys(s).reduce((i,f)=>{const a=Te(s[f]);return i[f]?Array.isArray(i[f])?i[f]=i[f].concat(a):Object.assign(i[f],a):i[f]=a,i},o),o},{}):{}}function No(t={},{encode:e=encodeURIComponent}={}){return Object.keys(t).reduce((o,r)=>{if(Object.prototype.hasOwnProperty.call(t,r)&&isNaN(parseInt(r,10)))if(Array.isArray(t[r]))t[r].forEach(n=>o.push(`${r}[]=${e(n)}`));else if(Ge(t[r])){let n=ro(r,t[r]);o.push(no(n))}else o.push(`${r}=${e(t[r])}`);return o},[]).join("&")}function Ho(t="",e="*",{loose:o=!1,sensitive:r=!1,blank:n=!1,decode:l=decodeURIComponent}={}){const s={},i=e instanceof RegExp?e:e.split("/").reduce((g,h,b,{length:m})=>{if(h){const v=h[0];if(v==="*")s.wild=void 0,g+="/(?<wild>.*)";else if(v===":"){const d=h.indexOf("?",1),w=h.indexOf(".",1),S=!!~d,k=!!~w,x=h.substring(1,S?d:k?w:h.length);s[x]=void 0,g+=S&&!k?`(?:/(?<${x}>[^/]+?))?`:`/(?<${x}>[^/]+?)`,k&&(g+=`${S?"?":""}\\${h.substring(w)}`)}else g+=`/${h}`}return b===m-1&&(g+=o?"(?:$|/)":"/?$"),g},"^"),f=r?"":"i",a=new RegExp(i,f).exec(t);return a?Object.entries(a.groups||{}).reduce((g,[h,b])=>{const m=l(b);return g[h]=Te(m),g},{}):n?s:null}function to(t,{decode:e=decodeURIComponent}={}){return e(t)}function Ne(t,e="/",o=!1){return t+="",!t&&o?t:t.indexOf(e)!==0?e+t:t}function Me(t,e){return(t+"").indexOf(e)===0?t.substring(e.length):t}function Ge(t){return!Array.isArray(t)&&typeof t=="object"&&t!==null}function oo(t){return typeof t=="function"}function Do(t){return(...e)=>![...t].some(r=>r(...e)===!1)}function st(...t){return window.addEventListener(...t),()=>window.removeEventListener(...t)}function Xe({top:t=0,left:e=0,...o}={},r){r?document.documentElement.scrollIntoView?r.scrollIntoView({behavior:"smooth",...o}):window.scrollTo({top:r.offsetTop-t,behavior:"smooth",...o}):window.scrollTo({top:t,left:e,behavior:"smooth",...o})}function jo(t,e,o=5e3){const r=new ResizeObserver(t);r.observe(e);const n=()=>r.unobserve(e);return setTimeout(n,o),n}function Fo(t,e=5e3){const o=new MutationObserver(t);o.observe(document.body,{childList:!0,subtree:!0});const r=()=>o.disconnect();return setTimeout(r,e),r}function Te(t){return Array.isArray(t)?(t[t.length-1]=Te(t[t.length-1]),t):typeof t=="object"?Object.entries(t).reduce((e,[o,r])=>(e[o]=Te(r),e),{}):t==="true"||t==="false"?t==="true":t==="null"?null:t==="undefined"?void 0:t!==""&&!isNaN(Number(t))&&Number(t).toString()===t?Number(t):t}function ro(t,e){const o=/(\[[^[\]]*])/,r=/(\[[^[\]]*])/g;let n=o.exec(t),l=n?t.slice(0,n.index):t,s=[];l&&s.push(l);let i=0;for(;(n=r.exec(t))&&i<oe.nesting;)i++,s.push(n[1]);return n&&s.push(`[${t.slice(n.index)}]`),Yo(s,e)}function Yo(t,e){let o=e;for(let r=t.length-1;r>=0;--r){let n=t[r],l;if(n==="[]")l=[].concat(o);else{l={};const s=n.charAt(0)==="["&&n.charAt(n.length-1)==="]"?n.slice(1,-1):n,i=parseInt(s,10);!isNaN(i)&&n!==s&&String(i)===s&&i>=0?(l=[],l[i]=Te(o)):l[s]=o}o=l}return o}function no(t={},e=""){return Object.entries(t).map(([o,r])=>typeof r=="object"?no(r,e?`${e}[${o}]`:o):`${e}[${o}]=${r}`).join("&")}const Vo=Ct(function(e=""){return typeof e=="string"&&(e=Me(e,"/").split("/")),Object.prototype.hasOwnProperty.call(e,"toString")?e:Object.defineProperty(e,"toString",{value(){return Ne(this.join("/"))},configurable:!1,writable:!1})}),Xo=Ct(function(e=""){return typeof e=="string"&&(e=Bo(e)),Object.prototype.hasOwnProperty.call(e,"toString")?e:Object.defineProperty(e,"toString",{value(){return Ne(No(this),"?",!0)},configurable:!1,writable:!1})}),Zo=Ct(function(e=""){return Ne(to(e),"#",!0)});function Ct(t){return(e,o)=>{let r=e&&e.toString();!Array.isArray(o)&&(o=[o]);const n=new Set(o),l=Do(n),{subscribe:s,set:i}=yt(e=t(e),()=>()=>n.clear());function f(a){a=t(a),a.toString()!==r&&l(a,e,t.name)!==!1&&(r=a.toString(),e=a,i(e))}return l(null,e,t.name),{subscribe:s,update(a){f(a(wo(this)))},set(a){f(a)},hook(a){return oo(a)&&(n.add(a),a(null,e,t.name)),()=>n.delete(a)}}}}const so=Ro(),{search:lo,hash:io}=xt();let lt=!0,Pe=!1,Lt=!1;const Je=Vo(so,Et),ao=Xo(lo,Et),At=Zo(io,Et),co=yt({}),qo=Wt([Je,ao,At],([t,e,o],r)=>{let n=!1;return bt().then(()=>{n||r(t+e+o)}),()=>n=!0},so+lo+io);Wt(Je,t=>Ho.bind(null,t.toString()));function Et(){}function it(t,e){const o=t.indexOf("#")>=0?t.slice(t.indexOf("#")):"";!Ge(e)&&(e={}),bt().then(()=>(e._focus,void 0)).then(()=>To(e._scroll,o))}if(eo||$t){const t=new Set;t.add(qo.subscribe(e=>{!lt&&!Pe&&oe.sideEffect&&(ht?history[Lt?"replaceState":"pushState"]({},null,It(e)):location.hash=It(e)),!Pe&&it(e),lt=Lt=Pe=!1})),ht?(t.add(co.subscribe(e=>{lt||!oe.sideEffect||history.replaceState(e,null,location.pathname+location.search+location.hash)})),t.add(st("popstate",e=>{Pe=!0,Rt(location.href,e.state),it(pt(location.href),e.state)}))):t.add(st("hashchange",()=>{if(Pe=!0,!Be)return At.set(location.hash);Rt(location.hash),it(pt(location.hash))})),t.add(st("unload",()=>{t.forEach(e=>e()),t.clear()},!0))}function Rt(t="",e={}){const{pathname:o,search:r,hash:n}=t instanceof URL?t:new URL(pt(t),"file:");Je.set(o),ao.set(r),At.set(n),bt().then(()=>co.set(e||{}))}function at(t,e){let o;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))return o=t.substring(1).split(""),o.length==3&&(o=[o[0],o[0],o[1],o[1],o[2],o[2]]),o="0x"+o.join(""),[o>>16&255,o>>8&255,o&255,e];throw new Error("Bad Hex")}function Ko(t){let e=0;for(let o=0;o<t.length;o++)e+=t.charCodeAt(o),e+=e<<10,e^=e>>>6;return e+=e<<3,e^=e>>>11,e+=e<<15,e>>>0}function Go(t){return[t>>>16,t&65535]}function Wo(t){return t[0]=18030*(t[0]&65535)+(t[0]>>16),t[1]=30903*(t[1]&65535)+(t[1]>>16),(t[0]<<16)+(t[1]&65535)}function Qo(t,e,o,r=!1){const n=r?32:24,l=14,s={BITMAPCOREHEADER:12,BITMAPINFOHEADER:40,BITMAPV2INFOHEADER:52,BITMAPV3INFOHEADER:56,BITMAPV4HEADER:108,BITMAPV5HEADER:124};var i=r?"BITMAPV4HEADER":"BITMAPCOREHEADER",f=/constructor/i.test(window.HTMLElement)||function(w){return w.toString()==="[object SafariRemoteNotification]"}(!window.safari||typeof safari!="undefined"&&window.safari.pushNotification);if(r&&(f||/(iPad|iPhone|iPod)/g.test(navigator.userAgent))&&(i="BITMAPCOREHEADER"),!s.hasOwnProperty(i))throw`Unknown BMP header version: ${i}`;const a=s[i],g=4*Math.floor((e*Math.floor((n+7)/8)+3)/4),h=g*Math.abs(o),b=l+a,m=b+h,v=new ArrayBuffer(m),d=new DataView(v);if(d.setUint8(0,"B".charCodeAt(0)),d.setUint8(1,"M".charCodeAt(0)),d.setUint32(2,m,!0),d.setUint16(6,0,!0),d.setUint16(8,0,!0),d.setUint32(10,b,!0),a==s.BITMAPCOREHEADER?(d.setUint32(14,a,!0),d.setUint16(18,e,!0),d.setInt16(20,o,!0),d.setUint16(22,1,!0),d.setUint16(24,n,!0)):a>=s.BITMAPINFOHEADER&&(d.setUint32(14,a,!0),d.setUint32(18,e,!0),d.setInt32(22,o,!0),d.setUint16(26,1,!0),d.setUint16(28,n,!0),d.setUint32(30,r?3:0,!0),d.setUint32(34,h,!0),d.setUint32(38,2835,!0),d.setUint32(42,2835,!0),d.setUint32(46,0,!0),d.setUint32(50,0,!0)),a>=s.BITMAPV2INFOHEADER&&(d.setUint32(54,r?16711680:0,!0),d.setUint32(58,r?65280:0,!0),d.setUint32(62,r?255:0,!0)),a>=s.BITMAPV3INFOHEADER&&d.setUint32(66,r?4278190080:0,!0),a>=s.BITMAPV4HEADER){const w="Win ";d.setUint8(70,w.charCodeAt(0)),d.setUint8(71,w.charCodeAt(1)),d.setUint8(72,w.charCodeAt(2)),d.setUint8(73,w.charCodeAt(3)),d.setUint32(110,0,!0),d.setUint32(114,0,!0),d.setUint32(118,0,!0)}a>=s.BITMAPV5HEADER&&(d.setUint32(122,4,!0),d.setUint32(126,0,!0),d.setUint32(130,0,!0),d.setUint32(134,0,!0));for(let w=0;w<o;w++){let S=b+(o-1-w)*g;for(let k=0;k<e;k++){const x=t[w*e+k];d.setUint8(S+0,x[2]),d.setUint8(S+1,x[1]),d.setUint8(S+2,x[0]),r?(d.setUint8(S+3,x[3]),S+=4):S+=3}}return v}class Q{constructor(e,o,r=null){this.seed,this.colors=[[0,0,0,255],[255,255,255,255]],this.width=e,this.height=o,typeof r=="undefined"||r===null?this.values=Array(this.width*this.height):this.values=r.map(n=>n)}fill(e){this.values.fill(e)}fillRandom(e=""){const o=Go(Ko(e));this.fill(0),this.values=this.values.map((r,n)=>Wo(o)&1)}getCell(e,o){return this.values[o*this.width+e]}setCell(e,o,r){this.values[o*this.width+e]=r}setColors(e){this.colors=e.map(o=>o)}setSeed(e){this.seed=e}connectedCells(){const e=new Q(this.width,this.height);for(let o=0;o<this.height;o++)for(let r=0;r<this.width;r++){let n=0;for(let l=-1;l<=1;l++)for(let s=-1;s<=1;s++){const i=o+l,f=r+s;f<0||f>=this.width||i<0||i>=this.height||l===0&&s===0||(n+=this.getCell(f,i))}e.setCell(r,o,n)}return e}evolve(e=1,o=.125,r=.375){const n=new Q(this.width,this.height,this.values),l=8,s=(f,a)=>f==0&&a<=o*l,i=(f,a)=>f==1&&(a==2||a==Math.floor(r*l));for(let f=0;f<e;f++){const a=n.connectedCells();n.values=n.values.map((g,h)=>s(g,a.values[h])||i(g,a.values[h])?1:0)}return n}unfold(){const e=new Q(2*this.width,this.height);for(let o=0;o<this.height;o++)for(let r=0;r<this.width;r++){const n=this.getCell(r,o);e.setCell(r,o,n),e.setCell(this.width*2-1-r,o,n)}return e}pad(e=1,o=1){const r=new Q(this.width+2*e,this.height+2*e);r.fill(o);for(let n=0;n<this.height;n++)for(let l=0;l<this.width;l++){const s=this.getCell(l,n);r.setCell(l+e,n+e,s)}return r}outline(){let e=new Q(this.width,this.height);e.fill(.5);for(let o=0;o<this.height;o++)for(let r=0;r<this.width;r++)this.getCell(r,o)==0&&(e.setCell(r,o,0),r>0&&e.setCell(r-1,o,this.getCell(r-1,o)==1?1:0),r<this.width-1&&e.setCell(r+1,o,this.getCell(r+1,o)==1?1:0),o>0&&e.setCell(r,o-1,this.getCell(r,o-1)==1?1:0),o<this.width-1&&e.setCell(r,o+1,this.getCell(r,o+1)==1?1:0));return e=e.pad(0,.5),e}gradient(){const e=new Q(this.width,this.height);for(let o=0;o<this.height;o++)for(let r=0;r<this.width;r++){const n=this.getCell(r,o),l=o>0?this.getCell(r,o-1):n,i=((o<this.height-1?this.getCell(r,o+1):n)-n+(n-l))/2;e.setCell(r,o,i)}return e}rescale(e=.2,o=.25){const r=this.values.reduce((s,i)=>s<i?s:i,Number.MAX_VALUE),n=this.values.reduce((s,i)=>s>i?s:i,Number.MIN_VALUE),l=new Q(this.width,this.height);return l.values=this.values.map(s=>(s-r)/(n-r)*(o-e)+e),l}combine(e){const o=new Q(this.width,this.height);return o.values=this.values.map((r,n)=>r===0?e.values[n]:r),o}createColorData(e){return this.values.map(r=>{let n=r;n<0&&(n=0),n>1&&(n=1);const l=Math.floor(n*(e.length-1)),s=e[l];let i=[0,0,0,255];for(let f=0;f<i.length;f++)i[f]=Math.floor(s[f]);return i})}static generate(e,o="0",r="lower",n=1,l="#000000",s=255,i="#000000",f=255,a="#ffffff",g=255){typeof e=="undefined"||e===null?e=self.crypto.randomUUID():e===""?e=o:(e=e.toString(),r==="lower"?e=e.toLowerCase():r==="upper"&&(e=e.toUpperCase()));let h=new Q(4,8);h.fillRandom(e),h=h.evolve(),h=h.unfold(),h=h.pad(n+1,1);const b=h.outline(),v=b.gradient().rescale(),d=b.combine(v),w=[];return w.push(at(l,s)),w.push(at(i,f)),w.push(at(a,g)),d.setColors(w),d.setSeed(e),d}asBitmapData(e=!1){const o=this.createColorData(this.colors);return Qo(o,this.width,this.height,e)}asDataUri(e=!1){const o="data:image/webp;base64,",r=this.asBitmapData(e);if(typeof globalThis.btoa=="undefined")return o+Buffer.from(r).toString("base64");{const n=String.fromCharCode(...new Uint8Array(r));return o+btoa(n)}}}const Jo=t=>({}),Tt=t=>({}),$o=t=>({}),Bt=t=>({});function er(t){let e,o,r,n,l,s,i,f,a,g,h,b,m,v;const d=t[3].header,w=et(d,t,t[2],Bt),S=t[3].default,k=et(S,t,t[2],null),x=t[3].buttonAction,M=et(x,t,t[2],Tt);return{c(){e=p("dialog"),o=p("div"),r=p("a"),r.innerHTML='<svg class="w-6 h-6 text-bol-dark hover:text-bol-gray float-end" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18 18 6m0 12L6 6"></path></svg>',n=L(),w&&w.c(),l=L(),s=p("hr"),i=L(),k&&k.c(),f=L(),a=p("div"),g=p("button"),g.textContent="close",h=L(),M&&M.c(),c(r,"href","/"),g.autofocus=!0,c(g,"class","rounded-none bg-bol-gray text-bol-white hover:text-bol-dark p-2 float-end"),c(o,"class","svelte-1unyaiu"),c(e,"class","svelte-1unyaiu")},m(_,O){N(_,e,O),u(e,o),u(o,r),u(o,n),w&&w.m(o,null),u(o,l),u(o,s),u(o,i),k&&k.m(o,null),u(o,f),u(o,a),u(a,g),u(a,h),M&&M.m(a,null),t[7](e),b=!0,g.focus(),m||(v=[P(r,"click",Z(t[5])),P(g,"click",t[6]),P(o,"click",yo(t[4])),P(e,"close",t[8]),P(e,"click",_o(t[9]))],m=!0)},p(_,[O]){w&&w.p&&(!b||O&4)&&ot(w,d,_,_[2],b?tt(d,_[2],O,$o):rt(_[2]),Bt),k&&k.p&&(!b||O&4)&&ot(k,S,_,_[2],b?tt(S,_[2],O,null):rt(_[2]),null),M&&M.p&&(!b||O&4)&&ot(M,x,_,_[2],b?tt(x,_[2],O,Jo):rt(_[2]),Tt)},i(_){b||(re(w,_),re(k,_),re(M,_),b=!0)},o(_){pe(w,_),pe(k,_),pe(M,_),b=!1},d(_){_&&R(e),w&&w.d(_),k&&k.d(_),M&&M.d(_),t[7](null),m=!1,se(v)}}}function tr(t,e,o){let{$$slots:r={},$$scope:n}=e,{showModal:l}=e,s;function i(m){Ao.call(this,t,m)}const f=()=>s.close(),a=()=>s.close();function g(m){Re[m?"unshift":"push"](()=>{s=m,o(1,s)})}const h=()=>o(0,l=!1),b=()=>s.close();return t.$$set=m=>{"showModal"in m&&o(0,l=m.showModal),"$$scope"in m&&o(2,n=m.$$scope)},t.$$.update=()=>{t.$$.dirty&3&&s&&l&&s.showModal()},[l,s,n,r,i,f,a,g,h,b]}class or extends vt{constructor(e){super(),mt(this,e,tr,er,We,{showModal:0})}}const rr=t=>e=>e===-1?t-1:e===t?0:e,nr=(t,e)=>e.map(rr(t)),sr=({y:t,x:e})=>[-1,0,1].reduce((o,r,n,l)=>l.reduce((s,i)=>i||r?[...s,[t+r,e+i]]:s,o),[]),lr=t=>e=>(([o,r])=>t[o][r])(nr(t.length,e)),ir=(t,e)=>sr(e).map(lr(t)).filter(Boolean).length,ar=(t,e)=>(o,r)=>{const n=t.survive(r),l=t.spawn(r),s=Math.random()<e,i=!n;return o?!(i||!l&&s):l||n&&s},cr=(t,e)=>t.map((o,r)=>o.map((n,l)=>e(!!n,ir(t,{y:r,x:l})))),Nt=t=>{const e=o=>t===o;return e.label=String(t),e},te=t=>{const e=o=>t.includes(o);return e.label=t.join(""),e},Ht=(t,e)=>{const o=r=>r>=t&&r<=e;o.label="";for(let r=t;r<e;r++)o.label=o.label+String(r);return o},ur=[{description:"Normal life",rules:{spawn:Nt(3),survive:te([2,3])},gridFillPercentage:.2,mutation:2e-4},{description:"Inverted colors",rules:{spawn:te([0,1,2,3,4,7,8]),survive:te([0,1,2,3,4,6,7,8])},gridFillPercentage:.8,mutation:2e-4},{description:"High life",rules:{spawn:te([3,6]),survive:te([2,3])},gridFillPercentage:.1,mutation:2e-4},{description:"Maze",rules:{spawn:Nt(3),survive:Ht(1,5)},gridFillPercentage:.05,mutation:0},{description:"Mist",rules:{spawn:te([3,4,5,8]),survive:te([0,5,6,7,8])},gridFillPercentage:.175,mutation:5e-5},{description:"Growing cells",rules:{spawn:te([4,5]),survive:Ht(2,5)},gridFillPercentage:.15,mutation:3e-4},{description:"Growing cells inverted colors",rules:{spawn:te([0,1,2,7,8]),survive:te([0,1,2,5,6,7,8])},gridFillPercentage:.85,mutation:3e-4}],fr=ur[0],{document:Oe}=bo;function dr(t,e,o){const r=t.slice();return r[49]=e[o],r[51]=o,r}function hr(t){let e,o,r,n;return{c(){e=p("a"),o=p("canvas"),T(o,"width","100%"),c(e,"href","/")},m(l,s){N(l,e,s),u(e,o),t[24](o),r||(n=P(e,"click",Z(t[15].toggleAutoPlay)),r=!0)},p:q,d(l){l&&R(e),t[24](null),r=!1,n()}}}function pr(t){let e,o,r,n,l,s,i,f,a,g,h,b,m,v,d,w,S,k,x,M,_;return{c(){e=p("a"),o=p("div"),r=p("div"),n=K("oh no, it died!"),l=p("br"),s=K(`click to respawn`),i=G("svg"),f=G("path"),a=L(),g=K(t[2]),h=K(" generations"),b=p("br"),m=L(),v=K(t[4]),d=K(" max cells"),w=p("br"),S=L(),k=K(t[3]),x=K(" min cells"),c(f,"d","M22 11.5a.5.5 0 0 0-1 0 1.4 1.4 0 0 1-1.4 1 1.5 1.5 0 0 1-1.4-1 .5.5 0 0 0-1 0 1.5 1.5 0 0 1-2.7 0v-2h2.2a2.6 2.6 0 0 0 2.7-2.7 2.7 2.7 0 0 0-2.7-2.6h-.5l-.1-.3a2.6 2.6 0 0 0-3.8-1.4l-.3.1-.3-.1a2.6 2.6 0 0 0-2.8 0c-.4.4-.8.8-1 1.4V4h-.6a2.7 2.7 0 0 0-2.7 2.6 2.6 2.6 0 0 0 2.7 2.7h2.3v2a1.3 1.3 0 0 1-1.3 1 1.6 1.6 0 0 1-1.5-1 .5.5 0 0 0-1 0 1.5 1.5 0 0 1-1.4 1 1.4 1.4 0 0 1-1.4-1 .5.5 0 0 0-.5-.4.5.5 0 0 0-.5.6v.4a10 10 0 1 0 20 0v-.5ZM8.3 15.7a1 1 0 1 1 2.1 0 1 1 0 0 1-2 0Zm1.6 3.7a2.1 2.1 0 0 1 4.2 0H10Zm4.7-2.7a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"),T(i,"color",t[7]),c(i,"class","w-48 h-48"),c(i,"aria-hidden","true"),c(i,"xmlns","http://www.w3.org/2000/svg"),c(i,"fill","currentColor"),c(i,"viewBox","0 0 24 24"),T(r,"text-align","center"),c(o,"class","flex flex-col items-center bg-bol-black text-sm p-4"),T(o,"color",t[7]),c(e,"href","/"),c(e,"class","hover:no-underline")},m(O,B){N(O,e,B),u(e,o),u(o,r),u(r,n),u(r,l),u(r,s),u(r,i),u(i,f),u(r,a),u(r,g),u(r,h),u(r,b),u(r,m),u(r,v),u(r,d),u(r,w),u(r,S),u(r,k),u(r,x),M||(_=P(e,"click",Z(t[15].reset)),M=!0)},p(O,B){B[0]&128&&T(i,"color",O[7]),B[0]&4&&ze(g,O[2]),B[0]&16&&ze(v,O[4]),B[0]&8&&ze(k,O[3]),B[0]&128&&T(o,"color",O[7])},d(O){O&&R(e),M=!1,_()}}}function wr(t){let e,o,r,n,l;return{c(){e=p("a"),o=p("img"),Ot(o.src,r=t[6])||c(o,"src",r),c(o,"alt",t[5]),T(o,"width","100%"),T(o,"image-rendering","pixelated"),c(e,"href","/")},m(s,i){N(s,e,i),u(e,o),n||(l=P(e,"click",Z(t[15].toggleAutoPlay)),n=!0)},p(s,i){i[0]&64&&!Ot(o.src,r=s[6])&&c(o,"src",r),i[0]&32&&c(o,"alt",s[5])},d(s){s&&R(e),n=!1,l()}}}function Dt(t){let e,o,r,n,l,s,i,f,a,g,h,b,m,v,d,w,S,k,x,M,_;function O(y,U){return y[8]?br:gr}let B=O(t),C=B(t);function E(y){t[34](y)}let Y={$$slots:{buttonAction:[_r],header:[yr],default:[vr]},$$scope:{ctx:t}};return t[11]!==void 0&&(Y.showModal=t[11]),S=new or({props:Y}),Re.push(()=>Po(S,"showModal",E)),{c(){e=p("div"),o=p("button"),C.c(),r=L(),n=p("button"),l=G("svg"),s=G("path"),i=L(),f=p("button"),a=G("svg"),g=G("path"),h=L(),b=p("button"),m=G("svg"),v=G("path"),d=G("path"),w=L(),dt(S.$$.fragment),c(o,"class","rounded-none bg-bol-black hover:bg-bol-black p-0"),c(s,"fill-rule","evenodd"),c(s,"d","M17 6a1 1 0 1 0-2 0v4L8.6 5.2A1 1 0 0 0 7 6v12a1 1 0 0 0 1.6.8L15 14v4a1 1 0 1 0 2 0V6Z"),c(s,"clip-rule","evenodd"),T(l,"color",t[7]),c(l,"class","w-10 h-10 p-1"),c(l,"aria-hidden","true"),c(l,"xmlns","http://www.w3.org/2000/svg"),c(l,"fill","currentColor"),c(l,"viewBox","0 0 24 24"),c(n,"class","rounded-none bg-bol-black hover:bg-bol-black disabled:bg-opacity-50 disabled:cursor-not-allowed p-0"),n.disabled=t[8],c(g,"stroke","currentColor"),c(g,"stroke-linecap","round"),c(g,"stroke-linejoin","round"),c(g,"stroke-width","2"),c(g,"d","M17.7 7.7A7.1 7.1 0 0 0 5 10.8M18 4v4h-4m-7.7 8.3A7.1 7.1 0 0 0 19 13.2M6 20v-4h4"),T(a,"color",t[7]),c(a,"class","w-10 h-10 p-1"),c(a,"aria-hidden","true"),c(a,"xmlns","http://www.w3.org/2000/svg"),c(a,"fill","none"),c(a,"viewBox","0 0 24 24"),c(f,"class","rounded-none bg-bol-black hover:bg-bol-black disabled:bg-opacity-50 disabled:cursor-not-allowed p-0"),f.disabled=t[8],c(v,"fill-rule","evenodd"),c(v,"d","M13 11.1V4a1 1 0 1 0-2 0v7.1L8.8 8.4a1 1 0 1 0-1.6 1.2l4 5a1 1 0 0 0 1.6 0l4-5a1 1 0 1 0-1.6-1.2L13 11Z"),c(v,"clip-rule","evenodd"),c(d,"fill-rule","evenodd"),c(d,"d","M9.7 15.9 7.4 13H5a2 2 0 0 0-2 2v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.4l-2.3 2.9a3 3 0 0 1-4.6 0Zm7.3.1a1 1 0 1 0 0 2 1 1 0 1 0 0-2Z"),c(d,"clip-rule","evenodd"),T(m,"color",t[7]),c(m,"class","w-10 h-10 p-1"),c(m,"aria-hidden","true"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"fill","currentColor"),c(m,"viewBox","0 0 24 24"),c(b,"class","rounded-none bg-bol-black hover:bg-bol-black disabled:bg-opacity-50 disabled:cursor-not-allowed p-0"),b.disabled=t[8],c(e,"class","flex flex-wrap justify-between mb-5")},m(y,U){N(y,e,U),u(e,o),C.m(o,null),u(e,r),u(e,n),u(n,l),u(l,s),u(e,i),u(e,f),u(f,a),u(a,g),u(e,h),u(e,b),u(b,m),u(m,v),u(m,d),N(y,w,U),qe(S,y,U),x=!0,M||(_=[P(o,"click",t[15].toggleAutoPlay),P(o,"mouseenter",t[25]),P(o,"mouseleave",t[26]),P(n,"click",t[15].next),P(n,"mouseenter",t[27]),P(n,"mouseleave",t[28]),P(f,"click",t[15].reset),P(f,"mouseenter",t[29]),P(f,"mouseleave",t[30]),P(b,"click",t[31]),P(b,"mouseenter",t[32]),P(b,"mouseleave",t[33])],M=!0)},p(y,U){B===(B=O(y))&&C?C.p(y,U):(C.d(1),C=B(y),C&&(C.c(),C.m(o,null))),(!x||U[0]&128)&&T(l,"color",y[7]),(!x||U[0]&256)&&(n.disabled=y[8]),(!x||U[0]&128)&&T(a,"color",y[7]),(!x||U[0]&256)&&(f.disabled=y[8]),(!x||U[0]&128)&&T(m,"color",y[7]),(!x||U[0]&256)&&(b.disabled=y[8]);const A={};U[1]&2097152&&(A.$$scope={dirty:U,ctx:y}),!k&&U[0]&2048&&(k=!0,A.showModal=y[11],Eo(()=>k=!1)),S.$set(A)},i(y){x||(re(S.$$.fragment,y),x=!0)},o(y){pe(S.$$.fragment,y),x=!1},d(y){y&&(R(e),R(w)),C.d(),Ke(S,y),M=!1,se(_)}}}function gr(t){let e,o;return{c(){e=G("svg"),o=G("path"),c(o,"fill-rule","evenodd"),c(o,"d","M8.6 5.2A1 1 0 0 0 7 6v12a1 1 0 0 0 1.6.8l8-6a1 1 0 0 0 0-1.6l-8-6Z"),c(o,"clip-rule","evenodd"),T(e,"color",t[7]),c(e,"class","w-10 h-10 p-1"),c(e,"aria-hidden","true"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"fill","currentColor"),c(e,"viewBox","0 0 24 24")},m(r,n){N(r,e,n),u(e,o)},p(r,n){n[0]&128&&T(e,"color",r[7])},d(r){r&&R(e)}}}function br(t){let e,o;return{c(){e=G("svg"),o=G("path"),c(o,"fill-rule","evenodd"),c(o,"d","M8 5a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H8Zm7 0a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1Z"),c(o,"clip-rule","evenodd"),T(e,"color",t[7]),c(e,"class","w-10 h-10 p-1"),c(e,"aria-hidden","true"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"fill","currentColor"),c(e,"viewBox","0 0 24 24")},m(r,n){N(r,e,n),u(e,o)},p(r,n){n[0]&128&&T(e,"color",r[7])},d(r){r&&R(e)}}}function mr(t){let e;return{c(){e=p("option"),e.textContent=`${t[51]+1} padding`,e.__value=t[51]+1,V(e,e.__value)},m(o,r){N(o,e,r)},p:q,d(o){o&&R(e)}}}function vr(t){let e,o,r,n,l,s,i,f,a,g,h,b,m,v,d,w,S,k,x,M,_,O,B,C,E,Y,y,U,A,z,D,j,W,le,X,F,ie,ae,ce,ue,fe,de,He,De,Se,je,Fe=Uo({length:10}),ne=[];for(let H=0;H<Fe.length;H+=1)ne[H]=mr(dr(t,Fe,H));return{c(){e=p("div"),e.textContent="select color",o=L(),r=p("div"),n=p("a"),n.innerHTML='<div id="#ffd400" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #ffd400"></div>',l=L(),s=p("a"),s.innerHTML='<div id="#00a900" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #00a900"></div>',i=L(),f=p("a"),f.innerHTML='<div id="#ff002c" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #ff002c"></div>',a=L(),g=p("a"),g.innerHTML='<div id="#ff3cae" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #ff3cae"></div>',h=L(),b=p("a"),b.innerHTML='<div id="#b36cff" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #b36cff"></div>',m=L(),v=p("a"),v.innerHTML='<div id="#6089ff" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #6089ff"></div>',d=L(),w=p("a"),w.innerHTML='<div id="#00a28a" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #00a28a"></div>',S=L(),k=p("a"),k.innerHTML='<div id="#c18300" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #c18300"></div>',x=L(),M=p("a"),M.innerHTML='<div id="#959898" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #959898"></div>',_=L(),O=p("a"),O.innerHTML='<div id="#ededed" style="width:30px; height: 30px; border: 2px solid #000000; background-color: #ededed"></div>',B=L(),C=p("div"),E=p("select"),Y=p("option"),Y.textContent="select padding",y=p("option"),y.textContent="no padding";for(let H=0;H<ne.length;H+=1)ne[H].c();U=L(),A=p("hr"),z=L(),D=p("div"),j=p("select"),W=p("option"),W.textContent="select size",le=p("option"),le.textContent="200px",X=p("option"),X.textContent="300px",F=p("option"),F.textContent="400px",ie=p("option"),ie.textContent="500px",ae=p("option"),ae.textContent="600px",ce=p("option"),ce.textContent="700px",ue=p("option"),ue.textContent="800px",fe=p("option"),fe.textContent="900px",de=p("option"),de.textContent="1000px",He=L(),De=p("hr"),c(e,"class","block py-2.5 px-0 w-full text-sm text-bol-dark bg-transparent border-0 appearance-none focus:outline-none focus:ring-0 focus:border-bol-dark peer"),c(n,"href","/"),c(s,"href","/"),c(f,"href","/"),c(g,"href","/"),c(b,"href","/"),c(v,"href","/"),c(w,"href","/"),c(k,"href","/"),c(M,"href","/"),c(O,"href","/"),c(r,"class","flex flex-wrap gap-2 mb-5"),Y.selected=!0,Y.__value="select padding",V(Y,Y.__value),y.__value="0",V(y,y.__value),c(E,"class","w-full text-sm text-bol-dark"),c(C,"class","mb-5"),W.selected=!0,W.__value="select size",V(W,W.__value),le.__value="200",V(le,le.__value),X.__value="300",V(X,X.__value),F.__value="400",V(F,F.__value),ie.__value="500",V(ie,ie.__value),ae.__value="600",V(ae,ae.__value),ce.__value="700",V(ce,ce.__value),ue.__value="800",V(ue,ue.__value),fe.__value="900",V(fe,fe.__value),de.__value="1000",V(de,de.__value),c(j,"class","w-full text-sm text-bol-dark"),c(D,"class","mb-5")},m(H,I){N(H,e,I),N(H,o,I),N(H,r,I),u(r,n),u(r,l),u(r,s),u(r,i),u(r,f),u(r,a),u(r,g),u(r,h),u(r,b),u(r,m),u(r,v),u(r,d),u(r,w),u(r,S),u(r,k),u(r,x),u(r,M),u(r,_),u(r,O),N(H,B,I),N(H,C,I),u(C,E),u(E,Y),u(E,y);for(let J=0;J<ne.length;J+=1)ne[J]&&ne[J].m(E,null);u(C,U),u(C,A),N(H,z,I),N(H,D,I),u(D,j),u(j,W),u(j,le),u(j,X),u(j,F),u(j,ie),u(j,ae),u(j,ce),u(j,ue),u(j,fe),u(j,de),u(D,He),u(D,De),Se||(je=[P(n,"click",Z(t[15].changeColor)),P(s,"click",Z(t[15].changeColor)),P(f,"click",Z(t[15].changeColor)),P(g,"click",Z(t[15].changeColor)),P(b,"click",Z(t[15].changeColor)),P(v,"click",Z(t[15].changeColor)),P(w,"click",Z(t[15].changeColor)),P(k,"click",Z(t[15].changeColor)),P(M,"click",Z(t[15].changeColor)),P(O,"click",Z(t[15].changeColor)),P(E,"change",t[15].changePadding),P(j,"change",t[15].changeSize)],Se=!0)},p:q,d(H){H&&(R(e),R(o),R(r),R(B),R(C),R(z),R(D)),mo(ne,H),Se=!1,se(je)}}}function yr(t){let e;return{c(){e=p("h2"),e.textContent="custom pfp",c(e,"class","mb-3 text-bol-dark"),c(e,"slot","header")},m(o,r){N(o,e,r)},p:q,d(o){o&&R(e)}}}function _r(t){let e,o,r,n;return{c(){e=p("div"),o=p("button"),o.textContent="download",c(o,"class","rounded-none bg-bol-black text-bol-white hover:text-bol-yellow p-2"),c(e,"slot","buttonAction")},m(l,s){N(l,e,s),u(e,o),r||(n=P(o,"click",t[15].download),r=!0)},p:q,d(l){l&&R(e),r=!1,n()}}}function xr(t){let e,o;return{c(){e=p("div"),o=K(t[10]),T(e,"color",t[7])},m(r,n){N(r,e,n),u(e,o)},p(r,n){n[0]&1024&&ze(o,r[10]),n[0]&128&&T(e,"color",r[7])},d(r){r&&R(e)}}}function kr(t){let e,o,r;return{c(){e=p("div"),o=K("generation: "),r=K(t[2]),T(e,"color",t[7])},m(n,l){N(n,e,l),u(e,o),u(e,r)},p(n,l){l[0]&4&&ze(r,n[2]),l[0]&128&&T(e,"color",n[7])},d(n){n&&R(e)}}}function Cr(t){let e,o,r,n,l,s,i,f,a,g,h,b,m,v,d,w,S,k,x,M,_;Oe.title=r=t[14];function O(A,z){return A[9]=="image"?wr:A[12]?pr:hr}let B=O(t),C=B(t),E=!t[12]&&Dt(t);function Y(A,z){return A[8]?kr:xr}let y=Y(t),U=y(t);return{c(){e=p("meta"),o=p("meta"),n=p("style"),n.textContent='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.static{position:static}.absolute{position:absolute}.relative{position:relative}.start-1{inset-inline-start:.25rem}.top-1{top:.25rem}.top-2{top:.5rem}.z-10{z-index:10}.float-end{float:inline-end}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-3{margin-bottom:.75rem}.mb-5{margin-bottom:1.25rem}.ml-5{margin-left:1.25rem}.mr-5{margin-right:1.25rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-48{height:12rem}.h-6{height:1.5rem}.w-10{width:2.5rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-full{width:100%}.origin-\\[0\\]{transform-origin:0}.-translate-y-1{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-4{--tw-translate-y: -1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.rounded-none{border-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-bol-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.bg-bol-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-bol-gray{--tw-bg-opacity: 1;background-color:rgb(149 152 152 / var(--tw-bg-opacity))}.bg-bol-yellow{--tw-bg-opacity: 1;background-color:rgb(255 212 0 / var(--tw-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.pb-2{padding-bottom:.5rem}.pb-2\\.5{padding-bottom:.625rem}.pt-4{padding-top:1rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-bol-dark{--tw-text-opacity: 1;color:rgb(70 75 75 / var(--tw-text-opacity))}.text-bol-white{--tw-text-opacity: 1;color:rgb(237 237 237 / var(--tw-text-opacity))}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}html,body{height:100%;overscroll-behavior-y:contain;background-color:#e94000}a{color:#ffd400}a:hover{color:#ededed}*{-webkit-tap-highlight-color:transparent}button::-moz-focus-inner{border:0}:focus,*:focus{outline:0!important;border:0!important}.hover\\:bg-bol-black:hover{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.hover\\:text-bol-dark:hover{--tw-text-opacity: 1;color:rgb(70 75 75 / var(--tw-text-opacity))}.hover\\:text-bol-gray:hover{--tw-text-opacity: 1;color:rgb(149 152 152 / var(--tw-text-opacity))}.hover\\:text-bol-yellow:hover{--tw-text-opacity: 1;color:rgb(255 212 0 / var(--tw-text-opacity))}.hover\\:no-underline:hover{text-decoration-line:none}.focus\\:border-bol-dark:focus{--tw-border-opacity: 1;border-color:rgb(70 75 75 / var(--tw-border-opacity))}.focus\\:border-bol-white:focus{--tw-border-opacity: 1;border-color:rgb(237 237 237 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-opacity-50:disabled{--tw-bg-opacity: .5}.peer:-moz-placeholder-shown~.peer-placeholder-shown\\:top-1\\/2{top:50%}.peer:placeholder-shown~.peer-placeholder-shown\\:top-1\\/2{top:50%}.peer:-moz-placeholder-shown~.peer-placeholder-shown\\:-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\\:-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:-moz-placeholder-shown~.peer-placeholder-shown\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\\:top-2{top:.5rem}.peer:focus~.peer-focus\\:-translate-y-4{--tw-translate-y: -1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\\:scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\\:px-2{padding-left:.5rem;padding-right:.5rem}.peer:focus~.peer-focus\\:text-bol-white{--tw-text-opacity: 1;color:rgb(237 237 237 / var(--tw-text-opacity))}.peer:focus~.rtl\\:peer-focus\\:left-auto:where([dir=rtl],[dir=rtl] *){left:auto}.peer:focus~.rtl\\:peer-focus\\:translate-x-1\\/4:where([dir=rtl],[dir=rtl] *){--tw-translate-x: 25%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}dialog.svelte-1unyaiu.svelte-1unyaiu{max-width:32em;border-radius:0;border:none;padding:0}dialog.svelte-1unyaiu.svelte-1unyaiu::backdrop{background:rgba(0,0,0,.6)}dialog.svelte-1unyaiu>div.svelte-1unyaiu{padding:1em}dialog[open].svelte-1unyaiu.svelte-1unyaiu{animation:svelte-1unyaiu-zoom .3s cubic-bezier(.34,1.56,.64,1)}@keyframes svelte-1unyaiu-zoom{0%{transform:scale(.95)}to{transform:scale(1)}}dialog[open].svelte-1unyaiu.svelte-1unyaiu::backdrop{animation:svelte-1unyaiu-fade .2s ease-out}@keyframes svelte-1unyaiu-fade{0%{opacity:0}to{opacity:1}}',l=L(),s=p("div"),i=p("div"),f=p("div"),C.c(),a=L(),g=p("div"),h=p("div"),E&&E.c(),b=L(),m=p("div"),v=p("input"),d=L(),w=p("label"),U.c(),S=L(),k=p("div"),k.innerHTML='<a href="http://hash.art" target="_blank">hash.art</a>',c(e,"charset","utf-8"),c(o,"name","viewport"),c(o,"content","width=device-width, initial-scale=1.0"),T(f,"width",t[1]+"px"),c(i,"class","flex items-center justify-center"),c(v,"type","text"),c(v,"id","seedInput"),c(v,"class","block px-2.5 pb-2.5 pt-4 w-full text-sm text-bol-white bg-bol-black rounded-none appearance-none focus:outline-none focus:ring-0 focus:border-bol-white peer"),c(v,"placeholder"," "),c(v,"autocapitalize","off"),c(v,"autocomplete","off"),c(v,"autocorrect","off"),c(v,"spellcheck","false"),v.readOnly=!0,c(w,"for","seedInput"),c(w,"class","absolute text-lg text-bol-white duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-bol-black px-2 peer-focus:px-2 peer-focus:text-bol-white peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto start-1"),c(m,"class","relative mb-3"),T(m,"border","2px solid "+t[7]),c(k,"class","flex items-center justify-center my-5"),T(h,"width","500px"),c(g,"class","flex items-center justify-center mt-5"),c(s,"class","mt-5 ml-5 mr-5")},m(A,z){u(Oe.head,e),u(Oe.head,o),u(Oe.head,n),N(A,l,z),N(A,s,z),u(s,i),u(i,f),C.m(f,null),u(s,a),u(s,g),u(g,h),E&&E.m(h,null),u(h,b),u(h,m),u(m,v),V(v,t[5]),u(m,d),u(m,w),U.m(w,null),u(h,S),u(h,k),x=!0,M||(_=P(v,"input",t[35]),M=!0)},p(A,z){(!x||z[0]&16384)&&r!==(r=A[14])&&(Oe.title=r),B===(B=O(A))&&C?C.p(A,z):(C.d(1),C=B(A),C&&(C.c(),C.m(f,null))),(!x||z[0]&2)&&T(f,"width",A[1]+"px"),A[12]?E&&(Kt(),pe(E,1,1,()=>{E=null}),Gt()):E?(E.p(A,z),z[0]&4096&&re(E,1)):(E=Dt(A),E.c(),re(E,1),E.m(h,b)),z[0]&32&&v.value!==A[5]&&V(v,A[5]),y===(y=Y(A))&&U?U.p(A,z):(U.d(1),U=y(A),U&&(U.c(),U.m(w,null))),(!x||z[0]&128)&&T(m,"border","2px solid "+A[7])},i(A){x||(re(E),x=!0)},o(A){pe(E),x=!1},d(A){A&&(R(l),R(s)),R(e),R(o),R(n),C.d(),E&&E.d(),U.d(),M=!1,_()}}}let we="HASHART",ge="lower",Ar=!1,be=255,me="#e94000",ve=255,ye="#000000",_e=255,Er=300,Mr=4e3,Sr=0,Ur="#000000";function Pr(t,e,o){let r=document.createElement("img");r.onload=function(){var n=document.createElement("canvas"),l=n.getContext("2d");n.width=e,n.height=o,l.imageSmoothingEnabled=!1,l.drawImage(this,0,0,e,o);var s=n.toDataURL("image/webp",1);const i=document.createElement("a");i.href=s,i.download="bol-pfp.webp",i.click()},r.src=t}function jt(t,e){return t.sort(function(){return .5-Math.random()}).slice(0,e)[0]}function Or(t,e,o){let r,n,l,s,i,f,a,g,h,b,m,v,d,w="0";try{w=document.querySelector("script[s]").getAttribute("s")}catch{}let S,k,x,M,_,O,B=["#ffd400","#00a900","#ff002c","#ff3cae","#b36cff","#6089ff","#00a28a","#c18300","#959898","#ededed"],C=jt(B,1),E=0,Y=fr.rules,y=!1,U,A="image",z="blocks of life",D=500,j=`blocks of life: ${w}`,W=!1;Co(()=>{F.autoplayBol(),o(6,M=X(w,we,ge,E,C,be,me,ve,ye,_e).src),o(16,x=X(w,we,ge,E,C,be,me,ve,ye,_e).matrix)});function le(I,J){I=_.getContext("2d"),o(21,i=0),J.forEach((he,$)=>{he.forEach((ee,Ye)=>{ee&&o(21,i++,i);let Ue=C;ee||(Ue=Ur),I.fillStyle=Ue,I.fillRect(Ye*s,$*s,s,s)})})}function X(I,J,he,$,ee,Ye,Ue,Mt,St,Ut){return S=Q.generate(I,J,he,$,ee,Ye,Ue,Mt,St,Ut),k=Q.generate(I,J,he,10,ee,Ye,Ue,Mt,St,Ut),{src:S.asDataUri(Ar),matrix:ie(k.values,30)}}const F={download(){Pr(M,D,D)},stop(){y&&(cancelAnimationFrame(U),o(8,y=!1),o(12,h=!0))},clear(){if(o(13,v=!1),o(9,A="image"),o(2,n=-1),o(21,i=0),o(20,f=0),o(4,a=0),o(3,g=0),o(19,b=1),o(18,m=10),o(12,h=!1),y){cancelAnimationFrame(U),o(8,y=!1);return}},autoplayBol(){setTimeout(function(){v&&r&&F.toggleAutoPlay()},Mr)},changeColor(I){o(9,A="image"),o(7,C=I.target.id),o(6,M=X(w,we,ge,E,C,be,me,ve,ye,_e).src),o(16,x=X(w,we,ge,E,C,be,me,ve,ye,_e).matrix)},changePadding(I){isNaN(I.target.value)||(E=parseInt(I.target.value),o(6,M=X(w,we,ge,E,C,be,me,ve,ye,_e).src))},changeSize(I){isNaN(I.target.value)||o(1,D=parseInt(I.target.value))},reset(){F.clear(),o(7,C=jt(B,1)),o(6,M=X(w,we,ge,E,C,be,me,ve,ye,_e).src),o(16,x=X(w,we,ge,E,C,be,me,ve,ye,_e).matrix)},next(){o(13,v=!1),o(9,A="canvas"),o(17,r=cr(r,d)),o(2,n++,n)},play(){h||F.next(),y&&setTimeout(function(){U=requestAnimationFrame(F.play)},Er)},toggleAutoPlay(){if(o(9,A="canvas"),y){cancelAnimationFrame(U),o(8,y=!1);return}o(8,y=!0),F.play()}};function ie(I,J){let he=[],$,ee;for($=0,ee=-1;$<I.length;$++)$%J===0&&(ee++,he[ee]=[]),I[$]!=1&&(I[$]=0),he[ee].push(I[$]);return he}function ae(I){Re[I?"unshift":"push"](()=>{_=I,o(0,_),o(23,l),o(22,s),o(1,D),o(43,O),o(17,r),o(21,i),o(20,f),o(19,b),o(4,a),o(2,n),o(3,g),o(18,m),o(16,x)})}const ce=()=>{y?o(10,z="pause"):o(10,z="play")},ue=()=>{o(10,z="blocks of life")},fe=()=>{y?o(10,z="disabled while playing"):o(10,z="step")},de=()=>{o(10,z="blocks of life")},He=()=>{y?o(10,z="disabled while playing"):o(10,z="reset")},De=()=>{o(10,z="blocks of life")},Se=()=>{F.clear(),o(13,v=!1),o(11,W=!0)},je=()=>{y?o(10,z="disabled while playing"):o(10,z="custom pfp")},Fe=()=>{o(10,z="blocks of life")};function ne(I){W=I,o(11,W)}function H(){w=this.value,o(5,w)}return t.$$.update=()=>{t.$$.dirty[0]&65536&&o(17,r=x),t.$$.dirty[0]&16646175&&_&&l&&s&&(o(0,_.height=D/(D/240),_),o(0,_.width=D/(D/240),_),le(O,r),i===f?o(19,b++,b):(o(19,b=1),o(20,f=i)),i>a&&o(4,a=i),n===0&&o(3,g=i),i<g&&o(3,g=i),(i===0||b===m)&&(o(12,h=!0),F.stop(),o(10,z="blocks of life")))},o(2,n=-1),o(23,l=16),o(22,s=8),o(21,i=0),o(20,f=0),o(4,a=0),o(3,g=0),o(12,h=!1),o(19,b=1),o(18,m=10),o(13,v=!0),d=ar(Y,Sr),[_,D,n,g,a,w,M,C,y,A,z,W,h,v,j,F,x,r,m,b,f,i,s,l,ae,ce,ue,fe,de,He,De,Se,je,Fe,ne,H]}class zr extends vt{constructor(e){super(),mt(this,e,Or,Cr,We,{},null,[-1,-1])}}const Ft={"/":zr};function Ir(t){let e,o,r;var n=t[0];function l(s,i){return{}}return n&&(e=zt(n,l())),{c(){e&&dt(e.$$.fragment),o=vo()},m(s,i){e&&qe(e,s,i),N(s,o,i),r=!0},p(s,[i]){if(i&1&&n!==(n=s[0])){if(e){Kt();const f=e;pe(f.$$.fragment,1,0,()=>{Ke(f,1)}),Gt()}n?(e=zt(n,l()),dt(e.$$.fragment),re(e.$$.fragment,1),qe(e,o.parentNode,o)):e=null}},i(s){r||(e&&re(e.$$.fragment,s),r=!0)},o(s){e&&pe(e.$$.fragment,s),r=!1},d(s){s&&R(o),e&&Ke(e,s)}}}function Lr(t,e,o){let r,n;return go(t,Je,l=>o(1,n=l)),oe.sideEffect=!1,t.$$.update=()=>{t.$$.dirty&2&&o(0,r=Ft[n]||Ft["/"])},[r,n]}class Rr extends vt{constructor(e){super(),mt(this,e,Lr,Ir,We,{})}}new Rr({target:document.body});