!function(){"use strict";functionn(n,e){returnt(document.createElement("canvas"),n,e)}functione(n){returnn.getContext("2d")}functiont(n,e,t){returnn.width=e,n.height=t,n}functionr(n){returnnewtf(function(e,t){functionr(){a(),e(u)}functiono(){a(),t("Unable to load data of type "+n.type+": "+i)}vari=URL.createObjectURL(n),u=newImage,a=function(){u.removeEventListener("load",r),u.removeEventListener("error",o)};u.addEventListener("load",r),u.addEventListener("error",o),u.src=i,u.complete&&r()})}functiono(n){returnnewtf(function(e){vart=newXMLHttpRequest;t.open("GET",n,!0),t.responseType="blob",t.onload=function(){200==this.status&&e(this.response)},t.send()})}functioni(n){vare=n.split(","),t=/data:([^;]+)/.exec(e[0]);if(!t)returnp.none();for(varr=t[1],o=e[1],i=af.atob(o),u=i.length,a=Math.ceil(u/1024),c=newArray(a),s=0;s<a;++s){for(varf=1024*s,l=Math.min(f+1024,u),d=newArray(l-f),m=f,g=0;m<l;++g,++m)d[g]=i[m].charCodeAt(0);c[s]=uf(d)}returnp.some(rf(c,{type:r}))}functionu(n){returnnewtf(function(e,t){i(n).fold(function(){t("uri is not base64: "+n)},e)})}functiona(n){returnnewtf(function(e){vart=newof;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})}varc=function(n){returnfunction(){returnn}},s={noop:function(){},noarg:function(n){returnfunction(){returnn()}},compose:function(n,e){returnfunction(){returnn(e.apply(null,arguments))}},constant:c,identity:function(n){returnn},tripleEquals:function(n,e){returnn===e},curry:function(n){for(vare=newArray(arguments.length-1),t=1;t<arguments.length;t++)e[t-1]=arguments[t];returnfunction(){for(vart=newArray(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];varo=e.concat(t);returnn.apply(null,o)}},not:function(n){returnfunction(){return!n.apply(null,arguments)}},die:function(n){returnfunction(){thrownewError(n)}},apply:function(n){returnn()},call:function(n){n()},never:c(!1),always:c(!0)},f=s.never,l=s.always,d=function(){returnm},m=function(){varn=function(n){returnn.isNone()},e=function(n){returnn()},t=function(n){returnn},r={fold:function(n,e){returnn()},is:f,isSome:f,isNone:l,getOr:t,getOrThunk:e,getOrDie:function(n){thrownewError(n||"error: getOrDie called on none.")},or:t,orThunk:e,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:f,forall:l,filter:d,equals:n,equals_:n,toArray:function(){return[]},toString:s.constant("none()")};returnObject.freeze&&Object.freeze(r),r}(),g=function(n){vare=function(){returnn},t=function(){returno},r=function(e){returne(n)},o={fold:function(e,t){returnt(n)},is:function(e){returnn===e},isSome:l,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,or:t,orThunk:t,map:function(e){returng(e(n))},ap:function(e){returne.fold(d,function(e){returng(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){returne(n)?o:m},equals:function(e){returne.is(n)},equals_:function(e,t){returne.fold(f,function(e){returnt(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};returno},p={some:g,none:d,from:function(n){returnnull===n||n===undefined?m:g(n)}},h=function(){varn=Array.prototype.indexOf;returnn===undefined?function(n,e){returnT(n,e)}:function(e,t){returnn.call(e,t)}}(),v=function(n,e){returnh(n,e)>-1},y=function(n,e){for(vart=n.length,r=newArray(t),o=0;o<t;o++){vari=n[o];r[o]=e(i,o,n)}returnr},b=function(n,e){for(vart=0,r=n.length;t<r;t++){e(n[t],t,n)}},w=function(n,e){for(vart=n.length-1;t>=0;t--){e(n[t],t,n)}},S=function(n,e){for(vart=[],r=0,o=n.length;r<o;r++){vari=n[r];e(i,r,n)&&t.push(i)}returnt},x=function(n,e){for(vart=0,r=n.length;t<r;t++){if(e(n[t],t,n))returnp.some(t)}returnp.none()},T=function(n,e){for(vart=0,r=n.length;t<r;++t)if(n[t]===e)returnt;return-1},O=Array.prototype.push,k=function(n){for(vare=[],t=0,r=n.length;t<r;++t){if(!Array.prototype.isPrototypeOf(n[t]))thrownewError("Arr.flatten item "+t+" was not an array, input: "+n);O.apply(e,n[t])}returne},C=function(n,e){for(vart=0,r=n.length;t<r;++t){if(!0!==e(n[t],t,n))return!1}return!0},E=Array.prototype.slice,D={map:y,each:b,eachr:w