From f553c773708d257ff071dde147d6ca28fa7dfad2 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Thu, 17 Dec 2015 10:18:27 -0600 Subject: [PATCH] Recompile NanoUI --- nano/assets/nanoui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nano/assets/nanoui.js b/nano/assets/nanoui.js index 07f2d60d43b..d275b35323d 100644 --- a/nano/assets/nanoui.js +++ b/nano/assets/nanoui.js @@ -1,3 +1,3 @@ -!function(e){function t(e,t,n,a){for(var s,i=n.slice(),o=r(t,e),l=0,c=i.length;c>l&&(handler=i[l],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(o):handler.call(e,o),!o.stoppedImmediatePropagation);l++);return s=!o.stoppedPropagation,a&&s&&e.parentNode?e.parentNode.dispatchEvent(o):!o.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function a(e,t,a){var r=b(t||e,a);g(e,"textContent",n(function(){return r.get.call(this)},function(e){r.set.call(this,e)}))}function r(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function s(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function i(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function o(e){var t=document.createEvent("Event");t.initEvent("input",!0,!0),(e.srcElement||e.fromElement||document).dispatchEvent(t)}function l(e){!p&&E.test(document.readyState)&&(p=!p,document.detachEvent(f,l),e=document.createEvent("Event"),e.initEvent(h,!0,!0),document.dispatchEvent(e))}function c(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var d=!0,p=!1,f="onreadystatechange",h="DOMContentLoaded",v="__IE8__"+Math.random(),g=Object.defineProperty||function(e,t,n){e[t]=n.value},m=Object.defineProperties||function(t,n){for(var a in n)if(y.call(n,a))try{g(t,a,n[a])}catch(r){e.console&&console.log(a+" failed on object:",t,r.message)}},b=Object.getOwnPropertyDescriptor,y=Object.prototype.hasOwnProperty,w=e.Element.prototype,k=e.Text.prototype,T=/^[a-z]+$/,E=/loaded|complete/,S={},x=document.createElement("div"),O=document.documentElement,C=O.removeAttribute,P=O.setAttribute;a(e.HTMLCommentElement.prototype,w,"nodeValue"),a(e.HTMLScriptElement.prototype,null,"text"),a(k,null,"nodeValue"),a(e.HTMLTitleElement.prototype,null,"text"),g(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(b(e.CSSStyleSheet.prototype,"cssText"))),m(w,{textContent:{get:i,set:c},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},oninput:{get:function(){return this._oninput||null},set:function(e){this._oninput&&(this.removeEventListener("input",this._oninput),this._oninput=e,e&&this.addEventListener("input",e))}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,a){var r,i,l=this,c="on"+e,d=l[v]||g(l,v,{value:{}})[v],p=d[c]||(d[c]={}),f=p.h||(p.h=[]);if(!y.call(p,"w")){if(p.w=function(e){return e[v]||t(l,u(l,e),f,!1)},!y.call(S,c))if(T.test(e)){try{r=document.createEventObject(),r[v]=!0,9!=l.nodeType&&null==l.parentNode&&x.appendChild(l),(i=l.getAttribute(c))&&C.call(l,c),l.fireEvent(c,r),S[c]=!0}catch(r){for(S[c]=!1;x.hasChildNodes();)x.removeChild(x.firstChild)}null!=i&&P.call(l,c,i)}else S[c]=!1;(p.n=S[c])&&l.attachEvent(c,p.w)}s(f,n)<0&&f[a?"unshift":"push"](n),"input"===e&&l.attachEvent("onkeyup",o)}},dispatchEvent:{value:function(e){var n,a=this,r="on"+e.type,s=a[v],i=s&&s[r],o=!!i;return e.target||(e.target=a),o?i.n?a.fireEvent(r,e):t(a,e,i.h,!0):(n=a.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var a=this,r="on"+e,i=a[v],o=i&&i[r],l=o&&o.h,c=l?s(l,t):-1;c>-1&&l.splice(c,1)}}}),m(k,{addEventListener:{value:w.addEventListener},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener}}),m(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var a=this,r="on"+e,i=a[v]||g(a,v,{value:{}})[v],o=i[r]||(i[r]={}),l=o.h||(o.h=[]);s(l,t)<0&&(a[r]||(a[r]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),a.dispatchEvent(t)}),l[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,a="on"+e.type,r=n[v],s=r&&r[a],i=!!s;return i&&(s.n?n.fireEvent(a,e):t(n,e,s.h,!0))}},removeEventListener:{value:w.removeEventListener}}),m(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),m(e.HTMLDocument.prototype,{defaultView:{get:function(){return this.parentWindow}},textContent:{get:function(){return 11===this.nodeType?i.call(this):null},set:function(e){11===this.nodeType&&c.call(this,e)}},addEventListener:{value:function(t,n,a){var r=this;w.addEventListener.call(r,t,n,a),d&&t===h&&!E.test(r.readyState)&&(d=!1,r.attachEvent(f,l),e==top&&!function s(e){try{r.documentElement.doScroll("left"),l()}catch(t){setTimeout(s,50)}}())}},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),m(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,a=/^(top|right|bottom|left)$/,r=/\-([a-z])/g,s=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,i,o,l=this._,c=l.style,u=l.currentStyle,d=l.runtimeStyle;return e=("float"===e?"style-float":e).replace(r,s),t=u?u[e]:c[e],n.test(t)&&!a.test(e)&&(i=c.left,o=d&&d.left,o&&(d.left=u.left),c.left="fontSize"===e?"1em":t,t=c.pixelLeft+"px",c.left=i,o&&(d.left=o)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,a){return a?new t(n):new e(n)}}()},addEventListener:{value:function(n,a,r){var i,o=e,l="on"+n;o[l]||(o[l]=function(e){return t(o,u(o,e),i,!1)}),i=o[l][v]||(o[l][v]=[]),s(i,a)<0&&i[r?"unshift":"push"](a)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,a){var r="on"+t,i=(e[r]||Object)[v],o=i?s(i,n):-1;o>-1&&i.splice(o,1)}}}),function(e,t,n){for(n=0;n0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,a,r;if(N(t))return t;if(a=t.valueOf,e(a)&&(n=a.call(t),N(n)))return n;if(r=t.toString,e(r)&&(n=r.call(t),N(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return a(e)},ToUint32:function(e){return e>>>0}},I=function(){};A(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,s=u.call(arguments,1),i=function(){if(this instanceof r){var e=n.apply(this,h.call(s,u.call(arguments)));return a(e)===e?e:this}return n.apply(t,h.call(s,u.call(arguments)))},o=g(0,n.length-s.length),l=[],c=0;o>c;c++)p.call(l,"$"+c);return r=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this, arguments); }")(i),n.prototype&&(I.prototype=n.prototype,r.prototype=new I,I.prototype=null),r}});var R=v.bind(r.hasOwnProperty),U=v.bind(r.toString),z=v.bind(o.slice),q=v.bind(o.split),F=v.bind(o.indexOf),B=v.bind(p),H=t.isArray||function(e){return"[object Array]"===U(e)},$=1!==[].unshift(0);A(n,{unshift:function(){return f.apply(this,arguments),this.length}},$),A(t,{isArray:H});var J=a("a"),V="a"!==J[0]||!(0 in J),W=function(e){var t=!0,n=!0;return e&&(e.call("foo",function(e,n,a){"object"!=typeof a&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")),!!e&&t&&n};A(n,{forEach:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=-1,i=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++s1&&(a=arguments[1]),!e(n))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;i>l;l++)l in s&&("undefined"==typeof a?o[l]=n(s[l],l,r):o[l]=n.call(a,s[l],l,r));return o}},!W(n.map)),A(n,{filter:function(t){var n,a,r=D.ToObject(this),s=V&&P(this)?q(this,""):r,i=D.ToUint32(s.length),o=[];if(arguments.length>1&&(a=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;i>l;l++)l in s&&(n=s[l],("undefined"==typeof a?t(n,l,r):t.call(a,n,l,r))&&B(o,n));return o}},!W(n.filter)),A(n,{every:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var i=0;s>i;i++)if(i in r&&!("undefined"==typeof n?t(r[i],i,a):t.call(n,r[i],i,a)))return!1;return!0}},!W(n.every)),A(n,{some:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var i=0;s>i;i++)if(i in r&&("undefined"==typeof n?t(r[i],i,a):t.call(n,r[i],i,a)))return!0;return!1}},!W(n.some));var Z=!1;n.reduce&&(Z="object"==typeof n.reduce.call("es5",function(e,t,n,a){return a})),A(n,{reduce:function(t){var n=D.ToObject(this),a=V&&P(this)?q(this,""):n,r=D.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===r&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,i=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(i in a){s=a[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}for(;r>i;i++)i in a&&(s=t(s,a[i],i,n));return s}},!Z);var X=!1;n.reduceRight&&(X="object"==typeof n.reduceRight.call("es5",function(e,t,n,a){return a})),A(n,{reduceRight:function(t){var n=D.ToObject(this),a=V&&P(this)?q(this,""):n,r=D.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===r&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,i=r-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(i in a){s=a[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>i)return s;do i in a&&(s=t(s,a[i],i,n));while(i--);return s}},!X);var Y=n.indexOf&&-1!==[0,1].indexOf(1,2);A(n,{indexOf:function(e){var t=V&&P(this)?q(this,""):D.ToObject(this),n=D.ToUint32(t.length);if(0===n)return-1;var a=0;for(arguments.length>1&&(a=D.ToInteger(arguments[1])),a=a>=0?a:g(0,n+a);n>a;a++)if(a in t&&t[a]===e)return a;return-1}},Y);var G=n.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);A(n,{lastIndexOf:function(e){var t=V&&P(this)?q(this,""):D.ToObject(this),n=D.ToUint32(t.length);if(0===n)return-1;var a=n-1;for(arguments.length>1&&(a=m(a,D.ToInteger(arguments[1]))),a=a>=0?a:n-Math.abs(a);a>=0;a--)if(a in t&&e===t[a])return a;return-1}},G);var K=function(){var e=[1,2],t=e.splice();return 2===e.length&&H(t)&&0===t.length}();A(n,{splice:function(e,t){return 0===arguments.length?[]:d.apply(this,arguments)}},!K);var Q=function(){var e={};return n.splice.call(e,0,0,1),1===e.length}();A(n,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=g(D.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=u.call(arguments),n.length<2?B(n,this.length-e):n[1]=D.ToInteger(t)),d.apply(this,n)}},!Q);var ee=function(){var e=new t(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),te=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();A(n,{splice:function(e,t){for(var n,a=D.ToObject(this),r=[],s=D.ToUint32(a.length),o=D.ToInteger(e),l=0>o?g(s+o,0):m(o,s),c=m(g(D.ToInteger(t),0),s-l),d=0;c>d;)n=i(l+d),R(a,n)&&(r[d]=a[n]),d+=1;var p,f=u.call(arguments,2),h=f.length;if(c>h){for(d=l;s-c>d;)n=i(d+c),p=i(d+h),R(a,n)?a[p]=a[n]:delete a[p],d+=1;for(d=s;d>s-c+h;)delete a[d-1],d-=1}else if(h>c)for(d=s-c;d>l;)n=i(d+c-1),p=i(d+h-1),R(a,n)?a[p]=a[n]:delete a[p],d-=1;d=l;for(var v=0;v=0&&!H(t)&&e(t.callee)},be=ge(arguments)?ge:me;A(a,{keys:function(t){var n=e(t),a=be(t),r=null!==t&&"object"==typeof t,s=r&&P(t);if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var o=[],l=le&&n;if(s&&ce||a)for(var c=0;cp;p++){var f=he[p];d&&"constructor"===f||!R(t,f)||B(o,f)}return o}});var ye=a.keys&&function(){return 2===a.keys(arguments).length}(1,2),we=a.keys&&function(){var e=a.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),ke=a.keys;A(a,{keys:function(e){return ke(be(e)?u.call(e):e)}},!ye||we);var Te=-621987552e5,Ee="-000001",Se=Date.prototype.toISOString&&-1===new Date(Te).toISOString().indexOf(Ee),xe=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString();A(Date.prototype,{toISOString:function(){var e,t,n,a,r;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(a=this.getUTCFullYear(),r=this.getUTCMonth(),a+=Math.floor(r/12),r=(r%12+12)%12,e=[r+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],a=(0>a?"-":a>9999?"+":"")+z("00000"+Math.abs(a),a>=0&&9999>=a?-4:-6),t=e.length;t--;)n=e[t],10>n&&(e[t]="0"+n);return a+"-"+u.call(e,0,2).join("-")+"T"+u.call(e,2).join(":")+"."+z("000"+this.getUTCMilliseconds(),-3)+"Z"}},Se||xe);var Oe=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(Te).toJSON().indexOf(Ee)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();Oe||(Date.prototype.toJSON=function(t){var n=a(this),r=D.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var s=n.toISOString;if(!e(s))throw new TypeError("toISOString property is not callable");return s.call(n)});var Ce=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),Pe=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),_e=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(_e||Pe||!Ce){var je=Math.pow(2,31)-1,Le=(Math.floor(je/1e3),M(new Date(1970,0,1,0,0,0,je+1).getTime()));Date=function(e){var t=function(n,a,r,s,o,l,c){var u,d=arguments.length;if(this instanceof e){var p=l,f=c;if(Le&&d>=7&&c>je){var h=Math.floor(c/je)*je,v=Math.floor(h/1e3);p+=v,f-=1e3*v}u=1===d&&i(n)===n?new e(t.parse(n)):d>=7?new e(n,a,r,s,o,p,f):d>=6?new e(n,a,r,s,o,p):d>=5?new e(n,a,r,s,o):d>=4?new e(n,a,r,s):d>=3?new e(n,a,r):d>=2?new e(n,a):d>=1?new e(n):new e}else u=e.apply(this,arguments);return N(u)||A(u,{constructor:t},!0),u},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),a=[0,31,59,90,120,151,181,212,243,273,304,334,365],r=function(e,t){var n=t>1?1:0;return a[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},s=function(t){var n=0,a=t;if(Le&&a>je){var r=Math.floor(a/je)*je,s=Math.floor(r/1e3);n+=s,a-=1e3*s}return l(new e(1970,0,1,0,0,n,a))};for(var o in e)R(e,o)&&(t[o]=e[o]);A(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,A(t.prototype,{constructor:t},!0);var c=function(t){var a=n.exec(t);if(a){var i,o=l(a[1]),c=l(a[2]||1)-1,u=l(a[3]||1)-1,d=l(a[4]||0),p=l(a[5]||0),f=l(a[6]||0),h=Math.floor(1e3*l(a[7]||0)),v=Boolean(a[4]&&!a[8]),g="-"===a[9]?1:-1,m=l(a[10]||0),b=l(a[11]||0),y=p>0||f>0||h>0;return(y?24:25)>d&&60>p&&60>f&&1e3>h&&c>-1&&12>c&&24>m&&60>b&&u>-1&&u=-864e13&&864e13>=i)?i:NaN}return e.parse.apply(this,arguments)};return A(t,{parse:c}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var Ae=c.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),Ne={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,a=t;++n=0;)n+=Ne.data[t],Ne.data[t]=Math.floor(n/e),n=n%e*Ne.base},numToString:function(){for(var e=Ne.size,t="";--e>=0;)if(""!==t||0===e||0!==Ne.data[e]){var n=i(Ne.data[e]);""===t?t=n:t+=z("0000000",0,7-n.length)+n}return t},pow:function Ye(e,t,n){return 0===t?n:t%2===1?Ye(e,t-1,n*e):Ye(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},Me=function(e){var t,n,a,r,s,o,c,u;if(t=l(e),t=M(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=l(this),M(n))return"NaN";if(-1e21>=n||n>=1e21)return i(n);if(a="",0>n&&(a="-",n=-n),r="0",n>1e-21)if(s=Ne.log(n*Ne.pow(2,69,1))-69,o=0>s?n*Ne.pow(2,-s,1):n/Ne.pow(2,s,1),o*=4503599627370496,s=52-s,s>0){for(Ne.multiply(0,o),c=t;c>=7;)Ne.multiply(1e7,0),c-=7;for(Ne.multiply(Ne.pow(10,c,1),0),c=s-1;c>=23;)Ne.divide(1<<23),c-=23;Ne.divide(1<0?(u=r.length,r=t>=u?a+z("0.0000000000000000000",0,t-u+2)+r:a+z(r,0,u-t)+"."+z(r,u-t)):r=a+r,r};A(c,{toFixed:Me},Ae);var De=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),Ie=c.toPrecision;A(c,{toPrecision:function(e){return"undefined"==typeof e?Ie.call(this):Ie.call(this,e)}},De),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],t=Math.pow(2,32)-1;o.split=function(n,a){var r=this;if("undefined"==typeof n&&0===a)return[];if(!S(n))return q(this,n,a);var s,i,o,l,c=[],d=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),f=0,h=new RegExp(n.source,d+"g");r+="",e||(s=new RegExp("^"+h.source+"$(?!\\s)",d));var v="undefined"==typeof a?t:D.ToUint32(a);for(i=h.exec(r);i&&(o=i.index+i[0].length,!(o>f&&(B(c,z(r,f,i.index)),!e&&i.length>1&&i[0].replace(s,function(){for(var e=1;e1&&i.index=v)));)h.lastIndex===i.index&&h.lastIndex++,i=h.exec(r);return f===r.length?(l||!h.test(""))&&B(c,""):B(c,z(r,f)),c.length>v?z(c,0,v):c}}():"0".split(void 0,0).length&&(o.split=function(e,t){return"undefined"==typeof e&&0===t?[]:q(this,e,t)});var Re=o.replace,Ue=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){B(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ue||(o.replace=function(t,n){var a=e(n),r=S(t)&&/\)[*?]/.test(t.source);if(a&&r){var s=function(e){var a=arguments.length,r=t.lastIndex;t.lastIndex=0;var s=t.exec(e)||[];return t.lastIndex=r,B(s,arguments[a-2],arguments[a-1]),n.apply(this,s)};return Re.call(this,t,s)}return Re.call(this,t,n)});var ze=o.substr,qe="".substr&&"b"!=="0b".substr(-1);A(o,{substr:function(e,t){var n=e;return 0>e&&(n=g(this.length+e,0)),ze.call(this,n,t)}},qe);var Fe=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Be="​",He="["+Fe+"]",$e=new RegExp("^"+He+He+"*"),Je=new RegExp(He+He+"*$"),Ve=o.trim&&(Fe.trim()||!Be.trim());A(o,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return i(this).replace($e,"").replace(Je,"")}},Ve);var We=o.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);A(o,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=i(this),n=i(e),a=arguments.length>1?l(arguments[1]):NaN,r=M(a)?1/0:D.ToInteger(a),s=m(g(r,0),t.length),o=n.length,c=s+o;c>0;){c=g(0,c-o);var u=F(z(t,c,s+o),n);if(-1!==u)return c+u}return-1}},We);var Ze=o.lastIndexOf;if(A(o,{lastIndexOf:function(e){return Ze.apply(this,arguments)}},1!==o.lastIndexOf.length),(8!==parseInt(Fe+"08")||22!==parseInt(Fe+"0x16"))&&(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,a){var r=i(n).trim(),s=l(a)||(t.test(r)?16:10);return e(r,s)}}(parseInt)),"RangeError: test"!==String(new RangeError("test"))){var Xe=(Error.prototype.toString,function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=i(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=i(t)),e?t?e+": "+t:e:t});Error.prototype.toString=Xe}}),function(e,t){function n(e,t){var n=e.createElement("p"),a=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",a.insertBefore(n.lastChild,a.firstChild)}function a(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function r(e,t){var n=y.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),y.elements=n+" "+e,c(t)}function s(e){var t=b[e[g]];return t||(t={},m++,e[g]=m,b[m]=t),t}function i(e,n,a){if(n||(n=t),d)return n.createElement(e);a||(a=s(n));var r;return r=a.cache[e]?a.cache[e].cloneNode():v.test(e)?(a.cache[e]=a.createElem(e)).cloneNode():a.createElem(e),!r.canHaveChildren||h.test(e)||r.tagUrn?r:a.frag.appendChild(r)}function o(e,n){if(e||(e=t),d)return e.createDocumentFragment();n=n||s(e);for(var r=n.frag.cloneNode(),i=0,o=a(),l=o.length;l>i;i++)r.createElement(o[i]);return r}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+a().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function c(e){e||(e=t);var a=s(e);return!y.shivCSS||u||a.hasCSS||(a.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),d||l(e,a),e}var u,d,p="3.7.3",f=e.html5||{},h=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,v=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g="_html5shiv",m=0,b={};!function(){try{var e=t.createElement("a");e.innerHTML="",u="hidden"in e,d=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){u=!0,d=!0}}();var y={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:p,shivCSS:f.shivCSS!==!1,supportsUnknownElements:d,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:c,createElement:i,createDocumentFragment:o,addElements:r};e.html5=y,c(t),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document),function(){function e(t,a){function s(e){if(s[e]!==g)return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("json-parse");else{var n,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var l=a.stringify,u="function"==typeof l&&y;if(u){(n=function(){return 1}).toJSON=n;try{u="0"===l(0)&&"0"===l(new i)&&'""'==l(new o)&&l(b)===g&&l(g)===g&&l()===g&&"1"===l(n)&&"[1]"==l([n])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,b,null])&&l({a:[n,!0,!1,null,"\x00\b\n\f\r "]})==r&&"1"===l(null,n)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new c(-1))}catch(d){u=!1}}t=u}if("json-parse"==e){var p=a.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){n=p(r);var f=5==n.a.length&&1===n.a[0];if(f){try{f=!p('" "')}catch(d){}if(f)try{f=1!==p("01")}catch(d){}if(f)try{f=1!==p("1.")}catch(d){}}}}catch(d){f=!1}t=f}}return s[e]=!!t}t||(t=r.Object()),a||(a=r.Object());var i=t.Number||r.Number,o=t.String||r.String,l=t.Object||r.Object,c=t.Date||r.Date,u=t.SyntaxError||r.SyntaxError,d=t.TypeError||r.TypeError,p=t.Math||r.Math,f=t.JSON||r.JSON;"object"==typeof f&&f&&(a.stringify=f.stringify,a.parse=f.parse);var h,v,g,m=l.prototype,b=m.toString,y=new c(-0xc782b5b800cec);try{y=-109252==y.getUTCFullYear()&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(w){}if(!s("json")){var k="[object Function]",T="[object Date]",E="[object Number]",S="[object String]",x="[object Array]",O="[object Boolean]",C=s("bug-string-char-index");if(!y)var P=p.floor,_=[0,31,59,90,120,151,181,212,243,273,304,334],j=function(e,t){return _[t]+365*(e-1970)+P((e-1969+(t=+(t>1)))/4)-P((e-1901+t)/100)+P((e-1601+t)/400)};if((h=m.hasOwnProperty)||(h=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=b?h=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,h=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,h.call(this,e)}),v=function(e,t){var a,r,s,i=0;(a=function(){this.valueOf=0}).prototype.valueOf=0,r=new a;for(s in r)h.call(r,s)&&i++;return a=r=null,i?v=2==i?function(e,t){var n,a={},r=b.call(e)==k;for(n in e)r&&"prototype"==n||h.call(a,n)||!(a[n]=1)||!h.call(e,n)||t(n)}:function(e,t){var n,a,r=b.call(e)==k;for(n in e)r&&"prototype"==n||!h.call(e,n)||(a="constructor"===n)||t(n);(a||h.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(e,t){var a,s,i=b.call(e)==k,o=!i&&"function"!=typeof e.constructor&&n[typeof e.hasOwnProperty]&&e.hasOwnProperty||h;for(a in e)i&&"prototype"==a||!o.call(e,a)||t(a);for(s=r.length;a=r[--s];o.call(e,a)&&t(a));}),v(e,t)},!s("json-stringify")){var L={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",N=function(e,t){return(A+(t||0)).slice(-e)},M="\\u00",D=function(e){for(var t='"',n=0,a=e.length,r=!C||a>10,s=r&&(C?e.split(""):e);a>n;n++){var i=e.charCodeAt(n);switch(i){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=L[i];break;default:if(32>i){t+=M+N(2,i.toString(16));break}t+=r?s[n]:e.charAt(n)}}return t+'"'},I=function(e,t,n,a,r,s,i){var o,l,c,u,p,f,m,y,w,k,C,_,L,A,M,R;try{o=t[e]}catch(U){}if("object"==typeof o&&o)if(l=b.call(o),l!=T||h.call(o,"toJSON"))"function"==typeof o.toJSON&&(l!=E&&l!=S&&l!=x||h.call(o,"toJSON"))&&(o=o.toJSON(e));else if(o>-1/0&&1/0>o){if(j){for(p=P(o/864e5),c=P(p/365.2425)+1970-1;j(c+1,0)<=p;c++);for(u=P((p-j(c,0))/30.42);j(c,u+1)<=p;u++);p=1+p-j(c,u),f=(o%864e5+864e5)%864e5,m=P(f/36e5)%24,y=P(f/6e4)%60,w=P(f/1e3)%60,k=f%1e3}else c=o.getUTCFullYear(),u=o.getUTCMonth(),p=o.getUTCDate(),m=o.getUTCHours(),y=o.getUTCMinutes(),w=o.getUTCSeconds(),k=o.getUTCMilliseconds();o=(0>=c||c>=1e4?(0>c?"-":"+")+N(6,0>c?-c:c):N(4,c))+"-"+N(2,u+1)+"-"+N(2,p)+"T"+N(2,m)+":"+N(2,y)+":"+N(2,w)+"."+N(3,k)+"Z"}else o=null;if(n&&(o=n.call(t,e,o)),null===o)return"null";if(l=b.call(o),l==O)return""+o;if(l==E)return o>-1/0&&1/0>o?""+o:"null";if(l==S)return D(""+o);if("object"==typeof o){for(A=i.length;A--;)if(i[A]===o)throw d();if(i.push(o),C=[], -M=s,s+=r,l==x){for(L=0,A=o.length;A>L;L++)_=I(L,o,n,a,r,s,i),C.push(_===g?"null":_);R=C.length?r?"[\n"+s+C.join(",\n"+s)+"\n"+M+"]":"["+C.join(",")+"]":"[]"}else v(a||o,function(e){var t=I(e,o,n,a,r,s,i);t!==g&&C.push(D(e)+":"+(r?" ":"")+t)}),R=C.length?r?"{\n"+s+C.join(",\n"+s)+"\n"+M+"}":"{"+C.join(",")+"}":"{}";return i.pop(),R}};a.stringify=function(e,t,a){var r,s,i,o;if(n[typeof t]&&t)if((o=b.call(t))==k)s=t;else if(o==x){i={};for(var l,c=0,u=t.length;u>c;l=t[c++],o=b.call(l),(o==S||o==E)&&(i[l]=1));}if(a)if((o=b.call(a))==E){if((a-=a%1)>0)for(r="",a>10&&(a=10);r.lengthR;)switch(r=s.charCodeAt(R)){case 9:case 10:case 13:case 32:R++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=C?s.charAt(R):s[R],R++,e;case 34:for(e="@",R++;i>R;)if(r=s.charCodeAt(R),32>r)F();else if(92==r)switch(r=s.charCodeAt(++R)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=q[r],R++;break;case 117:for(t=++R,n=R+4;n>R;R++)r=s.charCodeAt(R),r>=48&&57>=r||r>=97&&102>=r||r>=65&&70>=r||F();e+=z("0x"+s.slice(t,R));break;default:F()}else{if(34==r)break;for(r=s.charCodeAt(R),t=R;r>=32&&92!=r&&34!=r;)r=s.charCodeAt(++R);e+=s.slice(t,R)}if(34==s.charCodeAt(R))return R++,e;F();default:if(t=R,45==r&&(a=!0,r=s.charCodeAt(++R)),r>=48&&57>=r){for(48==r&&(r=s.charCodeAt(R+1),r>=48&&57>=r)&&F(),a=!1;i>R&&(r=s.charCodeAt(R),r>=48&&57>=r);R++);if(46==s.charCodeAt(R)){for(n=++R;i>n&&(r=s.charCodeAt(n),r>=48&&57>=r);n++);n==R&&F(),R=n}if(r=s.charCodeAt(R),101==r||69==r){for(r=s.charCodeAt(++R),(43==r||45==r)&&R++,n=R;i>n&&(r=s.charCodeAt(n),r>=48&&57>=r);n++);n==R&&F(),R=n}return+s.slice(t,R)}if(a&&F(),"true"==s.slice(R,R+4))return R+=4,!0;if("false"==s.slice(R,R+5))return R+=5,!1;if("null"==s.slice(R,R+4))return R+=4,null;F()}return"$"},H=function(e){var t,n;if("$"==e&&F(),"string"==typeof e){if("@"==(C?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=B(),"]"!=e;n||(n=!0))n&&(","==e?(e=B(),"]"==e&&F()):F()),","==e&&F(),t.push(H(e));return t}if("{"==e){for(t={};e=B(),"}"!=e;n||(n=!0))n&&(","==e?(e=B(),"}"==e&&F()):F()),(","==e||"string"!=typeof e||"@"!=(C?e.charAt(0):e[0])||":"!=B())&&F(),t[e.slice(1)]=H(B());return t}F()}return e},$=function(e,t,n){var a=J(e,t,n);a===g?delete e[t]:e[t]=a},J=function(e,t,n){var a,r=e[t];if("object"==typeof r&&r)if(b.call(r)==x)for(a=r.length;a--;)$(r,a,n);else v(r,function(e){$(r,e,n)});return n.call(e,t,r)};a.parse=function(e,t){var n,a;return R=0,U=""+e,n=H(B()),"$"!=B()&&F(),R=U=null,t&&b.call(t)==k?J((a={},a[""]=n,a),"",t):n}}}return a.runInContext=e,a}var t="function"==typeof define&&define.amd,n={"function":!0,object:!0},a=n[typeof exports]&&exports&&!exports.nodeType&&exports,r=n[typeof window]&&window||this,s=a&&n[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(r=s),a&&!t)e(r,a);else{var i=r.JSON,o=r.JSON3,l=!1,c=e(r,r.JSON3={noConflict:function(){return l||(l=!0,r.JSON=i,r.JSON3=o,i=o=null),c}});r.JSON={parse:c.parse,stringify:c.stringify}}t&&define(function(){return c})}.call(this);var Url=function(){"use strict";var e={protocol:"protocol",host:"hostname",port:"port",path:"pathname",query:"search",hash:"hash"},t={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},n=function(n,a){var i,o=document,l=o.createElement("a"),a=a||o.location.href,c=a.match(/\/\/(.*?)(?::(.*?))?@/)||[];l.href=a;for(i in e)n[i]=l[e[i]]||"";if(n.protocol=n.protocol.replace(/:$/,""),n.query=n.query.replace(/^\?/,""),n.hash=r(n.hash.replace(/^#/,"")),n.user=r(c[1]||""),n.pass=r(c[2]||""),n.port=t[n.protocol]==n.port||0==n.port?"":n.port,n.protocol||/^([a-z]+:)?\/\//.test(a))n.path=n.path.replace(/^\/?/,"/");else{var u=new Url(o.location.href.match(/(.*\/)/)[0]),d=u.path.split("/"),p=n.path.split("/"),f=["protocol","user","pass","host","port"],h=f.length;for(d.pop(),i=0;h>i;i++)n[f[i]]=u[f[i]];for(;".."==p[0];)d.pop(),p.shift();n.path=("/"!=a.charAt(0)?d.join("/"):"")+"/"+p.join("/")}n.paths(("/"==n.path.charAt(0)?n.path.slice(1):n.path).split("/")),s(n)},a=function(e){return encodeURIComponent(e).replace(/'/g,"%27")},r=function(e){return e=e.replace(/\+/g," "),e=e.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n,a){var r=parseInt(t,16)-224,s=parseInt(n,16)-128;if(0==r&&32>s)return e;var i=parseInt(a,16)-128,o=(r<<12)+(s<<6)+i;return o>65535?e:String.fromCharCode(o)}),e=e.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n){var a=parseInt(t,16)-192;if(2>a)return e;var r=parseInt(n,16)-128;return String.fromCharCode((a<<6)+r)}),e=e.replace(/%([0-7][0-9a-f])/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})},s=function(e){var t=e.query;e.query=new function(e){for(var t,n=/([^=&]+)(=([^&]*))?/g;t=n.exec(e);){var s=decodeURIComponent(t[1].replace(/\+/g," ")),i=t[3]?r(t[3]):"";null!=this[s]?(this[s]instanceof Array||(this[s]=[this[s]]),this[s].push(i)):this[s]=i}this.clear=function(){for(var e in this)this[e]instanceof Function||delete this[e]},this.count=function(){var e,t=0;for(e in this)this[e]instanceof Function||t++;return t},this.isEmpty=function(){return 0===this.count()},this.toString=function(){var e,t,n="",r=a;for(e in this)if(!(this[e]instanceof Function))if(this[e]instanceof Array){var s=this[e].length;if(s)for(t=0;s>t;t++)n+=n?"&":"",n+=r(e)+"="+r(this[e][t]);else n+=(n?"&":"")+r(e)+"="}else n+=n?"&":"",n+=r(e)+"="+r(this[e]);return n}}(t)};return function(e){this.paths=function(e){var t,n="",s=0;if(e&&e.length&&e+""!==e){for(this.isAbsolute()&&(n="/"),t=e.length;t>s;s++)e[s]=a(e[s]);this.path=n+e.join("/")}for(e=("/"===this.path.charAt(0)?this.path.slice(1):this.path).split("/"),s=0,t=e.length;t>s;s++)e[s]=r(e[s]);return e},this.encode=a,this.decode=r,this.isAbsolute=function(){return this.protocol||"/"===this.path.charAt(0)},this.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&a(this.user)+(this.pass&&":"+a(this.pass))+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+a(this.hash))},n(this,e)}}();!function(e){"use strict";function t(){return u.createDocumentFragment()}function n(e){return u.createElement(e)}function a(e){if(1===e.length)return r(e[0]);for(var n=t(),a=z.call(e),s=0;s-1}}([].indexOf||function(e){for(q=this.length;q--&&this[q]!==e;);return q}),item:function(e){return this[e]||null},remove:function(){for(var e,t=0;ti?r[c.call(a,s)-1]=y.call(s,this):r[i]},emit:function(e){for(var t=l.call(this,f),a=t&&this[f].l,r=t&&l.call(a,e),s=r&&a[e].slice(0),i=r&&u.call(arguments,1),o=0,c=r?s.length:o;c>o;)n(this,s[o++],i);return r},expect:function(){for(var e=0;e-1&&(s.splice(n,1),s.length||delete r[e])),this},on:function(e,t,n){var a=l.call(this,f),r=(a?this[f]:T(this)).l,s=a&&l.call(r,e)?r[e]:r[e]=[];return w.call(s,t)<0&&(n?d:c).call(s,t),this},once:function(e,t,a){var r=function(i){s.off(e,r,a),n(s,t,arguments)},s=this;return s.on(e,r,a)},trigger:function(e,t){var r=l.call(this,f),s=r&&this[f].l,i="string"==typeof e,c=i?e:e.type,u=r&&l.call(s,c),d=u&&s[c].slice(0),p=i?new a(this,c,t):e,h=0,v=u?d.length:h,g=!(p instanceof a);for(g&&(p._active=!0,p.stopImmediatePropagation=o.stopImmediatePropagation),p.currentTarget=this,m[0]=p;p._active&&v>h;)n(this,d[h++],m);return g&&(delete p._active,delete p.stopImmediatePropagation),!p.defaultPrevented},when:function(e,t){var a=l.call(this,f),r=(a?this[f]:T(this)).w,s=a&&l.call(r,e);return s?(n(this,t,r[e]),this):this.once(e,function(){l.call(r,e)||(r[e]=arguments)},!0).once(e,t)}},x=function(e,t,n){l.call(e,t)||(e[t]=n)},O=!1;o.defaultPrevented=!1,o._active=o.cancelable=!0,o.preventDefault=function(){this.defaultPrevented=!0},o.stopImmediatePropagation=function(){this._active=!1};for(r in S)l.call(S,r)&&b(i,r,{enumerable:!1,configurable:!0,writable:!0,value:S[r]});!function(e){function t(t){function n(e){e[t].apply(e,this)}return function(){return e.call(this,n,arguments),this}}for(var n in S)S.hasOwnProperty(n)&&!/^listeners|boundTo$/.test(n)&&b(s,n,{enumerable:!1,configurable:!0,writable:!0,value:t(n)})}(s.forEach||function(e,t){for(var n=this,a=0;a-1&&(n.splice(a,1),n.length||(self["on"+e]=null))}),u.expect("ready","DOMContentLoaded"),/loaded|complete/.test(u.readyState)?(e.setImmediate||setTimeout)(c):u.once("DOMContentLoaded",c,!0)}(window),"$"in window||b(window,"$",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=t||document,a=e.length-6,r=e.lastIndexOf(":first")===a&&a>0,s=r?n.querySelector(e.slice(0,a)):n.querySelectorAll(e);return r?s?[s]:[]:v.call(s)}})}}(Object);var Class=Class||function(e){"use strict";function t(e,t,a){for(var r,s=[],i=0;it;)r[t++].call(this);return e.apply(this,arguments)}}(k),k[f]=S)),y.call(e,h)&&n(e[h],k,b,!0,!0),p&&(v!==b&&n(v,k,b,!0,!0),k[f]=S),S[c]!==k&&a(S,c,k,!1),n(e,S,b,!1,!0),y.call(e,d)&&i([].concat(e[d]),S),k}}(Object);(function(){this.NANO={INTERACTIVE:2,UPDATE:1,DISABLED:0}}).call(this),function(){this.helpers={link:function(e,t,n,a,r,s){return null==e&&(e=""),null==t&&(t=""),null==n&&(n=""),null==a&&(a={}),null==r&&(r=""),null==s&&(s=""),a=JSON.stringify(a),t&&(t="",s+=" iconed"),r?""+t+e+"":""+t+e+""},bar:function(e,t,n,a,r){var s;return null==e&&(e=0),null==t&&(t=0),null==n&&(n=100),null==a&&(a=""),null==r&&(r=""),n>t?t>e?e=t:e>n&&(e=n):e>t?e=t:n>e&&(e=n),s=Math.round((e-t)/(n-t)*100),"
"+r+"
"},round:function(e){return Math.round(e)},fixed:function(e,t){return null==t&&(t=1),Number(Math.round(e+"e"+t)+"e-"+t)},floor:function(e){return Math.floor(e)},ceil:function(e){return Math.ceil(e)}}}.call(this),function(){document.when("ready",function(e){return function(){var t;t={},e.nanoui=new e.NanoUI(t,document),e.nanowindow=new e.Window(t,document),t.emit("memes"),e.NanoBus=t}}(this))}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.NanoUI=function(){function t(t,n){this.bus=t,this.fragment=null!=n?n:document,this.winset=e(this.winset,this),this.close=e(this.close,this),this.act=e(this.act,this),this.render=e(this.render,this),this.update=e(this.update,this),this.serverUpdate=e(this.serverUpdate,this),this.bus.on("serverUpdate",this.serverUpdate),this.bus.on("update",this.update),this.bus.on("render",this.render),this.bus.on("memes",this.render),this.initialized=!1,this.data={},this.initialData=JSON.parse(this.fragment.query("#data").data("initial")),null==this.initialData&&("data"in this.initialData||"config"in this.initalData)&&this.error("Initial data did not load correctly.")}return t.prototype.serverUpdate=function(e){var t,n,a;try{t=JSON.parse(e)}catch(a){n=a,this.error(n)}this.bus.emit("update",t)},t.prototype.update=function(e){null==e.data&&(null!=this.data.data?e.data=this.data.data:e.data={}),this.data=e,this.initialized&&this.bus.emit("render",this.data),this.bus.emit("updated")},t.prototype.render=function(e){var t,n,a,r;this.initialized||(e=this.initialData);try{this.initialized||(r=this.fragment.query("#layout"),r.innerHTML=TMPL[e.config.templates.layout](e.data,e.config,helpers)),t=this.fragment.query("#content"),t.innerHTML=TMPL[e.config.templates.content](e.data,e.config,helpers)}catch(a){return n=a,void this.error(n)}return this.bus.emit("rendered",e),this.initialized?void 0:(this.initialized=!0,this.data=this.initialData,this.bus.emit("initialized",e))},t.prototype.act=function(e,t){return null==t&&(t={}),t.src=this.data.config.ref,t.nano=e,location.href=util.href(null,t)},t.prototype.error=function(e){var t;return e instanceof Error&&(e=e.fileName+":"+e.lineNumber+" "+e.message),t={nano_error:e},location.href=util.href(null,t)},t.prototype.log=function(e){var t;return t={nano_log:e},location.href=util.href(null,t)},t.prototype.close=function(){var e;return e={command:"nanoclose "+this.data.config.ref},this.winset("is-visible","false"),location.href=util.href("winset",e)},t.prototype.winset=function(e,t,n){var a,r;return null==n&&(n=this.data.config.window.ref),a={},a[n+"."+e]=t,r=a,location.href=util.href("winset",r)},t}()}.call(this),function(){this.util={extend:function(e,t){return Object.keys(t).forEach(function(n){var a;return a=t[n],a&&"[object Object]"===Object.prototype.toString.call(a)?(e[n]=e[n]||{},util.extend(e[n],a)):e[n]=a}),e},href:function(e,t){return null==e&&(e=""),null==t&&(t={}),e=new Url("byond://"+e),util.extend(e.query,t),e}}}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.Window=function(){function t(t,n){this.bus=t,this.fragment=null!=n?n:document,this.attachLinks=e(this.attachLinks,this),this.updateLinks=e(this.updateLinks,this),this.updateStatus=e(this.updateStatus,this),this.resize=e(this.resize,this),this.attachResize=e(this.attachResize,this),this.drag=e(this.drag,this),this.attachDrag=e(this.attachDrag,this),this.attachButtons=e(this.attachButtons,this),this.calcOffset=e(this.calcOffset,this),this.fancyChrome=e(this.fancyChrome,this),this.dragging=!1,this.resizing=!1,this.bus.once("initialized",function(e){return function(t){return setTimeout(e.focusMap,100),t.config.user.fancy?(e.fancyChrome(),e.calcOffset(),e.attachButtons(),e.attachDrag(),e.attachResize()):void 0}}(this)),this.bus.on("rendered",this.updateStatus),this.bus.on("rendered",this.updateLinks),this.bus.on("rendered",this.attachLinks),this.fragment.on("keydown",this.focusMap)}return t.prototype.setPos=function(e,t){return nanoui.winset("pos",e+","+t)},t.prototype.setSize=function(e,t){return nanoui.winset("size",e+","+t)},t.prototype.focusMap=function(){return nanoui.winset("focus",1,"mapwindow.map")},t.prototype.fancyChrome=function(){var e;return nanoui.winset("titlebar",0),nanoui.winset("can-resize",0),e=this.fragment.queryAll(".fancy"),e.forEach(function(e){return e.classList.remove("fancy")})},t.prototype.calcOffset=function(){return this.xOriginal=window.screenLeft,this.yOriginal=window.screenTop,this.setPos(0,0),this.xOffset=window.screenLeft,this.yOffset=window.screenTop,this.setPos(this.xOriginal-this.xOffset,this.yOriginal-this.yOffset)},t.prototype.attachButtons=function(){var e,t,n,a;return e=function(){return nanoui.close()},n=function(){return nanoui.winset("is-minimized","true")},t=this.fragment.queryAll(".close"),t.forEach(function(t){return t.on("click",e)}),a=this.fragment.queryAll(".minimize"),a.forEach(function(e){return e.on("click",n)})},t.prototype.attachDrag=function(){var e;return e=this.fragment.query("#titlebar"),this.fragment.on("mousemove",this.drag),e.on("mousedown",function(e){return function(){return e.dragging=!0}}(this)),this.fragment.on("mouseup",function(e){return function(){return e.dragging=!1}}(this))},t.prototype.drag=function(e){var t,n;return null==e&&(e=window.event),this.dragging?(null==this.xDrag&&(this.xDrag=e.screenX),null==this.yDrag&&(this.yDrag=e.screenY),t=e.screenX-this.xDrag+(window.screenLeft-this.xOffset),n=e.screenY-this.yDrag+(window.screenTop-this.yOffset),this.setPos(t,n),this.xDrag=e.screenX,this.yDrag=e.screenY):void 0},t.prototype.attachResize=function(){var e;return e=this.fragment.query("#resize"),this.fragment.on("mousemove",this.resize),e.on("mousedown",function(e){return function(){return e.resizing=!0}}(this)),this.fragment.on("mouseup",function(e){return function(){return e.resizing=!1}}(this))},t.prototype.resize=function(e){var t,n;return null==e&&(e=window.event),this.resizing?(null==this.xResize&&(this.xResize=e.screenX),null==this.yResize&&(this.yResize=e.screenY),t=e.screenX-this.xResize+window.innerWidth,n=e.screenY-this.yResize+window.innerHeight,this.setSize(t,n),this.xResize=e.screenX,this.yResize=e.screenY):void 0},t.prototype.updateStatus=function(e){var t;return t=this.fragment.queryAll(".statusicon"),t.forEach(function(t){var n;switch(t.className=t.className.replace(/good|bad|average/g,""),e.config.status){case NANO.INTERACTIVE:n="good";break;case NANO.UPDATE:n="average";break;default:n="bad"}return t.classList.add(n)})},t.prototype.updateLinks=function(e){var t;return t=this.fragment.queryAll(".link"),e.config.status!==NANO.INTERACTIVE?t.forEach(function(e){return e.className="link disabled"}):void 0},t.prototype.attachLinks=function(e){var t;return t=function(){var t,n;return t=this.data("action"),n=JSON.parse(this.data("params")),null!=t&&null!=n&&e.config.status===NANO.INTERACTIVE?nanoui.act(t,n):void 0},this.fragment.queryAll(".link.active").forEach(function(e){return e.on("click",t)})},t}()}.call(this),window.TMPL={},TMPL.airlock_electronics=function(e,t,n){var a='
';a+=e.oneAccess?""+n.link("One Required","unlock","one_access"):""+n.link("All Required","lock","one_access"),a+=""+n.link("Clear","refresh","clear")+'
';var r=e.regions;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+='";a+="";var l=e.regions;if(l)for(var s,i=-1,c=l.length-1;c>i;){s=l[i+=1],a+=""}return a+="
'+s.name+"
";var u=s.accesses;if(u)for(var d,p=-1,f=u.length-1;f>p;)d=u[p+=1],a+=""+n.link(d.name,d.req?"check-square-o":"square-o","set",{access:d.id},null,d.req?"selected":null)+"
";a+="
"},TMPL.air_alarm=function(e,t,n){var a='
';if(a+=e.siliconUser?'
Interface Lock:
'+n.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+n.link("Disengaged","unlock","toggleaccess",null,e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",a+='

Air Status

',e.environment_data){var r=e.environment_data;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+='
'+s.name+':
',a+=2==s.danger_level?'':1==s.danger_level?'':'',a+=""+n.fixed(s.value,2)+s.unit+"
";a+='
Local Status:
',a+=2==e.danger_level?'Danger (Internals Required)':1==e.danger_level?'Caution':'Optimal',a+='
Area Status:
',a+=e.atmos_alarm?'Atmosphere Alarm':e.fire_alarm?'Fire Alarm':'Nominal',a+="
"}else a+='
Warning: Cannot obtain air sample for analysis.
';if(e.dangerous&&(a+='
Warning: Safety measures offline. Device may exhibit abnormal behavior.
'),a+="
",!e.locked||e.siliconUser)if(1!=e.screen&&(a+=""+n.link("Back","arrow-left","screen",{screen:1})),1==e.screen)a+='

Air Controls

',a+=e.atmos_alarm?""+n.link("Area Atmospheric Alarm","close","reset",null,null,"caution"):""+n.link("Area Atmospheric Alarm","hand-stop-o","alarm"),a+='
',a+=3!=e.mode?""+n.link("Panic Siphon","exclamation","mode",{mode:3}):""+n.link("Panic Siphon","close","mode",{mode:1},null,"danger"),a+='
'+n.link("Vent Controls","sign-out","screen",{screen:2})+'
'+n.link("Scrubber Controls","filter","screen",{screen:3})+'
'+n.link("Set Environmental Mode","cog","screen",{screen:4})+'
'+n.link("Set Alarm Threshold","bar-chart","screen",{screen:5})+"
";else if(2==e.screen){var l=e.vents;if(l)for(var c,i=-1,u=l.length-1;u>i;)c=l[i+=1],a+='

'+c.long_name+'

Power:
',a+=c.power?""+n.link("On","power-off","adjust",{id_tag:c.id_tag,command:"power",val:0},null,null):""+n.link("Off","close","adjust",{id_tag:c.id_tag,command:"power",val:1},null,"danger"),a+='
Mode:
',a+="release"==c.direction?'Pressurizing':'Siphoning',a+='
Pressure Checks:
'+n.link("Internal","sign-in","adjust",{id_tag:c.id_tag,command:"incheck",val:c.checks},null,c.incheck?"selected":null)+n.link("External","sign-out","adjust",{id_tag:c.id_tag,command:"excheck",val:c.checks},null,c.excheck?"selected":null)+'
Set Pressure:
'+n.link(n.fixed(c.external),"pencil","adjust",{id_tag:c.id_tag,command:"set_external_pressure"})+n.link("Reset","refresh","adjust",{id_tag:c.id_tag,command:"reset_external_pressure"},c.extdefault?"disabled":null)+"
";e.vents.length||(a+='No vents connected.')}else if(3==e.screen){var d=e.scrubbers;if(d)for(var p,i=-1,f=d.length-1;f>i;)p=d[i+=1],a+='

'+p.long_name+'

Power:
',a+=p.power?""+n.link("On","power-off","adjust",{id_tag:p.id_tag,command:"power",val:0},null,null):""+n.link("Off","close","adjust",{id_tag:p.id_tag,command:"power",val:1},null,"danger"),a+='
Mode:
', -a+=p.scrubbing?""+n.link("Scrubbing","filter","adjust",{id_tag:p.id_tag,command:"scrubbing",val:0},null,null):""+n.link("Siphoning","sign-in","adjust",{id_tag:p.id_tag,command:"scrubbing",val:1},null,"danger"),a+='
Range:
',a+=p.widenet?""+n.link("Extended","expand","adjust",{id_tag:p.id_tag,command:"widenet",val:0},null,"caution"):""+n.link("Normal","compress","adjust",{id_tag:p.id_tag,command:"widenet",val:1},null,null),a+='
Filters:
'+n.link("CO2",p.filter_co2?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"co2_scrub",val:p.filter_co2?0:1},null,p.filter_co2?"selected":null)+n.link("N2O",p.filter_n2o?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"n2o_scrub",val:p.filter_n2o?0:1},null,p.filter_n2o?"selected":null)+n.link("Plasma",p.filter_toxins?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"tox_scrub",val:p.filter_toxins?0:1},null,p.filter_toxins?"selected":null)+"
";e.scrubbers.length||(a+='No scrubbers connected.')}else if(4==e.screen){a+='

Environmental Modes

';var h=e.modes;if(h)for(var v,i=-1,g=h.length-1;g>i;)v=h[i+=1],a+='
'+n.link(v.name,v.selected?"check-square-o":"square-o","mode",{mode:v.mode},null,v.selected?v.danger?"danger":"selected":null)+"
";a+="
"}else if(5==e.screen){a+='

Alarm Thresholds

';var m=e.thresholds;if(m)for(var b,i=-1,y=m.length-1;y>i;){b=m[i+=1],a+="";var w=b.settings;if(w)for(var k,T=-1,E=w.length-1;E>T;)k=w[T+=1],a+="";a+=""}a+="
min2min1max1max2
"+b.name+""+n.link(k.selected>=0?n.round(100*k.selected)/100:"Off",null,"adjust",{command:"set_threshold",env:k.env,"var":k.val})+"
"}return a},TMPL.apc=function(e,t,n){var a='
';a+=e.siliconUser?'
Interface Lock:
'+n.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+n.link("Disengaged","unlock","toggleaccess",null,e.malfStatus>=2?"linkOff":e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",a+='

Power Status

Main Breaker:
',a+=e.locked&&!e.siliconUser?e.isOperating?'On':'Off':""+n.link("On","power-off","breaker",null,e.isOperating?"selected":null)+n.link("Off","close","breaker",null,e.isOperating?null:"selected"),a+='
External Power:
',a+=2==e.externalPower?'Good':1==e.externalPower?'Low':'None',a+='
Power Cell:
',a+=null!=e.powerCellStatus?""+n.bar(e.powerCellStatus,0,100,e.powerCellStatus>=50?"good":e.powerCellStatus>=25?"average":"bad",n.fixed(e.powerCellStatus)+"%"):'Power cell removed.',a+="
",null!=e.powerCellStatus&&(a+='
Charge Mode:
',a+=e.locked&&!e.siliconUser?e.chargeMode?'Auto':'Off':""+n.link("Auto","refresh","chargemode",null,e.chargeMode?"selected":null)+n.link("Off","close","chargemode",null,e.chargeMode?null:"selected"),a+=" ",a+=e.chargingStatus>1?'[Fully Charged]':1==e.chargingStatus?'[Charging]':'[Not Charging]',a+="
"),a+='

Power Channels

';var r=e.powerChannels;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+="";return a+='
"+s.title+":"+s.powerLoad+" W",s.status<=1?a+='Off':s.status>=2&&(a+='On'),a+="",a+=1==s.status||3==s.status?"[Auto]":"[Manual]",a+='',(!e.locked||e.siliconUser)&&(a+=""+n.link("Auto","refresh","channel",s.topicParams.auto,1==s.status||3==s.status?"selected":null)+n.link("On","power-off","channel",s.topicParams.on,2==s.status?"selected":null)+n.link("Off","close","channel",s.topicParams.off,0==s.status?"selected":null)),a+="
Total Load:'+e.totalLoad+" W
",e.siliconUser&&(a+='

System Overrides

'+n.link("Overload Lighting Circuit","lightbulb-o","overload")+"
",1==e.malfStatus?a+=""+n.link("Override Programming","terminal","hack"):2==e.malfStatus?a+=""+n.link("Shunt Core Processes","caret-square-o-down","occupy"):3==e.malfStatus?a+=""+n.link("Return to Main Core","carat-square-o-left","deoccupy"):4==e.malfStatus&&(a+=""+n.link("Shunt Core Processes","caret-square-o-down")),a+="
"),a+='
Cover Lock:
',a+=e.locked&&!e.siliconUser?e.coverLocked?"Engaged":"Disengaged":""+n.link("Engaged","lock","lock",null,e.coverLocked?"selected":null)+n.link("Disengaged","unlock","lock",null,e.coverLocked?null:"selected"),a+="
"},TMPL.atmos_filter=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Filter:
'+n.link("Nothing",null,"filter",{mode:-1},-1==e.filter_type?"selected":null)+n.link("Plasma",null,"filter",{mode:0},0==e.filter_type?"selected":null)+n.link("O2",null,"filter",{mode:1},1==e.filter_type?"selected":null)+n.link("N2",null,"filter",{mode:2},2==e.filter_type?"selected":null)+n.link("CO2",null,"filter",{mode:3},3==e.filter_type?"selected":null)+n.link("N2O",null,"filter",{mode:4},4==e.filter_type?"selected":null)+"
";return a},TMPL.atmos_mixer=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Node 1:
'+n.link("","fast-backward","node1",{concentration:"-0.1"},null)+n.link("","backward","node1",{concentration:"-0.01"},null)+n.link("","forward","node1",{concentration:"0.01"},null)+n.link("","fast-forward","node1",{concentration:"0.1"},null)+''+e.node1_concentration+'%
Node 2:
'+n.link("","fast-backward","node2",{concentration:"-0.1"},null)+n.link("","backward","node2",{concentration:"-0.01"},null)+n.link("","forward","node2",{concentration:"0.01"},null)+n.link("","fast-forward","node2",{concentration:"0.1"},null)+''+e.node2_concentration+"%
";return a},TMPL.atmos_pump=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+"
";return a+=e.max_rate?'
Transfer Rate:
'+n.link("Set","pencil","transfer",{set:"custom"})+n.link("Max","plus","transfer",{set:"max"},e.transfer_rate==e.max_rate?"disabled":null)+''+e.transfer_rate+" L/s
":'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+" kPa
",a+="
"},TMPL.canister=function(e,t,n){var a='
';return a+=e.hasHoldingTank?"The regulator is connected to a tank.":"The regulator is not connected to a tank.",a+='

Canister

'+n.link("Relabel","pencil","relabel",null,e.canLabel?null:"disabled")+'
Pressure:
'+e.tankPressure+' kPa
Port:
',a+=e.portConnected?'Connected':'Disconnected',a+='

Valve

Release Pressure:
'+n.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+n.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+n.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+n.link("Set","pencil","pressure",{set:"custom"},null)+n.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+n.link("Open","unlock","valve",null,e.valveOpen?"selected":null)+n.link("Close","lock","valve",null,e.valveOpen?null:"selected")+'

Holding Tank

',a+=e.hasHoldingTank?"
"+n.link("Eject","eject","eject")+'
Label:
'+e.holdingTank.name+'
Tank Pressure:
'+e.holdingTank.tankPressure+" kPa
":'
No Holding Tank
',a+="
"},TMPL.chem_dispenser=function(e,t,n){var a='

Status

Energy:
'+n.bar(e.energy,0,e.maxEnergy,null,e.energy+" Units")+'
Amount:
',r=e.beakerTransferAmounts;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=""+n.link(s,"plus","amount",{set:s},e.amount==s?"selected":null);a+='

Dispense

';var l=e.chemicals;if(l)for(var c,i=-1,u=l.length-1;u>i;)c=l[i+=1],a+=""+n.link(c.title,"tint","dispense",c.commands,null,"gridable");a+='

Beaker

'+n.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
';var d=e.beakerTransferAmounts;if(d)for(var s,i=-1,p=d.length-1;p>i;)s=d[i+=1],a+=""+n.link(s,"minus","remove",{amount:s});if(a+='
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){a+=""+e.beakerCurrentVolume+"/"+e.beakerMaxVolume+" Units
";var f=e.beakerContents;if(f)for(var h,i=-1,v=f.length-1;v>i;)h=f[i+=1],a+=''+h.volume+" units of "+h.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.chem_heater=function(e,t,n){var a='

Status

Power:
'+n.link(e.isActive?"On":"Off",e.isActive?"power-off":"close","power",null,e.isBeakerLoaded?null:"disabled")+'
Target:
'+n.link(e.targetTemp+"K","pencil","temperature")+'

Beaker

'+n.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
';if(e.isBeakerLoaded)if(a+="Temperature: "+e.currentTemp+"K
",e.beakerContents.length){var r=e.beakerContents;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=''+s.volume+" units of "+s.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.cryo=function(e,t,n){var a='

Occupant

Occupant:
';if(a+=e.hasOccupant?""+e.occupant.name+"":'No Occupant',a+="
",e.hasOccupant&&(a+='
State:
',a+=0==e.occupant.stat?'Conscious':1==e.occupant.stat?'Unconscious':'Dead',a+='
Temperature:
'+n.round(e.occupant.bodyTemperature)+" K
"),e.hasOccupant&&e.occupant.stat<2&&(a+='
Health:
'+n.bar(e.occupant.health,e.occupant.minHealth,e.occupant.Maxhealth,e.occupant.health>=0?"good":"average",n.round(e.occupant.health))+'
Brute:
'+n.bar(e.occupant.bruteLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.bruteLoss))+'
Respiratory:
'+n.bar(e.occupant.oxyLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.oxyLoss))+'
Toxin:
'+n.bar(e.occupant.toxLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.toxLoss))+'
Burn:
'+n.bar(e.occupant.fireLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.fireLoss))+"
"),a+='

Cell

Power:
',a+=e.isOperating?""+n.link("On","power-off","off"):""+n.link("Off","close","on"),a+='
Temperature:
'+e.cellTemperature+' K
Door:
',a+=e.isOpen?""+n.link("Open","unlock","close"):""+n.link("Closed","lock","open"),a+=e.autoEject?""+n.link("Auto","sign-out","autoeject"):""+n.link("Manual","sign-in","autoeject"),a+='

Beaker

'+n.link("Eject","eject","ejectbeaker",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){var r=e.beakerContents;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=''+s.volume+" units of "+s.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.smes=function(e,t,n){var a='

Storage

Stored Energy:
'+n.bar(e.capacityPercent,0,100,e.capacityPercent>=50?"good":e.capacityPercent>=15?"average":"bad",n.round(e.capacityPercent)+"%")+'

Input

Charge Mode:
'+n.link("Auto","refresh","tryinput",null,e.inputAttempt?"selected":null)+n.link("Off","close","tryinput",null,e.inputAttempt?null:"selected")+" ";return a+=e.capacityPercent>=99?"[Fully Charged]":e.inputting?"[Charging]":"[Not Charging]",a+='
Input Setting:
'+n.bar(e.inputLevel,0,e.inputLevelMax,null,e.inputLevel+" W")+'
Adjust Input:
'+n.link("","fast-backward","input",{set:"min"},e.inputLevel?null:"selected")+n.link("","backward","input",{set:"minus"},e.inputLevel?null:"disabled")+n.link("Set","pencil","input",{set:"custom"},null)+n.link("","forward","input",{set:"plus"},e.inputLevel==e.inputLevelMax?"disabled":null)+n.link("","fast-forward","input",{set:"max"},e.inputLevel==e.inputLevelMax?"selected":null)+'
Available:
'+e.inputAvailable+' W

Output

Charge Mode:
'+n.link("On","power-off","tryoutput",null,e.outputAttempt?"selected":null)+n.link("Off","close","tryoutput",null,e.outputAttempt?null:"selected")+" ",a+=e.outputting?'[Sending]':e.charge>0?'[Not Sending]':'[No Charge]',a+='
Output Setting:
'+n.bar(e.outputLevel,0,e.outputLevelMax,null,e.outputLevel+" W")+'
Adjust Output:
'+n.link("","fast-backward","output",{set:"min"},e.outputLevel?null:"selected")+n.link("","backward","output",{set:"minus"},e.outputLevel?null:"disabled")+n.link("Set","pencil","output",{set:"custom"},null)+n.link("","forward","output",{set:"plus"},e.outputLevel==e.outputLevelMax?"disabled":null)+n.link("","fast-forward","output",{set:"max"},e.outputLevel==e.outputLevelMax?"selected":null)+'
Outputting:
'+e.outputUsed+" W
"},TMPL.solar_control=function(e,t,n){var a='

Status

Generated Power:
'+e.generated+' W
Orientation:
'+e.angle+"° ("+e.direction+')
Adjust:
'+n.link("15°","step-backward","control",{cdir:"-15"})+n.link("1°","backward","control",{cdir:"-1"})+n.link("1°","forward","control",{cdir:"1"})+n.link("15°","step-forward","control",{cdir:"15"})+'

Tracking

Tracker Mode:
'+n.link("Off","close","tracking",{mode:"0"},0==e.tracking_state?"selected":"")+n.link("Timed","clock-o","tracking",{mode:"1"},1==e.tracking_state?"selected":"");return a+=e.connected_tracker?""+n.link("Auto","refresh","tracking",{mode:"2"},2==e.tracking_state?"selected":""):""+n.link("Auto","refresh",null,null,"disabled"),a+='
Tracking Rate:
'+e.tracking_rate+" deg/h ("+e.rotating_way+')
Adjust:
'+n.link("180°","fast-backward","control",{tdir:"-180"})+n.link("30°","step-backward","control",{tdir:"-30"})+n.link("1°","backward","control",{tdir:"-1"})+n.link("1°","forward","control",{tdir:"1"})+n.link("30°","step-forward","control",{tdir:"30"})+n.link("180°","fast-forward","control",{tdir:"180"})+'

Devices

Search:
'+n.link("Refresh","refresh","refresh")+'
Solar Tracker:
',a+=e.connected_tracker?'Found':'Not Found',a+='
Solars Panels:
'+e.connected_panels+" Connected
"},TMPL.space_heater=function(e,t,n){var a='

Status

Power:
'+n.link("On","power-off","power",null,e.on?"selected":null)+n.link("Off","close","power",null,e.on?null:"selected")+'
Stored Energy:
';return a+=e.hasPowercell?""+n.bar(e.powerLevel,0,100,"good",e.powerLevel+"%"):'No power cell loaded.',a+="
",e.open&&(a+='
Cell:
',a+=e.hasPowercell?""+n.link("Eject","eject","ejectcell"):""+n.link("Install","eject","installcell"),a+="
"),a+='

Thermostat

Current Temp:
'+e.currentTemp+'°C
Target Temp:
'+e.targetTemp+"°C
",e.open&&(a+='
Adjustment:
'+n.link("","fast-backward","temp",{set:-20},e.targetTemp>e.minTemp?null:"disabled")+n.link("","backward","temp",{set:-5},e.targetTemp>e.minTemp?null:"disabled")+n.link("Set","pencil","temp",{set:"custom"},null)+n.link("","forward","temp",{set:5},e.targetTemp
"),a+='
Operational Mode:
',a+=e.open?""+n.link("Heat","long-arrow-up","mode",{mode:"heat"},"heat"!=e.mode?null:"selected")+n.link("Cool","long-arrow-down","mode",{mode:"cool"},"cool"!=e.mode?null:"selected")+n.link("Auto","arrows-v","mode",{mode:"auto"},"heat"==e.mode||"cool"==e.mode?null:"selected"):"heat"==e.mode?'Heat':"cool"==e.mode?'Cool':'Auto',a+="
"},TMPL.tanks=function(e,t,n){var a='
';return a+=e.hasHoldingTank?"The regulator is connected to a mask.":"The regulator is not connected to a mask.",a+='
Tank Pressure:
'+n.bar(e.tankPressure,0,1013,e.tankPressure>200?"good":e.tankPressure>100?"average":"bad",e.tankPressure+" kPa")+'
Release Pressure:
'+n.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+n.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+n.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+n.link("Set","pencil","pressure",{set:"custom"},null)+n.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+n.link("Open","unlock","valve",null,e.maskConnected?e.valveOpen?"selected":null:"disabled")+n.link("Close","lock","valuve",null,e.valveOpen?null:"selected")+"
"},TMPL._generic=function(e,t,n){var a="
"+t.title+"
Initiating...
";return a},TMPL._nanotrasen=function(e,t,n){var a="
"+t.title+"
Initiating...
";return a}; \ No newline at end of file +!function(e){function t(e,t,n,a){for(var s,i=n.slice(),o=r(t,e),l=0,c=i.length;c>l&&(handler=i[l],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(o):handler.call(e,o),!o.stoppedImmediatePropagation);l++);return s=!o.stoppedPropagation,a&&s&&e.parentNode?e.parentNode.dispatchEvent(o):!o.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function a(e,t,a){var r=b(t||e,a);g(e,"textContent",n(function(){return r.get.call(this)},function(e){r.set.call(this,e)}))}function r(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function s(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function i(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function o(e){var t=document.createEvent("Event");t.initEvent("input",!0,!0),(e.srcElement||e.fromElement||document).dispatchEvent(t)}function l(e){!p&&E.test(document.readyState)&&(p=!p,document.detachEvent(f,l),e=document.createEvent("Event"),e.initEvent(h,!0,!0),document.dispatchEvent(e))}function c(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var d=!0,p=!1,f="onreadystatechange",h="DOMContentLoaded",v="__IE8__"+Math.random(),g=Object.defineProperty||function(e,t,n){e[t]=n.value},m=Object.defineProperties||function(t,n){for(var a in n)if(y.call(n,a))try{g(t,a,n[a])}catch(r){e.console&&console.log(a+" failed on object:",t,r.message)}},b=Object.getOwnPropertyDescriptor,y=Object.prototype.hasOwnProperty,w=e.Element.prototype,k=e.Text.prototype,T=/^[a-z]+$/,E=/loaded|complete/,S={},x=document.createElement("div"),O=document.documentElement,C=O.removeAttribute,P=O.setAttribute;a(e.HTMLCommentElement.prototype,w,"nodeValue"),a(e.HTMLScriptElement.prototype,null,"text"),a(k,null,"nodeValue"),a(e.HTMLTitleElement.prototype,null,"text"),g(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(b(e.CSSStyleSheet.prototype,"cssText"))),m(w,{textContent:{get:i,set:c},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},oninput:{get:function(){return this._oninput||null},set:function(e){this._oninput&&(this.removeEventListener("input",this._oninput),this._oninput=e,e&&this.addEventListener("input",e))}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,a){var r,i,l=this,c="on"+e,d=l[v]||g(l,v,{value:{}})[v],p=d[c]||(d[c]={}),f=p.h||(p.h=[]);if(!y.call(p,"w")){if(p.w=function(e){return e[v]||t(l,u(l,e),f,!1)},!y.call(S,c))if(T.test(e)){try{r=document.createEventObject(),r[v]=!0,9!=l.nodeType&&null==l.parentNode&&x.appendChild(l),(i=l.getAttribute(c))&&C.call(l,c),l.fireEvent(c,r),S[c]=!0}catch(r){for(S[c]=!1;x.hasChildNodes();)x.removeChild(x.firstChild)}null!=i&&P.call(l,c,i)}else S[c]=!1;(p.n=S[c])&&l.attachEvent(c,p.w)}s(f,n)<0&&f[a?"unshift":"push"](n),"input"===e&&l.attachEvent("onkeyup",o)}},dispatchEvent:{value:function(e){var n,a=this,r="on"+e.type,s=a[v],i=s&&s[r],o=!!i;return e.target||(e.target=a),o?i.n?a.fireEvent(r,e):t(a,e,i.h,!0):(n=a.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var a=this,r="on"+e,i=a[v],o=i&&i[r],l=o&&o.h,c=l?s(l,t):-1;c>-1&&l.splice(c,1)}}}),m(k,{addEventListener:{value:w.addEventListener},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener}}),m(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var a=this,r="on"+e,i=a[v]||g(a,v,{value:{}})[v],o=i[r]||(i[r]={}),l=o.h||(o.h=[]);s(l,t)<0&&(a[r]||(a[r]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),a.dispatchEvent(t)}),l[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,a="on"+e.type,r=n[v],s=r&&r[a],i=!!s;return i&&(s.n?n.fireEvent(a,e):t(n,e,s.h,!0))}},removeEventListener:{value:w.removeEventListener}}),m(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),m(e.HTMLDocument.prototype,{defaultView:{get:function(){return this.parentWindow}},textContent:{get:function(){return 11===this.nodeType?i.call(this):null},set:function(e){11===this.nodeType&&c.call(this,e)}},addEventListener:{value:function(t,n,a){var r=this;w.addEventListener.call(r,t,n,a),d&&t===h&&!E.test(r.readyState)&&(d=!1,r.attachEvent(f,l),e==top&&!function s(e){try{r.documentElement.doScroll("left"),l()}catch(t){setTimeout(s,50)}}())}},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),m(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,a=/^(top|right|bottom|left)$/,r=/\-([a-z])/g,s=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,i,o,l=this._,c=l.style,u=l.currentStyle,d=l.runtimeStyle;return e=("float"===e?"style-float":e).replace(r,s),t=u?u[e]:c[e],n.test(t)&&!a.test(e)&&(i=c.left,o=d&&d.left,o&&(d.left=u.left),c.left="fontSize"===e?"1em":t,t=c.pixelLeft+"px",c.left=i,o&&(d.left=o)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,a){return a?new t(n):new e(n)}}()},addEventListener:{value:function(n,a,r){var i,o=e,l="on"+n;o[l]||(o[l]=function(e){return t(o,u(o,e),i,!1)}),i=o[l][v]||(o[l][v]=[]),s(i,a)<0&&i[r?"unshift":"push"](a)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,a){var r="on"+t,i=(e[r]||Object)[v],o=i?s(i,n):-1;o>-1&&i.splice(o,1)}}}),function(e,t,n){for(n=0;n0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,a,r;if(M(t))return t;if(a=t.valueOf,e(a)&&(n=a.call(t),M(n)))return n;if(r=t.toString,e(r)&&(n=r.call(t),M(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return a(e)},ToUint32:function(e){return e>>>0}},I=function(){};A(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,s=u.call(arguments,1),i=function(){if(this instanceof r){var e=n.apply(this,h.call(s,u.call(arguments)));return a(e)===e?e:this}return n.apply(t,h.call(s,u.call(arguments)))},o=g(0,n.length-s.length),l=[],c=0;o>c;c++)p.call(l,"$"+c);return r=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this, arguments); }")(i),n.prototype&&(I.prototype=n.prototype,r.prototype=new I,I.prototype=null),r}});var R=v.bind(r.hasOwnProperty),U=v.bind(r.toString),z=v.bind(o.slice),q=v.bind(o.split),F=v.bind(o.indexOf),B=v.bind(p),H=t.isArray||function(e){return"[object Array]"===U(e)},$=1!==[].unshift(0);A(n,{unshift:function(){return f.apply(this,arguments),this.length}},$),A(t,{isArray:H});var J=a("a"),V="a"!==J[0]||!(0 in J),W=function(e){var t=!0,n=!0;return e&&(e.call("foo",function(e,n,a){"object"!=typeof a&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")),!!e&&t&&n};A(n,{forEach:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=-1,i=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++s1&&(a=arguments[1]),!e(n))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;i>l;l++)l in s&&("undefined"==typeof a?o[l]=n(s[l],l,r):o[l]=n.call(a,s[l],l,r));return o}},!W(n.map)),A(n,{filter:function(t){var n,a,r=D.ToObject(this),s=V&&P(this)?q(this,""):r,i=D.ToUint32(s.length),o=[];if(arguments.length>1&&(a=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;i>l;l++)l in s&&(n=s[l],("undefined"==typeof a?t(n,l,r):t.call(a,n,l,r))&&B(o,n));return o}},!W(n.filter)),A(n,{every:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var i=0;s>i;i++)if(i in r&&!("undefined"==typeof n?t(r[i],i,a):t.call(n,r[i],i,a)))return!1;return!0}},!W(n.every)),A(n,{some:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var i=0;s>i;i++)if(i in r&&("undefined"==typeof n?t(r[i],i,a):t.call(n,r[i],i,a)))return!0;return!1}},!W(n.some));var Z=!1;n.reduce&&(Z="object"==typeof n.reduce.call("es5",function(e,t,n,a){return a})),A(n,{reduce:function(t){var n=D.ToObject(this),a=V&&P(this)?q(this,""):n,r=D.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===r&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,i=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(i in a){s=a[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}for(;r>i;i++)i in a&&(s=t(s,a[i],i,n));return s}},!Z);var X=!1;n.reduceRight&&(X="object"==typeof n.reduceRight.call("es5",function(e,t,n,a){return a})),A(n,{reduceRight:function(t){var n=D.ToObject(this),a=V&&P(this)?q(this,""):n,r=D.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===r&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,i=r-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(i in a){s=a[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>i)return s;do i in a&&(s=t(s,a[i],i,n));while(i--);return s}},!X);var Y=n.indexOf&&-1!==[0,1].indexOf(1,2);A(n,{indexOf:function(e){var t=V&&P(this)?q(this,""):D.ToObject(this),n=D.ToUint32(t.length);if(0===n)return-1;var a=0;for(arguments.length>1&&(a=D.ToInteger(arguments[1])),a=a>=0?a:g(0,n+a);n>a;a++)if(a in t&&t[a]===e)return a;return-1}},Y);var G=n.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);A(n,{lastIndexOf:function(e){var t=V&&P(this)?q(this,""):D.ToObject(this),n=D.ToUint32(t.length);if(0===n)return-1;var a=n-1;for(arguments.length>1&&(a=m(a,D.ToInteger(arguments[1]))),a=a>=0?a:n-Math.abs(a);a>=0;a--)if(a in t&&e===t[a])return a;return-1}},G);var K=function(){var e=[1,2],t=e.splice();return 2===e.length&&H(t)&&0===t.length}();A(n,{splice:function(e,t){return 0===arguments.length?[]:d.apply(this,arguments)}},!K);var Q=function(){var e={};return n.splice.call(e,0,0,1),1===e.length}();A(n,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=g(D.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=u.call(arguments),n.length<2?B(n,this.length-e):n[1]=D.ToInteger(t)),d.apply(this,n)}},!Q);var ee=function(){var e=new t(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),te=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();A(n,{splice:function(e,t){for(var n,a=D.ToObject(this),r=[],s=D.ToUint32(a.length),o=D.ToInteger(e),l=0>o?g(s+o,0):m(o,s),c=m(g(D.ToInteger(t),0),s-l),d=0;c>d;)n=i(l+d),R(a,n)&&(r[d]=a[n]),d+=1;var p,f=u.call(arguments,2),h=f.length;if(c>h){for(d=l;s-c>d;)n=i(d+c),p=i(d+h),R(a,n)?a[p]=a[n]:delete a[p],d+=1;for(d=s;d>s-c+h;)delete a[d-1],d-=1}else if(h>c)for(d=s-c;d>l;)n=i(d+c-1),p=i(d+h-1),R(a,n)?a[p]=a[n]:delete a[p],d-=1;d=l;for(var v=0;v=0&&!H(t)&&e(t.callee)},be=ge(arguments)?ge:me;A(a,{keys:function(t){var n=e(t),a=be(t),r=null!==t&&"object"==typeof t,s=r&&P(t);if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var o=[],l=le&&n;if(s&&ce||a)for(var c=0;cp;p++){var f=he[p];d&&"constructor"===f||!R(t,f)||B(o,f)}return o}});var ye=a.keys&&function(){return 2===a.keys(arguments).length}(1,2),we=a.keys&&function(){var e=a.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),ke=a.keys;A(a,{keys:function(e){return ke(be(e)?u.call(e):e)}},!ye||we);var Te=-621987552e5,Ee="-000001",Se=Date.prototype.toISOString&&-1===new Date(Te).toISOString().indexOf(Ee),xe=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString();A(Date.prototype,{toISOString:function(){var e,t,n,a,r;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(a=this.getUTCFullYear(),r=this.getUTCMonth(),a+=Math.floor(r/12),r=(r%12+12)%12,e=[r+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],a=(0>a?"-":a>9999?"+":"")+z("00000"+Math.abs(a),a>=0&&9999>=a?-4:-6),t=e.length;t--;)n=e[t],10>n&&(e[t]="0"+n);return a+"-"+u.call(e,0,2).join("-")+"T"+u.call(e,2).join(":")+"."+z("000"+this.getUTCMilliseconds(),-3)+"Z"}},Se||xe);var Oe=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(Te).toJSON().indexOf(Ee)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();Oe||(Date.prototype.toJSON=function(t){var n=a(this),r=D.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var s=n.toISOString;if(!e(s))throw new TypeError("toISOString property is not callable");return s.call(n)});var Ce=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),Pe=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),_e=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(_e||Pe||!Ce){var je=Math.pow(2,31)-1,Le=(Math.floor(je/1e3),N(new Date(1970,0,1,0,0,0,je+1).getTime()));Date=function(e){var t=function(n,a,r,s,o,l,c){var u,d=arguments.length;if(this instanceof e){var p=l,f=c;if(Le&&d>=7&&c>je){var h=Math.floor(c/je)*je,v=Math.floor(h/1e3);p+=v,f-=1e3*v}u=1===d&&i(n)===n?new e(t.parse(n)):d>=7?new e(n,a,r,s,o,p,f):d>=6?new e(n,a,r,s,o,p):d>=5?new e(n,a,r,s,o):d>=4?new e(n,a,r,s):d>=3?new e(n,a,r):d>=2?new e(n,a):d>=1?new e(n):new e}else u=e.apply(this,arguments);return M(u)||A(u,{constructor:t},!0),u},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),a=[0,31,59,90,120,151,181,212,243,273,304,334,365],r=function(e,t){var n=t>1?1:0;return a[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},s=function(t){var n=0,a=t;if(Le&&a>je){var r=Math.floor(a/je)*je,s=Math.floor(r/1e3);n+=s,a-=1e3*s}return l(new e(1970,0,1,0,0,n,a))};for(var o in e)R(e,o)&&(t[o]=e[o]);A(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,A(t.prototype,{constructor:t},!0);var c=function(t){var a=n.exec(t);if(a){var i,o=l(a[1]),c=l(a[2]||1)-1,u=l(a[3]||1)-1,d=l(a[4]||0),p=l(a[5]||0),f=l(a[6]||0),h=Math.floor(1e3*l(a[7]||0)),v=Boolean(a[4]&&!a[8]),g="-"===a[9]?1:-1,m=l(a[10]||0),b=l(a[11]||0),y=p>0||f>0||h>0;return(y?24:25)>d&&60>p&&60>f&&1e3>h&&c>-1&&12>c&&24>m&&60>b&&u>-1&&u=-864e13&&864e13>=i)?i:NaN}return e.parse.apply(this,arguments)};return A(t,{parse:c}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var Ae=c.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),Me={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,a=t;++n=0;)n+=Me.data[t],Me.data[t]=Math.floor(n/e),n=n%e*Me.base},numToString:function(){for(var e=Me.size,t="";--e>=0;)if(""!==t||0===e||0!==Me.data[e]){var n=i(Me.data[e]);""===t?t=n:t+=z("0000000",0,7-n.length)+n}return t},pow:function Ye(e,t,n){return 0===t?n:t%2===1?Ye(e,t-1,n*e):Ye(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},Ne=function(e){var t,n,a,r,s,o,c,u;if(t=l(e),t=N(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=l(this),N(n))return"NaN";if(-1e21>=n||n>=1e21)return i(n);if(a="",0>n&&(a="-",n=-n),r="0",n>1e-21)if(s=Me.log(n*Me.pow(2,69,1))-69,o=0>s?n*Me.pow(2,-s,1):n/Me.pow(2,s,1),o*=4503599627370496,s=52-s,s>0){for(Me.multiply(0,o),c=t;c>=7;)Me.multiply(1e7,0),c-=7;for(Me.multiply(Me.pow(10,c,1),0),c=s-1;c>=23;)Me.divide(1<<23),c-=23;Me.divide(1<0?(u=r.length,r=t>=u?a+z("0.0000000000000000000",0,t-u+2)+r:a+z(r,0,u-t)+"."+z(r,u-t)):r=a+r,r};A(c,{toFixed:Ne},Ae);var De=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),Ie=c.toPrecision;A(c,{toPrecision:function(e){return"undefined"==typeof e?Ie.call(this):Ie.call(this,e)}},De),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],t=Math.pow(2,32)-1;o.split=function(n,a){var r=this;if("undefined"==typeof n&&0===a)return[];if(!S(n))return q(this,n,a);var s,i,o,l,c=[],d=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),f=0,h=new RegExp(n.source,d+"g");r+="",e||(s=new RegExp("^"+h.source+"$(?!\\s)",d));var v="undefined"==typeof a?t:D.ToUint32(a);for(i=h.exec(r);i&&(o=i.index+i[0].length,!(o>f&&(B(c,z(r,f,i.index)),!e&&i.length>1&&i[0].replace(s,function(){for(var e=1;e1&&i.index=v)));)h.lastIndex===i.index&&h.lastIndex++,i=h.exec(r);return f===r.length?(l||!h.test(""))&&B(c,""):B(c,z(r,f)),c.length>v?z(c,0,v):c}}():"0".split(void 0,0).length&&(o.split=function(e,t){return"undefined"==typeof e&&0===t?[]:q(this,e,t)});var Re=o.replace,Ue=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){B(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ue||(o.replace=function(t,n){var a=e(n),r=S(t)&&/\)[*?]/.test(t.source);if(a&&r){var s=function(e){var a=arguments.length,r=t.lastIndex;t.lastIndex=0;var s=t.exec(e)||[];return t.lastIndex=r,B(s,arguments[a-2],arguments[a-1]),n.apply(this,s)};return Re.call(this,t,s)}return Re.call(this,t,n)});var ze=o.substr,qe="".substr&&"b"!=="0b".substr(-1);A(o,{substr:function(e,t){var n=e;return 0>e&&(n=g(this.length+e,0)),ze.call(this,n,t)}},qe);var Fe=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Be="​",He="["+Fe+"]",$e=new RegExp("^"+He+He+"*"),Je=new RegExp(He+He+"*$"),Ve=o.trim&&(Fe.trim()||!Be.trim());A(o,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return i(this).replace($e,"").replace(Je,"")}},Ve);var We=o.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);A(o,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=i(this),n=i(e),a=arguments.length>1?l(arguments[1]):NaN,r=N(a)?1/0:D.ToInteger(a),s=m(g(r,0),t.length),o=n.length,c=s+o;c>0;){c=g(0,c-o);var u=F(z(t,c,s+o),n);if(-1!==u)return c+u}return-1}},We);var Ze=o.lastIndexOf;if(A(o,{lastIndexOf:function(e){return Ze.apply(this,arguments)}},1!==o.lastIndexOf.length),(8!==parseInt(Fe+"08")||22!==parseInt(Fe+"0x16"))&&(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,a){var r=i(n).trim(),s=l(a)||(t.test(r)?16:10);return e(r,s)}}(parseInt)),"RangeError: test"!==String(new RangeError("test"))){var Xe=(Error.prototype.toString,function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=i(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=i(t)),e?t?e+": "+t:e:t});Error.prototype.toString=Xe}}),function(e,t){function n(e,t){var n=e.createElement("p"),a=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",a.insertBefore(n.lastChild,a.firstChild)}function a(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function r(e,t){var n=y.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),y.elements=n+" "+e,c(t)}function s(e){var t=b[e[g]];return t||(t={},m++,e[g]=m,b[m]=t),t}function i(e,n,a){if(n||(n=t),d)return n.createElement(e);a||(a=s(n));var r;return r=a.cache[e]?a.cache[e].cloneNode():v.test(e)?(a.cache[e]=a.createElem(e)).cloneNode():a.createElem(e),!r.canHaveChildren||h.test(e)||r.tagUrn?r:a.frag.appendChild(r)}function o(e,n){if(e||(e=t),d)return e.createDocumentFragment();n=n||s(e);for(var r=n.frag.cloneNode(),i=0,o=a(),l=o.length;l>i;i++)r.createElement(o[i]);return r}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+a().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function c(e){e||(e=t);var a=s(e);return!y.shivCSS||u||a.hasCSS||(a.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),d||l(e,a),e}var u,d,p="3.7.3",f=e.html5||{},h=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,v=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g="_html5shiv",m=0,b={};!function(){try{var e=t.createElement("a");e.innerHTML="",u="hidden"in e,d=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){u=!0,d=!0}}();var y={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:p,shivCSS:f.shivCSS!==!1,supportsUnknownElements:d,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:c,createElement:i,createDocumentFragment:o,addElements:r};e.html5=y,c(t),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document),function(){function e(t,a){function s(e){if(s[e]!==g)return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("json-parse");else{var n,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var l=a.stringify,u="function"==typeof l&&y;if(u){(n=function(){return 1}).toJSON=n;try{u="0"===l(0)&&"0"===l(new i)&&'""'==l(new o)&&l(b)===g&&l(g)===g&&l()===g&&"1"===l(n)&&"[1]"==l([n])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,b,null])&&l({a:[n,!0,!1,null,"\x00\b\n\f\r "]})==r&&"1"===l(null,n)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new c(-1))}catch(d){u=!1}}t=u}if("json-parse"==e){var p=a.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){n=p(r);var f=5==n.a.length&&1===n.a[0];if(f){try{f=!p('" "')}catch(d){}if(f)try{f=1!==p("01")}catch(d){}if(f)try{f=1!==p("1.")}catch(d){}}}}catch(d){f=!1}t=f}}return s[e]=!!t}t||(t=r.Object()),a||(a=r.Object());var i=t.Number||r.Number,o=t.String||r.String,l=t.Object||r.Object,c=t.Date||r.Date,u=t.SyntaxError||r.SyntaxError,d=t.TypeError||r.TypeError,p=t.Math||r.Math,f=t.JSON||r.JSON;"object"==typeof f&&f&&(a.stringify=f.stringify,a.parse=f.parse);var h,v,g,m=l.prototype,b=m.toString,y=new c(-0xc782b5b800cec);try{y=-109252==y.getUTCFullYear()&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(w){}if(!s("json")){var k="[object Function]",T="[object Date]",E="[object Number]",S="[object String]",x="[object Array]",O="[object Boolean]",C=s("bug-string-char-index");if(!y)var P=p.floor,_=[0,31,59,90,120,151,181,212,243,273,304,334],j=function(e,t){return _[t]+365*(e-1970)+P((e-1969+(t=+(t>1)))/4)-P((e-1901+t)/100)+P((e-1601+t)/400)};if((h=m.hasOwnProperty)||(h=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=b?h=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,h=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,h.call(this,e)}),v=function(e,t){var a,r,s,i=0;(a=function(){this.valueOf=0}).prototype.valueOf=0,r=new a;for(s in r)h.call(r,s)&&i++;return a=r=null,i?v=2==i?function(e,t){var n,a={},r=b.call(e)==k;for(n in e)r&&"prototype"==n||h.call(a,n)||!(a[n]=1)||!h.call(e,n)||t(n)}:function(e,t){var n,a,r=b.call(e)==k;for(n in e)r&&"prototype"==n||!h.call(e,n)||(a="constructor"===n)||t(n);(a||h.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(e,t){var a,s,i=b.call(e)==k,o=!i&&"function"!=typeof e.constructor&&n[typeof e.hasOwnProperty]&&e.hasOwnProperty||h;for(a in e)i&&"prototype"==a||!o.call(e,a)||t(a);for(s=r.length;a=r[--s];o.call(e,a)&&t(a));}),v(e,t)},!s("json-stringify")){var L={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",M=function(e,t){return(A+(t||0)).slice(-e)},N="\\u00",D=function(e){for(var t='"',n=0,a=e.length,r=!C||a>10,s=r&&(C?e.split(""):e);a>n;n++){var i=e.charCodeAt(n);switch(i){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=L[i];break;default:if(32>i){t+=N+M(2,i.toString(16));break}t+=r?s[n]:e.charAt(n)}}return t+'"'},I=function(e,t,n,a,r,s,i){var o,l,c,u,p,f,m,y,w,k,C,_,L,A,N,R;try{o=t[e]}catch(U){}if("object"==typeof o&&o)if(l=b.call(o),l!=T||h.call(o,"toJSON"))"function"==typeof o.toJSON&&(l!=E&&l!=S&&l!=x||h.call(o,"toJSON"))&&(o=o.toJSON(e));else if(o>-1/0&&1/0>o){if(j){for(p=P(o/864e5),c=P(p/365.2425)+1970-1;j(c+1,0)<=p;c++);for(u=P((p-j(c,0))/30.42);j(c,u+1)<=p;u++);p=1+p-j(c,u),f=(o%864e5+864e5)%864e5,m=P(f/36e5)%24,y=P(f/6e4)%60,w=P(f/1e3)%60,k=f%1e3}else c=o.getUTCFullYear(),u=o.getUTCMonth(),p=o.getUTCDate(),m=o.getUTCHours(),y=o.getUTCMinutes(),w=o.getUTCSeconds(),k=o.getUTCMilliseconds();o=(0>=c||c>=1e4?(0>c?"-":"+")+M(6,0>c?-c:c):M(4,c))+"-"+M(2,u+1)+"-"+M(2,p)+"T"+M(2,m)+":"+M(2,y)+":"+M(2,w)+"."+M(3,k)+"Z"}else o=null;if(n&&(o=n.call(t,e,o)),null===o)return"null";if(l=b.call(o),l==O)return""+o;if(l==E)return o>-1/0&&1/0>o?""+o:"null";if(l==S)return D(""+o);if("object"==typeof o){for(A=i.length;A--;)if(i[A]===o)throw d();if(i.push(o),C=[], +N=s,s+=r,l==x){for(L=0,A=o.length;A>L;L++)_=I(L,o,n,a,r,s,i),C.push(_===g?"null":_);R=C.length?r?"[\n"+s+C.join(",\n"+s)+"\n"+N+"]":"["+C.join(",")+"]":"[]"}else v(a||o,function(e){var t=I(e,o,n,a,r,s,i);t!==g&&C.push(D(e)+":"+(r?" ":"")+t)}),R=C.length?r?"{\n"+s+C.join(",\n"+s)+"\n"+N+"}":"{"+C.join(",")+"}":"{}";return i.pop(),R}};a.stringify=function(e,t,a){var r,s,i,o;if(n[typeof t]&&t)if((o=b.call(t))==k)s=t;else if(o==x){i={};for(var l,c=0,u=t.length;u>c;l=t[c++],o=b.call(l),(o==S||o==E)&&(i[l]=1));}if(a)if((o=b.call(a))==E){if((a-=a%1)>0)for(r="",a>10&&(a=10);r.lengthR;)switch(r=s.charCodeAt(R)){case 9:case 10:case 13:case 32:R++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=C?s.charAt(R):s[R],R++,e;case 34:for(e="@",R++;i>R;)if(r=s.charCodeAt(R),32>r)F();else if(92==r)switch(r=s.charCodeAt(++R)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=q[r],R++;break;case 117:for(t=++R,n=R+4;n>R;R++)r=s.charCodeAt(R),r>=48&&57>=r||r>=97&&102>=r||r>=65&&70>=r||F();e+=z("0x"+s.slice(t,R));break;default:F()}else{if(34==r)break;for(r=s.charCodeAt(R),t=R;r>=32&&92!=r&&34!=r;)r=s.charCodeAt(++R);e+=s.slice(t,R)}if(34==s.charCodeAt(R))return R++,e;F();default:if(t=R,45==r&&(a=!0,r=s.charCodeAt(++R)),r>=48&&57>=r){for(48==r&&(r=s.charCodeAt(R+1),r>=48&&57>=r)&&F(),a=!1;i>R&&(r=s.charCodeAt(R),r>=48&&57>=r);R++);if(46==s.charCodeAt(R)){for(n=++R;i>n&&(r=s.charCodeAt(n),r>=48&&57>=r);n++);n==R&&F(),R=n}if(r=s.charCodeAt(R),101==r||69==r){for(r=s.charCodeAt(++R),(43==r||45==r)&&R++,n=R;i>n&&(r=s.charCodeAt(n),r>=48&&57>=r);n++);n==R&&F(),R=n}return+s.slice(t,R)}if(a&&F(),"true"==s.slice(R,R+4))return R+=4,!0;if("false"==s.slice(R,R+5))return R+=5,!1;if("null"==s.slice(R,R+4))return R+=4,null;F()}return"$"},H=function(e){var t,n;if("$"==e&&F(),"string"==typeof e){if("@"==(C?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=B(),"]"!=e;n||(n=!0))n&&(","==e?(e=B(),"]"==e&&F()):F()),","==e&&F(),t.push(H(e));return t}if("{"==e){for(t={};e=B(),"}"!=e;n||(n=!0))n&&(","==e?(e=B(),"}"==e&&F()):F()),(","==e||"string"!=typeof e||"@"!=(C?e.charAt(0):e[0])||":"!=B())&&F(),t[e.slice(1)]=H(B());return t}F()}return e},$=function(e,t,n){var a=J(e,t,n);a===g?delete e[t]:e[t]=a},J=function(e,t,n){var a,r=e[t];if("object"==typeof r&&r)if(b.call(r)==x)for(a=r.length;a--;)$(r,a,n);else v(r,function(e){$(r,e,n)});return n.call(e,t,r)};a.parse=function(e,t){var n,a;return R=0,U=""+e,n=H(B()),"$"!=B()&&F(),R=U=null,t&&b.call(t)==k?J((a={},a[""]=n,a),"",t):n}}}return a.runInContext=e,a}var t="function"==typeof define&&define.amd,n={"function":!0,object:!0},a=n[typeof exports]&&exports&&!exports.nodeType&&exports,r=n[typeof window]&&window||this,s=a&&n[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(r=s),a&&!t)e(r,a);else{var i=r.JSON,o=r.JSON3,l=!1,c=e(r,r.JSON3={noConflict:function(){return l||(l=!0,r.JSON=i,r.JSON3=o,i=o=null),c}});r.JSON={parse:c.parse,stringify:c.stringify}}t&&define(function(){return c})}.call(this);var Url=function(){"use strict";var e={protocol:"protocol",host:"hostname",port:"port",path:"pathname",query:"search",hash:"hash"},t={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},n=function(n,a){var i,o=document,l=o.createElement("a"),a=a||o.location.href,c=a.match(/\/\/(.*?)(?::(.*?))?@/)||[];l.href=a;for(i in e)n[i]=l[e[i]]||"";if(n.protocol=n.protocol.replace(/:$/,""),n.query=n.query.replace(/^\?/,""),n.hash=r(n.hash.replace(/^#/,"")),n.user=r(c[1]||""),n.pass=r(c[2]||""),n.port=t[n.protocol]==n.port||0==n.port?"":n.port,n.protocol||/^([a-z]+:)?\/\//.test(a))n.path=n.path.replace(/^\/?/,"/");else{var u=new Url(o.location.href.match(/(.*\/)/)[0]),d=u.path.split("/"),p=n.path.split("/"),f=["protocol","user","pass","host","port"],h=f.length;for(d.pop(),i=0;h>i;i++)n[f[i]]=u[f[i]];for(;".."==p[0];)d.pop(),p.shift();n.path=("/"!=a.charAt(0)?d.join("/"):"")+"/"+p.join("/")}n.paths(("/"==n.path.charAt(0)?n.path.slice(1):n.path).split("/")),s(n)},a=function(e){return encodeURIComponent(e).replace(/'/g,"%27")},r=function(e){return e=e.replace(/\+/g," "),e=e.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n,a){var r=parseInt(t,16)-224,s=parseInt(n,16)-128;if(0==r&&32>s)return e;var i=parseInt(a,16)-128,o=(r<<12)+(s<<6)+i;return o>65535?e:String.fromCharCode(o)}),e=e.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n){var a=parseInt(t,16)-192;if(2>a)return e;var r=parseInt(n,16)-128;return String.fromCharCode((a<<6)+r)}),e=e.replace(/%([0-7][0-9a-f])/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})},s=function(e){var t=e.query;e.query=new function(e){for(var t,n=/([^=&]+)(=([^&]*))?/g;t=n.exec(e);){var s=decodeURIComponent(t[1].replace(/\+/g," ")),i=t[3]?r(t[3]):"";null!=this[s]?(this[s]instanceof Array||(this[s]=[this[s]]),this[s].push(i)):this[s]=i}this.clear=function(){for(var e in this)this[e]instanceof Function||delete this[e]},this.count=function(){var e,t=0;for(e in this)this[e]instanceof Function||t++;return t},this.isEmpty=function(){return 0===this.count()},this.toString=function(){var e,t,n="",r=a;for(e in this)if(!(this[e]instanceof Function))if(this[e]instanceof Array){var s=this[e].length;if(s)for(t=0;s>t;t++)n+=n?"&":"",n+=r(e)+"="+r(this[e][t]);else n+=(n?"&":"")+r(e)+"="}else n+=n?"&":"",n+=r(e)+"="+r(this[e]);return n}}(t)};return function(e){this.paths=function(e){var t,n="",s=0;if(e&&e.length&&e+""!==e){for(this.isAbsolute()&&(n="/"),t=e.length;t>s;s++)e[s]=a(e[s]);this.path=n+e.join("/")}for(e=("/"===this.path.charAt(0)?this.path.slice(1):this.path).split("/"),s=0,t=e.length;t>s;s++)e[s]=r(e[s]);return e},this.encode=a,this.decode=r,this.isAbsolute=function(){return this.protocol||"/"===this.path.charAt(0)},this.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&a(this.user)+(this.pass&&":"+a(this.pass))+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+a(this.hash))},n(this,e)}}();!function(e){"use strict";function t(){return u.createDocumentFragment()}function n(e){return u.createElement(e)}function a(e){if(1===e.length)return r(e[0]);for(var n=t(),a=z.call(e),s=0;s-1}}([].indexOf||function(e){for(q=this.length;q--&&this[q]!==e;);return q}),item:function(e){return this[e]||null},remove:function(){for(var e,t=0;ti?r[c.call(a,s)-1]=y.call(s,this):r[i]},emit:function(e){for(var t=l.call(this,f),a=t&&this[f].l,r=t&&l.call(a,e),s=r&&a[e].slice(0),i=r&&u.call(arguments,1),o=0,c=r?s.length:o;c>o;)n(this,s[o++],i);return r},expect:function(){for(var e=0;e-1&&(s.splice(n,1),s.length||delete r[e])),this},on:function(e,t,n){var a=l.call(this,f),r=(a?this[f]:T(this)).l,s=a&&l.call(r,e)?r[e]:r[e]=[];return w.call(s,t)<0&&(n?d:c).call(s,t),this},once:function(e,t,a){var r=function(i){s.off(e,r,a),n(s,t,arguments)},s=this;return s.on(e,r,a)},trigger:function(e,t){var r=l.call(this,f),s=r&&this[f].l,i="string"==typeof e,c=i?e:e.type,u=r&&l.call(s,c),d=u&&s[c].slice(0),p=i?new a(this,c,t):e,h=0,v=u?d.length:h,g=!(p instanceof a);for(g&&(p._active=!0,p.stopImmediatePropagation=o.stopImmediatePropagation),p.currentTarget=this,m[0]=p;p._active&&v>h;)n(this,d[h++],m);return g&&(delete p._active,delete p.stopImmediatePropagation),!p.defaultPrevented},when:function(e,t){var a=l.call(this,f),r=(a?this[f]:T(this)).w,s=a&&l.call(r,e);return s?(n(this,t,r[e]),this):this.once(e,function(){l.call(r,e)||(r[e]=arguments)},!0).once(e,t)}},x=function(e,t,n){l.call(e,t)||(e[t]=n)},O=!1;o.defaultPrevented=!1,o._active=o.cancelable=!0,o.preventDefault=function(){this.defaultPrevented=!0},o.stopImmediatePropagation=function(){this._active=!1};for(r in S)l.call(S,r)&&b(i,r,{enumerable:!1,configurable:!0,writable:!0,value:S[r]});!function(e){function t(t){function n(e){e[t].apply(e,this)}return function(){return e.call(this,n,arguments),this}}for(var n in S)S.hasOwnProperty(n)&&!/^listeners|boundTo$/.test(n)&&b(s,n,{enumerable:!1,configurable:!0,writable:!0,value:t(n)})}(s.forEach||function(e,t){for(var n=this,a=0;a-1&&(n.splice(a,1),n.length||(self["on"+e]=null))}),u.expect("ready","DOMContentLoaded"),/loaded|complete/.test(u.readyState)?(e.setImmediate||setTimeout)(c):u.once("DOMContentLoaded",c,!0)}(window),"$"in window||b(window,"$",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=t||document,a=e.length-6,r=e.lastIndexOf(":first")===a&&a>0,s=r?n.querySelector(e.slice(0,a)):n.querySelectorAll(e);return r?s?[s]:[]:v.call(s)}})}}(Object);var Class=Class||function(e){"use strict";function t(e,t,a){for(var r,s=[],i=0;it;)r[t++].call(this);return e.apply(this,arguments)}}(k),k[f]=S)),y.call(e,h)&&n(e[h],k,b,!0,!0),p&&(v!==b&&n(v,k,b,!0,!0),k[f]=S),S[c]!==k&&a(S,c,k,!1),n(e,S,b,!1,!0),y.call(e,d)&&i([].concat(e[d]),S),k}}(Object);(function(){this.NANO={INTERACTIVE:2,UPDATE:1,DISABLED:0}}).call(this),function(){this.helpers={link:function(e,t,n,a,r,s){return null==e&&(e=""),null==t&&(t=""),null==n&&(n=""),null==a&&(a={}),null==r&&(r=""),null==s&&(s=""),a=JSON.stringify(a),t&&(t="",s+=" iconed"),r?""+t+e+"":""+t+e+""},bar:function(e,t,n,a,r){var s;return null==e&&(e=0),null==t&&(t=0),null==n&&(n=100),null==a&&(a=""),null==r&&(r=""),n>t?t>e?e=t:e>n&&(e=n):e>t?e=t:n>e&&(e=n),s=Math.round((e-t)/(n-t)*100),"
"+r+"
"},round:function(e){return Math.round(e)},fixed:function(e,t){return null==t&&(t=1),Number(Math.round(e+"e"+t)+"e-"+t)},floor:function(e){return Math.floor(e)},ceil:function(e){return Math.ceil(e)}}}.call(this),function(){document.when("ready",function(e){return function(){var t;t={},e.nanoui=new e.NanoUI(t,document),e.nanowindow=new e.Window(t,document),t.emit("memes"),e.NanoBus=t}}(this))}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.NanoUI=function(){function t(t,n){this.bus=t,this.fragment=null!=n?n:document,this.winset=e(this.winset,this),this.close=e(this.close,this),this.act=e(this.act,this),this.render=e(this.render,this),this.update=e(this.update,this),this.serverUpdate=e(this.serverUpdate,this),this.bus.on("serverUpdate",this.serverUpdate),this.bus.on("update",this.update),this.bus.on("render",this.render),this.bus.on("memes",this.render),this.initialized=!1,this.data={},this.initialData=JSON.parse(this.fragment.query("#data").data("initial")),null==this.initialData&&("data"in this.initialData||"config"in this.initalData)&&this.error("Initial data did not load correctly.")}return t.prototype.serverUpdate=function(e){var t,n,a;try{t=JSON.parse(e)}catch(a){n=a,this.error(n)}this.bus.emit("update",t)},t.prototype.update=function(e){null==e.data&&(null!=this.data.data?e.data=this.data.data:e.data={}),this.data=e,this.initialized&&this.bus.emit("render",this.data),this.bus.emit("updated")},t.prototype.render=function(e){var t,n,a,r;this.initialized||(e=this.initialData);try{this.initialized||(r=this.fragment.query("#layout"),r.innerHTML=TMPL[e.config.templates.layout](e.data,e.config,helpers)),t=this.fragment.query("#content"),t.innerHTML=TMPL[e.config.templates.content](e.data,e.config,helpers)}catch(a){return n=a,void this.error(n)}return this.bus.emit("rendered",e),this.initialized?void 0:(this.initialized=!0,this.data=this.initialData,this.bus.emit("initialized",e))},t.prototype.act=function(e,t){return null==t&&(t={}),t.src=this.data.config.ref,t.nano=e,location.href=util.href(null,t)},t.prototype.error=function(e){var t;return e instanceof Error&&(e=e.fileName+":"+e.lineNumber+" "+e.message),t={nano_error:e},location.href=util.href(null,t)},t.prototype.log=function(e){var t;return t={nano_log:e},location.href=util.href(null,t)},t.prototype.close=function(){var e;return e={command:"nanoclose "+this.data.config.ref},this.winset("is-visible","false"),location.href=util.href("winset",e)},t.prototype.winset=function(e,t,n){var a,r;return null==n&&(n=this.data.config.window.ref),a={},a[n+"."+e]=t,r=a,location.href=util.href("winset",r)},t}()}.call(this),function(){this.util={extend:function(e,t){return Object.keys(t).forEach(function(n){var a;return a=t[n],a&&"[object Object]"===Object.prototype.toString.call(a)?(e[n]=e[n]||{},util.extend(e[n],a)):e[n]=a}),e},href:function(e,t){return null==e&&(e=""),null==t&&(t={}),e=new Url("byond://"+e),util.extend(e.query,t),e}}}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.Window=function(){function t(t,n){this.bus=t,this.fragment=null!=n?n:document,this.attachLinks=e(this.attachLinks,this),this.updateLinks=e(this.updateLinks,this),this.updateStatus=e(this.updateStatus,this),this.resize=e(this.resize,this),this.attachResize=e(this.attachResize,this),this.drag=e(this.drag,this),this.attachDrag=e(this.attachDrag,this),this.attachButtons=e(this.attachButtons,this),this.calcOffset=e(this.calcOffset,this),this.fancyChrome=e(this.fancyChrome,this),this.dragging=!1,this.resizing=!1,this.bus.once("initialized",function(e){return function(t){return setTimeout(e.focusMap,100),t.config.user.fancy?(e.fancyChrome(),e.calcOffset(),e.attachButtons(),e.attachDrag(),e.attachResize()):void 0}}(this)),this.bus.on("rendered",this.updateStatus),this.bus.on("rendered",this.updateLinks),this.bus.on("rendered",this.attachLinks),this.fragment.on("keydown",this.focusMap)}return t.prototype.setPos=function(e,t){return nanoui.winset("pos",e+","+t)},t.prototype.setSize=function(e,t){return nanoui.winset("size",e+","+t)},t.prototype.focusMap=function(){return nanoui.winset("focus",1,"mapwindow.map")},t.prototype.fancyChrome=function(){var e;return nanoui.winset("titlebar",0),nanoui.winset("can-resize",0),e=this.fragment.queryAll(".fancy"),e.forEach(function(e){return e.classList.remove("fancy")})},t.prototype.calcOffset=function(){return this.xOriginal=window.screenLeft,this.yOriginal=window.screenTop,this.setPos(0,0),this.xOffset=window.screenLeft,this.yOffset=window.screenTop,this.setPos(this.xOriginal-this.xOffset,this.yOriginal-this.yOffset)},t.prototype.attachButtons=function(){var e,t,n,a;return e=function(){return nanoui.close()},n=function(){return nanoui.winset("is-minimized","true")},t=this.fragment.queryAll(".close"),t.forEach(function(t){return t.on("click",e)}),a=this.fragment.queryAll(".minimize"),a.forEach(function(e){return e.on("click",n)})},t.prototype.attachDrag=function(){var e;return e=this.fragment.query("#titlebar"),this.fragment.on("mousemove",this.drag),e.on("mousedown",function(e){return function(){return e.dragging=!0}}(this)),this.fragment.on("mouseup",function(e){return function(){return e.dragging=!1}}(this))},t.prototype.drag=function(e){var t,n;return null==e&&(e=window.event),this.dragging?(null==this.xDrag&&(this.xDrag=e.screenX),null==this.yDrag&&(this.yDrag=e.screenY),t=e.screenX-this.xDrag+(window.screenLeft-this.xOffset),n=e.screenY-this.yDrag+(window.screenTop-this.yOffset),this.setPos(t,n),this.xDrag=e.screenX,this.yDrag=e.screenY):void 0},t.prototype.attachResize=function(){var e;return e=this.fragment.query("#resize"),this.fragment.on("mousemove",this.resize),e.on("mousedown",function(e){return function(){return e.resizing=!0}}(this)),this.fragment.on("mouseup",function(e){return function(){return e.resizing=!1}}(this))},t.prototype.resize=function(e){var t,n;return null==e&&(e=window.event),this.resizing?(null==this.xResize&&(this.xResize=e.screenX),null==this.yResize&&(this.yResize=e.screenY),t=Math.max(250,e.screenX-this.xResize+window.innerWidth),n=Math.max(250,e.screenY-this.yResize+window.innerHeight),this.setSize(t,n),this.xResize=e.screenX,this.yResize=e.screenY):void 0},t.prototype.updateStatus=function(e){var t;return t=this.fragment.queryAll(".statusicon"),t.forEach(function(t){var n;switch(t.className=t.className.replace(/good|bad|average/g,""),e.config.status){case NANO.INTERACTIVE:n="good";break;case NANO.UPDATE:n="average";break;default:n="bad"}return t.classList.add(n)})},t.prototype.updateLinks=function(e){var t;return t=this.fragment.queryAll(".link"),e.config.status!==NANO.INTERACTIVE?t.forEach(function(e){return e.className="link disabled"}):void 0},t.prototype.attachLinks=function(e){var t;return t=function(){var t,n;return t=this.data("action"),n=JSON.parse(this.data("params")),null!=t&&null!=n&&e.config.status===NANO.INTERACTIVE?nanoui.act(t,n):void 0},this.fragment.queryAll(".link.active").forEach(function(e){return e.on("click",t)})},t}()}.call(this),window.TMPL={},TMPL.airlock_electronics=function(e,t,n){var a='
';a+=e.oneAccess?""+n.link("One Required","unlock","one_access"):""+n.link("All Required","lock","one_access"),a+=""+n.link("Clear","refresh","clear")+'
';var r=e.regions;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+='";a+="";var l=e.regions;if(l)for(var s,i=-1,c=l.length-1;c>i;){s=l[i+=1],a+=""}return a+="
'+s.name+"
";var u=s.accesses;if(u)for(var d,p=-1,f=u.length-1;f>p;)d=u[p+=1],a+=""+n.link(d.name,d.req?"check-square-o":"square-o","set",{access:d.id},null,d.req?"selected":null)+"
";a+="
"},TMPL.air_alarm=function(e,t,n){var a='
';if(a+=e.siliconUser?'
Interface Lock:
'+n.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+n.link("Disengaged","unlock","toggleaccess",null,e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",a+='

Air Status

',e.environment_data){var r=e.environment_data;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+='
'+s.name+':
',a+=2==s.danger_level?'':1==s.danger_level?'':'',a+=""+n.fixed(s.value,2)+s.unit+"
";a+='
Local Status:
',a+=2==e.danger_level?'Danger (Internals Required)':1==e.danger_level?'Caution':'Optimal',a+='
Area Status:
',a+=e.atmos_alarm?'Atmosphere Alarm':e.fire_alarm?'Fire Alarm':'Nominal',a+="
"}else a+='
Warning: Cannot obtain air sample for analysis.
';if(e.dangerous&&(a+='
Warning: Safety measures offline. Device may exhibit abnormal behavior.
'),a+="
",!e.locked||e.siliconUser)if(1!=e.screen&&(a+=""+n.link("Back","arrow-left","screen",{screen:1})),1==e.screen)a+='

Air Controls

',a+=e.atmos_alarm?""+n.link("Area Atmospheric Alarm","close","reset",null,null,"caution"):""+n.link("Area Atmospheric Alarm","hand-stop-o","alarm"),a+='
',a+=3!=e.mode?""+n.link("Panic Siphon","exclamation","mode",{mode:3}):""+n.link("Panic Siphon","close","mode",{mode:1},null,"danger"),a+='
'+n.link("Vent Controls","sign-out","screen",{screen:2})+'
'+n.link("Scrubber Controls","filter","screen",{screen:3})+'
'+n.link("Set Environmental Mode","cog","screen",{screen:4})+'
'+n.link("Set Alarm Threshold","bar-chart","screen",{screen:5})+"
";else if(2==e.screen){var l=e.vents;if(l)for(var c,i=-1,u=l.length-1;u>i;)c=l[i+=1],a+='

'+c.long_name+'

Power:
',a+=c.power?""+n.link("On","power-off","adjust",{id_tag:c.id_tag,command:"power",val:0},null,null):""+n.link("Off","close","adjust",{id_tag:c.id_tag,command:"power",val:1},null,"danger"),a+='
Mode:
',a+="release"==c.direction?'Pressurizing':'Siphoning',a+='
Pressure Checks:
'+n.link("Internal","sign-in","adjust",{id_tag:c.id_tag,command:"incheck",val:c.checks},null,c.incheck?"selected":null)+n.link("External","sign-out","adjust",{id_tag:c.id_tag,command:"excheck",val:c.checks},null,c.excheck?"selected":null)+'
Set Pressure:
'+n.link(n.fixed(c.external),"pencil","adjust",{id_tag:c.id_tag,command:"set_external_pressure"})+n.link("Reset","refresh","adjust",{id_tag:c.id_tag,command:"reset_external_pressure"},c.extdefault?"disabled":null)+"
";e.vents.length||(a+='No vents connected.')}else if(3==e.screen){var d=e.scrubbers;if(d)for(var p,i=-1,f=d.length-1;f>i;)p=d[i+=1],a+='

'+p.long_name+'

Power:
',a+=p.power?""+n.link("On","power-off","adjust",{id_tag:p.id_tag,command:"power",val:0},null,null):""+n.link("Off","close","adjust",{id_tag:p.id_tag,command:"power",val:1},null,"danger"), +a+='
Mode:
',a+=p.scrubbing?""+n.link("Scrubbing","filter","adjust",{id_tag:p.id_tag,command:"scrubbing",val:0},null,null):""+n.link("Siphoning","sign-in","adjust",{id_tag:p.id_tag,command:"scrubbing",val:1},null,"danger"),a+='
Range:
',a+=p.widenet?""+n.link("Extended","expand","adjust",{id_tag:p.id_tag,command:"widenet",val:0},null,"caution"):""+n.link("Normal","compress","adjust",{id_tag:p.id_tag,command:"widenet",val:1},null,null),a+='
Filters:
'+n.link("CO2",p.filter_co2?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"co2_scrub",val:p.filter_co2?0:1},null,p.filter_co2?"selected":null)+n.link("N2O",p.filter_n2o?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"n2o_scrub",val:p.filter_n2o?0:1},null,p.filter_n2o?"selected":null)+n.link("Plasma",p.filter_toxins?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"tox_scrub",val:p.filter_toxins?0:1},null,p.filter_toxins?"selected":null)+"
";e.scrubbers.length||(a+='No scrubbers connected.')}else if(4==e.screen){a+='

Environmental Modes

';var h=e.modes;if(h)for(var v,i=-1,g=h.length-1;g>i;)v=h[i+=1],a+='
'+n.link(v.name,v.selected?"check-square-o":"square-o","mode",{mode:v.mode},null,v.selected?v.danger?"danger":"selected":null)+"
";a+="
"}else if(5==e.screen){a+='

Alarm Thresholds

';var m=e.thresholds;if(m)for(var b,i=-1,y=m.length-1;y>i;){b=m[i+=1],a+="";var w=b.settings;if(w)for(var k,T=-1,E=w.length-1;E>T;)k=w[T+=1],a+="";a+=""}a+="
min2min1max1max2
"+b.name+""+n.link(k.selected>=0?n.round(100*k.selected)/100:"Off",null,"adjust",{command:"set_threshold",env:k.env,"var":k.val})+"
"}return a},TMPL.apc=function(e,t,n){var a='
';a+=e.siliconUser?'
Interface Lock:
'+n.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+n.link("Disengaged","unlock","toggleaccess",null,e.malfStatus>=2?"linkOff":e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",a+='

Power Status

Main Breaker:
',a+=e.locked&&!e.siliconUser?e.isOperating?'On':'Off':""+n.link("On","power-off","breaker",null,e.isOperating?"selected":null)+n.link("Off","close","breaker",null,e.isOperating?null:"selected"),a+='
External Power:
',a+=2==e.externalPower?'Good':1==e.externalPower?'Low':'None',a+='
Power Cell:
',a+=null!=e.powerCellStatus?""+n.bar(e.powerCellStatus,0,100,e.powerCellStatus>=50?"good":e.powerCellStatus>=25?"average":"bad",n.fixed(e.powerCellStatus)+"%"):'Power cell removed.',a+="
",null!=e.powerCellStatus&&(a+='
Charge Mode:
',a+=e.locked&&!e.siliconUser?e.chargeMode?'Auto':'Off':""+n.link("Auto","refresh","chargemode",null,e.chargeMode?"selected":null)+n.link("Off","close","chargemode",null,e.chargeMode?null:"selected"),a+=" ",a+=e.chargingStatus>1?'[Fully Charged]':1==e.chargingStatus?'[Charging]':'[Not Charging]',a+="
"),a+='

Power Channels

';var r=e.powerChannels;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+="";return a+='
"+s.title+":"+s.powerLoad+" W",s.status<=1?a+='Off':s.status>=2&&(a+='On'),a+="",a+=1==s.status||3==s.status?"[Auto]":"[Manual]",a+='',(!e.locked||e.siliconUser)&&(a+=""+n.link("Auto","refresh","channel",s.topicParams.auto,1==s.status||3==s.status?"selected":null)+n.link("On","power-off","channel",s.topicParams.on,2==s.status?"selected":null)+n.link("Off","close","channel",s.topicParams.off,0==s.status?"selected":null)),a+="
Total Load:'+e.totalLoad+" W
",e.siliconUser&&(a+='

System Overrides

'+n.link("Overload Lighting Circuit","lightbulb-o","overload")+"
",1==e.malfStatus?a+=""+n.link("Override Programming","terminal","hack"):2==e.malfStatus?a+=""+n.link("Shunt Core Processes","caret-square-o-down","occupy"):3==e.malfStatus?a+=""+n.link("Return to Main Core","carat-square-o-left","deoccupy"):4==e.malfStatus&&(a+=""+n.link("Shunt Core Processes","caret-square-o-down")),a+="
"),a+='
Cover Lock:
',a+=e.locked&&!e.siliconUser?e.coverLocked?"Engaged":"Disengaged":""+n.link("Engaged","lock","lock",null,e.coverLocked?"selected":null)+n.link("Disengaged","unlock","lock",null,e.coverLocked?null:"selected"),a+="
"},TMPL.atmos_filter=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Filter:
'+n.link("Nothing",null,"filter",{mode:-1},-1==e.filter_type?"selected":null)+n.link("Plasma",null,"filter",{mode:0},0==e.filter_type?"selected":null)+n.link("O2",null,"filter",{mode:1},1==e.filter_type?"selected":null)+n.link("N2",null,"filter",{mode:2},2==e.filter_type?"selected":null)+n.link("CO2",null,"filter",{mode:3},3==e.filter_type?"selected":null)+n.link("N2O",null,"filter",{mode:4},4==e.filter_type?"selected":null)+"
";return a},TMPL.atmos_mixer=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Node 1:
'+n.link("","fast-backward","node1",{concentration:"-0.1"},null)+n.link("","backward","node1",{concentration:"-0.01"},null)+n.link("","forward","node1",{concentration:"0.01"},null)+n.link("","fast-forward","node1",{concentration:"0.1"},null)+''+e.node1_concentration+'%
Node 2:
'+n.link("","fast-backward","node2",{concentration:"-0.1"},null)+n.link("","backward","node2",{concentration:"-0.01"},null)+n.link("","forward","node2",{concentration:"0.01"},null)+n.link("","fast-forward","node2",{concentration:"0.1"},null)+''+e.node2_concentration+"%
";return a},TMPL.atmos_pump=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+"
";return a+=e.max_rate?'
Transfer Rate:
'+n.link("Set","pencil","transfer",{set:"custom"})+n.link("Max","plus","transfer",{set:"max"},e.transfer_rate==e.max_rate?"disabled":null)+''+e.transfer_rate+" L/s
":'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+" kPa
",a+="
"},TMPL.canister=function(e,t,n){var a='
';return a+=e.hasHoldingTank?"The regulator is connected to a tank.":"The regulator is not connected to a tank.",a+='

Canister

'+n.link("Relabel","pencil","relabel",null,e.canLabel?null:"disabled")+'
Pressure:
'+e.tankPressure+' kPa
Port:
',a+=e.portConnected?'Connected':'Disconnected',a+='

Valve

Release Pressure:
'+n.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+n.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+n.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+n.link("Set","pencil","pressure",{set:"custom"},null)+n.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+n.link("Open","unlock","valve",null,e.valveOpen?"selected":null)+n.link("Close","lock","valve",null,e.valveOpen?null:"selected")+'

Holding Tank

',a+=e.hasHoldingTank?"
"+n.link("Eject","eject","eject")+'
Label:
'+e.holdingTank.name+'
Tank Pressure:
'+e.holdingTank.tankPressure+" kPa
":'
No Holding Tank
',a+="
"},TMPL.chem_dispenser=function(e,t,n){var a='

Status

Energy:
'+n.bar(e.energy,0,e.maxEnergy,null,e.energy+" Units")+'
Amount:
',r=e.beakerTransferAmounts;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=""+n.link(s,"plus","amount",{set:s},e.amount==s?"selected":null);a+='

Dispense

';var l=e.chemicals;if(l)for(var c,i=-1,u=l.length-1;u>i;)c=l[i+=1],a+=""+n.link(c.title,"tint","dispense",c.commands,null,"gridable");a+='

Beaker

'+n.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
';var d=e.beakerTransferAmounts;if(d)for(var s,i=-1,p=d.length-1;p>i;)s=d[i+=1],a+=""+n.link(s,"minus","remove",{amount:s});if(a+='
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){a+=""+e.beakerCurrentVolume+"/"+e.beakerMaxVolume+" Units
";var f=e.beakerContents;if(f)for(var h,i=-1,v=f.length-1;v>i;)h=f[i+=1],a+=''+h.volume+" units of "+h.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.chem_heater=function(e,t,n){var a='

Status

Power:
'+n.link(e.isActive?"On":"Off",e.isActive?"power-off":"close","power",null,e.isBeakerLoaded?null:"disabled")+'
Target:
'+n.link(e.targetTemp+"K","pencil","temperature")+'

Beaker

'+n.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
';if(e.isBeakerLoaded)if(a+="Temperature: "+e.currentTemp+"K
",e.beakerContents.length){var r=e.beakerContents;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=''+s.volume+" units of "+s.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.cryo=function(e,t,n){var a='

Occupant

Occupant:
';if(a+=e.hasOccupant?""+e.occupant.name+"":'No Occupant',a+="
",e.hasOccupant&&(a+='
State:
',a+=0==e.occupant.stat?'Conscious':1==e.occupant.stat?'Unconscious':'Dead',a+='
Temperature:
'+n.round(e.occupant.bodyTemperature)+" K
"),e.hasOccupant&&e.occupant.stat<2&&(a+='
Health:
'+n.bar(e.occupant.health,e.occupant.minHealth,e.occupant.Maxhealth,e.occupant.health>=0?"good":"average",n.round(e.occupant.health))+'
Brute:
'+n.bar(e.occupant.bruteLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.bruteLoss))+'
Respiratory:
'+n.bar(e.occupant.oxyLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.oxyLoss))+'
Toxin:
'+n.bar(e.occupant.toxLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.toxLoss))+'
Burn:
'+n.bar(e.occupant.fireLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.fireLoss))+"
"),a+='

Cell

Power:
',a+=e.isOperating?""+n.link("On","power-off","off"):""+n.link("Off","close","on"),a+='
Temperature:
'+e.cellTemperature+' K
Door:
',a+=e.isOpen?""+n.link("Open","unlock","close"):""+n.link("Closed","lock","open"),a+=e.autoEject?""+n.link("Auto","sign-out","autoeject"):""+n.link("Manual","sign-in","autoeject"),a+='

Beaker

'+n.link("Eject","eject","ejectbeaker",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){var r=e.beakerContents;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=''+s.volume+" units of "+s.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.smes=function(e,t,n){var a='

Storage

Stored Energy:
'+n.bar(e.capacityPercent,0,100,e.capacityPercent>=50?"good":e.capacityPercent>=15?"average":"bad",n.round(e.capacityPercent)+"%")+'

Input

Charge Mode:
'+n.link("Auto","refresh","tryinput",null,e.inputAttempt?"selected":null)+n.link("Off","close","tryinput",null,e.inputAttempt?null:"selected")+" ";return a+=e.capacityPercent>=99?"[Fully Charged]":e.inputting?"[Charging]":"[Not Charging]",a+='
Input Setting:
'+n.bar(e.inputLevel,0,e.inputLevelMax,null,e.inputLevel+" W")+'
Adjust Input:
'+n.link("","fast-backward","input",{set:"min"},e.inputLevel?null:"selected")+n.link("","backward","input",{set:"minus"},e.inputLevel?null:"disabled")+n.link("Set","pencil","input",{set:"custom"},null)+n.link("","forward","input",{set:"plus"},e.inputLevel==e.inputLevelMax?"disabled":null)+n.link("","fast-forward","input",{set:"max"},e.inputLevel==e.inputLevelMax?"selected":null)+'
Available:
'+e.inputAvailable+' W

Output

Charge Mode:
'+n.link("On","power-off","tryoutput",null,e.outputAttempt?"selected":null)+n.link("Off","close","tryoutput",null,e.outputAttempt?null:"selected")+" ",a+=e.outputting?'[Sending]':e.charge>0?'[Not Sending]':'[No Charge]',a+='
Output Setting:
'+n.bar(e.outputLevel,0,e.outputLevelMax,null,e.outputLevel+" W")+'
Adjust Output:
'+n.link("","fast-backward","output",{set:"min"},e.outputLevel?null:"selected")+n.link("","backward","output",{set:"minus"},e.outputLevel?null:"disabled")+n.link("Set","pencil","output",{set:"custom"},null)+n.link("","forward","output",{set:"plus"},e.outputLevel==e.outputLevelMax?"disabled":null)+n.link("","fast-forward","output",{set:"max"},e.outputLevel==e.outputLevelMax?"selected":null)+'
Outputting:
'+e.outputUsed+" W
"},TMPL.solar_control=function(e,t,n){var a='

Status

Generated Power:
'+e.generated+' W
Orientation:
'+e.angle+"° ("+e.direction+')
Adjust:
'+n.link("15°","step-backward","control",{cdir:"-15"})+n.link("1°","backward","control",{cdir:"-1"})+n.link("1°","forward","control",{cdir:"1"})+n.link("15°","step-forward","control",{cdir:"15"})+'

Tracking

Tracker Mode:
'+n.link("Off","close","tracking",{mode:"0"},0==e.tracking_state?"selected":"")+n.link("Timed","clock-o","tracking",{mode:"1"},1==e.tracking_state?"selected":"");return a+=e.connected_tracker?""+n.link("Auto","refresh","tracking",{mode:"2"},2==e.tracking_state?"selected":""):""+n.link("Auto","refresh",null,null,"disabled"),a+='
Tracking Rate:
'+e.tracking_rate+" deg/h ("+e.rotating_way+')
Adjust:
'+n.link("180°","fast-backward","control",{tdir:"-180"})+n.link("30°","step-backward","control",{tdir:"-30"})+n.link("1°","backward","control",{tdir:"-1"})+n.link("1°","forward","control",{tdir:"1"})+n.link("30°","step-forward","control",{tdir:"30"})+n.link("180°","fast-forward","control",{tdir:"180"})+'

Devices

Search:
'+n.link("Refresh","refresh","refresh")+'
Solar Tracker:
',a+=e.connected_tracker?'Found':'Not Found',a+='
Solars Panels:
'+e.connected_panels+" Connected
"},TMPL.space_heater=function(e,t,n){var a='

Status

Power:
'+n.link("On","power-off","power",null,e.on?"selected":null)+n.link("Off","close","power",null,e.on?null:"selected")+'
Stored Energy:
';return a+=e.hasPowercell?""+n.bar(e.powerLevel,0,100,"good",e.powerLevel+"%"):'No power cell loaded.',a+="
",e.open&&(a+='
Cell:
',a+=e.hasPowercell?""+n.link("Eject","eject","ejectcell"):""+n.link("Install","eject","installcell"),a+="
"),a+='

Thermostat

Current Temp:
'+e.currentTemp+'°C
Target Temp:
'+e.targetTemp+"°C
",e.open&&(a+='
Adjustment:
'+n.link("","fast-backward","temp",{set:-20},e.targetTemp>e.minTemp?null:"disabled")+n.link("","backward","temp",{set:-5},e.targetTemp>e.minTemp?null:"disabled")+n.link("Set","pencil","temp",{set:"custom"},null)+n.link("","forward","temp",{set:5},e.targetTemp
"),a+='
Operational Mode:
',a+=e.open?""+n.link("Heat","long-arrow-up","mode",{mode:"heat"},"heat"!=e.mode?null:"selected")+n.link("Cool","long-arrow-down","mode",{mode:"cool"},"cool"!=e.mode?null:"selected")+n.link("Auto","arrows-v","mode",{mode:"auto"},"heat"==e.mode||"cool"==e.mode?null:"selected"):"heat"==e.mode?'Heat':"cool"==e.mode?'Cool':'Auto',a+="
"},TMPL.tanks=function(e,t,n){var a='
';return a+=e.hasHoldingTank?"The regulator is connected to a mask.":"The regulator is not connected to a mask.",a+='
Tank Pressure:
'+n.bar(e.tankPressure,0,1013,e.tankPressure>200?"good":e.tankPressure>100?"average":"bad",e.tankPressure+" kPa")+'
Release Pressure:
'+n.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+n.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+n.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+n.link("Set","pencil","pressure",{set:"custom"},null)+n.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+n.link("Open","unlock","valve",null,e.maskConnected?e.valveOpen?"selected":null:"disabled")+n.link("Close","lock","valuve",null,e.valveOpen?null:"selected")+"
"},TMPL._generic=function(e,t,n){var a="
"+t.title+"
Initiating...
";return a},TMPL._nanotrasen=function(e,t,n){var a="
"+t.title+"
Initiating...
";return a}; \ No newline at end of file