-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelm.js
1 lines (1 loc) · 88.5 KB
/
elm.js
1
!function(scope){"use strict";function F(arity,fun,wrapper){return wrapper.a=arity,wrapper.f=fun,wrapper}function F2(fun){return F(2,fun,function(a){return function(b){return fun(a,b)}})}function F3(fun){return F(3,fun,function(a){return function(b){return function(c){return fun(a,b,c)}}})}function F4(fun){return F(4,fun,function(a){return function(b){return function(c){return function(d){return fun(a,b,c,d)}}}})}function F5(fun){return F(5,fun,function(a){return function(b){return function(c){return function(d){return function(e){return fun(a,b,c,d,e)}}}}})}function F6(fun){return F(6,fun,function(a){return function(b){return function(c){return function(d){return function(e){return function(f){return fun(a,b,c,d,e,f)}}}}}})}function F7(fun){return F(7,fun,function(a){return function(b){return function(c){return function(d){return function(e){return function(f){return function(g){return fun(a,b,c,d,e,f,g)}}}}}}})}function F8(fun){return F(8,fun,function(a){return function(b){return function(c){return function(d){return function(e){return function(f){return function(g){return function(h){return fun(a,b,c,d,e,f,g,h)}}}}}}}})}function F9(fun){return F(9,fun,function(a){return function(b){return function(c){return function(d){return function(e){return function(f){return function(g){return function(h){return function(i){return fun(a,b,c,d,e,f,g,h,i)}}}}}}}}})}function A2(fun,a,b){return 2===fun.a?fun.f(a,b):fun(a)(b)}function A3(fun,a,b,c){return 3===fun.a?fun.f(a,b,c):fun(a)(b)(c)}function A4(fun,a,b,c,d){return 4===fun.a?fun.f(a,b,c,d):fun(a)(b)(c)(d)}function A5(fun,a,b,c,d,e){return 5===fun.a?fun.f(a,b,c,d,e):fun(a)(b)(c)(d)(e)}function A6(fun,a,b,c,d,e,f){return 6===fun.a?fun.f(a,b,c,d,e,f):fun(a)(b)(c)(d)(e)(f)}function _Utils_eq(x,y){for(var pair,stack=[],isEqual=_Utils_eqHelp(x,y,0,stack);isEqual&&(pair=stack.pop());isEqual=_Utils_eqHelp(pair.a,pair.b,0,stack));return isEqual}function _Utils_eqHelp(x,y,depth,stack){if(x===y)return!0;if("object"!=typeof x||null===x||null===y)return"function"==typeof x&&_Debug_crash(5),!1;if(100<depth)return stack.push({a:x,b:y}),!0;for(var key in x.$<0&&(x=$elm$core$Dict$toList(x),y=$elm$core$Dict$toList(y)),x)if(!_Utils_eqHelp(x[key],y[key],depth+1,stack))return!1;return!0}var _Utils_equal=F2(_Utils_eq);F2(function(a,b){return!_Utils_eq(a,b)});function _Utils_cmp(x,y,ord){if("object"!=typeof x)return x===y?0:x<y?-1:1;if(void 0===x.$)return(ord=_Utils_cmp(x.a,y.a))||(ord=_Utils_cmp(x.b,y.b))?ord:_Utils_cmp(x.c,y.c);for(;x.b&&y.b&&!(ord=_Utils_cmp(x.a,y.a));x=x.b,y=y.b);return ord||(x.b?1:y.b?-1:0)}F2(function(a,b){return _Utils_cmp(a,b)<0}),F2(function(a,b){return _Utils_cmp(a,b)<1}),F2(function(a,b){return 0<_Utils_cmp(a,b)}),F2(function(a,b){return 0<=_Utils_cmp(a,b)});var _Utils_compare=F2(function(x,y){var n=_Utils_cmp(x,y);return n<0?$elm$core$Basics$LT:n?$elm$core$Basics$GT:$elm$core$Basics$EQ}),_Utils_Tuple0=0;function _Utils_update(oldRecord,updatedFields){var newRecord={};for(var key in oldRecord)newRecord[key]=oldRecord[key];for(var key in updatedFields)newRecord[key]=updatedFields[key];return newRecord}F2(_Utils_ap);function _Utils_ap(xs,ys){if("string"==typeof xs)return xs+ys;if(!xs.b)return ys;var root={$:1,a:xs.a,b:ys};xs=xs.b;for(var curr=root;xs.b;xs=xs.b)curr=curr.b={$:1,a:xs.a,b:ys};return root}var _List_Nil={$:0};function _List_Cons(hd,tl){return{$:1,a:hd,b:tl}}var _List_cons=F2(_List_Cons);function _List_fromArray(arr){for(var out=_List_Nil,i=arr.length;i--;)out={$:1,a:arr[i],b:out};return out}function _List_toArray(xs){for(var out=[];xs.b;xs=xs.b)out.push(xs.a);return out}var _List_map2=F3(function(f,xs,ys){for(var arr=[];xs.b&&ys.b;xs=xs.b,ys=ys.b)arr.push(A2(f,xs.a,ys.a));return _List_fromArray(arr)});F4(function(f,xs,ys,zs){for(var arr=[];xs.b&&ys.b&&zs.b;xs=xs.b,ys=ys.b,zs=zs.b)arr.push(A3(f,xs.a,ys.a,zs.a));return _List_fromArray(arr)}),F5(function(f,ws,xs,ys,zs){for(var arr=[];ws.b&&xs.b&&ys.b&&zs.b;ws=ws.b,xs=xs.b,ys=ys.b,zs=zs.b)arr.push(A4(f,ws.a,xs.a,ys.a,zs.a));return _List_fromArray(arr)}),F6(function(f,vs,ws,xs,ys,zs){for(var arr=[];vs.b&&ws.b&&xs.b&&ys.b&&zs.b;vs=vs.b,ws=ws.b,xs=xs.b,ys=ys.b,zs=zs.b)arr.push(A5(f,vs.a,ws.a,xs.a,ys.a,zs.a));return _List_fromArray(arr)}),F2(function(f,xs){return _List_fromArray(_List_toArray(xs).sort(function(a,b){return _Utils_cmp(f(a),f(b))}))}),F2(function(f,xs){return _List_fromArray(_List_toArray(xs).sort(function(a,b){var ord=A2(f,a,b);return ord===$elm$core$Basics$EQ?0:ord===$elm$core$Basics$LT?-1:1}))});var _JsArray_initialize=F3(function(size,offset,func){for(var result=Array(size),i=0;i<size;i++)result[i]=func(offset+i);return result}),_JsArray_initializeFromList=F2(function(max,ls){for(var result=Array(max),i=0;i<max&&ls.b;i++)result[i]=ls.a,ls=ls.b;return result.length=i,{a:result,b:ls}}),_JsArray_unsafeGet=F2(function(index,array){return array[index]}),_JsArray_unsafeSet=F3(function(index,value,array){for(var length=array.length,result=Array(length),i=0;i<length;i++)result[i]=array[i];return result[index]=value,result}),_JsArray_foldr=(F2(function(value,array){for(var length=array.length,result=Array(length+1),i=0;i<length;i++)result[i]=array[i];return result[length]=value,result}),F3(function(func,acc,array){for(var length=array.length,i=0;i<length;i++)acc=A2(func,array[i],acc);return acc}),F3(function(func,acc,array){for(var i=array.length-1;0<=i;i--)acc=A2(func,array[i],acc);return acc})),_JsArray_map=F2(function(func,array){for(var length=array.length,result=Array(length),i=0;i<length;i++)result[i]=func(array[i]);return result});F3(function(func,offset,array){for(var length=array.length,result=Array(length),i=0;i<length;i++)result[i]=A2(func,offset+i,array[i]);return result}),F3(function(from,to,array){return array.slice(from,to)}),F3(function(n,dest,source){var destLen=dest.length,itemsToCopy=n-destLen;source.length<itemsToCopy&&(itemsToCopy=source.length);for(var result=Array(destLen+itemsToCopy),i=0;i<destLen;i++)result[i]=dest[i];for(i=0;i<itemsToCopy;i++)result[i+destLen]=source[i];return result}),F2(function(tag,value){return value}),F2(function(tag,value){return console.log(tag+": <internals>"),value});function _Debug_crash(identifier){throw Error("https://github.com/elm/core/blob/1.0.0/hints/"+identifier+".md")}F2(function(a,b){return a+b}),F2(function(a,b){return a-b}),F2(function(a,b){return a*b}),F2(function(a,b){return a/b}),F2(function(a,b){return a/b|0}),F2(Math.pow),F2(function(b,a){return a%b});var _Basics_modBy=F2(function(modulus,x){var answer=x%modulus;return 0===modulus?_Debug_crash(11):0<answer&&modulus<0||answer<0&&0<modulus?answer+modulus:answer});F2(Math.atan2);var _Basics_ceiling=Math.ceil,_Basics_floor=Math.floor,_Basics_log=Math.log;F2(function(a,b){return a&&b}),F2(function(a,b){return a||b}),F2(function(a,b){return a!==b}),F2(function(chr,str){return chr+str});F2(function(a,b){return a+b});F2(function(func,string){for(var len=string.length,array=Array(len),i=0;i<len;){var word=string.charCodeAt(i);word<55296||56319<word?(array[i]=func(string[i]),i++):(array[i]=func(string[i]+string[i+1]),i+=2)}return array.join("")}),F2(function(isGood,str){for(var arr=[],len=str.length,i=0;i<len;){var char=str[i],word=str.charCodeAt(i);i++,word<55296||56319<word||(char+=str[i],i++),isGood(char)&&arr.push(char)}return arr.join("")});F3(function(func,state,string){for(var len=string.length,i=0;i<len;){var char=string[i],word=string.charCodeAt(i);i++,word<55296||56319<word||(char+=string[i],i++),state=A2(func,char,state)}return state}),F3(function(func,state,string){for(var i=string.length;i--;){var char=string[i],word=string.charCodeAt(i);word<56320||57343<word||(char=string[--i]+char),state=A2(func,char,state)}return state});var _String_split=F2(function(sep,str){return str.split(sep)}),_String_join=F2(function(sep,strs){return strs.join(sep)}),_String_slice=F3(function(start,end,str){return str.slice(start,end)});F2(function(isGood,string){for(var i=string.length;i--;){var char=string[i],word=string.charCodeAt(i);if(word<56320||57343<word||(char=string[--i]+char),isGood(char))return!0}return!1});var _String_all=F2(function(isGood,string){for(var i=string.length;i--;){var char=string[i],word=string.charCodeAt(i);if(word<56320||57343<word||(char=string[--i]+char),!isGood(char))return!1}return!0}),_String_contains=F2(function(sub,str){return!!~str.indexOf(sub)}),_String_indexes=(F2(function(sub,str){return 0==str.indexOf(sub)}),F2(function(sub,str){return sub.length<=str.length&&str.lastIndexOf(sub)==str.length-sub.length}),F2(function(sub,str){var subLen=sub.length;if(subLen<1)return _List_Nil;for(var i=0,is=[];-1<(i=str.indexOf(sub,i));)is.push(i),i+=subLen;return _List_fromArray(is)}));var _Json_decodeInt={$:2,b:function(value){return"number"!=typeof value||(value<=-2147483647||2147483647<=value||(0|value)!==value)&&(!isFinite(value)||value%1)?_Json_expecting("an INT",value):$elm$core$Result$Ok(value)}},_Json_decodeString={$:2,b:function(value){return"string"==typeof value?$elm$core$Result$Ok(value):value instanceof String?$elm$core$Result$Ok(value+""):_Json_expecting("a STRING",value)}};var _Json_decodeField=F2(function(field,decoder){return{$:6,d:field,b:decoder}});F2(function(index,decoder){return{$:7,e:index,b:decoder}});var _Json_andThen=F2(function(callback,decoder){return{$:10,b:decoder,h:callback}});var _Json_map1=F2(function(f,d1){return{$:9,f:f,g:[d1]}}),_Json_map2=F3(function(f,d1,d2){return{$:9,f:f,g:[d1,d2]}}),_Json_run=(F4(function(f,d1,d2,d3){return{$:9,f:f,g:[d1,d2,d3]}}),F5(function(f,d1,d2,d3,d4){return{$:9,f:f,g:[d1,d2,d3,d4]}}),F6(function(f,d1,d2,d3,d4,d5){return{$:9,f:f,g:[d1,d2,d3,d4,d5]}}),F7(function(f,d1,d2,d3,d4,d5,d6){return{$:9,f:f,g:[d1,d2,d3,d4,d5,d6]}}),F8(function(f,d1,d2,d3,d4,d5,d6,d7){return{$:9,f:f,g:[d1,d2,d3,d4,d5,d6,d7]}}),F9(function(f,d1,d2,d3,d4,d5,d6,d7,d8){return{$:9,f:f,g:[d1,d2,d3,d4,d5,d6,d7,d8]}}),F2(function(decoder,string){try{return _Json_runHelp(decoder,JSON.parse(string))}catch(e){return $elm$core$Result$Err(A2($elm$json$Json$Decode$Failure,"This is not valid JSON! "+e.message,string))}}),F2(_Json_runHelp));function _Json_runHelp(decoder,value){switch(decoder.$){case 2:return decoder.b(value);case 5:return null===value?$elm$core$Result$Ok(decoder.c):_Json_expecting("null",value);case 3:return _Json_isArray(value)?_Json_runArrayDecoder(decoder.b,value,_List_fromArray):_Json_expecting("a LIST",value);case 4:return _Json_isArray(value)?_Json_runArrayDecoder(decoder.b,value,_Json_toElmArray):_Json_expecting("an ARRAY",value);case 6:var field=decoder.d;if("object"!=typeof value||null===value||!(field in value))return _Json_expecting("an OBJECT with a field named `"+field+"`",value);var result=_Json_runHelp(decoder.b,value[field]);return $elm$core$Result$isOk(result)?result:$elm$core$Result$Err(A2($elm$json$Json$Decode$Field,field,result.a));case 7:var index=decoder.e;if(!_Json_isArray(value))return _Json_expecting("an ARRAY",value);if(value.length<=index)return _Json_expecting("a LONGER array. Need index "+index+" but only see "+value.length+" entries",value);result=_Json_runHelp(decoder.b,value[index]);return $elm$core$Result$isOk(result)?result:$elm$core$Result$Err(A2($elm$json$Json$Decode$Index,index,result.a));case 8:if("object"!=typeof value||null===value||_Json_isArray(value))return _Json_expecting("an OBJECT",value);var keyValuePairs=_List_Nil;for(var key in value)if(value.hasOwnProperty(key)){result=_Json_runHelp(decoder.b,value[key]);if(!$elm$core$Result$isOk(result))return $elm$core$Result$Err(A2($elm$json$Json$Decode$Field,key,result.a));keyValuePairs={$:1,a:{a:key,b:result.a},b:keyValuePairs}}return $elm$core$Result$Ok($elm$core$List$reverse(keyValuePairs));case 9:for(var answer=decoder.f,decoders=decoder.g,i=0;i<decoders.length;i++){result=_Json_runHelp(decoders[i],value);if(!$elm$core$Result$isOk(result))return result;answer=answer(result.a)}return $elm$core$Result$Ok(answer);case 10:result=_Json_runHelp(decoder.b,value);return $elm$core$Result$isOk(result)?_Json_runHelp(decoder.h(result.a),value):result;case 11:for(var errors=_List_Nil,temp=decoder.g;temp.b;temp=temp.b){result=_Json_runHelp(temp.a,value);if($elm$core$Result$isOk(result))return result;errors={$:1,a:result.a,b:errors}}return $elm$core$Result$Err($elm$json$Json$Decode$OneOf($elm$core$List$reverse(errors)));case 1:return $elm$core$Result$Err(A2($elm$json$Json$Decode$Failure,decoder.a,value));case 0:return $elm$core$Result$Ok(decoder.a)}}function _Json_runArrayDecoder(decoder,value,toElmValue){for(var len=value.length,array=Array(len),i=0;i<len;i++){var result=_Json_runHelp(decoder,value[i]);if(!$elm$core$Result$isOk(result))return $elm$core$Result$Err(A2($elm$json$Json$Decode$Index,i,result.a));array[i]=result.a}return $elm$core$Result$Ok(toElmValue(array))}function _Json_isArray(value){return Array.isArray(value)||"undefined"!=typeof FileList&&value instanceof FileList}function _Json_toElmArray(array){return A2($elm$core$Array$initialize,array.length,function(i){return array[i]})}function _Json_expecting(type,value){return $elm$core$Result$Err(A2($elm$json$Json$Decode$Failure,"Expecting "+type,value))}function _Json_equality(x,y){if(x===y)return!0;if(x.$!==y.$)return!1;switch(x.$){case 0:case 1:return x.a===y.a;case 2:return x.b===y.b;case 5:return x.c===y.c;case 3:case 4:case 8:return _Json_equality(x.b,y.b);case 6:return x.d===y.d&&_Json_equality(x.b,y.b);case 7:return x.e===y.e&&_Json_equality(x.b,y.b);case 9:return x.f===y.f&&_Json_listEquality(x.g,y.g);case 10:return x.h===y.h&&_Json_equality(x.b,y.b);case 11:return _Json_listEquality(x.g,y.g)}}function _Json_listEquality(aDecoders,bDecoders){var len=aDecoders.length;if(len!==bDecoders.length)return!1;for(var i=0;i<len;i++)if(!_Json_equality(aDecoders[i],bDecoders[i]))return!1;return!0}var _Json_encode=F2(function(indentLevel,value){return JSON.stringify(value,null,indentLevel)+""});function _Json_wrap(value){return value}F3(function(key,value,object){return object[key]=value,object});function _Scheduler_succeed(value){return{$:0,a:value}}var _Scheduler_andThen=F2(function(callback,task){return{$:3,b:callback,d:task}});F2(function(callback,task){return{$:4,b:callback,d:task}});var _Scheduler_guid=0;function _Scheduler_rawSpawn(task){var proc={$:0,e:_Scheduler_guid++,f:task,g:null,h:[]};return _Scheduler_enqueue(proc),proc}function _Scheduler_spawn(task){return{$:2,b:function(callback){callback({$:0,a:_Scheduler_rawSpawn(task)})},c:null}}function _Scheduler_rawSend(proc,msg){proc.h.push(msg),_Scheduler_enqueue(proc)}var _Scheduler_send=F2(function(proc,msg){return{$:2,b:function(callback){_Scheduler_rawSend(proc,msg),callback({$:0,a:_Utils_Tuple0})},c:null}});var _Scheduler_working=!1,_Scheduler_queue=[];function _Scheduler_enqueue(proc){if(_Scheduler_queue.push(proc),!_Scheduler_working){for(_Scheduler_working=!0;proc=_Scheduler_queue.shift();)!function(proc){for(;proc.f;){var rootTag=proc.f.$;if(0===rootTag||1===rootTag){for(;proc.g&&proc.g.$!==rootTag;)proc.g=proc.g.i;if(!proc.g)return;proc.f=proc.g.b(proc.f.a),proc.g=proc.g.i}else{if(2===rootTag)return proc.f.c=proc.f.b(function(newRoot){proc.f=newRoot,_Scheduler_enqueue(proc)});if(5===rootTag){if(0===proc.h.length)return;proc.f=proc.f.b(proc.h.shift())}else proc.g={$:3===rootTag?0:1,b:proc.f.b,i:proc.g},proc.f=proc.f.d}}}(proc);_Scheduler_working=!1}}F4(function(impl,flagDecoder,debugMetadata,args){return _Platform_initialize(flagDecoder,args,impl.aF,impl.aN,impl.aL,function(){return function(){}})});function _Platform_initialize(flagDecoder,args,init,update,subscriptions,stepperBuilder){var result=A2(_Json_run,flagDecoder,args?args.flags:void 0);$elm$core$Result$isOk(result)||_Debug_crash(2);var managers={},initPair=init(result.a),model=initPair.a,stepper=stepperBuilder(sendToApp,model),ports=function(managers,sendToApp){var ports;for(var key in _Platform_effectManagers){var manager=_Platform_effectManagers[key];manager.a&&((ports=ports||{})[key]=manager.a(key,sendToApp)),managers[key]=function(info,sendToApp){var router={g:sendToApp,h:void 0},onEffects=info.c,onSelfMsg=info.d,cmdMap=info.e,subMap=info.f;return router.h=_Scheduler_rawSpawn(A2(_Scheduler_andThen,function loop(state){return A2(_Scheduler_andThen,loop,{$:5,b:function(msg){var value=msg.a;return 0===msg.$?A3(onSelfMsg,router,value,state):cmdMap&&subMap?A4(onEffects,router,value.i,value.j,state):A3(onEffects,router,cmdMap?value.i:value.j,state)}})},info.b))}(manager,sendToApp)}return ports}(managers,sendToApp);function sendToApp(msg,viewMetadata){var pair=A2(update,msg,model);stepper(model=pair.a,viewMetadata),_Platform_enqueueEffects(managers,pair.b,subscriptions(model))}return _Platform_enqueueEffects(managers,initPair.b,subscriptions(model)),ports?{ports:ports}:{}}var _Platform_effectManagers={};var _Platform_sendToApp=F2(function(router,msg){return{$:2,b:function(callback){router.g(msg),callback({$:0,a:_Utils_Tuple0})},c:null}}),_Platform_sendToSelf=F2(function(router,msg){return A2(_Scheduler_send,router.h,{$:0,a:msg})});function _Platform_leaf(home){return function(value){return{$:1,k:home,l:value}}}function _Platform_batch(list){return{$:2,m:list}}F2(function(tagger,bag){return{$:3,n:tagger,o:bag}});var _Platform_effectsQueue=[],_Platform_effectsActive=!1;function _Platform_enqueueEffects(managers,cmdBag,subBag){if(_Platform_effectsQueue.push({p:managers,q:cmdBag,r:subBag}),!_Platform_effectsActive){_Platform_effectsActive=!0;for(var fx;fx=_Platform_effectsQueue.shift();)!function(managers,cmdBag,subBag){var effectsDict={};for(var home in _Platform_gatherEffects(!0,cmdBag,effectsDict,null),_Platform_gatherEffects(!1,subBag,effectsDict,null),managers)_Scheduler_rawSend(managers[home],{$:"fx",a:effectsDict[home]||{i:_List_Nil,j:_List_Nil}})}(fx.p,fx.q,fx.r);_Platform_effectsActive=!1}}function _Platform_gatherEffects(isCmd,bag,effectsDict,taggers){switch(bag.$){case 1:var home=bag.k,effect=function(isCmd,home,taggers,value){return A2(isCmd?_Platform_effectManagers[home].e:_Platform_effectManagers[home].f,function(x){for(var temp=taggers;temp;temp=temp.t)x=temp.s(x);return x},value)}(isCmd,home,taggers,bag.l);return void(effectsDict[home]=function(isCmd,newEffect,effects){return effects=effects||{i:_List_Nil,j:_List_Nil},isCmd?effects.i={$:1,a:newEffect,b:effects.i}:effects.j={$:1,a:newEffect,b:effects.j},effects}(isCmd,effect,effectsDict[home]));case 2:for(var list=bag.m;list.b;list=list.b)_Platform_gatherEffects(isCmd,list.a,effectsDict,taggers);return;case 3:return void _Platform_gatherEffects(isCmd,bag.o,effectsDict,{s:bag.n,t:taggers})}}F2(function(tagger,value){return value});var _VirtualDom_divertHrefToApp;F2(function(tagger,finalTagger){return function(value){return tagger(finalTagger(value))}});var _VirtualDom_doc="undefined"!=typeof document?document:{};F4(function(virtualNode,flagDecoder,debugMetadata,args){var node=args.node;return node.parentNode.replaceChild(_VirtualDom_render(virtualNode,function(){}),node),{}});function _VirtualDom_text(string){return{$:0,a:string}}var _VirtualDom_node=F2(function(namespace,tag){return F2(function(factList,kidList){for(var kids=[],descendantsCount=0;kidList.b;kidList=kidList.b){var kid=kidList.a;descendantsCount+=kid.b||0,kids.push(kid)}return descendantsCount+=kids.length,{$:1,c:tag,d:_VirtualDom_organizeFacts(factList),e:kids,f:namespace,b:descendantsCount}})})(void 0);F2(function(namespace,tag){return F2(function(factList,kidList){for(var kids=[],descendantsCount=0;kidList.b;kidList=kidList.b){var kid=kidList.a;descendantsCount+=kid.b.b||0,kids.push(kid)}return descendantsCount+=kids.length,{$:2,c:tag,d:_VirtualDom_organizeFacts(factList),e:kids,f:namespace,b:descendantsCount}})})(void 0);F2(function(tagger,node){return{$:4,j:tagger,k:node,b:1+(node.b||0)}});function _VirtualDom_thunk(refs,thunk){return{$:5,l:refs,m:thunk,k:void 0}}F2(function(func,a){return _VirtualDom_thunk([func,a],function(){return func(a)})}),F3(function(func,a,b){return _VirtualDom_thunk([func,a,b],function(){return A2(func,a,b)})}),F4(function(func,a,b,c){return _VirtualDom_thunk([func,a,b,c],function(){return A3(func,a,b,c)})}),F5(function(func,a,b,c,d){return _VirtualDom_thunk([func,a,b,c,d],function(){return A4(func,a,b,c,d)})}),F6(function(func,a,b,c,d,e){return _VirtualDom_thunk([func,a,b,c,d,e],function(){return A5(func,a,b,c,d,e)})}),F7(function(func,a,b,c,d,e,f){return _VirtualDom_thunk([func,a,b,c,d,e,f],function(){return A6(func,a,b,c,d,e,f)})}),F8(function(func,a,b,c,d,e,f,g){return _VirtualDom_thunk([func,a,b,c,d,e,f,g],function(){return function(fun,a,b,c,d,e,f,g){return 7===fun.a?fun.f(a,b,c,d,e,f,g):fun(a)(b)(c)(d)(e)(f)(g)}(func,a,b,c,d,e,f,g)})}),F9(function(func,a,b,c,d,e,f,g,h){return _VirtualDom_thunk([func,a,b,c,d,e,f,g,h],function(){return function(fun,a,b,c,d,e,f,g,h){return 8===fun.a?fun.f(a,b,c,d,e,f,g,h):fun(a)(b)(c)(d)(e)(f)(g)(h)}(func,a,b,c,d,e,f,g,h)})});var _VirtualDom_on=F2(function(key,handler){return{$:"a0",n:key,o:handler}}),_VirtualDom_property=(F2(function(key,value){return{$:"a1",n:key,o:value}}),F2(function(key,value){return{$:"a2",n:key,o:value}})),_VirtualDom_attribute=F2(function(key,value){return{$:"a3",n:key,o:value}});F3(function(namespace,key,value){return{$:"a4",n:key,o:{f:namespace,o:value}}});F2(function(func,attr){return"a0"===attr.$?A2(_VirtualDom_on,attr.n,function(func,handler){var tag=$elm$virtual_dom$VirtualDom$toHandlerInt(handler);return{$:handler.$,a:tag?A3($elm$json$Json$Decode$map2,tag<3?_VirtualDom_mapEventTuple:_VirtualDom_mapEventRecord,$elm$json$Json$Decode$succeed(func),handler.a):A2($elm$json$Json$Decode$map,func,handler.a)}}(func,attr.o)):attr});var _VirtualDom_passiveSupported,_VirtualDom_mapEventTuple=F2(function(func,tuple){return{a:func(tuple.a),b:tuple.b}}),_VirtualDom_mapEventRecord=F2(function(func,record){return{w:func(record.w),X:record.X,U:record.U}});function _VirtualDom_organizeFacts(factList){for(var facts={};factList.b;factList=factList.b){var subFacts,entry=factList.a,tag=entry.$,key=entry.n,value=entry.o;"a2"!==tag?(subFacts=facts[tag]||(facts[tag]={}),"a3"===tag&&"class"===key?_VirtualDom_addClass(subFacts,key,value):subFacts[key]=value):"className"===key?_VirtualDom_addClass(facts,key,value):facts[key]=value}return facts}function _VirtualDom_addClass(object,key,newClass){var classes=object[key];object[key]=classes?classes+" "+newClass:newClass}function _VirtualDom_render(vNode,eventNode){var tag=vNode.$;if(5===tag)return _VirtualDom_render(vNode.k||(vNode.k=vNode.m()),eventNode);if(0===tag)return _VirtualDom_doc.createTextNode(vNode.a);if(4===tag){for(var subNode=vNode.k,tagger=vNode.j;4===subNode.$;)"object"!=typeof tagger?tagger=[tagger,subNode.j]:tagger.push(subNode.j),subNode=subNode.k;var subEventRoot={j:tagger,p:eventNode};return(domNode=_VirtualDom_render(subNode,subEventRoot)).elm_event_node_ref=subEventRoot,domNode}if(3===tag)return _VirtualDom_applyFacts(domNode=vNode.h(vNode.g),eventNode,vNode.d),domNode;var domNode=vNode.f?_VirtualDom_doc.createElementNS(vNode.f,vNode.c):_VirtualDom_doc.createElement(vNode.c);_VirtualDom_divertHrefToApp&&"a"==vNode.c&&domNode.addEventListener("click",_VirtualDom_divertHrefToApp(domNode)),_VirtualDom_applyFacts(domNode,eventNode,vNode.d);for(var kids=vNode.e,i=0;i<kids.length;i++)domNode.appendChild(_VirtualDom_render(1===tag?kids[i]:kids[i].b,eventNode));return domNode}function _VirtualDom_applyFacts(domNode,eventNode,facts){for(var key in facts){var value=facts[key];"a1"===key?function(domNode,styles){var domNodeStyle=domNode.style;for(var key in styles)domNodeStyle[key]=styles[key]}(domNode,value):"a0"===key?function(domNode,eventNode,events){var allCallbacks=domNode.elmFs||(domNode.elmFs={});for(var key in events){var newHandler=events[key],oldCallback=allCallbacks[key];if(newHandler){if(oldCallback){if(oldCallback.q.$===newHandler.$){oldCallback.q=newHandler;continue}domNode.removeEventListener(key,oldCallback)}oldCallback=function(eventNode,initialHandler){function callback(event){var handler=callback.q,result=_Json_runHelp(handler.a,event);if($elm$core$Result$isOk(result)){for(var tagger,tag=$elm$virtual_dom$VirtualDom$toHandlerInt(handler),value=result.a,message=tag?tag<3?value.a:value.w:value,stopPropagation=1==tag?value.b:3==tag&&value.X,currentEventNode=(stopPropagation&&event.stopPropagation(),(2==tag?value.b:3==tag&&value.U)&&event.preventDefault(),eventNode);tagger=currentEventNode.j;){if("function"==typeof tagger)message=tagger(message);else for(var i=tagger.length;i--;)message=tagger[i](message);currentEventNode=currentEventNode.p}currentEventNode(message,stopPropagation)}}return callback.q=initialHandler,callback}(eventNode,newHandler),domNode.addEventListener(key,oldCallback,_VirtualDom_passiveSupported&&{passive:$elm$virtual_dom$VirtualDom$toHandlerInt(newHandler)<2}),allCallbacks[key]=oldCallback}else domNode.removeEventListener(key,oldCallback),allCallbacks[key]=void 0}}(domNode,eventNode,value):"a3"===key?function(domNode,attrs){for(var key in attrs){var value=attrs[key];void 0!==value?domNode.setAttribute(key,value):domNode.removeAttribute(key)}}(domNode,value):"a4"===key?function(domNode,nsAttrs){for(var key in nsAttrs){var pair=nsAttrs[key],namespace=pair.f,value=pair.o;void 0!==value?domNode.setAttributeNS(namespace,key,value):domNode.removeAttributeNS(namespace,key)}}(domNode,value):("value"!==key&&"checked"!==key||domNode[key]!==value)&&(domNode[key]=value)}}try{window.addEventListener("t",null,Object.defineProperty({},"passive",{get:function(){_VirtualDom_passiveSupported=!0}}))}catch(e){}function _VirtualDom_diff(x,y){var patches=[];return _VirtualDom_diffHelp(x,y,patches,0),patches}function _VirtualDom_pushPatch(patches,type,index,data){var patch={$:type,r:index,s:data,t:void 0,u:void 0};return patches.push(patch),patch}function _VirtualDom_diffHelp(x,y,patches,index){if(x!==y){var xType=x.$,yType=y.$;if(xType!==yType){if(1!==xType||2!==yType)return void _VirtualDom_pushPatch(patches,0,index,y);y=function(keyedNode){for(var keyedKids=keyedNode.e,len=keyedKids.length,kids=Array(len),i=0;i<len;i++)kids[i]=keyedKids[i].b;return{$:1,c:keyedNode.c,d:keyedNode.d,e:kids,f:keyedNode.f,b:keyedNode.b}}(y),yType=1}switch(yType){case 5:for(var xRefs=x.l,yRefs=y.l,i=xRefs.length,same=i===yRefs.length;same&&i--;)same=xRefs[i]===yRefs[i];if(same)return void(y.k=x.k);y.k=y.m();var subPatches=[];return _VirtualDom_diffHelp(x.k,y.k,subPatches,0),void(0<subPatches.length&&_VirtualDom_pushPatch(patches,1,index,subPatches));case 4:for(var xTaggers=x.j,yTaggers=y.j,nesting=!1,xSubNode=x.k;4===xSubNode.$;)nesting=!0,"object"!=typeof xTaggers?xTaggers=[xTaggers,xSubNode.j]:xTaggers.push(xSubNode.j),xSubNode=xSubNode.k;for(var ySubNode=y.k;4===ySubNode.$;)nesting=!0,"object"!=typeof yTaggers?yTaggers=[yTaggers,ySubNode.j]:yTaggers.push(ySubNode.j),ySubNode=ySubNode.k;return nesting&&xTaggers.length!==yTaggers.length?void _VirtualDom_pushPatch(patches,0,index,y):((nesting?function(as,bs){for(var i=0;i<as.length;i++)if(as[i]!==bs[i])return!1;return!0}(xTaggers,yTaggers):xTaggers===yTaggers)||_VirtualDom_pushPatch(patches,2,index,yTaggers),void _VirtualDom_diffHelp(xSubNode,ySubNode,patches,index+1));case 0:return void(x.a!==y.a&&_VirtualDom_pushPatch(patches,3,index,y.a));case 1:return void _VirtualDom_diffNodes(x,y,patches,index,_VirtualDom_diffKids);case 2:return void _VirtualDom_diffNodes(x,y,patches,index,_VirtualDom_diffKeyedKids);case 3:if(x.h!==y.h)return void _VirtualDom_pushPatch(patches,0,index,y);var factsDiff=_VirtualDom_diffFacts(x.d,y.d);factsDiff&&_VirtualDom_pushPatch(patches,4,index,factsDiff);var patch=y.i(x.g,y.g);return void(patch&&_VirtualDom_pushPatch(patches,5,index,patch))}}}function _VirtualDom_diffNodes(x,y,patches,index,diffKids){var factsDiff;x.c===y.c&&x.f===y.f?((factsDiff=_VirtualDom_diffFacts(x.d,y.d))&&_VirtualDom_pushPatch(patches,4,index,factsDiff),diffKids(x,y,patches,index)):_VirtualDom_pushPatch(patches,0,index,y)}function _VirtualDom_diffFacts(x,y,category){var diff,xValue,yValue,subDiff;for(var xKey in x){"a1"!==xKey&&"a0"!==xKey&&"a3"!==xKey&&"a4"!==xKey?xKey in y?(xValue=x[xKey])===(yValue=y[xKey])&&"value"!==xKey&&"checked"!==xKey||"a0"===category&&function(x,y){return x.$==y.$&&_Json_equality(x.a,y.a)}(xValue,yValue)||((diff=diff||{})[xKey]=yValue):(diff=diff||{})[xKey]=category?"a1"===category?"":"a0"===category||"a3"===category?void 0:{f:x[xKey].f,o:void 0}:"string"==typeof x[xKey]?"":null:(subDiff=_VirtualDom_diffFacts(x[xKey],y[xKey]||{},xKey))&&((diff=diff||{})[xKey]=subDiff)}for(var yKey in y)yKey in x||((diff=diff||{})[yKey]=y[yKey]);return diff}function _VirtualDom_diffKids(xParent,yParent,patches,index){var xKids=xParent.e,yKids=yParent.e,xLen=xKids.length,yLen=yKids.length;yLen<xLen?_VirtualDom_pushPatch(patches,6,index,{v:yLen,i:xLen-yLen}):xLen<yLen&&_VirtualDom_pushPatch(patches,7,index,{v:xLen,e:yKids});for(var minLen=xLen<yLen?xLen:yLen,i=0;i<minLen;i++){var xKid=xKids[i];_VirtualDom_diffHelp(xKid,yKids[i],patches,++index),index+=xKid.b||0}}function _VirtualDom_diffKeyedKids(xParent,yParent,patches,rootIndex){for(var localPatches=[],changes={},inserts=[],xKids=xParent.e,yKids=yParent.e,xLen=xKids.length,yLen=yKids.length,xIndex=0,yIndex=0,index=rootIndex;xIndex<xLen&&yIndex<yLen;){var x,xKey=(x=xKids[xIndex]).a,yKey=(y=yKids[yIndex]).a,xNode=x.b,yNode=y.b,newMatch=void 0,oldMatch=void 0;if(xKey!==yKey){var xNextKey,xNextNode,yNextKey,yNextNode,xNext=xKids[xIndex+1],yNext=yKids[yIndex+1];if(xNext&&(xNextNode=xNext.b,oldMatch=yKey===(xNextKey=xNext.a)),yNext&&(yNextNode=yNext.b,newMatch=xKey===(yNextKey=yNext.a)),newMatch&&oldMatch)_VirtualDom_diffHelp(xNode,yNextNode,localPatches,++index),_VirtualDom_insertNode(changes,localPatches,xKey,yNode,yIndex,inserts),index+=xNode.b||0,_VirtualDom_removeNode(changes,localPatches,xKey,xNextNode,++index),index+=xNextNode.b||0,xIndex+=2,yIndex+=2;else if(newMatch)index++,_VirtualDom_insertNode(changes,localPatches,yKey,yNode,yIndex,inserts),_VirtualDom_diffHelp(xNode,yNextNode,localPatches,index),index+=xNode.b||0,xIndex+=1,yIndex+=2;else if(oldMatch)_VirtualDom_removeNode(changes,localPatches,xKey,xNode,++index),index+=xNode.b||0,_VirtualDom_diffHelp(xNextNode,yNode,localPatches,++index),index+=xNextNode.b||0,xIndex+=2,yIndex+=1;else{if(!xNext||xNextKey!==yNextKey)break;_VirtualDom_removeNode(changes,localPatches,xKey,xNode,++index),_VirtualDom_insertNode(changes,localPatches,yKey,yNode,yIndex,inserts),index+=xNode.b||0,_VirtualDom_diffHelp(xNextNode,yNextNode,localPatches,++index),index+=xNextNode.b||0,xIndex+=2,yIndex+=2}}else _VirtualDom_diffHelp(xNode,yNode,localPatches,++index),index+=xNode.b||0,xIndex++,yIndex++}for(;xIndex<xLen;){_VirtualDom_removeNode(changes,localPatches,(x=xKids[xIndex]).a,xNode=x.b,++index),index+=xNode.b||0,xIndex++}for(;yIndex<yLen;){var y,endInserts=endInserts||[];_VirtualDom_insertNode(changes,localPatches,(y=yKids[yIndex]).a,y.b,void 0,endInserts),yIndex++}(0<localPatches.length||0<inserts.length||endInserts)&&_VirtualDom_pushPatch(patches,8,rootIndex,{w:localPatches,x:inserts,y:endInserts})}var _VirtualDom_POSTFIX="_elmW6BL";function _VirtualDom_insertNode(changes,localPatches,key,vnode,yIndex,inserts){var entry=changes[key];if(!entry)return inserts.push({r:yIndex,A:entry={c:0,z:vnode,r:yIndex,s:void 0}}),void(changes[key]=entry);if(1===entry.c){inserts.push({r:yIndex,A:entry}),entry.c=2;var subPatches=[];return _VirtualDom_diffHelp(entry.z,vnode,subPatches,entry.r),entry.r=yIndex,void(entry.s.s={w:subPatches,A:entry})}_VirtualDom_insertNode(changes,localPatches,key+_VirtualDom_POSTFIX,vnode,yIndex,inserts)}function _VirtualDom_removeNode(changes,localPatches,key,vnode,index){var entry=changes[key];if(entry){if(0===entry.c){entry.c=2;var subPatches=[];return _VirtualDom_diffHelp(vnode,entry.z,subPatches,index),void _VirtualDom_pushPatch(localPatches,9,index,{w:subPatches,A:entry})}_VirtualDom_removeNode(changes,localPatches,key+_VirtualDom_POSTFIX,vnode,index)}else{var patch=_VirtualDom_pushPatch(localPatches,9,index,void 0);changes[key]={c:1,z:vnode,r:index,s:patch}}}function _VirtualDom_addDomNodes(domNode,vNode,patches,eventNode){!function _VirtualDom_addDomNodesHelp(domNode,vNode,patches,i,low,high,eventNode){var patch=patches[i];var index=patch.r;for(;index===low;){var data,subPatches,patchType=patch.$;if(1===patchType?_VirtualDom_addDomNodes(domNode,vNode.k,patch.s,eventNode):8===patchType?(patch.t=domNode,patch.u=eventNode,0<(subPatches=patch.s.w).length&&_VirtualDom_addDomNodesHelp(domNode,vNode,subPatches,0,low,high,eventNode)):9===patchType?(patch.t=domNode,patch.u=eventNode,(data=patch.s)&&(data.A.s=domNode,0<(subPatches=data.w).length&&_VirtualDom_addDomNodesHelp(domNode,vNode,subPatches,0,low,high,eventNode))):(patch.t=domNode,patch.u=eventNode),!(patch=patches[++i])||(index=patch.r)>high)return i}var tag=vNode.$;if(4===tag){for(var subNode=vNode.k;4===subNode.$;)subNode=subNode.k;return _VirtualDom_addDomNodesHelp(domNode,subNode,patches,i,low+1,high,domNode.elm_event_node_ref)}var vKids=vNode.e;var childNodes=domNode.childNodes;for(var j=0;j<vKids.length;j++){var vKid=1===tag?vKids[j]:vKids[j].b,nextLow=++low+(vKid.b||0);if(low<=index&&index<=nextLow&&(i=_VirtualDom_addDomNodesHelp(childNodes[j],vKid,patches,i,low,nextLow,eventNode),!(patch=patches[i])||(index=patch.r)>high))return i;low=nextLow}return i}(domNode,vNode,patches,0,0,vNode.b,eventNode)}function _VirtualDom_applyPatches(rootDomNode,oldVirtualNode,patches,eventNode){return 0===patches.length?rootDomNode:(_VirtualDom_addDomNodes(rootDomNode,oldVirtualNode,patches,eventNode),_VirtualDom_applyPatchesHelp(rootDomNode,patches))}function _VirtualDom_applyPatchesHelp(rootDomNode,patches){for(var i=0;i<patches.length;i++){var patch=patches[i],localDomNode=patch.t,newNode=function(domNode,patch){switch(patch.$){case 0:return function(domNode,vNode,eventNode){var parentNode=domNode.parentNode,newNode=_VirtualDom_render(vNode,eventNode);newNode.elm_event_node_ref||(newNode.elm_event_node_ref=domNode.elm_event_node_ref);parentNode&&newNode!==domNode&&parentNode.replaceChild(newNode,domNode);return newNode}(domNode,patch.s,patch.u);case 4:return _VirtualDom_applyFacts(domNode,patch.u,patch.s),domNode;case 3:return domNode.replaceData(0,domNode.length,patch.s),domNode;case 1:return _VirtualDom_applyPatchesHelp(domNode,patch.s);case 2:return domNode.elm_event_node_ref?domNode.elm_event_node_ref.j=patch.s:domNode.elm_event_node_ref={j:patch.s,p:patch.u},domNode;case 6:for(var data=patch.s,i=0;i<data.i;i++)domNode.removeChild(domNode.childNodes[data.v]);return domNode;case 7:for(var kids=(data=patch.s).e,theEnd=domNode.childNodes[i=data.v];i<kids.length;i++)domNode.insertBefore(_VirtualDom_render(kids[i],patch.u),theEnd);return domNode;case 9:if(!(data=patch.s))return domNode.parentNode.removeChild(domNode),domNode;var entry=data.A;return void 0!==entry.r&&domNode.parentNode.removeChild(domNode),entry.s=_VirtualDom_applyPatchesHelp(domNode,data.w),domNode;case 8:return function(domNode,patch){var data=patch.s,frag=function(endInserts,patch){if(!endInserts)return;for(var frag=_VirtualDom_doc.createDocumentFragment(),i=0;i<endInserts.length;i++){var entry=endInserts[i].A;frag.appendChild(2===entry.c?entry.s:_VirtualDom_render(entry.z,patch.u))}return frag}(data.y,patch);domNode=_VirtualDom_applyPatchesHelp(domNode,data.w);for(var inserts=data.x,i=0;i<inserts.length;i++){var insert=inserts[i],entry=insert.A,node=2===entry.c?entry.s:_VirtualDom_render(entry.z,patch.u);domNode.insertBefore(node,domNode.childNodes[insert.r])}frag&&domNode.appendChild(frag);return domNode}(domNode,patch);case 5:return patch.s(domNode);default:_Debug_crash(10)}}(localDomNode,patch);localDomNode===rootDomNode&&(rootDomNode=newNode)}return rootDomNode}function _VirtualDom_virtualize(node){if(3===node.nodeType)return{$:0,a:node.textContent};if(1!==node.nodeType)return{$:0,a:""};for(var attrList=_List_Nil,attrs=node.attributes,i=attrs.length;i--;)var attr=attrs[i],attrList={$:1,a:A2(_VirtualDom_attribute,attr.name,attr.value),b:attrList};for(var tag=node.tagName.toLowerCase(),kidList=_List_Nil,kids=node.childNodes,i=kids.length;i--;)kidList={$:1,a:_VirtualDom_virtualize(kids[i]),b:kidList};return A3(_VirtualDom_node,tag,attrList,kidList)}var _Browser_element=F4(function(impl,flagDecoder,debugMetadata,args){return _Platform_initialize(flagDecoder,args,impl.aF,impl.aN,impl.aL,function(sendToApp,initialModel){var view=impl.aO,domNode=args.node,currNode=_VirtualDom_virtualize(domNode);return _Browser_makeAnimator(initialModel,function(model){var nextNode=view(model),patches=_VirtualDom_diff(currNode,nextNode);domNode=_VirtualDom_applyPatches(domNode,currNode,patches,sendToApp),currNode=nextNode})})}),_Browser_requestAnimationFrame=(F4(function(impl,flagDecoder,debugMetadata,args){return _Platform_initialize(flagDecoder,args,impl.aF,impl.aN,impl.aL,function(sendToApp,initialModel){var divertHrefToApp=impl.V&&impl.V(sendToApp),view=impl.aO,title=_VirtualDom_doc.title,bodyNode=_VirtualDom_doc.body,currNode=_VirtualDom_virtualize(bodyNode);return _Browser_makeAnimator(initialModel,function(model){_VirtualDom_divertHrefToApp=divertHrefToApp;var doc=view(model),nextNode=_VirtualDom_node("body")(_List_Nil)(doc.ay),patches=_VirtualDom_diff(currNode,nextNode);bodyNode=_VirtualDom_applyPatches(bodyNode,currNode,patches,sendToApp),currNode=nextNode,_VirtualDom_divertHrefToApp=0,title!==doc.aM&&(_VirtualDom_doc.title=title=doc.aM)})})}),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame:function(callback){return setTimeout(callback,1e3/60)});function _Browser_makeAnimator(model,draw){draw(model);var state=0;function updateIfNeeded(){state=1===state?0:(_Browser_requestAnimationFrame(updateIfNeeded),draw(model),1)}return function(nextModel,isSync){model=nextModel,isSync?(draw(model),2===state&&(state=1)):(0===state&&_Browser_requestAnimationFrame(updateIfNeeded),state=2)}}F2(function(key,n){return A2($elm$core$Task$perform,$elm$core$Basics$never,{$:2,b:function(){n&&history.go(n),key()},c:null})}),F2(function(key,url){return A2($elm$core$Task$perform,$elm$core$Basics$never,{$:2,b:function(){history.pushState({},"",url),key()},c:null})}),F2(function(key,url){return A2($elm$core$Task$perform,$elm$core$Basics$never,{$:2,b:function(){history.replaceState({},"",url),key()},c:null})});var _Browser_fakeNode={addEventListener:function(){},removeEventListener:function(){}},_Browser_window="undefined"!=typeof window?window:_Browser_fakeNode;F3(function(node,eventName,sendToSelf){return _Scheduler_spawn({$:2,b:function(){function handler(event){_Scheduler_rawSpawn(sendToSelf(event))}return node.addEventListener(eventName,handler,_VirtualDom_passiveSupported&&{passive:!0}),function(){node.removeEventListener(eventName,handler)}},c:null})}),F2(function(decoder,event){var result=_Json_runHelp(decoder,event);return $elm$core$Result$isOk(result)?$elm$core$Maybe$Just(result.a):$elm$core$Maybe$Nothing});function _Browser_withNode(id,doStuff){return{$:2,b:function(callback){_Browser_requestAnimationFrame(function(){var node=document.getElementById(id);callback(node?{$:0,a:doStuff(node)}:{$:1,a:$elm$browser$Browser$Dom$NotFound(id)})})},c:null}}F2(function(functionName,id){return _Browser_withNode(id,function(node){return node[functionName](),_Utils_Tuple0})});F2(function(x,y){return doStuff=function(){return _Browser_window.scroll(x,y),_Utils_Tuple0},{$:2,b:function(callback){_Browser_requestAnimationFrame(function(){callback({$:0,a:doStuff()})})},c:null};var doStuff});F3(function(id,x,y){return _Browser_withNode(id,function(node){return node.scrollLeft=x,node.scrollTop=y,_Utils_Tuple0})});var _Time_setInterval=F2(function(interval,task){return{$:2,b:function(){var id=setInterval(function(){_Scheduler_rawSpawn(task)},interval);return function(){clearInterval(id)}},c:null}});F2(function(a,b){return a&b}),F2(function(a,b){return a|b}),F2(function(a,b){return a^b});F2(function(offset,a){return a<<offset}),F2(function(offset,a){return a>>offset}),F2(function(offset,a){return a>>>offset});function $elm$json$Json$Decode$indent(str){return A2($elm$core$String$join,"\n ",A2($elm$core$String$split,"\n",str))}function $elm$core$List$length(xs){return A3($elm$core$List$foldl,F2(function(_v0,i){return i+1}),0,xs)}function $elm$core$Char$isLower(_char){var code=$elm$core$Char$toCode(_char);return 97<=code&&code<=122}function $elm$core$Char$isUpper(_char){var code=$elm$core$Char$toCode(_char);return code<=90&&65<=code}function $elm$core$Char$isAlphaNum(_char){return $elm$core$Char$isLower(_char)||$elm$core$Char$isUpper(_char)||function(_char){var code=$elm$core$Char$toCode(_char);return code<=57&&48<=code}(_char)}function $elm$core$Basics$identity(x){return x}function $elm$core$Task$sequence(tasks){return A3($elm$core$List$foldr,$elm$core$Task$map2($elm$core$List$cons),$elm$core$Task$succeed(_List_Nil),tasks)}var $elm$core$Basics$EQ=1,$elm$core$Basics$GT=2,$elm$core$Basics$LT=0,$elm$core$List$cons=_List_cons,$elm$core$Dict$foldr=F3(function(func,acc,t){for(;;){if(-2===t.$)return acc;var left=t.d,$temp$func=func,$temp$acc=A3(func,t.b,t.c,A3($elm$core$Dict$foldr,func,acc,t.e));func=$temp$func,acc=$temp$acc,t=left}}),$elm$core$Dict$toList=function(dict){return A3($elm$core$Dict$foldr,F3(function(key,value,list){return A2($elm$core$List$cons,{a:key,b:value},list)}),_List_Nil,dict)},$elm$core$Elm$JsArray$foldr=_JsArray_foldr,$elm$core$Array$foldr=F3(function(func,baseCase,_v0){var tree=_v0.c,tail=_v0.d,helper=F2(function(node,acc){return A3($elm$core$Elm$JsArray$foldr,node.$?func:helper,acc,node.a)});return A3($elm$core$Elm$JsArray$foldr,helper,A3($elm$core$Elm$JsArray$foldr,func,baseCase,tail),tree)}),$elm$core$Array$toList=function(array){return A3($elm$core$Array$foldr,$elm$core$List$cons,_List_Nil,array)},$elm$core$Result$Err=function(a){return{$:1,a:a}},$elm$json$Json$Decode$Failure=F2(function(a,b){return{$:3,a:a,b:b}}),$elm$json$Json$Decode$Field=F2(function(a,b){return{$:0,a:a,b:b}}),$elm$json$Json$Decode$Index=F2(function(a,b){return{$:1,a:a,b:b}}),$elm$core$Result$Ok=function(a){return{$:0,a:a}},$elm$json$Json$Decode$OneOf=function(a){return{$:2,a:a}},$elm$core$Maybe$Just=function(a){return{$:0,a:a}},$elm$core$Maybe$Nothing={$:1},$elm$core$String$all=_String_all,$elm$json$Json$Encode$encode=_Json_encode,$elm$core$String$fromInt=function(number){return number+""},$elm$core$String$join=F2(function(sep,chunks){return A2(_String_join,sep,_List_toArray(chunks))}),$elm$core$String$split=F2(function(sep,string){return _List_fromArray(A2(_String_split,sep,string))}),$elm$core$List$foldl=F3(function(func,acc,list){for(;;){if(!list.b)return acc;var xs=list.b,$temp$func=func,$temp$acc=A2(func,list.a,acc);func=$temp$func,acc=$temp$acc,list=xs}}),$elm$core$List$map2=_List_map2,$elm$core$List$rangeHelp=F3(function(lo,hi,list){for(;;){if(1<=_Utils_cmp(lo,hi))return list;var $temp$lo=lo,$temp$hi=hi-1,$temp$list=A2($elm$core$List$cons,hi,list);lo=$temp$lo,hi=$temp$hi,list=$temp$list}}),$elm$core$List$range=F2(function(lo,hi){return A3($elm$core$List$rangeHelp,lo,hi,_List_Nil)}),$elm$core$List$indexedMap=F2(function(f,xs){return A3($elm$core$List$map2,f,A2($elm$core$List$range,0,$elm$core$List$length(xs)-1),xs)}),$elm$core$Char$toCode=function(char){var code=char.charCodeAt(0);return code<55296||56319<code?code:1024*(code-55296)+char.charCodeAt(1)-56320+65536},$elm$core$List$reverse=function(list){return A3($elm$core$List$foldl,$elm$core$List$cons,_List_Nil,list)},$elm$core$String$uncons=function(string){var word=string.charCodeAt(0);return isNaN(word)?$elm$core$Maybe$Nothing:$elm$core$Maybe$Just(word<55296||56319<word?{a:string[0],b:string.slice(1)}:{a:string[0]+string[1],b:string.slice(2)})},$elm$json$Json$Decode$errorOneOf=F2(function(i,error){return"\n\n("+$elm$core$String$fromInt(i+1)+(") "+$elm$json$Json$Decode$indent($elm$json$Json$Decode$errorToString(error)))}),$elm$json$Json$Decode$errorToString=function(error){return A2($elm$json$Json$Decode$errorToStringHelp,error,_List_Nil)},$elm$json$Json$Decode$errorToStringHelp=F2(function(error,context){errorToStringHelp:for(;;)switch(error.$){case 0:var f=error.a,err=error.b,isSimple=function(){var _v1=$elm$core$String$uncons(f);if(1===_v1.$)return!1;var _v2=_v1.a,rest=_v2.b;return function(_char){return $elm$core$Char$isLower(_char)||$elm$core$Char$isUpper(_char)}(_v2.a)&&A2($elm$core$String$all,$elm$core$Char$isAlphaNum,rest)}(),$temp$error=err,$temp$context=A2($elm$core$List$cons,isSimple?"."+f:"['"+f+"']",context);error=$temp$error,context=$temp$context;continue errorToStringHelp;case 1:var err=error.b,indexName="["+$elm$core$String$fromInt(error.a)+"]",$temp$error=err,$temp$context=A2($elm$core$List$cons,indexName,context);error=$temp$error,context=$temp$context;continue errorToStringHelp;case 2:var errors=error.a;if(errors.b){if(errors.b.b){var introduction=(context.b?"The Json.Decode.oneOf at json"+A2($elm$core$String$join,"",$elm$core$List$reverse(context)):"Json.Decode.oneOf")+" failed in the following "+$elm$core$String$fromInt($elm$core$List$length(errors))+" ways:";return A2($elm$core$String$join,"\n\n",A2($elm$core$List$cons,introduction,A2($elm$core$List$indexedMap,$elm$json$Json$Decode$errorOneOf,errors)))}error=$temp$error=err=errors.a,context=$temp$context=context;continue errorToStringHelp}return"Ran into a Json.Decode.oneOf with no possibilities"+(context.b?" at json"+A2($elm$core$String$join,"",$elm$core$List$reverse(context)):"!");default:var msg=error.a,json=error.b;return(introduction=context.b?"Problem with the value at json"+A2($elm$core$String$join,"",$elm$core$List$reverse(context))+":\n\n ":"Problem with the given value:\n\n")+($elm$json$Json$Decode$indent(A2($elm$json$Json$Encode$encode,4,json))+"\n\n")+msg}}),$elm$core$Array$Array_elm_builtin=F4(function(a,b,c,d){return{$:0,a:a,b:b,c:c,d:d}}),$elm$core$Elm$JsArray$empty=[],$elm$core$Basics$ceiling=_Basics_ceiling,$elm$core$Basics$logBase=F2(function(base,number){return _Basics_log(number)/_Basics_log(base)}),$elm$core$Array$shiftStep=$elm$core$Basics$ceiling(A2($elm$core$Basics$logBase,2,32)),$elm$core$Array$empty=A4($elm$core$Array$Array_elm_builtin,0,$elm$core$Array$shiftStep,$elm$core$Elm$JsArray$empty,$elm$core$Elm$JsArray$empty),$elm$core$Elm$JsArray$initialize=_JsArray_initialize,$elm$core$Basics$eq=(F2(function(f,x){return f(x)}),F2(function(x,f){return f(x)}),_Utils_equal),$elm$core$Basics$floor=_Basics_floor,$elm$core$Elm$JsArray$length=function(array){return array.length},$elm$core$Basics$max=F2(function(x,y){return 0<_Utils_cmp(x,y)?x:y}),$elm$core$Elm$JsArray$initializeFromList=_JsArray_initializeFromList,$elm$core$Array$compressNodes=F2(function(nodes,acc){for(;;){var _v0=A2($elm$core$Elm$JsArray$initializeFromList,32,nodes),remainingNodes=_v0.b,newAcc=A2($elm$core$List$cons,{$:0,a:_v0.a},acc);if(!remainingNodes.b)return $elm$core$List$reverse(newAcc);nodes=remainingNodes,acc=newAcc}}),$elm$core$Array$treeFromBuilder=F2(function(nodeList,nodeListSize){for(;;){var newNodeSize=$elm$core$Basics$ceiling(nodeListSize/32);if(1===newNodeSize)return A2($elm$core$Elm$JsArray$initializeFromList,32,nodeList).a;nodeList=A2($elm$core$Array$compressNodes,nodeList,_List_Nil),nodeListSize=newNodeSize}}),$elm$core$Array$builderToArray=F2(function(reverseNodeList,builder){if(builder.b){var treeLen=32*builder.b,depth=$elm$core$Basics$floor(A2($elm$core$Basics$logBase,32,treeLen-1)),correctNodeList=reverseNodeList?$elm$core$List$reverse(builder.e):builder.e,tree=A2($elm$core$Array$treeFromBuilder,correctNodeList,builder.b);return A4($elm$core$Array$Array_elm_builtin,$elm$core$Elm$JsArray$length(builder.d)+treeLen,A2($elm$core$Basics$max,5,depth*$elm$core$Array$shiftStep),tree,builder.d)}return A4($elm$core$Array$Array_elm_builtin,$elm$core$Elm$JsArray$length(builder.d),$elm$core$Array$shiftStep,$elm$core$Elm$JsArray$empty,builder.d)}),$elm$core$Array$initializeHelp=F5(function(fn,fromIndex,len,nodeList,tail){for(;;){if(fromIndex<0)return A2($elm$core$Array$builderToArray,!1,{e:nodeList,b:len/32|0,d:tail});var leaf={$:1,a:A3($elm$core$Elm$JsArray$initialize,32,fromIndex,fn)};fn=fn,fromIndex=fromIndex-32,len=len,nodeList=A2($elm$core$List$cons,leaf,nodeList),tail=tail}}),$elm$core$Array$initialize=F2(function(len,fn){if(0<len){var tailLen=len%32,tail=A3($elm$core$Elm$JsArray$initialize,tailLen,len-tailLen,fn);return A5($elm$core$Array$initializeHelp,fn,len-tailLen-32,len,_List_Nil,tail)}return $elm$core$Array$empty}),$elm$core$Result$isOk=function(result){return!result.$},$elm$json$Json$Decode$map=_Json_map1,$elm$json$Json$Decode$map2=_Json_map2,$elm$json$Json$Decode$succeed=function(msg){return{$:0,a:msg}},$elm$virtual_dom$VirtualDom$toHandlerInt=function(handler){switch(handler.$){case 0:return 0;case 1:return 1;case 2:return 2;default:return 3}},$elm$browser$Browser$Dom$NotFound=$elm$core$Basics$identity,$elm$url$Url$Url=F6(function(protocol,host,port_,path,query,fragment){return{ac:fragment,ae:host,ai:path,ak:port_,an:protocol,ao:query}}),$elm$core$String$contains=_String_contains,$elm$core$String$length=function(str){return str.length},$elm$core$String$slice=_String_slice,$elm$core$String$dropLeft=F2(function(n,string){return n<1?string:A3($elm$core$String$slice,n,$elm$core$String$length(string),string)}),$elm$core$String$indexes=_String_indexes,$elm$core$String$left=F2(function(n,string){return n<1?"":A3($elm$core$String$slice,0,n,string)}),$elm$core$String$toInt=function(str){for(var total=0,code0=str.charCodeAt(0),start=43==code0||45==code0?1:0,i=start;i<str.length;++i){var code=str.charCodeAt(i);if(code<48||57<code)return $elm$core$Maybe$Nothing;total=10*total+code-48}return i==start?$elm$core$Maybe$Nothing:$elm$core$Maybe$Just(45==code0?-total:total)},$elm$url$Url$chompBeforePath=F5(function(protocol,path,params,frag,str){if(""===str||A2($elm$core$String$contains,"@",str))return $elm$core$Maybe$Nothing;var _v0=A2($elm$core$String$indexes,":",str);if(_v0.b){if(_v0.b.b)return $elm$core$Maybe$Nothing;var i=_v0.a,_v1=$elm$core$String$toInt(A2($elm$core$String$dropLeft,i+1,str));if(1===_v1.$)return $elm$core$Maybe$Nothing;var port_=_v1;return $elm$core$Maybe$Just(A6($elm$url$Url$Url,protocol,A2($elm$core$String$left,i,str),port_,path,params,frag))}return $elm$core$Maybe$Just(A6($elm$url$Url$Url,protocol,str,$elm$core$Maybe$Nothing,path,params,frag))}),$elm$url$Url$chompBeforeQuery=F4(function(protocol,params,frag,str){if(""===str)return $elm$core$Maybe$Nothing;var _v0=A2($elm$core$String$indexes,"/",str);if(_v0.b){var i=_v0.a;return A5($elm$url$Url$chompBeforePath,protocol,A2($elm$core$String$dropLeft,i,str),params,frag,A2($elm$core$String$left,i,str))}return A5($elm$url$Url$chompBeforePath,protocol,"/",params,frag,str)}),$elm$url$Url$chompBeforeFragment=F3(function(protocol,frag,str){if(""===str)return $elm$core$Maybe$Nothing;var _v0=A2($elm$core$String$indexes,"?",str);if(_v0.b){var i=_v0.a;return A4($elm$url$Url$chompBeforeQuery,protocol,$elm$core$Maybe$Just(A2($elm$core$String$dropLeft,i+1,str)),frag,A2($elm$core$String$left,i,str))}return A4($elm$url$Url$chompBeforeQuery,protocol,$elm$core$Maybe$Nothing,frag,str)}),$elm$core$Basics$never=(F2(function(protocol,str){if(""===str)return $elm$core$Maybe$Nothing;var _v0=A2($elm$core$String$indexes,"#",str);if(_v0.b){var i=_v0.a;return A3($elm$url$Url$chompBeforeFragment,protocol,$elm$core$Maybe$Just(A2($elm$core$String$dropLeft,i+1,str)),A2($elm$core$String$left,i,str))}return A3($elm$url$Url$chompBeforeFragment,protocol,$elm$core$Maybe$Nothing,str)}),function(){for(;;){0}}),$elm$core$Task$succeed=_Scheduler_succeed,$elm$core$Task$init=$elm$core$Task$succeed(0),$elm$core$List$foldrHelper=F4(function(fn,acc,ctr,ls){if(ls.b){var a=ls.a,r1=ls.b;if(r1.b){var b=r1.a,r2=r1.b;if(r2.b){var c=r2.a,r3=r2.b;if(r3.b){var r4=r3.b;return A2(fn,a,A2(fn,b,A2(fn,c,A2(fn,r3.a,500<ctr?A3($elm$core$List$foldl,fn,acc,$elm$core$List$reverse(r4)):A4($elm$core$List$foldrHelper,fn,acc,ctr+1,r4)))))}return A2(fn,a,A2(fn,b,A2(fn,c,acc)))}return A2(fn,a,A2(fn,b,acc))}return A2(fn,a,acc)}return acc}),$elm$core$List$foldr=F3(function(fn,acc,ls){return A4($elm$core$List$foldrHelper,fn,acc,0,ls)}),$elm$core$List$map=F2(function(f,xs){return A3($elm$core$List$foldr,F2(function(x,acc){return A2($elm$core$List$cons,f(x),acc)}),_List_Nil,xs)}),$elm$core$Task$andThen=_Scheduler_andThen,$elm$core$Task$map=F2(function(func,taskA){return A2($elm$core$Task$andThen,function(a){return $elm$core$Task$succeed(func(a))},taskA)}),$elm$core$Task$map2=F3(function(func,taskA,taskB){return A2($elm$core$Task$andThen,function(a){return A2($elm$core$Task$andThen,function(b){return $elm$core$Task$succeed(A2(func,a,b))},taskB)},taskA)}),$elm$core$Platform$sendToApp=_Platform_sendToApp,$elm$core$Task$spawnCmd=F2(function(router,_v0){var task=_v0;return _Scheduler_spawn(A2($elm$core$Task$andThen,$elm$core$Platform$sendToApp(router),task))}),$elm$core$Task$onEffects=F3(function(router,commands){return A2($elm$core$Task$map,function(){return 0},$elm$core$Task$sequence(A2($elm$core$List$map,$elm$core$Task$spawnCmd(router),commands)))}),$elm$core$Task$onSelfMsg=F3(function(){return $elm$core$Task$succeed(0)}),$elm$core$Task$cmdMap=F2(function(tagger,_v0){return A2($elm$core$Task$map,tagger,_v0)});_Platform_effectManagers.Task={b:$elm$core$Task$init,c:$elm$core$Task$onEffects,d:$elm$core$Task$onSelfMsg,e:$elm$core$Task$cmdMap,f:void 0};function $author$project$Main$Tick(a){return{$:4,a:a}}var millisToPosix,$elm$core$Task$command=_Platform_leaf("Task"),$elm$core$Task$perform=F2(function(toMessage,task){return $elm$core$Task$command(A2($elm$core$Task$map,toMessage,task))}),$elm$browser$Browser$element=_Browser_element,$author$project$Main$Between={$:2},$Punie$elm_matrix$Matrix$empty={B:$elm$core$Array$empty,C:0,D:0},$elm$time$Time$millisToPosix=$elm$core$Basics$identity,$elm$core$Platform$Cmd$none=_Platform_batch(_List_Nil),$elm$time$Time$Every=F2(function(a,b){return{$:0,a:a,b:b}}),$elm$time$Time$State=F2(function(taggers,processes){return{am:processes,at:taggers}}),$elm$core$Dict$RBEmpty_elm_builtin={$:-2},$elm$core$Dict$empty=$elm$core$Dict$RBEmpty_elm_builtin,$elm$time$Time$init=$elm$core$Task$succeed(A2($elm$time$Time$State,$elm$core$Dict$empty,$elm$core$Dict$empty)),$elm$core$Basics$compare=_Utils_compare,$elm$core$Dict$get=F2(function(targetKey,dict){get:for(;;){if(-2===dict.$)return $elm$core$Maybe$Nothing;var value=dict.c,left=dict.d,right=dict.e;switch(A2($elm$core$Basics$compare,targetKey,dict.b)){case 0:targetKey=targetKey,dict=left;continue get;case 1:return $elm$core$Maybe$Just(value);default:targetKey=targetKey,dict=right;continue get}}}),$elm$core$Dict$RBNode_elm_builtin=F5(function(a,b,c,d,e){return{$:-1,a:a,b:b,c:c,d:d,e:e}}),$elm$core$Dict$balance=F5(function(color,key,value,left,right){if(-1!==right.$||right.a){if(-1!==left.$||left.a||-1!==left.d.$||left.d.a)return A5($elm$core$Dict$RBNode_elm_builtin,color,key,value,left,right);var _v6=left.d,lRight=left.e;return A5($elm$core$Dict$RBNode_elm_builtin,0,left.b,left.c,A5($elm$core$Dict$RBNode_elm_builtin,1,_v6.b,_v6.c,_v6.d,_v6.e),A5($elm$core$Dict$RBNode_elm_builtin,1,key,value,lRight,right))}var rK=right.b,rV=right.c,rLeft=right.d,rRight=right.e;if(-1!==left.$||left.a)return A5($elm$core$Dict$RBNode_elm_builtin,color,rK,rV,A5($elm$core$Dict$RBNode_elm_builtin,0,key,value,left,rLeft),rRight);var lRight;return A5($elm$core$Dict$RBNode_elm_builtin,0,key,value,A5($elm$core$Dict$RBNode_elm_builtin,1,left.b,left.c,left.d,lRight=left.e),A5($elm$core$Dict$RBNode_elm_builtin,1,rK,rV,rLeft,rRight))}),$elm$core$Dict$insertHelp=F3(function(key,value,dict){if(-2===dict.$)return A5($elm$core$Dict$RBNode_elm_builtin,0,key,value,$elm$core$Dict$RBEmpty_elm_builtin,$elm$core$Dict$RBEmpty_elm_builtin);var nColor=dict.a,nKey=dict.b,nValue=dict.c,nLeft=dict.d,nRight=dict.e;switch(A2($elm$core$Basics$compare,key,nKey)){case 0:return A5($elm$core$Dict$balance,nColor,nKey,nValue,A3($elm$core$Dict$insertHelp,key,value,nLeft),nRight);case 1:return A5($elm$core$Dict$RBNode_elm_builtin,nColor,nKey,value,nLeft,nRight);default:return A5($elm$core$Dict$balance,nColor,nKey,nValue,nLeft,A3($elm$core$Dict$insertHelp,key,value,nRight))}}),$elm$core$Dict$insert=F3(function(key,value,dict){var _v0=A3($elm$core$Dict$insertHelp,key,value,dict);if(-1!==_v0.$||_v0.a)return _v0;return A5($elm$core$Dict$RBNode_elm_builtin,1,_v0.b,_v0.c,_v0.d,_v0.e)}),$elm$time$Time$addMySub=F2(function(_v0,state){var interval=_v0.a,tagger=_v0.b,_v1=A2($elm$core$Dict$get,interval,state);return A3($elm$core$Dict$insert,interval,1===_v1.$?_List_fromArray([tagger]):A2($elm$core$List$cons,tagger,_v1.a),state)}),$elm$core$Process$kill=function(proc){return{$:2,b:function(callback){var task=proc.f;2===task.$&&task.c&&task.c(),proc.f=null,callback({$:0,a:_Utils_Tuple0})},c:null}},$elm$core$Dict$foldl=F3(function(func,acc,dict){for(;;){if(-2===dict.$)return acc;var right=dict.e,$temp$func=func,$temp$acc=A3(func,dict.b,dict.c,A3($elm$core$Dict$foldl,func,acc,dict.d));func=$temp$func,acc=$temp$acc,dict=right}}),$elm$core$Dict$merge=F6(function(leftStep,bothStep,rightStep,leftDict,rightDict,initialResult){var stepState=F3(function(rKey,rValue,_v0){stepState:for(;;){var list=_v0.a,result=_v0.b;if(list.b){var _v2=list.a,lKey=_v2.a,lValue=_v2.b,rest=list.b;if(_Utils_cmp(lKey,rKey)<0){rKey=rKey,rValue=rValue,_v0={a:rest,b:A3(leftStep,lKey,lValue,result)};continue stepState}return 0<_Utils_cmp(lKey,rKey)?{a:list,b:A3(rightStep,rKey,rValue,result)}:{a:rest,b:A4(bothStep,lKey,lValue,rValue,result)}}return{a:list,b:A3(rightStep,rKey,rValue,result)}}}),_v3=A3($elm$core$Dict$foldl,stepState,{a:$elm$core$Dict$toList(leftDict),b:initialResult},rightDict),leftovers=_v3.a,intermediateResult=_v3.b;return A3($elm$core$List$foldl,F2(function(_v4,result){return A3(leftStep,_v4.a,_v4.b,result)}),intermediateResult,leftovers)}),$elm$core$Platform$sendToSelf=_Platform_sendToSelf,$elm$time$Time$Zone=F2(function(a,b){return{$:0,a:a,b:b}}),$elm$time$Time$setInterval=_Time_setInterval,$elm$core$Process$spawn=_Scheduler_spawn,$elm$time$Time$spawnHelp=F3(function(router,intervals,processes){if(intervals.b){var interval=intervals.a,rest=intervals.b,spawnTimer=$elm$core$Process$spawn(A2($elm$time$Time$setInterval,interval,A2($elm$core$Platform$sendToSelf,router,interval)));return A2($elm$core$Task$andThen,function(id){return A3($elm$time$Time$spawnHelp,router,rest,A3($elm$core$Dict$insert,interval,id,processes))},spawnTimer)}return $elm$core$Task$succeed(processes)}),$elm$time$Time$onEffects=F3(function(router,subs,_v0){var processes=_v0.am,rightStep=F3(function(_v6,id,_v7){var kills=_v7.c;return{a:_v7.a,b:_v7.b,c:A2($elm$core$Task$andThen,function(){return kills},$elm$core$Process$kill(id))}}),newTaggers=A3($elm$core$List$foldl,$elm$time$Time$addMySub,$elm$core$Dict$empty,subs),leftStep=F3(function(interval,taggers,_v4){var existing=_v4.b,kills=_v4.c;return{a:A2($elm$core$List$cons,interval,_v4.a),b:existing,c:kills}}),bothStep=F4(function(interval,taggers,id,_v3){var kills=_v3.c;return{a:_v3.a,b:A3($elm$core$Dict$insert,interval,id,_v3.b),c:kills}}),_v1=A6($elm$core$Dict$merge,leftStep,bothStep,rightStep,newTaggers,processes,{a:_List_Nil,b:$elm$core$Dict$empty,c:$elm$core$Task$succeed(0)}),spawnList=_v1.a,existingDict=_v1.b;return A2($elm$core$Task$andThen,function(newProcesses){return $elm$core$Task$succeed(A2($elm$time$Time$State,newTaggers,newProcesses))},A2($elm$core$Task$andThen,function(){return A3($elm$time$Time$spawnHelp,router,spawnList,existingDict)},_v1.c))}),$elm$time$Time$now=(millisToPosix=$elm$time$Time$millisToPosix,{$:2,b:function(callback){callback({$:0,a:millisToPosix(Date.now())})},c:null}),$elm$time$Time$onSelfMsg=F3(function(router,interval,state){var _v0=A2($elm$core$Dict$get,interval,state.at);if(1===_v0.$)return $elm$core$Task$succeed(state);var taggers=_v0.a;return A2($elm$core$Task$andThen,function(){return $elm$core$Task$succeed(state)},A2($elm$core$Task$andThen,function(time){return $elm$core$Task$sequence(A2($elm$core$List$map,function(tagger){return A2($elm$core$Platform$sendToApp,router,tagger(time))},taggers))},$elm$time$Time$now))}),$elm$core$Basics$composeL=F3(function(g,f,x){return g(f(x))}),$elm$time$Time$subMap=F2(function(f,_v0){return A2($elm$time$Time$Every,_v0.a,A2($elm$core$Basics$composeL,f,_v0.b))});_Platform_effectManagers.Time={b:$elm$time$Time$init,c:$elm$time$Time$onEffects,d:$elm$time$Time$onSelfMsg,e:0,f:$elm$time$Time$subMap};function $elm$random$Random$next(_v0){var incr=_v0.b;return A2($elm$random$Random$Seed,1664525*_v0.a+incr>>>0,incr)}function $elm$time$Time$posixToMillis(_v0){return _v0}var $elm$time$Time$subscription=_Platform_leaf("Time"),$elm$time$Time$every=F2(function(interval,tagger){return $elm$time$Time$subscription(A2($elm$time$Time$Every,interval,tagger))}),$elm$core$Platform$Sub$none=_Platform_batch(_List_Nil),$author$project$Main$GenerateBoard=F2(function(a,b){return{$:3,a:a,b:b}}),$author$project$Main$Play={$:1},$elm$random$Random$Seed=F2(function(a,b){return{$:0,a:a,b:b}}),$elm$random$Random$init=A2($elm$core$Task$andThen,function(time){return $elm$core$Task$succeed((x=$elm$time$Time$posixToMillis(time),_v0=$elm$random$Random$next(A2($elm$random$Random$Seed,0,1013904223)),$elm$random$Random$next(A2($elm$random$Random$Seed,_v0.a+x>>>0,_v0.b))));var x,_v0},$elm$time$Time$now),$elm$random$Random$step=F2(function(_v0,seed){return _v0(seed)}),$elm$random$Random$onEffects=F3(function(router,commands,seed){if(commands.b){var rest=commands.b,_v1=A2($elm$random$Random$step,commands.a,seed),newSeed=_v1.b;return A2($elm$core$Task$andThen,function(){return A3($elm$random$Random$onEffects,router,rest,newSeed)},A2($elm$core$Platform$sendToApp,router,_v1.a))}return $elm$core$Task$succeed(seed)}),$elm$random$Random$onSelfMsg=F3(function(_v0,_v1,seed){return $elm$core$Task$succeed(seed)}),$elm$random$Random$map=F2(function(func,_v0){var genA=_v0;return function(seed0){var _v1=genA(seed0),seed1=_v1.b;return{a:func(_v1.a),b:seed1}}}),$elm$random$Random$cmdMap=F2(function(func,_v0){return A2($elm$random$Random$map,func,_v0)});_Platform_effectManagers.Random={b:$elm$random$Random$init,c:$elm$random$Random$onEffects,d:$elm$random$Random$onSelfMsg,e:$elm$random$Random$cmdMap,f:void 0};function $elm$core$Array$fromList(list){return list.b?A3($elm$core$Array$fromListHelp,list,_List_Nil,0):$elm$core$Array$empty}function $elm$random$Random$peel(_v0){var state=_v0.a,word=277803737*(state^state>>>4+(state>>>28));return(word>>>22^word)>>>0}function $Punie$elm_matrix$Matrix$height(_v0){return _v0.D}function $Punie$elm_matrix$Matrix$toList(_v0){return $elm$core$Array$toList(_v0.B)}function $Punie$elm_matrix$Matrix$width(_v0){return _v0.C}function $elm$core$Basics$not(bool){return!bool}function $author$project$Main$isBomb(_v0){return!_v0.g.$}function $author$project$Main$isDone(matrix){return A2($elm$core$List$all,function(cell){return $author$project$Main$isBomb(cell)||cell.j},$Punie$elm_matrix$Matrix$toList(matrix))}function $elm$html$Html$Events$onClick(msg){return A2($elm$html$Html$Events$on,"click",$elm$json$Json$Decode$succeed(msg))}function $elm$html$Html$Attributes$src(url){return A2($elm$html$Html$Attributes$stringProperty,"src",/^\s*(javascript:|data:text\/html)/i.test(value=url)?"":value);var value}function $author$project$Main$timeToString(time){var secondUnformatted,minuteUnformatted,second=(secondUnformatted=$elm$core$String$fromInt(A2($elm$time$Time$toSecond,$elm$time$Time$utc,time)),$elm$core$String$length(secondUnformatted)<2?"0"+secondUnformatted:secondUnformatted);return(minuteUnformatted=$elm$core$String$fromInt(A2($elm$time$Time$toMinute,$elm$time$Time$utc,time)),$elm$core$String$length(minuteUnformatted)<2?"0"+minuteUnformatted:minuteUnformatted)+":"+second+"."+A2($elm$core$String$left,1,$elm$core$String$fromInt(A2($elm$time$Time$toMillis,$elm$time$Time$utc,time)))}function $author$project$Main$convertFakeCell(loc){return A2($elm$html$Html$td,_List_fromArray([$elm$html$Html$Attributes$class("hidden"),$elm$html$Html$Events$onClick({$:6,a:loc})]),_List_Nil)}function $author$project$Main$preventContextMenu(message){return A2($elm$html$Html$Events$preventDefaultOn,"contextmenu",A2($elm$json$Json$Decode$map,function(msg){return{a:msg,b:!0}},$elm$json$Json$Decode$succeed(message)))}function $Punie$elm_matrix$Matrix$toLists(m){return A2($elm$core$List$concatMap,function(i){return _List_fromArray([A2($elm$core$List$concatMap,function(j){return _List_fromArray([A3($Punie$elm_matrix$Matrix$unsafeGet,i,j,m)])},A2($elm$core$List$range,1,$Punie$elm_matrix$Matrix$width(m)))])},A2($elm$core$List$range,1,$Punie$elm_matrix$Matrix$height(m)))}function $author$project$Main$convertCell(cell){if(cell.j){var _v0=cell.g;if(_v0.$){if(_v0.a){var bombs=_v0.a,flagged=_v0.b;return A2($elm$html$Html$td,_Utils_ap(_List_fromArray([$elm$html$Html$Attributes$class("around-"+$elm$core$String$fromInt(bombs)),(message={$:2,a:cell},A2($elm$html$Html$Events$on,"mouseup",A2($elm$json$Json$Decode$andThen,function(buttons){return 2===buttons?$elm$json$Json$Decode$succeed(message):$elm$json$Json$Decode$fail("Not Both Clicks")},A2($elm$json$Json$Decode$field,"buttons",$elm$json$Json$Decode$int))))]),flagged?_List_fromArray([$elm$html$Html$Attributes$class("wrong-flag")]):_List_Nil),_List_fromArray([$elm$html$Html$text($elm$core$String$fromInt(bombs))]))}var flagged=_v0.b;return A2($elm$html$Html$td,A2($elm$core$List$cons,$elm$html$Html$Attributes$class("around-0"),flagged?_List_fromArray([$elm$html$Html$Attributes$class("wrong-flag")]):_List_Nil),_List_Nil)}return A2($elm$html$Html$td,_List_Nil,_List_fromArray(_v0.a?[A2($elm$html$Html$img,_List_fromArray([$elm$html$Html$Attributes$src("img/explosion.png")]),_List_Nil)]:[A2($elm$html$Html$img,_List_fromArray([$elm$html$Html$Attributes$src("img/mine.png")]),_List_Nil)]))}return A2($elm$html$Html$td,_List_fromArray([$elm$html$Html$Attributes$class("hidden"),$elm$html$Html$Events$onClick({$:0,a:cell}),function(message){return A2($elm$html$Html$Events$on,"mouseup",A2($elm$json$Json$Decode$andThen,function(button){return 2===button?$elm$json$Json$Decode$succeed(message):$elm$json$Json$Decode$fail("Not Right Click")},A2($elm$json$Json$Decode$field,"button",$elm$json$Json$Decode$int)))}({$:1,a:cell})]),_List_fromArray([cell.i?A2($elm$html$Html$img,_List_fromArray([$elm$html$Html$Attributes$src("img/flag.png")]),_List_Nil):$elm$html$Html$text("")]));var message}function $author$project$Main$ChangeSize(a){return{$:5,a:a}}function $elm$html$Html$Events$alwaysStop(x){return{a:x,b:!0}}function $author$project$Main$viewSlider(val){return A2($elm$html$Html$input,_List_fromArray([$elm$html$Html$Attributes$id("size-slider"),$elm$html$Html$Attributes$type_("range"),$elm$html$Html$Attributes$min("5"),$elm$html$Html$Attributes$max("20"),$elm$html$Html$Attributes$value($elm$core$String$fromInt(val)),(tagger=A2($elm$core$Basics$composeL,A2($elm$core$Basics$composeL,$author$project$Main$ChangeSize,$elm$core$Maybe$withDefault(14)),$elm$core$String$toInt),A2($elm$html$Html$Events$stopPropagationOn,"input",A2($elm$json$Json$Decode$map,$elm$html$Html$Events$alwaysStop,A2($elm$json$Json$Decode$map,tagger,$elm$html$Html$Events$targetValue))))]),_List_Nil);var tagger}var exports,$elm$random$Random$command=_Platform_leaf("Random"),$elm$random$Random$generate=F2(function(tagger,generator){return $elm$random$Random$command(A2($elm$random$Random$map,tagger,generator))}),$elm$core$List$append=F2(function(xs,ys){return ys.b?A3($elm$core$List$foldr,$elm$core$List$cons,ys,xs):xs}),$elm$core$List$concatMap=F2(function(f,list){return lists=A2($elm$core$List$map,f,list),A3($elm$core$List$foldr,$elm$core$List$append,_List_Nil,lists);var lists}),$author$project$Main$cartesian=F2(function(xs,ys){return A2($elm$core$List$concatMap,function(x){return A2($elm$core$List$map,function(y){return{a:x,b:y}},ys)},xs)}),$elm$core$Array$fromListHelp=F3(function(list,nodeList,nodeListSize){for(;;){var _v0=A2($elm$core$Elm$JsArray$initializeFromList,32,list),jsArray=_v0.a,remainingItems=_v0.b;if(_Utils_cmp($elm$core$Elm$JsArray$length(jsArray),32)<0)return A2($elm$core$Array$builderToArray,!0,{e:nodeList,b:nodeListSize,d:jsArray});list=remainingItems,nodeList=A2($elm$core$List$cons,{$:1,a:jsArray},nodeList),nodeListSize=nodeListSize+1}}),$elm$random$Random$listHelp=F4(function(revList,n,gen,seed){for(;;){if(n<1)return{a:revList,b:seed};var _v0=gen(seed),newSeed=_v0.b;revList=A2($elm$core$List$cons,_v0.a,revList),n=n-1,gen=gen,seed=newSeed}}),$elm$random$Random$list=F2(function(n,_v0){var gen=_v0;return function(seed){return A4($elm$random$Random$listHelp,_List_Nil,n,gen,seed)}}),$elm_community$list_extra$List$Extra$remove=F2(function(x,xs){if(xs.b){var y=xs.a,ys=xs.b;return _Utils_eq(x,y)?ys:A2($elm$core$List$cons,y,A2($elm_community$list_extra$List$Extra$remove,x,ys))}return _List_Nil}),$elm$core$Array$bitMask=4294967295>>>32-$elm$core$Array$shiftStep,$elm$core$Elm$JsArray$unsafeGet=_JsArray_unsafeGet,$elm$core$Array$getHelp=F3(function(shift,index,tree){for(;;){var _v0=A2($elm$core$Elm$JsArray$unsafeGet,$elm$core$Array$bitMask&index>>>shift,tree);if(_v0.$)return A2($elm$core$Elm$JsArray$unsafeGet,$elm$core$Array$bitMask&index,_v0.a);shift=shift-$elm$core$Array$shiftStep,index=index,tree=_v0.a}}),$elm$core$Array$get=F2(function(index,_v0){var len=_v0.a,startShift=_v0.b,tree=_v0.c,tail=_v0.d;return index<0||-1<_Utils_cmp(index,len)?$elm$core$Maybe$Nothing:-1<_Utils_cmp(index,len>>>5<<5)?$elm$core$Maybe$Just(A2($elm$core$Elm$JsArray$unsafeGet,$elm$core$Array$bitMask&index,tail)):$elm$core$Maybe$Just(A3($elm$core$Array$getHelp,startShift,index,tree))}),$elm$random$Random$int=F2(function(a,b){return function(seed0){var _v0=_Utils_cmp(a,b)<0?{a:a,b:b}:{a:b,b:a},lo=_v0.a,range=_v0.b-lo+1;if(range-1&range){var threshhold=(-range>>>0)%range>>>0;return function(seed){for(;;){var x=$elm$random$Random$peel(seed),seedN=$elm$random$Random$next(seed);if(0<=_Utils_cmp(x,threshhold))return{a:x%range+lo,b:seedN};seed=seedN}}(seed0)}return{a:((range-1&$elm$random$Random$peel(seed0))>>>0)+lo,b:$elm$random$Random$next(seed0)}}}),$elm$core$Maybe$withDefault=F2(function(_default,maybe){return maybe.$?_default:maybe.a}),$author$project$Main$generateBombs=F3(function(n,range,rem){return A2($elm$random$Random$list,n,A2($elm$random$Random$map,$elm$core$Maybe$withDefault({a:1,b:1}),(arr=$elm$core$Array$fromList(A2($elm_community$list_extra$List$Extra$remove,rem,A2($author$project$Main$cartesian,A2($elm$core$List$range,1,range),A2($elm$core$List$range,1,range)))),gen=A2($elm$random$Random$int,0,arr.a-1),A2($elm$random$Random$map,function(index){return A2($elm$core$Array$get,index,arr)},gen))));var arr,gen}),$author$project$Main$Around=F2(function(a,b){return{$:1,a:a,b:b}}),$elm$core$List$filter=F2(function(isGood,list){return A3($elm$core$List$foldr,F2(function(x,xs){return isGood(x)?A2($elm$core$List$cons,x,xs):xs}),_List_Nil,list)}),$elm$core$List$any=F2(function(isOkay,list){for(;;){if(!list.b)return!1;var xs=list.b;if(isOkay(list.a))return!0;isOkay=isOkay,list=xs}}),$elm$core$List$member=F2(function(x,xs){return A2($elm$core$List$any,function(a){return _Utils_eq(a,x)},xs)}),$author$project$Main$neighbours=F2(function(range,_v0){var x=_v0.a,y=_v0.b;return A2($elm$core$List$filter,function(_v1){var i=_v1.a,j=_v1.b;return 0<i&&_Utils_cmp(i,range)<1&&0<j&&_Utils_cmp(j,range)<1},_List_fromArray([{a:x-1,b:y-1},{a:x-1,b:y},{a:x-1,b:y+1},{a:x,b:y-1},{a:x,b:y+1},{a:x+1,b:y-1},{a:x+1,b:y},{a:x+1,b:y+1}]))}),$author$project$Main$countBombs=F3(function(range,loc,bombs){return $elm$core$List$length(A2($elm$core$List$filter,function(x){return A2($elm$core$List$member,x,bombs)},A2($author$project$Main$neighbours,range,loc)))}),$Punie$elm_matrix$Matrix$decode=F2(function(ncols,index){return{a:1+(index/ncols|0),b:1+index%ncols}}),$Punie$elm_matrix$Matrix$initialize=F3(function(nrows,ncols,f){return{B:A2($elm$core$Array$initialize,nrows*ncols,function(i){return f(A2($Punie$elm_matrix$Matrix$decode,ncols,i))}),C:ncols,D:nrows}}),$author$project$Main$generateGrid=F2(function(size,locs){return A3($Punie$elm_matrix$Matrix$initialize,size,size,function(_v0){var x=_v0.a,y=_v0.b;return A2($elm$core$List$member,{a:x,b:y},locs)?{g:{$:0,a:!1},i:!1,j:!1,p:x,q:y}:{g:A2($author$project$Main$Around,A3($author$project$Main$countBombs,size,{a:x,b:y},locs),!1),i:!1,j:!1,p:x,q:y}})}),$Punie$elm_matrix$Matrix$encode=F2(function(ncols,_v0){return(_v0.a-1)*ncols+_v0.b-1}),$Punie$elm_matrix$Matrix$itemAt=F2(function(index,list){itemAt:for(;;){if(index<0)return $elm$core$Maybe$Nothing;if(list.b){var x=list.a;if(index){index=index-1,list=list.b;continue itemAt}return $elm$core$Maybe$Just(x)}return $elm$core$Maybe$Nothing}}),$Punie$elm_matrix$Matrix$unsafeGetFromList=F2(function(index,list){for(;;){var _v0=A2($Punie$elm_matrix$Matrix$itemAt,index,list);if(!_v0.$)return _v0.a;index=index,list=list}}),$Punie$elm_matrix$Matrix$fromList=F3(function(n,m,list){return _Utils_cmp($elm$core$List$length(list),n*m)<0?$elm$core$Maybe$Nothing:$elm$core$Maybe$Just(A3($Punie$elm_matrix$Matrix$initialize,n,m,function(i){return A2($Punie$elm_matrix$Matrix$unsafeGetFromList,A2($Punie$elm_matrix$Matrix$encode,m,i),list)}))}),$elm$core$Elm$JsArray$unsafeSet=_JsArray_unsafeSet,$elm$core$Array$setHelp=F4(function(shift,index,value,tree){var pos=$elm$core$Array$bitMask&index>>>shift,_v0=A2($elm$core$Elm$JsArray$unsafeGet,pos,tree);if(_v0.$){var newLeaf=A3($elm$core$Elm$JsArray$unsafeSet,$elm$core$Array$bitMask&index,value,_v0.a);return A3($elm$core$Elm$JsArray$unsafeSet,pos,{$:1,a:newLeaf},tree)}var newSub=A4($elm$core$Array$setHelp,shift-$elm$core$Array$shiftStep,index,value,_v0.a);return A3($elm$core$Elm$JsArray$unsafeSet,pos,{$:0,a:newSub},tree)}),$elm$core$Array$set=F3(function(index,value,array){var len=array.a,startShift=array.b,tree=array.c,tail=array.d;return index<0||-1<_Utils_cmp(index,len)?array:-1<_Utils_cmp(index,len>>>5<<5)?A4($elm$core$Array$Array_elm_builtin,len,startShift,tree,A3($elm$core$Elm$JsArray$unsafeSet,$elm$core$Array$bitMask&index,value,tail)):A4($elm$core$Array$Array_elm_builtin,len,startShift,A4($elm$core$Array$setHelp,startShift,index,value,tree),tail)}),$author$project$Main$modify=F4(function(i,j,mod,matrix){var width=$Punie$elm_matrix$Matrix$width(matrix),height=$Punie$elm_matrix$Matrix$height(matrix),array=$elm$core$Array$fromList($Punie$elm_matrix$Matrix$toList(matrix)),maybeOldElement=A2($elm$core$Array$get,(i-1)*width+j-1,array),newArray=maybeOldElement.$?array:A3($elm$core$Array$set,(i-1)*width+j-1,mod(maybeOldElement.a),array);return 0<_Utils_cmp(i,height)||i<=0||0<_Utils_cmp(j,width)||j<=0?$elm$core$Maybe$Nothing:A3($Punie$elm_matrix$Matrix$fromList,height,width,$elm$core$Array$toList(newArray))}),$Punie$elm_matrix$Matrix$get=F3(function(i,j,_v0){var ncols=_v0.C,mvect=_v0.B;return 0<_Utils_cmp(i,_v0.D)||0<_Utils_cmp(j,ncols)?$elm$core$Maybe$Nothing:A2($elm$core$Array$get,A2($Punie$elm_matrix$Matrix$encode,ncols,{a:i,b:j}),mvect)}),$author$project$Main$isRevealed=F2(function(matrix,_v0){var _v1=A3($Punie$elm_matrix$Matrix$get,_v0.a,_v0.b,matrix);return!!_v1.$||_v1.a.j}),$author$project$Main$reveal=F2(function(list,matrix){for(;;){var revealCell=function(c){return _Utils_update(c,{j:!0})};if(!list.b)return matrix;var _v1=list.a,i=_v1.a,j=_v1.b,locs=list.b,cell=A2($elm$core$Maybe$withDefault,{g:{$:0,a:!1},i:!1,j:!1,p:i,q:j},A3($Punie$elm_matrix$Matrix$get,i,j,matrix));if(cell.i)list=locs,matrix=matrix;else{var _v2=cell.g;if(1===_v2.$)return A2($author$project$Main$reveal,_v2.a?locs:_Utils_ap(locs,A2($elm$core$List$filter,function(loc){return!A2($author$project$Main$isRevealed,matrix,loc)&&!A2($elm$core$List$member,loc,locs)},A2($author$project$Main$neighbours,$Punie$elm_matrix$Matrix$height(matrix),{a:i,b:j}))),A2($elm$core$Maybe$withDefault,matrix,A4($author$project$Main$modify,i,j,revealCell,matrix)));list=locs,matrix=matrix}}}),$elm$core$List$maybeCons=F3(function(f,mx,xs){var _v0=f(mx);return _v0.$?xs:A2($elm$core$List$cons,_v0.a,xs)}),$elm$core$List$filterMap=F2(function(f,xs){return A3($elm$core$List$foldr,$elm$core$List$maybeCons(f),_List_Nil,xs)}),$elm$core$List$all=F2(function(isOkay,list){return!A2($elm$core$List$any,A2($elm$core$Basics$composeL,$elm$core$Basics$not,isOkay),list)}),$elm$core$Elm$JsArray$map=_JsArray_map,$elm$core$Array$map=F2(function(func,_v0){var tail=_v0.d,helper=function(node){return node.$?{$:1,a:A2($elm$core$Elm$JsArray$map,func,node.a)}:{$:0,a:A2($elm$core$Elm$JsArray$map,helper,node.a)}};return A4($elm$core$Array$Array_elm_builtin,_v0.a,_v0.b,A2($elm$core$Elm$JsArray$map,helper,_v0.c),A2($elm$core$Elm$JsArray$map,func,tail))}),$Punie$elm_matrix$Matrix$map=F2(function(f,_v0){var m=_v0;return{B:A2($elm$core$Array$map,f,m.B),C:m.C,D:m.D}}),$elm$core$Maybe$map=F2(function(f,maybe){return maybe.$?$elm$core$Maybe$Nothing:$elm$core$Maybe$Just(f(maybe.a))}),$author$project$Main$updateDig=F2(function(model,cell){var danger,countFlags=$elm$core$List$length(A2($elm$core$List$filter,$elm$core$Basics$identity,A2($elm$core$List$map,function($){return $.i},A2($elm$core$List$filterMap,function(_v6){return A3($Punie$elm_matrix$Matrix$get,_v6.a,_v6.b,model.a)},A2($author$project$Main$neighbours,$Punie$elm_matrix$Matrix$height(model.a),{a:cell.p,b:cell.q})))));if(A2($elm$core$Maybe$withDefault,!1,A2($elm$core$Maybe$map,$elm$core$Basics$eq(countFlags),1!==(danger=cell.g).$?$elm$core$Maybe$Nothing:$elm$core$Maybe$Just(danger.a)))){var unrevNeigh=A2($elm$core$List$filter,function(el){return!(el.j||el.i)},A2($elm$core$List$filterMap,function(_v5){return A3($Punie$elm_matrix$Matrix$get,_v5.a,_v5.b,model.a)},A2($author$project$Main$neighbours,$Punie$elm_matrix$Matrix$height(model.a),{a:cell.p,b:cell.q}))),nearBombs=A2($elm$core$List$map,function(_v4){return{a:_v4.p,b:_v4.q}},A2($elm$core$List$filter,$author$project$Main$isBomb,unrevNeigh));if(nearBombs.b){var finalGrid=A2($Punie$elm_matrix$Matrix$map,function(el){return _Utils_update(el,{g:1!==(_v3=el.g).$?_v3:A2($author$project$Main$Around,_v3.a,el.i),j:!0});var _v3},A3($elm$core$List$foldr,F2(function(_v2,matrix){return A2($elm$core$Maybe$withDefault,model.a,A4($author$project$Main$modify,_v2.a,_v2.b,function(el){return _Utils_update(el,{g:{$:0,a:!0}})},matrix))}),model.a,nearBombs));return _Utils_update(model,{k:{$:0,a:!1},a:finalGrid})}var revealedGrid=A2($author$project$Main$reveal,A2($elm$core$List$map,function(_v1){return{a:_v1.p,b:_v1.q}},unrevNeigh),model.a),status=$author$project$Main$isDone(revealedGrid)?{$:0,a:!0}:$author$project$Main$Play;return _Utils_update(model,1===status.$?{k:$author$project$Main$Play,a:revealedGrid}:{k:status,a:A2($Punie$elm_matrix$Matrix$map,function(el){return _Utils_update(el,{j:!0})},revealedGrid)})}return model}),$author$project$Main$updateReveal=F2(function(model,cell){if(cell.i)return model;if(cell.g.$){var revealedGrid=A2($author$project$Main$reveal,_List_fromArray([{a:cell.p,b:cell.q}]),model.a),status=$author$project$Main$isDone(revealedGrid)?{$:0,a:!0}:$author$project$Main$Play;return _Utils_update(model,1===status.$?{k:$author$project$Main$Play,a:revealedGrid}:{k:status,a:A2($Punie$elm_matrix$Matrix$map,function(el){return _Utils_update(el,{j:!0})},revealedGrid)})}return _Utils_update(model,{k:{$:0,a:!1},a:A2($Punie$elm_matrix$Matrix$map,function(el){return _Utils_update(el,{g:1!==(_v1=el.g).$?_v1:A2($author$project$Main$Around,_v1.a,el.i),j:!0});var _v1},A2($elm$core$Maybe$withDefault,model.a,A4($author$project$Main$modify,cell.p,cell.q,function(el){return _Utils_update(el,{g:{$:0,a:!0},j:!0})},model.a)))})}),$author$project$Main$update=F2(function(msg,model){switch(msg.$){case 0:return{a:A2($author$project$Main$updateReveal,model,cell=msg.a),b:$elm$core$Platform$Cmd$none};case 1:var modified=A4($author$project$Main$modify,(cell=msg.a).p,cell.q,function(el){return _Utils_update(el,{i:!cell.i})},model.a);return 1===modified.$?{a:model,b:$elm$core$Platform$Cmd$none}:{a:_Utils_update(model,{z:model.z+(cell.i?-1:1),a:modified.a}),b:$elm$core$Platform$Cmd$none};case 2:var cell;return{a:A2($author$project$Main$updateDig,model,cell=msg.a),b:$elm$core$Platform$Cmd$none};case 3:var rev=msg.a,locs=msg.b;return{a:_Utils_update(model,{I:$elm$core$List$length(locs),k:$author$project$Main$Play,a:A2($author$project$Main$reveal,_List_fromArray([rev]),A2($author$project$Main$generateGrid,model.f,locs))}),b:$elm$core$Platform$Cmd$none};case 4:return{a:_Utils_update(model,{G:$elm$time$Time$millisToPosix($elm$time$Time$posixToMillis(model.G)+100)}),b:$elm$core$Platform$Cmd$none};case 5:return{a:_Utils_update(model,{f:msg.a}),b:$elm$core$Platform$Cmd$none};case 6:var loc=msg.a;return{a:model,b:A2($elm$random$Random$generate,$author$project$Main$GenerateBoard(loc),A3($author$project$Main$generateBombs,model.f*model.f/5|0,model.f,loc))};case 7:return{a:{I:0,z:0,k:$author$project$Main$Between,a:$Punie$elm_matrix$Matrix$empty,f:model.f,G:$elm$time$Time$millisToPosix(0)},b:$elm$core$Platform$Cmd$none};default:return{a:model,b:$elm$core$Platform$Cmd$none}}}),$author$project$Main$StartAgain={$:7},$elm$html$Html$button=_VirtualDom_node("button"),$elm$json$Json$Encode$string=_Json_wrap,$elm$html$Html$Attributes$stringProperty=F2(function(key,string){return A2(_VirtualDom_property,key,$elm$json$Json$Encode$string(string))}),$elm$html$Html$Attributes$class=$elm$html$Html$Attributes$stringProperty("className"),$elm$html$Html$div=_VirtualDom_node("div"),$elm$html$Html$h1=_VirtualDom_node("h1"),$elm$html$Html$h2=_VirtualDom_node("h2"),$elm$html$Html$h3=_VirtualDom_node("h3"),$elm$html$Html$Attributes$id=$elm$html$Html$Attributes$stringProperty("id"),$elm$html$Html$img=_VirtualDom_node("img"),$elm$html$Html$li=_VirtualDom_node("li"),$elm$html$Html$main_=_VirtualDom_node("main"),$elm$virtual_dom$VirtualDom$on=_VirtualDom_on,$elm$html$Html$Events$on=F2(function(event,decoder){return A2($elm$virtual_dom$VirtualDom$on,event,{$:0,a:decoder})}),$elm$html$Html$p=_VirtualDom_node("p"),$elm$html$Html$section=_VirtualDom_node("section"),$elm$html$Html$span=_VirtualDom_node("span"),$elm$html$Html$text=_VirtualDom_text,$elm$core$Basics$modBy=_Basics_modBy,$elm$time$Time$toMillis=F2(function(_v0,time){return A2($elm$core$Basics$modBy,1e3,$elm$time$Time$posixToMillis(time))}),$elm$time$Time$flooredDiv=F2(function(numerator,denominator){return $elm$core$Basics$floor(numerator/denominator)}),$elm$time$Time$toAdjustedMinutesHelp=F3(function(defaultOffset,posixMinutes,eras){for(;;){if(!eras.b)return posixMinutes+defaultOffset;var era=eras.a,olderEras=eras.b;if(_Utils_cmp(era.W,posixMinutes)<0)return posixMinutes+era.ah;defaultOffset=defaultOffset,posixMinutes=posixMinutes,eras=olderEras}}),$elm$time$Time$toAdjustedMinutes=F2(function(_v0,time){var eras=_v0.b;return A3($elm$time$Time$toAdjustedMinutesHelp,_v0.a,A2($elm$time$Time$flooredDiv,$elm$time$Time$posixToMillis(time),6e4),eras)}),$elm$time$Time$toMinute=F2(function(zone,time){return A2($elm$core$Basics$modBy,60,A2($elm$time$Time$toAdjustedMinutes,zone,time))}),$elm$time$Time$toSecond=F2(function(_v0,time){return A2($elm$core$Basics$modBy,60,A2($elm$time$Time$flooredDiv,$elm$time$Time$posixToMillis(time),1e3))}),$elm$time$Time$utc=A2($elm$time$Time$Zone,0,_List_Nil),$elm$html$Html$ul=_VirtualDom_node("ul"),$author$project$Main$DoNothing={$:8},$elm$html$Html$td=_VirtualDom_node("td"),$elm$html$Html$Events$preventDefaultOn=F2(function(event,decoder){return A2($elm$virtual_dom$VirtualDom$on,event,{$:2,a:decoder})}),$elm$html$Html$table=_VirtualDom_node("table"),$Punie$elm_matrix$Matrix$unsafeGet=F3(function(i,j,m){for(;;){var _v0=A3($Punie$elm_matrix$Matrix$get,i,j,m);if(!_v0.$)return _v0.a;i=i,j=j,m=m}}),$elm$html$Html$tr=_VirtualDom_node("tr"),$elm$json$Json$Decode$andThen=_Json_andThen,$elm$json$Json$Decode$fail=function(msg){return{$:1,a:msg}},$elm$json$Json$Decode$field=_Json_decodeField,$elm$json$Json$Decode$int=_Json_decodeInt,$elm$html$Html$input=_VirtualDom_node("input"),$elm$html$Html$Attributes$max=$elm$html$Html$Attributes$stringProperty("max"),$elm$html$Html$Attributes$min=$elm$html$Html$Attributes$stringProperty("min"),$elm$html$Html$Events$stopPropagationOn=F2(function(event,decoder){return A2($elm$virtual_dom$VirtualDom$on,event,{$:1,a:decoder})}),$elm$json$Json$Decode$string=_Json_decodeString,$elm$html$Html$Events$targetValue=A2(F2(function(fields,decoder){return A3($elm$core$List$foldr,$elm$json$Json$Decode$field,decoder,fields)}),_List_fromArray(["target","value"]),$elm$json$Json$Decode$string),$elm$html$Html$Attributes$type_=$elm$html$Html$Attributes$stringProperty("type"),$elm$html$Html$Attributes$value=$elm$html$Html$Attributes$stringProperty("value"),$author$project$Main$main=$elm$browser$Browser$element({aF:function(){return{a:{I:0,z:0,k:$author$project$Main$Between,a:$Punie$elm_matrix$Matrix$empty,f:14,G:$elm$time$Time$millisToPosix(0)},b:$elm$core$Platform$Cmd$none}},aL:function(model){return 1===model.k.$?A2($elm$time$Time$every,100,$author$project$Main$Tick):$elm$core$Platform$Sub$none},aN:$author$project$Main$update,aO:function(model){return A2($elm$html$Html$main_,_List_Nil,_List_fromArray([A2($elm$html$Html$h1,_List_fromArray([$elm$html$Html$Attributes$id("title")]),_List_fromArray([$elm$html$Html$text("Minesweep"),A2($elm$html$Html$span,_List_fromArray([$elm$html$Html$Attributes$id("elm")]),_List_fromArray([$elm$html$Html$text("elm")]))])),2===model.k.$?(matrix=A3($Punie$elm_matrix$Matrix$initialize,size=model.f,size,$elm$core$Basics$identity),A2($elm$html$Html$table,_List_fromArray([$elm$html$Html$Attributes$id("grid"),$author$project$Main$preventContextMenu($author$project$Main$DoNothing)]),A2($elm$core$List$map,$elm$html$Html$tr(_List_Nil),$Punie$elm_matrix$Matrix$toLists(A2($Punie$elm_matrix$Matrix$map,$author$project$Main$convertFakeCell,matrix))))):function(matrix){return A2($elm$html$Html$table,_List_fromArray([$elm$html$Html$Attributes$id("grid"),$author$project$Main$preventContextMenu($author$project$Main$DoNothing)]),A2($elm$core$List$map,$elm$html$Html$tr(_List_Nil),$Punie$elm_matrix$Matrix$toLists(A2($Punie$elm_matrix$Matrix$map,$author$project$Main$convertCell,matrix))))}(model.a),function(){var _v1=model.k;switch(_v1.$){case 2:return A2($elm$html$Html$section,_List_fromArray([$elm$html$Html$Attributes$class("content"),$elm$html$Html$Attributes$id("introduction")]),_List_fromArray([A2($elm$html$Html$h2,_List_Nil,_List_fromArray([$elm$html$Html$text("Hello!")])),A2($elm$html$Html$p,_List_Nil,_List_fromArray([$elm$html$Html$text("Welcome to a cool, little minesweeper game created in Elm by George Ungureanu Vranceanu. Usual rules apply:"),A2($elm$html$Html$ul,_List_Nil,_List_fromArray([A2($elm$html$Html$li,_List_Nil,_List_fromArray([$elm$html$Html$text("Left click to reveal the square (first try is guaranteed to be safe)")])),A2($elm$html$Html$li,_List_Nil,_List_fromArray([$elm$html$Html$text("Right click to mark it as a bomb (put a little flag over it")])),A2($elm$html$Html$li,_List_Nil,_List_fromArray([$elm$html$Html$text("Left and right click at the same time to uncover all the neighbours (provided you put down the required number of flags)")]))]))])),A2($elm$html$Html$p,_List_Nil,_List_fromArray([$elm$html$Html$text("Use the slider below to set the desired size and then click on the grid to start playing the game:")])),A2($elm$html$Html$div,_List_fromArray([$elm$html$Html$Attributes$id("slider-container")]),_List_fromArray([$author$project$Main$viewSlider(model.f),A2($elm$html$Html$h3,_List_fromArray([$elm$html$Html$Attributes$class("stats")]),_List_fromArray([$elm$html$Html$text($elm$core$String$fromInt(model.f)+(" x "+$elm$core$String$fromInt(model.f)))])),A2($elm$html$Html$h3,_List_fromArray([$elm$html$Html$Attributes$class("stats")]),_List_fromArray([$elm$html$Html$text($elm$core$String$fromInt(model.f*model.f/5|0)+" "),A2($elm$html$Html$span,_List_Nil,_List_fromArray([A2($elm$html$Html$img,_List_fromArray([$elm$html$Html$Attributes$id("paragraph-mine"),$elm$html$Html$Attributes$src("img/mine.png")]),_List_Nil)]))]))])),A2($elm$html$Html$h2,_List_Nil,_List_fromArray([$elm$html$Html$text("Good Luck!")]))]));case 0:if(_v1.a){var sizeString=$elm$core$String$fromInt(model.f);return A2($elm$html$Html$section,_List_fromArray([$elm$html$Html$Attributes$class("content end")]),_List_fromArray([A2($elm$html$Html$h3,_List_Nil,_List_fromArray([$elm$html$Html$text("Congratulations! You solved the "+sizeString+("x"+sizeString+(" grid in "+$author$project$Main$timeToString(model.G))))])),A2($elm$html$Html$button,_List_fromArray([$elm$html$Html$Attributes$class("again-button"),$elm$html$Html$Events$onClick($author$project$Main$StartAgain)]),_List_fromArray([$elm$html$Html$text("Start Again")]))]))}return A2($elm$html$Html$section,_List_fromArray([$elm$html$Html$Attributes$class("content end")]),_List_fromArray([A2($elm$html$Html$h3,_List_Nil,_List_fromArray([$elm$html$Html$text("Sorry, you blew up!")])),A2($elm$html$Html$p,_List_Nil,_List_fromArray([$elm$html$Html$text("You misplaced flags in the highlighted squares.")])),A2($elm$html$Html$button,_List_fromArray([$elm$html$Html$Attributes$class("again-button"),$elm$html$Html$Events$onClick($author$project$Main$StartAgain)]),_List_fromArray([$elm$html$Html$text("Start Again")]))]));default:return A2($elm$html$Html$section,_List_fromArray([$elm$html$Html$Attributes$class("content"),$elm$html$Html$Attributes$id("play")]),_List_fromArray([A2($elm$html$Html$img,_List_fromArray([$elm$html$Html$Attributes$id("clock"),$elm$html$Html$Attributes$src("img/clock.png")]),_List_Nil),A2($elm$html$Html$h3,_List_fromArray([$elm$html$Html$Attributes$id("time")]),_List_fromArray([$elm$html$Html$text($author$project$Main$timeToString(model.G))])),A2($elm$html$Html$h3,_List_Nil,_List_fromArray([A2($elm$html$Html$span,0<_Utils_cmp(model.z,model.I)?_List_fromArray([$elm$html$Html$Attributes$id("too-many")]):_List_Nil,_List_fromArray([$elm$html$Html$text($elm$core$String$fromInt(model.z)+" ")])),A2($elm$html$Html$span,_List_Nil,_List_fromArray([A2($elm$html$Html$img,_List_fromArray([$elm$html$Html$Attributes$src("img/flag.png"),$elm$html$Html$Attributes$class("play-img")]),_List_Nil)])),$elm$html$Html$text(" / "),$elm$html$Html$text($elm$core$String$fromInt(model.I)+" "),A2($elm$html$Html$span,_List_Nil,_List_fromArray([A2($elm$html$Html$img,_List_fromArray([$elm$html$Html$Attributes$src("img/mine.png"),$elm$html$Html$Attributes$class("play-img")]),_List_Nil)]))]))]))}}()]));var size,matrix}});exports={Main:{init:$author$project$Main$main($elm$json$Json$Decode$succeed(0))(0)}},scope.Elm?function _Platform_mergeExportsProd(obj,exports){for(var name in exports)name in obj?"init"==name?_Debug_crash(6):_Platform_mergeExportsProd(obj[name],exports[name]):obj[name]=exports[name]}(scope.Elm,exports):scope.Elm=exports}(this);