2014-09-03 00:00:52 +00:00
document . write ( [ '<script>window.Platform=window.Platform||{},window.logFlags=window.logFlags||{},function(a){var b=a.flags||{};location.search.slice(1).split("&").forEach(function(a){a=a.split("="),a[0]&&(b[a[0]]=a[1]||!0)});var c=document.currentScript||document.querySelector(\'script[src*="platform.js"]\');if(c)for(var d,e=c.attributes,f=0;f<e.length;f++)d=e[f],"src"!==d.name&&(b[d.name]=d.value||!0);b.log&&b.log.split(",").forEach(function(a){window.logFlags[a]=!0}),b.shadow=b.shadow||b.shadowdom||b.polyfill,b.shadow="native"===b.shadow?!1:b.shadow||!HTMLElement.prototype.createShadowRoot,b.shadow&&document.querySelectorAll("script").length>1&&console.warn("platform.js is not the first script on the page. See http://www.polymer-project.org/docs/start/platform.html#setup for details."),b.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=b.register),b.imports&&(window.HTMLImports=window.HTMLImports||{flags:{}},window.HTMLImports.flags.imports=b.imports),a.flags=b}(Platform),"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0})},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){var b=a[this.name];if(!b)return!1;var c=b[0]===a;return b[0]=b[1]=void 0,c},has:function(a){var b=a[this.name];return b?b[0]===a:!1}},window.WeakMap=c}(),function(global){"use strict";function detectObjectObserve(){function a(a){b=a}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=[],c={},d=[];return Object.observe(c,a),Array.observe(d,a),c.id=1,c.id=2,delete c.id,d.push(1,2),d.length=0,Object.deliverChangeRecords(a),5!==b.length?!1:"add"!=b[0].type||"update"!=b[1].type||"delete"!=b[2].type||"splice"!=b[3].type||"splice"!=b[4].type?!1:(Object.unobserve(c,a),Array.unobserve(d,a),!0)}function detectEval(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var a=new Function("","return true;");return a()}catch(b){return!1}}function isIndex(a){return+a===a>>>0}function toNumber(a){return+a}function isObject(a){return a===Object(a)}function areSameValue(a,b){return a===b?0!==a||1/a===1/b:numberIsNaN(a)&&numberIsNaN(b)?!0:a!==a&&b!==b}function getPathCharType(a){if(void 0===a)return"eof";var b=a.charCodeAt(0);switch(b){case 91:case 93:case 46:case 34:case 39:case 48:return a;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return b>=97&&122>=b||b>=65&&90>=b?"ident":b>=49&&57>=b?"number":"else"}function noop(){}function parsePath(a){function b(){if(!(k>=a.length)){var b=a[k+1];return"inSingleQuote"==l&&"\'"==b||"inDoubleQuote"==l&&\'"\'==b?(k++,d=b,m.append(),!0):void 0}}for(var c,d,e,f,g,h,i,j=[],k=-1,l="beforePath",m={push:function(){void 0!==e&&(j.push(e),e=void 0)},append:function(){void 0===e?e=d:e+=d}};l;)if(k++,c=a[k],"\\\\"!=c||!b(l)){if(f=getPathCharType(c),i=pathStateMachine[l],g=i[f]||i["else"]||"error","error"==g)return;if(l=g[0],h=m[g[1]]||noop,d=void 0===g[2]?c:g[2],h(),"afterPath"===l)return j}}function isIdent(a){return identRegExp.test(a)}function Path(a,b){if(b!==constructorIsPrivate)throw Error("Use Path.get to retrieve path objects");for(var c=0;c<a.length;c++)this.push(String(a[c]));hasEval&&this.length&&(this.getValueFrom=this.compiledGetValueFromFn())}function getPath(a){if(a instanceof Path)return a;if((null==a||0==a.length)&&(a=""),"string"!=typeof a){if(isIndex(a.length))return new Path(a,constructorIsPrivate);a=String(a)}var b=pathCache[a];if(b)return b;var c=parsePath(a);if(!c)return invalidPath;var b=new Path(c,constructorIsPrivate);return pathCache[a]=b,b}function formatAccessor(a){return isIndex(a)?"["+a+"]":\'["\'+a.replace(/"/g,\'\\\\"\')+\'"]\' } function dirtyCheck ( a ) { for ( var b = 0 ; MAX _DIRTY _CHECK _CYCLES > b && a . check _ ( ) ; ) b ++ ; return testingExposeCycleCount && ( global . dirt
2014-09-02 22:34:17 +00:00
' var e , f , g , h = b . type ; if ( "load" === h && ! b . bubbles ) { var i = c ; i instanceof Q . Document && ( g = i . defaultView ) && ( f = i , e = [ ] ) } if ( ! e ) if ( c instanceof Q . Window ) g = c , e = [ ] ; else if ( e = d ( c , b ) , "load" !== b . type ) { var i = e [ e . length - 1 ] ; i instanceof Q . Document && ( g = i . defaultView ) } return _ . set ( b , e ) , o ( b , e , g , f ) && p ( b , e , g , f ) && q ( b , e , g , f ) , X . set ( b , ab ) , V . delete ( b , null ) , T . delete ( b ) , b . defaultPrevented } function o ( a , b , c , d ) { var e = bb ; if ( c && ! r ( c , a , e , b , d ) ) return ! 1 ; for ( var f = b . length - 1 ; f > 0 ; f -- ) if ( ! r ( b [ f ] , a , e , b , d ) ) return ! 1 ; return ! 0 } function p ( a , b , c , d ) { var e = cb , f = b [ 0 ] || c ; return r ( f , a , e , b , d ) } function q ( a , b , c , d ) { for ( var e = db , f = 1 ; f < b . length ; f ++ ) if ( ! r ( b [ f ] , a , e , b , d ) ) return ; c && b . length > 0 && r ( c , a , e , b , d ) } function r ( a , b , c , d , e ) { var f = R . get ( a ) ; if ( ! f ) return ! 0 ; var g = e || h ( d , a ) ; if ( g === a ) { if ( c === bb ) return ! 0 ; c === db && ( c = cb ) } else if ( c === db && ! b . bubbles ) return ! 0 ; if ( "relatedTarget" in b ) { var i = O ( b ) , j = i . relatedTarget ; if ( j ) { if ( j instanceof Object && j . addEventListener ) { var l = P ( j ) , m = k ( b , a , l ) ; if ( m === g ) return ! 0 } else m = null ; W . set ( b , m ) } } X . set ( b , c ) ; var n = b . type , o = ! 1 ; U . set ( b , g ) , V . set ( b , a ) , f . depth ++ ; for ( var p = 0 , q = f . length ; q > p ; p ++ ) { var r = f [ p ] ; if ( r . removed ) o = ! 0 ; else if ( ! ( r . type !== n || ! r . capture && c === bb || r . capture && c === db ) ) try { if ( "function" == typeof r . handler ? r . handler . call ( a , b ) : r . handler . handleEvent ( b ) , Z . get ( b ) ) return ! 1 } catch ( s ) { J || ( J = s ) } } if ( f . depth -- , o && 0 === f . depth ) { var t = f . slice ( ) ; f . length = 0 ; for ( var p = 0 ; p < t . length ; p ++ ) t [ p ] . removed || f . push ( t [ p ] ) } return ! Y . get ( b ) } function s ( a , b , c ) { this . type = a , this . handler = b , this . capture = Boolean ( c ) } function t ( a , b ) { if ( ! ( a instanceof eb ) ) return P ( x ( eb , "Event" , a , b ) ) ; var c = a ; return pb || "beforeunload" !== c . type ? void ( this . impl = c ) : new y ( c ) } function u ( a ) { return a && a . relatedTarget ? Object . create ( a , { relatedTarget : { value : O ( a . relatedTarget ) } } ) : a } function v ( a , b , c ) { var d = window [ a ] , e = function ( b , c ) { return b instanceof d ? void ( this . impl = b ) : P ( x ( d , a , b , c ) ) } ; if ( e . prototype = Object . create ( b . prototype ) , c && M ( e . prototype , c ) , d ) try { N ( d , e , new d ( "temp" ) ) } catch ( f ) { N ( d , e , document . createEvent ( a ) ) } return e } function w ( a , b ) { return function ( ) { arguments [ b ] = O ( arguments [ b ] ) ; var c = O ( this ) ; c [ a ] . apply ( c , arguments ) } } function x ( a , b , c , d ) { if ( nb ) return new a ( c , u ( d ) ) ; var e = O ( document . createEvent ( b ) ) , f = mb [ b ] , g = [ c ] ; return Object . keys ( f ) . forEach ( function ( a ) { var b = null != d && a in d ? d [ a ] : f [ a ] ; "relatedTarget" === a && ( b = O ( b ) ) , g . push ( b ) } ) , e [ "init" + b ] . apply ( e , g ) , e } function y ( a ) { t . call ( this , a ) } function z ( a ) { return "function" == typeof a ? ! 0 : a && a . handleEvent } function A ( a ) { switch ( a ) { case "DOMAttrModified" : case "DOMAttributeNameChanged" : case "DOMCharacterDataModified" : case "DOMElementNameChanged" : case "DOMNodeInserted" : case "DOMNodeInsertedIntoDocument" : case "DOMNodeRemoved" : case "DOMNodeRemovedFromDocument" : case "DOMSubtreeModified" : return ! 0 } return ! 1 } function B ( a ) { this . impl = a } function C ( a ) { return a instanceof Q . ShadowRoot && ( a = a . host ) , O ( a ) } function D ( a , b ) { var c = R . get ( a ) ; if ( c ) for ( var d = 0 ; d < c . length ; d ++ ) if ( ! c [ d ] . removed && c [ d ] . type === b ) return ! 0 ; return ! 1 } function E ( a , b ) { for ( var c = O ( a ) ; c ; c = c . parentNode ) if ( D ( P ( c ) , b ) ) return ! 0 ; return ! 1 } function F ( a ) { K ( a , rb ) } function G ( b , c , e , f ) { a . renderAllPending ( ) ; var g = P ( sb . call ( c . impl , e , f ) ) ; if ( ! g ) return null ; var i = d ( g , null ) , j = i . lastIndexOf ( b ) ; return - 1 == j ? null : ( i = i . slice ( 0 , j ) , h ( i , b ) ) } function H ( a ) { return function ( ) { var b = $ . get ( this ) ; return b && b [ a ] && b [ a ] . value || null } } function I ( a ) { var b = a . slice ( 2 ) ; return function ( c ) { var d = $ . get ( this ) ; d || ( d = Object . create ( null ) , $ . set ( this , d ) ) ; var e = d [ a ] ; if ( e && this . removeEventListener ( b , e . wrapped , ! 1 ) , "function" == typeof c ) { var f = function ( b ) { var d = c . call ( this , b ) ; d === ! 1 ? b . preventDefault ( ) : "onbeforeunload" === a && "string" == typeof d && ( b . returnValue = d ) } ; this . addEventListener ( b , f , ! 1 ) , d [ a ] = { value : c , wrapped : f } } } } var J , K = a . forwardMethodsToWrapper , L = a . getTreeScope , M = a . mixin , N = a . registerWrapper , O = a . unwrap , P = a . wrap , Q = a . wrappers , R = ( new WeakMap , new WeakMap ) , S = new WeakMap , T = new WeakMap , U = new WeakMap , V = new WeakMap , W = new WeakMap , X = new WeakMap , Y = new WeakMap , Z = new WeakMap , $ = new WeakMap , _ = new WeakMap , ab = 0 , bb = 1 , cb = 2 , db = 3 ; s . prototype = { equals : function ( a ) { return this . handler === a . handler && this . type === a . type && this . capture === a . capture } , get removed ( ) { return null === this . handler } , remove : function ( ) { this . handler = null } } ; var eb = window . Event ;
2014-09-03 00:00:52 +00:00
' } , createTBody : function ( ) { return g ( f ( this ) . createTBody ( ) ) } , get rows ( ) { return h ( f ( this ) . rows ) } , insertRow : function ( a ) { return g ( f ( this ) . insertRow ( a ) ) } } ) , e ( i , b , document . createElement ( "table" ) ) , a . wrappers . HTMLTableElement = b } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; function b ( a ) { c . call ( this , a ) } var c = a . wrappers . HTMLElement , d = a . mixin , e = a . registerWrapper , f = a . wrapHTMLCollection , g = a . unwrap , h = a . wrap , i = window . HTMLTableSectionElement ; b . prototype = Object . create ( c . prototype ) , d ( b . prototype , { get rows ( ) { return f ( g ( this ) . rows ) } , insertRow : function ( a ) { return h ( g ( this ) . insertRow ( a ) ) } } ) , e ( i , b , document . createElement ( "thead" ) ) , a . wrappers . HTMLTableSectionElement = b } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; function b ( a ) { c . call ( this , a ) } var c = a . wrappers . HTMLElement , d = a . mixin , e = a . registerWrapper , f = a . wrapHTMLCollection , g = a . unwrap , h = a . wrap , i = window . HTMLTableRowElement ; b . prototype = Object . create ( c . prototype ) , d ( b . prototype , { get cells ( ) { return f ( g ( this ) . cells ) } , insertCell : function ( a ) { return h ( g ( this ) . insertCell ( a ) ) } } ) , e ( i , b , document . createElement ( "tr" ) ) , a . wrappers . HTMLTableRowElement = b } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; function b ( a ) { switch ( a . localName ) { case "content" : return new c ( a ) ; case "shadow" : return new e ( a ) ; case "template" : return new f ( a ) } d . call ( this , a ) } var c = a . wrappers . HTMLContentElement , d = a . wrappers . HTMLElement , e = a . wrappers . HTMLShadowElement , f = a . wrappers . HTMLTemplateElement , g = ( a . mixin , a . registerWrapper ) , h = window . HTMLUnknownElement ; b . prototype = Object . create ( d . prototype ) , g ( h , b ) , a . wrappers . HTMLUnknownElement = b } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; var b = a . wrappers . Element , c = a . wrappers . HTMLElement , d = a . registerObject , e = "http://www.w3.org/2000/svg" , f = document . createElementNS ( e , "title" ) , g = d ( f ) , h = Object . getPrototypeOf ( g . prototype ) . constructor ; if ( ! ( "classList" in f ) ) { var i = Object . getOwnPropertyDescriptor ( b . prototype , "classList" ) ; Object . defineProperty ( c . prototype , "classList" , i ) , delete b . prototype . classList } a . wrappers . SVGElement = h } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; function b ( a ) { m . call ( this , a ) } var c = a . mixin , d = a . registerWrapper , e = a . unwrap , f = a . wrap , g = window . SVGUseElement , h = "http://www.w3.org/2000/svg" , i = f ( document . createElementNS ( h , "g" ) ) , j = document . createElementNS ( h , "use" ) , k = i . constructor , l = Object . getPrototypeOf ( k . prototype ) , m = l . constructor ; b . prototype = Object . create ( l ) , "instanceRoot" in j && c ( b . prototype , { get instanceRoot ( ) { return f ( e ( this ) . instanceRoot ) } , get animatedInstanceRoot ( ) { return f ( e ( this ) . animatedInstanceRoot ) } } ) , d ( g , b , j ) , a . wrappers . SVGUseElement = b } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; function b ( a ) { c . call ( this , a ) } var c = a . wrappers . EventTarget , d = a . mixin , e = a . registerWrapper , f = a . wrap , g = window . SVGElementInstance ; g && ( b . prototype = Object . create ( c . prototype ) , d ( b . prototype , { get correspondingElement ( ) { return f ( this . impl . correspondingElement ) } , get correspondingUseElement ( ) { return f ( this . impl . correspondingUseElement ) } , get parentNode ( ) { return f ( this . impl . parentNode ) } , get childNodes ( ) { throw new Error ( "Not implemented" ) } , get firstChild ( ) { return f ( this . impl . firstChild ) } , get lastChild ( ) { return f ( this . impl . lastChild ) } , get previousSibling ( ) { return f ( this . impl . previousSibling ) } , get nextSibling ( ) { return f ( this . impl . nextSibling ) } } ) , e ( g , b ) , a . wrappers . SVGElementInstance = b ) } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; function b ( a ) { this . impl = a } var c = a . mixin , d = a . registerWrapper , e = a . unwrap , f = a . unwrapIfNeeded , g = a . wrap , h = window . CanvasRenderingContext2D ; c ( b . prototype , { get canvas ( ) { return g ( this . impl . canvas ) } , drawImage : function ( ) { arguments [ 0 ] = f ( arguments [ 0 ] ) , this . impl . drawImage . apply ( this . impl , arguments ) } , createPattern : function ( ) { return arguments [ 0 ] = e ( arguments [ 0 ] ) , this . impl . createPattern . apply ( this . impl , arguments ) } } ) , d ( h , b , document . createElement ( "canvas" ) . getContext ( "2d" ) ) , a . wrappers . CanvasRenderingContext2D = b } ( window . ShadowDOMPolyfill ) , function ( a ) { "use strict" ; function b ( a ) { this . impl = a } var c = a . mixin , d = a . registerWrapper , e = a . unwrapIfNeeded , f = a . wrap , g = window . WebGLRenderingContext ; if ( g ) { c ( b . prototype , { get canvas ( ) { return f ( this . impl . canvas ) } , texImage2D : function ( ) { arguments [ 5 ] = e ( arguments [ 5 ] ) , this . impl .
'},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" authority ignore slashes ":if(" / "!=u&&" \ \ \ \ "!=u){j=" authority ";continue}i(" Expected authority , got : "+u);break;case" authority ":if(" @ "==u){r&&(i(" @ already seen . "),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(" Invalid whitespace in authority . ")}l=" "}else{if(o==u||" / "==u||" \ \ \ \ "==u||" ? "==u||" # "==u){k-=l.length,l=" ",j=" host ";continue}l+=u}break;case" file host ":if(o==u||" / "==u||" \ \ \ \ "==u||" ? "==u||" # "==u){2!=l.length||!p.test(l[0])||" : "!=l[1]&&" | "!=l[1]?0==l.length?j=" relative path start ":(this._host=d.call(this,l),l=" ",j=" relative path start "):j=" relative path ";continue}" "==u||" \ \ n "==u||" \ \ r "==u?i(" Invalid whitespace in file host . "):l+=u;break;case" host ":case" h
2014-09-02 22:34:17 +00:00
'}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)+"\' is already registered ");if(!h.prototype)throw new Error(" Options missing required prototype property ");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 } function i ( a , b ) { Object . _ _proto _ _ ? a . _ _proto _ _ = b . prototype : ( j ( a , b . prototype , b . native ) , a . _ _proto _ _ = b . prototype ) } function j ( a , b , c ) { for ( var d = { } , e = b ; e !== c && e !== HTMLElement . prototype ; ) { for ( var f , 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 ) } } function k ( a ) { a . createdCallback && a . createdCallback ( ) } function l ( a )
'' ,
'<!-- src -->' ,
2014-09-08 00:22:30 +00:00
'<script>(function(scope){"use strict";var Gui=function(params){if(!ready){Gui.error("Gui not ready. Put your code inside Gui.ready()")}params=params||{};var panel=document.createElement("gui-panel");panel.autoPlace=params.autoPlace!==false;if(panel.autoPlace){document.body.appendChild(panel)}return panel};var controllers={};Gui.register=function(elementName,test){controllers[elementName]=test};Gui.getController=function(value){for(var type in controllers){var test=controllers[type];if(test(value)){return document.createElement(type)}}};var ready=false;var readyHandlers=[];document.addEventListener("polymer-ready",function(){ready=true;readyHandlers.forEach(function(fnc){fnc()})});Gui.ready=function(fnc){if(ready){fnc()}else{readyHandlers.push(fnc)}};Gui.error=function(){var args=Array.prototype.slice.apply(arguments);args.unshift("dat-gui ::");console.error.apply(console,args)};Gui.warn=function(){var args=Array.prototype.slice.apply(arguments);args.unshift("dat-gui ::");console.warn.apply(console,args)};var dat={};dat.gui={};dat.gui.GUI=Gui;dat.GUI=dat.gui.GUI;dat.color={};dat.color.Color=function(){};dat.dom={};dat.dom.dom=function(){};dat.controllers={};dat.controllers.Controller=constructor("controller-base");dat.controllers.NumberController=constructor("controller-number");dat.controllers.FunctionController=constructor("controller-function");dat.controllers.ColorController=constructor("controller-color");dat.controllers.BooleanController=constructor("controller-boolean");dat.controllers.OptionController=constructor("controller-option");dat.controllers.NumberControllerBox=dat.controllers.NumberController;dat.controllers.NumberControllerSlider=dat.controllers.NumberController;function constructor(elementName){return function(object,path){var el=document.createElement(elementName);el.watch(object,path);return el}}scope.dat=dat;scope.Gui=Gui})(this);</script>' ,
2014-09-02 22:34:17 +00:00
'' ,
'<!-- base elements -->' ,
2014-09-03 00:00:52 +00:00
' < div hidden > < style shim - shadowdom = "" > html / deep / [ layout ] [ horizontal ] , html / deep / [ layout ] [ vertical ] { display : - ms - flexbox ; display : - webkit - flex ; display : flex } html / deep / [ layout ] [ horizontal ] [ inline ] , html / deep / [ layout ] [ vertical ] [ inline ] { display : - ms - inline - flexbox ; display : - webkit - inline - flex ; display : inline - flex } html / deep / [ layout ] [ horizontal ] { - ms - flex - direction : row ; - webkit - flex - direction : row ; flex - direction : row } html / deep / [ layout ] [ horizontal ] [ reverse ] { - ms - flex - direction : row - reverse ; - webkit - flex - direction : row - reverse ; flex - direction : row - reverse } html / deep / [ layout ] [ vertical ] { - ms - flex - direction : column ; - webkit - flex - direction : column ; flex - direction : column } html / deep / [ layout ] [ vertical ] [ reverse ] { - ms - flex - direction : column - reverse ; - webkit - flex - direction : column - reverse ; flex - direction : column - reverse } html / deep / [ layout ] [ wrap ] { - ms - flex - wrap : wrap ; - webkit - flex - wrap : wrap ; flex - wrap : wrap } html / deep / [ layout ] [ wrap - reverse ] { - ms - flex - wrap : wrap - reverse ; - webkit - flex - wrap : wrap - reverse ; flex - wrap : wrap - reverse } html / deep / [ flex ] { - ms - flex : 1 ; - webkit - flex : 1 ; flex : 1 } html / deep / [ flex ] [ auto ] { - ms - flex : 1 1 auto ; - webkit - flex : 1 1 auto ; flex : 1 1 auto } html / deep / [ flex ] [ none ] { - ms - flex : none ; - webkit - flex : none ; flex : none } html / deep / [ flex ] [ one ] { - ms - flex : 1 ; - webkit - flex : 1 ; flex : 1 } html / deep / [ flex ] [ two ] { - ms - flex : 2 ; - webkit - flex : 2 ; flex : 2 } html / deep / [ flex ] [ three ] { - ms - flex : 3 ; - webkit - flex : 3 ; flex : 3 } html / deep / [ flex ] [ four ] { - ms - flex : 4 ; - webkit - flex : 4 ; flex : 4 } html / deep / [ flex ] [ five ] { - ms - flex : 5 ; - webkit - flex : 5 ; flex : 5 } html / deep / [ flex ] [ six ] { - ms - flex : 6 ; - webkit - flex : 6 ; flex : 6 } html / deep / [ flex ] [ seven ] { - ms - flex : 7 ; - webkit - flex : 7 ; flex : 7 } html / deep / [ flex ] [ eight ] { - ms - flex : 8 ; - webkit - flex : 8 ; flex : 8 } html / deep / [ flex ] [ nine ] { - ms - flex : 9 ; - webkit - flex : 9 ; flex : 9 } html / deep / [ flex ] [ ten ] { - ms - flex : 10 ; - webkit - flex : 10 ; flex : 10 } html / deep / [ flex ] [ eleven ] { - ms - flex : 11 ; - webkit - flex : 11 ; flex : 11 } html / deep / [ flex ] [ twelve ] { - ms - flex : 12 ; - webkit - flex : 12 ; flex : 12 } html / deep / [ layout ] [ start ] { - ms - flex - align : start ; - webkit - align - items : flex - start ; align - items : flex - start } html / deep / [ layout ] [ center ] , html / deep / [ layout ] [ center - center ] { - ms - flex - align : center ; - webkit - align - items : center ; align - items : center } html / deep / [ layout ] [ end ] { - ms - flex - align : end ; - webkit - align - items : flex - end ; align - items : flex - end } html / deep / [ layout ] [ start - justified ] { - ms - flex - pack : start ; - webkit - justify - content : flex - start ; justify - content : flex - start } html / deep / [ layout ] [ center - justified ] , html / deep / [ layout ] [ center - center ] { - ms - flex - pack : center ; - webkit - justify - content : center ; justify - content : center } html / deep / [ layout ] [ end - justified ] { - ms - flex - pack : end ; - webkit - justify - content : flex - end ; justify - content : flex - end } html / deep / [ layout ] [ around - justified ] { - ms - flex - pack : around ; - webkit - justify - content : space - around ; justify - content : space - around } html / deep / [ layout ] [ justified ] { - ms - flex - pack : justify ; - webkit - justify - content : space - between ; justify - content : space - between } html / deep / [ self - start ] { - ms - align - self : flex - start ; - webkit - align - self : flex - start ; align - self : flex - start } html / deep / [ self - center ] { - ms - align - self : center ; - webkit - align - self : center ; align - self : center } html / deep / [ self - end ] { - ms - align - self : flex - end ; - webkit - align - self : flex - end ; align - self : flex - end } html / deep / [ self - stretch ] { - ms - align - self : stretch ; - webkit - align - self : stretch ; align - self : stretch } html / deep / [ block ] { display : block } html / deep / [ hidden ] { display : none ! important } html / deep / [ relative ] { position : relative } html / deep / [ fit ] { position : absolute ; top : 0 ; right : 0 ; bottom : 0 ; left : 0 } body [ fullbleed ] { margin : 0 ; height : 100 vh } html / deep / [ segment ] , html / deep / segment { display : block ; position : relative ; - webkit - box - sizing : border - box ; - ms - box - sizing : border - box ; box - sizing : border - box ; margin : 1 em . 5 em ; padding : 1 em ; background - color : # fff ; - webkit - box - shadow : 0 0 0 1 px rgba ( 0 , 0 , 0 , . 1 ) ; box - shadow : 0 0 0 1 px rgba ( 0 , 0 , 0 , . 1 ) ; border - radius : 5 px 5 px 5 px 5 px } < / s t y l e > < s c r i p t > w i n d o w . P o l y m e r G e s t u r e s = { } , f u n c t i o n ( a ) { v a r b = ! 1 , c = d o c u m e n t . c r e a t e E l e m e n t ( " m e t a " ) ; i f ( c . c r e a t e S h a d o w R o o t ) { v a r d = c . c r e a t e S h a d o w R o o t ( ) , e = d o c u m e n t . c r e a t e E l e m e n t ( " s p a n " ) ; d . a p p e n d C h i l d ( e ) , c . a d d E v e n t L i s t e n e r ( " t e s t p a t h " , f u n c t i o n ( a ) { a . p a t h & & ( b = a . p a t h [ 0 ] = = = e ) , a . s t o p P r o p a g a t i o n ( ) } ) ; v a r f = n e w C u s t o m E v e n t (
2014-09-02 22:34:17 +00:00
' if ( d ? f = f . toModel : "function" == typeof f . toDOM && ( f = f . toDOM ) , "function" != typeof f ) return void console . error ( "Cannot find function or filter: " + this . name ) ; for ( var h = e || [ ] , j = 0 ; j < this . args . length ; j ++ ) h . push ( i ( this . args [ j ] ) ( a , b , c ) ) ; return f . apply ( g , h ) } } ; var r = { "+" : function ( a ) { return + a } , "-" : function ( a ) { return - a } , "!" : function ( a ) { return ! a } } , s = { "+" : function ( a , b ) { return a + b } , "-" : function ( a , b ) { return a - b } , "*" : function ( a , b ) { return a * b } , "/" : function ( a , b ) { return a / b } , "%" : function ( a , b ) { return a % b } , "<" : function ( a , b ) { return b > a } , ">" : function ( a , b ) { return a > b } , "<=" : function ( a , b ) { return b >= a } , ">=" : function ( a , b ) { return a >= b } , "==" : function ( a , b ) { return a == b } , "!=" : function ( a , b ) { return a != b } , "===" : function ( a , b ) { return a === b } , "!==" : function ( a , b ) { return a !== b } , "&&" : function ( a , b ) { return a && b } , "||" : function ( a , b ) { return a || b } } ; j . prototype = { createUnaryExpression : function ( a , b ) { if ( ! r [ a ] ) throw Error ( "Disallowed operator: " + a ) ; return b = i ( b ) , function ( c , d , e ) { return r [ a ] ( b ( c , d , e ) ) } } , createBinaryExpression : function ( a , b , c ) { if ( ! s [ a ] ) throw Error ( "Disallowed operator: " + a ) ; switch ( b = i ( b ) , c = i ( c ) , a ) { case "||" : return this . dynamicDeps = ! 0 , function ( a , d , e ) { return b ( a , d , e ) || c ( a , d , e ) } ; case "&&" : return this . dynamicDeps = ! 0 , function ( a , d , e ) { return b ( a , d , e ) && c ( a , d , e ) } } return function ( d , e , f ) { return s [ a ] ( b ( d , e , f ) , c ( d , e , f ) ) } } , createConditionalExpression : function ( a , b , c ) { return a = i ( a ) , b = i ( b ) , c = i ( c ) , this . dynamicDeps = ! 0 , function ( d , e , f ) { return a ( d , e , f ) ? b ( d , e , f ) : c ( d , e , f ) } } , createIdentifier : function ( a ) { var b = new e ( a ) ; return b . type = "Identifier" , b } , createMemberExpression : function ( a , b , c ) { var d = new f ( b , c , a ) ; return d . dynamicDeps && ( this . dynamicDeps = ! 0 ) , d } , createCallExpression : function ( a , b ) { if ( ! ( a instanceof e ) ) throw Error ( "Only identifier function invocations are allowed" ) ; var c = new g ( a . name , b ) ; return function ( a , b , d ) { return c . transform ( a , b , d , ! 1 ) } } , createLiteral : function ( a ) { return new d ( a . value ) } , createArrayExpression : function ( a ) { for ( var b = 0 ; b < a . length ; b ++ ) a [ b ] = i ( a [ b ] ) ; return function ( b , c , d ) { for ( var e = [ ] , f = 0 ; f < a . length ; f ++ ) e . push ( a [ f ] ( b , c , d ) ) ; return e } } , createProperty : function ( a , b , c ) { return { key : b instanceof e ? b . name : b . value , value : c } } , createObjectExpression : function ( a ) { for ( var b = 0 ; b < a . length ; b ++ ) a [ b ] . value = i ( a [ b ] . value ) ; return function ( b , c , d ) { for ( var e = { } , f = 0 ; f < a . length ; f ++ ) e [ a [ f ] . key ] = a [ f ] . value ( b , c , d ) ; return e } } , createFilter : function ( a , b ) { this . filters . push ( new g ( 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 ( ) { return this . value _ } , discardChanges : function ( ) { return this . value _ } , deliver : function ( ) { } , close : function ( ) { } } , l . prototype = { getBinding : function ( a , b , c ) { function d ( ) { if ( h ) return h = ! 1 , g ; i . dynamicDeps && f . startReset ( ) ; var c = i . getValue ( a , i . dynamicDeps ? f : void 0 , b ) ; return i . dynamicDeps && f . finishReset ( ) , c } function e ( c ) { return i . setValue ( a , c , b ) , c } if ( c ) return this . getValue ( a , void 0 , b ) ; var f = new CompoundObserver , g = this . getValue ( a , f , b ) , h = ! 0 , i = this ; return new ObserverTransform ( f , d , e , ! 0 ) } , getValue : function ( a , b , c ) { for ( var d = i ( this . expression ) ( a , b , c ) , e = 0 ; e < this . filters . length ; e ++ ) d = this . filters [ e ] . transform ( a , b , c , ! 1 , [ d ] ) ; return d } , setValue : function ( a , b , c ) { for ( var d = this . filters ? this . filters . length : 0 ; d -- > 0 ; ) b = this . filters [ d ] . transform ( a , void 0 , c , ! 0 , [ b ] ) ; return this . expression . setValue ? this . expression . setValue ( a , b ) : void 0 } } ; var t = "@" + Math . random ( ) . toString ( 36 ) . slice ( 2 ) ; p . prototype = { styleObject : function ( a ) { var b = [ ] ; for ( var c in a ) b . push ( m ( c ) + ": " + a [ c ] ) ; return b . join ( "; " ) } , tokenList : function ( a ) { var b = [ ] ; for ( var c in a ) a [ c ] && b . push ( c ) ; return b . join ( " " ) } , prepareInstancePositionChanged : function ( a ) { var b = a . polymerExpressionIndexIdent _ ; if ( b ) return function ( a , c ) { a . model [ b ] = c } } , prepareBinding : function ( a , c , d ) { var e = Path . get ( a ) ; { if ( o ( a ) || ! e . valid ) return b ( a , c , d , this ) ; if ( 1 == e . length ) return function ( a , b , c ) { if ( c ) return e . getValueFrom ( a ) ; var d = n ( a , e [ 0 ] ) ; return new PathObserver ( d , e ) } } } , prepareInstanceModel : function ( a ) { var b = a . polymerExpressionScopeIdent _ ; if ( b ) { var c = a . templateInstance ? a . templateInstance . model : a . mo
2014-09-08 00:22:30 +00:00
'},_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="gui-row" attributes="name comment" assetpath="../elements/gui-row/"><template><div><style>#row{font:10px \'Lucida Grande\',sans-serif;color:#ecebe0;-webkit-font-smoothing:antialiased;height:2.9em;-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)}:host-context(.touch-true) #row{font-size:13.5px}#controller{height:100%}#name{padding:0 8px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:38%;cursor:default}.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 ; - webkit - font - smoothing : antialiased ; line - height : 1.6 em ; background : # e0cf99 ; color : # 333 ; - webkit - box - sizing : border - box ; - moz - box - sizing : border - box ; box - sizing : border - box ; overflow : hidden ; - webkit - transition : height . 15 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; - moz - transition : height . 15 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; - o - transition : height . 15 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; - ms - transition : height . 15 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; transition : height . 15 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; position : absolute ; z - index : 999 ; pointer - events : none ; - webkit - transform : translate3d ( 0 , 20 px , 0 ) ; - moz - transform : translate3d ( 0 , 20 px , 0 ) ; - o - transform : translate3d ( 0 , 20 px , 0 ) ; - ms - transform : translate3d ( 0 , 20 px , 0 ) ; transform : translate3d ( 0 , 20 px , 0 ) ; opacity : 0 ; - ms - filter : "alpha(Opacity=0)" ; filter : alpha ( opacity = 0 ) ; - webkit - transition : all . 2 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; - moz - transition : all . 2 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; - o - transition : all . 2 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; - ms - transition : all . 2 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) ; transition : all . 2 s cubic - bezier ( 0.25 , . 25 , 0 , 1 ) } : host - context ( . touch - true ) # comment { font - size : 13.5 px } # comment . open - true { opacity : 1 ; - ms - filter : none ; filter : none ; - webkit - transform : translate3d ( 0 , 0 , 0 ) ; - moz - transform : translate3d ( 0 , 0 , 0 ) ; - o - transform : translate3d ( 0 , 0 , 0 ) ; - ms - transform : translate3d ( 0 , 0 , 0 ) ; transform : translate3d ( 0 , 0 , 0 ) } : host - context ( . touch - false ) # comment . open - true { - webkit - transition - delay : 200 ms ; - moz - transition - delay : 200 ms ; - o - transition - delay : 200 ms ; - ms - transition - del
2014-09-02 22:34:17 +00:00
'<div hidden>undefined</div>' ,
'' ,
'<!-- controllers -->' ,
2014-09-08 00:22:30 +00:00
'<div hidden><script>"use strict";Polymer("controller-base",{ready:function(){this.update()},update:function(){},init:function(){},watch:function(object,path){this.object=object;this.path=path;this.bind("value",new PathObserver(this.object,this.path))},valueChanged:function(){this.update();this.fire("change",this.value)},on:function(event,listener){this.addEventListener(event,listener);return this},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.");return this},getValue:function(){return this.value},setValue:function(v){this.value=v;return this},onChange:function(v){this.addEventListener("change",function(e){v(e.detail)});return this}});</script><polymer-element name="controller-base" attributes="object path value" assetpath="../elements/controller-base/"></polymer-element><script>"use strict";Gui.register("controller-number",function(value){return typeof value=="number"});Polymer("controller-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(){var ratio=this.map(this.value,this.min,this.max,0,1);if(this.min<0&&this.max>0){this.$.container.classList.add("straddle-zero");var zero=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){var dv=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){var v=parseFloat(this.$.input.value);if(v===v){this.value=v}},truncate:function(v){if(v%1!==0&&this.decimals!==undefined){return this.limitDecimals(v,this.decimals)}else{return v}},limitDecimals:function(v,maxDecimals){var str=v.toString();var numDecimals=str.substring(str.indexOf(".")+1).length;str=v.toFixed(Math.min(numDecimals,this.decimals));for(var z,i=0,l=str.length;i<l;i++){if(str.charAt(i)!=="0"){z=i}}return str.substring(0,z+1)},valueFromX:function(x){return this.map(x,this._rect.left,this._rect.right,this.min,this.max)},valueFromDX:function(dx){return this.map(dx,0,this._rect.width,0,this.max-this.min)}});</script><polymer-element name="controller-number" attributes="min max value step" extends="controller-base" assetpath="../elements/controller-number/"><template><style>input{font:10px \' Luci
'<div hidden><script>"use strict";Gui.register("controller-string",function(value){return typeof value=="string"});Polymer("controller-string",{click:function(e){this.$.input.select()},keydown:function(e){if(e.keyCode==13){this.$.input.blur()}}});</script><polymer-element name="controller-string" extends="controller-base" assetpath="../elements/controller-string/"><template><style>input{font:10px \'Lucida Grande\',sans-serif;color:#ecebe0;-webkit-font-smoothing:antialiased;height:100%;width:100%;display:inline-block;background-color:transparent;border:0;-webkit-border-radius:0;border-radius:0;padding:0;outline:0;-webkit-transition:background-color .15s linear;-moz-transition:background-color .15s linear;-o-transition:background-color .15s linear;-ms-transition:background-color .15s linear;transition:background-color .15s linear;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:host-context(.touch-true) input{font-size:13.5px}input:focus{background:rgba(255,255,255,.05)}:host-context(.touch-false) input:hover{background:rgba(255,255,255,.05)}</style><style>input{color:#1ebd6e;padding-left:8px}</style><input id="input" type="text" value="{{ value }}" on-click="{{ click }}" on-keydown="{{ keydown }}"></template></polymer-element></div>' ,
'<div hidden><script>"use strict";Gui.register("controller-boolean",function(value){return typeof value=="boolean"});Polymer("controller-boolean",{ready:function(){},toggle:function(){this.value=!this.value}});</script><polymer-element name="controller-boolean" extends="controller-base" assetpath="../elements/controller-boolean/"><template><style>input{font:10px \'Lucida Grande\',sans-serif;color:#ecebe0;-webkit-font-smoothing:antialiased;height:100%;width:100%;display:inline-block;background-color:transparent;border:0;-webkit-border-radius:0;border-radius:0;padding:0;outline:0;-webkit-transition:background-color .15s linear;-moz-transition:background-color .15s linear;-o-transition:background-color .15s linear;-ms-transition:background-color .15s linear;transition:background-color .15s linear;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:host-context(.touch-true) input{font-size:13.5px}input:focus{background:rgba(255,255,255,.05)}:host-context(.touch-false) input:hover{background:rgba(255,255,255,.05)}</style><style>#container{height:100%;cursor:pointer;padding-left:8px}#switch-track{width:2em;height:.8em;background:rgba(255,255,255,.25);border-radius:999px;-webkit-transition:background .1s linear;-moz-transition:background .1s linear;-o-transition:background .1s linear;-ms-transition:background .1s linear;transition:background .1s linear}#switch-knob{height:.8em;width:.8em;border-radius:100%;background:#ecebe0;-webkit-transition:-webkit-transform .15s cubic-bezier(0.25,.25,0,1);-moz-transition:-moz-transform .15s cubic-bezier(0.25,.25,0,1);-o-transition:-o-transform .15s cubic-bezier(0.25,.25,0,1);-ms-transition:-ms-transform .15s cubic-bezier(0.25,.25,0,1);transition:transform .15s cubic-bezier(0.25,.25,0,1)}.value-true #switch-track{background:#864694}.value-true #switch-knob{-webkit-transform:translate3d(1.2em,0,0);-moz-transform:translate3d(1.2em,0,0);-o-transform:translate3d(1.2em,0,0);-ms-transform:translate3d(1.2em,0,0);transform:translate3d(1.2em,0,0)}:host-context(.touch-false) .value-false:hover #switch-knob{-webkit-transform:scale(1.5);-moz-transform:scale(1.5);-o-transform:scale(1.5);-ms-transform:scale(1.5);transform:scale(1.5)}:host-context(.touch-false) .value-true:hover #switch-knob{-webkit-transform:translate3d(1.2em,0,0) scale(1.5);-moz-transform:translate3d(1.2em,0,0) scale(1.5);-o-transform:translate3d(1.2em,0,0) scale(1.5);-ms-transform:translate3d(1.2em,0,0) scale(1.5);transform:translate3d(1.2em,0,0) scale(1.5)}#text{margin-left:8px}.value-false #text{color:rgba(255,255,255,.25)}</style><div id="container" horizontal="" layout="" center="" on-tap="{{ toggle }}" class="value-{{ value }}"><div id="switch-track"><div id="switch-knob"></div></div></div></template></polymer-element></div>' ,
'<div hidden><script>"use strict";Gui.register("controller-function",function(value){return typeof value=="function"});Polymer("controller-function",{});</script><polymer-element name="controller-function" extends="controller-base" assetpath="../elements/controller-function/"><template><style>input{font:10px \'Lucida Grande\',sans-serif;color:#ecebe0;-webkit-font-smoothing:antialiased;height:100%;width:100%;display:inline-block;background-color:transparent;border:0;-webkit-border-radius:0;border-radius:0;padding:0;outline:0;-webkit-transition:background-color .15s linear;-moz-transition:background-color .15s linear;-o-transition:background-color .15s linear;-ms-transition:background-color .15s linear;transition:background-color .15s linear;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:host-context(.touch-true) input{font-size:13.5px}input:focus{background:rgba(255,255,255,.05)}:host-context(.touch-false) input:hover{background:rgba(255,255,255,.05)}</style><style></style><div id="container"></div></template></polymer-element></div>' ,
2014-09-07 23:55:40 +00:00
'<div hidden><script>Polymer("controller-option",{key:null,ready:function(){this.options={}},init:function(options){if(Array.isArray(options)){options.forEach(function(opt){this.options[opt]=opt},this)}else{this.options=options}},valueChanged:function(){for(var i in this.options){if(this.options[i]===this.value){this.key=i;break}}this.super()},keyChanged:function(){this.value=this.options[this.key]},keys:function(object){if(object)return Object.keys(object)}});</script><polymer-element name="controller-option" extends="controller-base" attributes="options key" assetpath="../elements/controller-option/"><template><style>#container{height:100%;cursor:pointer;padding-left:8px}select{outline:0}</style><div id="container" horizontal="" layout="" center=""><select value="{{ key }}" on-change="{{ change }}"><template repeat="{{ name in options | keys }}"><option value="{{ name }}">{{ name }}</option></template></select></div></template></polymer-element></div>' , ] . join ( "\n" ) )