'},addEventListener("DOMContentLoaded",function(){if(CustomElements.useNative===!1){var a=Element.prototype.createShadowRoot;Element.prototype.createShadowRoot=function(){var b=a.call(this);return CustomElements.watchShadow(this),b}}}),Platform.templateContent=function(a){if(window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(a),!a.content&&!a._content){for(var b=document.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a._content=b}return a.content||a._content}}(window.Platform),function(a){"use strict";function b(a){return void 0!==m[a]}function c(){h.call(this),this._isInvalid=!0}function d(a){return""==a&&c.call(this),a.toLowerCase()}function e(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,63,96].indexOf(b)?a:encodeURIComponent(a)}function f(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,96].indexOf(b)?a:encodeURIComponent(a)}function g(a,g,h){function i(a){t.push(a)}var j=g||"scheme start",k=0,l="",r=!1,s=!1,t=[];a:for(;(a[k-1]!=o||0==k)&&!this._isInvalid;){var u=a[k];switch(j){case"scheme start":if(!u||!p.test(u)){if(g){i("Invalid scheme.");break a}l="",j="no scheme";continue}l+=u.toLowerCase(),j="scheme";break;case"scheme":if(u&&q.test(u))l+=u.toLowerCase();else{if(":"!=u){if(g){if(o==u)break a;i("Code point not allowed in scheme: "+u);break a}l="",k=0,j="no scheme";continue}if(this._scheme=l,l="",g)break a;b(this._scheme)&&(this._isRelative=!0),j="file"==this._scheme?"relative":this._isRelative&&h&&h._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(query="?",j="query"):"#"==u?(this._fragment="#",j="fragment"):o!=u&&" "!=u&&"\\n"!=u&&"\\r"!=u&&(this._schemeData+=e(u));break;case"no scheme":if(h&&b(h._scheme)){j="relative";continue}i("Missing scheme."),c.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[k+1]){i("Expected /, got: "+u),j="relative";continue}j="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=h._scheme),o==u){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query;break a}if("/"==u||"\\\\"==u)"\\\\"==u&&i("\\\\ is an invalid code point."),j="relative slash";else if("?"==u)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query="?",j="query";else{if("#"!=u){var v=a[k+1],w=a[k+2];("file"!=this._scheme||!p.test(u)||":"!=v&&"|"!=v||o!=w&&"/"!=w&&"\\\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._path.pop()),j="relative path";continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment="#",j="fragment"}break;case"relative slash":if("/"!=u&&"\\\\"!=u){"file"!=this._scheme&&(this._host=h._host,this._port=h._port),j="relative path";continue}"\\\\"==u&&i("\\\\ is an invalid code point."),j="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){i("Expected \'/\', got: "+u),j="authority ignore slashes";continue}j="authority second slash";break;case"authority second slash":if(j="authority ignore slashes","/"!=u){i("Expected \'/\',got:"+u);continue}break;case"authorityignoreslashes":if("/"!=u&&"\\\\"!=u){j="authority";continue}i("Expectedauthority,got:"+u);break;case"authority":if("@"==u){r&&(i("@alreadyseen."),l+="%40"),r=!0;for(var x=0;x<l.length;x++){var y=l[x];if(""!=y&&"\\n"!=y&&"\\r"!=y)if(":"!=y||null!==this._password){var z=e(y);null!==this._password?this._password+=z:this._username+=z}else this._password="";else i("Invalidwhitespaceinauthority.")}l=""}else{if(o==u||"/"==u||"\\\\"==u||"?"==u||"#"==u){k-=l.length,l="",j="host";continue}l+=u}break;case"filehost":if(o==u||"/"==u||"\\\\"==u||"?"==u||"#"==u){2!=l.length||!p.test(l[0])||":"!=l[1]&&"|"!=l[1]?0==l.length?j="relativepathstart":(this._host=d.call(this,l),l="",j="relativepathstart"):j="relativepath";continue}""==u||"\\n"==u||"\\r"==u?i("Invalidwhitespaceinfilehost."):l+=u;break;case"host":case"h
'}function n(a){o(a),d(a,function(a){o(a)})}function o(a){C?j(function(){p(a)}):p(a)}function p(a){(a.attachedCallback||a.detachedCallback||a.__upgraded__&&A.dom)&&(A.dom&&console.group("removed:",a.localName),r(a)||(a.__inserted=(a.__inserted||0)-1,a.__inserted>0&&(a.__inserted=0),a.__inserted<0?A.dom&&console.warn("removed:",a.localName,"insert/remove count:",a.__inserted):a.detachedCallback&&a.detachedCallback()),A.dom&&console.groupEnd())}function q(a){return window.ShadowDOMPolyfill?ShadowDOMPolyfill.wrapIfNeeded(a):a}function r(a){for(var b=a,c=q(document);b;){if(b==c)return!0;b=b.parentNode||b.host}}function s(a){if(a.shadowRoot&&!a.shadowRoot.__watched){A.dom&&console.log("watching shadow-root for: ",a.localName);for(var b=a.shadowRoot;b;)t(b),b=b.olderShadowRoot}}function t(a){a.__watched||(w(a),a.__watched=!0)}function u(a){if(A.dom){var b=a[0];if(b&&"childList"===b.type&&b.addedNodes&&b.addedNodes){for(var c=b.addedNodes[0];c&&c!==document&&!c.host;)c=c.parentNode;var d=c&&(c.URL||c._URL||c.host&&c.host.localName)||"";d=d.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",a.length,d||"")}a.forEach(function(a){"childList"===a.type&&(G(a.addedNodes,function(a){a.localName&&g(a)}),G(a.removedNodes,function(a){a.localName&&n(a)}))}),A.dom&&console.groupEnd()}function v(){u(F.takeRecords()),k()}function w(a){F.observe(a,{childList:!0,subtree:!0})}function x(a){w(a)}function y(a){A.dom&&console.group("upgradeDocument: ",a.baseURI.split("/").pop()),g(a),A.dom&&console.groupEnd()}function z(a){a=q(a);for(var b,c=a.querySelectorAll("link[rel="+B+"]"),d=0,e=c.length;e>d&&(b=c[d]);d++)b.import&&b.import.__parsed&&z(b.import);y(a)}var A=window.logFlags||{},B=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",C=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;a.hasPolyfillMutations=C;var D=!1,E=[],F=new MutationObserver(u),G=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.IMPORT_LINK_TYPE=B,a.watchShadow=s,a.upgradeDocumentTree=z,a.upgradeAll=g,a.upgradeSubtree=f,a.insertedNode=i,a.observeDocument=x,a.upgradeDocument=y,a.takeRecords=v}(window.CustomElements),function(a){function b(b,g){var h=g||{};if(!b)throw new Error("document.registerElement: first argument `name` must not be empty");if(b.indexOf("-")<0)throw new Error("document.registerElement: first argument (\'name\') must contain a dash (\'-\'). Argument provided was \'"+String(b)+"\'.");if(c(b))throw new Error("Failed to execute \'registerElement\' on \'Document\': Registration failed for type \'"+String(b)+"\'. The type name is invalid.");if(n(b))throw new Error("DuplicateDefinitionError: a type with name \'"+String(b)+"\'isalreadyregistered");if(!h.prototype)throw new Error("Optionsmissingrequiredprototypeproperty");return h.__name=b.toLowerCase(),h.lifecycle=h.lifecycle||{},h.ancestry=d(h.extends),e(h),f(h),l(h.prototype),o(h.__name,h),h.ctor=p(h),h.ctor.prototype=h.prototype,h.prototype.constructor=h.ctor,a.ready&&a.upgradeDocumentTree(document),h.ctor}function c(a){for(var b=0;b<y.length;b++)if(a===y[b])return!0}function d(a){var b=n(a);return b?d(b.extends).concat([b]):[]}function e(a){for(var b,c=a.extends,d=0;b=a.ancestry[d];d++)c=b.is&&b.tag;a.tag=c||a.__name,c&&(a.is=a.__name)}function f(a){if(!Object.__proto__){var b=HTMLElement.prototype;if(a.is){var c=document.createElement(a.tag),d=Object.getPrototypeOf(c);d===a.prototype&&(b=d)}for(var e,f=a.prototype;f&&f!==b;)e=Object.getPrototypeOf(f),f.__proto__=e,f=e;a.native=b}}function g(a){return h(B(a.tag),a)}function h(b,c){return c.is&&b.setAttribute("is",c.is),i(b,c),b.__upgraded__=!0,k(b),a.insertedNode(b),a.upgradeSubtree(b),b}functioni(a,b){Object.__proto__?a.__proto__=b.prototype:(j(a,b.prototype,b.native),a.__proto__=b.prototype)}functionj(a,b,c){for(vard={},e=b;e!==c&&e!==HTMLElement.prototype;){for(varf,g=Object.getOwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}functionk(a){a.createdCallback&&a.createdCallback()}functionl(a)
'if(d?f=f.toModel:"function"==typeoff.toDOM&&(f=f.toDOM),"function"!=typeoff)returnvoidconsole.error("Cannot find function or filter: "+this.name);for(varh=e||[],j=0;j<this.args.length;j++)h.push(i(this.args[j])(a,b,c));returnf.apply(g,h)}};varr={"+":function(a){return+a},"-":function(a){return-a},"!":function(a){return!a}},s={"+":function(a,b){returna+b},"-":function(a,b){returna-b},"*":function(a,b){returna*b},"/":function(a,b){returna/b},"%":function(a,b){returna%b},"<":function(a,b){returnb>a},">":function(a,b){returna>b},"<=":function(a,b){returnb>=a},">=":function(a,b){returna>=b},"==":function(a,b){returna==b},"!=":function(a,b){returna!=b},"===":function(a,b){returna===b},"!==":function(a,b){returna!==b},"&&":function(a,b){returna&&b},"||":function(a,b){returna||b}};j.prototype={createUnaryExpression:function(a,b){if(!r[a])throwError("Disallowed operator: "+a);returnb=i(b),function(c,d,e){returnr[a](b(c,d,e))}},createBinaryExpression:function(a,b,c){if(!s[a])throwError("Disallowed operator: "+a);switch(b=i(b),c=i(c),a){case"||":returnthis.dynamicDeps=!0,function(a,d,e){returnb(a,d,e)||c(a,d,e)};case"&&":returnthis.dynamicDeps=!0,function(a,d,e){returnb(a,d,e)&&c(a,d,e)}}returnfunction(d,e,f){returns[a](b(d,e,f),c(d,e,f))}},createConditionalExpression:function(a,b,c){returna=i(a),b=i(b),c=i(c),this.dynamicDeps=!0,function(d,e,f){returna(d,e,f)?b(d,e,f):c(d,e,f)}},createIdentifier:function(a){varb=newe(a);returnb.type="Identifier",b},createMemberExpression:function(a,b,c){vard=newf(b,c,a);returnd.dynamicDeps&&(this.dynamicDeps=!0),d},createCallExpression:function(a,b){if(!(ainstanceofe))throwError("Only identifier function invocations are allowed");varc=newg(a.name,b);returnfunction(a,b,d){returnc.transform(a,b,d,!1)}},createLiteral:function(a){returnnewd(a.value)},createArrayExpression:function(a){for(varb=0;b<a.length;b++)a[b]=i(a[b]);returnfunction(b,c,d){for(vare=[],f=0;f<a.length;f++)e.push(a[f](b,c,d));returne}},createProperty:function(a,b,c){return{key:binstanceofe?b.name:b.value,value:c}},createObjectExpression:function(a){for(varb=0;b<a.length;b++)a[b].value=i(a[b].value);returnfunction(b,c,d){for(vare={},f=0;f<a.length;f++)e[a[f].key]=a[f].value(b,c,d);returne}},createFilter:function(a,b){this.filters.push(newg(a,b))},createAsExpression:function(a,b){this.expression=a,this.scopeIdent=b},createInExpression:function(a,b,c){this.expression=c,this.scopeIdent=a,this.indexIdent=b},createTopLevel:function(a){this.expression=a},createThisExpression:h},k.prototype={open:function(){returnthis.value_},discardChanges:function(){returnthis.value_},deliver:function(){},close:function(){}},l.prototype={getBinding:function(a,b,c){functiond(){if(h)returnh=!1,g;i.dynamicDeps&&f.startReset();varc=i.getValue(a,i.dynamicDeps?f:void0,b);returni.dynamicDeps&&f.finishReset(),c}functione(c){returni.setValue(a,c,b),c}if(c)returnthis.getValue(a,void0,b);varf=newCompoundObserver,g=this.getValue(a,f,b),h=!0,i=this;returnnewObserverTransform(f,d,e,!0)},getValue:function(a,b,c){for(vard=i(this.expression)(a,b,c),e=0;e<this.filters.length;e++)d=this.filters[e].transform(a,b,c,!1,[d]);returnd},setValue:function(a,b,c){for(vard=this.filters?this.filters.length:0;d-->0;)b=this.filters[d].transform(a,void0,c,!0,[b]);returnthis.expression.setValue?this.expression.setValue(a,b):void0}};vart="@"+Math.random().toString(36).slice(2);p.prototype={styleObject:function(a){varb=[];for(varcina)b.push(m(c)+": "+a[c]);returnb.join("; ")},tokenList:function(a){varb=[];for(varcina)a[c]&&b.push(c);returnb.join(" ")},prepareInstancePositionChanged:function(a){varb=a.polymerExpressionIndexIdent_;if(b)returnfunction(a,c){a.model[b]=c}},prepareBinding:function(a,c,d){vare=Path.get(a);{if(o(a)||!e.valid)returnb(a,c,d,this);if(1==e.length)returnfunction(a,b,c){if(c)returne.getValueFrom(a);vard=n(a,e[0]);returnnewPathObserver(d,e)}}},prepareInstanceModel:function(a){varb=a.polymerExpressionScopeIdent_;if(b){varc=a.templateInstance?a.templateInstance.model:a.mo
'},_register:function(){c(this.extends)&&!b(this.extends)&&console.warn("%s is attempting to extend %s, an unregistered element or one that was not registered with Polymer.",this.name,this.extends),this.register(this.name,this.extends),this.registered=!0},waitingForPrototype:function(a){return h(a)?void 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){this.hasAttribute("noscript")&&!this.noscript&&(this.noscript=!0,Polymer(a))},waitingForResources:function(){return this._needsResources},waitingForQueue:function(){return f.enqueue(this,this.registerWhenReady,this._register)},loadResources:function(){this._needsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.registerWhenReady()}.bind(this))}});e.publish(e.declaration,j),g(function(){document.body.removeAttribute("unresolved"),document.dispatchEvent(new CustomEvent("polymer-ready",{bubbles:!0}))}),document.registerElement("polymer-element",{prototype:j})}(Polymer),function(){var a=document.createElement("polymer-element");a.setAttribute("name","auto-binding"),a.setAttribute("extends","template"),a.init(),Polymer("auto-binding",{createdCallback:function(){this.syntax=this.bindingDelegate=this.makeSyntax(),Polymer.whenPolymerReady(function(){this.model=this,this.setAttribute("bind",""),this.async(function(){this.marshalNodeReferences(this.parentNode),this.fire("template-bound")})}.bind(this))},makeSyntax:function(){var a=Object.create(Polymer.api.declaration.events),b=this;a.findController=function(){return b.model};var c=new PolymerExpressions,d=c.prepareBinding;return c.prepareBinding=function(b,e,f){return a.prepareEventBinding(b,e,f)||d.call(c,b,e,f)},c}})}();</script><polymer-element name="dat-gui-folder" attributes="name open parent" assetpath="../elements/dat-gui-folder/"><template><style>#name{padding:9px;padding-top:18px;border-bottom:1px solid rgba(255,255,255,.25);font-weight:700;-webkit-font-smoothing:antialiased;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.open-false #controllers{display:none}</style><div id="container" class="open-{{ open }}"><div id="name" on-tap="{{ tap }}">{{ name }}</div><div id="controllers"><content></content></div></div></template><script>Polymer("dat-gui-folder",{parent:null,open:false,add:function(){var controller=this.parent.add.apply(this.parent,arguments);this.appendChild(controller.row);return controller},"var":function(){var controller=this.parent.var.apply(this.parent,arguments);this.appendChild(controller.row);return controller},tap:function(){this.open=!this.open}});</script></polymer-element><polymer-element name="gui-row" attributes="name comment disabled" assetpath="../elements/gui-row/"><template><style>#container.disabled-true{opacity:.4;-ms-filter:"alpha(Opacity=40)";filter:alpha(opacity=40);pointer-events:none}#row{font:10px \'Lucida Grande\',sans-serif;color:#ecebe0;height:3em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:background-color .2s linear;-moz-transition:background-color .2s linear;-o-transition:background-color .2s linear;-ms-transition:background-color .2s linear;transition:background-color .2s linear;border-bottom:1px solid rgba(255,255,255,.05);padding:0 9px}:host-context(.touch-true) #row{font-size:13.5px}#controller{height:100%}#name{padding-right:9px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:38%;cursor:default;-webkit-font-smoothing:antialiased}.comment-true #name{cursor:pointer}:host-context(.touch-true) #name{font-size:11px;width:30%}#nameInner{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}#comment{font:10px \'Lucida Grande\',sans-serif;color:#ecebe0;line-height:1.6em;background:#e0cf99;color:#333;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-webkit-transition:height.15scubic-bezier(0.25,.25,0,1);-moz-transition:height.15scubic-bezier(0.25,.25,0,1);-o-transition:height.15scubic-bezier(0.25,.25,0,1);-ms-transition:height.15scubic-be
'<divhidden><script>Polymer("dat-gui-base",{ready:function(){this.update()},update:function(){},init:function(){},serialize:function(){returnJSON.stringify(this.value)},unserialize:function(obj){this.value=JSON.parse(obj)},ignore:function(){},watch:function(object,path){this.object=object;this.path=path;this.bind("value",newPathObserver(this.object,this.path))},valueChanged:function(){if(this.__firstChange){this.fire("change",this.value)}this.__firstChange=true;this.update()},on:function(event,listener){this.addEventListener(event,listener);returnthis},map:function(x,a,b,c,d){return(x-a)/(b-a)*(d-c)+c},listen:function(){Gui.warn("controller.listen() is deprecated. All controllers are listened for free.");returnthis},getValue:function(){returnthis.value},setValue:function(v){this.value=v;returnthis},onChange:function(v){var_this=this;this.addEventListener("change",function(e){v(e.detail)});returnthis},onFinishChange:function(v){returnthis.onChange(v)},disable:function(disabled){if(disabled===undefined){disabled=true}this.row.disabled=disabled;returnthis}});</script><polymer-elementname="dat-gui-base"attributes="objectpathvalue"assetpath="../elements/dat-gui-base/"></polymer-element><script>Gui.register("dat-gui-number",function(value){returntypeofvalue=="number"});Polymer("dat-gui-number",{value:0,decimals:3,computed:{slider:"min!==undefined&&max!==undefined"},ready:function(){var_this=this;window.addEventListener("keydown",function(e){if(e.keyCode==18){_this._alt=true}},false);window.addEventListener("keyup",function(e){if(e.keyCode==18){_this._alt=false}},false)},init:function(min,max,step){this.min=min;this.max=max;this.step=step},valueChanged:function(newValue){if(this.step!==undefined){this.value=Math.round(this.value/this.step)*this.step}if(this.min!==undefined){this.value=Math.max(this.value,this.min)}if(this.max!==undefined){this.value=Math.min(this.value,this.max)}this.super()},minChanged:function(){this.value=Math.max(this.value,this.min);this.update()},maxChanged:function(){this.value=Math.min(this.value,this.max);this.update()},update:function(){varratio=this.map(this.value,this.min,this.max,0,1);if(this.min<0&&this.max>0){this.$.container.classList.add("straddle-zero");varzero=this.map(0,this.min,this.max,0,1);if(this.value>=0){this.$.fill.style.left=zero*100+"%";this.$.fill.style.width=(ratio-zero)*100+"%";this.$.fill.style.right=""}else{this.$.fill.style.left="";this.$.fill.style.width=(zero-ratio)*100+"%";this.$.fill.style.right=(1-zero)*100+"%"}}else{this.$.container.classList.remove("straddle-zero");if(this.max>0){this.$.fill.style.left=0;this.$.fill.style.width=ratio*100+"%";this.$.fill.style.right=""}else{this.$.fill.style.left="";this.$.fill.style.width=(1-ratio)*100+"%";this.$.fill.style.right=0}}this.$.knob.style.left=ratio*100+"%";this.$.container.classList.toggle("positive",this.value>=0);this.$.container.classList.toggle("negative",this.value<0);this.super()},click:function(e){this.$.input.select()},keydown:function(e){if(e.keyCode==13){this.$.input.blur()}},down:function(e){e.preventDefault();this._rect=this.$.track.getBoundingClientRect();if(!this._alt){this.value=this.valueFromX(e.x)}this.fire("sliderDown")},up:function(e){this.fire("sliderUp")},trackstart:function(e){this._dragFriction=1},trackx:function(e){if(this.step===undefined){vardv=this.valueFromDX(e.ddx);if(this._alt){dv/=10}this.value+=dv*this._dragFriction}else{this.value=this.valueFromX(e.pageX)}},tracky:function(e){this._dragFriction=Math.max(.01,Math.min(1,this.map(e.dy,50,300,1,.1)))},blur:function(e){varv=parseFloat(this.$.input.value);if(v===v){this.value=v}},truncate:function(v){if(v%1!==0&&this.decimals!==undefined){returnthis.limitDecimals(v,this.decimals)}else{returnv}},limitDecimals:function(v,maxDecimals){varstr=v.toString();varnumDecimals=str.substring(str.indexOf(".")+1).length;str=v.toFixed(Math.min(numDecimals,this.decimals));for(varz,i=0,l=str.length;i<l;i++){if(str.charAt(i)!=="0"){z=i}}returnstr.substring(0,z+1)},valueFromX:function(x){returnthis.map(x,this._rect.left,this._rec