/*! holder - client side image placeholders version 2.9.2+30qun © 2016 ivan malopinsky - http://imsky.co site: http://holderjs.com issues: https://github.com/imsky/holder/issues license: mit */ !function(t){if(t.document){var e=t.document;e.queryselectorall||(e.queryselectorall=function(r){var n,i=e.createelement("style"),o=[];for(e.documentelement.firstchild.appendchild(i),e._qsa=[],i.stylesheet.csstext=r+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",t.scrollby(0,0),i.parentnode.removechild(i);e._qsa.length;)n=e._qsa.shift(),n.style.removeattribute("x-qsa"),o.push(n);return e._qsa=null,o}),e.queryselector||(e.queryselector=function(t){var r=e.queryselectorall(t);return r.length?r[0]:null}),e.getelementsbyclassname||(e.getelementsbyclassname=function(t){return t=string(t).replace(/^|\s+/g,"."),e.queryselectorall(t)}),object.keys||(object.keys=function(t){if(t!==object(t))throw typeerror("object.keys called on non-object");var e,r=[];for(e in t)object.prototype.hasownproperty.call(t,e)&&r.push(e);return r}),array.prototype.foreach||(array.prototype.foreach=function(t){if(void 0===this||null===this)throw typeerror();var e=object(this),r=e.length>>>0;if("function"!=typeof t)throw typeerror();var n,i=arguments[1];for(n=0;r>n;n++)n in e&&t.call(i,e[n],n,e)}),function(t){var e="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/=";t.atob=t.atob||function(t){t=string(t);var r,n=0,i=[],o=0,a=0;if(t=t.replace(/\s/g,""),t.length%4===0&&(t=t.replace(/=+$/,"")),t.length%4===1)throw error("invalidcharactererror");if(/[^+\/0-9a-za-z]/.test(t))throw error("invalidcharactererror");for(;n>16&255)),i.push(string.fromcharcode(o>>8&255)),i.push(string.fromcharcode(255&o)),a=0,o=0),n+=1;return 12===a?(o>>=4,i.push(string.fromcharcode(255&o))):18===a&&(o>>=2,i.push(string.fromcharcode(o>>8&255)),i.push(string.fromcharcode(255&o))),i.join("")},t.btoa=t.btoa||function(t){t=string(t);var r,n,i,o,a,s,l,h=0,u=[];if(/[^\x00-\xff]/.test(t))throw error("invalidcharactererror");for(;h>2,a=(3&r)<<4|n>>4,s=(15&n)<<2|i>>6,l=63&i,h===t.length+2?(s=64,l=64):h===t.length+1&&(l=64),u.push(e.charat(o),e.charat(a),e.charat(s),e.charat(l));return u.join("")}}(t),object.prototype.hasownproperty||(object.prototype.hasownproperty=function(t){var e=this.__proto__||this.constructor.prototype;return t in this&&(!(t in e)||e[t]!==this[t])}),function(){if("performance"in t==!1&&(t.performance={}),date.now=date.now||function(){return(new date).gettime()},"now"in t.performance==!1){var e=date.now();performance.timing&&performance.timing.navigationstart&&(e=performance.timing.navigationstart),t.performance.now=function(){return date.now()-e}}}(),t.requestanimationframe||(t.webkitrequestanimationframe&&t.webkitcancelanimationframe?!function(t){t.requestanimationframe=function(e){return webkitrequestanimationframe(function(){e(t.performance.now())})},t.cancelanimationframe=t.webkitcancelanimationframe}(t):t.mozrequestanimationframe&&t.mozcancelanimationframe?!function(t){t.requestanimationframe=function(e){return mozrequestanimationframe(function(){e(t.performance.now())})},t.cancelanimationframe=t.mozcancelanimationframe}(t):!function(t){t.requestanimationframe=function(e){return t.settimeout(e,1e3/60)},t.cancelanimationframe=t.cleartimeout}(t))}}(this),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.holder=e():t.holder=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){(function(e){function n(t,e,r,n){var a=i(r.substr(r.lastindexof(t.domain)),t);a&&o({mode:null,el:n,flags:a,enginesettings:e})}function i(t,e){var r={theme:t(u.settings.themes.gray,null),stylesheets:e.stylesheets,instanceoptions:e},n=t.indexof("?"),i=[t];-1!==n&&(i=[t.slice(0,n),t.slice(n+1)]);var o=i[0].split("/");r.holderurl=t;var a=o[1],s=a.match(/([\d]+p?)x([\d]+p?)/);if(!s)return!1;if(r.fluid=-1!==a.indexof("p"),r.dimensions={width:s[1].replace("p","%"),height:s[2].replace("p","%")},2===i.length){var l=v.parse(i[1]);if(l.bg&&(r.theme.bg=w.parsecolor(l.bg)),l.fg&&(r.theme.fg=w.parsecolor(l.fg)),l.bg&&!l.fg&&(r.autofg=!0),l.theme&&r.instanceoptions.themes.hasownproperty(l.theme)&&(r.theme=t(r.instanceoptions.themes[l.theme],null)),l.text&&(r.text=l.text),l.textmode&&(r.textmode=l.textmode),l.size&&(r.size=l.size),l.font&&(r.font=l.font),l.align&&(r.align=l.align),l.linewrap&&(r.linewrap=l.linewrap),r.nowrap=w.truthy(l.nowrap),r.auto=w.truthy(l.auto),r.outline=w.truthy(l.outline),w.truthy(l.random)){u.vars.cache.themekeys=u.vars.cache.themekeys||object.keys(r.instanceoptions.themes);var h=u.vars.cache.themekeys[0|math.random()*u.vars.cache.themekeys.length];r.theme=t(r.instanceoptions.themes[h],null)}}return r}function o(t){var e=t.mode,r=t.el,n=t.flags,i=t.enginesettings,o=n.dimensions,s=n.theme,l=o.width+"x"+o.height;e=null==e?n.fluid?"fluid":"image":e;var f=/holder_([a-z]+)/g,c=!1;if(null!=n.text&&(s.text=n.text,"object"===r.nodename.tolowercase())){for(var d=s.text.split("\\n"),p=0;p1){var b,e=0,x=0,s=0;w=new s.group("line"+s),("left"===t.align||"right"===t.align)&&(o=t.width*(1-2*(1-n)));for(var i=0;i=o||b===!0)&&(e(g,w,e,g.properties.leading),g.add(w),e=0,x+=g.properties.leading,s+=1,w=new s.group("line"+s),w.y=x),b!==!0&&(v.moveto(e,0),e+=m.spacewidth+t.width,w.add(v))}if(e(g,w,e,g.properties.leading),g.add(w),"left"===t.align)g.moveto(t.width-i,null,null);else if("right"===t.align){for(b in g.children)w=g.children[b],w.moveto(t.width-w.width,null,null);g.moveto(0-(t.width-i),null,null)}else{for(b in g.children)w=g.children[b],w.moveto((g.width-w.width)/2,null,null);g.moveto((t.width-g.width)/2,null,null)}g.moveto(null,(t.height-g.height)/2,null),(t.height-g.height)/2<0&&g.moveto(null,0,null)}else v=new s.text(t.text),w=new s.group("line0"),w.add(v),g.add(w),"left"===t.align?g.moveto(t.width-i,null,null):"right"===t.align?g.moveto(0-(t.width-i),null,null):g.moveto((t.width-m.boundingbox.width)/2,null,null),g.moveto(null,(t.height-m.boundingbox.height)/2,null);return a}function l(t,e,r,n){var i=parseint(t,10),o=parseint(e,10),a=math.max(i,o),s=math.min(i,o),l=.8*math.min(s,a*n);return math.round(math.max(r,l))}function h(t){var e;e=null==t||null==t.nodetype?u.vars.resizableimages:[t];for(var r=0,n=e.length;n>r;r++){var i=e[r];if(i.holderdata){var o=i.holderdata.flags,s=b(i);if(s){if(!i.holderdata.resizeupdate)continue;if(o.fluid&&o.auto){var l=i.holderdata.fluidconfig;switch(l.mode){case"width":s.height=s.width/l.ratio;break;case"height":s.width=s.height*l.ratio}}var h={mode:"image",holdersettings:{dimensions:s,theme:o.theme,flags:o},el:i,enginesettings:i.holderdata.enginesettings};"exact"==o.textmode&&(o.exactdimensions=s,h.holdersettings.dimensions=o.dimensions),a(h)}else d(i)}}}function u(t){if(t.holderdata){var e=b(t);if(e){var r=t.holderdata.flags,n={fluidheight:"%"==r.dimensions.height.slice(-1),fluidwidth:"%"==r.dimensions.width.slice(-1),mode:null,initialdimensions:e};n.fluidwidth&&!n.fluidheight?(n.mode="width",n.ratio=n.initialdimensions.width/parsefloat(r.dimensions.height)):!n.fluidwidth&&n.fluidheight&&(n.mode="height",n.ratio=parsefloat(r.dimensions.width)/n.initialdimensions.height),t.holderdata.fluidconfig=n}else d(t)}}function f(){var t,r=[],n=object.keys(u.vars.invisibleimages);n.foreach(function(e){t=u.vars.invisibleimages[e],b(t)&&"img"==t.nodename.tolowercase()&&(r.push(t),delete u.vars.invisibleimages[e])}),r.length&&c.run({images:r}),settimeout(function(){e.requestanimationframe(f)},10)}function c(){u.vars.visibilitycheckstarted||(e.requestanimationframe(f),u.vars.visibilitycheckstarted=!0)}function d(t){t.holderdata.invisibleid||(u.vars.invisibleid+=1,u.vars.invisibleimages["i"+u.vars.invisibleid]=t,t.holderdata.invisibleid=u.vars.invisibleid)}function p(t){u.vars.debouncetimer||t.call(this),u.vars.debouncetimer&&e.cleartimeout(u.vars.debouncetimer),u.vars.debouncetimer=e.settimeout(function(){u.vars.debouncetimer=null,t.call(this)},u.setup.debounce)}function g(){p(function(){h(null)})}var m=r(2),v=r(3),y=r(10),w=r(11),b=r(12),e=r(13),a=r(14),x=r(15),s=r(16),i=r(19),t=w.extend,b=w.dimensioncheck,r=x.svg_ns,c={version:x.version,addtheme:function(t,e){return null!=t&&null!=e&&(u.settings.themes[t]=e),delete u.vars.cache.themekeys,this},addimage:function(t,e){var r=e.getnodearray(e);return r.foreach(function(e){var r=e.newel("img"),n={};n[u.setup.dataattr]=t,e.setattr(r,n),e.appendchild(r)}),this},setresizeupdate:function(t,e){t.holderdata&&(t.holderdata.resizeupdate=!!e,t.holderdata.resizeupdate&&h(t))},run:function(t){t=t||{};var r={},a=t(u.settings,t);u.vars.preempted=!0,u.vars.dataattr=a.dataattr||u.setup.dataattr,r.renderer=a.renderer?a.renderer:u.setup.renderer,-1===u.setup.renderers.join(",").indexof(r.renderer)&&(r.renderer=u.setup.supportssvg?"svg":u.setup.supportscanvas?"canvas":"html");var s=e.getnodearray(a.images),l=e.getnodearray(a.bgnodes),h=e.getnodearray(a.stylenodes),u=e.getnodearray(a.objects);return r.stylesheets=[],r.svgxmlstylesheet=!0,r.nofontfallback=a.nofontfallback?a.nofontfallback:!1,h.foreach(function(t){if(t.attributes.rel&&t.attributes.href&&"stylesheet"==t.attributes.rel.value){var e=t.attributes.href.value,n=e.newel("a");n.href=e;var i=n.protocol+"//"+n.host+n.pathname+n.search;r.stylesheets.push(i)}}),l.foreach(function(t){if(e.getcomputedstyle){var n=e.getcomputedstyle(t,null).getpropertyvalue("background-image"),s=t.getattribute("data-background-src"),l=s||n,h=null,u=a.domain+"/",f=l.indexof(u);if(0===f)h=l;else if(1===f&&"?"===l[0])h=l.slice(1);else{var c=l.substr(f).match(/([^\"]*)"?\)/);if(null!==c)h=c[1];else if(0===l.indexof("url("))throw"holder: unable to parse background url: "+l}if(null!=h){var d=i(h,a);d&&o({mode:"background",el:t,flags:d,enginesettings:r})}}}),u.foreach(function(t){var e={};try{e.data=t.getattribute("data"),e.datasrc=t.getattribute(u.vars.dataattr)}catch(i){}var o=null!=e.data&&0===e.data.indexof(a.domain),s=null!=e.datasrc&&0===e.datasrc.indexof(a.domain);o?n(a,r,e.data,t):s&&n(a,r,e.datasrc,t)}),s.foreach(function(t){var e={};try{e.src=t.getattribute("src"),e.datasrc=t.getattribute(u.vars.dataattr),e.rendered=t.getattribute("data-holder-rendered")}catch(i){}var o=null!=e.src,s=null!=e.datasrc&&0===e.datasrc.indexof(a.domain),l=null!=e.rendered&&"true"==e.rendered;o?0===e.src.indexof(a.domain)?n(a,r,e.src,t):s&&(l?n(a,r,e.datasrc,t):!function(t,e,r,i,o){w.imageexists(t,function(t){t||n(e,r,i,o)})}(e.src,a,r,e.datasrc,t)):s&&n(a,r,e.datasrc,t)}),this}},u={settings:{domain:"holder.js",images:"img",objects:"object",bgnodes:"body .holderjs",stylenodes:"head link.holderjs",themes:{gray:{bg:"#eeeeee",fg:"#aaaaaa"},social:{bg:"#3a5a97",fg:"#ffffff"},industrial:{bg:"#434a52",fg:"#c2f200"},sky:{bg:"#0d8fdb",fg:"#ffffff"},vine:{bg:"#39dbac",fg:"#1e292c"},lava:{bg:"#f8591a",fg:"#1c2846"}}},defaults:{size:10,units:"pt",scale:1/16}},l=function(){var t=null,e=null,r=null;return function(n){var i=n.root;if(u.setup.supportssvg){var o=!1,a=function(t){return document.createtextnode(t)};(null==t||t.parentnode!==document.body)&&(o=!0),t=b.initsvg(t,i.properties.width,i.properties.height),t.style.display="block",o&&(e=e.newel("text",r),r=a(null),e.setattr(e,{x:0}),e.appendchild(r),t.appendchild(e),document.body.appendchild(t),t.style.visibility="hidden",t.style.position="absolute",t.style.top="-100%",t.style.left="-100%");var s=i.children.holdertextgroup,l=s.properties;e.setattr(e,{y:l.font.size,style:w.cssprops({"font-weight":l.font.weight,"font-size":l.font.size+l.font.units,"font-family":l.font.family})}),r.nodevalue=l.text;var h=e.getbbox(),u=math.ceil(h.width/i.properties.width),f=l.text.split(" "),c=l.text.match(/\\n/g);u+=null==c?0:c.length,r.nodevalue=l.text.replace(/[ ]+/g,"");var d=e.getcomputedtextlength(),p=h.width-d,g=math.round(p/math.max(1,f.length-1)),m=[];if(u>1){r.nodevalue="";for(var v=0;v=0?e:1)}function o(t){e?i(t):a.push(t)}null==document.readystate&&document.addeventlistener&&(document.addeventlistener("domcontentloaded",function s(){document.removeeventlistener("domcontentloaded",s,!1),document.readystate="complete"},!1),document.readystate="loading");var a=t.document,s=a.documentelement,l="load",h=!1,u="on"+l,f="complete",c="readystate",d="attachevent",p="detachevent",g="addeventlistener",m="domcontentloaded",v="onreadystatechange",y="removeeventlistener",w=g in a,b=h,e=h,a=[];if(a[c]===f)i(e);else if(w)a[g](m,r,h),t[g](l,r,h);else{a[d](v,r),t[d](u,r);try{b=null==t.frameelement&&s}catch(x){}b&&b.doscroll&&!function i(){if(!e){try{b.doscroll("left")}catch(t){return i(i,50)}n(),e()}}()}return o.version="1.4.0",o.isready=function(){return e},o}t.exports="undefined"!=typeof window&&r(window)},function(t,e,r){var n=encodeuricomponent,i=decodeuricomponent,o=r(4),a=r(5),s=/(\w+)\[(\d+)\]/,l=/\w+\.\w+/;e.parse=function(t){if("string"!=typeof t)return{};if(t=o(t),""===t)return{};"?"===t.charat(0)&&(t=t.slice(1));for(var e={},r=t.split("&"),n=0;n1?arguments[1]:"utf8"):l(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function a(e,r){if(e=g(e,0>r?0:0|m(r)),!t.typed_array_support)for(var n=0;r>n;n++)e[n]=0;return e}function s(t,e,r){("string"!=typeof r||""===r)&&(r="utf8");var n=0|y(e,r);return t=g(t,n),t.write(e,r),t}function l(e,r){if(t.isbuffer(r))return h(e,r);if(j(r))return u(e,r);if(null==r)throw new typeerror("must start with number, buffer, array or string");if("undefined"!=typeof arraybuffer){if(r.buffer instanceof arraybuffer)return f(e,r);if(r instanceof arraybuffer)return c(e,r)}return r.length?d(e,r):p(e,r)}function h(t,e){var r=0|m(e.length);return t=g(t,r),e.copy(t,0,0,r),t}function u(t,e){var r=0|m(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(t,e){var r=0|m(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function c(e,r){return t.typed_array_support?(r.bytelength,e=t._augment(new uint8array(r))):e=f(e,new uint8array(r)),e}function d(t,e){var r=0|m(e.length);t=g(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function p(t,e){var r,n=0;"buffer"===e.type&&j(e.data)&&(r=e.data,n=0|m(r.length)),t=g(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function g(e,r){t.typed_array_support?(e=t._augment(new uint8array(r)),e.__proto__=t.prototype):(e.length=r,e._isbuffer=!0);var n=0!==r&&r<=t.poolsize>>>1;return n&&(e.parent=k),e}function m(t){if(t>=o())throw new rangeerror("attempt to allocate buffer larger than maximum size: 0x"+o().tostring(16)+" bytes");return 0|t}function v(e,r){if(!(this instanceof v))return new v(e,r);var n=new t(e,r);return delete n.parent,n}function y(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return v(t).length;default:if(n)return q(t).length;e=(""+e).tolowercase(),n=!0}}function w(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return l(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return c(this,e,r);case"binary":return u(this,e,r);case"base64":return t(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p(this,e,r);default:if(n)throw new typeerror("unknown encoding: "+t);t=(t+"").tolowercase(),n=!0}}function b(t,e,r,n){r=number(r)||0;var i=t.length-r;n?(n=number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new error("invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var s=parseint(e.substr(2*a,2),16);if(isnan(s))throw new error("invalid hex string");t[r+a]=s}return a}function e(t,e,r,n){return w(q(e,t.length-r),t,r,n)}function a(t,e,r,n){return w(h(e),t,r,n)}function x(t,e,r,n){return a(t,e,r,n)}function s(t,e,r,n){return w(v(e),t,r,n)}function i(t,e,r,n){return w(g(e,t.length-r),t,r,n)}function t(t,e,r){return 0===e&&r===t.length?$.frombytearray(t):$.frombytearray(t.slice(e,r))}function b(t,e,r){r=math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(r>=i+s){var l,h,u,f;switch(s){case 1:128>o&&(a=o);break;case 2:l=t[i+1],128===(192&l)&&(f=(31&o)<<6|63&l,f>127&&(a=f));break;case 3:l=t[i+1],h=t[i+2],128===(192&l)&&128===(192&h)&&(f=(15&o)<<12|(63&l)<<6|63&h,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:l=t[i+1],h=t[i+2],u=t[i+3],128===(192&l)&&128===(192&h)&&128===(192&u)&&(f=(15&o)<<18|(63&l)<<12|(63&h)<<6|63&u,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return r(n)}function r(t){var e=t.length;if(z>=e)return string.fromcharcode.apply(string,t);for(var r="",n=0;e>n;)r+=string.fromcharcode.apply(string,t.slice(n,n+=z));return r}function c(t,e,r){var n="";r=math.min(t.length,r);for(var i=e;r>i;i++)n+=string.fromcharcode(127&t[i]);return n}function u(t,e,r){var n="";r=math.min(t.length,r);for(var i=e;r>i;i++)n+=string.fromcharcode(t[i]);return n}function l(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=y(t[o]);return i}function p(t,e,r){for(var n=t.slice(e,r),i="",o=0;ot)throw new rangeerror("offset is not uint");if(t+e>r)throw new rangeerror("trying to access beyond buffer length")}function o(e,r,n,i,o,a){if(!t.isbuffer(e))throw new typeerror("buffer must be a buffer instance");if(r>o||a>r)throw new rangeerror("value is out of bounds");if(n+i>e.length)throw new rangeerror("index out of range")}function d(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function k(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function m(t,e,r,n,i,o){if(e>i||o>e)throw new rangeerror("value is out of bounds");if(r+n>t.length)throw new rangeerror("index out of range");if(0>r)throw new rangeerror("index out of range")}function f(t,e,r,n,i){return i||m(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),x.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return i||m(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),x.write(t,e,r,n,52,8),r+8}function z(t){if(t=n(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function n(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function y(t){return 16>t?"0"+t.tostring(16):t.tostring(16)}function q(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;n>a;a++){if(r=t.charcodeat(a),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(56320>r){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=i-55296<<10|r-56320|65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new error("invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function h(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function v(t){return $.tobytearray(z(t))}function w(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var $=r(7),x=r(8),j=r(9);e.buffer=t,e.slowbuffer=v,e.inspect_max_bytes=50,t.poolsize=8192;var k={};t.typed_array_support=void 0!==n.typed_array_support?n.typed_array_support:i(),t.typed_array_support&&(t.prototype.__proto__=uint8array.prototype,t.__proto__=uint8array),t.isbuffer=function(t){return!(null==t||!t._isbuffer)},t.compare=function(e,r){if(!t.isbuffer(e)||!t.isbuffer(r))throw new typeerror("arguments must be buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,a=math.min(n,i);a>o&&e[o]===r[o];)++o;return o!==a&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isencoding=function(t){switch(string(t).tolowercase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!j(e))throw new typeerror("list argument must be an array of buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n0&&(t=this.tostring("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},t.prototype.compare=function(e){if(!t.isbuffer(e))throw new typeerror("argument must be a buffer");return this===e?0:t.compare(this,e)},t.prototype.indexof=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:string.prototype.indexof.call(this,e,r);if(t.isbuffer(e))return n(this,e,r);if("number"==typeof e)return t.typed_array_support&&"function"===uint8array.prototype.indexof?uint8array.prototype.indexof.call(this,e,r):n(this,[e],r);throw new typeerror("val must be string, number or buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. access using array indexes instead."),this.readuint8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. access using array indexes instead."),this.writeuint8(t,e)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isfinite(e))e=0|e,isfinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new rangeerror("attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return e(this,t,e,r);case"ascii":return a(this,t,e,r);case"binary":return x(this,t,e,r);case"base64":return s(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i(this,t,e,r);default:if(a)throw new typeerror("unknown encoding: "+n);n=(""+n).tolowercase(),a=!0}},t.prototype.tojson=function(){return{type:"buffer",data:array.prototype.slice.call(this._arr||this,0)}};var z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.typed_array_support)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readuintle=function(t,e,r){t=0|t,e=0|e,r||_(t,e,this.length);for(var n=this[t],i=1,o=0;++o0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readuint8=function(t,e){return e||_(t,1,this.length),this[t]},t.prototype.readuint16le=function(t,e){return e||_(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readuint16be=function(t,e){return e||_(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readuint32le=function(t,e){return e||_(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readuint32be=function(t,e){return e||_(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readintle=function(t,e,r){t=0|t,e=0|e,r||_(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=math.pow(2,8*e)),n},t.prototype.readintbe=function(t,e,r){t=0|t,e=0|e,r||_(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i; return i*=128,o>=i&&(o-=math.pow(2,8*e)),o},t.prototype.readint8=function(t,e){return e||_(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readint16le=function(t,e){e||_(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readint16be=function(t,e){e||_(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readint32le=function(t,e){return e||_(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readint32be=function(t,e){return e||_(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readfloatle=function(t,e){return e||_(t,4,this.length),x.read(this,t,!0,23,4)},t.prototype.readfloatbe=function(t,e){return e||_(t,4,this.length),x.read(this,t,!1,23,4)},t.prototype.readdoublele=function(t,e){return e||_(t,8,this.length),x.read(this,t,!0,52,8)},t.prototype.readdoublebe=function(t,e){return e||_(t,8,this.length),x.read(this,t,!1,52,8)},t.prototype.writeuintle=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||o(this,t,e,r,math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeuint8=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,1,255,0),t.typed_array_support||(e=math.floor(e)),this[r]=255&e,r+1},t.prototype.writeuint16le=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,2,65535,0),t.typed_array_support?(this[r]=255&e,this[r+1]=e>>>8):d(this,e,r,!0),r+2},t.prototype.writeuint16be=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,2,65535,0),t.typed_array_support?(this[r]=e>>>8,this[r+1]=255&e):d(this,e,r,!1),r+2},t.prototype.writeuint32le=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,4,4294967295,0),t.typed_array_support?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):k(this,e,r,!0),r+4},t.prototype.writeuint32be=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,4,4294967295,0),t.typed_array_support?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):k(this,e,r,!1),r+4},t.prototype.writeintle=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=math.pow(2,8*r-1);o(this,t,e,r,i-1,-i)}var o=0,a=1,s=0>t?1:0;for(this[e]=255&t;++o>0)-s&255;return e+r},t.prototype.writeintbe=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=math.pow(2,8*r-1);o(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=(t/a>>0)-s&255;return e+r},t.prototype.writeint8=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,1,127,-128),t.typed_array_support||(e=math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeint16le=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,2,32767,-32768),t.typed_array_support?(this[r]=255&e,this[r+1]=e>>>8):d(this,e,r,!0),r+2},t.prototype.writeint16be=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,2,32767,-32768),t.typed_array_support?(this[r]=e>>>8,this[r+1]=255&e):d(this,e,r,!1),r+2},t.prototype.writeint32le=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,4,2147483647,-2147483648),t.typed_array_support?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):k(this,e,r,!0),r+4},t.prototype.writeint32be=function(e,r,n){return e=+e,r=0|r,n||o(this,e,r,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),t.typed_array_support?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):k(this,e,r,!1),r+4},t.prototype.writefloatle=function(t,e,r){return f(this,t,e,!0,r)},t.prototype.writefloatbe=function(t,e,r){return f(this,t,e,!1,r)},t.prototype.writedoublele=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writedoublebe=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new rangeerror("targetstart out of bounds");if(0>n||n>=this.length)throw new rangeerror("sourcestart out of bounds");if(0>i)throw new rangeerror("sourceend out of bounds");i>this.length&&(i=this.length),e.length-rn&&i>r)for(o=a-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>a||!t.typed_array_support)for(o=0;a>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+a),r);return a},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new rangeerror("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new rangeerror("start out of bounds");if(0>r||r>this.length)throw new rangeerror("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=q(t.tostring()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toarraybuffer=function(){if("undefined"!=typeof uint8array){if(t.typed_array_support)return new t(this).buffer;for(var e=new uint8array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new typeerror("buffer.toarraybuffer not supported in this browser")};var q=t.prototype;t._augment=function(e){return e.constructor=t,e._isbuffer=!0,e._set=e.set,e.get=q.get,e.set=q.set,e.write=q.write,e.tostring=q.tostring,e.tolocalestring=q.tostring,e.tojson=q.tojson,e.equals=q.equals,e.compare=q.compare,e.indexof=q.indexof,e.copy=q.copy,e.slice=q.slice,e.readuintle=q.readuintle,e.readuintbe=q.readuintbe,e.readuint8=q.readuint8,e.readuint16le=q.readuint16le,e.readuint16be=q.readuint16be,e.readuint32le=q.readuint32le,e.readuint32be=q.readuint32be,e.readintle=q.readintle,e.readintbe=q.readintbe,e.readint8=q.readint8,e.readint16le=q.readint16le,e.readint16be=q.readint16be,e.readint32le=q.readint32le,e.readint32be=q.readint32be,e.readfloatle=q.readfloatle,e.readfloatbe=q.readfloatbe,e.readdoublele=q.readdoublele,e.readdoublebe=q.readdoublebe,e.writeuint8=q.writeuint8,e.writeuintle=q.writeuintle,e.writeuintbe=q.writeuintbe,e.writeuint16le=q.writeuint16le,e.writeuint16be=q.writeuint16be,e.writeuint32le=q.writeuint32le,e.writeuint32be=q.writeuint32be,e.writeintle=q.writeintle,e.writeintbe=q.writeintbe,e.writeint8=q.writeint8,e.writeint16le=q.writeint16le,e.writeint16be=q.writeint16be,e.writeint32le=q.writeint32le,e.writeint32be=q.writeint32be,e.writefloatle=q.writefloatle,e.writefloatbe=q.writefloatbe,e.writedoublele=q.writedoublele,e.writedoublebe=q.writedoublebe,e.fill=q.fill,e.inspect=q.inspect,e.toarraybuffer=q.toarraybuffer,e};var tt=/[^+\/0-9a-za-z-_]/g}).call(e,r(6).buffer,function(){return this}())},function(t,e,r){var n="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charcodeat(0);return e===a||e===f?62:e===s||e===c?63:l>e?-1:l+10>e?e-l+26+26:u+26>e?e-u:h+26>e?e-h+26:void 0}function r(t){function r(t){h[f++]=t}var n,i,a,s,l,h;if(t.length%4>0)throw new error("invalid string. length must be a multiple of 4");var u=t.length;l="="===t.charat(u-2)?2:"="===t.charat(u-1)?1:0,h=new o(3*t.length/4-l),a=l>0?t.length-4:t.length;var f=0;for(n=0,i=0;a>n;n+=4,i+=3)s=e(t.charat(n))<<18|e(t.charat(n+1))<<12|e(t.charat(n+2))<<6|e(t.charat(n+3)),r((16711680&s)>>16),r((65280&s)>>8),r(255&s);return 2===l?(s=e(t.charat(n))<<2|e(t.charat(n+1))>>4,r(255&s)):1===l&&(s=e(t.charat(n))<<10|e(t.charat(n+1))<<4|e(t.charat(n+2))>>2,r(s>>8&255),r(255&s)),h}function i(t){function e(t){return n.charat(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,a,s=t.length%3,l="";for(i=0,a=t.length-s;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],l+=r(o);switch(s){case 1:o=t[t.length-1],l+=e(o>>2),l+=e(o<<4&63),l+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],l+=e(o>>10),l+=e(o>>4&63),l+=e(o<<2&63),l+="="}return l}var o="undefined"!=typeof uint8array?uint8array:array,a="+".charcodeat(0),s="/".charcodeat(0),l="0".charcodeat(0),h="a".charcodeat(0),u="a".charcodeat(0),f="-".charcodeat(0),c="_".charcodeat(0);t.tobytearray=r,t.frombytearray=i}(e)},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,u=-7,f=r?i-1:0,c=r?-1:1,d=t[e+f];for(f+=c,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=256*o+t[e+f],f+=c,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+t[e+f],f+=c,u-=8);if(0===o)o=1-h;else{if(o===l)return a?nan:(d?-1:1)*(1/0);a+=math.pow(2,n),o-=h}return(d?-1:1)*a*math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,l,h=8*o-i-1,u=(1<>1,c=23===i?math.pow(2,-24)-math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=math.abs(e),isnan(e)||e===1/0?(s=isnan(e)?1:0,a=u):(a=math.floor(math.log(e)/math.ln2),e*(l=math.pow(2,-a))<1&&(a--,l*=2),e+=a+f>=1?c/l:c*math.pow(2,1-f),e*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(e*l-1)*math.pow(2,i),a+=f):(s=e*math.pow(2,f-1)*math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,h-=8);t[r+d-p]|=128*g}},function(t,e){var r=array.isarray,n=object.prototype.tostring;t.exports=r||function(t){return!!t&&"[object array]"==n.call(t)}},function(t,e){var r=function(t){function e(t,e){for(var r in e)t[r]=e[r];return t}var r=1,n=function(t){r++,this.parent=null,this.children={},this.id=r,this.name="n"+r,"undefined"!=typeof t&&(this.name=t),this.x=this.y=this.z=0,this.width=this.height=0};n.prototype.resize=function(t,e){null!=t&&(this.width=t),null!=e&&(this.height=e)},n.prototype.moveto=function(t,e,r){this.x=null!=t?t:this.x,this.y=null!=e?e:this.y,this.z=null!=r?r:this.z},n.prototype.add=function(t){var e=t.name;if("undefined"!=typeof this.children[e])throw"scenegraph: child already exists: "+e;this.children[e]=t,t.parent=this};var i=function(){n.call(this,"root"),this.properties=t};i.prototype=new n;var o=function(t,r){if(n.call(this,t),this.properties={fill:"#000000"},"undefined"!=typeof r)e(this.properties,r);else if("undefined"!=typeof t&&"string"!=typeof t)throw"scenegraph: invalid node name"};o.prototype=new n;var a=function(){o.apply(this,arguments),this.type="group"};a.prototype=new o;var s=function(){o.apply(this,arguments),this.type="rect"};s.prototype=new o;var l=function(t){o.call(this),this.type="text",this.properties.text=t};l.prototype=new o;var h=new i;return this.shape={rect:s,text:l,group:a},this.root=h,this};t.exports=r},function(t,e){(function(t){e.extend=function(t,e){var r={};for(var n in t)t.hasownproperty(n)&&(r[n]=t[n]);if(null!=e)for(var i in e)e.hasownproperty(i)&&(r[i]=e[i]);return r},e.cssprops=function(t){var e=[];for(var r in t)t.hasownproperty(r)&&e.push(r+":"+t[r]);return e.join(";")},e.encodehtmlentity=function(t){for(var e=[],r=0,n=t.length-1;n>=0;n--)r=t.charcodeat(n),r>128?e.unshift(["&#",r,";"].join("")):e.unshift(t[n]);return e.join("")},e.imageexists=function(t,e){var r=new image;r.onerror=function(){e.call(this,!1)},r.onload=function(){e.call(this,!0)},r.src=t},e.decodehtmlentity=function(t){return t.replace(/&#(\d+);/g,function(t,e){return string.fromcharcode(e)})},e.dimensioncheck=function(t){var e={height:t.clientheight,width:t.clientwidth};return e.height&&e.width?e:!1},e.truthy=function(t){return"string"==typeof t?"true"===t||"yes"===t||"1"===t||"on"===t||"✓"===t:!!t},e.parsecolor=function(t){var e,r=/(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i,n=/^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,i=/^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/,o=t.match(r);return null!==o?(e=o[1]||o[2],"#"!==e[0]?"#"+e:e):(o=t.match(n),null!==o?e="rgb("+o.slice(1).join(",")+")":(o=t.match(i),null!==o?e="rgba("+o.slice(1).join(",")+")":null))},e.canvasratio=function(){var e=1,r=1;if(t.document){var n=t.document.createelement("canvas");if(n.getcontext){var i=n.getcontext("2d");e=t.devicepixelratio||1,r=i.webkitbackingstorepixelratio||i.mozbackingstorepixelratio||i.msbackingstorepixelratio||i.obackingstorepixelratio||i.backingstorepixelratio||1}}return e/r}}).call(e,function(){return this}())},function(t,e,r){(function(t){var n=r(13),i="http://www.w3.org/2000/svg",o=8;e.initsvg=function(t,e,r){var a,s,l=!1;t&&t.queryselector?(s=t.queryselector("style"),null===s&&(l=!0)):(t=n.newel("svg",i),l=!0),l&&(a=n.newel("defs",i),s=n.newel("style",i),n.setattr(s,{type:"text/css"}),a.appendchild(s),t.appendchild(a)),t.webkitmatchesselector&&t.setattribute("xmlns",i);for(var h=0;h=0;l--){var h=s.createprocessinginstruction("xml-stylesheet",'href="'+a[l]+'" rel="stylesheet"');s.insertbefore(h,s.firstchild)}s.removechild(s.documentelement),o=i.serializetostring(s)}var u=i.serializetostring(e);return u=u.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),o+u}}}).call(e,function(){return this}())},function(t,e){(function(t){e.newel=function(e,r){return t.document?null==r?t.document.createelement(e):t.document.createelementns(r,e):void 0},e.setattr=function(t,e){for(var r in e)t.setattribute(r,e[r])},e.createxml=function(){return t.domparser?(new domparser).parsefromstring("","application/xml"):void 0},e.getnodearray=function(e){var r=null;return"string"==typeof e?r=document.queryselectorall(e):t.nodelist&&e instanceof t.nodelist?r=e:t.node&&e instanceof t.node?r=[e]:t.htmlcollection&&e instanceof t.htmlcollection?r=e:e instanceof array?r=e:null===e&&(r=[]),r=array.prototype.slice.call(r)}}).call(e,function(){return this}())},function(t,e){var r=function(t,e){"string"==typeof t&&(this.original=t,"#"===t.charat(0)&&(t=t.slice(1)),/[^a-f0-9]+/i.test(t)||(3===t.length&&(t=t.replace(/./g,"$&$&")),6===t.length&&(this.alpha=1,e&&e.alpha&&(this.alpha=e.alpha),this.set(parseint(t,16)))))};r.rgb2hex=function(t,e,r){function n(t){var e=(0|t).tostring(16);return 16>t&&(e="0"+e),e}return[t,e,r].map(n).join("")},r.hsl2rgb=function(t,e,r){var n=t/60,i=(1-math.abs(2*r-1))*e,o=i*(1-math.abs(parseint(n)%2-1)),a=r-i/2,s=0,l=0,h=0;return n>=0&&1>n?(s=i,l=o):n>=1&&2>n?(s=o,l=i):n>=2&&3>n?(l=i,h=o):n>=3&&4>n?(l=o,h=i):n>=4&&5>n?(s=o,h=i):n>=5&&6>n&&(s=i,h=o),s+=a,l+=a,h+=a,s=parseint(255*s),l=parseint(255*l),h=parseint(255*h),[s,l,h]},r.prototype.set=function(t){this.raw=t;var e=(16711680&this.raw)>>16,r=(65280&this.raw)>>8,n=255&this.raw,i=.2126*e+.7152*r+.0722*n,o=-.09991*e-.33609*r+.436*n,a=.615*e-.55861*r-.05639*n;return this.rgb={r:e,g:r,b:n},this.yuv={y:i,u:o,v:a},this},r.prototype.lighten=function(t){var e=math.min(1,math.max(0,math.abs(t)))*(0>t?-1:1),n=255*e|0,i=math.min(255,math.max(0,this.rgb.r+n)),o=math.min(255,math.max(0,this.rgb.g+n)),a=math.min(255,math.max(0,this.rgb.b+n)),s=r.rgb2hex(i,o,a);return new r(s)},r.prototype.tohex=function(t){return(t?"#":"")+this.raw.tostring(16)},r.prototype.lighterthan=function(t){return t instanceof r||(t=new r(t)),this.yuv.y>t.yuv.y},r.prototype.blendalpha=function(t){t instanceof r||(t=new r(t));var e=t,n=this,i=e.alpha*e.rgb.r+(1-e.alpha)*n.rgb.r,o=e.alpha*e.rgb.g+(1-e.alpha)*n.rgb.g,a=e.alpha*e.rgb.b+(1-e.alpha)*n.rgb.b;return new r(r.rgb2hex(i,o,a))},t.exports=r},function(t,e){t.exports={version:"2.9.2",svg_ns:"http://www.w3.org/2000/svg"}},function(t,e,r){function n(t,e){return f.element({tag:e,width:t.width,height:t.height,fill:t.properties.fill})}function i(t){return h.cssprops({fill:t.fill,"font-weight":t.font.weight,"font-family":t.font.family+", monospace","font-size":t.font.size+t.font.units})}function o(t,e,r){var n=r/2;return["m",n,n,"h",t-n,"v",e-n,"h",n,"v",0,"m",0,n,"l",t,e-n,"m",0,e-n,"l",t,n].join(" ")}var a=r(17),s=r(12),l=r(15),h=r(11),u=l.svg_ns,f={element:function(t){var e=t.tag,r=t.content||"";return delete t.tag,delete t.content,[e,r,t]}};t.exports=function(t,e){var r=e.enginesettings,l=r.stylesheets,h=l.map(function(t){return''}).join("\n"),c="holder_"+number(new date).tostring(16),d=t.root,p=d.children.holdertextgroup,g="#"+c+" text { "+i(p.properties)+" } ";p.y+=.8*p.textpositiondata.boundingbox.height;var m=[];object.keys(p.children).foreach(function(t){var e=p.children[t];object.keys(e.children).foreach(function(t){var r=e.children[t],n=p.x+e.x+r.x,i=p.y+e.y+r.y,o=f.element({tag:"text",content:r.properties.text,x:n,y:i});m.push(o)})});var v=f.element({tag:"g",content:m}),y=null;if(d.children.holderbg.properties.outline){var w=d.children.holderbg.properties.outline;y=f.element({tag:"path",d:o(d.children.holderbg.width,d.children.holderbg.height,w.width),"stroke-width":w.width,stroke:w.fill,fill:"none"})}var b=n(d.children.holderbg,"rect"),e=[];e.push(b),w&&e.push(y),e.push(v);var a=f.element({tag:"g",id:c,content:e}),x=f.element({tag:"style",content:g,type:"text/css"}),s=f.element({tag:"defs",content:x}),i=f.element({tag:"svg",content:[s,a],width:d.properties.width,height:d.properties.height,xmlns:u,viewbox:[0,0,d.properties.width,d.properties.height].join(" "),preserveaspectratio:"none"}),t=a(i);t=h+t[0];var b=s.svgstringtodatauri(t,"background"===e.mode);return b}},function(t,e,r){r(18);t.exports=function n(t,e,r){"use strict";function i(t){var e=t.match(/^[\w-]+/),n={tag:e?e[0]:"div",attr:{},children:[]},i=t.match(/#([\w-]+)/),o=t.match(/\$([\w-]+)/),a=t.match(/\.[\w-]+/g);return i&&(n.attr.id=i[1],r[i[1]]=n),o&&(r[o[1]]=n),a&&(n.attr["class"]=a.join(" ").replace(/\./g,"")),t.match(/&$/g)&&(d=!1),n}function o(t,e){return null!==e&&e!==!1&&void 0!==e?"string"!=typeof e&&"object"!=typeof e?string(e):e:void 0}function a(t){return t||0===t?string(t).replace(/&/g,"&").replace(/"/g,"""):""}function s(t){return string(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}var l,h,u,f,c=1,d=!0;if(r=r||{},"string"==typeof t[0])t[0]=i(t[0]);else{if(!array.isarray(t[0]))throw new error("first element of array must be a string, or an array and not "+json.stringify(t[0]));c=0}for(;c",t[0]=l}return r[0]=t[0],u&&u(t[0]),r}},function(t,e){"use strict";function r(t){var e=""+t,r=n.exec(e);if(!r)return e;var i,o="",a=0,s=0;for(a=r.index;a]/;t.exports=r},function(t,e,r){var n=r(13),i=r(11);t.exports=function(){var t=n.newel("canvas"),e=null;return function(r){null==e&&(e=t.getcontext("2d"));var n=i.canvasratio(),o=r.root;t.width=n*o.properties.width,t.height=n*o.properties.height,e.textbaseline="middle";var a=o.children.holderbg,s=n*a.width,l=n*a.height,h=2,u=h/2;e.fillstyle=a.properties.fill,e.fillrect(0,0,s,l),a.properties.outline&&(e.strokestyle=a.properties.outline.fill,e.linewidth=a.properties.outline.width,e.moveto(u,u),e.lineto(s-u,u),e.lineto(s-u,l-u),e.lineto(u,l-u),e.lineto(u,u),e.moveto(0,u),e.lineto(s,l-u),e.moveto(0,l-u),e.lineto(s,u),e.stroke());var f=o.children.holdertextgroup;e.font=f.properties.font.weight+" "+n*f.properties.font.size+f.properties.font.units+" "+f.properties.font.family+", monospace",e.fillstyle=f.properties.fill;for(var c in f.children){var d=f.children[c];for(var p in d.children){var g=d.children[p],m=n*(f.x+d.x+g.x),v=n*(f.y+d.y+g.y+f.properties.leading/2);e.filltext(g.properties.text,m,v)}}return t.todataurl("image/png")}}()}])}),function(t,e){e&&(holder=t.holder)}(this,"undefined"!=typeof meteor&&"undefined"!=typeof package);