diff --git a/README.md b/README.md index 15284d3..ce60b4b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,8 @@ It will open a browser ## Stuff still to be implemented (Spoiler : Almost everything) -* We shouldn't update the durability of a weapon (two swords don't make a twice a much powerful sword...) +* Mobile friendly controls +* Mobile friendly view * Detroy WeaponComponents instead of setting the durability to 0. This will allow to change the weapon type, ... * Refactor duplications * Traps diff --git a/docs/bundle.js b/docs/bundle.js index f950bdd..a756b69 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -1 +1 @@ -!function(t){function r(t){delete installedChunks[t]}function e(t){var r=document.getElementsByTagName("head")[0],e=document.createElement("script");e.type="text/javascript",e.charset="utf-8",e.src=d.p+""+t+"."+y+".hot-update.js",r.appendChild(e)}function n(t){return t=t||1e4,new Promise(function(r,e){if("undefined"==typeof XMLHttpRequest)return e(new Error("No browser support"));try{var n=new XMLHttpRequest,o=d.p+""+y+".hot-update.json";n.open("GET",o,!0),n.timeout=t,n.send(null)}catch(t){return e(t)}n.onreadystatechange=function(){if(4===n.readyState)if(0===n.status)e(new Error("Manifest request to "+o+" timed out."));else if(404===n.status)r();else if(200!==n.status&&304!==n.status)e(new Error("Manifest request to "+o+" failed."));else{try{var t=JSON.parse(n.responseText)}catch(t){return void e(t)}r(t)}}})}function o(t){var r=S[t];if(!r)return d;var e=function(e){return r.hot.active?(S[e]?S[e].parents.indexOf(t)<0&&S[e].parents.push(t):(T=[t],h=e),r.children.indexOf(e)<0&&r.children.push(e)):(console.warn("[HMR] unexpected require("+e+") from disposed module "+t),T=[]),d(e)};for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&"e"!==n&&Object.defineProperty(e,n,function(t){return{configurable:!0,enumerable:!0,get:function(){return d[t]},set:function(r){d[t]=r}}}(n));return e.e=function(t){function r(){R--,"prepare"===E&&(C[t]||f(t),0===R&&0===x&&s())}return"ready"===E&&i("prepare"),R++,d.e(t).then(r,function(t){throw r(),t})},e}function c(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:h!==t,active:!0,accept:function(t,e){if(void 0===t)r._selfAccepted=!0;else if("function"==typeof t)r._selfAccepted=t;else if("object"==typeof t)for(var n=0;n=0&&r._disposeHandlers.splice(e,1)},check:a,apply:_,status:function(t){if(!t)return E;N.push(t)},addStatusHandler:function(t){N.push(t)},removeStatusHandler:function(t){var r=N.indexOf(t);r>=0&&N.splice(r,1)},data:w[t]};return h=void 0,r}function i(t){E=t;for(var r=0;r0;){var c=o.pop(),i=c.id,u=c.chain;if((l=S[i])&&!l.hot._selfAccepted){if(l.hot._selfDeclined)return{type:"self-declined",chain:u,moduleId:i};if(l.hot._main)return{type:"unaccepted",chain:u,moduleId:i};for(var a=0;a=0||(s.hot._acceptedDependencies[i]?(e[f]||(e[f]=[]),n(e[f],[i])):(delete e[f],r.push(f),o.push({chain:u.concat([f]),id:f})))}}}}return{type:"accepted",moduleId:t,outdatedModules:r,outdatedDependencies:e}}(f):{type:"disposed",moduleId:v};var k=!1,B=!1,N=!1,x="";switch(b.chain&&(x="\nUpdate propagation: "+b.chain.join(" -> ")),b.type){case"self-declined":e.onDeclined&&e.onDeclined(b),e.ignoreDeclined||(k=new Error("Aborted because of self decline: "+b.moduleId+x));break;case"declined":e.onDeclined&&e.onDeclined(b),e.ignoreDeclined||(k=new Error("Aborted because of declined dependency: "+b.moduleId+" in "+b.parentId+x));break;case"unaccepted":e.onUnaccepted&&e.onUnaccepted(b),e.ignoreUnaccepted||(k=new Error("Aborted because "+f+" is not accepted"+x));break;case"accepted":e.onAccepted&&e.onAccepted(b),B=!0;break;case"disposed":e.onDisposed&&e.onDisposed(b),N=!0;break;default:throw new Error("Unexception type "+b.type)}if(k)return i("abort"),Promise.reject(k);if(B){p[f]=g[f],n(_,b.outdatedModules);for(f in b.outdatedDependencies)Object.prototype.hasOwnProperty.call(b.outdatedDependencies,f)&&(s[f]||(s[f]=[]),n(s[f],b.outdatedDependencies[f]))}N&&(n(_,[b.moduleId]),p[f]=h)}var R=[];for(c=0;c<_.length;c++)f=_[c],S[f]&&S[f].hot._selfAccepted&&R.push({module:f,errorHandler:S[f].hot._selfAccepted});i("dispose"),Object.keys(A).forEach(function(t){!1===A[t]&&r(t)});for(var C,O=_.slice();O.length>0;)if(f=O.pop(),l=S[f]){var M={},j=l.hot._disposeHandlers;for(a=0;a=0&&L.parents.splice(C,1))}}var I,P;for(f in s)if(Object.prototype.hasOwnProperty.call(s,f)&&(l=S[f]))for(P=s[f],a=0;a=0&&l.children.splice(C,1);i("apply"),y=m;for(f in p)Object.prototype.hasOwnProperty.call(p,f)&&(t[f]=p[f]);var D=null;for(f in s)if(Object.prototype.hasOwnProperty.call(s,f)&&(l=S[f])){P=s[f];var U=[];for(c=0;c=0)continue;U.push(o)}for(c=0;c=0&&y.splice(r,1)}function u(t){var r=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),l(r,t.attrs),c(t,r),r}function a(t){var r=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",l(r,t.attrs),c(t,r),r}function l(t,r){Object.keys(r).forEach(function(e){t.setAttribute(e,r[e])})}function f(t,r){var e,n,o,c;if(r.transform&&t.css){if(!(c=r.transform(t.css)))return function(){};t.css=c}if(r.singleton){var l=b++;e=m||(m=u(r)),n=s.bind(null,e,l,!1),o=s.bind(null,e,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=a(r),n=d.bind(null,e,r),o=function(){i(e),e.href&&URL.revokeObjectURL(e.href)}):(e=u(r),n=_.bind(null,e),o=function(){i(e)});return n(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;n(t=r)}else o()}}function s(t,r,e,n){var o=e?"":n.css;if(t.styleSheet)t.styleSheet.cssText=w(r,o);else{var c=document.createTextNode(o),i=t.childNodes;i[r]&&t.removeChild(i[r]),i.length?t.insertBefore(c,i[r]):t.appendChild(c)}}function _(t,r){var e=r.css,n=r.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}function d(t,r,e){var n=e.css,o=e.sourceMap,c=void 0===r.convertToAbsoluteUrls&&o;(r.convertToAbsoluteUrls||c)&&(n=k(n)),o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(i),u&&URL.revokeObjectURL(u)}var p={},h=function(t){var r;return function(){return void 0===r&&(r=t.apply(this,arguments)),r}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){return document.querySelector(t)},g=function(t){var r={};return function(t){if("function"==typeof t)return t();if(void 0===r[t]){var e=v.call(this,t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(t){e=null}r[t]=e}return r[t]}}(),m=null,b=0,y=[],k=e("./node_modules/style-loader/lib/urls.js");t.exports=function(t,r){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");r=r||{},r.attrs="object"==typeof r.attrs?r.attrs:{},r.singleton||"boolean"==typeof r.singleton||(r.singleton=h()),r.insertInto||(r.insertInto="head"),r.insertAt||(r.insertAt="bottom");var e=o(t,r);return n(e,r),function(t){for(var c=[],i=0;i0?t>=0?e:e+r:-n(-t,-r);return o===r?0:o}function o(t,r){return Math.log(r)/Math.log(t)}function i(t){return-t}function u(t){return t<0?-t:t}function a(t,r){return m.cmp(t,r)<0?t:r}function l(t,r){return m.cmp(t,r)>0?t:r}function f(t,r,e){return m.cmp(e,t)<0?t:m.cmp(e,r)>0?r:e}function s(t,r){return{ctor:k[m.cmp(t,r)+1]}}function _(t,r){return t!==r}function d(t){return!t}function p(t){return t===1/0||t===-1/0}function h(t){return 0|t}function v(t){return t*Math.PI/180}function g(t){return 2*Math.PI*t}function b(t){var r=t._0,e=t._1;return m.Tuple2(r*Math.cos(e),r*Math.sin(e))}function y(t){var r=t._0,e=t._1;return m.Tuple2(Math.sqrt(r*r+e*e),Math.atan2(e,r))}var k=["LT","EQ","GT"];return{div:e(t),rem:e(r),mod:e(n),pi:Math.PI,e:Math.E,cos:Math.cos,sin:Math.sin,tan:Math.tan,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:e(Math.atan2),degrees:v,turns:g,fromPolar:b,toPolar:y,sqrt:Math.sqrt,logBase:e(o),negate:i,abs:u,min:e(a),max:e(l),clamp:c(f),compare:e(s),xor:e(_),not:d,truncate:h,ceiling:Math.ceil,floor:Math.floor,round:Math.round,toFloat:function(t){return t},isNaN:isNaN,isInfinite:p}}(),m=function(){function t(t,e){for(var n,o=[],c=r(t,e,0,o);c&&(n=o.pop());)c=r(n.x,n.y,0,o);return c}function r(t,e,n,o){if(n>100)return o.push({x:t,y:e}),!0;if(t===e)return!0;if("object"!=typeof t){if("function"==typeof t)throw new Error('Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense. Read more about this at http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#== which describes why it is this way and what the better version will look like.');return!1}if(null===t||null===e)return!1;if(t instanceof Date)return t.getTime()===e.getTime();if(!("ctor"in t)){for(var c in t)if(!r(t[c],e[c],n+1,o))return!1;return!0}if("RBNode_elm_builtin"!==t.ctor&&"RBEmpty_elm_builtin"!==t.ctor||(t=ht(t),e=ht(e)),"Set_elm_builtin"===t.ctor&&(t=_elm_lang$core$Set$toList(t),e=_elm_lang$core$Set$toList(e)),"::"===t.ctor){for(var i=t,u=e;"::"===i.ctor&&"::"===u.ctor;){if(!r(i._0,u._0,n+1,o))return!1;i=i._1,u=u._1}return i.ctor===u.ctor}if("_Array"===t.ctor){var a=sr.toJSArray(t),l=sr.toJSArray(e);if(a.length!==l.length)return!1;for(var f=0;f=1){if((c=n(t._0,r._0))!==v)return c;if(i>=2){if((c=n(t._1,r._1))!==v)return c;if(i>=3){if((c=n(t._2,r._2))!==v)return c;if(i>=4){if((c=n(t._3,r._3))!==v)return c;if(i>=5){if((c=n(t._4,r._4))!==v)return c;if(i>=6){if((c=n(t._5,r._5))!==v)return c;if(i>=7)throw new Error("Comparison error: cannot compare tuples with more than 6 elements.")}}}}}}return v}throw new Error("Comparison error: comparison is only defined on ints, floats, times, chars, strings, lists of comparable values, and tuples of comparable values.")}function o(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}function c(t){return new String(t)}function i(t){return b++}function u(t,r){var e={};for(var n in t)e[n]=t[n];for(var n in r)e[n]=r[n];return e}function a(t,r){return{ctor:"::",_0:t,_1:r}}function l(t,r){if("string"==typeof t)return t+r;if("[]"===t.ctor)return r;var e=a(t._0,y),n=e;for(t=t._1;"[]"!==t.ctor;)n._1=a(t._0,y),t=t._1,n=n._1;return n._1=r,e}function f(t,r){return function(e){throw new Error("Ran into a `Debug.crash` in module `"+t+"` "+_(r)+"\nThe message provided by the code author is:\n\n "+e)}}function s(t,r,e){return function(n){throw new Error("Ran into a `Debug.crash` in module `"+t+"`\n\nThis was caused by the `case` expression "+_(r)+".\nOne of the branches ended with a crash and the following value got through:\n\n "+d(e)+"\n\nThe message provided by the code author is:\n\n "+n)}}function _(t){return t.start.line==t.end.line?"on line "+t.start.line:"between lines "+t.start.line+" and "+t.end.line}function d(t){var r=typeof t;if("function"===r)return"";if("boolean"===r)return t?"True":"False";if("number"===r)return t+"";if(t instanceof String)return"'"+p(t,!0)+"'";if("string"===r)return'"'+p(t,!1)+'"';if(null===t)return"null";if("object"===r&&"ctor"in t){var e=t.ctor.substring(0,5);if("_Tupl"===e){var n=[];for(var o in t)"ctor"!==o&&n.push(d(t[o]));return"("+n.join(",")+")"}if("_Task"===e)return"";if("_Array"===t.ctor){return"Array.fromList "+d(hr(t))}if(""===t.ctor)return"";if("_Process"===t.ctor)return"";if("::"===t.ctor){var n="["+d(t._0);for(t=t._1;"::"===t.ctor;)n+=","+d(t._0),t=t._1;return n+"]"}if("[]"===t.ctor)return"[]";if("Set_elm_builtin"===t.ctor)return"Set.fromList "+d(_elm_lang$core$Set$toList(t));if("RBNode_elm_builtin"===t.ctor||"RBEmpty_elm_builtin"===t.ctor)return"Dict.fromList "+d(ht(t));var n="";for(var c in t)if("ctor"!==c){var i=d(t[c]),u=i[0],a="{"===u||"("===u||"<"===u||'"'===u||i.indexOf(" ")<0;n+=" "+(a?i:"("+i+")")}return t.ctor+n}if("object"===r){if(t instanceof Date)return"<"+t.toString()+">";if(t.elm_web_socket)return"";var n=[];for(var o in t)n.push(o+" = "+d(t[o]));return 0===n.length?"{}":"{ "+n.join(", ")+" }"}return""}function p(t,r){var e=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return r?e.replace(/\'/g,"\\'"):e.replace(/\"/g,'\\"')}var h=-1,v=0,g=1,m={ctor:"_Tuple0"},b=0,y={ctor:"[]"};return{eq:t,cmp:n,Tuple0:m,Tuple2:o,chr:c,update:u,guid:i,append:e(l),crash:f,crashCase:s,toString:d}}(),b=(e(function(t,r){var e=r;return _(t,e._0,e._1)}),c(function(t,r,e){return t({ctor:"_Tuple2",_0:r,_1:e})}),c(function(t,r,e){return _(t,e,r)})),y=e(function(t,r){return t}),k=function(t){return t},w=w||{};w["<|"]=e(function(t,r){return t(r)});var w=w||{};w["|>"]=e(function(t,r){return r(t)});var w=w||{};w[">>"]=c(function(t,r,e){return r(t(e))});var w=w||{};w["<<"]=c(function(t,r,e){return t(r(e))});var w=w||{};w["++"]=m.append;var T=m.toString,w=(g.isInfinite,g.isNaN,g.toFloat,g.ceiling,g.floor,g.truncate,g.round,g.not,g.xor,w||{});w["||"]=g.or;var w=w||{};w["&&"]=g.and;var B=g.max,N=g.min,E=g.compare,w=w||{};w[">="]=g.ge;var w=w||{};w["<="]=g.le;var w=w||{};w[">"]=g.gt;var w=w||{};w["<"]=g.lt;var w=w||{};w["/="]=g.neq;var w=w||{};w["=="]=g.eq;var w=(g.e,g.pi,g.clamp,g.logBase,g.abs,g.negate,g.sqrt,g.atan2,g.atan,g.asin,g.acos,g.tan,g.sin,g.cos,w||{});w["^"]=g.exp;var w=w||{};w["%"]=g.mod;var w=(g.rem,w||{});w["//"]=g.div;var w=w||{};w["/"]=g.floatDiv;var w=w||{};w["*"]=g.mul;var w=w||{};w["-"]=g.sub;var w=w||{};w["+"]=g.add;var x=(g.toPolar,g.fromPolar,g.turns,g.degrees,e(function(t,r){var e=r;return"Just"===e.ctor?e._0:t})),R={ctor:"Nothing"},C=e(function(t,r){var e=r;return"Just"===e.ctor?t(e._0):R}),O=function(t){return{ctor:"Just",_0:t}},A=e(function(t,r){var e=r;return"Just"===e.ctor?O(t(e._0)):R}),S=c(function(t,r,e){var n={ctor:"_Tuple2",_0:r,_1:e};return"_Tuple2"===n.ctor&&"Just"===n._0.ctor&&"Just"===n._1.ctor?O(_(t,n._0._0,n._1._0)):R}),M=(i(function(t,r,e,n){var o={ctor:"_Tuple3",_0:r,_1:e,_2:n};return"_Tuple3"===o.ctor&&"Just"===o._0.ctor&&"Just"===o._1.ctor&&"Just"===o._2.ctor?O(d(t,o._0._0,o._1._0,o._2._0)):R}),u(function(t,r,e,n,o){var c={ctor:"_Tuple4",_0:r,_1:e,_2:n,_3:o};return"_Tuple4"===c.ctor&&"Just"===c._0.ctor&&"Just"===c._1.ctor&&"Just"===c._2.ctor&&"Just"===c._3.ctor?O(p(t,c._0._0,c._1._0,c._2._0,c._3._0)):R}),a(function(t,r,e,n,o,c){var i={ctor:"_Tuple5",_0:r,_1:e,_2:n,_3:o,_4:c};return"_Tuple5"===i.ctor&&"Just"===i._0.ctor&&"Just"===i._1.ctor&&"Just"===i._2.ctor&&"Just"===i._3.ctor&&"Just"===i._4.ctor?O(h(t,i._0._0,i._1._0,i._2._0,i._3._0,i._4._0)):R}),function(){function t(t,r){return{ctor:"::",_0:t,_1:r}}function r(r){for(var e=y,n=r.length;n--;)e=t(r[n],e);return e}function n(t){for(var r=[];"[]"!==t.ctor;)r.push(t._0),t=t._1;return r}function o(t,r,e){for(var o=n(e),c=r,i=o.length;i--;)c=_(t,o[i],c);return c}function l(t,e,n){for(var o=[];"[]"!==e.ctor&&"[]"!==n.ctor;)o.push(_(t,e._0,n._0)),e=e._1,n=n._1;return r(o)}function f(t,e,n,o){for(var c=[];"[]"!==e.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor;)c.push(d(t,e._0,n._0,o._0)),e=e._1,n=n._1,o=o._1;return r(c)}function s(t,e,n,o,c){for(var i=[];"[]"!==e.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor&&"[]"!==c.ctor;)i.push(p(t,e._0,n._0,o._0,c._0)),e=e._1,n=n._1,o=o._1,c=c._1;return r(i)}function v(t,e,n,o,c,i){for(var u=[];"[]"!==e.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor&&"[]"!==c.ctor&&"[]"!==i.ctor;)u.push(h(t,e._0,n._0,o._0,c._0,i._0)),e=e._1,n=n._1,o=o._1,c=c._1,i=i._1;return r(u)}function g(t,e){return r(n(e).sort(function(r,e){return m.cmp(t(r),t(e))}))}function b(t,e){return r(n(e).sort(function(r,e){var n=t(r)(e).ctor;return"EQ"===n?0:"LT"===n?-1:1}))}var y={ctor:"[]"};return{Nil:y,Cons:t,cons:e(t),toArray:n,fromArray:r,foldr:c(o),map2:c(l),map3:i(f),map4:u(s),map5:a(v),sortBy:e(g),sortWith:e(b)}}()),j=(M.sortWith,M.sortBy,e(function(t,r){for(;;){if(m.cmp(t,0)<1)return r;var e=r;if("[]"===e.ctor)return r;var n=t-1,o=e._1;t=n,r=o}}),M.map5,M.map4,M.map3,M.map2),L=e(function(t,r){for(;;){var e=r;if("[]"===e.ctor)return!1;if(t(e._0))return!0;var n=t,o=e._1;t=n,r=o}}),I=(e(function(t,r){return!_(L,function(r){return!t(r)},r)}),M.foldr),P=c(function(t,r,e){for(;;){var n=e;if("[]"===n.ctor)return r;var o=t,c=_(t,n._0,r),i=n._1;t=o,r=c,e=i}}),D=function(t){return d(P,e(function(t,r){return r+1}),0,t)},U=function(t){return d(P,e(function(t,r){return t+r}),0,t)},J=e(function(t,r){return _(L,function(r){return m.eq(r,t)},r)}),H=function(t){return"[]"===t.ctor},W=function(t){var r=t;return"::"===r.ctor?O(r._0):R},q=q||{};q["::"]=M.cons;var F=e(function(t,r){return d(I,e(function(r,e){return{ctor:"::",_0:t(r),_1:e}}),{ctor:"[]"},r)}),z=e(function(t,r){var n=e(function(r,e){return t(r)?{ctor:"::",_0:r,_1:e}:e});return d(I,n,{ctor:"[]"},r)}),K=c(function(t,r,e){var n=t(r);return"Just"===n.ctor?{ctor:"::",_0:n._0,_1:e}:e}),$=e(function(t,r){return d(I,K(t),{ctor:"[]"},r)}),Q=function(t){return d(P,e(function(t,r){return{ctor:"::",_0:t,_1:r}}),{ctor:"[]"},t)},V=(c(function(t,r,n){var o=e(function(r,e){var n=e;return"::"===n.ctor?{ctor:"::",_0:_(t,r,n._0),_1:e}:{ctor:"[]"}});return Q(d(P,o,{ctor:"::",_0:r,_1:{ctor:"[]"}},n))}),e(function(t,r){return"[]"===r.ctor?t:d(I,e(function(t,r){return{ctor:"::",_0:t,_1:r}}),r,t)})),G=function(t){return d(I,V,{ctor:"[]"},t)},X=e(function(t,r){return G(_(F,t,r))}),Y=(e(function(t,r){var n=e(function(r,e){var n=e,o=n._0,c=n._1;return t(r)?{ctor:"_Tuple2",_0:{ctor:"::",_0:r,_1:o},_1:c}:{ctor:"_Tuple2",_0:o,_1:{ctor:"::",_0:r,_1:c}}});return d(I,n,{ctor:"_Tuple2",_0:{ctor:"[]"},_1:{ctor:"[]"}},r)}),e(function(t,r){var n=r;if("[]"===n.ctor)return{ctor:"[]"};var o=e(function(r,e){return{ctor:"::",_0:t,_1:{ctor:"::",_0:r,_1:e}}}),c=d(I,o,{ctor:"[]"},n._1);return{ctor:"::",_0:n._0,_1:c}}),c(function(t,r,e){for(;;){if(m.cmp(t,0)<1)return e;var n=r;if("[]"===n.ctor)return e;var o=t-1,c=n._1,i={ctor:"::",_0:n._0,_1:e};t=o,r=c,e=i}})),Z=e(function(t,r){return Q(d(Y,t,r,{ctor:"[]"}))}),tt=c(function(t,r,e){if(m.cmp(r,0)<1)return{ctor:"[]"};var n={ctor:"_Tuple2",_0:r,_1:e};t:do{r:do{if("_Tuple2"!==n.ctor)break t;if("[]"===n._1.ctor)return e;if("::"!==n._1._1.ctor){if(1===n._0)break r;break t}switch(n._0){case 1:break r;case 2:return{ctor:"::",_0:n._1._0,_1:{ctor:"::",_0:n._1._1._0,_1:{ctor:"[]"}}};case 3:if("::"===n._1._1._1.ctor)return{ctor:"::",_0:n._1._0,_1:{ctor:"::",_0:n._1._1._0,_1:{ctor:"::",_0:n._1._1._1._0,_1:{ctor:"[]"}}}};break t;default:if("::"===n._1._1._1.ctor&&"::"===n._1._1._1._1.ctor){var o=n._1._1._1._0,c=n._1._1._0,i=n._1._0,u=n._1._1._1._1._0,a=n._1._1._1._1._1;return m.cmp(t,1e3)>0?{ctor:"::",_0:i,_1:{ctor:"::",_0:c,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:u,_1:_(Z,r-4,a)}}}}:{ctor:"::",_0:i,_1:{ctor:"::",_0:c,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:u,_1:d(tt,t+1,r-4,a)}}}}}break t}}while(!1);return{ctor:"::",_0:n._1._0,_1:{ctor:"[]"}}}while(!1);return e}),rt=(e(function(t,r){return d(tt,0,t,r)}),c(function(t,r,e){for(;;){if(m.cmp(r,0)<1)return t;var n={ctor:"::",_0:e,_1:t},o=r-1,c=e;t=n,r=o,e=c}})),et=(e(function(t,r){return d(rt,{ctor:"[]"},t,r)}),c(function(t,r,e){for(;;){if(!(m.cmp(t,r)<1))return e;var n=t,o=r-1,c={ctor:"::",_0:r,_1:e};t=n,r=o,e=c}})),nt=e(function(t,r){return d(et,t,r,{ctor:"[]"})}),ot=(e(function(t,r){return d(j,t,_(nt,0,D(r)-1),r)}),function(){function t(t,r){var e=t+": "+m.toString(r),n=n||{};return n.stdout?n.stdout.write(e):console.log(e),r}function r(t){throw new Error(t)}return{crash:r,log:e(t)}}()),ct=function(){function t(t){return 0===t.length}function r(t,r){return t+r}function n(t){var r=t[0];return r?O(m.Tuple2(m.chr(r),t.slice(1))):R}function o(t,r){return t+r}function i(t){return M.toArray(t).join("")}function u(t){return t.length}function a(t,r){for(var e=r.split(""),n=e.length;n--;)e[n]=t(m.chr(e[n]));return e.join("")}function l(t,r){return r.split("").map(m.chr).filter(t).join("")}function f(t){return t.split("").reverse().join("")}function s(t,r,e){for(var n=e.length,o=0;o0;)1&t&&(e+=r),t>>=1,r+=r;return e}function g(t,r,e){return e.slice(t,r)}function b(t,r){return t<1?"":r.slice(0,t)}function y(t,r){return t<1?"":r.slice(-t)}function k(t,r){return t<1?r:r.slice(t)}function w(t,r){return t<1?r:r.slice(0,-t)}function T(t,r,e){var n=(t-e.length)/2;return v(Math.ceil(n),r)+e+v(0|n,r)}function B(t,r,e){return e+v(t-e.length,r)}function N(t,r,e){return v(t-e.length,r)+e}function E(t){return t.trim()}function x(t){return t.replace(/^\s+/,"")}function C(t){return t.replace(/\s+$/,"")}function A(t){return M.fromArray(t.trim().split(/\s+/g))}function S(t){return M.fromArray(t.split(/\r\n|\r|\n/g))}function j(t){return t.toUpperCase()}function L(t){return t.toLowerCase()}function I(t,r){for(var e=r.length;e--;)if(t(m.chr(r[e])))return!0;return!1}function P(t,r){for(var e=r.length;e--;)if(!t(m.chr(r[e])))return!1;return!0}function D(t,r){return r.indexOf(t)>-1}function U(t,r){return 0===r.indexOf(t)}function J(t,r){return r.length>=t.length&&r.lastIndexOf(t)===r.length-t.length}function H(t,r){var e=t.length;if(e<1)return M.Nil;for(var n=0,o=[];(n=r.indexOf(t,n))>-1;)o.push(n),n+=e;return M.fromArray(o)}function W(t){var r=t.length;if(0===r)return q(t);var e=t[0];if("0"===e&&"x"===t[1]){for(var n=2;n"9"||e<"0"&&"-"!==e&&"+"!==e)return q(t);for(var n=1;n-1&&m.cmp(n,ut(r))<1})),lt=(_(at,m.chr("A"),m.chr("Z")),_(at,m.chr("a"),m.chr("z")),_(at,m.chr("0"),m.chr("9")),_(at,m.chr("0"),m.chr("7")),e(function(t,r){var e=r;return"Ok"===e.ctor?e._0:t}),function(t){return{ctor:"Err",_0:t}}),ft=(e(function(t,r){var e=r;return"Ok"===e.ctor?t(e._0):lt(e._0)}),function(t){return{ctor:"Ok",_0:t}}),st=(e(function(t,r){var e=r;return"Ok"===e.ctor?ft(t(e._0)):lt(e._0)}),c(function(t,r,e){var n={ctor:"_Tuple2",_0:r,_1:e};return"Ok"===n._0.ctor?"Ok"===n._1.ctor?ft(_(t,n._0._0,n._1._0)):lt(n._1._0):lt(n._0._0)}),i(function(t,r,e,n){var o={ctor:"_Tuple3",_0:r,_1:e,_2:n};return"Ok"===o._0.ctor?"Ok"===o._1.ctor?"Ok"===o._2.ctor?ft(d(t,o._0._0,o._1._0,o._2._0)):lt(o._2._0):lt(o._1._0):lt(o._0._0)}),u(function(t,r,e,n,o){var c={ctor:"_Tuple4",_0:r,_1:e,_2:n,_3:o};return"Ok"===c._0.ctor?"Ok"===c._1.ctor?"Ok"===c._2.ctor?"Ok"===c._3.ctor?ft(p(t,c._0._0,c._1._0,c._2._0,c._3._0)):lt(c._3._0):lt(c._2._0):lt(c._1._0):lt(c._0._0)}),a(function(t,r,e,n,o,c){var i={ctor:"_Tuple5",_0:r,_1:e,_2:n,_3:o,_4:c};return"Ok"===i._0.ctor?"Ok"===i._1.ctor?"Ok"===i._2.ctor?"Ok"===i._3.ctor?"Ok"===i._4.ctor?ft(h(t,i._0._0,i._1._0,i._2._0,i._3._0,i._4._0)):lt(i._4._0):lt(i._3._0):lt(i._2._0):lt(i._1._0):lt(i._0._0)}),e(function(t,r){var e=r;return"Ok"===e.ctor?ft(e._0):lt(t(e._0))}),e(function(t,r){var e=r;return"Just"===e.ctor?ft(e._0):lt(t)}),ct.fromList,ct.toList,ct.toFloat,ct.toInt,ct.indexes,ct.indexes,ct.endsWith,ct.startsWith,ct.contains,ct.all,ct.any,ct.toLower,ct.toUpper,ct.lines,ct.words,ct.trimRight,ct.trimLeft,ct.trim,ct.padRight,ct.padLeft,ct.pad,ct.dropRight,ct.dropLeft,ct.right,ct.left,ct.slice,ct.repeat,ct.join,ct.split,ct.foldr,ct.foldl,ct.reverse,ct.filter,ct.map,ct.length,ct.concat),_t=(ct.append,ct.uncons,ct.cons,ct.isEmpty,c(function(t,r,e){for(;;){var n=e;if("RBEmpty_elm_builtin"===n.ctor)return r;var o=t,c=d(t,n._1,n._2,d(_t,t,r,n._4)),i=n._3;t=o,r=c,e=i}})),dt=function(t){return d(_t,c(function(t,r,e){return{ctor:"::",_0:t,_1:e}}),{ctor:"[]"},t)},pt=function(t){return d(_t,c(function(t,r,e){return{ctor:"::",_0:r,_1:e}}),{ctor:"[]"},t)},ht=function(t){return d(_t,c(function(t,r,e){return{ctor:"::",_0:{ctor:"_Tuple2",_0:t,_1:r},_1:e}}),{ctor:"[]"},t)},vt=c(function(t,r,e){for(;;){var n=e;if("RBEmpty_elm_builtin"===n.ctor)return r;var o=t,c=d(t,n._1,n._2,d(vt,t,r,n._3)),i=n._4;t=o,r=c,e=i}}),gt=a(function(t,r,n,o,i,u){var a=c(function(e,o,c){for(;;){var i=c,u=i._1,a=i._0,l=a;if("[]"===l.ctor)return{ctor:"_Tuple2",_0:a,_1:d(n,e,o,u)};var f=l._1,s=l._0._1,_=l._0._0;if(!(m.cmp(_,e)<0))return m.cmp(_,e)>0?{ctor:"_Tuple2",_0:a,_1:d(n,e,o,u)}:{ctor:"_Tuple2",_0:f,_1:p(r,_,s,o,u)};var h=e,v=o,g={ctor:"_Tuple2",_0:f,_1:d(t,_,s,u)};e=h,o=v,c=g}}),l=d(vt,a,{ctor:"_Tuple2",_0:ht(o),_1:u},i),f=l._0,s=l._1;return d(P,e(function(r,e){var n=r;return d(t,n._0,n._1,e)}),s,f)}),mt=i(function(t,r,e,n){return ot.crash(st({ctor:"::",_0:"Internal red-black tree invariant violated, expected ",_1:{ctor:"::",_0:t,_1:{ctor:"::",_0:" and got ",_1:{ctor:"::",_0:T(r),_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:e,_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:n,_1:{ctor:"::",_0:"\nPlease report this bug to ",_1:{ctor:"[]"}}}}}}}}}}))}),bt=function(t){var r=t;t:do{if("RBNode_elm_builtin"===r.ctor){if("BBlack"===r._0.ctor)return!0;break t}if("LBBlack"===r._0.ctor)return!0;break t}while(!1);return!1},yt=e(function(t,r){for(;;){var e=r;if("RBEmpty_elm_builtin"===e.ctor)return t;var n=_(yt,t+1,e._4),o=e._3;t=n,r=o}}),kt=e(function(t,r){t:for(;;){var e=r;if("RBEmpty_elm_builtin"===e.ctor)return R;var n=_(E,t,e._1);switch(n.ctor){case"LT":var o=t,c=e._3;t=o,r=c;continue t;case"EQ":return O(e._2);default:var i=t,u=e._4;t=i,r=u;continue t}}}),wt=e(function(t,r){return"Just"===_(kt,t,r).ctor}),Tt=c(function(t,r,e){for(;;){var n=e;if("RBEmpty_elm_builtin"===n.ctor)return{ctor:"_Tuple2",_0:t,_1:r};var o=n._1,c=n._2,i=n._4;t=o,r=c,e=i}}),Bt={ctor:"NBlack"},Nt={ctor:"BBlack"},Et={ctor:"Black"},xt=function(t){var r=t;if("RBNode_elm_builtin"===r.ctor){var e=r._0;return m.eq(e,Et)||m.eq(e,Nt)}return!0},Rt={ctor:"Red"},Ct=function(t){switch(t.ctor){case"Black":return Nt;case"Red":return Et;case"NBlack":return Rt;default:return ot.crash("Can't make a double black node more black!")}},Ot=function(t){switch(t.ctor){case"BBlack":return Et;case"Black":return Rt;case"Red":return Bt;default:return ot.crash("Can't make a negative black node less black!")}},At={ctor:"LBBlack"},St={ctor:"LBlack"},Mt=function(t){return{ctor:"RBEmpty_elm_builtin",_0:t}},jt=Mt(St),Lt=u(function(t,r,e,n,o){return{ctor:"RBNode_elm_builtin",_0:t,_1:r,_2:e,_3:n,_4:o}}),It=function(t){var r=t;return"RBNode_elm_builtin"===r.ctor&&"Red"===r._0.ctor?h(Lt,Et,r._1,r._2,r._3,r._4):t},Pt=function(t){var r=t;return"RBNode_elm_builtin"===r.ctor?h(Lt,Ot(r._0),r._1,r._2,r._3,r._4):Mt(St)},Dt=function(t){return function(r){return function(e){return function(n){return function(o){return function(c){return function(i){return function(u){return function(a){return function(l){return function(f){return h(Lt,Ot(t),n,o,h(Lt,Et,r,e,u,a),h(Lt,Et,c,i,l,f))}}}}}}}}}}},Ut=function(t){var r=t;return"RBEmpty_elm_builtin"===r.ctor?Mt(St):h(Lt,Et,r._1,r._2,r._3,r._4)},Jt=function(t){var r=t;return"RBEmpty_elm_builtin"===r.ctor?ot.crash("can't make a Leaf red"):h(Lt,Rt,r._1,r._2,r._3,r._4)},Ht=function(t){var r=t;t:do{r:do{e:do{n:do{o:do{c:do{i:do{if("RBNode_elm_builtin"!==r.ctor)break t;if("RBNode_elm_builtin"===r._3.ctor)if("RBNode_elm_builtin"===r._4.ctor)switch(r._3._0.ctor){case"Red":switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;break t;case"NBlack":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;break t;default:if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;break t}case"NBlack":switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t;case"NBlack":if("BBlack"===r._0.ctor){if("RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;if("RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t}break t;default:if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t}default:switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;break t;default:break t}}else switch(r._3._0.ctor){case"Red":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t;default:break t}else{if("RBNode_elm_builtin"!==r._4.ctor)break t;switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;break t;default:break t}}}while(!1);return Dt(r._0)(r._3._3._1)(r._3._3._2)(r._3._1)(r._3._2)(r._1)(r._2)(r._3._3._3)(r._3._3._4)(r._3._4)(r._4)}while(!1);return Dt(r._0)(r._3._1)(r._3._2)(r._3._4._1)(r._3._4._2)(r._1)(r._2)(r._3._3)(r._3._4._3)(r._3._4._4)(r._4)}while(!1);return Dt(r._0)(r._1)(r._2)(r._4._3._1)(r._4._3._2)(r._4._1)(r._4._2)(r._3)(r._4._3._3)(r._4._3._4)(r._4._4)}while(!1);return Dt(r._0)(r._1)(r._2)(r._4._1)(r._4._2)(r._4._4._1)(r._4._4._2)(r._3)(r._4._3)(r._4._4._3)(r._4._4._4)}while(!1);return h(Lt,Et,r._4._3._1,r._4._3._2,h(Lt,Et,r._1,r._2,r._3,r._4._3._3),h(Wt,Et,r._4._1,r._4._2,r._4._3._4,Jt(r._4._4)))}while(!1);return h(Lt,Et,r._3._4._1,r._3._4._2,h(Wt,Et,r._3._1,r._3._2,Jt(r._3._3),r._3._4._3),h(Lt,Et,r._1,r._2,r._3._4._4,r._4))}while(!1);return t},Wt=u(function(t,r,e,n,o){var c=h(Lt,t,r,e,n,o);return xt(c)?Ht(c):c}),qt=u(function(t,r,e,n,o){return bt(n)||bt(o)?h(Wt,Ct(t),r,e,Pt(n),Pt(o)):h(Lt,t,r,e,n,o)}),Ft=u(function(t,r,e,n,o){var c=o;return"RBEmpty_elm_builtin"===c.ctor?d(zt,t,n,o):h(qt,t,r,e,n,h(Ft,c._0,c._1,c._2,c._3,c._4))}),zt=c(function(t,r,e){var n={ctor:"_Tuple2",_0:r,_1:e};if("RBEmpty_elm_builtin"!==n._0.ctor){if("RBEmpty_elm_builtin"===n._1.ctor){var o=n._1._0,c=n._0._0,i={ctor:"_Tuple3",_0:t,_1:c,_2:o};return"_Tuple3"===i.ctor&&"Black"===i._0.ctor&&"Red"===i._1.ctor&&"LBlack"===i._2.ctor?h(Lt,Et,n._0._1,n._0._2,n._0._3,n._0._4):p(mt,"Black/Red/LBlack",t,T(c),T(o))}var u=n._0._2,a=n._0._4,l=n._0._1,f=h(Ft,n._0._0,l,u,n._0._3,a),s=d(Tt,l,u,a),_=s._0,v=s._1;return h(qt,t,_,v,f,e)}if("RBEmpty_elm_builtin"!==n._1.ctor){var g=n._1._0,m=n._0._0,b={ctor:"_Tuple3",_0:t,_1:m,_2:g};return"_Tuple3"===b.ctor&&"Black"===b._0.ctor&&"LBlack"===b._1.ctor&&"Red"===b._2.ctor?h(Lt,Et,n._1._1,n._1._2,n._1._3,n._1._4):p(mt,"Black/LBlack/Red",t,T(m),T(g))}switch(t.ctor){case"Red":return Mt(St);case"Black":return Mt(At);default:return ot.crash("cannot have bblack or nblack nodes at this point")}}),Kt=e(function(t,r){var e=r;if("RBEmpty_elm_builtin"===e.ctor)return Mt(St);var n=e._1;return h(Lt,e._0,n,_(t,n,e._2),_(Kt,t,e._3),_(Kt,t,e._4))}),$t={ctor:"Same"},Qt={ctor:"Remove"},Vt={ctor:"Insert"},Gt=c(function(t,r,e){var n=function(e){var o=e;if("RBEmpty_elm_builtin"===o.ctor){var c=r(R);return"Nothing"===c.ctor?{ctor:"_Tuple2",_0:$t,_1:jt}:{ctor:"_Tuple2",_0:Vt,_1:h(Lt,Rt,t,c._0,jt,jt)}}var i=o._2,u=o._4,a=o._3,l=o._1,f=o._0;switch(_(E,t,l).ctor){case"EQ":var s=r(O(i));return"Nothing"===s.ctor?{ctor:"_Tuple2",_0:Qt,_1:d(zt,f,a,u)}:{ctor:"_Tuple2",_0:$t,_1:h(Lt,f,l,s._0,a,u)};case"LT":var p=n(a),v=p._0,g=p._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:$t,_1:h(Lt,f,l,i,g,u)};case"Insert":return{ctor:"_Tuple2",_0:Vt,_1:h(Wt,f,l,i,g,u)};default:return{ctor:"_Tuple2",_0:Qt,_1:h(qt,f,l,i,g,u)}}default:var m=n(u),v=m._0,b=m._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:$t,_1:h(Lt,f,l,i,a,b)};case"Insert":return{ctor:"_Tuple2",_0:Vt,_1:h(Wt,f,l,i,a,b)};default:return{ctor:"_Tuple2",_0:Qt,_1:h(qt,f,l,i,a,b)}}}},o=n(e),c=o._0,i=o._1;switch(c.ctor){case"Same":return i;case"Insert":return It(i);default:return Ut(i)}}),Xt=c(function(t,r,e){return d(Gt,t,y(O(r)),e)}),Yt=(e(function(t,r){return d(Xt,t,r,jt)}),e(function(t,r){return d(vt,Xt,r,t)}),e(function(t,r){var e=c(function(r,e,n){return _(t,r,e)?d(Xt,r,e,n):n});return d(vt,e,jt,r)})),Zt=(e(function(t,r){return _(Yt,e(function(t,e){return _(wt,t,r)}),t)}),e(function(t,r){var e=c(function(r,e,n){var o=n,c=o._1,i=o._0;return _(t,r,e)?{ctor:"_Tuple2",_0:d(Xt,r,e,i),_1:c}:{ctor:"_Tuple2",_0:i,_1:d(Xt,r,e,c)}});return d(vt,e,{ctor:"_Tuple2",_0:jt,_1:jt},r)}),function(t){return d(P,e(function(t,r){var e=t;return d(Xt,e._0,e._1,r)}),jt,t)}),tr=e(function(t,r){return d(Gt,t,y(R),r)}),rr=(e(function(t,r){return d(vt,c(function(t,r,e){return _(tr,t,e)}),t,r)}),e(function(t,r){var e=r;return{ctor:"_Tuple2",_0:e._0,_1:t(e._1)}}),e(function(t,r){var e=r;return{ctor:"_Tuple2",_0:t(e._0),_1:e._1}}),function(t){return t._1}),er=(ot.crash,ot.log,function(){function t(t){return function(r){return function(r,e){r.worker=function(r){if(void 0!==r)throw new Error("The `"+e+"` module does not need flags.\nCall "+e+".worker() with no arguments and you should be all set!");return i(t.init,t.update,t.subscriptions,n)}}}}function r(t){return function(r){return function(e,o){e.worker=function(e){if(void 0===r)throw new Error("Are you trying to sneak a Never value into Elm? Trickster!\nIt looks like "+o+".main is defined with `programWithFlags` but has type `Program Never`.\nUse `program` instead if you do not want flags.");var c=_($r.run,r,e);if("Err"===c.ctor)throw new Error(o+".worker(...) was called with an unexpected argument.\nI tried to convert it to an Elm value, but ran into this problem:\n\n"+c._0);return i(t.init(c._0),t.update,t.subscriptions,n)}}}}function n(t,r){return function(t){}}function o(t){var r=v(M.Nil),n=m.Tuple2(m.Tuple0,r);return oe({init:n,view:function(t){return main},update:e(function(t,r){return n}),subscriptions:function(t){return r}})}function i(t,r,e,n){function o(t,n){return nr.nativeBinding(function(o){var c=_(r,t,n);n=c._0,i(n);var u=c._1,l=e(n);b(a,u,l),o(nr.succeed(n))})}function c(t){nr.rawSend(f,t)}var i,a={},l=nr.nativeBinding(function(r){var o=t._0;i=n(c,o);var u=t._1,l=e(o);b(a,u,l),r(nr.succeed(o))}),f=s(l,o),d=u(a,c);return d?{ports:d}:{}}function u(t,r){var e;for(var n in R){var o=R[n];o.isForeign&&(e=e||{},e[n]="cmd"===o.tag?N(n):x(n,r)),t[n]=a(o,r)}return e}function a(t,r){function e(t,r){if("self"===t.ctor)return d(i,n,t._0,r);var e=t._0;switch(o){case"cmd":return d(c,n,e.cmds,r);case"sub":return d(c,n,e.subs,r);case"fx":return p(c,n,e.cmds,e.subs,r)}}var n={main:r,self:void 0},o=t.tag,c=t.onEffects,i=t.onSelfMsg,u=s(t.init,e);return n.self=u,u}function l(t,r){return nr.nativeBinding(function(e){t.main(r),e(nr.succeed(m.Tuple0))})}function f(t,r){return _(nr.send,t.self,{ctor:"self",_0:r})}function s(t,r){function e(t){var o=nr.receive(function(e){return r(e,t)});return _(n,e,o)}var n=nr.andThen,o=_(n,e,t);return nr.rawSpawn(o)}function h(t){return function(r){return{type:"leaf",home:t,value:r}}}function v(t){return{type:"node",branches:t}}function g(t,r){return{type:"map",tagger:t,tree:r}}function b(t,r,e){var n={};y(!0,r,n,null),y(!1,e,n,null);for(var o in t){var c=o in n?n[o]:{cmds:M.Nil,subs:M.Nil};nr.rawSend(t[o],{ctor:"fx",_0:c})}}function y(t,r,e,n){switch(r.type){case"leaf":var o=r.home,c=k(t,o,n,r.value);return void(e[o]=w(t,c,e[o]));case"node":for(var i=r.branches;"[]"!==i.ctor;)y(t,i._0,e,n),i=i._1;return;case"map":return void y(t,r.tree,e,{tagger:r.tagger,rest:n})}}function k(t,r,e,n){function o(t){for(var r=e;r;)t=r.tagger(t),r=r.rest;return t}return _(t?R[r].cmdMap:R[r].subMap,o,n)}function w(t,r,e){return e=e||{cmds:M.Nil,subs:M.Nil},t?(e.cmds=M.Cons(r,e.cmds),e):(e.subs=M.Cons(r,e.subs),e)}function T(t){if(t in R)throw new Error("There can only be one port named `"+t+"`, but your program has multiple.")}function B(t,r){return T(t),R[t]={tag:"cmd",cmdMap:C,converter:r,isForeign:!0},h(t)}function N(t){function r(t,r,e){for(;"[]"!==r.ctor;){for(var n=o,c=i(r._0),a=0;a=0&&o.splice(r,1)}var o=[],i=R[t].converter,u=nr.succeed(null);return R[t].init=u,R[t].onEffects=c(r),{subscribe:e,unsubscribe:n}}function E(t,r){return T(t),R[t]={tag:"sub",subMap:O,converter:r,isForeign:!0},h(t)}function x(t,r){function e(t,r,e){for(var o=n(t,r,e),c=0;c=P(e))throw new Error("Index "+t+" is out of range. Check the length of your array first or use getMaybe or getWithDefault.");return r(t,e)}function r(t,r){for(var e=r.height;e>0;e--){for(var n=t>>5*e;r.lengths[n]<=t;)n++;n>0&&(t-=r.lengths[n-1]),r=r.table[n]}return r.table[t]}function n(t,r,e){return t<0||P(e)<=t?e:o(t,r,e)}function o(t,r,e){if(e=I(e),0===e.height)e.table[t]=r;else{var n=D(t,e);n>0&&(t-=e.lengths[n-1]),e.table[n]=o(t,r,e.table[n])}return e}function i(t,r){return t<=0?Q:u(r,Math.floor(Math.log(t)/Math.log(K)),0,t)}function u(t,r,e,n){if(0===r){for(var o=new Array((n-e)%(K+1)),c=0;c0?a[c-1]:0);return{ctor:"_Array",height:r,table:o,lengths:a}}function a(t){if("[]"===t.ctor)return Q;for(var r=new Array(K),e=[],n=0;"[]"!==t.ctor;)if(r[n]=t._0,t=t._1,++n===K){var o={ctor:"_Array",height:0,table:r};l(o,e),r=new Array(K),n=0}if(n>0){var o={ctor:"_Array",height:0,table:r.splice(0,n)};l(o,e)}for(var c=0;c0&&l(e[c],e);var i=e[e.length-1];return i.height>0&&1===i.table.length?i.table[0]:i}function l(t,r){var e=t.height;if(r.length===e){var n={ctor:"_Array",height:e+1,table:[],lengths:[]};r.push(n)}r[e].table.push(t);var o=P(t);r[e].lengths.length>0&&(o+=r[e].lengths[r[e].lengths.length-1]),r[e].lengths.push(o),r[e].table.length===K&&(l(r[e],r),r[e]={ctor:"_Array",height:e+1,table:[],lengths:[]})}function f(t,r){var e=s(t,r);return null!==e?e:H(r,U(t,r.height))}function s(t,r){if(0===r.height){if(r.table.length=0;e--)t=0===r.height?M.Cons(r.table[e],t):p(t,r.table[e]);return t}function h(t,r){var e={ctor:"_Array",height:r.height,table:new Array(r.table.length)};r.height>0&&(e.lengths=r.lengths);for(var n=0;n0&&(n.lengths=r.lengths);for(var o=0;o0?r.lengths[n-1]:0),r.table[n]);if(0===n)return o;var e={ctor:"_Array",height:r.height,table:r.table.slice(0,n),lengths:r.lengths.slice(0,n)};return o.table.length>0&&(e.table[n]=o,e.lengths[n]=P(o)+(n>0?e.lengths[n-1]:0)),e}function w(t,r){if(0===t)return r;if(0===r.height){var e={ctor:"_Array",height:0};return e.table=r.table.slice(t,r.table.length+1),e}var n=D(t,r),o=w(t-(n>0?r.lengths[n-1]:0),r.table[n]);if(n===r.table.length-1)return o;var e={ctor:"_Array",height:r.height,table:r.table.slice(n,r.table.length+1),lengths:new Array(r.table.length-n)};e.table[0]=o;for(var c=0,i=0;i0){for(var n=P(e[0]),o=0;o0){var c=x(t,r);c>$&&(e=S(e[0],e[1],c))}return H(e[0],e[1])}function B(t,r){if(0===t.height&&0===r.height)return[t,r];if(1!==t.height||1!==r.height)if(t.height===r.height){t=I(t),r=I(r);var e=B(j(t),L(r));N(t,e[1]),E(r,e[0])}else if(t.height>r.height){t=I(t);var e=B(j(t),r);N(t,e[0]),r=J(e[1],e[1].height+1)}else{r=I(r);var e=B(t,L(r)),n=0===e[0].table.length?0:1,o=0===n?1:0;E(r,e[n]),t=J(e[o],e[o].height+1)}if(0===t.table.length||0===r.table.length)return[t,r];var c=x(t,r);return c<=$?[t,r]:S(t,r,c)}function N(t,r){var e=t.table.length-1;t.table[e]=r,t.lengths[e]=P(r),t.lengths[e]+=e>0?t.lengths[e-1]:0}function E(t,r){if(r.table.length>0){t.table[0]=r,t.lengths[0]=P(r);for(var e=P(t.table[0]),n=1;n0&&(e.lengths=new Array(r)),e}function S(t,r,e){for(var n=A(t.height,Math.min(K,t.table.length+r.table.length-e)),o=A(t.height,n.table.length-(t.table.length+r.table.length-e)),c=0;R(t.table,r.table,c).table.length%K==0;)C(n.table,o.table,c,R(t.table,r.table,c)),C(n.lengths,o.lengths,c,R(t.lengths,r.lengths,c)),c++;for(var i=c,u=new A(t.height-1,0),a=0;c-i-(u.table.length>0?1:0)0)for(var s=u.lengths.length,_=s;_0?u.lengths[_-1]:0;a+=f,l.table.length<=f&&(c++,a=0),u.table.length===K&&(O(n,o,i,u),u=A(t.height-1,0),i++)}for(u.table.length>0&&(O(n,o,i,u),i++);c0&&(r.lengths=t.lengths.slice()),r}function P(t){return 0===t.height?t.table.length:t.lengths[t.lengths.length-1]}function D(t,r){for(var e=t>>5*r.height;r.lengths[e]<=t;)e++;return e}function U(t,r){return 0===r?{ctor:"_Array",height:0,table:[t]}:{ctor:"_Array",height:r,table:[U(t,r-1)],lengths:[1]}}function J(t,r){return r===t.height?t:{ctor:"_Array",height:r,table:[J(t,r-1)],lengths:[P(t)]}}function H(t,r){return{ctor:"_Array",height:t.height+1,table:[t,r],lengths:[P(t),P(t)+P(r)]}}function W(t){var r=new Array(P(t));return q(r,0,t),r}function q(t,r,e){for(var n=0;n0?i[u-1]:0);return{ctor:"_Array",height:r,table:c,lengths:i}}var K=32,$=2,Q={ctor:"_Array",height:0,table:[]};return{empty:Q,fromList:a,toList:d,initialize:e(i),append:e(T),push:e(f),slice:c(y),get:e(t),set:c(n),map:e(h),indexedMap:e(v),foldl:c(m),foldr:c(b),length:P,toJSArray:W,fromJSArray:F}}()),_r=(sr.append,sr.length,sr.slice,sr.set,e(function(t,r){return m.cmp(0,t)<1&&m.cmp(t,sr.length(r))<0?O(_(sr.get,t,r)):R}),sr.push),dr=sr.empty,pr=(e(function(t,r){var n=e(function(r,e){return t(r)?_(sr.push,r,e):e});return d(sr.foldl,n,sr.empty,r)}),sr.foldr,sr.foldl),hr=(sr.indexedMap,sr.map,sr.toList),vr=(sr.fromList,sr.initialize),gr=(e(function(t,r){return _(vr,t,y(r))}),e(function(t,r){var e=t;return"Nothing"===e.ctor?r:{ctor:"::",_0:e._0,_1:r}})),mr=_(I,gr,{ctor:"[]"}),br=(e(function(t,r){var e=_(A,t,r);return"Just"===e.ctor&&!0===e._0?r:R}),function(t){var r=e(function(r,e){var n=t(r);return"Nothing"===n.ctor?R:_(A,_r(n._0),e)});_(pr,r,O(dr))}(k),function(t){var r=e(function(r,n){var o=t(r);return"Nothing"===o.ctor?R:_(A,e(function(t,r){return{ctor:"::",_0:t,_1:r}})(o._0),n)});_(I,r,O({ctor:"[]"}))}(k),e(function(t,r){return"Nothing"===r.ctor?t:r}),e(function(t,r){return"Nothing"===r.ctor?t({ctor:"_Tuple0"}):r}),e(function(t,r){return"Nothing"===t.ctor?r({ctor:"_Tuple0"}):t}),e(function(t,r){return"Nothing"===t.ctor?r:t}),S(y),S(b(y)),S(e(function(t,r){return r(t)})),c(function(t,r,e){var n=e;return"Nothing"===n.ctor?t({ctor:"_Tuple0"}):r(n._0)}),c(function(t,r,e){var n=e;return"Nothing"===n.ctor?t:r(n._0)}),br||{});br["?"]=e(function(t,r){return _(x,r,t)});var yr=nr.onError,kr=nr.andThen,wr=e(function(t,r){var e=r;return nr.spawn(_(kr,fr(t),e._0))}),Tr=nr.fail,Br=(e(function(t,r){return _(yr,function(r){return Tr(t(r))},r)}),nr.succeed),Nr=e(function(t,r){return _(kr,function(r){return Br(t(r))},r)}),Er=c(function(t,r,e){return _(kr,function(r){return _(kr,function(e){return Br(_(t,r,e))},e)},r)}),xr=(i(function(t,r,e,n){return _(kr,function(r){return _(kr,function(e){return _(kr,function(n){return Br(d(t,r,e,n))},n)},e)},r)}),u(function(t,r,e,n,o){return _(kr,function(r){return _(kr,function(e){return _(kr,function(n){return _(kr,function(o){return Br(p(t,r,e,n,o))},o)},n)},e)},r)}),a(function(t,r,e,n,o,c){return _(kr,function(r){return _(kr,function(e){return _(kr,function(n){return _(kr,function(o){return _(kr,function(c){return Br(h(t,r,e,n,o,c))},c)},o)},n)},e)},r)}),function(t){var r=t;return"[]"===r.ctor?Br({ctor:"[]"}):d(Er,e(function(t,r){return{ctor:"::",_0:t,_1:r}}),r._0,xr(r._1))}),Rr=c(function(t,r,e){return _(Nr,function(t){return{ctor:"_Tuple0"}},xr(_(F,wr(t),r)))}),Cr=Br({ctor:"_Tuple0"}),Or=c(function(t,r,e){return Br({ctor:"_Tuple0"})}),Ar=er.leaf("Task"),Sr=function(t){return{ctor:"Perform",_0:t}},Mr=(e(function(t,r){return Ar(Sr(_(Nr,t,r)))}),e(function(t,r){return Ar(Sr(_(yr,function(r){return Br(t(lt(r)))},_(kr,function(r){return Br(t(ft(r)))},r))))}),e(function(t,r){return Sr(_(Nr,t,r._0))}));er.effectManagers.Task={pkg:"elm-lang/core",init:Cr,onEffects:Rr,onSelfMsg:Or,tag:"cmd",cmdMap:Mr};var jr=function(){function t(t,r){return nr.nativeBinding(function(e){var n=setInterval(function(){nr.rawSpawn(r)},t);return function(){clearInterval(n)}})}return{now:nr.nativeBinding(function(t){t(nr.succeed(Date.now()))}),setInterval_:e(t)}}(),Lr=jr.setInterval_,Ir=c(function(t,r,e){var n=r;if("[]"===n.ctor)return Br(e);var o=n._0,c=function(r){return d(Ir,t,n._1,d(Xt,o,r,e))},i=nr.spawn(_(Lr,o,_(lr,t,o)));return _(kr,c,i)}),Pr=e(function(t,r){var e=t,n=e._1,o=e._0,c=_(kt,o,r);return"Nothing"===c.ctor?d(Xt,o,{ctor:"::",_0:n,_1:{ctor:"[]"}},r):d(Xt,o,{ctor:"::",_0:n,_1:c._0},r)}),Dr=jr.now,Ur=c(function(t,r,e){var n=_(kt,r,e.taggers);if("Nothing"===n.ctor)return Br(e);var o=function(r){return xr(_(F,function(e){return _(fr,t,e(r))},n._0))};return _(kr,function(t){return Br(e)},_(kr,o,Dr))}),Jr=er.leaf("Time"),Hr=e(function(t,r){return{taggers:t,processes:r}}),Wr=Br(_(Hr,jt,jt)),qr=c(function(t,r,e){var n=e,o=c(function(t,r,e){var n=e;return{ctor:"_Tuple3",_0:n._0,_1:n._1,_2:_(kr,function(t){return n._2},nr.kill(r))}}),u=i(function(t,r,e,n){var o=n;return{ctor:"_Tuple3",_0:o._0,_1:d(Xt,t,e,o._1),_2:o._2}}),a=c(function(t,r,e){var n=e;return{ctor:"_Tuple3",_0:{ctor:"::",_0:t,_1:n._0},_1:n._1,_2:n._2}}),l=d(P,Pr,jt,r),f=v(gt,a,u,o,l,n.processes,{ctor:"_Tuple3",_0:{ctor:"[]"},_1:jt,_2:Br({ctor:"_Tuple0"})}),s=f._0,p=f._1,h=f._2;return _(kr,function(t){return Br(_(Hr,l,t))},_(kr,function(r){return d(Ir,t,s,p)},h))}),Fr=e(function(t,r){return{ctor:"Every",_0:t,_1:r}}),zr=(e(function(t,r){return Jr(_(Fr,t,r))}),e(function(t,r){var e=r;return _(Fr,e._0,function(r){return t(e._1(r))})}));er.effectManagers.Time={pkg:"elm-lang/core",init:Wr,onEffects:qr,onSelfMsg:Ur,tag:"sub",subMap:zr};var Kr,$r=function(){function t(t){return{ctor:"",tag:"succeed",msg:t}}function r(t){return{ctor:"",tag:"fail",msg:t}}function n(t){return{ctor:"",tag:t}}function o(t,r){return{ctor:"",tag:t,decoder:r}}function _(t){return{ctor:"",tag:"null",value:t}}function d(t,r){return{ctor:"",tag:"field",field:t,decoder:r}}function p(t,r){return{ctor:"",tag:"index",index:t,decoder:r}}function h(t){return{ctor:"",tag:"key-value",decoder:t}}function v(t,r){return{ctor:"",tag:"map-many",func:t,decoders:r}}function g(t,r){return{ctor:"",tag:"andThen",decoder:r,callback:t}}function b(t){return{ctor:"",tag:"oneOf",decoders:t}}function y(t,r){return v(t,[r])}function k(t,r,e){return v(t,[r,e])}function w(t,r,e,n){return v(t,[r,e,n])}function T(t,r,e,n,o){return v(t,[r,e,n,o])}function B(t,r,e,n,o,c){return v(t,[r,e,n,o,c])}function N(t,r,e,n,o,c,i){return v(t,[r,e,n,o,c,i])}function E(t,r,e,n,o,c,i,u){return v(t,[r,e,n,o,c,i,u])}function x(t,r,e,n,o,c,i,u,a){return v(t,[r,e,n,o,c,i,u,a])}function C(t){return{tag:"ok",value:t}}function A(t,r){return{tag:"primitive",type:t,value:r}}function S(t,r){return{tag:"index",index:t,rest:r}}function j(t,r){return{tag:"field",field:t,rest:r}}function S(t,r){return{tag:"index",index:t,rest:r}}function L(t){return{tag:"oneOf",problems:t}}function I(t){return{tag:"fail",msg:t}}function P(t){for(var r="_";t;)switch(t.tag){case"primitive":return"Expecting "+t.type+("_"===r?"":" at "+r)+" but instead got: "+D(t.value);case"index":r+="["+t.index+"]",t=t.rest;break;case"field":r+="."+t.field,t=t.rest;break;case"oneOf":for(var e=t.problems,n=0;n=r.length)return A("a longer array. Need index "+a+" but there are only "+r.length+" entries",r);var o=H(t.decoder,r[a]);return"ok"===o.tag?o:S(a,o);case"key-value":if("object"!=typeof r||null===r||r instanceof Array)return A("an object",r);var l=M.Nil;for(var f in r){var o=H(t.decoder,r[f]);if("ok"!==o.tag)return j(f,o);var s=m.Tuple2(f,o.value);l=M.Cons(s,l)}return C(l);case"map-many":for(var _=t.func,d=t.decoders,n=0;n0&&e.push(S("p-thunk",n,f)));case"tagger":for(var s=t.tagger,_=r.tagger,d=!1,p=t.node;"tagger"===p.type;)d=!0,"object"!=typeof s?s=[s,p.tagger]:s.push(p.tagger),p=p.node;for(var h=r.node;"tagger"===h.type;)d=!0,"object"!=typeof _?_=[_,h.tagger]:_.push(h.tagger),h=h.node;return d&&s.length!==_.length?void e.push(S("p-redraw",n,r)):((d?j(s,_):s===_)||e.push(S("p-tagger",n,_)),void M(p,h,e,n+1));case"text":if(t.text!==r.text)return void e.push(S("p-text",n,r.text));return;case"node":if(t.tag!==r.tag||t.namespace!==r.namespace)return void e.push(S("p-redraw",n,r));var v=L(t.facts,r.facts);return void 0!==v&&e.push(S("p-facts",n,v)),void I(t,r,e,n);case"keyed-node":if(t.tag!==r.tag||t.namespace!==r.namespace)return void e.push(S("p-redraw",n,r));var v=L(t.facts,r.facts);return void 0!==v&&e.push(S("p-facts",n,v)),void P(t,r,e,n);case"custom":if(t.impl!==r.impl)return void e.push(S("p-redraw",n,r));var v=L(t.facts,r.facts);void 0!==v&&e.push(S("p-facts",n,v));var g=r.impl.diff(t,r);if(g)return void e.push(S("p-custom",n,g));return}}}function j(t,r){for(var e=0;eu?e.push(S("p-remove-last",n,i-u)):i0||i.length>0||void 0!==O)&&e.push(S("p-reorder",n,{patches:o,inserts:i,endInserts:O}))}function D(t,r,e,n,o,c){var i=t[e];if(void 0===i)return i={tag:"insert",vnode:n,index:o,data:void 0},c.push({index:o,entry:i}),void(t[e]=i);if("remove"===i.tag){c.push({index:o,entry:i}),i.tag="move";var u=[];return M(i.vnode,n,u,i.index),i.index=o,void(i.data.data={patches:u,entry:i})}D(t,r,e+vt,n,o,c)}function U(t,r,e,n,o){var c=t[e];if(void 0===c){var i=S("p-remove",o,void 0);return r.push(i),void(t[e]={tag:"remove",vnode:n,index:o,data:i})}if("insert"===c.tag){c.tag="move";var u=[];M(n,c.vnode,u,o);var i=S("p-remove",o,{patches:u,entry:c});return void r.push(i)}U(t,r,e+vt,n,o)}function J(t,r,e,n){H(t,r,e,0,0,r.descendantsCount,n)}function H(t,r,e,n,o,c,i){for(var u=e[n],a=u.index;a===o;){var l=u.type;if("p-thunk"===l)J(t,r.node,u.data,i);else if("p-reorder"===l){u.domNode=t,u.eventNode=i;var f=u.data.patches;f.length>0&&H(t,r,f,0,o,c,i)}else if("p-remove"===l){u.domNode=t,u.eventNode=i;var s=u.data;if(void 0!==s){s.entry.data=t;var f=s.patches;f.length>0&&H(t,r,f,0,o,c,i)}}else u.domNode=t,u.eventNode=i;if(n++,!(u=e[n])||(a=u.index)>c)return n}switch(r.type){case"tagger":for(var _=r.node;"tagger"===_.type;)_=_.node;return H(t,_,e,n,o+1,c,t.elm_event_node_ref);case"node":for(var d=r.children,p=t.childNodes,h=0;hc))return n;o=g}return n;case"keyed-node":for(var d=r.children,p=t.childNodes,h=0;hc))return n;o=g}return n;case"text":case"thunk":throw new Error("should never traverse `text` or `thunk` nodes like this")}}function W(t,r,e,n){return 0===e.length?t:(J(t,r,e,n),q(t,e))}function q(t,r){for(var e=0;e"),new Error(t)}function Z(t,r,e,n){r.embed=function(r,e){for(;r.lastChild;)r.removeChild(r.lastChild);return er.initialize(n(t.init,e,r),t.update,t.subscriptions,tt(r,t.view))},r.fullscreen=function(r){return er.initialize(n(t.init,r,document.body),t.update,t.subscriptions,tt(document.body,t.view))}}function tt(t,r){return function(e,n){var o={tagger:e,parent:void 0},c=r(n),i=B(c,o);return t.appendChild(i),rt(i,r,c,o)}}function rt(t,r,e,n){function o(){switch(i){case"NO_REQUEST":throw new Error("Unexpected draw callback.\nPlease report this to .");case"PENDING_REQUEST":bt(o),i="EXTRA_REQUEST";var e=r(c),a=A(u,e);return t=W(t,u,a,n),void(u=e);case"EXTRA_REQUEST":return void(i="NO_REQUEST")}}var c,i="NO_REQUEST",u=e;return function(t){"NO_REQUEST"===i&&bt(o),i="PENDING_REQUEST",c=t}}function et(t,r,e,n){r.fullscreen=function(r){var o={doc:void 0};return er.initialize(n(t.init,r,document.body),t.update(nt(o)),t.subscriptions,ot(e,document.body,o,t.view,t.viewIn,t.viewOut))},r.embed=function(r,o){var c={doc:void 0};return er.initialize(n(t.init,o,r),t.update(nt(c)),t.subscriptions,ot(e,r,c,t.view,t.viewIn,t.viewOut))}}function nt(t){return nr.nativeBinding(function(r){var e=t.doc;if(e){var n=e.getElementsByClassName("debugger-sidebar-messages")[0];n&&(n.scrollTop=n.scrollHeight)}r(nr.succeed(m.Tuple0))})}function ot(t,r,e,n,o,c){return function(i,u){var a={tagger:i,parent:void 0},l={tagger:i,parent:void 0},f=n(u),s=B(f,a);r.appendChild(s);var _=rt(s,n,f,a),d=o(u)._1,p=B(d,l);r.appendChild(p);var h=ut(a,p,o),v=rt(p,h,d,l),g=ct(u,c,l,r,t,e);return function(t){_(t),v(t),g(t)}}}function ct(t,r,e,n,o,c){var i,u;return function(t){if(t.isDebuggerOpen){if(!c.doc)return i=r(t),void(u=it(o,c,i,e));ht=c.doc;var n=r(t),a=A(i,n);u=W(u,i,a,e),i=n,ht=document}}}function it(t,r,e,n){function o(){r.doc=void 0,u.close()}var c=screen.width-900,i=screen.height-360,u=window.open("","","width=900,height=360,left="+c+",top="+i);ht=u.document,r.doc=ht,ht.title="Debugger - "+t,ht.body.style.margin="0",ht.body.style.padding="0";var a=B(e,n);return ht.body.appendChild(a),ht.addEventListener("keydown",function(t){t.metaKey&&82===t.which&&window.location.reload(),38===t.which&&(n.tagger({ctor:"Up"}),t.preventDefault()),40===t.which&&(n.tagger({ctor:"Down"}),t.preventDefault())}),window.addEventListener("unload",o),u.addEventListener("unload",function(){r.doc=void 0,window.removeEventListener("unload",o),n.tagger({ctor:"Close"})}),ht=document,a}function ut(t,r,e){var n,o=ft(r),c="Normal",i=t.tagger,u=function(){};return function(r){var a=e(r),l=a._0.ctor;return t.tagger="Normal"===l?i:u,c!==l&&(at("removeEventListener",o,c),at("addEventListener",o,l),"Normal"===c&&(n=document.body.style.overflow,document.body.style.overflow="hidden"),"Normal"===l&&(document.body.style.overflow=n),c=l),a._1}}function at(t,r,e){switch(e){case"Normal":return;case"Pause":return lt(t,r,yt);case"Message":return lt(t,r,kt)}}function lt(t,r,e){for(var n=0;n"]=e(function(t,r){return _(kr,function(t){return r},t)});var he=Br(jt),ve=e(function(t,r){var e=r;return O("Nothing"===e.ctor?{ctor:"::",_0:t,_1:{ctor:"[]"}}:{ctor:"::",_0:t,_1:e._0})}),ge=e(function(t,r){for(;;){var e=t;if("[]"===e.ctor)return r;var n=e._1,o=d(Gt,e._0._0,ve(e._0._1),r);t=n,r=o}}),me=function(t){return _(ge,t,jt)},be=_(Gr,"keyCode",Xr),ye=er.leaf("Keyboard"),ke=e(function(t,r){return{taggers:t,pid:r}}),we=e(function(t,r){return{category:t,keyCode:r}}),Te=c(function(t,r,e){var n=c(function(r,e,n){return _(kr,function(n){return _(kr,function(t){return Br(d(Xt,r,_(ke,e,t),n))},Zr(d(re,r,be,function(e){return _(lr,t,_(we,r,e))})))},n)}),o=i(function(t,r,e,n){return _(Nr,_(Xt,t,_(ke,e,r.pid)),n)}),u=c(function(t,r,e){var n=r;return _(pe["&>"],Yr(n.pid),e)});return v(gt,u,o,n,e,me(r),Br(jt))}),Be=e(function(t,r){return{ctor:"MySub",_0:t,_1:r}}),Ne=function(t){return ye(_(Be,"keydown",t))},Ee=e(function(t,r){var e=r;return _(Be,e._0,function(r){return t(e._1(r))})});er.effectManagers.Keyboard={pkg:"elm-lang/keyboard",init:he,onEffects:Te,onSelfMsg:de,tag:"sub",subMap:Ee};var xe=e(function(t,r){return d(Xt,t.id,t,r)}),Re=function(t){var r=t;return"WeaponComponent"===r.ctor?r._0:0},Ce=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Weapon"===r._0.ctor?r._0._0:0},Oe=function(t){var r=t;return"HealthComponent"===r.ctor?r._0:0},Ae=function(t){var r=t;return"MoniesCollectedComponent"===r.ctor?r._0:0},Se=e(function(t,r){return m.update(t,{components:r})}),Me=e(function(t,r){return _(Yt,e(function(r,e){return!_(J,r,t)}),r)}),je=function(t){return dt(t)},Le=function(t){return _(Se,t,_(z,function(t){return"MoniesCollectedComponent"!==t.ctor},t.components))},Ie=function(t){return _(Se,t,_(z,function(t){return"WeaponComponent"!==t.ctor},t.components))},Pe=function(t){return _(Se,t,_(z,function(t){return"HealthComponent"!==t.ctor},t.components))},De=function(t){return U(_(F,Oe,t.components))},Ue=function(t){return U(_(F,Ae,t.components))},Je=function(t){return U(_(F,Re,t.components))},He=function(t){return U(_(F,Ce,t.components))},We=function(t){return W(_($,function(t){var r=t;return"TransformComponent"===r.ctor?O(r._0):R},t.components))},qe=function(t){return"TransformComponent"===t.ctor},Fe=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Coin"===r._0.ctor},ze=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Enemy"===r._0.ctor},Ke=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Weapon"===r._0.ctor},$e=function(t){return!H(_(z,ze,t.components))},Qe=function(t){return d(_t,c(function(t,r,e){return $e(r)?e+1:e}),0,t)},Ve=function(t){return!H(_(z,Fe,t.components))},Ge=function(t){return d(_t,c(function(t,r,e){return Ve(r)?e+1:e}),0,t)},Xe=function(t){return!H(_(z,Ke,t.components))},Ye=function(t){return d(_t,c(function(t,r,e){return Xe(r)&&m.cmp(He(r),e)>0?He(r):e}),0,t)},Ze=e(function(t,r){return _(Yt,e(function(r,e){return _(x,!1,_(C,function(r){return O(m.eq(r,t))},We(e)))}),r)}),tn=function(t){return!H(_(z,function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Player"===r._0.ctor},t.components))},rn=function(t){return _(A,rr,W(ht(_(Yt,e(function(t,r){return tn(r)}),t))))},en=function(t){var r=rn(t.actors);return"Just"===r.ctor?d(I,e(function(t,r){return t+r}),0,_(F,Ae,r._0.components)):0},nn=function(t){var r=rn(t.actors);return"Just"===r.ctor?d(I,e(function(t,r){return t+r}),0,_(F,Oe,r._0.components)):0},on=function(t){var r=rn(t.actors);return"Just"===r.ctor?d(I,e(function(t,r){return t+r}),0,_(F,Re,r._0.components)):0},cn=e(function(t,r){return _(A,rr,W(ht(_(Yt,e(function(r,e){return m.eq(e.id,t)}),r))))}),un=function(t){return _(_e,{ctor:"[]"},{ctor:"::",_0:_(_e,{ctor:"[]"},_(F,function(r){return _(_e,{ctor:"[]"},_(F,function(e){return _(x,fe("[ ]"),_(C,function(t){var r=t;return O(fe(_(w["++"],"[",_(w["++"],T(r._0.id),"]"))))},W(_(z,function(t){var n=t,o=n._1;return m.eq(o.x,e)&&m.eq(o.y,r)},mr(G(_(F,function(t){var r=t,e=r._1;return _(F,function(t){var r=t;return"TransformComponent"===r.ctor?O({ctor:"_Tuple2",_0:e,_1:r._0}):R},e.components)},ht(t.actors))))))))},_(nt,0,19)))},_(nt,0,19))),_1:{ctor:"::",_0:_(_e,{ctor:"[]"},{ctor:"::",_0:fe(_(w["++"],"Monies : ",_(w["++"],T(en(t)),"!"))),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(_e,{ctor:"[]"},{ctor:"::",_0:fe(_(w["++"],"Current health : ",_(w["++"],T(nn(t)),"!"))),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(_e,{ctor:"[]"},{ctor:"::",_0:fe(_(w["++"],"Weapon durability : ",_(w["++"],T(on(t)),"!"))),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}}})},an=(e(function(t,r){return{x:t,y:r}}),e(function(t,r){return{id:t,components:r}}),function(t){return{ctor:"Weapon",_0:t}}),ln={ctor:"Coin"},fn={ctor:"Enemy"},sn={ctor:"Player"},_n=function(t){return{ctor:"ObjectTypeComponent",_0:t}},dn=function(t){return{ctor:"WeaponComponent",_0:t}},pn=c(function(t,r,e){return m.cmp(t,r)>0?_(Se,e,{ctor:"::",_0:dn(t),_1:e.components}):_(Se,e,{ctor:"::",_0:dn(r),_1:e.components})}),hn=c(function(t,r,e){return d(b,xe,e,d(pn,Je(t),r,Ie(t)))}),vn=c(function(t,r,e){return d(hn,t,Ye(e),_(Me,je(e),r))}),gn=e(function(t,r){var e=_(cn,t,r);if("Just"===e.ctor){var n=e._0;return d(vn,n,r,d(I,xe,jt,_(z,Xe,_(X,function(t){return pt(_(Ze,t,r))},_($,We,_(z,tn,{ctor:"::",_0:n,_1:{ctor:"[]"}}))))))}return r}),mn=function(t){return{ctor:"HealthComponent",_0:t}},bn=c(function(t,r,e){return _(Se,e,{ctor:"::",_0:mn(t-r),_1:e.components})}),yn=c(function(t,r,e){return d(b,xe,e,d(bn,De(t),r,Pe(t)))}),kn=c(function(t,r,e){return d(yn,t,Qe(e),_(Me,je(e),r))}),wn=e(function(t,r){var e=_(cn,t,r);if("Just"===e.ctor){var n=e._0;return d(kn,n,r,d(I,xe,jt,_(z,$e,_(X,function(t){return pt(_(Ze,t,r))},_($,We,_(z,tn,{ctor:"::",_0:n,_1:{ctor:"[]"}}))))))}return r}),Tn=function(t){return{ctor:"MoniesCollectedComponent",_0:t}},Bn=c(function(t,r,e){return _(Se,e,{ctor:"::",_0:Tn(t+r),_1:e.components})}),Nn=c(function(t,r,e){return d(b,xe,e,d(Bn,Ue(t),r,Le(t)))}),En=c(function(t,r,e){return d(Nn,t,Ge(e),_(Me,je(e),r))}),xn=e(function(t,r){var e=_(cn,t,r);if("Just"===e.ctor){var n=e._0;return d(En,n,r,d(I,xe,jt,_(z,Ve,_(X,function(t){return pt(_(Ze,t,r))},_($,We,_(z,tn,{ctor:"::",_0:n,_1:{ctor:"[]"}}))))))}return r}),Rn={ctor:"KeyboardComponent"},Cn=function(t){return{ctor:"TransformComponent",_0:t}},On=_(ir["!"],{actors:Zt({ctor:"::",_0:{ctor:"_Tuple2",_0:1,_1:{id:1,components:{ctor:"::",_0:Cn({x:1,y:2}),_1:{ctor:"::",_0:Rn,_1:{ctor:"::",_0:_n(sn),_1:{ctor:"::",_0:Tn(0),_1:{ctor:"::",_0:mn(10),_1:{ctor:"::",_0:dn(0),_1:{ctor:"[]"}}}}}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:2,_1:{id:2,components:{ctor:"::",_0:Cn({x:1,y:1}),_1:{ctor:"::",_0:_n(fn),_1:{ctor:"[]"}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:3,_1:{id:3,components:{ctor:"::",_0:Cn({x:0,y:0}),_1:{ctor:"::",_0:_n(ln),_1:{ctor:"[]"}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:4,_1:{id:4,components:{ctor:"::",_0:Cn({x:2,y:2}),_1:{ctor:"::",_0:_n(an(5)),_1:{ctor:"[]"}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:5,_1:{id:5,components:{ctor:"::",_0:Cn({x:0,y:2}),_1:{ctor:"::",_0:_n(an(1)),_1:{ctor:"[]"}}}}},_1:{ctor:"[]"}}}}}})},{ctor:"[]"}),An={ctor:"DownArrow"},Sn={ctor:"RightArrow"},Mn={ctor:"UpArrow"},jn={ctor:"LeftArrow"},Ln=Zt({ctor:"::",_0:{ctor:"_Tuple2",_0:37,_1:jn},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:39,_1:Sn},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:40,_1:An},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:38,_1:Mn},_1:{ctor:"[]"}}}}}),In=e(function(t,r){var e=_(kt,t,Ln);if("Just"!==e.ctor)return r;switch(e._0.ctor){case"LeftArrow":return{x:_(B,0,r.x-1),y:r.y};case"RightArrow":return{x:_(N,19,r.x+1),y:r.y};case"UpArrow":return{x:r.x,y:_(B,0,r.y-1)};default:return{x:r.x,y:_(N,19,r.y+1)}}}),Pn=c(function(t,r,e){return _(x,e,_(C,function(t){return O(d(Xt,t.id,t,e))},_(C,function(t){var e=_(z,function(t){return!qe(t)},r.components);return O(m.update(r,{components:{ctor:"::",_0:Cn(t),_1:e}}))},_(C,function(r){return O(_(In,t,r))},We(r)))))}),Dn=e(function(t,r){return d(I,e(function(r,n){var o=r,c=o._0,i=o._1;return d(I,e(function(r,e){return"KeyboardComponent"===r.ctor?_(gn,c,_(xn,c,_(wn,c,d(Pn,t,i,e)))):e}),n,i.components)}),r,ht(r))}),Un=e(function(t,r){var e=t;return _(ir["!"],m.update(r,{actors:_(Dn,e._0,r.actors)}),{ctor:"[]"})}),Jn=function(t){return{ctor:"KeyPressed",_0:t}},Hn=function(t){return Ne(Jn)},Wn=le({init:On,update:Un,view:un,subscriptions:Hn})(),qn={};qn.Main=qn.Main||{},void 0!==Wn&&Wn(qn.Main,"Main",void 0);var Fn=function(){};return function(r){function e(){return++s}function n(t,r){var e=[];for(var o in t){var c=t[o],i=r?r+"."+o:o;"fullscreen"in c?e.push({path:i,module:c}):e=e.concat(n(c,i))}return e}function o(t,r){for(var e=r.split("."),n=t,o=0;o=0&&r._disposeHandlers.splice(e,1)},check:a,apply:_,status:function(t){if(!t)return E;N.push(t)},addStatusHandler:function(t){N.push(t)},removeStatusHandler:function(t){var r=N.indexOf(t);r>=0&&N.splice(r,1)},data:w[t]};return h=void 0,r}function i(t){E=t;for(var r=0;r0;){var c=o.pop(),i=c.id,u=c.chain;if((l=S[i])&&!l.hot._selfAccepted){if(l.hot._selfDeclined)return{type:"self-declined",chain:u,moduleId:i};if(l.hot._main)return{type:"unaccepted",chain:u,moduleId:i};for(var a=0;a=0||(s.hot._acceptedDependencies[i]?(e[f]||(e[f]=[]),n(e[f],[i])):(delete e[f],r.push(f),o.push({chain:u.concat([f]),id:f})))}}}}return{type:"accepted",moduleId:t,outdatedModules:r,outdatedDependencies:e}}(f):{type:"disposed",moduleId:v};var k=!1,B=!1,N=!1,x="";switch(b.chain&&(x="\nUpdate propagation: "+b.chain.join(" -> ")),b.type){case"self-declined":e.onDeclined&&e.onDeclined(b),e.ignoreDeclined||(k=new Error("Aborted because of self decline: "+b.moduleId+x));break;case"declined":e.onDeclined&&e.onDeclined(b),e.ignoreDeclined||(k=new Error("Aborted because of declined dependency: "+b.moduleId+" in "+b.parentId+x));break;case"unaccepted":e.onUnaccepted&&e.onUnaccepted(b),e.ignoreUnaccepted||(k=new Error("Aborted because "+f+" is not accepted"+x));break;case"accepted":e.onAccepted&&e.onAccepted(b),B=!0;break;case"disposed":e.onDisposed&&e.onDisposed(b),N=!0;break;default:throw new Error("Unexception type "+b.type)}if(k)return i("abort"),Promise.reject(k);if(B){p[f]=g[f],n(_,b.outdatedModules);for(f in b.outdatedDependencies)Object.prototype.hasOwnProperty.call(b.outdatedDependencies,f)&&(s[f]||(s[f]=[]),n(s[f],b.outdatedDependencies[f]))}N&&(n(_,[b.moduleId]),p[f]=h)}var R=[];for(c=0;c<_.length;c++)f=_[c],S[f]&&S[f].hot._selfAccepted&&R.push({module:f,errorHandler:S[f].hot._selfAccepted});i("dispose"),Object.keys(A).forEach(function(t){!1===A[t]&&r(t)});for(var C,O=_.slice();O.length>0;)if(f=O.pop(),l=S[f]){var M={},j=l.hot._disposeHandlers;for(a=0;a=0&&L.parents.splice(C,1))}}var I,P;for(f in s)if(Object.prototype.hasOwnProperty.call(s,f)&&(l=S[f]))for(P=s[f],a=0;a=0&&l.children.splice(C,1);i("apply"),y=m;for(f in p)Object.prototype.hasOwnProperty.call(p,f)&&(t[f]=p[f]);var D=null;for(f in s)if(Object.prototype.hasOwnProperty.call(s,f)&&(l=S[f])){P=s[f];var U=[];for(c=0;c=0)continue;U.push(o)}for(c=0;c=0&&y.splice(r,1)}function u(t){var r=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),l(r,t.attrs),c(t,r),r}function a(t){var r=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",l(r,t.attrs),c(t,r),r}function l(t,r){Object.keys(r).forEach(function(e){t.setAttribute(e,r[e])})}function f(t,r){var e,n,o,c;if(r.transform&&t.css){if(!(c=r.transform(t.css)))return function(){};t.css=c}if(r.singleton){var l=b++;e=m||(m=u(r)),n=s.bind(null,e,l,!1),o=s.bind(null,e,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=a(r),n=d.bind(null,e,r),o=function(){i(e),e.href&&URL.revokeObjectURL(e.href)}):(e=u(r),n=_.bind(null,e),o=function(){i(e)});return n(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;n(t=r)}else o()}}function s(t,r,e,n){var o=e?"":n.css;if(t.styleSheet)t.styleSheet.cssText=w(r,o);else{var c=document.createTextNode(o),i=t.childNodes;i[r]&&t.removeChild(i[r]),i.length?t.insertBefore(c,i[r]):t.appendChild(c)}}function _(t,r){var e=r.css,n=r.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}function d(t,r,e){var n=e.css,o=e.sourceMap,c=void 0===r.convertToAbsoluteUrls&&o;(r.convertToAbsoluteUrls||c)&&(n=k(n)),o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(i),u&&URL.revokeObjectURL(u)}var p={},h=function(t){var r;return function(){return void 0===r&&(r=t.apply(this,arguments)),r}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){return document.querySelector(t)},g=function(t){var r={};return function(t){if("function"==typeof t)return t();if(void 0===r[t]){var e=v.call(this,t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(t){e=null}r[t]=e}return r[t]}}(),m=null,b=0,y=[],k=e("./node_modules/style-loader/lib/urls.js");t.exports=function(t,r){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");r=r||{},r.attrs="object"==typeof r.attrs?r.attrs:{},r.singleton||"boolean"==typeof r.singleton||(r.singleton=h()),r.insertInto||(r.insertInto="head"),r.insertAt||(r.insertAt="bottom");var e=o(t,r);return n(e,r),function(t){for(var c=[],i=0;i0?t>=0?e:e+r:-n(-t,-r);return o===r?0:o}function o(t,r){return Math.log(r)/Math.log(t)}function i(t){return-t}function u(t){return t<0?-t:t}function a(t,r){return m.cmp(t,r)<0?t:r}function l(t,r){return m.cmp(t,r)>0?t:r}function f(t,r,e){return m.cmp(e,t)<0?t:m.cmp(e,r)>0?r:e}function s(t,r){return{ctor:k[m.cmp(t,r)+1]}}function _(t,r){return t!==r}function d(t){return!t}function p(t){return t===1/0||t===-1/0}function h(t){return 0|t}function v(t){return t*Math.PI/180}function g(t){return 2*Math.PI*t}function b(t){var r=t._0,e=t._1;return m.Tuple2(r*Math.cos(e),r*Math.sin(e))}function y(t){var r=t._0,e=t._1;return m.Tuple2(Math.sqrt(r*r+e*e),Math.atan2(e,r))}var k=["LT","EQ","GT"];return{div:e(t),rem:e(r),mod:e(n),pi:Math.PI,e:Math.E,cos:Math.cos,sin:Math.sin,tan:Math.tan,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:e(Math.atan2),degrees:v,turns:g,fromPolar:b,toPolar:y,sqrt:Math.sqrt,logBase:e(o),negate:i,abs:u,min:e(a),max:e(l),clamp:c(f),compare:e(s),xor:e(_),not:d,truncate:h,ceiling:Math.ceil,floor:Math.floor,round:Math.round,toFloat:function(t){return t},isNaN:isNaN,isInfinite:p}}(),m=function(){function t(t,e){for(var n,o=[],c=r(t,e,0,o);c&&(n=o.pop());)c=r(n.x,n.y,0,o);return c}function r(t,e,n,o){if(n>100)return o.push({x:t,y:e}),!0;if(t===e)return!0;if("object"!=typeof t){if("function"==typeof t)throw new Error('Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense. Read more about this at http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#== which describes why it is this way and what the better version will look like.');return!1}if(null===t||null===e)return!1;if(t instanceof Date)return t.getTime()===e.getTime();if(!("ctor"in t)){for(var c in t)if(!r(t[c],e[c],n+1,o))return!1;return!0}if("RBNode_elm_builtin"!==t.ctor&&"RBEmpty_elm_builtin"!==t.ctor||(t=ht(t),e=ht(e)),"Set_elm_builtin"===t.ctor&&(t=_elm_lang$core$Set$toList(t),e=_elm_lang$core$Set$toList(e)),"::"===t.ctor){for(var i=t,u=e;"::"===i.ctor&&"::"===u.ctor;){if(!r(i._0,u._0,n+1,o))return!1;i=i._1,u=u._1}return i.ctor===u.ctor}if("_Array"===t.ctor){var a=sr.toJSArray(t),l=sr.toJSArray(e);if(a.length!==l.length)return!1;for(var f=0;f=1){if((c=n(t._0,r._0))!==v)return c;if(i>=2){if((c=n(t._1,r._1))!==v)return c;if(i>=3){if((c=n(t._2,r._2))!==v)return c;if(i>=4){if((c=n(t._3,r._3))!==v)return c;if(i>=5){if((c=n(t._4,r._4))!==v)return c;if(i>=6){if((c=n(t._5,r._5))!==v)return c;if(i>=7)throw new Error("Comparison error: cannot compare tuples with more than 6 elements.")}}}}}}return v}throw new Error("Comparison error: comparison is only defined on ints, floats, times, chars, strings, lists of comparable values, and tuples of comparable values.")}function o(t,r){return{ctor:"_Tuple2",_0:t,_1:r}}function c(t){return new String(t)}function i(t){return b++}function u(t,r){var e={};for(var n in t)e[n]=t[n];for(var n in r)e[n]=r[n];return e}function a(t,r){return{ctor:"::",_0:t,_1:r}}function l(t,r){if("string"==typeof t)return t+r;if("[]"===t.ctor)return r;var e=a(t._0,y),n=e;for(t=t._1;"[]"!==t.ctor;)n._1=a(t._0,y),t=t._1,n=n._1;return n._1=r,e}function f(t,r){return function(e){throw new Error("Ran into a `Debug.crash` in module `"+t+"` "+_(r)+"\nThe message provided by the code author is:\n\n "+e)}}function s(t,r,e){return function(n){throw new Error("Ran into a `Debug.crash` in module `"+t+"`\n\nThis was caused by the `case` expression "+_(r)+".\nOne of the branches ended with a crash and the following value got through:\n\n "+d(e)+"\n\nThe message provided by the code author is:\n\n "+n)}}function _(t){return t.start.line==t.end.line?"on line "+t.start.line:"between lines "+t.start.line+" and "+t.end.line}function d(t){var r=typeof t;if("function"===r)return"";if("boolean"===r)return t?"True":"False";if("number"===r)return t+"";if(t instanceof String)return"'"+p(t,!0)+"'";if("string"===r)return'"'+p(t,!1)+'"';if(null===t)return"null";if("object"===r&&"ctor"in t){var e=t.ctor.substring(0,5);if("_Tupl"===e){var n=[];for(var o in t)"ctor"!==o&&n.push(d(t[o]));return"("+n.join(",")+")"}if("_Task"===e)return"";if("_Array"===t.ctor){return"Array.fromList "+d(hr(t))}if(""===t.ctor)return"";if("_Process"===t.ctor)return"";if("::"===t.ctor){var n="["+d(t._0);for(t=t._1;"::"===t.ctor;)n+=","+d(t._0),t=t._1;return n+"]"}if("[]"===t.ctor)return"[]";if("Set_elm_builtin"===t.ctor)return"Set.fromList "+d(_elm_lang$core$Set$toList(t));if("RBNode_elm_builtin"===t.ctor||"RBEmpty_elm_builtin"===t.ctor)return"Dict.fromList "+d(ht(t));var n="";for(var c in t)if("ctor"!==c){var i=d(t[c]),u=i[0],a="{"===u||"("===u||"<"===u||'"'===u||i.indexOf(" ")<0;n+=" "+(a?i:"("+i+")")}return t.ctor+n}if("object"===r){if(t instanceof Date)return"<"+t.toString()+">";if(t.elm_web_socket)return"";var n=[];for(var o in t)n.push(o+" = "+d(t[o]));return 0===n.length?"{}":"{ "+n.join(", ")+" }"}return""}function p(t,r){var e=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return r?e.replace(/\'/g,"\\'"):e.replace(/\"/g,'\\"')}var h=-1,v=0,g=1,m={ctor:"_Tuple0"},b=0,y={ctor:"[]"};return{eq:t,cmp:n,Tuple0:m,Tuple2:o,chr:c,update:u,guid:i,append:e(l),crash:f,crashCase:s,toString:d}}(),b=(e(function(t,r){var e=r;return _(t,e._0,e._1)}),c(function(t,r,e){return t({ctor:"_Tuple2",_0:r,_1:e})}),c(function(t,r,e){return _(t,e,r)})),y=e(function(t,r){return t}),k=function(t){return t},w=w||{};w["<|"]=e(function(t,r){return t(r)});var w=w||{};w["|>"]=e(function(t,r){return r(t)});var w=w||{};w[">>"]=c(function(t,r,e){return r(t(e))});var w=w||{};w["<<"]=c(function(t,r,e){return t(r(e))});var w=w||{};w["++"]=m.append;var T=m.toString,w=(g.isInfinite,g.isNaN,g.toFloat,g.ceiling,g.floor,g.truncate,g.round,g.not,g.xor,w||{});w["||"]=g.or;var w=w||{};w["&&"]=g.and;var B=g.max,N=g.min,E=g.compare,w=w||{};w[">="]=g.ge;var w=w||{};w["<="]=g.le;var w=w||{};w[">"]=g.gt;var w=w||{};w["<"]=g.lt;var w=w||{};w["/="]=g.neq;var w=w||{};w["=="]=g.eq;var w=(g.e,g.pi,g.clamp,g.logBase,g.abs,g.negate,g.sqrt,g.atan2,g.atan,g.asin,g.acos,g.tan,g.sin,g.cos,w||{});w["^"]=g.exp;var w=w||{};w["%"]=g.mod;var w=(g.rem,w||{});w["//"]=g.div;var w=w||{};w["/"]=g.floatDiv;var w=w||{};w["*"]=g.mul;var w=w||{};w["-"]=g.sub;var w=w||{};w["+"]=g.add;var x=(g.toPolar,g.fromPolar,g.turns,g.degrees,e(function(t,r){var e=r;return"Just"===e.ctor?e._0:t})),R={ctor:"Nothing"},C=e(function(t,r){var e=r;return"Just"===e.ctor?t(e._0):R}),O=function(t){return{ctor:"Just",_0:t}},A=e(function(t,r){var e=r;return"Just"===e.ctor?O(t(e._0)):R}),S=c(function(t,r,e){var n={ctor:"_Tuple2",_0:r,_1:e};return"_Tuple2"===n.ctor&&"Just"===n._0.ctor&&"Just"===n._1.ctor?O(_(t,n._0._0,n._1._0)):R}),M=(i(function(t,r,e,n){var o={ctor:"_Tuple3",_0:r,_1:e,_2:n};return"_Tuple3"===o.ctor&&"Just"===o._0.ctor&&"Just"===o._1.ctor&&"Just"===o._2.ctor?O(d(t,o._0._0,o._1._0,o._2._0)):R}),u(function(t,r,e,n,o){var c={ctor:"_Tuple4",_0:r,_1:e,_2:n,_3:o};return"_Tuple4"===c.ctor&&"Just"===c._0.ctor&&"Just"===c._1.ctor&&"Just"===c._2.ctor&&"Just"===c._3.ctor?O(p(t,c._0._0,c._1._0,c._2._0,c._3._0)):R}),a(function(t,r,e,n,o,c){var i={ctor:"_Tuple5",_0:r,_1:e,_2:n,_3:o,_4:c};return"_Tuple5"===i.ctor&&"Just"===i._0.ctor&&"Just"===i._1.ctor&&"Just"===i._2.ctor&&"Just"===i._3.ctor&&"Just"===i._4.ctor?O(h(t,i._0._0,i._1._0,i._2._0,i._3._0,i._4._0)):R}),function(){function t(t,r){return{ctor:"::",_0:t,_1:r}}function r(r){for(var e=y,n=r.length;n--;)e=t(r[n],e);return e}function n(t){for(var r=[];"[]"!==t.ctor;)r.push(t._0),t=t._1;return r}function o(t,r,e){for(var o=n(e),c=r,i=o.length;i--;)c=_(t,o[i],c);return c}function l(t,e,n){for(var o=[];"[]"!==e.ctor&&"[]"!==n.ctor;)o.push(_(t,e._0,n._0)),e=e._1,n=n._1;return r(o)}function f(t,e,n,o){for(var c=[];"[]"!==e.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor;)c.push(d(t,e._0,n._0,o._0)),e=e._1,n=n._1,o=o._1;return r(c)}function s(t,e,n,o,c){for(var i=[];"[]"!==e.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor&&"[]"!==c.ctor;)i.push(p(t,e._0,n._0,o._0,c._0)),e=e._1,n=n._1,o=o._1,c=c._1;return r(i)}function v(t,e,n,o,c,i){for(var u=[];"[]"!==e.ctor&&"[]"!==n.ctor&&"[]"!==o.ctor&&"[]"!==c.ctor&&"[]"!==i.ctor;)u.push(h(t,e._0,n._0,o._0,c._0,i._0)),e=e._1,n=n._1,o=o._1,c=c._1,i=i._1;return r(u)}function g(t,e){return r(n(e).sort(function(r,e){return m.cmp(t(r),t(e))}))}function b(t,e){return r(n(e).sort(function(r,e){var n=t(r)(e).ctor;return"EQ"===n?0:"LT"===n?-1:1}))}var y={ctor:"[]"};return{Nil:y,Cons:t,cons:e(t),toArray:n,fromArray:r,foldr:c(o),map2:c(l),map3:i(f),map4:u(s),map5:a(v),sortBy:e(g),sortWith:e(b)}}()),j=(M.sortWith,M.sortBy,e(function(t,r){for(;;){if(m.cmp(t,0)<1)return r;var e=r;if("[]"===e.ctor)return r;var n=t-1,o=e._1;t=n,r=o}}),M.map5,M.map4,M.map3,M.map2),L=e(function(t,r){for(;;){var e=r;if("[]"===e.ctor)return!1;if(t(e._0))return!0;var n=t,o=e._1;t=n,r=o}}),I=(e(function(t,r){return!_(L,function(r){return!t(r)},r)}),M.foldr),P=c(function(t,r,e){for(;;){var n=e;if("[]"===n.ctor)return r;var o=t,c=_(t,n._0,r),i=n._1;t=o,r=c,e=i}}),D=function(t){return d(P,e(function(t,r){return r+1}),0,t)},U=function(t){return d(P,e(function(t,r){return t+r}),0,t)},J=e(function(t,r){return _(L,function(r){return m.eq(r,t)},r)}),H=function(t){return"[]"===t.ctor},W=function(t){var r=t;return"::"===r.ctor?O(r._0):R},q=q||{};q["::"]=M.cons;var F=e(function(t,r){return d(I,e(function(r,e){return{ctor:"::",_0:t(r),_1:e}}),{ctor:"[]"},r)}),z=e(function(t,r){var n=e(function(r,e){return t(r)?{ctor:"::",_0:r,_1:e}:e});return d(I,n,{ctor:"[]"},r)}),K=c(function(t,r,e){var n=t(r);return"Just"===n.ctor?{ctor:"::",_0:n._0,_1:e}:e}),$=e(function(t,r){return d(I,K(t),{ctor:"[]"},r)}),Q=function(t){return d(P,e(function(t,r){return{ctor:"::",_0:t,_1:r}}),{ctor:"[]"},t)},V=(c(function(t,r,n){var o=e(function(r,e){var n=e;return"::"===n.ctor?{ctor:"::",_0:_(t,r,n._0),_1:e}:{ctor:"[]"}});return Q(d(P,o,{ctor:"::",_0:r,_1:{ctor:"[]"}},n))}),e(function(t,r){return"[]"===r.ctor?t:d(I,e(function(t,r){return{ctor:"::",_0:t,_1:r}}),r,t)})),G=function(t){return d(I,V,{ctor:"[]"},t)},X=e(function(t,r){return G(_(F,t,r))}),Y=(e(function(t,r){var n=e(function(r,e){var n=e,o=n._0,c=n._1;return t(r)?{ctor:"_Tuple2",_0:{ctor:"::",_0:r,_1:o},_1:c}:{ctor:"_Tuple2",_0:o,_1:{ctor:"::",_0:r,_1:c}}});return d(I,n,{ctor:"_Tuple2",_0:{ctor:"[]"},_1:{ctor:"[]"}},r)}),e(function(t,r){var n=r;if("[]"===n.ctor)return{ctor:"[]"};var o=e(function(r,e){return{ctor:"::",_0:t,_1:{ctor:"::",_0:r,_1:e}}}),c=d(I,o,{ctor:"[]"},n._1);return{ctor:"::",_0:n._0,_1:c}}),c(function(t,r,e){for(;;){if(m.cmp(t,0)<1)return e;var n=r;if("[]"===n.ctor)return e;var o=t-1,c=n._1,i={ctor:"::",_0:n._0,_1:e};t=o,r=c,e=i}})),Z=e(function(t,r){return Q(d(Y,t,r,{ctor:"[]"}))}),tt=c(function(t,r,e){if(m.cmp(r,0)<1)return{ctor:"[]"};var n={ctor:"_Tuple2",_0:r,_1:e};t:do{r:do{if("_Tuple2"!==n.ctor)break t;if("[]"===n._1.ctor)return e;if("::"!==n._1._1.ctor){if(1===n._0)break r;break t}switch(n._0){case 1:break r;case 2:return{ctor:"::",_0:n._1._0,_1:{ctor:"::",_0:n._1._1._0,_1:{ctor:"[]"}}};case 3:if("::"===n._1._1._1.ctor)return{ctor:"::",_0:n._1._0,_1:{ctor:"::",_0:n._1._1._0,_1:{ctor:"::",_0:n._1._1._1._0,_1:{ctor:"[]"}}}};break t;default:if("::"===n._1._1._1.ctor&&"::"===n._1._1._1._1.ctor){var o=n._1._1._1._0,c=n._1._1._0,i=n._1._0,u=n._1._1._1._1._0,a=n._1._1._1._1._1;return m.cmp(t,1e3)>0?{ctor:"::",_0:i,_1:{ctor:"::",_0:c,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:u,_1:_(Z,r-4,a)}}}}:{ctor:"::",_0:i,_1:{ctor:"::",_0:c,_1:{ctor:"::",_0:o,_1:{ctor:"::",_0:u,_1:d(tt,t+1,r-4,a)}}}}}break t}}while(!1);return{ctor:"::",_0:n._1._0,_1:{ctor:"[]"}}}while(!1);return e}),rt=(e(function(t,r){return d(tt,0,t,r)}),c(function(t,r,e){for(;;){if(m.cmp(r,0)<1)return t;var n={ctor:"::",_0:e,_1:t},o=r-1,c=e;t=n,r=o,e=c}})),et=(e(function(t,r){return d(rt,{ctor:"[]"},t,r)}),c(function(t,r,e){for(;;){if(!(m.cmp(t,r)<1))return e;var n=t,o=r-1,c={ctor:"::",_0:r,_1:e};t=n,r=o,e=c}})),nt=e(function(t,r){return d(et,t,r,{ctor:"[]"})}),ot=(e(function(t,r){return d(j,t,_(nt,0,D(r)-1),r)}),function(){function t(t,r){var e=t+": "+m.toString(r),n=n||{};return n.stdout?n.stdout.write(e):console.log(e),r}function r(t){throw new Error(t)}return{crash:r,log:e(t)}}()),ct=function(){function t(t){return 0===t.length}function r(t,r){return t+r}function n(t){var r=t[0];return r?O(m.Tuple2(m.chr(r),t.slice(1))):R}function o(t,r){return t+r}function i(t){return M.toArray(t).join("")}function u(t){return t.length}function a(t,r){for(var e=r.split(""),n=e.length;n--;)e[n]=t(m.chr(e[n]));return e.join("")}function l(t,r){return r.split("").map(m.chr).filter(t).join("")}function f(t){return t.split("").reverse().join("")}function s(t,r,e){for(var n=e.length,o=0;o0;)1&t&&(e+=r),t>>=1,r+=r;return e}function g(t,r,e){return e.slice(t,r)}function b(t,r){return t<1?"":r.slice(0,t)}function y(t,r){return t<1?"":r.slice(-t)}function k(t,r){return t<1?r:r.slice(t)}function w(t,r){return t<1?r:r.slice(0,-t)}function T(t,r,e){var n=(t-e.length)/2;return v(Math.ceil(n),r)+e+v(0|n,r)}function B(t,r,e){return e+v(t-e.length,r)}function N(t,r,e){return v(t-e.length,r)+e}function E(t){return t.trim()}function x(t){return t.replace(/^\s+/,"")}function C(t){return t.replace(/\s+$/,"")}function A(t){return M.fromArray(t.trim().split(/\s+/g))}function S(t){return M.fromArray(t.split(/\r\n|\r|\n/g))}function j(t){return t.toUpperCase()}function L(t){return t.toLowerCase()}function I(t,r){for(var e=r.length;e--;)if(t(m.chr(r[e])))return!0;return!1}function P(t,r){for(var e=r.length;e--;)if(!t(m.chr(r[e])))return!1;return!0}function D(t,r){return r.indexOf(t)>-1}function U(t,r){return 0===r.indexOf(t)}function J(t,r){return r.length>=t.length&&r.lastIndexOf(t)===r.length-t.length}function H(t,r){var e=t.length;if(e<1)return M.Nil;for(var n=0,o=[];(n=r.indexOf(t,n))>-1;)o.push(n),n+=e;return M.fromArray(o)}function W(t){var r=t.length;if(0===r)return q(t);var e=t[0];if("0"===e&&"x"===t[1]){for(var n=2;n"9"||e<"0"&&"-"!==e&&"+"!==e)return q(t);for(var n=1;n-1&&m.cmp(n,ut(r))<1})),lt=(_(at,m.chr("A"),m.chr("Z")),_(at,m.chr("a"),m.chr("z")),_(at,m.chr("0"),m.chr("9")),_(at,m.chr("0"),m.chr("7")),e(function(t,r){var e=r;return"Ok"===e.ctor?e._0:t}),function(t){return{ctor:"Err",_0:t}}),ft=(e(function(t,r){var e=r;return"Ok"===e.ctor?t(e._0):lt(e._0)}),function(t){return{ctor:"Ok",_0:t}}),st=(e(function(t,r){var e=r;return"Ok"===e.ctor?ft(t(e._0)):lt(e._0)}),c(function(t,r,e){var n={ctor:"_Tuple2",_0:r,_1:e};return"Ok"===n._0.ctor?"Ok"===n._1.ctor?ft(_(t,n._0._0,n._1._0)):lt(n._1._0):lt(n._0._0)}),i(function(t,r,e,n){var o={ctor:"_Tuple3",_0:r,_1:e,_2:n};return"Ok"===o._0.ctor?"Ok"===o._1.ctor?"Ok"===o._2.ctor?ft(d(t,o._0._0,o._1._0,o._2._0)):lt(o._2._0):lt(o._1._0):lt(o._0._0)}),u(function(t,r,e,n,o){var c={ctor:"_Tuple4",_0:r,_1:e,_2:n,_3:o};return"Ok"===c._0.ctor?"Ok"===c._1.ctor?"Ok"===c._2.ctor?"Ok"===c._3.ctor?ft(p(t,c._0._0,c._1._0,c._2._0,c._3._0)):lt(c._3._0):lt(c._2._0):lt(c._1._0):lt(c._0._0)}),a(function(t,r,e,n,o,c){var i={ctor:"_Tuple5",_0:r,_1:e,_2:n,_3:o,_4:c};return"Ok"===i._0.ctor?"Ok"===i._1.ctor?"Ok"===i._2.ctor?"Ok"===i._3.ctor?"Ok"===i._4.ctor?ft(h(t,i._0._0,i._1._0,i._2._0,i._3._0,i._4._0)):lt(i._4._0):lt(i._3._0):lt(i._2._0):lt(i._1._0):lt(i._0._0)}),e(function(t,r){var e=r;return"Ok"===e.ctor?ft(e._0):lt(t(e._0))}),e(function(t,r){var e=r;return"Just"===e.ctor?ft(e._0):lt(t)}),ct.fromList,ct.toList,ct.toFloat,ct.toInt,ct.indexes,ct.indexes,ct.endsWith,ct.startsWith,ct.contains,ct.all,ct.any,ct.toLower,ct.toUpper,ct.lines,ct.words,ct.trimRight,ct.trimLeft,ct.trim,ct.padRight,ct.padLeft,ct.pad,ct.dropRight,ct.dropLeft,ct.right,ct.left,ct.slice,ct.repeat,ct.join,ct.split,ct.foldr,ct.foldl,ct.reverse,ct.filter,ct.map,ct.length,ct.concat),_t=(ct.append,ct.uncons,ct.cons,ct.isEmpty,c(function(t,r,e){for(;;){var n=e;if("RBEmpty_elm_builtin"===n.ctor)return r;var o=t,c=d(t,n._1,n._2,d(_t,t,r,n._4)),i=n._3;t=o,r=c,e=i}})),dt=function(t){return d(_t,c(function(t,r,e){return{ctor:"::",_0:t,_1:e}}),{ctor:"[]"},t)},pt=function(t){return d(_t,c(function(t,r,e){return{ctor:"::",_0:r,_1:e}}),{ctor:"[]"},t)},ht=function(t){return d(_t,c(function(t,r,e){return{ctor:"::",_0:{ctor:"_Tuple2",_0:t,_1:r},_1:e}}),{ctor:"[]"},t)},vt=c(function(t,r,e){for(;;){var n=e;if("RBEmpty_elm_builtin"===n.ctor)return r;var o=t,c=d(t,n._1,n._2,d(vt,t,r,n._3)),i=n._4;t=o,r=c,e=i}}),gt=a(function(t,r,n,o,i,u){var a=c(function(e,o,c){for(;;){var i=c,u=i._1,a=i._0,l=a;if("[]"===l.ctor)return{ctor:"_Tuple2",_0:a,_1:d(n,e,o,u)};var f=l._1,s=l._0._1,_=l._0._0;if(!(m.cmp(_,e)<0))return m.cmp(_,e)>0?{ctor:"_Tuple2",_0:a,_1:d(n,e,o,u)}:{ctor:"_Tuple2",_0:f,_1:p(r,_,s,o,u)};var h=e,v=o,g={ctor:"_Tuple2",_0:f,_1:d(t,_,s,u)};e=h,o=v,c=g}}),l=d(vt,a,{ctor:"_Tuple2",_0:ht(o),_1:u},i),f=l._0,s=l._1;return d(P,e(function(r,e){var n=r;return d(t,n._0,n._1,e)}),s,f)}),mt=i(function(t,r,e,n){return ot.crash(st({ctor:"::",_0:"Internal red-black tree invariant violated, expected ",_1:{ctor:"::",_0:t,_1:{ctor:"::",_0:" and got ",_1:{ctor:"::",_0:T(r),_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:e,_1:{ctor:"::",_0:"/",_1:{ctor:"::",_0:n,_1:{ctor:"::",_0:"\nPlease report this bug to ",_1:{ctor:"[]"}}}}}}}}}}))}),bt=function(t){var r=t;t:do{if("RBNode_elm_builtin"===r.ctor){if("BBlack"===r._0.ctor)return!0;break t}if("LBBlack"===r._0.ctor)return!0;break t}while(!1);return!1},yt=e(function(t,r){for(;;){var e=r;if("RBEmpty_elm_builtin"===e.ctor)return t;var n=_(yt,t+1,e._4),o=e._3;t=n,r=o}}),kt=e(function(t,r){t:for(;;){var e=r;if("RBEmpty_elm_builtin"===e.ctor)return R;var n=_(E,t,e._1);switch(n.ctor){case"LT":var o=t,c=e._3;t=o,r=c;continue t;case"EQ":return O(e._2);default:var i=t,u=e._4;t=i,r=u;continue t}}}),wt=e(function(t,r){return"Just"===_(kt,t,r).ctor}),Tt=c(function(t,r,e){for(;;){var n=e;if("RBEmpty_elm_builtin"===n.ctor)return{ctor:"_Tuple2",_0:t,_1:r};var o=n._1,c=n._2,i=n._4;t=o,r=c,e=i}}),Bt={ctor:"NBlack"},Nt={ctor:"BBlack"},Et={ctor:"Black"},xt=function(t){var r=t;if("RBNode_elm_builtin"===r.ctor){var e=r._0;return m.eq(e,Et)||m.eq(e,Nt)}return!0},Rt={ctor:"Red"},Ct=function(t){switch(t.ctor){case"Black":return Nt;case"Red":return Et;case"NBlack":return Rt;default:return ot.crash("Can't make a double black node more black!")}},Ot=function(t){switch(t.ctor){case"BBlack":return Et;case"Black":return Rt;case"Red":return Bt;default:return ot.crash("Can't make a negative black node less black!")}},At={ctor:"LBBlack"},St={ctor:"LBlack"},Mt=function(t){return{ctor:"RBEmpty_elm_builtin",_0:t}},jt=Mt(St),Lt=u(function(t,r,e,n,o){return{ctor:"RBNode_elm_builtin",_0:t,_1:r,_2:e,_3:n,_4:o}}),It=function(t){var r=t;return"RBNode_elm_builtin"===r.ctor&&"Red"===r._0.ctor?h(Lt,Et,r._1,r._2,r._3,r._4):t},Pt=function(t){var r=t;return"RBNode_elm_builtin"===r.ctor?h(Lt,Ot(r._0),r._1,r._2,r._3,r._4):Mt(St)},Dt=function(t){return function(r){return function(e){return function(n){return function(o){return function(c){return function(i){return function(u){return function(a){return function(l){return function(f){return h(Lt,Ot(t),n,o,h(Lt,Et,r,e,u,a),h(Lt,Et,c,i,l,f))}}}}}}}}}}},Ut=function(t){var r=t;return"RBEmpty_elm_builtin"===r.ctor?Mt(St):h(Lt,Et,r._1,r._2,r._3,r._4)},Jt=function(t){var r=t;return"RBEmpty_elm_builtin"===r.ctor?ot.crash("can't make a Leaf red"):h(Lt,Rt,r._1,r._2,r._3,r._4)},Ht=function(t){var r=t;t:do{r:do{e:do{n:do{o:do{c:do{i:do{if("RBNode_elm_builtin"!==r.ctor)break t;if("RBNode_elm_builtin"===r._3.ctor)if("RBNode_elm_builtin"===r._4.ctor)switch(r._3._0.ctor){case"Red":switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;break t;case"NBlack":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;break t;default:if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;break t}case"NBlack":switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t;case"NBlack":if("BBlack"===r._0.ctor){if("RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;if("RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t}break t;default:if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t}default:switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;break t;default:break t}}else switch(r._3._0.ctor){case"Red":if("RBNode_elm_builtin"===r._3._3.ctor&&"Red"===r._3._3._0.ctor)break i;if("RBNode_elm_builtin"===r._3._4.ctor&&"Red"===r._3._4._0.ctor)break c;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._3._3.ctor&&"Black"===r._3._3._0.ctor&&"RBNode_elm_builtin"===r._3._4.ctor&&"Black"===r._3._4._0.ctor)break r;break t;default:break t}else{if("RBNode_elm_builtin"!==r._4.ctor)break t;switch(r._4._0.ctor){case"Red":if("RBNode_elm_builtin"===r._4._3.ctor&&"Red"===r._4._3._0.ctor)break o;if("RBNode_elm_builtin"===r._4._4.ctor&&"Red"===r._4._4._0.ctor)break n;break t;case"NBlack":if("BBlack"===r._0.ctor&&"RBNode_elm_builtin"===r._4._3.ctor&&"Black"===r._4._3._0.ctor&&"RBNode_elm_builtin"===r._4._4.ctor&&"Black"===r._4._4._0.ctor)break e;break t;default:break t}}}while(!1);return Dt(r._0)(r._3._3._1)(r._3._3._2)(r._3._1)(r._3._2)(r._1)(r._2)(r._3._3._3)(r._3._3._4)(r._3._4)(r._4)}while(!1);return Dt(r._0)(r._3._1)(r._3._2)(r._3._4._1)(r._3._4._2)(r._1)(r._2)(r._3._3)(r._3._4._3)(r._3._4._4)(r._4)}while(!1);return Dt(r._0)(r._1)(r._2)(r._4._3._1)(r._4._3._2)(r._4._1)(r._4._2)(r._3)(r._4._3._3)(r._4._3._4)(r._4._4)}while(!1);return Dt(r._0)(r._1)(r._2)(r._4._1)(r._4._2)(r._4._4._1)(r._4._4._2)(r._3)(r._4._3)(r._4._4._3)(r._4._4._4)}while(!1);return h(Lt,Et,r._4._3._1,r._4._3._2,h(Lt,Et,r._1,r._2,r._3,r._4._3._3),h(Wt,Et,r._4._1,r._4._2,r._4._3._4,Jt(r._4._4)))}while(!1);return h(Lt,Et,r._3._4._1,r._3._4._2,h(Wt,Et,r._3._1,r._3._2,Jt(r._3._3),r._3._4._3),h(Lt,Et,r._1,r._2,r._3._4._4,r._4))}while(!1);return t},Wt=u(function(t,r,e,n,o){var c=h(Lt,t,r,e,n,o);return xt(c)?Ht(c):c}),qt=u(function(t,r,e,n,o){return bt(n)||bt(o)?h(Wt,Ct(t),r,e,Pt(n),Pt(o)):h(Lt,t,r,e,n,o)}),Ft=u(function(t,r,e,n,o){var c=o;return"RBEmpty_elm_builtin"===c.ctor?d(zt,t,n,o):h(qt,t,r,e,n,h(Ft,c._0,c._1,c._2,c._3,c._4))}),zt=c(function(t,r,e){var n={ctor:"_Tuple2",_0:r,_1:e};if("RBEmpty_elm_builtin"!==n._0.ctor){if("RBEmpty_elm_builtin"===n._1.ctor){var o=n._1._0,c=n._0._0,i={ctor:"_Tuple3",_0:t,_1:c,_2:o};return"_Tuple3"===i.ctor&&"Black"===i._0.ctor&&"Red"===i._1.ctor&&"LBlack"===i._2.ctor?h(Lt,Et,n._0._1,n._0._2,n._0._3,n._0._4):p(mt,"Black/Red/LBlack",t,T(c),T(o))}var u=n._0._2,a=n._0._4,l=n._0._1,f=h(Ft,n._0._0,l,u,n._0._3,a),s=d(Tt,l,u,a),_=s._0,v=s._1;return h(qt,t,_,v,f,e)}if("RBEmpty_elm_builtin"!==n._1.ctor){var g=n._1._0,m=n._0._0,b={ctor:"_Tuple3",_0:t,_1:m,_2:g};return"_Tuple3"===b.ctor&&"Black"===b._0.ctor&&"LBlack"===b._1.ctor&&"Red"===b._2.ctor?h(Lt,Et,n._1._1,n._1._2,n._1._3,n._1._4):p(mt,"Black/LBlack/Red",t,T(m),T(g))}switch(t.ctor){case"Red":return Mt(St);case"Black":return Mt(At);default:return ot.crash("cannot have bblack or nblack nodes at this point")}}),Kt=e(function(t,r){var e=r;if("RBEmpty_elm_builtin"===e.ctor)return Mt(St);var n=e._1;return h(Lt,e._0,n,_(t,n,e._2),_(Kt,t,e._3),_(Kt,t,e._4))}),$t={ctor:"Same"},Qt={ctor:"Remove"},Vt={ctor:"Insert"},Gt=c(function(t,r,e){var n=function(e){var o=e;if("RBEmpty_elm_builtin"===o.ctor){var c=r(R);return"Nothing"===c.ctor?{ctor:"_Tuple2",_0:$t,_1:jt}:{ctor:"_Tuple2",_0:Vt,_1:h(Lt,Rt,t,c._0,jt,jt)}}var i=o._2,u=o._4,a=o._3,l=o._1,f=o._0;switch(_(E,t,l).ctor){case"EQ":var s=r(O(i));return"Nothing"===s.ctor?{ctor:"_Tuple2",_0:Qt,_1:d(zt,f,a,u)}:{ctor:"_Tuple2",_0:$t,_1:h(Lt,f,l,s._0,a,u)};case"LT":var p=n(a),v=p._0,g=p._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:$t,_1:h(Lt,f,l,i,g,u)};case"Insert":return{ctor:"_Tuple2",_0:Vt,_1:h(Wt,f,l,i,g,u)};default:return{ctor:"_Tuple2",_0:Qt,_1:h(qt,f,l,i,g,u)}}default:var m=n(u),v=m._0,b=m._1;switch(v.ctor){case"Same":return{ctor:"_Tuple2",_0:$t,_1:h(Lt,f,l,i,a,b)};case"Insert":return{ctor:"_Tuple2",_0:Vt,_1:h(Wt,f,l,i,a,b)};default:return{ctor:"_Tuple2",_0:Qt,_1:h(qt,f,l,i,a,b)}}}},o=n(e),c=o._0,i=o._1;switch(c.ctor){case"Same":return i;case"Insert":return It(i);default:return Ut(i)}}),Xt=c(function(t,r,e){return d(Gt,t,y(O(r)),e)}),Yt=(e(function(t,r){return d(Xt,t,r,jt)}),e(function(t,r){return d(vt,Xt,r,t)}),e(function(t,r){var e=c(function(r,e,n){return _(t,r,e)?d(Xt,r,e,n):n});return d(vt,e,jt,r)})),Zt=(e(function(t,r){return _(Yt,e(function(t,e){return _(wt,t,r)}),t)}),e(function(t,r){var e=c(function(r,e,n){var o=n,c=o._1,i=o._0;return _(t,r,e)?{ctor:"_Tuple2",_0:d(Xt,r,e,i),_1:c}:{ctor:"_Tuple2",_0:i,_1:d(Xt,r,e,c)}});return d(vt,e,{ctor:"_Tuple2",_0:jt,_1:jt},r)}),function(t){return d(P,e(function(t,r){var e=t;return d(Xt,e._0,e._1,r)}),jt,t)}),tr=e(function(t,r){return d(Gt,t,y(R),r)}),rr=(e(function(t,r){return d(vt,c(function(t,r,e){return _(tr,t,e)}),t,r)}),e(function(t,r){var e=r;return{ctor:"_Tuple2",_0:e._0,_1:t(e._1)}}),e(function(t,r){var e=r;return{ctor:"_Tuple2",_0:t(e._0),_1:e._1}}),function(t){return t._1}),er=(ot.crash,ot.log,function(){function t(t){return function(r){return function(r,e){r.worker=function(r){if(void 0!==r)throw new Error("The `"+e+"` module does not need flags.\nCall "+e+".worker() with no arguments and you should be all set!");return i(t.init,t.update,t.subscriptions,n)}}}}function r(t){return function(r){return function(e,o){e.worker=function(e){if(void 0===r)throw new Error("Are you trying to sneak a Never value into Elm? Trickster!\nIt looks like "+o+".main is defined with `programWithFlags` but has type `Program Never`.\nUse `program` instead if you do not want flags.");var c=_($r.run,r,e);if("Err"===c.ctor)throw new Error(o+".worker(...) was called with an unexpected argument.\nI tried to convert it to an Elm value, but ran into this problem:\n\n"+c._0);return i(t.init(c._0),t.update,t.subscriptions,n)}}}}function n(t,r){return function(t){}}function o(t){var r=v(M.Nil),n=m.Tuple2(m.Tuple0,r);return oe({init:n,view:function(t){return main},update:e(function(t,r){return n}),subscriptions:function(t){return r}})}function i(t,r,e,n){function o(t,n){return nr.nativeBinding(function(o){var c=_(r,t,n);n=c._0,i(n);var u=c._1,l=e(n);b(a,u,l),o(nr.succeed(n))})}function c(t){nr.rawSend(f,t)}var i,a={},l=nr.nativeBinding(function(r){var o=t._0;i=n(c,o);var u=t._1,l=e(o);b(a,u,l),r(nr.succeed(o))}),f=s(l,o),d=u(a,c);return d?{ports:d}:{}}function u(t,r){var e;for(var n in R){var o=R[n];o.isForeign&&(e=e||{},e[n]="cmd"===o.tag?N(n):x(n,r)),t[n]=a(o,r)}return e}function a(t,r){function e(t,r){if("self"===t.ctor)return d(i,n,t._0,r);var e=t._0;switch(o){case"cmd":return d(c,n,e.cmds,r);case"sub":return d(c,n,e.subs,r);case"fx":return p(c,n,e.cmds,e.subs,r)}}var n={main:r,self:void 0},o=t.tag,c=t.onEffects,i=t.onSelfMsg,u=s(t.init,e);return n.self=u,u}function l(t,r){return nr.nativeBinding(function(e){t.main(r),e(nr.succeed(m.Tuple0))})}function f(t,r){return _(nr.send,t.self,{ctor:"self",_0:r})}function s(t,r){function e(t){var o=nr.receive(function(e){return r(e,t)});return _(n,e,o)}var n=nr.andThen,o=_(n,e,t);return nr.rawSpawn(o)}function h(t){return function(r){return{type:"leaf",home:t,value:r}}}function v(t){return{type:"node",branches:t}}function g(t,r){return{type:"map",tagger:t,tree:r}}function b(t,r,e){var n={};y(!0,r,n,null),y(!1,e,n,null);for(var o in t){var c=o in n?n[o]:{cmds:M.Nil,subs:M.Nil};nr.rawSend(t[o],{ctor:"fx",_0:c})}}function y(t,r,e,n){switch(r.type){case"leaf":var o=r.home,c=k(t,o,n,r.value);return void(e[o]=w(t,c,e[o]));case"node":for(var i=r.branches;"[]"!==i.ctor;)y(t,i._0,e,n),i=i._1;return;case"map":return void y(t,r.tree,e,{tagger:r.tagger,rest:n})}}function k(t,r,e,n){function o(t){for(var r=e;r;)t=r.tagger(t),r=r.rest;return t}return _(t?R[r].cmdMap:R[r].subMap,o,n)}function w(t,r,e){return e=e||{cmds:M.Nil,subs:M.Nil},t?(e.cmds=M.Cons(r,e.cmds),e):(e.subs=M.Cons(r,e.subs),e)}function T(t){if(t in R)throw new Error("There can only be one port named `"+t+"`, but your program has multiple.")}function B(t,r){return T(t),R[t]={tag:"cmd",cmdMap:C,converter:r,isForeign:!0},h(t)}function N(t){function r(t,r,e){for(;"[]"!==r.ctor;){for(var n=o,c=i(r._0),a=0;a=0&&o.splice(r,1)}var o=[],i=R[t].converter,u=nr.succeed(null);return R[t].init=u,R[t].onEffects=c(r),{subscribe:e,unsubscribe:n}}function E(t,r){return T(t),R[t]={tag:"sub",subMap:O,converter:r,isForeign:!0},h(t)}function x(t,r){function e(t,r,e){for(var o=n(t,r,e),c=0;c=P(e))throw new Error("Index "+t+" is out of range. Check the length of your array first or use getMaybe or getWithDefault.");return r(t,e)}function r(t,r){for(var e=r.height;e>0;e--){for(var n=t>>5*e;r.lengths[n]<=t;)n++;n>0&&(t-=r.lengths[n-1]),r=r.table[n]}return r.table[t]}function n(t,r,e){return t<0||P(e)<=t?e:o(t,r,e)}function o(t,r,e){if(e=I(e),0===e.height)e.table[t]=r;else{var n=D(t,e);n>0&&(t-=e.lengths[n-1]),e.table[n]=o(t,r,e.table[n])}return e}function i(t,r){return t<=0?Q:u(r,Math.floor(Math.log(t)/Math.log(K)),0,t)}function u(t,r,e,n){if(0===r){for(var o=new Array((n-e)%(K+1)),c=0;c0?a[c-1]:0);return{ctor:"_Array",height:r,table:o,lengths:a}}function a(t){if("[]"===t.ctor)return Q;for(var r=new Array(K),e=[],n=0;"[]"!==t.ctor;)if(r[n]=t._0,t=t._1,++n===K){var o={ctor:"_Array",height:0,table:r};l(o,e),r=new Array(K),n=0}if(n>0){var o={ctor:"_Array",height:0,table:r.splice(0,n)};l(o,e)}for(var c=0;c0&&l(e[c],e);var i=e[e.length-1];return i.height>0&&1===i.table.length?i.table[0]:i}function l(t,r){var e=t.height;if(r.length===e){var n={ctor:"_Array",height:e+1,table:[],lengths:[]};r.push(n)}r[e].table.push(t);var o=P(t);r[e].lengths.length>0&&(o+=r[e].lengths[r[e].lengths.length-1]),r[e].lengths.push(o),r[e].table.length===K&&(l(r[e],r),r[e]={ctor:"_Array",height:e+1,table:[],lengths:[]})}function f(t,r){var e=s(t,r);return null!==e?e:H(r,U(t,r.height))}function s(t,r){if(0===r.height){if(r.table.length=0;e--)t=0===r.height?M.Cons(r.table[e],t):p(t,r.table[e]);return t}function h(t,r){var e={ctor:"_Array",height:r.height,table:new Array(r.table.length)};r.height>0&&(e.lengths=r.lengths);for(var n=0;n0&&(n.lengths=r.lengths);for(var o=0;o0?r.lengths[n-1]:0),r.table[n]);if(0===n)return o;var e={ctor:"_Array",height:r.height,table:r.table.slice(0,n),lengths:r.lengths.slice(0,n)};return o.table.length>0&&(e.table[n]=o,e.lengths[n]=P(o)+(n>0?e.lengths[n-1]:0)),e}function w(t,r){if(0===t)return r;if(0===r.height){var e={ctor:"_Array",height:0};return e.table=r.table.slice(t,r.table.length+1),e}var n=D(t,r),o=w(t-(n>0?r.lengths[n-1]:0),r.table[n]);if(n===r.table.length-1)return o;var e={ctor:"_Array",height:r.height,table:r.table.slice(n,r.table.length+1),lengths:new Array(r.table.length-n)};e.table[0]=o;for(var c=0,i=0;i0){for(var n=P(e[0]),o=0;o0){var c=x(t,r);c>$&&(e=S(e[0],e[1],c))}return H(e[0],e[1])}function B(t,r){if(0===t.height&&0===r.height)return[t,r];if(1!==t.height||1!==r.height)if(t.height===r.height){t=I(t),r=I(r);var e=B(j(t),L(r));N(t,e[1]),E(r,e[0])}else if(t.height>r.height){t=I(t);var e=B(j(t),r);N(t,e[0]),r=J(e[1],e[1].height+1)}else{r=I(r);var e=B(t,L(r)),n=0===e[0].table.length?0:1,o=0===n?1:0;E(r,e[n]),t=J(e[o],e[o].height+1)}if(0===t.table.length||0===r.table.length)return[t,r];var c=x(t,r);return c<=$?[t,r]:S(t,r,c)}function N(t,r){var e=t.table.length-1;t.table[e]=r,t.lengths[e]=P(r),t.lengths[e]+=e>0?t.lengths[e-1]:0}function E(t,r){if(r.table.length>0){t.table[0]=r,t.lengths[0]=P(r);for(var e=P(t.table[0]),n=1;n0&&(e.lengths=new Array(r)),e}function S(t,r,e){for(var n=A(t.height,Math.min(K,t.table.length+r.table.length-e)),o=A(t.height,n.table.length-(t.table.length+r.table.length-e)),c=0;R(t.table,r.table,c).table.length%K==0;)C(n.table,o.table,c,R(t.table,r.table,c)),C(n.lengths,o.lengths,c,R(t.lengths,r.lengths,c)),c++;for(var i=c,u=new A(t.height-1,0),a=0;c-i-(u.table.length>0?1:0)0)for(var s=u.lengths.length,_=s;_0?u.lengths[_-1]:0;a+=f,l.table.length<=f&&(c++,a=0),u.table.length===K&&(O(n,o,i,u),u=A(t.height-1,0),i++)}for(u.table.length>0&&(O(n,o,i,u),i++);c0&&(r.lengths=t.lengths.slice()),r}function P(t){return 0===t.height?t.table.length:t.lengths[t.lengths.length-1]}function D(t,r){for(var e=t>>5*r.height;r.lengths[e]<=t;)e++;return e}function U(t,r){return 0===r?{ctor:"_Array",height:0,table:[t]}:{ctor:"_Array",height:r,table:[U(t,r-1)],lengths:[1]}}function J(t,r){return r===t.height?t:{ctor:"_Array",height:r,table:[J(t,r-1)],lengths:[P(t)]}}function H(t,r){return{ctor:"_Array",height:t.height+1,table:[t,r],lengths:[P(t),P(t)+P(r)]}}function W(t){var r=new Array(P(t));return q(r,0,t),r}function q(t,r,e){for(var n=0;n0?i[u-1]:0);return{ctor:"_Array",height:r,table:c,lengths:i}}var K=32,$=2,Q={ctor:"_Array",height:0,table:[]};return{empty:Q,fromList:a,toList:d,initialize:e(i),append:e(T),push:e(f),slice:c(y),get:e(t),set:c(n),map:e(h),indexedMap:e(v),foldl:c(m),foldr:c(b),length:P,toJSArray:W,fromJSArray:F}}()),_r=(sr.append,sr.length,sr.slice,sr.set,e(function(t,r){return m.cmp(0,t)<1&&m.cmp(t,sr.length(r))<0?O(_(sr.get,t,r)):R}),sr.push),dr=sr.empty,pr=(e(function(t,r){var n=e(function(r,e){return t(r)?_(sr.push,r,e):e});return d(sr.foldl,n,sr.empty,r)}),sr.foldr,sr.foldl),hr=(sr.indexedMap,sr.map,sr.toList),vr=(sr.fromList,sr.initialize),gr=(e(function(t,r){return _(vr,t,y(r))}),e(function(t,r){var e=t;return"Nothing"===e.ctor?r:{ctor:"::",_0:e._0,_1:r}})),mr=_(I,gr,{ctor:"[]"}),br=(e(function(t,r){var e=_(A,t,r);return"Just"===e.ctor&&!0===e._0?r:R}),function(t){var r=e(function(r,e){var n=t(r);return"Nothing"===n.ctor?R:_(A,_r(n._0),e)});_(pr,r,O(dr))}(k),function(t){var r=e(function(r,n){var o=t(r);return"Nothing"===o.ctor?R:_(A,e(function(t,r){return{ctor:"::",_0:t,_1:r}})(o._0),n)});_(I,r,O({ctor:"[]"}))}(k),e(function(t,r){return"Nothing"===r.ctor?t:r}),e(function(t,r){return"Nothing"===r.ctor?t({ctor:"_Tuple0"}):r}),e(function(t,r){return"Nothing"===t.ctor?r({ctor:"_Tuple0"}):t}),e(function(t,r){return"Nothing"===t.ctor?r:t}),S(y),S(b(y)),S(e(function(t,r){return r(t)})),c(function(t,r,e){var n=e;return"Nothing"===n.ctor?t({ctor:"_Tuple0"}):r(n._0)}),c(function(t,r,e){var n=e;return"Nothing"===n.ctor?t:r(n._0)}),br||{});br["?"]=e(function(t,r){return _(x,r,t)});var yr=nr.onError,kr=nr.andThen,wr=e(function(t,r){var e=r;return nr.spawn(_(kr,fr(t),e._0))}),Tr=nr.fail,Br=(e(function(t,r){return _(yr,function(r){return Tr(t(r))},r)}),nr.succeed),Nr=e(function(t,r){return _(kr,function(r){return Br(t(r))},r)}),Er=c(function(t,r,e){return _(kr,function(r){return _(kr,function(e){return Br(_(t,r,e))},e)},r)}),xr=(i(function(t,r,e,n){return _(kr,function(r){return _(kr,function(e){return _(kr,function(n){return Br(d(t,r,e,n))},n)},e)},r)}),u(function(t,r,e,n,o){return _(kr,function(r){return _(kr,function(e){return _(kr,function(n){return _(kr,function(o){return Br(p(t,r,e,n,o))},o)},n)},e)},r)}),a(function(t,r,e,n,o,c){return _(kr,function(r){return _(kr,function(e){return _(kr,function(n){return _(kr,function(o){return _(kr,function(c){return Br(h(t,r,e,n,o,c))},c)},o)},n)},e)},r)}),function(t){var r=t;return"[]"===r.ctor?Br({ctor:"[]"}):d(Er,e(function(t,r){return{ctor:"::",_0:t,_1:r}}),r._0,xr(r._1))}),Rr=c(function(t,r,e){return _(Nr,function(t){return{ctor:"_Tuple0"}},xr(_(F,wr(t),r)))}),Cr=Br({ctor:"_Tuple0"}),Or=c(function(t,r,e){return Br({ctor:"_Tuple0"})}),Ar=er.leaf("Task"),Sr=function(t){return{ctor:"Perform",_0:t}},Mr=(e(function(t,r){return Ar(Sr(_(Nr,t,r)))}),e(function(t,r){return Ar(Sr(_(yr,function(r){return Br(t(lt(r)))},_(kr,function(r){return Br(t(ft(r)))},r))))}),e(function(t,r){return Sr(_(Nr,t,r._0))}));er.effectManagers.Task={pkg:"elm-lang/core",init:Cr,onEffects:Rr,onSelfMsg:Or,tag:"cmd",cmdMap:Mr};var jr=function(){function t(t,r){return nr.nativeBinding(function(e){var n=setInterval(function(){nr.rawSpawn(r)},t);return function(){clearInterval(n)}})}return{now:nr.nativeBinding(function(t){t(nr.succeed(Date.now()))}),setInterval_:e(t)}}(),Lr=jr.setInterval_,Ir=c(function(t,r,e){var n=r;if("[]"===n.ctor)return Br(e);var o=n._0,c=function(r){return d(Ir,t,n._1,d(Xt,o,r,e))},i=nr.spawn(_(Lr,o,_(lr,t,o)));return _(kr,c,i)}),Pr=e(function(t,r){var e=t,n=e._1,o=e._0,c=_(kt,o,r);return"Nothing"===c.ctor?d(Xt,o,{ctor:"::",_0:n,_1:{ctor:"[]"}},r):d(Xt,o,{ctor:"::",_0:n,_1:c._0},r)}),Dr=jr.now,Ur=c(function(t,r,e){var n=_(kt,r,e.taggers);if("Nothing"===n.ctor)return Br(e);var o=function(r){return xr(_(F,function(e){return _(fr,t,e(r))},n._0))};return _(kr,function(t){return Br(e)},_(kr,o,Dr))}),Jr=er.leaf("Time"),Hr=e(function(t,r){return{taggers:t,processes:r}}),Wr=Br(_(Hr,jt,jt)),qr=c(function(t,r,e){var n=e,o=c(function(t,r,e){var n=e;return{ctor:"_Tuple3",_0:n._0,_1:n._1,_2:_(kr,function(t){return n._2},nr.kill(r))}}),u=i(function(t,r,e,n){var o=n;return{ctor:"_Tuple3",_0:o._0,_1:d(Xt,t,e,o._1),_2:o._2}}),a=c(function(t,r,e){var n=e;return{ctor:"_Tuple3",_0:{ctor:"::",_0:t,_1:n._0},_1:n._1,_2:n._2}}),l=d(P,Pr,jt,r),f=v(gt,a,u,o,l,n.processes,{ctor:"_Tuple3",_0:{ctor:"[]"},_1:jt,_2:Br({ctor:"_Tuple0"})}),s=f._0,p=f._1,h=f._2;return _(kr,function(t){return Br(_(Hr,l,t))},_(kr,function(r){return d(Ir,t,s,p)},h))}),Fr=e(function(t,r){return{ctor:"Every",_0:t,_1:r}}),zr=(e(function(t,r){return Jr(_(Fr,t,r))}),e(function(t,r){var e=r;return _(Fr,e._0,function(r){return t(e._1(r))})}));er.effectManagers.Time={pkg:"elm-lang/core",init:Wr,onEffects:qr,onSelfMsg:Ur,tag:"sub",subMap:zr};var Kr,$r=function(){function t(t){return{ctor:"",tag:"succeed",msg:t}}function r(t){return{ctor:"",tag:"fail",msg:t}}function n(t){return{ctor:"",tag:t}}function o(t,r){return{ctor:"",tag:t,decoder:r}}function _(t){return{ctor:"",tag:"null",value:t}}function d(t,r){return{ctor:"",tag:"field",field:t,decoder:r}}function p(t,r){return{ctor:"",tag:"index",index:t,decoder:r}}function h(t){return{ctor:"",tag:"key-value",decoder:t}}function v(t,r){return{ctor:"",tag:"map-many",func:t,decoders:r}}function g(t,r){return{ctor:"",tag:"andThen",decoder:r,callback:t}}function b(t){return{ctor:"",tag:"oneOf",decoders:t}}function y(t,r){return v(t,[r])}function k(t,r,e){return v(t,[r,e])}function w(t,r,e,n){return v(t,[r,e,n])}function T(t,r,e,n,o){return v(t,[r,e,n,o])}function B(t,r,e,n,o,c){return v(t,[r,e,n,o,c])}function N(t,r,e,n,o,c,i){return v(t,[r,e,n,o,c,i])}function E(t,r,e,n,o,c,i,u){return v(t,[r,e,n,o,c,i,u])}function x(t,r,e,n,o,c,i,u,a){return v(t,[r,e,n,o,c,i,u,a])}function C(t){return{tag:"ok",value:t}}function A(t,r){return{tag:"primitive",type:t,value:r}}function S(t,r){return{tag:"index",index:t,rest:r}}function j(t,r){return{tag:"field",field:t,rest:r}}function S(t,r){return{tag:"index",index:t,rest:r}}function L(t){return{tag:"oneOf",problems:t}}function I(t){return{tag:"fail",msg:t}}function P(t){for(var r="_";t;)switch(t.tag){case"primitive":return"Expecting "+t.type+("_"===r?"":" at "+r)+" but instead got: "+D(t.value);case"index":r+="["+t.index+"]",t=t.rest;break;case"field":r+="."+t.field,t=t.rest;break;case"oneOf":for(var e=t.problems,n=0;n=r.length)return A("a longer array. Need index "+a+" but there are only "+r.length+" entries",r);var o=H(t.decoder,r[a]);return"ok"===o.tag?o:S(a,o);case"key-value":if("object"!=typeof r||null===r||r instanceof Array)return A("an object",r);var l=M.Nil;for(var f in r){var o=H(t.decoder,r[f]);if("ok"!==o.tag)return j(f,o);var s=m.Tuple2(f,o.value);l=M.Cons(s,l)}return C(l);case"map-many":for(var _=t.func,d=t.decoders,n=0;n0&&e.push(S("p-thunk",n,f)));case"tagger":for(var s=t.tagger,_=r.tagger,d=!1,p=t.node;"tagger"===p.type;)d=!0,"object"!=typeof s?s=[s,p.tagger]:s.push(p.tagger),p=p.node;for(var h=r.node;"tagger"===h.type;)d=!0,"object"!=typeof _?_=[_,h.tagger]:_.push(h.tagger),h=h.node;return d&&s.length!==_.length?void e.push(S("p-redraw",n,r)):((d?j(s,_):s===_)||e.push(S("p-tagger",n,_)),void M(p,h,e,n+1));case"text":if(t.text!==r.text)return void e.push(S("p-text",n,r.text));return;case"node":if(t.tag!==r.tag||t.namespace!==r.namespace)return void e.push(S("p-redraw",n,r));var v=L(t.facts,r.facts);return void 0!==v&&e.push(S("p-facts",n,v)),void I(t,r,e,n);case"keyed-node":if(t.tag!==r.tag||t.namespace!==r.namespace)return void e.push(S("p-redraw",n,r));var v=L(t.facts,r.facts);return void 0!==v&&e.push(S("p-facts",n,v)),void P(t,r,e,n);case"custom":if(t.impl!==r.impl)return void e.push(S("p-redraw",n,r));var v=L(t.facts,r.facts);void 0!==v&&e.push(S("p-facts",n,v));var g=r.impl.diff(t,r);if(g)return void e.push(S("p-custom",n,g));return}}}function j(t,r){for(var e=0;eu?e.push(S("p-remove-last",n,i-u)):i0||i.length>0||void 0!==O)&&e.push(S("p-reorder",n,{patches:o,inserts:i,endInserts:O}))}function D(t,r,e,n,o,c){var i=t[e];if(void 0===i)return i={tag:"insert",vnode:n,index:o,data:void 0},c.push({index:o,entry:i}),void(t[e]=i);if("remove"===i.tag){c.push({index:o,entry:i}),i.tag="move";var u=[];return M(i.vnode,n,u,i.index),i.index=o,void(i.data.data={patches:u,entry:i})}D(t,r,e+vt,n,o,c)}function U(t,r,e,n,o){var c=t[e];if(void 0===c){var i=S("p-remove",o,void 0);return r.push(i),void(t[e]={tag:"remove",vnode:n,index:o,data:i})}if("insert"===c.tag){c.tag="move";var u=[];M(n,c.vnode,u,o);var i=S("p-remove",o,{patches:u,entry:c});return void r.push(i)}U(t,r,e+vt,n,o)}function J(t,r,e,n){H(t,r,e,0,0,r.descendantsCount,n)}function H(t,r,e,n,o,c,i){for(var u=e[n],a=u.index;a===o;){var l=u.type;if("p-thunk"===l)J(t,r.node,u.data,i);else if("p-reorder"===l){u.domNode=t,u.eventNode=i;var f=u.data.patches;f.length>0&&H(t,r,f,0,o,c,i)}else if("p-remove"===l){u.domNode=t,u.eventNode=i;var s=u.data;if(void 0!==s){s.entry.data=t;var f=s.patches;f.length>0&&H(t,r,f,0,o,c,i)}}else u.domNode=t,u.eventNode=i;if(n++,!(u=e[n])||(a=u.index)>c)return n}switch(r.type){case"tagger":for(var _=r.node;"tagger"===_.type;)_=_.node;return H(t,_,e,n,o+1,c,t.elm_event_node_ref);case"node":for(var d=r.children,p=t.childNodes,h=0;hc))return n;o=g}return n;case"keyed-node":for(var d=r.children,p=t.childNodes,h=0;hc))return n;o=g}return n;case"text":case"thunk":throw new Error("should never traverse `text` or `thunk` nodes like this")}}function W(t,r,e,n){return 0===e.length?t:(J(t,r,e,n),q(t,e))}function q(t,r){for(var e=0;e"),new Error(t)}function Z(t,r,e,n){r.embed=function(r,e){for(;r.lastChild;)r.removeChild(r.lastChild);return er.initialize(n(t.init,e,r),t.update,t.subscriptions,tt(r,t.view))},r.fullscreen=function(r){return er.initialize(n(t.init,r,document.body),t.update,t.subscriptions,tt(document.body,t.view))}}function tt(t,r){return function(e,n){var o={tagger:e,parent:void 0},c=r(n),i=B(c,o);return t.appendChild(i),rt(i,r,c,o)}}function rt(t,r,e,n){function o(){switch(i){case"NO_REQUEST":throw new Error("Unexpected draw callback.\nPlease report this to .");case"PENDING_REQUEST":bt(o),i="EXTRA_REQUEST";var e=r(c),a=A(u,e);return t=W(t,u,a,n),void(u=e);case"EXTRA_REQUEST":return void(i="NO_REQUEST")}}var c,i="NO_REQUEST",u=e;return function(t){"NO_REQUEST"===i&&bt(o),i="PENDING_REQUEST",c=t}}function et(t,r,e,n){r.fullscreen=function(r){var o={doc:void 0};return er.initialize(n(t.init,r,document.body),t.update(nt(o)),t.subscriptions,ot(e,document.body,o,t.view,t.viewIn,t.viewOut))},r.embed=function(r,o){var c={doc:void 0};return er.initialize(n(t.init,o,r),t.update(nt(c)),t.subscriptions,ot(e,r,c,t.view,t.viewIn,t.viewOut))}}function nt(t){return nr.nativeBinding(function(r){var e=t.doc;if(e){var n=e.getElementsByClassName("debugger-sidebar-messages")[0];n&&(n.scrollTop=n.scrollHeight)}r(nr.succeed(m.Tuple0))})}function ot(t,r,e,n,o,c){return function(i,u){var a={tagger:i,parent:void 0},l={tagger:i,parent:void 0},f=n(u),s=B(f,a);r.appendChild(s);var _=rt(s,n,f,a),d=o(u)._1,p=B(d,l);r.appendChild(p);var h=ut(a,p,o),v=rt(p,h,d,l),g=ct(u,c,l,r,t,e);return function(t){_(t),v(t),g(t)}}}function ct(t,r,e,n,o,c){var i,u;return function(t){if(t.isDebuggerOpen){if(!c.doc)return i=r(t),void(u=it(o,c,i,e));ht=c.doc;var n=r(t),a=A(i,n);u=W(u,i,a,e),i=n,ht=document}}}function it(t,r,e,n){function o(){r.doc=void 0,u.close()}var c=screen.width-900,i=screen.height-360,u=window.open("","","width=900,height=360,left="+c+",top="+i);ht=u.document,r.doc=ht,ht.title="Debugger - "+t,ht.body.style.margin="0",ht.body.style.padding="0";var a=B(e,n);return ht.body.appendChild(a),ht.addEventListener("keydown",function(t){t.metaKey&&82===t.which&&window.location.reload(),38===t.which&&(n.tagger({ctor:"Up"}),t.preventDefault()),40===t.which&&(n.tagger({ctor:"Down"}),t.preventDefault())}),window.addEventListener("unload",o),u.addEventListener("unload",function(){r.doc=void 0,window.removeEventListener("unload",o),n.tagger({ctor:"Close"})}),ht=document,a}function ut(t,r,e){var n,o=ft(r),c="Normal",i=t.tagger,u=function(){};return function(r){var a=e(r),l=a._0.ctor;return t.tagger="Normal"===l?i:u,c!==l&&(at("removeEventListener",o,c),at("addEventListener",o,l),"Normal"===c&&(n=document.body.style.overflow,document.body.style.overflow="hidden"),"Normal"===l&&(document.body.style.overflow=n),c=l),a._1}}function at(t,r,e){switch(e){case"Normal":return;case"Pause":return lt(t,r,yt);case"Message":return lt(t,r,kt)}}function lt(t,r,e){for(var n=0;n"]=e(function(t,r){return _(kr,function(t){return r},t)});var he=Br(jt),ve=e(function(t,r){var e=r;return O("Nothing"===e.ctor?{ctor:"::",_0:t,_1:{ctor:"[]"}}:{ctor:"::",_0:t,_1:e._0})}),ge=e(function(t,r){for(;;){var e=t;if("[]"===e.ctor)return r;var n=e._1,o=d(Gt,e._0._0,ve(e._0._1),r);t=n,r=o}}),me=function(t){return _(ge,t,jt)},be=_(Gr,"keyCode",Xr),ye=er.leaf("Keyboard"),ke=e(function(t,r){return{taggers:t,pid:r}}),we=e(function(t,r){return{category:t,keyCode:r}}),Te=c(function(t,r,e){var n=c(function(r,e,n){return _(kr,function(n){return _(kr,function(t){return Br(d(Xt,r,_(ke,e,t),n))},Zr(d(re,r,be,function(e){return _(lr,t,_(we,r,e))})))},n)}),o=i(function(t,r,e,n){return _(Nr,_(Xt,t,_(ke,e,r.pid)),n)}),u=c(function(t,r,e){var n=r;return _(pe["&>"],Yr(n.pid),e)});return v(gt,u,o,n,e,me(r),Br(jt))}),Be=e(function(t,r){return{ctor:"MySub",_0:t,_1:r}}),Ne=function(t){return ye(_(Be,"keydown",t))},Ee=e(function(t,r){var e=r;return _(Be,e._0,function(r){return t(e._1(r))})});er.effectManagers.Keyboard={pkg:"elm-lang/keyboard",init:he,onEffects:Te,onSelfMsg:de,tag:"sub",subMap:Ee};var xe=e(function(t,r){return d(Xt,t.id,t,r)}),Re=function(t){var r=t;return"WeaponComponent"===r.ctor?r._0:0},Ce=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Weapon"===r._0.ctor?r._0._0:0},Oe=function(t){var r=t;return"HealthComponent"===r.ctor?r._0:0},Ae=function(t){var r=t;return"MoniesCollectedComponent"===r.ctor?r._0:0},Se=e(function(t,r){return m.update(t,{components:r})}),Me=e(function(t,r){return _(Yt,e(function(r,e){return!_(J,r,t)}),r)}),je=function(t){return dt(t)},Le=function(t){return _(Se,t,_(z,function(t){return"MoniesCollectedComponent"!==t.ctor},t.components))},Ie=function(t){return _(Se,t,_(z,function(t){return"WeaponComponent"!==t.ctor},t.components))},Pe=function(t){return _(Se,t,_(z,function(t){return"HealthComponent"!==t.ctor},t.components))},De=function(t){return U(_(F,Oe,t.components))},Ue=function(t){return U(_(F,Ae,t.components))},Je=function(t){return U(_(F,Re,t.components))},He=function(t){return U(_(F,Ce,t.components))},We=function(t){return W(_($,function(t){var r=t;return"TransformComponent"===r.ctor?O(r._0):R},t.components))},qe=function(t){return"TransformComponent"===t.ctor},Fe=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Coin"===r._0.ctor},ze=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Enemy"===r._0.ctor},Ke=function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Weapon"===r._0.ctor},$e=function(t){return!H(_(z,ze,t.components))},Qe=function(t){return d(_t,c(function(t,r,e){return $e(r)?e+1:e}),0,t)},Ve=function(t){return!H(_(z,Fe,t.components))},Ge=function(t){return d(_t,c(function(t,r,e){return Ve(r)?e+1:e}),0,t)},Xe=function(t){return!H(_(z,Ke,t.components))},Ye=function(t){return d(_t,c(function(t,r,e){return Xe(r)&&m.cmp(He(r),e)>0?He(r):e}),0,t)},Ze=e(function(t,r){return _(Yt,e(function(r,e){return _(x,!1,_(C,function(r){return O(m.eq(r,t))},We(e)))}),r)}),tn=function(t){return!H(_(z,function(t){var r=t;return"ObjectTypeComponent"===r.ctor&&"Player"===r._0.ctor},t.components))},rn=function(t){return _(A,rr,W(ht(_(Yt,e(function(t,r){return tn(r)}),t))))},en=function(t){var r=rn(t.actors);return"Just"===r.ctor?d(I,e(function(t,r){return t+r}),0,_(F,Ae,r._0.components)):0},nn=function(t){var r=rn(t.actors);return"Just"===r.ctor?d(I,e(function(t,r){return t+r}),0,_(F,Oe,r._0.components)):0},on=function(t){var r=rn(t.actors);return"Just"===r.ctor?d(I,e(function(t,r){return t+r}),0,_(F,Re,r._0.components)):0},cn=e(function(t,r){return _(A,rr,W(ht(_(Yt,e(function(r,e){return m.eq(e.id,t)}),r))))}),un=function(t){return _(_e,{ctor:"[]"},{ctor:"::",_0:_(_e,{ctor:"[]"},_(F,function(r){return _(_e,{ctor:"[]"},_(F,function(e){return _(x,fe("[ ]"),_(C,function(t){var r=t;return O(fe(_(w["++"],"[",_(w["++"],T(r._0.id),"]"))))},W(_(z,function(t){var n=t,o=n._1;return m.eq(o.x,e)&&m.eq(o.y,r)},mr(G(_(F,function(t){var r=t,e=r._1;return _(F,function(t){var r=t;return"TransformComponent"===r.ctor?O({ctor:"_Tuple2",_0:e,_1:r._0}):R},e.components)},ht(t.actors))))))))},_(nt,0,4)))},_(nt,0,4))),_1:{ctor:"::",_0:_(_e,{ctor:"[]"},{ctor:"::",_0:fe(_(w["++"],"Monies : ",_(w["++"],T(en(t)),"!"))),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(_e,{ctor:"[]"},{ctor:"::",_0:fe(_(w["++"],"Current health : ",_(w["++"],T(nn(t)),"!"))),_1:{ctor:"[]"}}),_1:{ctor:"::",_0:_(_e,{ctor:"[]"},{ctor:"::",_0:fe(_(w["++"],"Weapon durability : ",_(w["++"],T(on(t)),"!"))),_1:{ctor:"[]"}}),_1:{ctor:"[]"}}}}})},an=(e(function(t,r){return{x:t,y:r}}),e(function(t,r){return{id:t,components:r}}),function(t){return{ctor:"Weapon",_0:t}}),ln={ctor:"Coin"},fn={ctor:"Enemy"},sn={ctor:"Player"},_n=function(t){return{ctor:"ObjectTypeComponent",_0:t}},dn=function(t){return{ctor:"WeaponComponent",_0:t}},pn=c(function(t,r,e){return m.cmp(t,r)>0?_(Se,e,{ctor:"::",_0:dn(t),_1:e.components}):_(Se,e,{ctor:"::",_0:dn(r),_1:e.components})}),hn=c(function(t,r,e){return d(b,xe,e,d(pn,Je(t),r,Ie(t)))}),vn=c(function(t,r,e){return d(hn,t,Ye(e),_(Me,je(e),r))}),gn=e(function(t,r){var e=_(cn,t,r);if("Just"===e.ctor){var n=e._0;return d(vn,n,r,d(I,xe,jt,_(z,Xe,_(X,function(t){return pt(_(Ze,t,r))},_($,We,_(z,tn,{ctor:"::",_0:n,_1:{ctor:"[]"}}))))))}return r}),mn=function(t){return{ctor:"HealthComponent",_0:t}},bn=c(function(t,r,e){return _(Se,e,{ctor:"::",_0:mn(t-r),_1:e.components})}),yn=c(function(t,r,e){return d(b,xe,e,d(bn,De(t),r,Pe(t)))}),kn=c(function(t,r,e){return d(yn,t,Qe(e),_(Me,je(e),r))}),wn=e(function(t,r){var e=_(cn,t,r);if("Just"===e.ctor){var n=e._0;return d(kn,n,r,d(I,xe,jt,_(z,$e,_(X,function(t){return pt(_(Ze,t,r))},_($,We,_(z,tn,{ctor:"::",_0:n,_1:{ctor:"[]"}}))))))}return r}),Tn=function(t){return{ctor:"MoniesCollectedComponent",_0:t}},Bn=c(function(t,r,e){return _(Se,e,{ctor:"::",_0:Tn(t+r),_1:e.components})}),Nn=c(function(t,r,e){return d(b,xe,e,d(Bn,Ue(t),r,Le(t)))}),En=c(function(t,r,e){return d(Nn,t,Ge(e),_(Me,je(e),r))}),xn=e(function(t,r){var e=_(cn,t,r);if("Just"===e.ctor){var n=e._0;return d(En,n,r,d(I,xe,jt,_(z,Ve,_(X,function(t){return pt(_(Ze,t,r))},_($,We,_(z,tn,{ctor:"::",_0:n,_1:{ctor:"[]"}}))))))}return r}),Rn={ctor:"KeyboardComponent"},Cn=function(t){return{ctor:"TransformComponent",_0:t}},On=_(ir["!"],{actors:Zt({ctor:"::",_0:{ctor:"_Tuple2",_0:1,_1:{id:1,components:{ctor:"::",_0:Cn({x:1,y:2}),_1:{ctor:"::",_0:Rn,_1:{ctor:"::",_0:_n(sn),_1:{ctor:"::",_0:Tn(0),_1:{ctor:"::",_0:mn(10),_1:{ctor:"::",_0:dn(0),_1:{ctor:"[]"}}}}}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:2,_1:{id:2,components:{ctor:"::",_0:Cn({x:1,y:1}),_1:{ctor:"::",_0:_n(fn),_1:{ctor:"[]"}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:3,_1:{id:3,components:{ctor:"::",_0:Cn({x:0,y:0}),_1:{ctor:"::",_0:_n(ln),_1:{ctor:"[]"}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:4,_1:{id:4,components:{ctor:"::",_0:Cn({x:2,y:2}),_1:{ctor:"::",_0:_n(an(5)),_1:{ctor:"[]"}}}}},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:5,_1:{id:5,components:{ctor:"::",_0:Cn({x:0,y:2}),_1:{ctor:"::",_0:_n(an(1)),_1:{ctor:"[]"}}}}},_1:{ctor:"[]"}}}}}})},{ctor:"[]"}),An={ctor:"DownArrow"},Sn={ctor:"RightArrow"},Mn={ctor:"UpArrow"},jn={ctor:"LeftArrow"},Ln=Zt({ctor:"::",_0:{ctor:"_Tuple2",_0:37,_1:jn},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:39,_1:Sn},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:40,_1:An},_1:{ctor:"::",_0:{ctor:"_Tuple2",_0:38,_1:Mn},_1:{ctor:"[]"}}}}}),In=e(function(t,r){var e=_(kt,t,Ln);if("Just"!==e.ctor)return r;switch(e._0.ctor){case"LeftArrow":return{x:_(B,0,r.x-1),y:r.y};case"RightArrow":return{x:_(N,4,r.x+1),y:r.y};case"UpArrow":return{x:r.x,y:_(B,0,r.y-1)};default:return{x:r.x,y:_(N,4,r.y+1)}}}),Pn=c(function(t,r,e){return _(x,e,_(C,function(t){return O(d(Xt,t.id,t,e))},_(C,function(t){var e=_(z,function(t){return!qe(t)},r.components);return O(m.update(r,{components:{ctor:"::",_0:Cn(t),_1:e}}))},_(C,function(r){return O(_(In,t,r))},We(r)))))}),Dn=e(function(t,r){return d(I,e(function(r,n){var o=r,c=o._0,i=o._1;return d(I,e(function(r,e){return"KeyboardComponent"===r.ctor?_(gn,c,_(xn,c,_(wn,c,d(Pn,t,i,e)))):e}),n,i.components)}),r,ht(r))}),Un=e(function(t,r){var e=t;return _(ir["!"],m.update(r,{actors:_(Dn,e._0,r.actors)}),{ctor:"[]"})}),Jn=function(t){return{ctor:"KeyPressed",_0:t}},Hn=function(t){return Ne(Jn)},Wn=le({init:On,update:Un,view:un,subscriptions:Hn})(),qn={};qn.Main=qn.Main||{},void 0!==Wn&&Wn(qn.Main,"Main",void 0);var Fn=function(){};return function(r){function e(){return++s}function n(t,r){var e=[];for(var o in t){var c=t[o],i=r?r+"."+o:o;"fullscreen"in c?e.push({path:i,module:c}):e=e.concat(n(c,i))}return e}function o(t,r){for(var e=r.split("."),n=t,o=0;o