blob: 349143c850860dff755a62de092082537b51e977 [file] [log] [blame]
{"version":3,"file":"platform.js","sources":["build/boot.js","../WeakMap/weakmap.js","build/if-poly.js","../observe-js/src/observe.js","../ShadowDOM/src/wrappers.js","../ShadowDOM/src/microtask.js","../ShadowDOM/src/MutationObserver.js","../ShadowDOM/src/TreeScope.js","../ShadowDOM/src/wrappers/events.js","../ShadowDOM/src/wrappers/TouchEvent.js","../ShadowDOM/src/wrappers/NodeList.js","../ShadowDOM/src/wrappers/HTMLCollection.js","../ShadowDOM/src/wrappers/Node.js","../ShadowDOM/src/querySelector.js","../ShadowDOM/src/wrappers/node-interfaces.js","../ShadowDOM/src/wrappers/CharacterData.js","../ShadowDOM/src/wrappers/Text.js","../ShadowDOM/src/wrappers/DOMTokenList.js","../ShadowDOM/src/wrappers/Element.js","../ShadowDOM/src/wrappers/HTMLElement.js","../ShadowDOM/src/wrappers/HTMLCanvasElement.js","../ShadowDOM/src/wrappers/HTMLContentElement.js","../ShadowDOM/src/wrappers/HTMLFormElement.js","../ShadowDOM/src/wrappers/HTMLImageElement.js","../ShadowDOM/src/wrappers/HTMLShadowElement.js","../ShadowDOM/src/wrappers/HTMLTemplateElement.js","../ShadowDOM/src/wrappers/HTMLMediaElement.js","../ShadowDOM/src/wrappers/HTMLAudioElement.js","../ShadowDOM/src/wrappers/HTMLOptionElement.js","../ShadowDOM/src/wrappers/HTMLSelectElement.js","../ShadowDOM/src/wrappers/HTMLTableElement.js","../ShadowDOM/src/wrappers/HTMLTableSectionElement.js","../ShadowDOM/src/wrappers/HTMLTableRowElement.js","../ShadowDOM/src/wrappers/HTMLUnknownElement.js","../ShadowDOM/src/wrappers/SVGElement.js","../ShadowDOM/src/wrappers/SVGUseElement.js","../ShadowDOM/src/wrappers/SVGElementInstance.js","../ShadowDOM/src/wrappers/CanvasRenderingContext2D.js","../ShadowDOM/src/wrappers/WebGLRenderingContext.js","../ShadowDOM/src/wrappers/Range.js","../ShadowDOM/src/wrappers/generic.js","../ShadowDOM/src/wrappers/ShadowRoot.js","../ShadowDOM/src/ShadowRenderer.js","../ShadowDOM/src/wrappers/elements-with-form-property.js","../ShadowDOM/src/wrappers/Selection.js","../ShadowDOM/src/wrappers/Document.js","../ShadowDOM/src/wrappers/Window.js","../ShadowDOM/src/wrappers/DataTransfer.js","../ShadowDOM/src/wrappers/FormData.js","../ShadowDOM/src/wrappers/XMLHttpRequest.js","../ShadowDOM/src/wrappers/override-constructors.js","src/patches-shadowdom-polyfill.js","src/ShadowCSS.js","src/patches-shadowdom-native.js","../URL/url.js","src/lang.js","../MutationObservers/MutationObserver.js","../HTMLImports/src/scope.js","../HTMLImports/src/base.js","../HTMLImports/src/Loader.js","../HTMLImports/src/Parser.js","../HTMLImports/src/HTMLImports.js","../HTMLImports/src/Observer.js","../HTMLImports/src/boot.js","../CustomElements/src/scope.js","../CustomElements/src/Observer.js","../CustomElements/src/CustomElements.js","../CustomElements/src/Parser.js","../CustomElements/src/boot.js","src/patches-custom-elements.js","src/dom.js","src/unresolved.js","src/module.js"],"names":[],"mappings":";;;;;;;;;;;AASA,OAAA,SAAA,OAAA,aAEA,OAAA,SAAA,OAAA,aAEA,SAAA,GAEA,GAAA,GAAA,EAAA,SAEA,UAAA,OAAA,MAAA,GAAA,MAAA,KAAA,QAAA,SAAA,GACA,EAAA,EAAA,MAAA,KACA,EAAA,KAAA,EAAA,EAAA,IAAA,EAAA,KAAA,IAEA,IAAA,GAAA,SAAA,eACA,SAAA,cAAA,6BACA,IAAA,EAEA,IAAA,GAAA,GADA,EAAA,EAAA,WACA,EAAA,EAAA,EAAA,EAAA,OAAA,IACA,EAAA,EAAA,GACA,QAAA,EAAA,OACA,EAAA,EAAA,MAAA,EAAA,QAAA,EAIA,GAAA,KACA,EAAA,IAAA,MAAA,KAAA,QAAA,SAAA,GACA,OAAA,SAAA,IAAA,IAMA,EAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,SAEA,EAAA,OADA,WAAA,EAAA,QACA,EAEA,EAAA,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AA,EAAA,KAJA,GAAA,KAUA,GAAA,QAAA,EAEA,EAAA,WAAA,EACA,EAAA,MAAA,GAEA","sourcesContent":["/**\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nwindow.Platform = window.Platform || {};\n// prepopulate window.logFlags if necessary\nwindow.logFlags = window.logFlags || {};\n// process flags\n(function(scope){\n // import\n var flags = scope.flags || {};\n // populate flags from location\n location.search.slice(1).split('&').forEach(function(o) {\n o = o.split('=');\n o[0] && (flags[o[0]] = o[1] || true);\n });\n var entryPoint = document.currentScript ||\n document.querySelector('script[src*=\"platform.js\"]');\n if (entryPoint) {\n var a = entryPoint.attributes;\n for (var i = 0, n; i < a.length; i++) {\n n = a[i];\n if (n.name !== 'src') {\n flags[n.name] = n.value || true;\n }\n }\n }\n if (flags.log) {\n flags.log.split(',').forEach(function(f) {\n window.logFlags[f] = true;\n });\n }\n // If any of these flags match 'native', then force native ShadowDOM; any\n // other truthy value, or failure to detect native\n // ShadowDOM, results in polyfill\n flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;\n if (flags.shadow === 'native') {\n flags.shadow = false;\n } else {\n flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;\n }\n\n if (flags.shadow && document.querySelectorAll('script').length > 1) {\n console.warn('platform.js is not the first script on the page. ' +\n 'See http://www.polymer-project.org/docs/start/platform.html#setup ' +\n 'for details.');\n }\n\n // CustomElements polyfill flag\n if (flags.register) {\n window.CustomElements = window.CustomElements || {flags: {}};\n window.CustomElements.flags.register = flags.register;\n }\n\n if (flags.imports) {\n window.HTMLImports = window.HTMLImports || {flags: {}};\n window.HTMLImports.flags.imports = flags.imports;\n }\n\n // export\n scope.flags = flags;\n})(Platform);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nif (typeof WeakMap === 'undefined') {\n (function() {\n var defineProperty = Object.defineProperty;\n var counter = Date.now() % 1e9;\n\n var WeakMap = function() {\n this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');\n };\n\n WeakMap.prototype = {\n set: function(key, value) {\n var entry = key[this.name];\n if (entry && entry[0] === key)\n entry[1] = value;\n else\n defineProperty(key, this.name, {value: [key, value], writable: true});\n },\n get: function(key) {\n var entry;\n return (entry = key[this.name]) && entry[0] === key ?\n entry[1] : undefined;\n },\n delete: function(key) {\n var entry = key[this.name];\n if (!entry) return false;\n var hasValue = entry[0] === key;\n entry[0] = entry[1] = undefined;\n return hasValue;\n },\n has: function(key) {\n var entry = key[this.name];\n if (!entry) return false;\n return entry[0] === key;\n }\n };\n\n window.WeakMap = WeakMap;\n })();\n}\n","// select ShadowDOM impl\r\nif (Platform.flags.shadow) {\r\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(global) {\n 'use strict';\n\n var testingExposeCycleCount = global.testingExposeCycleCount;\n\n // Detect and do basic sanity checking on Object/Array.observe.\n function detectObjectObserve() {\n if (typeof Object.observe !== 'function' ||\n typeof Array.observe !== 'function') {\n return false;\n }\n\n var records = [];\n\n function callback(recs) {\n records = recs;\n }\n\n var test = {};\n var arr = [];\n Object.observe(test, callback);\n Array.observe(arr, callback);\n test.id = 1;\n test.id = 2;\n delete test.id;\n arr.push(1, 2);\n arr.length = 0;\n\n Object.deliverChangeRecords(callback);\n if (records.length !== 5)\n return false;\n\n if (records[0].type != 'add' ||\n records[1].type != 'update' ||\n records[2].type != 'delete' ||\n records[3].type != 'splice' ||\n records[4].type != 'splice') {\n return false;\n }\n\n Object.unobserve(test, callback);\n Array.unobserve(arr, callback);\n\n return true;\n }\n\n var hasObserve = detectObjectObserve();\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this function this code\n // will continue to work.\n if (typeof navigator != 'undefined' && navigator.getDeviceStorage) {\n return false;\n }\n\n try {\n var f = new Function('', 'return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function isIndex(s) {\n return +s === s >>> 0 && s !== '';\n }\n\n function toNumber(s) {\n return +s;\n }\n\n function isObject(obj) {\n return obj === Object(obj);\n }\n\n var numberIsNaN = global.Number.isNaN || function(value) {\n return typeof value === 'number' && global.isNaN(value);\n }\n\n function areSameValue(left, right) {\n if (left === right)\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n var identStart = '[\\$_a-zA-Z]';\n var identPart = '[\\$_a-zA-Z0-9]';\n var identRegExp = new RegExp('^' + identStart + '+' + identPart + '*' + '$');\n\n function getPathCharType(char) {\n if (char === undefined)\n return 'eof';\n\n var code = char.charCodeAt(0);\n\n switch(code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return char;\n\n case 0x5F: // _\n case 0x24: // $\n return 'ident';\n\n case 0x20: // Space\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws';\n }\n\n // a-z, A-Z\n if ((0x61 <= code && code <= 0x7A) || (0x41 <= code && code <= 0x5A))\n return 'ident';\n\n // 1-9\n if (0x31 <= code && code <= 0x39)\n return 'number';\n\n return 'else';\n }\n\n var pathStateMachine = {\n 'beforePath': {\n 'ws': ['beforePath'],\n 'ident': ['inIdent', 'append'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'inPath': {\n 'ws': ['inPath'],\n '.': ['beforeIdent'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'beforeIdent': {\n 'ws': ['beforeIdent'],\n 'ident': ['inIdent', 'append']\n },\n\n 'inIdent': {\n 'ident': ['inIdent', 'append'],\n '0': ['inIdent', 'append'],\n 'number': ['inIdent', 'append'],\n 'ws': ['inPath', 'push'],\n '.': ['beforeIdent', 'push'],\n '[': ['beforeElement', 'push'],\n 'eof': ['afterPath', 'push']\n },\n\n 'beforeElement': {\n 'ws': ['beforeElement'],\n '0': ['afterZero', 'append'],\n 'number': ['inIndex', 'append'],\n \"'\": ['inSingleQuote', 'append', ''],\n '\"': ['inDoubleQuote', 'append', '']\n },\n\n 'afterZero': {\n 'ws': ['afterElement', 'push'],\n ']': ['inPath', 'push']\n },\n\n 'inIndex': {\n '0': ['inIndex', 'append'],\n 'number': ['inIndex', 'append'],\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n },\n\n 'inSingleQuote': {\n \"'\": ['afterElement'],\n 'eof': ['error'],\n 'else': ['inSingleQuote', 'append']\n },\n\n 'inDoubleQuote': {\n '\"': ['afterElement'],\n 'eof': ['error'],\n 'else': ['inDoubleQuote', 'append']\n },\n\n 'afterElement': {\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n }\n }\n\n function noop() {}\n\n function parsePath(path) {\n var keys = [];\n var index = -1;\n var c, newChar, key, type, transition, action, typeMap, mode = 'beforePath';\n\n var actions = {\n push: function() {\n if (key === undefined)\n return;\n\n keys.push(key);\n key = undefined;\n },\n\n append: function() {\n if (key === undefined)\n key = newChar\n else\n key += newChar;\n }\n };\n\n function maybeUnescapeQuote() {\n if (index >= path.length)\n return;\n\n var nextChar = path[index + 1];\n if ((mode == 'inSingleQuote' && nextChar == \"'\") ||\n (mode == 'inDoubleQuote' && nextChar == '\"')) {\n index++;\n newChar = nextChar;\n actions.append();\n return true;\n }\n }\n\n while (mode) {\n index++;\n c = path[index];\n\n if (c == '\\\\' && maybeUnescapeQuote(mode))\n continue;\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || 'error';\n\n if (transition == 'error')\n return; // parse error;\n\n mode = transition[0];\n action = actions[transition[1]] || noop;\n newChar = transition[2] === undefined ? c : transition[2];\n action();\n\n if (mode === 'afterPath') {\n return keys;\n }\n }\n\n return; // parse error\n }\n\n function isIdent(s) {\n return identRegExp.test(s);\n }\n\n var constructorIsPrivate = {};\n\n function Path(parts, privateToken) {\n if (privateToken !== constructorIsPrivate)\n throw Error('Use Path.get to retrieve path objects');\n\n for (var i = 0; i < parts.length; i++) {\n this.push(String(parts[i]));\n }\n\n if (hasEval && this.length) {\n this.getValueFrom = this.compiledGetValueFromFn();\n }\n }\n\n // TODO(rafaelw): Make simple LRU cache\n var pathCache = {};\n\n function getPath(pathString) {\n if (pathString instanceof Path)\n return pathString;\n\n if (pathString == null || pathString.length == 0)\n pathString = '';\n\n if (typeof pathString != 'string') {\n if (isIndex(pathString.length)) {\n // Constructed with array-like (pre-parsed) keys\n return new Path(pathString, constructorIsPrivate);\n }\n\n pathString = String(pathString);\n }\n\n var path = pathCache[pathString];\n if (path)\n return path;\n\n var parts = parsePath(pathString);\n if (!parts)\n return invalidPath;\n\n var path = new Path(parts, constructorIsPrivate);\n pathCache[pathString] = path;\n return path;\n }\n\n Path.get = getPath;\n\n function formatAccessor(key) {\n if (isIndex(key)) {\n return '[' + key + ']';\n } else {\n return '[\"' + key.replace(/\"/g, '\\\\\"') + '\"]';\n }\n }\n\n Path.prototype = createObject({\n __proto__: [],\n valid: true,\n\n toString: function() {\n var pathString = '';\n for (var i = 0; i < this.length; i++) {\n var key = this[i];\n if (isIdent(key)) {\n pathString += i ? '.' + key : key;\n } else {\n pathString += formatAccessor(key);\n }\n }\n\n return pathString;\n },\n\n getValueFrom: function(obj, directObserver) {\n for (var i = 0; i < this.length; i++) {\n if (obj == null)\n return;\n obj = obj[this[i]];\n }\n return obj;\n },\n\n iterateObjects: function(obj, observe) {\n for (var i = 0; i < this.length; i++) {\n if (i)\n obj = obj[this[i - 1]];\n if (!isObject(obj))\n return;\n observe(obj, this[0]);\n }\n },\n\n compiledGetValueFromFn: function() {\n var str = '';\n var pathString = 'obj';\n str += 'if (obj != null';\n var i = 0;\n var key;\n for (; i < (this.length - 1); i++) {\n key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n str += ' &&\\n ' + pathString + ' != null';\n }\n str += ')\\n';\n\n var key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n\n str += ' return ' + pathString + ';\\nelse\\n return undefined;';\n return new Function('obj', str);\n },\n\n setValueFrom: function(obj, value) {\n if (!this.length)\n return false;\n\n for (var i = 0; i < this.length - 1; i++) {\n if (!isObject(obj))\n return false;\n obj = obj[this[i]];\n }\n\n if (!isObject(obj))\n return false;\n\n obj[this[i]] = value;\n return true;\n }\n });\n\n var invalidPath = new Path('', constructorIsPrivate);\n invalidPath.valid = false;\n invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};\n\n var MAX_DIRTY_CHECK_CYCLES = 1000;\n\n function dirtyCheck(observer) {\n var cycles = 0;\n while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {\n cycles++;\n }\n if (testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n return cycles > 0;\n }\n\n function objectIsEmpty(object) {\n for (var prop in object)\n return false;\n return true;\n }\n\n function diffIsEmpty(diff) {\n return objectIsEmpty(diff.added) &&\n objectIsEmpty(diff.removed) &&\n objectIsEmpty(diff.changed);\n }\n\n function diffObjectFromOldObject(object, oldObject) {\n var added = {};\n var removed = {};\n var changed = {};\n\n for (var prop in oldObject) {\n var newValue = object[prop];\n\n if (newValue !== undefined && newValue === oldObject[prop])\n continue;\n\n if (!(prop in object)) {\n removed[prop] = undefined;\n continue;\n }\n\n if (newValue !== oldObject[prop])\n changed[prop] = newValue;\n }\n\n for (var prop in object) {\n if (prop in oldObject)\n continue;\n\n added[prop] = object[prop];\n }\n\n if (Array.isArray(object) && object.length !== oldObject.length)\n changed.length = object.length;\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n var eomTasks = [];\n function runEOMTasks() {\n if (!eomTasks.length)\n return false;\n\n for (var i = 0; i < eomTasks.length; i++) {\n eomTasks[i]();\n }\n eomTasks.length = 0;\n return true;\n }\n\n var runEOM = hasObserve ? (function(){\n var eomObj = { pingPong: true };\n var eomRunScheduled = false;\n\n Object.observe(eomObj, function() {\n runEOMTasks();\n eomRunScheduled = false;\n });\n\n return function(fn) {\n eomTasks.push(fn);\n if (!eomRunScheduled) {\n eomRunScheduled = true;\n eomObj.pingPong = !eomObj.pingPong;\n }\n };\n })() :\n (function() {\n return function(fn) {\n eomTasks.push(fn);\n };\n })();\n\n var observedObjectCache = [];\n\n function newObservedObject() {\n var observer;\n var object;\n var discardRecords = false;\n var first = true;\n\n function callback(records) {\n if (observer && observer.state_ === OPENED && !discardRecords)\n observer.check_(records);\n }\n\n return {\n open: function(obs) {\n if (observer)\n throw Error('ObservedObject in use');\n\n if (!first)\n Object.deliverChangeRecords(callback);\n\n observer = obs;\n first = false;\n },\n observe: function(obj, arrayObserve) {\n object = obj;\n if (arrayObserve)\n Array.observe(object, callback);\n else\n Object.observe(object, callback);\n },\n deliver: function(discard) {\n discardRecords = discard;\n Object.deliverChangeRecords(callback);\n discardRecords = false;\n },\n close: function() {\n observer = undefined;\n Object.unobserve(object, callback);\n observedObjectCache.push(this);\n }\n };\n }\n\n /*\n * The observedSet abstraction is a perf optimization which reduces the total\n * number of Object.observe observations of a set of objects. The idea is that\n * groups of Observers will have some object dependencies in common and this\n * observed set ensures that each object in the transitive closure of\n * dependencies is only observed once. The observedSet acts as a write barrier\n * such that whenever any change comes through, all Observers are checked for\n * changed values.\n *\n * Note that this optimization is explicitly moving work from setup-time to\n * change-time.\n *\n * TODO(rafaelw): Implement \"garbage collection\". In order to move work off\n * the critical path, when Observers are closed, their observed objects are\n * not Object.unobserve(d). As a result, it's possible that if the observedSet\n * is kept open, but some Observers have been closed, it could cause \"leaks\"\n * (prevent otherwise collectable objects from being collected). At some\n * point, we should implement incremental \"gc\" which keeps a list of\n * observedSets which may need clean-up and does small amounts of cleanup on a\n * timeout until all is clean.\n */\n\n function getObservedObject(observer, object, arrayObserve) {\n var dir = observedObjectCache.pop() || newObservedObject();\n dir.open(observer);\n dir.observe(object, arrayObserve);\n return dir;\n }\n\n var observedSetCache = [];\n\n function newObservedSet() {\n var observerCount = 0;\n var observers = [];\n var objects = [];\n var rootObj;\n var rootObjProps;\n\n function observe(obj, prop) {\n if (!obj)\n return;\n\n if (obj === rootObj)\n rootObjProps[prop] = true;\n\n if (objects.indexOf(obj) < 0) {\n objects.push(obj);\n Object.observe(obj, callback);\n }\n\n observe(Object.getPrototypeOf(obj), prop);\n }\n\n function allRootObjNonObservedProps(recs) {\n for (var i = 0; i < recs.length; i++) {\n var rec = recs[i];\n if (rec.object !== rootObj ||\n rootObjProps[rec.name] ||\n rec.type === 'setPrototype') {\n return false;\n }\n }\n return true;\n }\n\n function callback(recs) {\n if (allRootObjNonObservedProps(recs))\n return;\n\n var observer;\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.iterateObjects_(observe);\n }\n }\n\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.check_();\n }\n }\n }\n\n var record = {\n object: undefined,\n objects: objects,\n open: function(obs, object) {\n if (!rootObj) {\n rootObj = object;\n rootObjProps = {};\n }\n\n observers.push(obs);\n observerCount++;\n obs.iterateObjects_(observe);\n },\n close: function(obs) {\n observerCount--;\n if (observerCount > 0) {\n return;\n }\n\n for (var i = 0; i < objects.length; i++) {\n Object.unobserve(objects[i], callback);\n Observer.unobservedCount++;\n }\n\n observers.length = 0;\n objects.length = 0;\n rootObj = undefined;\n rootObjProps = undefined;\n observedSetCache.push(this);\n }\n };\n\n return record;\n }\n\n var lastObservedSet;\n\n function getObservedSet(observer, obj) {\n if (!lastObservedSet || lastObservedSet.object !== obj) {\n lastObservedSet = observedSetCache.pop() || newObservedSet();\n lastObservedSet.object = obj;\n }\n lastObservedSet.open(observer, obj);\n return lastObservedSet;\n }\n\n var UNOPENED = 0;\n var OPENED = 1;\n var CLOSED = 2;\n var RESETTING = 3;\n\n var nextObserverId = 1;\n\n function Observer() {\n this.state_ = UNOPENED;\n this.callback_ = undefined;\n this.target_ = undefined; // TODO(rafaelw): Should be WeakRef\n this.directObserver_ = undefined;\n this.value_ = undefined;\n this.id_ = nextObserverId++;\n }\n\n Observer.prototype = {\n open: function(callback, target) {\n if (this.state_ != UNOPENED)\n throw Error('Observer has already been opened.');\n\n addToAll(this);\n this.callback_ = callback;\n this.target_ = target;\n this.connect_();\n this.state_ = OPENED;\n return this.value_;\n },\n\n close: function() {\n if (this.state_ != OPENED)\n return;\n\n removeFromAll(this);\n this.disconnect_();\n this.value_ = undefined;\n this.callback_ = undefined;\n this.target_ = undefined;\n this.state_ = CLOSED;\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n dirtyCheck(this);\n },\n\n report_: function(changes) {\n try {\n this.callback_.apply(this.target_, changes);\n } catch (ex) {\n Observer._errorThrownDuringCallback = true;\n console.error('Exception caught during observer callback: ' +\n (ex.stack || ex));\n }\n },\n\n discardChanges: function() {\n this.check_(undefined, true);\n return this.value_;\n }\n }\n\n var collectObservers = !hasObserve;\n var allObservers;\n Observer._allObserversCount = 0;\n\n if (collectObservers) {\n allObservers = [];\n }\n\n function addToAll(observer) {\n Observer._allObserversCount++;\n if (!collectObservers)\n return;\n\n allObservers.push(observer);\n }\n\n function removeFromAll(observer) {\n Observer._allObserversCount--;\n }\n\n var runningMicrotaskCheckpoint = false;\n\n global.Platform = global.Platform || {};\n\n global.Platform.performMicrotaskCheckpoint = function() {\n if (runningMicrotaskCheckpoint)\n return;\n\n if (!collectObservers)\n return;\n\n runningMicrotaskCheckpoint = true;\n\n var cycles = 0;\n var anyChanged, toCheck;\n\n do {\n cycles++;\n toCheck = allObservers;\n allObservers = [];\n anyChanged = false;\n\n for (var i = 0; i < toCheck.length; i++) {\n var observer = toCheck[i];\n if (observer.state_ != OPENED)\n continue;\n\n if (observer.check_())\n anyChanged = true;\n\n allObservers.push(observer);\n }\n if (runEOMTasks())\n anyChanged = true;\n } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged);\n\n if (testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n runningMicrotaskCheckpoint = false;\n };\n\n if (collectObservers) {\n global.Platform.clearObservers = function() {\n allObservers = [];\n };\n }\n\n function ObjectObserver(object) {\n Observer.call(this);\n this.value_ = object;\n this.oldObject_ = undefined;\n }\n\n ObjectObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n arrayObserve: false,\n\n connect_: function(callback, target) {\n if (hasObserve) {\n this.directObserver_ = getObservedObject(this, this.value_,\n this.arrayObserve);\n } else {\n this.oldObject_ = this.copyObject(this.value_);\n }\n\n },\n\n copyObject: function(object) {\n var copy = Array.isArray(object) ? [] : {};\n for (var prop in object) {\n copy[prop] = object[prop];\n };\n if (Array.isArray(object))\n copy.length = object.length;\n return copy;\n },\n\n check_: function(changeRecords, skipChanges) {\n var diff;\n var oldValues;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n\n oldValues = {};\n diff = diffObjectFromChangeRecords(this.value_, changeRecords,\n oldValues);\n } else {\n oldValues = this.oldObject_;\n diff = diffObjectFromOldObject(this.value_, this.oldObject_);\n }\n\n if (diffIsEmpty(diff))\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([\n diff.added || {},\n diff.removed || {},\n diff.changed || {},\n function(property) {\n return oldValues[property];\n }\n ]);\n\n return true;\n },\n\n disconnect_: function() {\n if (hasObserve) {\n this.directObserver_.close();\n this.directObserver_ = undefined;\n } else {\n this.oldObject_ = undefined;\n }\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n if (hasObserve)\n this.directObserver_.deliver(false);\n else\n dirtyCheck(this);\n },\n\n discardChanges: function() {\n if (this.directObserver_)\n this.directObserver_.deliver(true);\n else\n this.oldObject_ = this.copyObject(this.value_);\n\n return this.value_;\n }\n });\n\n function ArrayObserver(array) {\n if (!Array.isArray(array))\n throw Error('Provided object is not an Array');\n ObjectObserver.call(this, array);\n }\n\n ArrayObserver.prototype = createObject({\n\n __proto__: ObjectObserver.prototype,\n\n arrayObserve: true,\n\n copyObject: function(arr) {\n return arr.slice();\n },\n\n check_: function(changeRecords) {\n var splices;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n splices = projectArraySplices(this.value_, changeRecords);\n } else {\n splices = calcSplices(this.value_, 0, this.value_.length,\n this.oldObject_, 0, this.oldObject_.length);\n }\n\n if (!splices || !splices.length)\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([splices]);\n return true;\n }\n });\n\n ArrayObserver.applySplices = function(previous, current, splices) {\n splices.forEach(function(splice) {\n var spliceArgs = [splice.index, splice.removed.length];\n var addIndex = splice.index;\n while (addIndex < splice.index + splice.addedCount) {\n spliceArgs.push(current[addIndex]);\n addIndex++;\n }\n\n Array.prototype.splice.apply(previous, spliceArgs);\n });\n };\n\n function PathObserver(object, path) {\n Observer.call(this);\n\n this.object_ = object;\n this.path_ = getPath(path);\n this.directObserver_ = undefined;\n }\n\n PathObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n get path() {\n return this.path_;\n },\n\n connect_: function() {\n if (hasObserve)\n this.directObserver_ = getObservedSet(this, this.object_);\n\n this.check_(undefined, true);\n },\n\n disconnect_: function() {\n this.value_ = undefined;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n iterateObjects_: function(observe) {\n this.path_.iterateObjects(this.object_, observe);\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValue = this.value_;\n this.value_ = this.path_.getValueFrom(this.object_);\n if (skipChanges || areSameValue(this.value_, oldValue))\n return false;\n\n this.report_([this.value_, oldValue, this]);\n return true;\n },\n\n setValue: function(newValue) {\n if (this.path_)\n this.path_.setValueFrom(this.object_, newValue);\n }\n });\n\n function CompoundObserver(reportChangesOnOpen) {\n Observer.call(this);\n\n this.reportChangesOnOpen_ = reportChangesOnOpen;\n this.value_ = [];\n this.directObserver_ = undefined;\n this.observed_ = [];\n }\n\n var observerSentinel = {};\n\n CompoundObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n connect_: function() {\n if (hasObserve) {\n var object;\n var needsDirectObserver = false;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel) {\n needsDirectObserver = true;\n break;\n }\n }\n\n if (needsDirectObserver)\n this.directObserver_ = getObservedSet(this, object);\n }\n\n this.check_(undefined, !this.reportChangesOnOpen_);\n },\n\n disconnect_: function() {\n for (var i = 0; i < this.observed_.length; i += 2) {\n if (this.observed_[i] === observerSentinel)\n this.observed_[i + 1].close();\n }\n this.observed_.length = 0;\n this.value_.length = 0;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n addPath: function(object, path) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add paths once started.');\n\n var path = getPath(path);\n this.observed_.push(object, path);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = path.getValueFrom(object);\n },\n\n addObserver: function(observer) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add observers once started.');\n\n this.observed_.push(observerSentinel, observer);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = observer.open(this.deliver, this);\n },\n\n startReset: function() {\n if (this.state_ != OPENED)\n throw Error('Can only reset while open');\n\n this.state_ = RESETTING;\n this.disconnect_();\n },\n\n finishReset: function() {\n if (this.state_ != RESETTING)\n throw Error('Can only finishReset after startReset');\n this.state_ = OPENED;\n this.connect_();\n\n return this.value_;\n },\n\n iterateObjects_: function(observe) {\n var object;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel)\n this.observed_[i + 1].iterateObjects(object, observe)\n }\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValues;\n for (var i = 0; i < this.observed_.length; i += 2) {\n var object = this.observed_[i];\n var path = this.observed_[i+1];\n var value;\n if (object === observerSentinel) {\n var observable = path;\n value = this.state_ === UNOPENED ?\n observable.open(this.deliver, this) :\n observable.discardChanges();\n } else {\n value = path.getValueFrom(object);\n }\n\n if (skipChanges) {\n this.value_[i / 2] = value;\n continue;\n }\n\n if (areSameValue(value, this.value_[i / 2]))\n continue;\n\n oldValues = oldValues || [];\n oldValues[i / 2] = this.value_[i / 2];\n this.value_[i / 2] = value;\n }\n\n if (!oldValues)\n return false;\n\n // TODO(rafaelw): Having observed_ as the third callback arg here is\n // pretty lame API. Fix.\n this.report_([this.value_, oldValues, this.observed_]);\n return true;\n }\n });\n\n function identFn(value) { return value; }\n\n function ObserverTransform(observable, getValueFn, setValueFn,\n dontPassThroughSet) {\n this.callback_ = undefined;\n this.target_ = undefined;\n this.value_ = undefined;\n this.observable_ = observable;\n this.getValueFn_ = getValueFn || identFn;\n this.setValueFn_ = setValueFn || identFn;\n // TODO(rafaelw): This is a temporary hack. PolymerExpressions needs this\n // at the moment because of a bug in it's dependency tracking.\n this.dontPassThroughSet_ = dontPassThroughSet;\n }\n\n ObserverTransform.prototype = {\n open: function(callback, target) {\n this.callback_ = callback;\n this.target_ = target;\n this.value_ =\n this.getValueFn_(this.observable_.open(this.observedCallback_, this));\n return this.value_;\n },\n\n observedCallback_: function(value) {\n value = this.getValueFn_(value);\n if (areSameValue(value, this.value_))\n return;\n var oldValue = this.value_;\n this.value_ = value;\n this.callback_.call(this.target_, this.value_, oldValue);\n },\n\n discardChanges: function() {\n this.value_ = this.getValueFn_(this.observable_.discardChanges());\n return this.value_;\n },\n\n deliver: function() {\n return this.observable_.deliver();\n },\n\n setValue: function(value) {\n value = this.setValueFn_(value);\n if (!this.dontPassThroughSet_ && this.observable_.setValue)\n return this.observable_.setValue(value);\n },\n\n close: function() {\n if (this.observable_)\n this.observable_.close();\n this.callback_ = undefined;\n this.target_ = undefined;\n this.observable_ = undefined;\n this.value_ = undefined;\n this.getValueFn_ = undefined;\n this.setValueFn_ = undefined;\n }\n }\n\n var expectedRecordTypes = {\n add: true,\n update: true,\n delete: true\n };\n\n function diffObjectFromChangeRecords(object, changeRecords, oldValues) {\n var added = {};\n var removed = {};\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n if (!expectedRecordTypes[record.type]) {\n console.error('Unknown changeRecord type: ' + record.type);\n console.error(record);\n continue;\n }\n\n if (!(record.name in oldValues))\n oldValues[record.name] = record.oldValue;\n\n if (record.type == 'update')\n continue;\n\n if (record.type == 'add') {\n if (record.name in removed)\n delete removed[record.name];\n else\n added[record.name] = true;\n\n continue;\n }\n\n // type = 'delete'\n if (record.name in added) {\n delete added[record.name];\n delete oldValues[record.name];\n } else {\n removed[record.name] = true;\n }\n }\n\n for (var prop in added)\n added[prop] = object[prop];\n\n for (var prop in removed)\n removed[prop] = undefined;\n\n var changed = {};\n for (var prop in oldValues) {\n if (prop in added || prop in removed)\n continue;\n\n var newValue = object[prop];\n if (oldValues[prop] !== newValue)\n changed[prop] = newValue;\n }\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n function newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n }\n\n var EDIT_LEAVE = 0;\n var EDIT_UPDATE = 1;\n var EDIT_ADD = 2;\n var EDIT_DELETE = 3;\n\n function ArraySplice() {}\n\n ArraySplice.prototype = {\n\n // Note: This function is *based* on the computation of the Levenshtein\n // \"edit\" distance. The one change is that \"updates\" are treated as two\n // edits - not one. With Array splices, an update is really a delete\n // followed by an add. By retaining this, we optimize for \"keeping\" the\n // maximum array items in the original array. For example:\n //\n // 'xxxx123' -> '123yyyy'\n //\n // With 1-edit updates, the shortest path would be just to update all seven\n // characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n // leaves the substring '123' intact.\n calcEditDistances: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n var distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (var i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (var j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (var i = 1; i < rowCount; i++) {\n for (var j = 1; j < columnCount; j++) {\n if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n var north = distances[i - 1][j] + 1;\n var west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n // This starts at the final weight, and walks \"backward\" by finding\n // the minimum previous weight recursively until the origin of the weight\n // matrix.\n spliceOperationsFromEditDistances: function(distances) {\n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n var northWest = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n },\n\n /**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n /**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\n calcSplices: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0;\n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = this.sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n var splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n var ops = this.spliceOperationsFromEditDistances(\n this.calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldStart;\n for (var i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n },\n\n sharedPrefix: function(current, old, searchLength) {\n for (var i = 0; i < searchLength; i++)\n if (!this.equals(current[i], old[i]))\n return i;\n return searchLength;\n },\n\n sharedSuffix: function(current, old, searchLength) {\n var index1 = current.length;\n var index2 = old.length;\n var count = 0;\n while (count < searchLength && this.equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n },\n\n calculateSplices: function(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n },\n\n equals: function(currentValue, previousValue) {\n return currentValue === previousValue;\n }\n };\n\n var arraySplice = new ArraySplice();\n\n function calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n return arraySplice.calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd);\n }\n\n function intersect(start1, end1, start2, end2) {\n // Disjoint\n if (end1 < start2 || end2 < start1)\n return -1;\n\n // Adjacent\n if (end1 == start2 || end2 == start1)\n return 0;\n\n // Non-zero intersect, span1 first\n if (start1 < start2) {\n if (end1 < end2)\n return end1 - start2; // Overlap\n else\n return end2 - start2; // Contained\n } else {\n // Non-zero intersect, span2 first\n if (end2 < end1)\n return end2 - start1; // Overlap\n else\n return end1 - start1; // Contained\n }\n }\n\n function mergeSplice(splices, index, removed, addedCount) {\n\n var splice = newSplice(index, removed, addedCount);\n\n var inserted = false;\n var insertionOffset = 0;\n\n for (var i = 0; i < splices.length; i++) {\n var current = splices[i];\n current.index += insertionOffset;\n\n if (inserted)\n continue;\n\n var intersectCount = intersect(splice.index,\n splice.index + splice.removed.length,\n current.index,\n current.index + current.addedCount);\n\n if (intersectCount >= 0) {\n // Merge the two splices\n\n splices.splice(i, 1);\n i--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n splice.addedCount += current.addedCount - intersectCount;\n var deleteCount = splice.removed.length +\n current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n // merged splice is a noop. discard.\n inserted = true;\n } else {\n var removed = current.removed;\n\n if (splice.index < current.index) {\n // some prefix of splice.removed is prepended to current.removed.\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, removed);\n removed = prepend;\n }\n\n if (splice.index + splice.removed.length > current.index + current.addedCount) {\n // some suffix of splice.removed is appended to current.removed.\n var append = splice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(removed, append);\n }\n\n splice.removed = removed;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.index < current.index) {\n // Insert splice here.\n\n inserted = true;\n\n splices.splice(i, 0, splice);\n i++;\n\n var offset = splice.addedCount - splice.removed.length\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted)\n splices.push(splice);\n }\n\n function createInitialSplices(array, changeRecords) {\n var splices = [];\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n switch(record.type) {\n case 'splice':\n mergeSplice(splices, record.index, record.removed.slice(), record.addedCount);\n break;\n case 'add':\n case 'update':\n case 'delete':\n if (!isIndex(record.name))\n continue;\n var index = toNumber(record.name);\n if (index < 0)\n continue;\n mergeSplice(splices, index, [record.oldValue], 1);\n break;\n default:\n console.error('Unexpected record type: ' + JSON.stringify(record));\n break;\n }\n }\n\n return splices;\n }\n\n function projectArraySplices(array, changeRecords) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).forEach(function(splice) {\n if (splice.addedCount == 1 && splice.removed.length == 1) {\n if (splice.removed[0] !== array[splice.index])\n splices.push(splice);\n\n return\n };\n\n splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount,\n splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n }\n\n global.Observer = Observer;\n global.Observer.runEOM_ = runEOM;\n global.Observer.observerSentinel_ = observerSentinel; // for testing.\n global.Observer.hasObjectObserve = hasObserve;\n global.ArrayObserver = ArrayObserver;\n global.ArrayObserver.calculateSplices = function(current, previous) {\n return arraySplice.calculateSplices(current, previous);\n };\n\n global.ArraySplice = ArraySplice;\n global.ObjectObserver = ObjectObserver;\n global.PathObserver = PathObserver;\n global.CompoundObserver = CompoundObserver;\n global.Path = Path;\n global.ObserverTransform = ObserverTransform;\n})(typeof global !== 'undefined' && global && typeof module !== 'undefined' && module ? global : this || window);\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\nwindow.ShadowDOMPolyfill = {};\n\n(function(scope) {\n 'use strict';\n\n var constructorTable = new WeakMap();\n var nativePrototypeTable = new WeakMap();\n var wrappers = Object.create(null);\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this function this code\n // will continue to work.\n if (navigator.getDeviceStorage) {\n return false;\n }\n\n try {\n var f = new Function('return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function assert(b) {\n if (!b)\n throw new Error('Assertion failed');\n };\n\n var defineProperty = Object.defineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n function mixin(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function mixinStatics(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n switch (name) {\n case 'arguments':\n case 'caller':\n case 'length':\n case 'name':\n case 'prototype':\n case 'toString':\n continue;\n }\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function oneOf(object, propertyNames) {\n for (var i = 0; i < propertyNames.length; i++) {\n if (propertyNames[i] in object)\n return propertyNames[i];\n }\n }\n\n var nonEnumerableDataDescriptor = {\n value: undefined,\n configurable: true,\n enumerable: false,\n writable: true\n };\n\n function defineNonEnumerableDataProperty(object, name, value) {\n nonEnumerableDataDescriptor.value = value;\n defineProperty(object, name, nonEnumerableDataDescriptor);\n }\n\n // Mozilla's old DOM bindings are bretty busted:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=855844\n // Make sure they are create before we start modifying things.\n getOwnPropertyNames(window);\n\n function getWrapperConstructor(node) {\n var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);\n var wrapperConstructor = constructorTable.get(nativePrototype);\n if (wrapperConstructor)\n return wrapperConstructor;\n\n var parentWrapperConstructor = getWrapperConstructor(nativePrototype);\n\n var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, node);\n\n return GeneratedWrapper;\n }\n\n function addForwardingProperties(nativePrototype, wrapperPrototype) {\n installProperty(nativePrototype, wrapperPrototype, true);\n }\n\n function registerInstanceProperties(wrapperPrototype, instanceObject) {\n installProperty(instanceObject, wrapperPrototype, false);\n }\n\n var isFirefox = /Firefox/.test(navigator.userAgent);\n\n // This is used as a fallback when getting the descriptor fails in\n // installProperty.\n var dummyDescriptor = {\n get: function() {},\n set: function(v) {},\n configurable: true,\n enumerable: true\n };\n\n function isEventHandlerName(name) {\n return /^on[a-z]+$/.test(name);\n }\n\n function isIdentifierName(name) {\n return /^\\w[a-zA-Z_0-9]*$/.test(name);\n }\n\n // The name of the implementation property is intentionally hard to\n // remember. Unfortunately, browsers are slower doing obj[expr] than\n // obj.foo so we resort to repeat this ugly name. This ugly name is never\n // used outside of this file though.\n\n function getGetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.__impl4cf1e782hg__.' + name) :\n function() { return this.__impl4cf1e782hg__[name]; };\n }\n\n function getSetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('v', 'this.__impl4cf1e782hg__.' + name + ' = v') :\n function(v) { this.__impl4cf1e782hg__[name] = v; };\n }\n\n function getMethod(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.__impl4cf1e782hg__.' + name +\n '.apply(this.__impl4cf1e782hg__, arguments)') :\n function() {\n return this.__impl4cf1e782hg__[name].apply(\n this.__impl4cf1e782hg__, arguments);\n };\n }\n\n function getDescriptor(source, name) {\n try {\n return Object.getOwnPropertyDescriptor(source, name);\n } catch (ex) {\n // JSC and V8 both use data properties instead of accessors which can\n // cause getting the property desciptor to throw an exception.\n // https://bugs.webkit.org/show_bug.cgi?id=49739\n return dummyDescriptor;\n }\n }\n\n // Safari 8 exposes WebIDL attributes as an invalid accessor property. Its\n // descriptor has {get: undefined, set: undefined}. We therefore ignore the\n // shape of the descriptor and make all properties read-write.\n // https://bugs.webkit.org/show_bug.cgi?id=49739\n var isBrokenSafari = function() {\n var descr = Object.getOwnPropertyDescriptor(Node.prototype, 'nodeType');\n return !!descr && 'set' in descr;\n }();\n\n function installProperty(source, target, allowMethod, opt_blacklist) {\n var names = getOwnPropertyNames(source);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (name === 'polymerBlackList_')\n continue;\n\n if (name in target)\n continue;\n\n if (source.polymerBlackList_ && source.polymerBlackList_[name])\n continue;\n\n if (isFirefox) {\n // Tickle Firefox's old bindings.\n source.__lookupGetter__(name);\n }\n var descriptor = getDescriptor(source, name);\n var getter, setter;\n if (allowMethod && typeof descriptor.value === 'function') {\n target[name] = getMethod(name);\n continue;\n }\n\n var isEvent = isEventHandlerName(name);\n if (isEvent)\n getter = scope.getEventHandlerGetter(name);\n else\n getter = getGetter(name);\n\n if (descriptor.writable || descriptor.set || isBrokenSafari) {\n if (isEvent)\n setter = scope.getEventHandlerSetter(name);\n else\n setter = getSetter(name);\n }\n\n defineProperty(target, name, {\n get: getter,\n set: setter,\n configurable: descriptor.configurable,\n enumerable: descriptor.enumerable\n });\n }\n }\n\n /**\n * @param {Function} nativeConstructor\n * @param {Function} wrapperConstructor\n * @param {Object=} opt_instance If present, this is used to extract\n * properties from an instance object.\n */\n function register(nativeConstructor, wrapperConstructor, opt_instance) {\n var nativePrototype = nativeConstructor.prototype;\n registerInternal(nativePrototype, wrapperConstructor, opt_instance);\n mixinStatics(wrapperConstructor, nativeConstructor);\n }\n\n function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {\n var wrapperPrototype = wrapperConstructor.prototype;\n assert(constructorTable.get(nativePrototype) === undefined);\n\n constructorTable.set(nativePrototype, wrapperConstructor);\n nativePrototypeTable.set(wrapperPrototype, nativePrototype);\n\n addForwardingProperties(nativePrototype, wrapperPrototype);\n if (opt_instance)\n registerInstanceProperties(wrapperPrototype, opt_instance);\n\n defineNonEnumerableDataProperty(\n wrapperPrototype, 'constructor', wrapperConstructor);\n // Set it again. Some VMs optimizes objects that are used as prototypes.\n wrapperConstructor.prototype = wrapperPrototype;\n }\n\n function isWrapperFor(wrapperConstructor, nativeConstructor) {\n return constructorTable.get(nativeConstructor.prototype) ===\n wrapperConstructor;\n }\n\n /**\n * Creates a generic wrapper constructor based on |object| and its\n * constructor.\n * @param {Node} object\n * @return {Function} The generated constructor.\n */\n function registerObject(object) {\n var nativePrototype = Object.getPrototypeOf(object);\n\n var superWrapperConstructor = getWrapperConstructor(nativePrototype);\n var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, object);\n\n return GeneratedWrapper;\n }\n\n function createWrapperConstructor(superWrapperConstructor) {\n function GeneratedWrapper(node) {\n superWrapperConstructor.call(this, node);\n }\n var p = Object.create(superWrapperConstructor.prototype);\n p.constructor = GeneratedWrapper;\n GeneratedWrapper.prototype = p;\n\n return GeneratedWrapper;\n }\n\n function isWrapper(object) {\n return object && object.__impl4cf1e782hg__;\n }\n\n function isNative(object) {\n return !isWrapper(object);\n }\n\n /**\n * Wraps a node in a WrapperNode. If there already exists a wrapper for the\n * |node| that wrapper is returned instead.\n * @param {Node} node\n * @return {WrapperNode}\n */\n function wrap(impl) {\n if (impl === null)\n return null;\n\n assert(isNative(impl));\n return impl.__wrapper8e3dd93a60__ ||\n (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));\n }\n\n /**\n * Unwraps a wrapper and returns the node it is wrapping.\n * @param {WrapperNode} wrapper\n * @return {Node}\n */\n function unwrap(wrapper) {\n if (wrapper === null)\n return null;\n assert(isWrapper(wrapper));\n return wrapper.__impl4cf1e782hg__;\n }\n\n function unsafeUnwrap(wrapper) {\n return wrapper.__impl4cf1e782hg__;\n }\n\n function setWrapper(impl, wrapper) {\n wrapper.__impl4cf1e782hg__ = impl;\n impl.__wrapper8e3dd93a60__ = wrapper;\n }\n\n /**\n * Unwraps object if it is a wrapper.\n * @param {Object} object\n * @return {Object} The native implementation object.\n */\n function unwrapIfNeeded(object) {\n return object && isWrapper(object) ? unwrap(object) : object;\n }\n\n /**\n * Wraps object if it is not a wrapper.\n * @param {Object} object\n * @return {Object} The wrapper for object.\n */\n function wrapIfNeeded(object) {\n return object && !isWrapper(object) ? wrap(object) : object;\n }\n\n /**\n * Overrides the current wrapper (if any) for node.\n * @param {Node} node\n * @param {WrapperNode=} wrapper If left out the wrapper will be created as\n * needed next time someone wraps the node.\n */\n function rewrap(node, wrapper) {\n if (wrapper === null)\n return;\n assert(isNative(node));\n assert(wrapper === undefined || isWrapper(wrapper));\n node.__wrapper8e3dd93a60__ = wrapper;\n }\n\n var getterDescriptor = {\n get: undefined,\n configurable: true,\n enumerable: true\n };\n\n function defineGetter(constructor, name, getter) {\n getterDescriptor.get = getter;\n defineProperty(constructor.prototype, name, getterDescriptor);\n }\n\n function defineWrapGetter(constructor, name) {\n defineGetter(constructor, name, function() {\n return wrap(this.__impl4cf1e782hg__[name]);\n });\n }\n\n /**\n * Forwards existing methods on the native object to the wrapper methods.\n * This does not wrap any of the arguments or the return value since the\n * wrapper implementation already takes care of that.\n * @param {Array.<Function>} constructors\n * @parem {Array.<string>} names\n */\n function forwardMethodsToWrapper(constructors, names) {\n constructors.forEach(function(constructor) {\n names.forEach(function(name) {\n constructor.prototype[name] = function() {\n var w = wrapIfNeeded(this);\n return w[name].apply(w, arguments);\n };\n });\n });\n }\n\n scope.assert = assert;\n scope.constructorTable = constructorTable;\n scope.defineGetter = defineGetter;\n scope.defineWrapGetter = defineWrapGetter;\n scope.forwardMethodsToWrapper = forwardMethodsToWrapper;\n scope.isWrapper = isWrapper;\n scope.isWrapperFor = isWrapperFor;\n scope.mixin = mixin;\n scope.nativePrototypeTable = nativePrototypeTable;\n scope.oneOf = oneOf;\n scope.registerObject = registerObject;\n scope.registerWrapper = register;\n scope.rewrap = rewrap;\n scope.setWrapper = setWrapper;\n scope.unsafeUnwrap = unsafeUnwrap;\n scope.unwrap = unwrap;\n scope.unwrapIfNeeded = unwrapIfNeeded;\n scope.wrap = wrap;\n scope.wrapIfNeeded = wrapIfNeeded;\n scope.wrappers = wrappers;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(context) {\n 'use strict';\n\n var OriginalMutationObserver = window.MutationObserver;\n var callbacks = [];\n var pending = false;\n var timerFunc;\n\n function handle() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks = [];\n for (var i = 0; i < copies.length; i++) {\n (0, copies[i])();\n }\n }\n\n if (OriginalMutationObserver) {\n var counter = 1;\n var observer = new OriginalMutationObserver(handle);\n var textNode = document.createTextNode(counter);\n observer.observe(textNode, {characterData: true});\n\n timerFunc = function() {\n counter = (counter + 1) % 2;\n textNode.data = counter;\n };\n\n } else {\n timerFunc = window.setImmediate || window.setTimeout;\n }\n\n function setEndOfMicrotask(func) {\n callbacks.push(func);\n if (pending)\n return;\n pending = true;\n timerFunc(handle, 0);\n }\n\n context.setEndOfMicrotask = setEndOfMicrotask;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var setEndOfMicrotask = scope.setEndOfMicrotask\n var wrapIfNeeded = scope.wrapIfNeeded\n var wrappers = scope.wrappers;\n\n var registrationsTable = new WeakMap();\n var globalMutationObservers = [];\n var isScheduled = false;\n\n function scheduleCallback(observer) {\n if (observer.scheduled_)\n return;\n\n observer.scheduled_ = true;\n globalMutationObservers.push(observer);\n\n if (isScheduled)\n return;\n setEndOfMicrotask(notifyObservers);\n isScheduled = true;\n }\n\n // http://dom.spec.whatwg.org/#mutation-observers\n function notifyObservers() {\n isScheduled = false;\n\n while (globalMutationObservers.length) {\n var notifyList = globalMutationObservers;\n globalMutationObservers = [];\n\n // Deliver changes in birth order of the MutationObservers.\n notifyList.sort(function(x, y) { return x.uid_ - y.uid_; });\n\n for (var i = 0; i < notifyList.length; i++) {\n var mo = notifyList[i];\n mo.scheduled_ = false;\n var queue = mo.takeRecords();\n removeTransientObserversFor(mo);\n if (queue.length) {\n mo.callback_(queue, mo);\n }\n }\n }\n }\n\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = new wrappers.NodeList();\n this.removedNodes = new wrappers.NodeList();\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n /**\n * Registers transient observers to ancestor and its ancesors for the node\n * which was removed.\n * @param {!Node} ancestor\n * @param {!Node} node\n */\n function registerTransientObservers(ancestor, node) {\n for (; ancestor; ancestor = ancestor.parentNode) {\n var registrations = registrationsTable.get(ancestor);\n if (!registrations)\n continue;\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.options.subtree)\n registration.addTransientObserver(node);\n }\n }\n }\n\n function removeTransientObserversFor(observer) {\n for (var i = 0; i < observer.nodes_.length; i++) {\n var node = observer.nodes_[i];\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n if (registration.observer === observer)\n registration.removeTransientObservers();\n }\n }\n }\n\n // http://dom.spec.whatwg.org/#queue-a-mutation-record\n function enqueueMutation(target, type, data) {\n // 1.\n var interestedObservers = Object.create(null);\n var associatedStrings = Object.create(null);\n\n // 2.\n for (var node = target; node; node = node.parentNode) {\n // 3.\n var registrations = registrationsTable.get(node);\n if (!registrations)\n continue;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n // 1.\n if (node !== target && !options.subtree)\n continue;\n\n // 2.\n if (type === 'attributes' && !options.attributes)\n continue;\n\n // 3. If type is \"attributes\", options's attributeFilter is present, and\n // either options's attributeFilter does not contain name or namespace\n // is non-null, continue.\n if (type === 'attributes' && options.attributeFilter &&\n (data.namespace !== null ||\n options.attributeFilter.indexOf(data.name) === -1)) {\n continue;\n }\n\n // 4.\n if (type === 'characterData' && !options.characterData)\n continue;\n\n // 5.\n if (type === 'childList' && !options.childList)\n continue;\n\n // 6.\n var observer = registration.observer;\n interestedObservers[observer.uid_] = observer;\n\n // 7. If either type is \"attributes\" and options's attributeOldValue is\n // true, or type is \"characterData\" and options's characterDataOldValue\n // is true, set the paired string of registered observer's observer in\n // interested observers to oldValue.\n if (type === 'attributes' && options.attributeOldValue ||\n type === 'characterData' && options.characterDataOldValue) {\n associatedStrings[observer.uid_] = data.oldValue;\n }\n }\n }\n\n // 4.\n for (var uid in interestedObservers) {\n var observer = interestedObservers[uid];\n var record = new MutationRecord(type, target);\n\n // 2.\n if ('name' in data && 'namespace' in data) {\n record.attributeName = data.name;\n record.attributeNamespace = data.namespace;\n }\n\n // 3.\n if (data.addedNodes)\n record.addedNodes = data.addedNodes;\n\n // 4.\n if (data.removedNodes)\n record.removedNodes = data.removedNodes;\n\n // 5.\n if (data.previousSibling)\n record.previousSibling = data.previousSibling;\n\n // 6.\n if (data.nextSibling)\n record.nextSibling = data.nextSibling;\n\n // 7.\n if (associatedStrings[uid] !== undefined)\n record.oldValue = associatedStrings[uid];\n\n // 8.\n scheduleCallback(observer);\n observer.records_.push(record);\n }\n }\n\n var slice = Array.prototype.slice;\n\n /**\n * @param {!Object} options\n * @constructor\n */\n function MutationObserverOptions(options) {\n this.childList = !!options.childList;\n this.subtree = !!options.subtree;\n\n // 1. If either options' attributeOldValue or attributeFilter is present\n // and options' attributes is omitted, set options' attributes to true.\n if (!('attributes' in options) &&\n ('attributeOldValue' in options || 'attributeFilter' in options)) {\n this.attributes = true;\n } else {\n this.attributes = !!options.attributes;\n }\n\n // 2. If options' characterDataOldValue is present and options'\n // characterData is omitted, set options' characterData to true.\n if ('characterDataOldValue' in options && !('characterData' in options))\n this.characterData = true;\n else\n this.characterData = !!options.characterData;\n\n // 3. & 4.\n if (!this.attributes &&\n (options.attributeOldValue || 'attributeFilter' in options) ||\n // 5.\n !this.characterData && options.characterDataOldValue) {\n throw new TypeError();\n }\n\n this.characterData = !!options.characterData;\n this.attributeOldValue = !!options.attributeOldValue;\n this.characterDataOldValue = !!options.characterDataOldValue;\n if ('attributeFilter' in options) {\n if (options.attributeFilter == null ||\n typeof options.attributeFilter !== 'object') {\n throw new TypeError();\n }\n this.attributeFilter = slice.call(options.attributeFilter);\n } else {\n this.attributeFilter = null;\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function MutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n this.scheduled_ = false;\n }\n\n MutationObserver.prototype = {\n constructor: MutationObserver,\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-observe\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n var newOptions = new MutationObserverOptions(options);\n\n // 6.\n var registration;\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n // 6.1.\n registration.removeTransientObservers();\n // 6.2.\n registration.options = newOptions;\n }\n }\n\n // 7.\n if (!registration) {\n registration = new Registration(this, target, newOptions);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n },\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-disconnect\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverOptions} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n // Make sure we remove transient observers at the end of microtask, even\n // if we didn't get any change records.\n scheduleCallback(this.observer);\n\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n for (var i = 0; i < transientObservedNodes.length; i++) {\n var node = transientObservedNodes[i];\n var registrations = registrationsTable.get(node);\n for (var j = 0; j < registrations.length; j++) {\n if (registrations[j] === this) {\n registrations.splice(j, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }\n }\n };\n\n scope.enqueueMutation = enqueueMutation;\n scope.registerTransientObservers = registerTransientObservers;\n scope.wrappers.MutationObserver = MutationObserver;\n scope.wrappers.MutationRecord = MutationRecord;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n /**\n * A tree scope represents the root of a tree. All nodes in a tree point to\n * the same TreeScope object. The tree scope of a node get set the first time\n * it is accessed or when a node is added or remove to a tree.\n *\n * The root is a Node that has no parent.\n *\n * The parent is another TreeScope. For ShadowRoots, it is the TreeScope of\n * the host of the ShadowRoot.\n *\n * @param {!Node} root\n * @param {TreeScope} parent\n * @constructor\n */\n function TreeScope(root, parent) {\n /** @type {!Node} */\n this.root = root;\n\n /** @type {TreeScope} */\n this.parent = parent;\n }\n\n TreeScope.prototype = {\n get renderer() {\n if (this.root instanceof scope.wrappers.ShadowRoot) {\n return scope.getRendererForHost(this.root.host);\n }\n return null;\n },\n\n contains: function(treeScope) {\n for (; treeScope; treeScope = treeScope.parent) {\n if (treeScope === this)\n return true;\n }\n return false;\n }\n };\n\n function setTreeScope(node, treeScope) {\n if (node.treeScope_ !== treeScope) {\n node.treeScope_ = treeScope;\n for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {\n sr.treeScope_.parent = treeScope;\n }\n for (var child = node.firstChild; child; child = child.nextSibling) {\n setTreeScope(child, treeScope);\n }\n }\n }\n\n function getTreeScope(node) {\n if (node instanceof scope.wrappers.Window) {\n debugger;\n }\n\n if (node.treeScope_)\n return node.treeScope_;\n var parent = node.parentNode;\n var treeScope;\n if (parent)\n treeScope = getTreeScope(parent);\n else\n treeScope = new TreeScope(node, null);\n return node.treeScope_ = treeScope;\n }\n\n scope.TreeScope = TreeScope;\n scope.getTreeScope = getTreeScope;\n scope.setTreeScope = setTreeScope;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n var wrappedFuns = new WeakMap();\n var listenersTable = new WeakMap();\n var handledEventsTable = new WeakMap();\n var currentlyDispatchingEvents = new WeakMap();\n var targetTable = new WeakMap();\n var currentTargetTable = new WeakMap();\n var relatedTargetTable = new WeakMap();\n var eventPhaseTable = new WeakMap();\n var stopPropagationTable = new WeakMap();\n var stopImmediatePropagationTable = new WeakMap();\n var eventHandlersTable = new WeakMap();\n var eventPathTable = new WeakMap();\n\n function isShadowRoot(node) {\n return node instanceof wrappers.ShadowRoot;\n }\n\n function rootOfNode(node) {\n return getTreeScope(node).root;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-paths\n function getEventPath(node, event) {\n var path = [];\n var current = node;\n path.push(current);\n while (current) {\n // 4.1.\n var destinationInsertionPoints = getDestinationInsertionPoints(current);\n if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {\n // 4.1.1\n for (var i = 0; i < destinationInsertionPoints.length; i++) {\n var insertionPoint = destinationInsertionPoints[i];\n // 4.1.1.1\n if (isShadowInsertionPoint(insertionPoint)) {\n var shadowRoot = rootOfNode(insertionPoint);\n // 4.1.1.1.2\n var olderShadowRoot = shadowRoot.olderShadowRoot;\n if (olderShadowRoot)\n path.push(olderShadowRoot);\n }\n\n // 4.1.1.2\n path.push(insertionPoint);\n }\n\n // 4.1.2\n current = destinationInsertionPoints[\n destinationInsertionPoints.length - 1];\n\n // 4.2\n } else {\n if (isShadowRoot(current)) {\n if (inSameTree(node, current) && eventMustBeStopped(event)) {\n // Stop this algorithm\n break;\n }\n current = current.host;\n path.push(current);\n\n // 4.2.2\n } else {\n current = current.parentNode;\n if (current)\n path.push(current);\n }\n }\n }\n\n return path;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-events-always-stopped\n function eventMustBeStopped(event) {\n if (!event)\n return false;\n\n switch (event.type) {\n case 'abort':\n case 'error':\n case 'select':\n case 'change':\n case 'load':\n case 'reset':\n case 'resize':\n case 'scroll':\n case 'selectstart':\n return true;\n }\n return false;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-shadow-insertion-point\n function isShadowInsertionPoint(node) {\n return node instanceof HTMLShadowElement;\n // and make sure that there are no shadow precing this?\n // and that there is no content ancestor?\n }\n\n function getDestinationInsertionPoints(node) {\n return scope.getDestinationInsertionPoints(node);\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-retargeting\n function eventRetargetting(path, currentTarget) {\n if (path.length === 0)\n return currentTarget;\n\n // The currentTarget might be the window object. Use its document for the\n // purpose of finding the retargetted node.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var originalTarget = path[0];\n var originalTargetTree = getTreeScope(originalTarget);\n var relativeTargetTree =\n lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);\n\n for (var i = 0; i < path.length; i++) {\n var node = path[i];\n if (getTreeScope(node) === relativeTargetTree)\n return node;\n }\n\n return path[path.length - 1];\n }\n\n function getTreeScopeAncestors(treeScope) {\n var ancestors = [];\n for (;treeScope; treeScope = treeScope.parent) {\n ancestors.push(treeScope);\n }\n return ancestors;\n }\n\n function lowestCommonInclusiveAncestor(tsA, tsB) {\n var ancestorsA = getTreeScopeAncestors(tsA);\n var ancestorsB = getTreeScopeAncestors(tsB);\n\n var result = null;\n while (ancestorsA.length > 0 && ancestorsB.length > 0) {\n var a = ancestorsA.pop();\n var b = ancestorsB.pop();\n if (a === b)\n result = a;\n else\n break;\n }\n return result;\n }\n\n function getTreeScopeRoot(ts) {\n if (!ts.parent)\n return ts;\n return getTreeScopeRoot(ts.parent);\n }\n\n function relatedTargetResolution(event, currentTarget, relatedTarget) {\n // In case the current target is a window use its document for the purpose\n // of retargetting the related target.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var relatedTargetTree = getTreeScope(relatedTarget);\n\n var relatedTargetEventPath = getEventPath(relatedTarget, event);\n\n var lowestCommonAncestorTree;\n\n // 4\n var lowestCommonAncestorTree =\n lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);\n\n // 5\n if (!lowestCommonAncestorTree)\n lowestCommonAncestorTree = relatedTargetTree.root;\n\n // 6\n for (var commonAncestorTree = lowestCommonAncestorTree;\n commonAncestorTree;\n commonAncestorTree = commonAncestorTree.parent) {\n // 6.1\n var adjustedRelatedTarget;\n for (var i = 0; i < relatedTargetEventPath.length; i++) {\n var node = relatedTargetEventPath[i];\n if (getTreeScope(node) === commonAncestorTree)\n return node;\n }\n }\n\n return null;\n }\n\n function inSameTree(a, b) {\n return getTreeScope(a) === getTreeScope(b);\n }\n\n var NONE = 0;\n var CAPTURING_PHASE = 1;\n var AT_TARGET = 2;\n var BUBBLING_PHASE = 3;\n\n // pendingError is used to rethrow the first error we got during an event\n // dispatch. The browser actually reports all errors but to do that we would\n // need to rethrow the error asynchronously.\n var pendingError;\n\n function dispatchOriginalEvent(originalEvent) {\n // Make sure this event is only dispatched once.\n if (handledEventsTable.get(originalEvent))\n return;\n handledEventsTable.set(originalEvent, true);\n dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));\n if (pendingError) {\n var err = pendingError;\n pendingError = null;\n throw err;\n }\n }\n\n\n function isLoadLikeEvent(event) {\n switch (event.type) {\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#events-and-the-window-object\n case 'load':\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#unloading-documents\n case 'beforeunload':\n case 'unload':\n return true;\n }\n return false;\n }\n\n function dispatchEvent(event, originalWrapperTarget) {\n if (currentlyDispatchingEvents.get(event))\n throw new Error('InvalidStateError');\n\n currentlyDispatchingEvents.set(event, true);\n\n // Render to ensure that the event path is correct.\n scope.renderAllPending();\n var eventPath;\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#events-and-the-window-object\n // All events dispatched on Nodes with a default view, except load events,\n // should propagate to the Window.\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end\n var overrideTarget;\n var win;\n\n // Should really be not cancelable too but since Firefox has a bug there\n // we skip that check.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=999456\n if (isLoadLikeEvent(event) && !event.bubbles) {\n var doc = originalWrapperTarget;\n if (doc instanceof wrappers.Document && (win = doc.defaultView)) {\n overrideTarget = doc;\n eventPath = [];\n }\n }\n\n if (!eventPath) {\n if (originalWrapperTarget instanceof wrappers.Window) {\n win = originalWrapperTarget;\n eventPath = [];\n } else {\n eventPath = getEventPath(originalWrapperTarget, event);\n\n if (!isLoadLikeEvent(event)) {\n var doc = eventPath[eventPath.length - 1];\n if (doc instanceof wrappers.Document)\n win = doc.defaultView;\n }\n }\n }\n\n eventPathTable.set(event, eventPath);\n\n if (dispatchCapturing(event, eventPath, win, overrideTarget)) {\n if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {\n dispatchBubbling(event, eventPath, win, overrideTarget);\n }\n }\n\n eventPhaseTable.set(event, NONE);\n currentTargetTable.delete(event, null);\n currentlyDispatchingEvents.delete(event);\n\n return event.defaultPrevented;\n }\n\n function dispatchCapturing(event, eventPath, win, overrideTarget) {\n var phase = CAPTURING_PHASE;\n\n if (win) {\n if (!invoke(win, event, phase, eventPath, overrideTarget))\n return false;\n }\n\n for (var i = eventPath.length - 1; i > 0; i--) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return false;\n }\n\n return true;\n }\n\n function dispatchAtTarget(event, eventPath, win, overrideTarget) {\n var phase = AT_TARGET;\n var currentTarget = eventPath[0] || win;\n return invoke(currentTarget, event, phase, eventPath, overrideTarget);\n }\n\n function dispatchBubbling(event, eventPath, win, overrideTarget) {\n var phase = BUBBLING_PHASE;\n for (var i = 1; i < eventPath.length; i++) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return;\n }\n\n if (win && eventPath.length > 0) {\n invoke(win, event, phase, eventPath, overrideTarget);\n }\n }\n\n function invoke(currentTarget, event, phase, eventPath, overrideTarget) {\n var listeners = listenersTable.get(currentTarget);\n if (!listeners)\n return true;\n\n var target = overrideTarget || eventRetargetting(eventPath, currentTarget);\n\n if (target === currentTarget) {\n if (phase === CAPTURING_PHASE)\n return true;\n\n if (phase === BUBBLING_PHASE)\n phase = AT_TARGET;\n\n } else if (phase === BUBBLING_PHASE && !event.bubbles) {\n return true;\n }\n\n if ('relatedTarget' in event) {\n var originalEvent = unwrap(event);\n var unwrappedRelatedTarget = originalEvent.relatedTarget;\n\n // X-Tag sets relatedTarget on a CustomEvent. If they do that there is no\n // way to have relatedTarget return the adjusted target but worse is that\n // the originalEvent might not have a relatedTarget so we hit an assert\n // when we try to wrap it.\n if (unwrappedRelatedTarget) {\n // In IE we can get objects that are not EventTargets at this point.\n // Safari does not have an EventTarget interface so revert to checking\n // for addEventListener as an approximation.\n if (unwrappedRelatedTarget instanceof Object &&\n unwrappedRelatedTarget.addEventListener) {\n var relatedTarget = wrap(unwrappedRelatedTarget);\n\n var adjusted =\n relatedTargetResolution(event, currentTarget, relatedTarget);\n if (adjusted === target)\n return true;\n } else {\n adjusted = null;\n }\n relatedTargetTable.set(event, adjusted);\n }\n }\n\n eventPhaseTable.set(event, phase);\n var type = event.type;\n\n var anyRemoved = false;\n targetTable.set(event, target);\n currentTargetTable.set(event, currentTarget);\n\n // Keep track of the invoke depth so that we only clean up the removed\n // listeners if we are in the outermost invoke.\n listeners.depth++;\n\n for (var i = 0, len = listeners.length; i < len; i++) {\n var listener = listeners[i];\n if (listener.removed) {\n anyRemoved = true;\n continue;\n }\n\n if (listener.type !== type ||\n !listener.capture && phase === CAPTURING_PHASE ||\n listener.capture && phase === BUBBLING_PHASE) {\n continue;\n }\n\n try {\n if (typeof listener.handler === 'function')\n listener.handler.call(currentTarget, event);\n else\n listener.handler.handleEvent(event);\n\n if (stopImmediatePropagationTable.get(event))\n return false;\n\n } catch (ex) {\n if (!pendingError)\n pendingError = ex;\n }\n }\n\n listeners.depth--;\n\n if (anyRemoved && listeners.depth === 0) {\n var copy = listeners.slice();\n listeners.length = 0;\n for (var i = 0; i < copy.length; i++) {\n if (!copy[i].removed)\n listeners.push(copy[i]);\n }\n }\n\n return !stopPropagationTable.get(event);\n }\n\n function Listener(type, handler, capture) {\n this.type = type;\n this.handler = handler;\n this.capture = Boolean(capture);\n }\n Listener.prototype = {\n equals: function(that) {\n return this.handler === that.handler && this.type === that.type &&\n this.capture === that.capture;\n },\n get removed() {\n return this.handler === null;\n },\n remove: function() {\n this.handler = null;\n }\n };\n\n var OriginalEvent = window.Event;\n OriginalEvent.prototype.polymerBlackList_ = {\n returnValue: true,\n // TODO(arv): keyLocation is part of KeyboardEvent but Firefox does not\n // support constructable KeyboardEvent so we keep it here for now.\n keyLocation: true\n };\n\n /**\n * Creates a new Event wrapper or wraps an existin native Event object.\n * @param {string|Event} type\n * @param {Object=} options\n * @constructor\n */\n function Event(type, options) {\n if (type instanceof OriginalEvent) {\n var impl = type;\n // In browsers that do not correctly support BeforeUnloadEvent we get to\n // the generic Event wrapper but we still want to ensure we create a\n // BeforeUnloadEvent. Since BeforeUnloadEvent calls super, we need to\n // prevent reentrancty.\n if (!OriginalBeforeUnloadEvent && impl.type === 'beforeunload' &&\n !(this instanceof BeforeUnloadEvent)) {\n return new BeforeUnloadEvent(impl);\n }\n setWrapper(impl, this);\n } else {\n return wrap(constructEvent(OriginalEvent, 'Event', type, options));\n }\n }\n Event.prototype = {\n get target() {\n return targetTable.get(this);\n },\n get currentTarget() {\n return currentTargetTable.get(this);\n },\n get eventPhase() {\n return eventPhaseTable.get(this);\n },\n get path() {\n var eventPath = eventPathTable.get(this);\n if (!eventPath)\n return [];\n // TODO(arv): Event path should contain window.\n return eventPath.slice();\n },\n stopPropagation: function() {\n stopPropagationTable.set(this, true);\n },\n stopImmediatePropagation: function() {\n stopPropagationTable.set(this, true);\n stopImmediatePropagationTable.set(this, true);\n }\n };\n registerWrapper(OriginalEvent, Event, document.createEvent('Event'));\n\n function unwrapOptions(options) {\n if (!options || !options.relatedTarget)\n return options;\n return Object.create(options, {\n relatedTarget: {value: unwrap(options.relatedTarget)}\n });\n }\n\n function registerGenericEvent(name, SuperEvent, prototype) {\n var OriginalEvent = window[name];\n var GenericEvent = function(type, options) {\n if (type instanceof OriginalEvent)\n setWrapper(type, this);\n else\n return wrap(constructEvent(OriginalEvent, name, type, options));\n };\n GenericEvent.prototype = Object.create(SuperEvent.prototype);\n if (prototype)\n mixin(GenericEvent.prototype, prototype);\n if (OriginalEvent) {\n // - Old versions of Safari fails on new FocusEvent (and others?).\n // - IE does not support event constructors.\n // - createEvent('FocusEvent') throws in Firefox.\n // => Try the best practice solution first and fallback to the old way\n // if needed.\n try {\n registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent('temp'));\n } catch (ex) {\n registerWrapper(OriginalEvent, GenericEvent,\n document.createEvent(name));\n }\n }\n return GenericEvent;\n }\n\n var UIEvent = registerGenericEvent('UIEvent', Event);\n var CustomEvent = registerGenericEvent('CustomEvent', Event);\n\n var relatedTargetProto = {\n get relatedTarget() {\n var relatedTarget = relatedTargetTable.get(this);\n // relatedTarget can be null.\n if (relatedTarget !== undefined)\n return relatedTarget;\n return wrap(unwrap(this).relatedTarget);\n }\n };\n\n function getInitFunction(name, relatedTargetIndex) {\n return function() {\n arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);\n var impl = unwrap(this);\n impl[name].apply(impl, arguments);\n };\n }\n\n var mouseEventProto = mixin({\n initMouseEvent: getInitFunction('initMouseEvent', 14)\n }, relatedTargetProto);\n\n var focusEventProto = mixin({\n initFocusEvent: getInitFunction('initFocusEvent', 5)\n }, relatedTargetProto);\n\n var MouseEvent = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);\n var FocusEvent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);\n\n // In case the browser does not support event constructors we polyfill that\n // by calling `createEvent('Foo')` and `initFooEvent` where the arguments to\n // `initFooEvent` are derived from the registered default event init dict.\n var defaultInitDicts = Object.create(null);\n\n var supportsEventConstructors = (function() {\n try {\n new window.FocusEvent('focus');\n } catch (ex) {\n return false;\n }\n return true;\n })();\n\n /**\n * Constructs a new native event.\n */\n function constructEvent(OriginalEvent, name, type, options) {\n if (supportsEventConstructors)\n return new OriginalEvent(type, unwrapOptions(options));\n\n // Create the arguments from the default dictionary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict).forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].apply(event, args);\n return event;\n }\n\n if (!supportsEventConstructors) {\n var configureEventConstructor = function(name, initDict, superName) {\n if (superName) {\n var superDict = defaultInitDicts[superName];\n initDict = mixin(mixin({}, superDict), initDict);\n }\n\n defaultInitDicts[name] = initDict;\n };\n\n // The order of the default event init dictionary keys is important, the\n // arguments to initFooEvent is derived from that.\n configureEventConstructor('Event', {bubbles: false, cancelable: false});\n configureEventConstructor('CustomEvent', {detail: null}, 'Event');\n configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');\n configureEventConstructor('MouseEvent', {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null\n }, 'UIEvent');\n configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');\n }\n\n // Safari 7 does not yet have BeforeUnloadEvent.\n // https://bugs.webkit.org/show_bug.cgi?id=120849\n var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;\n\n function BeforeUnloadEvent(impl) {\n Event.call(this, impl);\n }\n BeforeUnloadEvent.prototype = Object.create(Event.prototype);\n mixin(BeforeUnloadEvent.prototype, {\n get returnValue() {\n return unsafeUnwrap(this).returnValue;\n },\n set returnValue(v) {\n unsafeUnwrap(this).returnValue = v;\n }\n });\n\n if (OriginalBeforeUnloadEvent)\n registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);\n\n function isValidListener(fun) {\n if (typeof fun === 'function')\n return true;\n return fun && fun.handleEvent;\n }\n\n function isMutationEvent(type) {\n switch (type) {\n case 'DOMAttrModified':\n case 'DOMAttributeNameChanged':\n case 'DOMCharacterDataModified':\n case 'DOMElementNameChanged':\n case 'DOMNodeInserted':\n case 'DOMNodeInsertedIntoDocument':\n case 'DOMNodeRemoved':\n case 'DOMNodeRemovedFromDocument':\n case 'DOMSubtreeModified':\n return true;\n }\n return false;\n }\n\n var OriginalEventTarget = window.EventTarget;\n\n /**\n * This represents a wrapper for an EventTarget.\n * @param {!EventTarget} impl The original event target.\n * @constructor\n */\n function EventTarget(impl) {\n setWrapper(impl, this);\n }\n\n // Node and Window have different internal type checks in WebKit so we cannot\n // use the same method as the original function.\n var methodNames = [\n 'addEventListener',\n 'removeEventListener',\n 'dispatchEvent'\n ];\n\n [Node, Window].forEach(function(constructor) {\n var p = constructor.prototype;\n methodNames.forEach(function(name) {\n Object.defineProperty(p, name + '_', {value: p[name]});\n });\n });\n\n function getTargetToListenAt(wrapper) {\n if (wrapper instanceof wrappers.ShadowRoot)\n wrapper = wrapper.host;\n return unwrap(wrapper);\n }\n\n EventTarget.prototype = {\n addEventListener: function(type, fun, capture) {\n if (!isValidListener(fun) || isMutationEvent(type))\n return;\n\n var listener = new Listener(type, fun, capture);\n var listeners = listenersTable.get(this);\n if (!listeners) {\n listeners = [];\n listeners.depth = 0;\n listenersTable.set(this, listeners);\n } else {\n // Might have a duplicate.\n for (var i = 0; i < listeners.length; i++) {\n if (listener.equals(listeners[i]))\n return;\n }\n }\n\n listeners.push(listener);\n\n var target = getTargetToListenAt(this);\n target.addEventListener_(type, dispatchOriginalEvent, true);\n },\n removeEventListener: function(type, fun, capture) {\n capture = Boolean(capture);\n var listeners = listenersTable.get(this);\n if (!listeners)\n return;\n var count = 0, found = false;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].type === type && listeners[i].capture === capture) {\n count++;\n if (listeners[i].handler === fun) {\n found = true;\n listeners[i].remove();\n }\n }\n }\n\n if (found && count === 1) {\n var target = getTargetToListenAt(this);\n target.removeEventListener_(type, dispatchOriginalEvent, true);\n }\n },\n dispatchEvent: function(event) {\n // We want to use the native dispatchEvent because it triggers the default\n // actions (like checking a checkbox). However, if there are no listeners\n // in the composed tree then there are no events that will trigger and\n // listeners in the non composed tree that are part of the event path are\n // not notified.\n //\n // If we find out that there are no listeners in the composed tree we add\n // a temporary listener to the target which makes us get called back even\n // in that case.\n\n var nativeEvent = unwrap(event);\n var eventType = nativeEvent.type;\n\n // Allow dispatching the same event again. This is safe because if user\n // code calls this during an existing dispatch of the same event the\n // native dispatchEvent throws (that is required by the spec).\n handledEventsTable.set(nativeEvent, false);\n\n // Force rendering since we prefer native dispatch and that works on the\n // composed tree.\n scope.renderAllPending();\n\n var tempListener;\n if (!hasListenerInAncestors(this, eventType)) {\n tempListener = function() {};\n this.addEventListener(eventType, tempListener, true);\n }\n\n try {\n return unwrap(this).dispatchEvent_(nativeEvent);\n } finally {\n if (tempListener)\n this.removeEventListener(eventType, tempListener, true);\n }\n }\n };\n\n function hasListener(node, type) {\n var listeners = listenersTable.get(node);\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n if (!listeners[i].removed && listeners[i].type === type)\n return true;\n }\n }\n return false;\n }\n\n function hasListenerInAncestors(target, type) {\n for (var node = unwrap(target); node; node = node.parentNode) {\n if (hasListener(wrap(node), type))\n return true;\n }\n return false;\n }\n\n if (OriginalEventTarget)\n registerWrapper(OriginalEventTarget, EventTarget);\n\n function wrapEventTargetMethods(constructors) {\n forwardMethodsToWrapper(constructors, methodNames);\n }\n\n var originalElementFromPoint = document.elementFromPoint;\n\n function elementFromPoint(self, document, x, y) {\n scope.renderAllPending();\n\n var element =\n wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y));\n if (!element)\n return null;\n var path = getEventPath(element, null);\n\n // scope the path to this TreeScope\n var idx = path.lastIndexOf(self);\n if (idx == -1)\n return null;\n else\n path = path.slice(0, idx);\n\n // TODO(dfreedm): pass idx to eventRetargetting to avoid array copy\n return eventRetargetting(path, self);\n }\n\n /**\n * Returns a function that is to be used as a getter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerGetter(name) {\n return function() {\n var inlineEventHandlers = eventHandlersTable.get(this);\n return inlineEventHandlers && inlineEventHandlers[name] &&\n inlineEventHandlers[name].value || null;\n };\n }\n\n /**\n * Returns a function that is to be used as a setter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerSetter(name) {\n var eventType = name.slice(2);\n return function(value) {\n var inlineEventHandlers = eventHandlersTable.get(this);\n if (!inlineEventHandlers) {\n inlineEventHandlers = Object.create(null);\n eventHandlersTable.set(this, inlineEventHandlers);\n }\n\n var old = inlineEventHandlers[name];\n if (old)\n this.removeEventListener(eventType, old.wrapped, false);\n\n if (typeof value === 'function') {\n var wrapped = function(e) {\n var rv = value.call(this, e);\n if (rv === false)\n e.preventDefault();\n else if (name === 'onbeforeunload' && typeof rv === 'string')\n e.returnValue = rv;\n // mouseover uses true for preventDefault but preventDefault for\n // mouseover is ignored by browsers these day.\n };\n\n this.addEventListener(eventType, wrapped, false);\n inlineEventHandlers[name] = {\n value: value,\n wrapped: wrapped\n };\n }\n };\n }\n\n scope.elementFromPoint = elementFromPoint;\n scope.getEventHandlerGetter = getEventHandlerGetter;\n scope.getEventHandlerSetter = getEventHandlerSetter;\n scope.wrapEventTargetMethods = wrapEventTargetMethods;\n scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;\n scope.wrappers.CustomEvent = CustomEvent;\n scope.wrappers.Event = Event;\n scope.wrappers.EventTarget = EventTarget;\n scope.wrappers.FocusEvent = FocusEvent;\n scope.wrappers.MouseEvent = MouseEvent;\n scope.wrappers.UIEvent = UIEvent;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var UIEvent = scope.wrappers.UIEvent;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrap = scope.wrap;\n\n // TouchEvent is WebKit/Blink only.\n var OriginalTouchEvent = window.TouchEvent;\n if (!OriginalTouchEvent)\n return;\n\n var nativeEvent;\n try {\n nativeEvent = document.createEvent('TouchEvent');\n } catch (ex) {\n // In Chrome creating a TouchEvent fails if the feature is not turned on\n // which it isn't on desktop Chrome.\n return;\n }\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function Touch(impl) {\n setWrapper(impl, this);\n }\n\n Touch.prototype = {\n get target() {\n return wrap(unsafeUnwrap(this).target);\n }\n };\n\n var descr = {\n configurable: true,\n enumerable: true,\n get: null\n };\n\n [\n 'clientX',\n 'clientY',\n 'screenX',\n 'screenY',\n 'pageX',\n 'pageY',\n 'identifier',\n 'webkitRadiusX',\n 'webkitRadiusY',\n 'webkitRotationAngle',\n 'webkitForce'\n ].forEach(function(name) {\n descr.get = function() {\n return unsafeUnwrap(this)[name];\n };\n Object.defineProperty(Touch.prototype, name, descr);\n });\n\n function TouchList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n\n TouchList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n\n function wrapTouchList(nativeTouchList) {\n var list = new TouchList();\n for (var i = 0; i < nativeTouchList.length; i++) {\n list[i] = new Touch(nativeTouchList[i]);\n }\n list.length = i;\n return list;\n }\n\n function TouchEvent(impl) {\n UIEvent.call(this, impl);\n }\n\n TouchEvent.prototype = Object.create(UIEvent.prototype);\n\n mixin(TouchEvent.prototype, {\n get touches() {\n return wrapTouchList(unsafeUnwrap(this).touches);\n },\n\n get targetTouches() {\n return wrapTouchList(unsafeUnwrap(this).targetTouches);\n },\n\n get changedTouches() {\n return wrapTouchList(unsafeUnwrap(this).changedTouches);\n },\n\n initTouchEvent: function() {\n // The only way to use this is to reuse the TouchList from an existing\n // TouchEvent. Since this is WebKit/Blink proprietary API we will not\n // implement this until someone screams.\n throw new Error('Not implemented');\n }\n });\n\n registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);\n\n scope.wrappers.Touch = Touch;\n scope.wrappers.TouchEvent = TouchEvent;\n scope.wrappers.TouchList = TouchList;\n\n})(window.ShadowDOMPolyfill);\n\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrap = scope.wrap;\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function NodeList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n NodeList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n nonEnum(NodeList.prototype, 'item');\n\n function wrapNodeList(list) {\n if (list == null)\n return list;\n var wrapperList = new NodeList();\n for (var i = 0, length = list.length; i < length; i++) {\n wrapperList[i] = wrap(list[i]);\n }\n wrapperList.length = length;\n return wrapperList;\n }\n\n function addWrapNodeListMethod(wrapperConstructor, name) {\n wrapperConstructor.prototype[name] = function() {\n return wrapNodeList(\n unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments));\n };\n }\n\n scope.wrappers.NodeList = NodeList;\n scope.addWrapNodeListMethod = addWrapNodeListMethod;\n scope.wrapNodeList = wrapNodeList;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n // TODO(arv): Implement.\n\n scope.wrapHTMLCollection = scope.wrapNodeList;\n scope.wrappers.HTMLCollection = scope.wrappers.NodeList;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var NodeList = scope.wrappers.NodeList;\n var TreeScope = scope.TreeScope;\n var assert = scope.assert;\n var defineWrapGetter = scope.defineWrapGetter;\n var enqueueMutation = scope.enqueueMutation;\n var getTreeScope = scope.getTreeScope;\n var isWrapper = scope.isWrapper;\n var mixin = scope.mixin;\n var registerTransientObservers = scope.registerTransientObservers;\n var registerWrapper = scope.registerWrapper;\n var setTreeScope = scope.setTreeScope;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n var wrapIfNeeded = scope.wrapIfNeeded;\n var wrappers = scope.wrappers;\n\n function assertIsNodeWrapper(node) {\n assert(node instanceof Node);\n }\n\n function createOneElementNodeList(node) {\n var nodes = new NodeList();\n nodes[0] = node;\n nodes.length = 1;\n return nodes;\n }\n\n var surpressMutations = false;\n\n /**\n * Called before node is inserted into a node to enqueue its removal from its\n * old parent.\n * @param {!Node} node The node that is about to be removed.\n * @param {!Node} parent The parent node that the node is being removed from.\n * @param {!NodeList} nodes The collected nodes.\n */\n function enqueueRemovalForInsertedNodes(node, parent, nodes) {\n enqueueMutation(parent, 'childList', {\n removedNodes: nodes,\n previousSibling: node.previousSibling,\n nextSibling: node.nextSibling\n });\n }\n\n function enqueueRemovalForInsertedDocumentFragment(df, nodes) {\n enqueueMutation(df, 'childList', {\n removedNodes: nodes\n });\n }\n\n /**\n * Collects nodes from a DocumentFragment or a Node for removal followed\n * by an insertion.\n *\n * This updates the internal pointers for node, previousNode and nextNode.\n */\n function collectNodes(node, parentNode, previousNode, nextNode) {\n if (node instanceof DocumentFragment) {\n var nodes = collectNodesForDocumentFragment(node);\n\n // The extra loop is to work around bugs with DocumentFragments in IE.\n surpressMutations = true;\n for (var i = nodes.length - 1; i >= 0; i--) {\n node.removeChild(nodes[i]);\n nodes[i].parentNode_ = parentNode;\n }\n surpressMutations = false;\n\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].previousSibling_ = nodes[i - 1] || previousNode;\n nodes[i].nextSibling_ = nodes[i + 1] || nextNode;\n }\n\n if (previousNode)\n previousNode.nextSibling_ = nodes[0];\n if (nextNode)\n nextNode.previousSibling_ = nodes[nodes.length - 1];\n\n return nodes;\n }\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent) {\n // This will enqueue the mutation record for the removal as needed.\n oldParent.removeChild(node);\n }\n\n node.parentNode_ = parentNode;\n node.previousSibling_ = previousNode;\n node.nextSibling_ = nextNode;\n if (previousNode)\n previousNode.nextSibling_ = node;\n if (nextNode)\n nextNode.previousSibling_ = node;\n\n return nodes;\n }\n\n function collectNodesNative(node) {\n if (node instanceof DocumentFragment)\n return collectNodesForDocumentFragment(node);\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent)\n enqueueRemovalForInsertedNodes(node, oldParent, nodes);\n return nodes;\n }\n\n function collectNodesForDocumentFragment(node) {\n var nodes = new NodeList();\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n nodes[i++] = child;\n }\n nodes.length = i;\n enqueueRemovalForInsertedDocumentFragment(node, nodes);\n return nodes;\n }\n\n function snapshotNodeList(nodeList) {\n // NodeLists are not live at the moment so just return the same object.\n return nodeList;\n }\n\n // http://dom.spec.whatwg.org/#node-is-inserted\n function nodeWasAdded(node, treeScope) {\n setTreeScope(node, treeScope);\n node.nodeIsInserted_();\n }\n\n function nodesWereAdded(nodes, parent) {\n var treeScope = getTreeScope(parent);\n for (var i = 0; i < nodes.length; i++) {\n nodeWasAdded(nodes[i], treeScope);\n }\n }\n\n // http://dom.spec.whatwg.org/#node-is-removed\n function nodeWasRemoved(node) {\n setTreeScope(node, new TreeScope(node, null));\n }\n\n function nodesWereRemoved(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n nodeWasRemoved(nodes[i]);\n }\n }\n\n function ensureSameOwnerDocument(parent, child) {\n var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ?\n parent : parent.ownerDocument;\n if (ownerDoc !== child.ownerDocument)\n ownerDoc.adoptNode(child);\n }\n\n function adoptNodesIfNeeded(owner, nodes) {\n if (!nodes.length)\n return;\n\n var ownerDoc = owner.ownerDocument;\n\n // All nodes have the same ownerDocument when we get here.\n if (ownerDoc === nodes[0].ownerDocument)\n return;\n\n for (var i = 0; i < nodes.length; i++) {\n scope.adoptNodeNoRemove(nodes[i], ownerDoc);\n }\n }\n\n function unwrapNodesForInsertion(owner, nodes) {\n adoptNodesIfNeeded(owner, nodes);\n var length = nodes.length;\n\n if (length === 1)\n return unwrap(nodes[0]);\n\n var df = unwrap(owner.ownerDocument.createDocumentFragment());\n for (var i = 0; i < length; i++) {\n df.appendChild(unwrap(nodes[i]));\n }\n return df;\n }\n\n function clearChildNodes(wrapper) {\n if (wrapper.firstChild_ !== undefined) {\n var child = wrapper.firstChild_;\n while (child) {\n var tmp = child;\n child = child.nextSibling_;\n tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;\n }\n }\n wrapper.firstChild_ = wrapper.lastChild_ = undefined;\n }\n\n function removeAllChildNodes(wrapper) {\n if (wrapper.invalidateShadowRenderer()) {\n var childWrapper = wrapper.firstChild;\n while (childWrapper) {\n assert(childWrapper.parentNode === wrapper);\n var nextSibling = childWrapper.nextSibling;\n var childNode = unwrap(childWrapper);\n var parentNode = childNode.parentNode;\n if (parentNode)\n originalRemoveChild.call(parentNode, childNode);\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = null;\n childWrapper = nextSibling;\n }\n wrapper.firstChild_ = wrapper.lastChild_ = null;\n } else {\n var node = unwrap(wrapper);\n var child = node.firstChild;\n var nextSibling;\n while (child) {\n nextSibling = child.nextSibling;\n originalRemoveChild.call(node, child);\n child = nextSibling;\n }\n }\n }\n\n function invalidateParent(node) {\n var p = node.parentNode;\n return p && p.invalidateShadowRenderer();\n }\n\n function cleanupNodes(nodes) {\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n n.parentNode.removeChild(n);\n }\n }\n\n var originalImportNode = document.importNode;\n var originalCloneNode = window.Node.prototype.cloneNode;\n\n function cloneNode(node, deep, opt_doc) {\n var clone;\n if (opt_doc)\n clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false));\n else\n clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false));\n\n if (deep) {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n clone.appendChild(cloneNode(child, true, opt_doc));\n }\n\n if (node instanceof wrappers.HTMLTemplateElement) {\n var cloneContent = clone.content;\n for (var child = node.content.firstChild;\n child;\n child = child.nextSibling) {\n cloneContent.appendChild(cloneNode(child, true, opt_doc));\n }\n }\n }\n // TODO(arv): Some HTML elements also clone other data like value.\n return clone;\n }\n\n function contains(self, child) {\n if (!child || getTreeScope(self) !== getTreeScope(child))\n return false;\n\n for (var node = child; node; node = node.parentNode) {\n if (node === self)\n return true;\n }\n return false;\n }\n\n var OriginalNode = window.Node;\n\n /**\n * This represents a wrapper of a native DOM node.\n * @param {!Node} original The original DOM node, aka, the visual DOM node.\n * @constructor\n * @extends {EventTarget}\n */\n function Node(original) {\n assert(original instanceof OriginalNode);\n\n EventTarget.call(this, original);\n\n // These properties are used to override the visual references with the\n // logical ones. If the value is undefined it means that the logical is the\n // same as the visual.\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.parentNode_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.firstChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.lastChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.nextSibling_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.previousSibling_ = undefined;\n\n this.treeScope_ = undefined;\n }\n\n var OriginalDocumentFragment = window.DocumentFragment;\n var originalAppendChild = OriginalNode.prototype.appendChild;\n var originalCompareDocumentPosition =\n OriginalNode.prototype.compareDocumentPosition;\n var originalInsertBefore = OriginalNode.prototype.insertBefore;\n var originalRemoveChild = OriginalNode.prototype.removeChild;\n var originalReplaceChild = OriginalNode.prototype.replaceChild;\n\n var isIe = /Trident/.test(navigator.userAgent);\n\n var removeChildOriginalHelper = isIe ?\n function(parent, child) {\n try {\n originalRemoveChild.call(parent, child);\n } catch (ex) {\n if (!(parent instanceof OriginalDocumentFragment))\n throw ex;\n }\n } :\n function(parent, child) {\n originalRemoveChild.call(parent, child);\n };\n\n Node.prototype = Object.create(EventTarget.prototype);\n mixin(Node.prototype, {\n appendChild: function(childWrapper) {\n return this.insertBefore(childWrapper, null);\n },\n\n insertBefore: function(childWrapper, refWrapper) {\n assertIsNodeWrapper(childWrapper);\n\n var refNode;\n if (refWrapper) {\n if (isWrapper(refWrapper)) {\n refNode = unwrap(refWrapper);\n } else {\n refNode = refWrapper;\n refWrapper = wrap(refNode);\n }\n } else {\n refWrapper = null;\n refNode = null;\n }\n\n refWrapper && assert(refWrapper.parentNode === this);\n\n var nodes;\n var previousNode =\n refWrapper ? refWrapper.previousSibling : this.lastChild;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(childWrapper);\n\n if (useNative)\n nodes = collectNodesNative(childWrapper);\n else\n nodes = collectNodes(childWrapper, this, previousNode, refWrapper);\n\n if (useNative) {\n ensureSameOwnerDocument(this, childWrapper);\n clearChildNodes(this);\n originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode);\n } else {\n if (!previousNode)\n this.firstChild_ = nodes[0];\n if (!refWrapper) {\n this.lastChild_ = nodes[nodes.length - 1];\n if (this.firstChild_ === undefined)\n this.firstChild_ = this.firstChild;\n }\n\n var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this);\n\n // insertBefore refWrapper no matter what the parent is?\n if (parentNode) {\n originalInsertBefore.call(parentNode,\n unwrapNodesForInsertion(this, nodes), refNode);\n } else {\n adoptNodesIfNeeded(this, nodes);\n }\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n nextSibling: refWrapper,\n previousSibling: previousNode\n });\n\n nodesWereAdded(nodes, this);\n\n return childWrapper;\n },\n\n removeChild: function(childWrapper) {\n assertIsNodeWrapper(childWrapper);\n if (childWrapper.parentNode !== this) {\n // IE has invalid DOM trees at times.\n var found = false;\n var childNodes = this.childNodes;\n for (var ieChild = this.firstChild; ieChild;\n ieChild = ieChild.nextSibling) {\n if (ieChild === childWrapper) {\n found = true;\n break;\n }\n }\n if (!found) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n }\n\n var childNode = unwrap(childWrapper);\n var childWrapperNextSibling = childWrapper.nextSibling;\n var childWrapperPreviousSibling = childWrapper.previousSibling;\n\n if (this.invalidateShadowRenderer()) {\n // We need to remove the real node from the DOM before updating the\n // pointers. This is so that that mutation event is dispatched before\n // the pointers have changed.\n var thisFirstChild = this.firstChild;\n var thisLastChild = this.lastChild;\n\n var parentNode = childNode.parentNode;\n if (parentNode)\n removeChildOriginalHelper(parentNode, childNode);\n\n if (thisFirstChild === childWrapper)\n this.firstChild_ = childWrapperNextSibling;\n if (thisLastChild === childWrapper)\n this.lastChild_ = childWrapperPreviousSibling;\n if (childWrapperPreviousSibling)\n childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;\n if (childWrapperNextSibling) {\n childWrapperNextSibling.previousSibling_ =\n childWrapperPreviousSibling;\n }\n\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = undefined;\n } else {\n clearChildNodes(this);\n removeChildOriginalHelper(unsafeUnwrap(this), childNode);\n }\n\n if (!surpressMutations) {\n enqueueMutation(this, 'childList', {\n removedNodes: createOneElementNodeList(childWrapper),\n nextSibling: childWrapperNextSibling,\n previousSibling: childWrapperPreviousSibling\n });\n }\n\n registerTransientObservers(this, childWrapper);\n\n return childWrapper;\n },\n\n replaceChild: function(newChildWrapper, oldChildWrapper) {\n assertIsNodeWrapper(newChildWrapper);\n\n var oldChildNode;\n if (isWrapper(oldChildWrapper)) {\n oldChildNode = unwrap(oldChildWrapper);\n } else {\n oldChildNode = oldChildWrapper;\n oldChildWrapper = wrap(oldChildNode);\n }\n\n if (oldChildWrapper.parentNode !== this) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n\n var nextNode = oldChildWrapper.nextSibling;\n var previousNode = oldChildWrapper.previousSibling;\n var nodes;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(newChildWrapper);\n\n if (useNative) {\n nodes = collectNodesNative(newChildWrapper);\n } else {\n if (nextNode === newChildWrapper)\n nextNode = newChildWrapper.nextSibling;\n nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);\n }\n\n if (!useNative) {\n if (this.firstChild === oldChildWrapper)\n this.firstChild_ = nodes[0];\n if (this.lastChild === oldChildWrapper)\n this.lastChild_ = nodes[nodes.length - 1];\n\n oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ =\n oldChildWrapper.parentNode_ = undefined;\n\n // replaceChild no matter what the parent is?\n if (oldChildNode.parentNode) {\n originalReplaceChild.call(\n oldChildNode.parentNode,\n unwrapNodesForInsertion(this, nodes),\n oldChildNode);\n }\n } else {\n ensureSameOwnerDocument(this, newChildWrapper);\n clearChildNodes(this);\n originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper),\n oldChildNode);\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n removedNodes: createOneElementNodeList(oldChildWrapper),\n nextSibling: nextNode,\n previousSibling: previousNode\n });\n\n nodeWasRemoved(oldChildWrapper);\n nodesWereAdded(nodes, this);\n\n return oldChildWrapper;\n },\n\n /**\n * Called after a node was inserted. Subclasses override this to invalidate\n * the renderer as needed.\n * @private\n */\n nodeIsInserted_: function() {\n for (var child = this.firstChild; child; child = child.nextSibling) {\n child.nodeIsInserted_();\n }\n },\n\n hasChildNodes: function() {\n return this.firstChild !== null;\n },\n\n /** @type {Node} */\n get parentNode() {\n // If the parentNode has not been overridden, use the original parentNode.\n return this.parentNode_ !== undefined ?\n this.parentNode_ : wrap(unsafeUnwrap(this).parentNode);\n },\n\n /** @type {Node} */\n get firstChild() {\n return this.firstChild_ !== undefined ?\n this.firstChild_ : wrap(unsafeUnwrap(this).firstChild);\n },\n\n /** @type {Node} */\n get lastChild() {\n return this.lastChild_ !== undefined ?\n this.lastChild_ : wrap(unsafeUnwrap(this).lastChild);\n },\n\n /** @type {Node} */\n get nextSibling() {\n return this.nextSibling_ !== undefined ?\n this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling);\n },\n\n /** @type {Node} */\n get previousSibling() {\n return this.previousSibling_ !== undefined ?\n this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling);\n },\n\n get parentElement() {\n var p = this.parentNode;\n while (p && p.nodeType !== Node.ELEMENT_NODE) {\n p = p.parentNode;\n }\n return p;\n },\n\n get textContent() {\n // TODO(arv): This should fallback to unsafeUnwrap(this).textContent if there\n // are no shadow trees below or above the context node.\n var s = '';\n for (var child = this.firstChild; child; child = child.nextSibling) {\n if (child.nodeType != Node.COMMENT_NODE) {\n s += child.textContent;\n }\n }\n return s;\n },\n set textContent(textContent) {\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n removeAllChildNodes(this);\n if (textContent !== '') {\n var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent);\n this.appendChild(textNode);\n }\n } else {\n clearChildNodes(this);\n unsafeUnwrap(this).textContent = textContent;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get childNodes() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstChild; child; child = child.nextSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n cloneNode: function(deep) {\n return cloneNode(this, deep);\n },\n\n contains: function(child) {\n return contains(this, wrapIfNeeded(child));\n },\n\n compareDocumentPosition: function(otherNode) {\n // This only wraps, it therefore only operates on the composed DOM and not\n // the logical DOM.\n return originalCompareDocumentPosition.call(unsafeUnwrap(this),\n unwrapIfNeeded(otherNode));\n },\n\n normalize: function() {\n var nodes = snapshotNodeList(this.childNodes);\n var remNodes = [];\n var s = '';\n var modNode;\n\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n if (n.nodeType === Node.TEXT_NODE) {\n if (!modNode && !n.data.length)\n this.removeNode(n);\n else if (!modNode)\n modNode = n;\n else {\n s += n.data;\n remNodes.push(n);\n }\n } else {\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n remNodes = [];\n s = '';\n modNode = null;\n if (n.childNodes.length)\n n.normalize();\n }\n }\n\n // handle case where >1 text nodes are the last children\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n }\n });\n\n defineWrapGetter(Node, 'ownerDocument');\n\n // We use a DocumentFragment as a base and then delete the properties of\n // DocumentFragment.prototype from the wrapper Node. Since delete makes\n // objects slow in some JS engines we recreate the prototype object.\n registerWrapper(OriginalNode, Node, document.createDocumentFragment());\n delete Node.prototype.querySelector;\n delete Node.prototype.querySelectorAll;\n Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);\n\n scope.cloneNode = cloneNode;\n scope.nodeWasAdded = nodeWasAdded;\n scope.nodeWasRemoved = nodeWasRemoved;\n scope.nodesWereAdded = nodesWereAdded;\n scope.nodesWereRemoved = nodesWereRemoved;\n scope.originalInsertBefore = originalInsertBefore;\n scope.originalRemoveChild = originalRemoveChild;\n scope.snapshotNodeList = snapshotNodeList;\n scope.wrappers.Node = Node;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLCollection = scope.wrappers.HTMLCollection;\n var NodeList = scope.wrappers.NodeList;\n var getTreeScope = scope.getTreeScope;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrap = scope.wrap;\n\n var originalDocumentQuerySelector = document.querySelector;\n var originalElementQuerySelector = document.documentElement.querySelector;\n\n var originalDocumentQuerySelectorAll = document.querySelectorAll;\n var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;\n\n var originalDocumentGetElementsByTagName = document.getElementsByTagName;\n var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;\n\n var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;\n var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;\n\n var OriginalElement = window.Element;\n var OriginalDocument = window.HTMLDocument || window.Document;\n\n function filterNodeList(list, index, result, deep) {\n var wrappedItem = null;\n var root = null;\n for (var i = 0, length = list.length; i < length; i++) {\n wrappedItem = wrap(list[i]);\n if (!deep && (root = getTreeScope(wrappedItem).root)) {\n if (root instanceof scope.wrappers.ShadowRoot) {\n continue;\n }\n }\n result[index++] = wrappedItem;\n }\n\n return index;\n }\n\n function shimSelector(selector) {\n return String(selector).replace(/\\/deep\\//g, ' ');\n }\n\n function findOne(node, selector) {\n var m, el = node.firstElementChild;\n while (el) {\n if (el.matches(selector))\n return el;\n m = findOne(el, selector);\n if (m)\n return m;\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function matchesSelector(el, selector) {\n return el.matches(selector);\n }\n\n var XHTML_NS = 'http://www.w3.org/1999/xhtml';\n\n function matchesTagName(el, localName, localNameLowerCase) {\n var ln = el.localName;\n return ln === localName ||\n ln === localNameLowerCase && el.namespaceURI === XHTML_NS;\n }\n\n function matchesEveryThing() {\n return true;\n }\n\n function matchesLocalNameOnly(el, ns, localName) {\n return el.localName === localName;\n }\n\n function matchesNameSpace(el, ns) {\n return el.namespaceURI === ns;\n }\n\n function matchesLocalNameNS(el, ns, localName) {\n return el.namespaceURI === ns && el.localName === localName;\n }\n\n function findElements(node, index, result, p, arg0, arg1) {\n var el = node.firstElementChild;\n while (el) {\n if (p(el, arg0, arg1))\n result[index++] = el;\n index = findElements(el, index, result, p, arg0, arg1);\n el = el.nextElementSibling;\n }\n return index;\n }\n\n // find and findAll will only match Simple Selectors,\n // Structural Pseudo Classes are not guarenteed to be correct\n // http://www.w3.org/TR/css3-selectors/#simple-selectors\n\n function querySelectorAllFiltered(p, index, result, selector, deep) {\n var target = unsafeUnwrap(this);\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, selector, null);\n } else if (target instanceof OriginalElement) {\n list = originalElementQuerySelectorAll.call(target, selector);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentQuerySelectorAll.call(target, selector);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, selector, null);\n }\n\n return filterNodeList(list, index, result, deep);\n }\n\n var SelectorsInterface = {\n querySelector: function(selector) {\n var shimmed = shimSelector(selector);\n var deep = shimmed !== selector;\n selector = shimmed;\n\n var target = unsafeUnwrap(this);\n var wrappedItem;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findOne(this, selector);\n } else if (target instanceof OriginalElement) {\n wrappedItem = wrap(originalElementQuerySelector.call(target, selector));\n } else if (target instanceof OriginalDocument) {\n wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findOne(this, selector);\n }\n\n if (!wrappedItem) {\n // When the original query returns nothing\n // we return nothing (to be consistent with the other wrapped calls)\n return wrappedItem;\n } else if (!deep && (root = getTreeScope(wrappedItem).root)) {\n if (root instanceof scope.wrappers.ShadowRoot) {\n // When the original query returns an element in the ShadowDOM\n // we must do a manual tree traversal\n return findOne(this, selector);\n }\n }\n\n return wrappedItem;\n },\n querySelectorAll: function(selector) {\n var shimmed = shimSelector(selector);\n var deep = shimmed !== selector;\n selector = shimmed;\n\n var result = new NodeList();\n\n result.length = querySelectorAllFiltered.call(this,\n matchesSelector,\n 0,\n result,\n selector,\n deep);\n\n return result;\n }\n };\n\n function getElementsByTagNameFiltered(p, index, result, localName,\n lowercase) {\n var target = unsafeUnwrap(this);\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, localName, lowercase);\n } else if (target instanceof OriginalElement) {\n list = originalElementGetElementsByTagName.call(target, localName,\n lowercase);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentGetElementsByTagName.call(target, localName,\n lowercase);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, localName, lowercase);\n }\n\n return filterNodeList(list, index, result, false);\n }\n\n function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {\n var target = unsafeUnwrap(this);\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, ns, localName);\n } else if (target instanceof OriginalElement) {\n list = originalElementGetElementsByTagNameNS.call(target, ns, localName);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, ns, localName);\n }\n\n return filterNodeList(list, index, result, false);\n }\n\n var GetElementsByInterface = {\n getElementsByTagName: function(localName) {\n var result = new HTMLCollection();\n var match = localName === '*' ? matchesEveryThing : matchesTagName;\n\n result.length = getElementsByTagNameFiltered.call(this,\n match,\n 0,\n result,\n localName,\n localName.toLowerCase());\n\n return result;\n },\n\n getElementsByClassName: function(className) {\n // TODO(arv): Check className?\n return this.querySelectorAll('.' + className);\n },\n\n getElementsByTagNameNS: function(ns, localName) {\n var result = new HTMLCollection();\n var match = null;\n\n if (ns === '*') {\n match = localName === '*' ? matchesEveryThing : matchesLocalNameOnly;\n } else {\n match = localName === '*' ? matchesNameSpace : matchesLocalNameNS;\n }\n\n result.length = getElementsByTagNameNSFiltered.call(this,\n match,\n 0,\n result,\n ns || null,\n localName);\n\n return result;\n }\n };\n\n scope.GetElementsByInterface = GetElementsByInterface;\n scope.SelectorsInterface = SelectorsInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var NodeList = scope.wrappers.NodeList;\n\n function forwardElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.nextSibling;\n }\n return node;\n }\n\n function backwardsElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.previousSibling;\n }\n return node;\n }\n\n var ParentNodeInterface = {\n get firstElementChild() {\n return forwardElement(this.firstChild);\n },\n\n get lastElementChild() {\n return backwardsElement(this.lastChild);\n },\n\n get childElementCount() {\n var count = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n count++;\n }\n return count;\n },\n\n get children() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n remove: function() {\n var p = this.parentNode;\n if (p)\n p.removeChild(this);\n }\n };\n\n var ChildNodeInterface = {\n get nextElementSibling() {\n return forwardElement(this.nextSibling);\n },\n\n get previousElementSibling() {\n return backwardsElement(this.previousSibling);\n }\n };\n\n scope.ChildNodeInterface = ChildNodeInterface;\n scope.ParentNodeInterface = ParentNodeInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var Node = scope.wrappers.Node;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n\n var OriginalCharacterData = window.CharacterData;\n\n function CharacterData(node) {\n Node.call(this, node);\n }\n CharacterData.prototype = Object.create(Node.prototype);\n mixin(CharacterData.prototype, {\n get textContent() {\n return this.data;\n },\n set textContent(value) {\n this.data = value;\n },\n get data() {\n return unsafeUnwrap(this).data;\n },\n set data(value) {\n var oldValue = unsafeUnwrap(this).data;\n enqueueMutation(this, 'characterData', {\n oldValue: oldValue\n });\n unsafeUnwrap(this).data = value;\n }\n });\n\n mixin(CharacterData.prototype, ChildNodeInterface);\n\n registerWrapper(OriginalCharacterData, CharacterData,\n document.createTextNode(''));\n\n scope.wrappers.CharacterData = CharacterData;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var CharacterData = scope.wrappers.CharacterData;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n function toUInt32(x) {\n return x >>> 0;\n }\n\n var OriginalText = window.Text;\n\n function Text(node) {\n CharacterData.call(this, node);\n }\n Text.prototype = Object.create(CharacterData.prototype);\n mixin(Text.prototype, {\n splitText: function(offset) {\n offset = toUInt32(offset);\n var s = this.data;\n if (offset > s.length)\n throw new Error('IndexSizeError');\n var head = s.slice(0, offset);\n var tail = s.slice(offset);\n this.data = head;\n var newTextNode = this.ownerDocument.createTextNode(tail);\n if (this.parentNode)\n this.parentNode.insertBefore(newTextNode, this.nextSibling);\n return newTextNode;\n }\n });\n\n registerWrapper(OriginalText, Text, document.createTextNode(''));\n\n scope.wrappers.Text = Text;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n\n function invalidateClass(el) {\n scope.invalidateRendererBasedOnAttribute(el, 'class');\n }\n\n function DOMTokenList(impl, ownerElement) {\n setWrapper(impl, this);\n this.ownerElement_ = ownerElement;\n }\n\n DOMTokenList.prototype = {\n constructor: DOMTokenList,\n get length() {\n return unsafeUnwrap(this).length;\n },\n item: function(index) {\n return unsafeUnwrap(this).item(index);\n },\n contains: function(token) {\n return unsafeUnwrap(this).contains(token);\n },\n add: function() {\n unsafeUnwrap(this).add.apply(unsafeUnwrap(this), arguments);\n invalidateClass(this.ownerElement_);\n },\n remove: function() {\n unsafeUnwrap(this).remove.apply(unsafeUnwrap(this), arguments);\n invalidateClass(this.ownerElement_);\n },\n toggle: function(token) {\n var rv = unsafeUnwrap(this).toggle.apply(unsafeUnwrap(this), arguments);\n invalidateClass(this.ownerElement_);\n return rv;\n },\n toString: function() {\n return unsafeUnwrap(this).toString();\n }\n };\n\n scope.wrappers.DOMTokenList = DOMTokenList;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var DOMTokenList = scope.wrappers.DOMTokenList;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var addWrapNodeListMethod = scope.addWrapNodeListMethod;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var registerWrapper = scope.registerWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrappers = scope.wrappers;\n\n var OriginalElement = window.Element;\n\n var matchesNames = [\n 'matches', // needs to come first.\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'webkitMatchesSelector',\n ].filter(function(name) {\n return OriginalElement.prototype[name];\n });\n\n var matchesName = matchesNames[0];\n\n var originalMatches = OriginalElement.prototype[matchesName];\n\n function invalidateRendererBasedOnAttribute(element, name) {\n // Only invalidate if parent node is a shadow host.\n var p = element.parentNode;\n if (!p || !p.shadowRoot)\n return;\n\n var renderer = scope.getRendererForHost(p);\n if (renderer.dependsOnAttribute(name))\n renderer.invalidate();\n }\n\n function enqueAttributeChange(element, name, oldValue) {\n // This is not fully spec compliant. We should use localName (which might\n // have a different case than name) and the namespace (which requires us\n // to get the Attr object).\n enqueueMutation(element, 'attributes', {\n name: name,\n namespace: null,\n oldValue: oldValue\n });\n }\n\n var classListTable = new WeakMap();\n\n function Element(node) {\n Node.call(this, node);\n }\n Element.prototype = Object.create(Node.prototype);\n mixin(Element.prototype, {\n createShadowRoot: function() {\n var newShadowRoot = new wrappers.ShadowRoot(this);\n unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot;\n\n var renderer = scope.getRendererForHost(this);\n renderer.invalidate();\n\n return newShadowRoot;\n },\n\n get shadowRoot() {\n return unsafeUnwrap(this).polymerShadowRoot_ || null;\n },\n\n // getDestinationInsertionPoints added in ShadowRenderer.js\n\n setAttribute: function(name, value) {\n var oldValue = unsafeUnwrap(this).getAttribute(name);\n unsafeUnwrap(this).setAttribute(name, value);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n removeAttribute: function(name) {\n var oldValue = unsafeUnwrap(this).getAttribute(name);\n unsafeUnwrap(this).removeAttribute(name);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n matches: function(selector) {\n return originalMatches.call(unsafeUnwrap(this), selector);\n },\n\n get classList() {\n var list = classListTable.get(this);\n if (!list) {\n classListTable.set(this,\n list = new DOMTokenList(unsafeUnwrap(this).classList, this));\n }\n return list;\n },\n\n get className() {\n return unsafeUnwrap(this).className;\n },\n\n set className(v) {\n this.setAttribute('class', v);\n },\n\n get id() {\n return unsafeUnwrap(this).id;\n },\n\n set id(v) {\n this.setAttribute('id', v);\n }\n });\n\n matchesNames.forEach(function(name) {\n if (name !== 'matches') {\n Element.prototype[name] = function(selector) {\n return this.matches(selector);\n };\n }\n });\n\n if (OriginalElement.prototype.webkitCreateShadowRoot) {\n Element.prototype.webkitCreateShadowRoot =\n Element.prototype.createShadowRoot;\n }\n\n mixin(Element.prototype, ChildNodeInterface);\n mixin(Element.prototype, GetElementsByInterface);\n mixin(Element.prototype, ParentNodeInterface);\n mixin(Element.prototype, SelectorsInterface);\n\n registerWrapper(OriginalElement, Element,\n document.createElementNS(null, 'x'));\n\n scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;\n scope.matchesNames = matchesNames;\n scope.wrappers.Element = Element;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var defineGetter = scope.defineGetter;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var nodesWereAdded = scope.nodesWereAdded;\n var nodesWereRemoved = scope.nodesWereRemoved;\n var registerWrapper = scope.registerWrapper;\n var snapshotNodeList = scope.snapshotNodeList;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n /////////////////////////////////////////////////////////////////////////////\n // innerHTML and outerHTML\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\n var escapeAttrRegExp = /[&\\u00A0\"]/g;\n var escapeDataRegExp = /[&\\u00A0<>]/g;\n\n function escapeReplace(c) {\n switch (c) {\n case '&':\n return '&amp;';\n case '<':\n return '&lt;';\n case '>':\n return '&gt;';\n case '\"':\n return '&quot;'\n case '\\u00A0':\n return '&nbsp;';\n }\n }\n\n function escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n }\n\n function escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n }\n\n function makeSet(arr) {\n var set = {};\n for (var i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n }\n\n // http://www.whatwg.org/specs/web-apps/current-work/#void-elements\n var voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n ]);\n\n var plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript'\n ]);\n\n function getOuterHTML(node, parentNode) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n var tagName = node.tagName.toLowerCase();\n var s = '<' + tagName;\n var attrs = node.attributes;\n for (var i = 0, attr; attr = attrs[i]; i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName])\n return s;\n\n return s + getInnerHTML(node) + '</' + tagName + '>';\n\n case Node.TEXT_NODE:\n var data = node.data;\n if (parentNode && plaintextParents[parentNode.localName])\n return data;\n return escapeData(data);\n\n case Node.COMMENT_NODE:\n return '<!--' + node.data + '-->';\n\n default:\n console.error(node);\n throw new Error('not implemented');\n }\n }\n\n function getInnerHTML(node) {\n if (node instanceof wrappers.HTMLTemplateElement)\n node = node.content;\n\n var s = '';\n for (var child = node.firstChild; child; child = child.nextSibling) {\n s += getOuterHTML(child, node);\n }\n return s;\n }\n\n function setInnerHTML(node, value, opt_tagName) {\n var tagName = opt_tagName || 'div';\n node.textContent = '';\n var tempElement = unwrap(node.ownerDocument.createElement(tagName));\n tempElement.innerHTML = value;\n var firstChild;\n while (firstChild = tempElement.firstChild) {\n node.appendChild(wrap(firstChild));\n }\n }\n\n // IE11 does not have MSIE in the user agent string.\n var oldIe = /MSIE/.test(navigator.userAgent);\n\n var OriginalHTMLElement = window.HTMLElement;\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLElement(node) {\n Element.call(this, node);\n }\n HTMLElement.prototype = Object.create(Element.prototype);\n mixin(HTMLElement.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n // IE9 does not handle set innerHTML correctly on plaintextParents. It\n // creates element children. For example\n //\n // scriptElement.innerHTML = '<a>test</a>'\n //\n // Creates a single HTMLAnchorElement child.\n if (oldIe && plaintextParents[this.localName]) {\n this.textContent = value;\n return;\n }\n\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n if (this instanceof wrappers.HTMLTemplateElement)\n setInnerHTML(this.content, value);\n else\n setInnerHTML(this, value, this.tagName);\n\n // If we have a non native template element we need to handle this\n // manually since setting impl.innerHTML would add the html as direct\n // children and not be moved over to the content fragment.\n } else if (!OriginalHTMLTemplateElement &&\n this instanceof wrappers.HTMLTemplateElement) {\n setInnerHTML(this.content, value);\n } else {\n unsafeUnwrap(this).innerHTML = value;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get outerHTML() {\n return getOuterHTML(this, this.parentNode);\n },\n set outerHTML(value) {\n var p = this.parentNode;\n if (p) {\n p.invalidateShadowRenderer();\n var df = frag(p, value);\n p.replaceChild(df, this);\n }\n },\n\n insertAdjacentHTML: function(position, text) {\n var contextElement, refNode;\n switch (String(position).toLowerCase()) {\n case 'beforebegin':\n contextElement = this.parentNode;\n refNode = this;\n break;\n case 'afterend':\n contextElement = this.parentNode;\n refNode = this.nextSibling;\n break;\n case 'afterbegin':\n contextElement = this;\n refNode = this.firstChild;\n break;\n case 'beforeend':\n contextElement = this;\n refNode = null;\n break;\n default:\n return;\n }\n\n var df = frag(contextElement, text);\n contextElement.insertBefore(df, refNode);\n },\n\n get hidden() {\n return this.hasAttribute('hidden');\n },\n set hidden(v) {\n if (v) {\n this.setAttribute('hidden', '');\n } else {\n this.removeAttribute('hidden');\n }\n }\n });\n\n function frag(contextElement, html) {\n // TODO(arv): This does not work with SVG and other non HTML elements.\n var p = unwrap(contextElement.cloneNode(false));\n p.innerHTML = html;\n var df = unwrap(document.createDocumentFragment());\n var c;\n while (c = p.firstChild) {\n df.appendChild(c);\n }\n return wrap(df);\n }\n\n function getter(name) {\n return function() {\n scope.renderAllPending();\n return unsafeUnwrap(this)[name];\n };\n }\n\n function getterRequiresRendering(name) {\n defineGetter(HTMLElement, name, getter(name));\n }\n\n [\n 'clientHeight',\n 'clientLeft',\n 'clientTop',\n 'clientWidth',\n 'offsetHeight',\n 'offsetLeft',\n 'offsetTop',\n 'offsetWidth',\n 'scrollHeight',\n 'scrollWidth',\n ].forEach(getterRequiresRendering);\n\n function getterAndSetterRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n get: getter(name),\n set: function(v) {\n scope.renderAllPending();\n unsafeUnwrap(this)[name] = v;\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'scrollLeft',\n 'scrollTop',\n ].forEach(getterAndSetterRequiresRendering);\n\n function methodRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n value: function() {\n scope.renderAllPending();\n return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments);\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'getBoundingClientRect',\n 'getClientRects',\n 'scrollIntoView'\n ].forEach(methodRequiresRendering);\n\n // HTMLElement is abstract so we use a subclass that has no members.\n registerWrapper(OriginalHTMLElement, HTMLElement,\n document.createElement('b'));\n\n scope.wrappers.HTMLElement = HTMLElement;\n\n // TODO: Find a better way to share these two with WrapperShadowRoot.\n scope.getInnerHTML = getInnerHTML;\n scope.setInnerHTML = setInnerHTML\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLCanvasElement = window.HTMLCanvasElement;\n\n function HTMLCanvasElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLCanvasElement.prototype, {\n getContext: function() {\n var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments);\n return context && wrap(context);\n }\n });\n\n registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement,\n document.createElement('canvas'));\n\n scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLContentElement = window.HTMLContentElement;\n\n function HTMLContentElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLContentElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLContentElement.prototype, {\n constructor: HTMLContentElement,\n\n get select() {\n return this.getAttribute('select');\n },\n set select(value) {\n this.setAttribute('select', value);\n },\n\n setAttribute: function(n, v) {\n HTMLElement.prototype.setAttribute.call(this, n, v);\n if (String(n).toLowerCase() === 'select')\n this.invalidateShadowRenderer(true);\n }\n\n // getDistributedNodes is added in ShadowRenderer\n });\n\n if (OriginalHTMLContentElement)\n registerWrapper(OriginalHTMLContentElement, HTMLContentElement);\n\n scope.wrappers.HTMLContentElement = HTMLContentElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n\n var OriginalHTMLFormElement = window.HTMLFormElement;\n\n function HTMLFormElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLFormElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLFormElement.prototype, {\n get elements() {\n // Note: technically this should be an HTMLFormControlsCollection, but\n // that inherits from HTMLCollection, so should be good enough. Spec:\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection\n return wrapHTMLCollection(unwrap(this).elements);\n }\n });\n\n registerWrapper(OriginalHTMLFormElement, HTMLFormElement,\n document.createElement('form'));\n\n scope.wrappers.HTMLFormElement = HTMLFormElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLImageElement = window.HTMLImageElement;\n\n function HTMLImageElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLImageElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLImageElement, HTMLImageElement,\n document.createElement('img'));\n\n function Image(width, height) {\n if (!(this instanceof Image)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('img'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (width !== undefined)\n node.width = width;\n if (height !== undefined)\n node.height = height;\n }\n\n Image.prototype = HTMLImageElement.prototype;\n\n scope.wrappers.HTMLImageElement = HTMLImageElement;\n scope.wrappers.Image = Image;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var NodeList = scope.wrappers.NodeList;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLShadowElement = window.HTMLShadowElement;\n\n function HTMLShadowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);\n HTMLShadowElement.prototype.constructor = HTMLShadowElement;\n\n // getDistributedNodes is added in ShadowRenderer\n\n if (OriginalHTMLShadowElement)\n registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);\n\n scope.wrappers.HTMLShadowElement = HTMLShadowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var contentTable = new WeakMap();\n var templateContentsOwnerTable = new WeakMap();\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getTemplateContentsOwner(doc) {\n if (!doc.defaultView)\n return doc;\n var d = templateContentsOwnerTable.get(doc);\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n templateContentsOwnerTable.set(doc, d);\n }\n return d;\n }\n\n function extractContent(templateElement) {\n // templateElement is not a wrapper here.\n var doc = getTemplateContentsOwner(templateElement.ownerDocument);\n var df = unwrap(doc.createDocumentFragment());\n var child;\n while (child = templateElement.firstChild) {\n df.appendChild(child);\n }\n return df;\n }\n\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLTemplateElement(node) {\n HTMLElement.call(this, node);\n if (!OriginalHTMLTemplateElement) {\n var content = extractContent(node);\n contentTable.set(this, wrap(content));\n }\n }\n HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLTemplateElement.prototype, {\n constructor: HTMLTemplateElement,\n get content() {\n if (OriginalHTMLTemplateElement)\n return wrap(unsafeUnwrap(this).content);\n return contentTable.get(this);\n },\n\n // TODO(arv): cloneNode needs to clone content.\n\n });\n\n if (OriginalHTMLTemplateElement)\n registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);\n\n scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLMediaElement = window.HTMLMediaElement;\n\n if (!OriginalHTMLMediaElement) return;\n\n function HTMLMediaElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement,\n document.createElement('audio'));\n\n scope.wrappers.HTMLMediaElement = HTMLMediaElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLMediaElement = scope.wrappers.HTMLMediaElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLAudioElement = window.HTMLAudioElement;\n\n if (!OriginalHTMLAudioElement) return;\n\n function HTMLAudioElement(node) {\n HTMLMediaElement.call(this, node);\n }\n HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);\n\n registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement,\n document.createElement('audio'));\n\n function Audio(src) {\n if (!(this instanceof Audio)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('audio'));\n HTMLMediaElement.call(this, node);\n rewrap(node, this);\n\n node.setAttribute('preload', 'auto');\n if (src !== undefined)\n node.setAttribute('src', src);\n }\n\n Audio.prototype = HTMLAudioElement.prototype;\n\n scope.wrappers.HTMLAudioElement = HTMLAudioElement;\n scope.wrappers.Audio = Audio;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLOptionElement = window.HTMLOptionElement;\n\n function trimText(s) {\n return s.replace(/\\s+/g, ' ').trim();\n }\n\n function HTMLOptionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLOptionElement.prototype, {\n get text() {\n return trimText(this.textContent);\n },\n set text(value) {\n this.textContent = trimText(String(value));\n },\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement,\n document.createElement('option'));\n\n function Option(text, value, defaultSelected, selected) {\n if (!(this instanceof Option)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('option'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (text !== undefined)\n node.text = text;\n if (value !== undefined)\n node.setAttribute('value', value);\n if (defaultSelected === true)\n node.setAttribute('selected', '');\n node.selected = selected === true;\n }\n\n Option.prototype = HTMLOptionElement.prototype;\n\n scope.wrappers.HTMLOptionElement = HTMLOptionElement;\n scope.wrappers.Option = Option;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLSelectElement = window.HTMLSelectElement;\n\n function HTMLSelectElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLSelectElement.prototype, {\n add: function(element, before) {\n if (typeof before === 'object') // also includes null\n before = unwrap(before);\n unwrap(this).add(unwrap(element), before);\n },\n\n remove: function(indexOrNode) {\n // Spec only allows index but implementations allow index or node.\n // remove() is also allowed which is same as remove(undefined)\n if (indexOrNode === undefined) {\n HTMLElement.prototype.remove.call(this);\n return;\n }\n\n if (typeof indexOrNode === 'object')\n indexOrNode = unwrap(indexOrNode);\n\n unwrap(this).remove(indexOrNode);\n },\n\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement,\n document.createElement('select'));\n\n scope.wrappers.HTMLSelectElement = HTMLSelectElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n\n var OriginalHTMLTableElement = window.HTMLTableElement;\n\n function HTMLTableElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableElement.prototype, {\n get caption() {\n return wrap(unwrap(this).caption);\n },\n createCaption: function() {\n return wrap(unwrap(this).createCaption());\n },\n\n get tHead() {\n return wrap(unwrap(this).tHead);\n },\n createTHead: function() {\n return wrap(unwrap(this).createTHead());\n },\n\n createTFoot: function() {\n return wrap(unwrap(this).createTFoot());\n },\n get tFoot() {\n return wrap(unwrap(this).tFoot);\n },\n\n get tBodies() {\n return wrapHTMLCollection(unwrap(this).tBodies);\n },\n createTBody: function() {\n return wrap(unwrap(this).createTBody());\n },\n\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableElement, HTMLTableElement,\n document.createElement('table'));\n\n scope.wrappers.HTMLTableElement = HTMLTableElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;\n\n function HTMLTableSectionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableSectionElement.prototype, {\n constructor: HTMLTableSectionElement,\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement,\n document.createElement('thead'));\n\n scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableRowElement = window.HTMLTableRowElement;\n\n function HTMLTableRowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableRowElement.prototype, {\n get cells() {\n return wrapHTMLCollection(unwrap(this).cells);\n },\n\n insertCell: function(index) {\n return wrap(unwrap(this).insertCell(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement,\n document.createElement('tr'));\n\n scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLElement = scope.wrappers.HTMLElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLUnknownElement = window.HTMLUnknownElement;\n\n function HTMLUnknownElement(node) {\n switch (node.localName) {\n case 'content':\n return new HTMLContentElement(node);\n case 'shadow':\n return new HTMLShadowElement(node);\n case 'template':\n return new HTMLTemplateElement(node);\n }\n HTMLElement.call(this, node);\n }\n HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);\n registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);\n scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerObject = scope.registerObject;\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var svgTitleElement = document.createElementNS(SVG_NS, 'title');\n var SVGTitleElement = registerObject(svgTitleElement);\n var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;\n\n // IE11 does not have classList for SVG elements. The spec says that classList\n // is an accessor on Element, but IE11 puts classList on HTMLElement, leaving\n // SVGElement without a classList property. We therefore move the accessor for\n // IE11.\n if (!('classList' in svgTitleElement)) {\n var descr = Object.getOwnPropertyDescriptor(Element.prototype, 'classList');\n Object.defineProperty(HTMLElement.prototype, 'classList', descr);\n delete Element.prototype.classList;\n }\n\n scope.wrappers.SVGElement = SVGElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalSVGUseElement = window.SVGUseElement;\n\n // IE uses SVGElement as parent interface, SVG2 (Blink & Gecko) uses\n // SVGGraphicsElement. Use the <g> element to get the right prototype.\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var gWrapper = wrap(document.createElementNS(SVG_NS, 'g'));\n var useElement = document.createElementNS(SVG_NS, 'use');\n var SVGGElement = gWrapper.constructor;\n var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);\n var parentInterface = parentInterfacePrototype.constructor;\n\n function SVGUseElement(impl) {\n parentInterface.call(this, impl);\n }\n\n SVGUseElement.prototype = Object.create(parentInterfacePrototype);\n\n // Firefox does not expose instanceRoot.\n if ('instanceRoot' in useElement) {\n mixin(SVGUseElement.prototype, {\n get instanceRoot() {\n return wrap(unwrap(this).instanceRoot);\n },\n get animatedInstanceRoot() {\n return wrap(unwrap(this).animatedInstanceRoot);\n },\n });\n }\n\n registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);\n\n scope.wrappers.SVGUseElement = SVGUseElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrap = scope.wrap;\n\n var OriginalSVGElementInstance = window.SVGElementInstance;\n if (!OriginalSVGElementInstance)\n return;\n\n function SVGElementInstance(impl) {\n EventTarget.call(this, impl);\n }\n\n SVGElementInstance.prototype = Object.create(EventTarget.prototype);\n mixin(SVGElementInstance.prototype, {\n /** @type {SVGElement} */\n get correspondingElement() {\n return wrap(unsafeUnwrap(this).correspondingElement);\n },\n\n /** @type {SVGUseElement} */\n get correspondingUseElement() {\n return wrap(unsafeUnwrap(this).correspondingUseElement);\n },\n\n /** @type {SVGElementInstance} */\n get parentNode() {\n return wrap(unsafeUnwrap(this).parentNode);\n },\n\n /** @type {SVGElementInstanceList} */\n get childNodes() {\n throw new Error('Not implemented');\n },\n\n /** @type {SVGElementInstance} */\n get firstChild() {\n return wrap(unsafeUnwrap(this).firstChild);\n },\n\n /** @type {SVGElementInstance} */\n get lastChild() {\n return wrap(unsafeUnwrap(this).lastChild);\n },\n\n /** @type {SVGElementInstance} */\n get previousSibling() {\n return wrap(unsafeUnwrap(this).previousSibling);\n },\n\n /** @type {SVGElementInstance} */\n get nextSibling() {\n return wrap(unsafeUnwrap(this).nextSibling);\n }\n });\n\n registerWrapper(OriginalSVGElementInstance, SVGElementInstance);\n\n scope.wrappers.SVGElementInstance = SVGElementInstance;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n\n function CanvasRenderingContext2D(impl) {\n setWrapper(impl, this);\n }\n\n mixin(CanvasRenderingContext2D.prototype, {\n get canvas() {\n return wrap(unsafeUnwrap(this).canvas);\n },\n\n drawImage: function() {\n arguments[0] = unwrapIfNeeded(arguments[0]);\n unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments);\n },\n\n createPattern: function() {\n arguments[0] = unwrap(arguments[0]);\n return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments);\n }\n });\n\n registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D,\n document.createElement('canvas').getContext('2d'));\n\n scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n // IE10 does not have WebGL.\n if (!OriginalWebGLRenderingContext)\n return;\n\n function WebGLRenderingContext(impl) {\n setWrapper(impl, this);\n }\n\n mixin(WebGLRenderingContext.prototype, {\n get canvas() {\n return wrap(unsafeUnwrap(this).canvas);\n },\n\n texImage2D: function() {\n arguments[5] = unwrapIfNeeded(arguments[5]);\n unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);\n },\n\n texSubImage2D: function() {\n arguments[6] = unwrapIfNeeded(arguments[6]);\n unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments);\n }\n });\n\n // Blink/WebKit has broken DOM bindings. Usually we would create an instance\n // of the object and pass it into registerWrapper as a \"blueprint\" but\n // creating WebGL contexts is expensive and might fail so we use a dummy\n // object with dummy instance properties for these broken browsers.\n var instanceProperties = /WebKit/.test(navigator.userAgent) ?\n {drawingBufferHeight: null, drawingBufferWidth: null} : {};\n\n registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext,\n instanceProperties);\n\n scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalRange = window.Range;\n\n function Range(impl) {\n setWrapper(impl, this);\n }\n Range.prototype = {\n get startContainer() {\n return wrap(unsafeUnwrap(this).startContainer);\n },\n get endContainer() {\n return wrap(unsafeUnwrap(this).endContainer);\n },\n get commonAncestorContainer() {\n return wrap(unsafeUnwrap(this).commonAncestorContainer);\n },\n setStart: function(refNode,offset) {\n unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);\n },\n setEnd: function(refNode,offset) {\n unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);\n },\n setStartBefore: function(refNode) {\n unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));\n },\n setStartAfter: function(refNode) {\n unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode));\n },\n setEndBefore: function(refNode) {\n unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));\n },\n setEndAfter: function(refNode) {\n unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode));\n },\n selectNode: function(refNode) {\n unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode));\n },\n selectNodeContents: function(refNode) {\n unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode));\n },\n compareBoundaryPoints: function(how, sourceRange) {\n return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));\n },\n extractContents: function() {\n return wrap(unsafeUnwrap(this).extractContents());\n },\n cloneContents: function() {\n return wrap(unsafeUnwrap(this).cloneContents());\n },\n insertNode: function(node) {\n unsafeUnwrap(this).insertNode(unwrapIfNeeded(node));\n },\n surroundContents: function(newParent) {\n unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent));\n },\n cloneRange: function() {\n return wrap(unsafeUnwrap(this).cloneRange());\n },\n isPointInRange: function(node, offset) {\n return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);\n },\n comparePoint: function(node, offset) {\n return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset);\n },\n intersectsNode: function(node) {\n return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node));\n },\n toString: function() {\n return unsafeUnwrap(this).toString();\n }\n };\n\n // IE9 does not have createContextualFragment.\n if (OriginalRange.prototype.createContextualFragment) {\n Range.prototype.createContextualFragment = function(html) {\n return wrap(unsafeUnwrap(this).createContextualFragment(html));\n };\n }\n\n registerWrapper(window.Range, Range, document.createRange());\n\n scope.wrappers.Range = Range;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var mixin = scope.mixin;\n var registerObject = scope.registerObject;\n\n var DocumentFragment = registerObject(document.createDocumentFragment());\n mixin(DocumentFragment.prototype, ParentNodeInterface);\n mixin(DocumentFragment.prototype, SelectorsInterface);\n mixin(DocumentFragment.prototype, GetElementsByInterface);\n\n var Comment = registerObject(document.createComment(''));\n\n scope.wrappers.Comment = Comment;\n scope.wrappers.DocumentFragment = DocumentFragment;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var DocumentFragment = scope.wrappers.DocumentFragment;\n var TreeScope = scope.TreeScope;\n var elementFromPoint = scope.elementFromPoint;\n var getInnerHTML = scope.getInnerHTML;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var rewrap = scope.rewrap;\n var setInnerHTML = scope.setInnerHTML;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n\n var shadowHostTable = new WeakMap();\n var nextOlderShadowTreeTable = new WeakMap();\n\n var spaceCharRe = /[ \\t\\n\\r\\f]/;\n\n function ShadowRoot(hostWrapper) {\n var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());\n DocumentFragment.call(this, node);\n\n // createDocumentFragment associates the node with a wrapper\n // DocumentFragment instance. Override that.\n rewrap(node, this);\n\n var oldShadowRoot = hostWrapper.shadowRoot;\n nextOlderShadowTreeTable.set(this, oldShadowRoot);\n\n this.treeScope_ =\n new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));\n\n shadowHostTable.set(this, hostWrapper);\n }\n ShadowRoot.prototype = Object.create(DocumentFragment.prototype);\n mixin(ShadowRoot.prototype, {\n constructor: ShadowRoot,\n\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n setInnerHTML(this, value);\n this.invalidateShadowRenderer();\n },\n\n get olderShadowRoot() {\n return nextOlderShadowTreeTable.get(this) || null;\n },\n\n get host() {\n return shadowHostTable.get(this) || null;\n },\n\n invalidateShadowRenderer: function() {\n return shadowHostTable.get(this).invalidateShadowRenderer();\n },\n\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this.ownerDocument, x, y);\n },\n\n getElementById: function(id) {\n if (spaceCharRe.test(id))\n return null;\n return this.querySelector('[id=\"' + id + '\"]');\n }\n });\n\n scope.wrappers.ShadowRoot = ShadowRoot;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var Node = scope.wrappers.Node;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var assert = scope.assert;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Up means parentNode\n * Sideways means previous and next sibling.\n * @param {!Node} wrapper\n */\n function updateWrapperUpAndSideways(wrapper) {\n wrapper.previousSibling_ = wrapper.previousSibling;\n wrapper.nextSibling_ = wrapper.nextSibling;\n wrapper.parentNode_ = wrapper.parentNode;\n }\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Down means first and last child\n * @param {!Node} wrapper\n */\n function updateWrapperDown(wrapper) {\n wrapper.firstChild_ = wrapper.firstChild;\n wrapper.lastChild_ = wrapper.lastChild;\n }\n\n function updateAllChildNodes(parentNodeWrapper) {\n assert(parentNodeWrapper instanceof Node);\n for (var childWrapper = parentNodeWrapper.firstChild;\n childWrapper;\n childWrapper = childWrapper.nextSibling) {\n updateWrapperUpAndSideways(childWrapper);\n }\n updateWrapperDown(parentNodeWrapper);\n }\n\n function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {\n var parentNode = unwrap(parentNodeWrapper);\n var newChild = unwrap(newChildWrapper);\n var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;\n\n remove(newChildWrapper);\n updateWrapperUpAndSideways(newChildWrapper);\n\n if (!refChildWrapper) {\n parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;\n if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)\n parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;\n\n var lastChildWrapper = wrap(parentNode.lastChild);\n if (lastChildWrapper)\n lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;\n } else {\n if (parentNodeWrapper.firstChild === refChildWrapper)\n parentNodeWrapper.firstChild_ = refChildWrapper;\n\n refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;\n }\n\n scope.originalInsertBefore.call(parentNode, newChild, refChild);\n }\n\n function remove(nodeWrapper) {\n var node = unwrap(nodeWrapper)\n var parentNode = node.parentNode;\n if (!parentNode)\n return;\n\n var parentNodeWrapper = wrap(parentNode);\n updateWrapperUpAndSideways(nodeWrapper);\n\n if (nodeWrapper.previousSibling)\n nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;\n if (nodeWrapper.nextSibling)\n nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;\n\n if (parentNodeWrapper.lastChild === nodeWrapper)\n parentNodeWrapper.lastChild_ = nodeWrapper;\n if (parentNodeWrapper.firstChild === nodeWrapper)\n parentNodeWrapper.firstChild_ = nodeWrapper;\n\n scope.originalRemoveChild.call(parentNode, node);\n }\n\n var distributedNodesTable = new WeakMap();\n var destinationInsertionPointsTable = new WeakMap();\n var rendererForHostTable = new WeakMap();\n\n function resetDistributedNodes(insertionPoint) {\n distributedNodesTable.set(insertionPoint, []);\n }\n\n function getDistributedNodes(insertionPoint) {\n var rv = distributedNodesTable.get(insertionPoint);\n if (!rv)\n distributedNodesTable.set(insertionPoint, rv = []);\n return rv;\n }\n\n function getChildNodesSnapshot(node) {\n var result = [], i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n result[i++] = child;\n }\n return result;\n }\n\n var request = oneOf(window, [\n 'requestAnimationFrame',\n 'mozRequestAnimationFrame',\n 'webkitRequestAnimationFrame',\n 'setTimeout'\n ]);\n\n var pendingDirtyRenderers = [];\n var renderTimer;\n\n function renderAllPending() {\n // TODO(arv): Order these in document order. That way we do not have to\n // render something twice.\n for (var i = 0; i < pendingDirtyRenderers.length; i++) {\n var renderer = pendingDirtyRenderers[i];\n var parentRenderer = renderer.parentRenderer;\n if (parentRenderer && parentRenderer.dirty)\n continue;\n renderer.render();\n }\n\n pendingDirtyRenderers = [];\n }\n\n function handleRequestAnimationFrame() {\n renderTimer = null;\n renderAllPending();\n }\n\n /**\n * Returns existing shadow renderer for a host or creates it if it is needed.\n * @params {!Element} host\n * @return {!ShadowRenderer}\n */\n function getRendererForHost(host) {\n var renderer = rendererForHostTable.get(host);\n if (!renderer) {\n renderer = new ShadowRenderer(host);\n rendererForHostTable.set(host, renderer);\n }\n return renderer;\n }\n\n function getShadowRootAncestor(node) {\n var root = getTreeScope(node).root;\n if (root instanceof ShadowRoot)\n return root;\n return null;\n }\n\n function getRendererForShadowRoot(shadowRoot) {\n return getRendererForHost(shadowRoot.host);\n }\n\n var spliceDiff = new ArraySplice();\n spliceDiff.equals = function(renderNode, rawNode) {\n return unwrap(renderNode.node) === rawNode;\n };\n\n /**\n * RenderNode is used as an in memory \"render tree\". When we render the\n * composed tree we create a tree of RenderNodes, then we diff this against\n * the real DOM tree and make minimal changes as needed.\n */\n function RenderNode(node) {\n this.skip = false;\n this.node = node;\n this.childNodes = [];\n }\n\n RenderNode.prototype = {\n append: function(node) {\n var rv = new RenderNode(node);\n this.childNodes.push(rv);\n return rv;\n },\n\n sync: function(opt_added) {\n if (this.skip)\n return;\n\n var nodeWrapper = this.node;\n // plain array of RenderNodes\n var newChildren = this.childNodes;\n // plain array of real nodes.\n var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));\n var added = opt_added || new WeakMap();\n\n var splices = spliceDiff.calculateSplices(newChildren, oldChildren);\n\n var newIndex = 0, oldIndex = 0;\n var lastIndex = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n for (; lastIndex < splice.index; lastIndex++) {\n oldIndex++;\n newChildren[newIndex++].sync(added);\n }\n\n var removedCount = splice.removed.length;\n for (var j = 0; j < removedCount; j++) {\n var wrapper = wrap(oldChildren[oldIndex++]);\n if (!added.get(wrapper))\n remove(wrapper);\n }\n\n var addedCount = splice.addedCount;\n var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);\n for (var j = 0; j < addedCount; j++) {\n var newChildRenderNode = newChildren[newIndex++];\n var newChildWrapper = newChildRenderNode.node;\n insertBefore(nodeWrapper, newChildWrapper, refNode);\n\n // Keep track of added so that we do not remove the node after it\n // has been added.\n added.set(newChildWrapper, true);\n\n newChildRenderNode.sync(added);\n }\n\n lastIndex += addedCount;\n }\n\n for (var i = lastIndex; i < newChildren.length; i++) {\n newChildren[i].sync(added);\n }\n }\n };\n\n function ShadowRenderer(host) {\n this.host = host;\n this.dirty = false;\n this.invalidateAttributes();\n this.associateNode(host);\n }\n\n ShadowRenderer.prototype = {\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees\n render: function(opt_renderNode) {\n if (!this.dirty)\n return;\n\n this.invalidateAttributes();\n\n var host = this.host;\n\n this.distribution(host);\n var renderNode = opt_renderNode || new RenderNode(host);\n this.buildRenderTree(renderNode, host);\n\n var topMostRenderer = !opt_renderNode;\n if (topMostRenderer)\n renderNode.sync();\n\n this.dirty = false;\n },\n\n get parentRenderer() {\n return getTreeScope(this.host).renderer;\n },\n\n invalidate: function() {\n if (!this.dirty) {\n this.dirty = true;\n var parentRenderer = this.parentRenderer;\n if (parentRenderer)\n parentRenderer.invalidate();\n pendingDirtyRenderers.push(this);\n if (renderTimer)\n return;\n renderTimer = window[request](handleRequestAnimationFrame, 0);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-algorithms\n distribution: function(root) {\n this.resetAllSubtrees(root);\n this.distributionResolution(root);\n },\n\n resetAll: function(node) {\n if (isInsertionPoint(node))\n resetDistributedNodes(node);\n else\n resetDestinationInsertionPoints(node);\n\n this.resetAllSubtrees(node);\n },\n\n resetAllSubtrees: function(node) {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.resetAll(child);\n }\n\n if (node.shadowRoot)\n this.resetAll(node.shadowRoot);\n\n if (node.olderShadowRoot)\n this.resetAll(node.olderShadowRoot);\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-results\n distributionResolution: function(node) {\n if (isShadowHost(node)) {\n var shadowHost = node;\n // 1.1\n var pool = poolPopulation(shadowHost);\n\n var shadowTrees = getShadowTrees(shadowHost);\n\n // 1.2\n for (var i = 0; i < shadowTrees.length; i++) {\n // 1.2.1\n this.poolDistribution(shadowTrees[i], pool);\n }\n\n // 1.3\n for (var i = shadowTrees.length - 1; i >= 0; i--) {\n var shadowTree = shadowTrees[i];\n\n // 1.3.1\n // TODO(arv): We should keep the shadow insertion points on the\n // shadow root (or renderer) so we don't have to search the tree\n // every time.\n var shadow = getShadowInsertionPoint(shadowTree);\n\n // 1.3.2\n if (shadow) {\n\n // 1.3.2.1\n var olderShadowRoot = shadowTree.olderShadowRoot;\n if (olderShadowRoot) {\n // 1.3.2.1.1\n pool = poolPopulation(olderShadowRoot);\n }\n\n // 1.3.2.2\n for (var j = 0; j < pool.length; j++) {\n // 1.3.2.2.1\n destributeNodeInto(pool[j], shadow);\n }\n }\n\n // 1.3.3\n this.distributionResolution(shadowTree);\n }\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.distributionResolution(child);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-distribution-algorithm\n poolDistribution: function (node, pool) {\n if (node instanceof HTMLShadowElement)\n return;\n\n if (node instanceof HTMLContentElement) {\n var content = node;\n this.updateDependentAttributes(content.getAttribute('select'));\n\n var anyDistributed = false;\n\n // 1.1\n for (var i = 0; i < pool.length; i++) {\n var node = pool[i];\n if (!node)\n continue;\n if (matches(node, content)) {\n destributeNodeInto(node, content);\n pool[i] = undefined;\n anyDistributed = true;\n }\n }\n\n // 1.2\n // Fallback content\n if (!anyDistributed) {\n for (var child = content.firstChild;\n child;\n child = child.nextSibling) {\n destributeNodeInto(child, content);\n }\n }\n\n return;\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.poolDistribution(child, pool);\n }\n },\n\n buildRenderTree: function(renderNode, node) {\n var children = this.compose(node);\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var childRenderNode = renderNode.append(child);\n this.buildRenderTree(childRenderNode, child);\n }\n\n if (isShadowHost(node)) {\n var renderer = getRendererForHost(node);\n renderer.dirty = false;\n }\n\n },\n\n compose: function(node) {\n var children = [];\n var p = node.shadowRoot || node;\n for (var child = p.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n this.associateNode(p);\n var distributedNodes = getDistributedNodes(child);\n for (var j = 0; j < distributedNodes.length; j++) {\n var distributedNode = distributedNodes[j];\n if (isFinalDestination(child, distributedNode))\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n },\n\n /**\n * Invalidates the attributes used to keep track of which attributes may\n * cause the renderer to be invalidated.\n */\n invalidateAttributes: function() {\n this.attributes = Object.create(null);\n },\n\n /**\n * Parses the selector and makes this renderer dependent on the attribute\n * being used in the selector.\n * @param {string} selector\n */\n updateDependentAttributes: function(selector) {\n if (!selector)\n return;\n\n var attributes = this.attributes;\n\n // .class\n if (/\\.\\w+/.test(selector))\n attributes['class'] = true;\n\n // #id\n if (/#\\w+/.test(selector))\n attributes['id'] = true;\n\n selector.replace(/\\[\\s*([^\\s=\\|~\\]]+)/g, function(_, name) {\n attributes[name] = true;\n });\n\n // Pseudo selectors have been removed from the spec.\n },\n\n dependsOnAttribute: function(name) {\n return this.attributes[name];\n },\n\n associateNode: function(node) {\n unsafeUnwrap(node).polymerShadowRenderer_ = this;\n }\n };\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-population-algorithm\n function poolPopulation(node) {\n var pool = [];\n for (var child = node.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n pool.push.apply(pool, getDistributedNodes(child));\n } else {\n pool.push(child);\n }\n }\n return pool;\n }\n\n function getShadowInsertionPoint(node) {\n if (node instanceof HTMLShadowElement)\n return node;\n if (node instanceof HTMLContentElement)\n return null;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n var res = getShadowInsertionPoint(child);\n if (res)\n return res;\n }\n return null;\n }\n\n function destributeNodeInto(child, insertionPoint) {\n getDistributedNodes(insertionPoint).push(child);\n var points = destinationInsertionPointsTable.get(child);\n if (!points)\n destinationInsertionPointsTable.set(child, [insertionPoint]);\n else\n points.push(insertionPoint);\n }\n\n function getDestinationInsertionPoints(node) {\n return destinationInsertionPointsTable.get(node);\n }\n\n function resetDestinationInsertionPoints(node) {\n // IE11 crashes when delete is used.\n destinationInsertionPointsTable.set(node, undefined);\n }\n\n // AllowedSelectors :\n // TypeSelector\n // *\n // ClassSelector\n // IDSelector\n // AttributeSelector\n // negation\n var selectorStartCharRe = /^(:not\\()?[*.#[a-zA-Z_|]/;\n\n function matches(node, contentElement) {\n var select = contentElement.getAttribute('select');\n if (!select)\n return true;\n\n // Here we know the select attribute is a non empty string.\n select = select.trim();\n if (!select)\n return true;\n\n if (!(node instanceof Element))\n return false;\n\n if (!selectorStartCharRe.test(select))\n return false;\n\n try {\n return node.matches(select);\n } catch (ex) {\n // Invalid selector.\n return false;\n }\n }\n\n function isFinalDestination(insertionPoint, node) {\n var points = getDestinationInsertionPoints(node);\n return points && points[points.length - 1] === insertionPoint;\n }\n\n function isInsertionPoint(node) {\n return node instanceof HTMLContentElement ||\n node instanceof HTMLShadowElement;\n }\n\n function isShadowHost(shadowHost) {\n return shadowHost.shadowRoot;\n }\n\n // Returns the shadow trees as an array, with the youngest tree at the\n // beginning of the array.\n function getShadowTrees(host) {\n var trees = [];\n\n for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {\n trees.push(tree);\n }\n return trees;\n }\n\n function render(host) {\n new ShadowRenderer(host).render();\n };\n\n // Need to rerender shadow host when:\n //\n // - a direct child to the ShadowRoot is added or removed\n // - a direct child to the host is added or removed\n // - a new shadow root is created\n // - a direct child to a content/shadow element is added or removed\n // - a sibling to a content/shadow element is added or removed\n // - content[select] is changed\n // - an attribute in a direct child to a host is modified\n\n /**\n * This gets called when a node was added or removed to it.\n */\n Node.prototype.invalidateShadowRenderer = function(force) {\n var renderer = unsafeUnwrap(this).polymerShadowRenderer_;\n if (renderer) {\n renderer.invalidate();\n return true;\n }\n\n return false;\n };\n\n HTMLContentElement.prototype.getDistributedNodes =\n HTMLShadowElement.prototype.getDistributedNodes = function() {\n // TODO(arv): We should only rerender the dirty ancestor renderers (from\n // the root and down).\n renderAllPending();\n return getDistributedNodes(this);\n };\n\n Element.prototype.getDestinationInsertionPoints = function() {\n renderAllPending();\n return getDestinationInsertionPoints(this) || [];\n };\n\n HTMLContentElement.prototype.nodeIsInserted_ =\n HTMLShadowElement.prototype.nodeIsInserted_ = function() {\n // Invalidate old renderer if any.\n this.invalidateShadowRenderer();\n\n var shadowRoot = getShadowRootAncestor(this);\n var renderer;\n if (shadowRoot)\n renderer = getRendererForShadowRoot(shadowRoot);\n unsafeUnwrap(this).polymerShadowRenderer_ = renderer;\n if (renderer)\n renderer.invalidate();\n };\n\n scope.getRendererForHost = getRendererForHost;\n scope.getShadowTrees = getShadowTrees;\n scope.renderAllPending = renderAllPending;\n\n scope.getDestinationInsertionPoints = getDestinationInsertionPoints;\n\n // Exposed for testing\n scope.visual = {\n insertBefore: insertBefore,\n remove: remove,\n };\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var assert = scope.assert;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var elementsWithFormProperty = [\n 'HTMLButtonElement',\n 'HTMLFieldSetElement',\n 'HTMLInputElement',\n 'HTMLKeygenElement',\n 'HTMLLabelElement',\n 'HTMLLegendElement',\n 'HTMLObjectElement',\n // HTMLOptionElement is handled in HTMLOptionElement.js\n 'HTMLOutputElement',\n // HTMLSelectElement is handled in HTMLSelectElement.js\n 'HTMLTextAreaElement',\n ];\n\n function createWrapperConstructor(name) {\n if (!window[name])\n return;\n\n // Ensure we are not overriding an already existing constructor.\n assert(!scope.wrappers[name]);\n\n var GeneratedWrapper = function(node) {\n // At this point all of them extend HTMLElement.\n HTMLElement.call(this, node);\n }\n GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);\n mixin(GeneratedWrapper.prototype, {\n get form() {\n return wrap(unwrap(this).form);\n },\n });\n\n registerWrapper(window[name], GeneratedWrapper,\n document.createElement(name.slice(4, -7)));\n scope.wrappers[name] = GeneratedWrapper;\n }\n\n elementsWithFormProperty.forEach(createWrapperConstructor);\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalSelection = window.Selection;\n\n function Selection(impl) {\n setWrapper(impl, this);\n }\n Selection.prototype = {\n get anchorNode() {\n return wrap(unsafeUnwrap(this).anchorNode);\n },\n get focusNode() {\n return wrap(unsafeUnwrap(this).focusNode);\n },\n addRange: function(range) {\n unsafeUnwrap(this).addRange(unwrap(range));\n },\n collapse: function(node, index) {\n unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);\n },\n containsNode: function(node, allowPartial) {\n return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);\n },\n extend: function(node, offset) {\n unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);\n },\n getRangeAt: function(index) {\n return wrap(unsafeUnwrap(this).getRangeAt(index));\n },\n removeRange: function(range) {\n unsafeUnwrap(this).removeRange(unwrap(range));\n },\n selectAllChildren: function(node) {\n unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));\n },\n toString: function() {\n return unsafeUnwrap(this).toString();\n }\n };\n\n // WebKit extensions. Not implemented.\n // readonly attribute Node baseNode;\n // readonly attribute long baseOffset;\n // readonly attribute Node extentNode;\n // readonly attribute long extentOffset;\n // [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node baseNode,\n // [Default=Undefined] optional long baseOffset,\n // [Default=Undefined] optional Node extentNode,\n // [Default=Undefined] optional long extentOffset);\n // [RaisesException, ImplementedAs=collapse] void setPosition([Default=Undefined] optional Node node,\n // [Default=Undefined] optional long offset);\n\n registerWrapper(window.Selection, Selection, window.getSelection());\n\n scope.wrappers.Selection = Selection;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var Selection = scope.wrappers.Selection;\n var SelectorsInterface = scope.SelectorsInterface;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var TreeScope = scope.TreeScope;\n var cloneNode = scope.cloneNode;\n var defineWrapGetter = scope.defineWrapGetter;\n var elementFromPoint = scope.elementFromPoint;\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var matchesNames = scope.matchesNames;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var rewrap = scope.rewrap;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapEventTargetMethods = scope.wrapEventTargetMethods;\n var wrapNodeList = scope.wrapNodeList;\n\n var implementationTable = new WeakMap();\n\n function Document(node) {\n Node.call(this, node);\n this.treeScope_ = new TreeScope(this, null);\n }\n Document.prototype = Object.create(Node.prototype);\n\n defineWrapGetter(Document, 'documentElement');\n\n // Conceptually both body and head can be in a shadow but suporting that seems\n // overkill at this point.\n defineWrapGetter(Document, 'body');\n defineWrapGetter(Document, 'head');\n\n // document cannot be overridden so we override a bunch of its methods\n // directly on the instance.\n\n function wrapMethod(name) {\n var original = document[name];\n Document.prototype[name] = function() {\n return wrap(original.apply(unsafeUnwrap(this), arguments));\n };\n }\n\n [\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'getElementById'\n ].forEach(wrapMethod);\n\n var originalAdoptNode = document.adoptNode;\n\n function adoptNodeNoRemove(node, doc) {\n originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));\n adoptSubtree(node, doc);\n }\n\n function adoptSubtree(node, doc) {\n if (node.shadowRoot)\n doc.adoptNode(node.shadowRoot);\n if (node instanceof ShadowRoot)\n adoptOlderShadowRoots(node, doc);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n adoptSubtree(child, doc);\n }\n }\n\n function adoptOlderShadowRoots(shadowRoot, doc) {\n var oldShadowRoot = shadowRoot.olderShadowRoot;\n if (oldShadowRoot)\n doc.adoptNode(oldShadowRoot);\n }\n\n var originalGetSelection = document.getSelection;\n\n mixin(Document.prototype, {\n adoptNode: function(node) {\n if (node.parentNode)\n node.parentNode.removeChild(node);\n adoptNodeNoRemove(node, this);\n return node;\n },\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this, x, y);\n },\n importNode: function(node, deep) {\n return cloneNode(node, deep, unsafeUnwrap(this));\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n getElementsByName: function(name) {\n return SelectorsInterface.querySelectorAll.call(this,\n '[name=' + JSON.stringify(String(name)) + ']');\n }\n });\n\n if (document.registerElement) {\n var originalRegisterElement = document.registerElement;\n Document.prototype.registerElement = function(tagName, object) {\n var prototype, extendsOption;\n if (object !== undefined) {\n prototype = object.prototype;\n extendsOption = object.extends;\n }\n\n if (!prototype)\n prototype = Object.create(HTMLElement.prototype);\n\n\n // If we already used the object as a prototype for another custom\n // element.\n if (scope.nativePrototypeTable.get(prototype)) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // Find first object on the prototype chain that already have a native\n // prototype. Keep track of all the objects before that so we can create\n // a similar structure for the native case.\n var proto = Object.getPrototypeOf(prototype);\n var nativePrototype;\n var prototypes = [];\n while (proto) {\n nativePrototype = scope.nativePrototypeTable.get(proto);\n if (nativePrototype)\n break;\n prototypes.push(proto);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!nativePrototype) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // This works by creating a new prototype object that is empty, but has\n // the native prototype as its proto. The original prototype object\n // passed into register is used as the wrapper prototype.\n\n var newPrototype = Object.create(nativePrototype);\n for (var i = prototypes.length - 1; i >= 0; i--) {\n newPrototype = Object.create(newPrototype);\n }\n\n // Add callbacks if present.\n // Names are taken from:\n // https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp&sq=package:chromium&type=cs&l=156\n // and not from the spec since the spec is out of date.\n [\n 'createdCallback',\n 'attachedCallback',\n 'detachedCallback',\n 'attributeChangedCallback',\n ].forEach(function(name) {\n var f = prototype[name];\n if (!f)\n return;\n newPrototype[name] = function() {\n // if this element has been wrapped prior to registration,\n // the wrapper is stale; in this case rewrap\n if (!(wrap(this) instanceof CustomElementConstructor)) {\n rewrap(this);\n }\n f.apply(wrap(this), arguments);\n };\n });\n\n var p = {prototype: newPrototype};\n if (extendsOption)\n p.extends = extendsOption;\n\n function CustomElementConstructor(node) {\n if (!node) {\n if (extendsOption) {\n return document.createElement(extendsOption, tagName);\n } else {\n return document.createElement(tagName);\n }\n }\n setWrapper(node, this);\n }\n CustomElementConstructor.prototype = prototype;\n CustomElementConstructor.prototype.constructor = CustomElementConstructor;\n\n scope.constructorTable.set(newPrototype, CustomElementConstructor);\n scope.nativePrototypeTable.set(prototype, newPrototype);\n\n // registration is synchronous so do it last\n var nativeConstructor = originalRegisterElement.call(unwrap(this),\n tagName, p);\n return CustomElementConstructor;\n };\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'registerElement',\n ]);\n }\n\n // We also override some of the methods on document.body and document.head\n // for convenience.\n forwardMethodsToWrapper([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n window.HTMLHtmlElement,\n ], [\n 'appendChild',\n 'compareDocumentPosition',\n 'contains',\n 'getElementsByClassName',\n 'getElementsByTagName',\n 'getElementsByTagNameNS',\n 'insertBefore',\n 'querySelector',\n 'querySelectorAll',\n 'removeChild',\n 'replaceChild',\n ].concat(matchesNames));\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'adoptNode',\n 'importNode',\n 'contains',\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'elementFromPoint',\n 'getElementById',\n 'getElementsByName',\n 'getSelection',\n ]);\n\n mixin(Document.prototype, GetElementsByInterface);\n mixin(Document.prototype, ParentNodeInterface);\n mixin(Document.prototype, SelectorsInterface);\n\n mixin(Document.prototype, {\n get implementation() {\n var implementation = implementationTable.get(this);\n if (implementation)\n return implementation;\n implementation =\n new DOMImplementation(unwrap(this).implementation);\n implementationTable.set(this, implementation);\n return implementation;\n },\n\n get defaultView() {\n return wrap(unwrap(this).defaultView);\n }\n });\n\n registerWrapper(window.Document, Document,\n document.implementation.createHTMLDocument(''));\n\n // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has\n // one Document interface and IE implements the standard correctly.\n if (window.HTMLDocument)\n registerWrapper(window.HTMLDocument, Document);\n\n wrapEventTargetMethods([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n ]);\n\n function DOMImplementation(impl) {\n setWrapper(impl, this);\n }\n\n function wrapImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return wrap(original.apply(unsafeUnwrap(this), arguments));\n };\n }\n\n function forwardImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return original.apply(unsafeUnwrap(this), arguments);\n };\n }\n\n wrapImplMethod(DOMImplementation, 'createDocumentType');\n wrapImplMethod(DOMImplementation, 'createDocument');\n wrapImplMethod(DOMImplementation, 'createHTMLDocument');\n forwardImplMethod(DOMImplementation, 'hasFeature');\n\n registerWrapper(window.DOMImplementation, DOMImplementation);\n\n forwardMethodsToWrapper([\n window.DOMImplementation,\n ], [\n 'createDocumentType',\n 'createDocument',\n 'createHTMLDocument',\n 'hasFeature',\n ]);\n\n scope.adoptNodeNoRemove = adoptNodeNoRemove;\n scope.wrappers.DOMImplementation = DOMImplementation;\n scope.wrappers.Document = Document;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var Selection = scope.wrappers.Selection;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWindow = window.Window;\n var originalGetComputedStyle = window.getComputedStyle;\n var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;\n var originalGetSelection = window.getSelection;\n\n function Window(impl) {\n EventTarget.call(this, impl);\n }\n Window.prototype = Object.create(EventTarget.prototype);\n\n OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {\n return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);\n };\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedStyle) {\n OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {\n return wrap(this || window).getDefaultComputedStyle(\n unwrapIfNeeded(el), pseudo);\n };\n }\n\n OriginalWindow.prototype.getSelection = function() {\n return wrap(this || window).getSelection();\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window.getComputedStyle;\n delete window.getDefaultComputedStyle;\n delete window.getSelection;\n\n ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(\n function(name) {\n OriginalWindow.prototype[name] = function() {\n var w = wrap(this || window);\n return w[name].apply(w, arguments);\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window[name];\n });\n\n mixin(Window.prototype, {\n getComputedStyle: function(el, pseudo) {\n renderAllPending();\n return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el),\n pseudo);\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n\n get document() {\n return wrap(unwrap(this).document);\n }\n });\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedStyle) {\n Window.prototype.getDefaultComputedStyle = function(el, pseudo) {\n renderAllPending();\n return originalGetDefaultComputedStyle.call(unwrap(this),\n unwrapIfNeeded(el),pseudo);\n };\n }\n\n registerWrapper(OriginalWindow, Window, window);\n\n scope.wrappers.Window = Window;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var unwrap = scope.unwrap;\n\n // DataTransfer (Clipboard in old Blink/WebKit) has a single method that\n // requires wrapping. Since it is only a method we do not need a real wrapper,\n // we can just override the method.\n\n var OriginalDataTransfer = window.DataTransfer || window.Clipboard;\n var OriginalDataTransferSetDragImage =\n OriginalDataTransfer.prototype.setDragImage;\n\n if (OriginalDataTransferSetDragImage) {\n OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {\n OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);\n };\n }\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unwrap = scope.unwrap;\n\n var OriginalFormData = window.FormData;\n if (!OriginalFormData) return;\n\n function FormData(formElement) {\n var impl;\n if (formElement instanceof OriginalFormData) {\n impl = formElement;\n } else {\n impl = new OriginalFormData(formElement && unwrap(formElement));\n }\n setWrapper(impl, this);\n }\n\n registerWrapper(OriginalFormData, FormData, new OriginalFormData());\n\n scope.wrappers.FormData = FormData;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var originalSend = XMLHttpRequest.prototype.send;\n\n // Since we only need to adjust XHR.send, we just patch it instead of wrapping\n // the entire object. This happens when FormData is passed.\n XMLHttpRequest.prototype.send = function(obj) {\n return originalSend.call(this, unwrapIfNeeded(obj));\n };\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var isWrapperFor = scope.isWrapperFor;\n\n // This is a list of the elements we currently override the global constructor\n // for.\n var elements = {\n 'a': 'HTMLAnchorElement',\n // Do not create an applet element by default since it shows a warning in\n // IE.\n // https://github.com/Polymer/polymer/issues/217\n // 'applet': 'HTMLAppletElement',\n 'area': 'HTMLAreaElement',\n 'audio': 'HTMLAudioElement',\n 'base': 'HTMLBaseElement',\n 'body': 'HTMLBodyElement',\n 'br': 'HTMLBRElement',\n 'button': 'HTMLButtonElement',\n 'canvas': 'HTMLCanvasElement',\n 'caption': 'HTMLTableCaptionElement',\n 'col': 'HTMLTableColElement',\n // 'command': 'HTMLCommandElement', // Not fully implemented in Gecko.\n 'content': 'HTMLContentElement',\n 'data': 'HTMLDataElement',\n 'datalist': 'HTMLDataListElement',\n 'del': 'HTMLModElement',\n 'dir': 'HTMLDirectoryElement',\n 'div': 'HTMLDivElement',\n 'dl': 'HTMLDListElement',\n 'embed': 'HTMLEmbedElement',\n 'fieldset': 'HTMLFieldSetElement',\n 'font': 'HTMLFontElement',\n 'form': 'HTMLFormElement',\n 'frame': 'HTMLFrameElement',\n 'frameset': 'HTMLFrameSetElement',\n 'h1': 'HTMLHeadingElement',\n 'head': 'HTMLHeadElement',\n 'hr': 'HTMLHRElement',\n 'html': 'HTMLHtmlElement',\n 'iframe': 'HTMLIFrameElement',\n 'img': 'HTMLImageElement',\n 'input': 'HTMLInputElement',\n 'keygen': 'HTMLKeygenElement',\n 'label': 'HTMLLabelElement',\n 'legend': 'HTMLLegendElement',\n 'li': 'HTMLLIElement',\n 'link': 'HTMLLinkElement',\n 'map': 'HTMLMapElement',\n 'marquee': 'HTMLMarqueeElement',\n 'menu': 'HTMLMenuElement',\n 'menuitem': 'HTMLMenuItemElement',\n 'meta': 'HTMLMetaElement',\n 'meter': 'HTMLMeterElement',\n 'object': 'HTMLObjectElement',\n 'ol': 'HTMLOListElement',\n 'optgroup': 'HTMLOptGroupElement',\n 'option': 'HTMLOptionElement',\n 'output': 'HTMLOutputElement',\n 'p': 'HTMLParagraphElement',\n 'param': 'HTMLParamElement',\n 'pre': 'HTMLPreElement',\n 'progress': 'HTMLProgressElement',\n 'q': 'HTMLQuoteElement',\n 'script': 'HTMLScriptElement',\n 'select': 'HTMLSelectElement',\n 'shadow': 'HTMLShadowElement',\n 'source': 'HTMLSourceElement',\n 'span': 'HTMLSpanElement',\n 'style': 'HTMLStyleElement',\n 'table': 'HTMLTableElement',\n 'tbody': 'HTMLTableSectionElement',\n // WebKit and Moz are wrong:\n // https://bugs.webkit.org/show_bug.cgi?id=111469\n // https://bugzilla.mozilla.org/show_bug.cgi?id=848096\n // 'td': 'HTMLTableCellElement',\n 'template': 'HTMLTemplateElement',\n 'textarea': 'HTMLTextAreaElement',\n 'thead': 'HTMLTableSectionElement',\n 'time': 'HTMLTimeElement',\n 'title': 'HTMLTitleElement',\n 'tr': 'HTMLTableRowElement',\n 'track': 'HTMLTrackElement',\n 'ul': 'HTMLUListElement',\n 'video': 'HTMLVideoElement',\n };\n\n function overrideConstructor(tagName) {\n var nativeConstructorName = elements[tagName];\n var nativeConstructor = window[nativeConstructorName];\n if (!nativeConstructor)\n return;\n var element = document.createElement(tagName);\n var wrapperConstructor = element.constructor;\n window[nativeConstructorName] = wrapperConstructor;\n }\n\n Object.keys(elements).forEach(overrideConstructor);\n\n Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {\n window[name] = scope.wrappers[name]\n });\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // convenient global\n window.wrap = ShadowDOMPolyfill.wrapIfNeeded;\n window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;\n\n // users may want to customize other types\n // TODO(sjmiles): 'button' is now supported by ShadowDOMPolyfill, but\n // I've left this code here in case we need to temporarily patch another\n // type\n /*\n (function() {\n var elts = {HTMLButtonElement: 'button'};\n for (var c in elts) {\n window[c] = function() { throw 'Patched Constructor'; };\n window[c].prototype = Object.getPrototypeOf(\n document.createElement(elts[c]));\n }\n })();\n */\n\n // patch in prefixed name\n Object.defineProperty(Element.prototype, 'webkitShadowRoot',\n Object.getOwnPropertyDescriptor(Element.prototype, 'shadowRoot'));\n\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n\n Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;\n\n function queryShadow(node, selector) {\n var m, el = node.firstElementChild;\n var shadows, sr, i;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for(i = shadows.length - 1; i >= 0; i--) {\n m = shadows[i].querySelector(selector);\n if (m) {\n return m;\n }\n }\n while(el) {\n m = queryShadow(el, selector);\n if (m) {\n return m;\n }\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function queryAllShadows(node, selector, results) {\n var el = node.firstElementChild;\n var temp, sr, shadows, i, j;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for (i = shadows.length - 1; i >= 0; i--) {\n temp = shadows[i].querySelectorAll(selector);\n for(j = 0; j < temp.length; j++) {\n results.push(temp[j]);\n }\n }\n while (el) {\n queryAllShadows(el, selector, results);\n el = el.nextElementSibling;\n }\n return results;\n }\n\n scope.queryAllShadows = function(node, selector, all) {\n if (all) {\n return queryAllShadows(node, selector, []);\n } else {\n return queryShadow(node, selector);\n }\n };\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n \n The intention here is to support only the styling features which can be \n relatively simply implemented. The goal is to allow users to avoid the \n most obvious pitfalls and do so without compromising performance significantly. \n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are \n reformatted and prefixed with a given scope name and promoted to a \n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n \n :host {\n background: red;\n }\n }\n \n becomes:\n \n .foo {\n background: red;\n }\n \n * encapsultion: Styles defined within ShadowDOM, apply only to \n dom inside the ShadowDOM. Polymer uses one of two techniques to imlement\n this feature.\n \n By default, rules are prefixed with the host element tag name \n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n \n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n \n becomes:\n\n\n Alternatively, if Platform.ShadowCSS.strictStyling is set to true then \n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element \n in the element's ShadowDOM template is also given the scope attribute. \n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n \n div {\n font-weight: bold;\n }\n \n becomes:\n \n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that \n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n \n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n \n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an \n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n \n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n \n could become:\n \n <style>\n / *@polyfill .content-container div * / \n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n \n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector \n in comments in lieu of the next selector when running under polyfill.\n*/\n(function(scope) {\n\nvar ShadowCSS = {\n strictStyling: false,\n registry: {},\n // Shim styles for a given root associated with a name and extendsName\n // 1. cache root styles by name\n // 2. optionally tag root nodes with scope name\n // 3. shim polyfill directives /* @polyfill */ and /* @polyfill-rule */\n // 4. shim :host and scoping\n shimStyling: function(root, name, extendsName) {\n var scopeStyles = this.prepareRoot(root, name, extendsName);\n var typeExtension = this.isTypeExtension(extendsName);\n var scopeSelector = this.makeScopeSelector(name, typeExtension);\n // use caching to make working with styles nodes easier and to facilitate\n // lookup of extendee\n var cssText = stylesToCssText(scopeStyles, true);\n cssText = this.scopeCssText(cssText, scopeSelector);\n // cache shimmed css on root for user extensibility\n if (root) {\n root.shimmedStyle = cssText;\n }\n // add style to document\n this.addCssToDocument(cssText, name);\n },\n /*\n * Shim a style element with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimStyle: function(style, selector) {\n return this.shimCssText(style.textContent, selector);\n },\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimCssText: function(cssText, selector) {\n cssText = this.insertDirectives(cssText);\n return this.scopeCssText(cssText, selector);\n },\n makeScopeSelector: function(name, typeExtension) {\n if (name) {\n return typeExtension ? '[is=' + name + ']' : name;\n }\n return '';\n },\n isTypeExtension: function(extendsName) {\n return extendsName && extendsName.indexOf('-') < 0;\n },\n prepareRoot: function(root, name, extendsName) {\n var def = this.registerRoot(root, name, extendsName);\n this.replaceTextInStyles(def.rootStyles, this.insertDirectives);\n // remove existing style elements\n this.removeStyles(root, def.rootStyles);\n // apply strict attr\n if (this.strictStyling) {\n this.applyScopeToContent(root, name);\n }\n return def.scopeStyles;\n },\n removeStyles: function(root, styles) {\n for (var i=0, l=styles.length, s; (i<l) && (s=styles[i]); i++) {\n s.parentNode.removeChild(s);\n }\n },\n registerRoot: function(root, name, extendsName) {\n var def = this.registry[name] = {\n root: root,\n name: name,\n extendsName: extendsName\n }\n var styles = this.findStyles(root);\n def.rootStyles = styles;\n def.scopeStyles = def.rootStyles;\n var extendee = this.registry[def.extendsName];\n if (extendee) {\n def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles);\n }\n return def;\n },\n findStyles: function(root) {\n if (!root) {\n return [];\n }\n var styles = root.querySelectorAll('style');\n return Array.prototype.filter.call(styles, function(s) {\n return !s.hasAttribute(NO_SHIM_ATTRIBUTE);\n });\n },\n applyScopeToContent: function(root, name) {\n if (root) {\n // add the name attribute to each node in root.\n Array.prototype.forEach.call(root.querySelectorAll('*'),\n function(node) {\n node.setAttribute(name, '');\n });\n // and template contents too\n Array.prototype.forEach.call(root.querySelectorAll('template'),\n function(template) {\n this.applyScopeToContent(template.content, name);\n },\n this);\n }\n },\n insertDirectives: function(cssText) {\n cssText = this.insertPolyfillDirectivesInCssText(cssText);\n return this.insertPolyfillRulesInCssText(cssText);\n },\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n * \n * For example, we convert this rule:\n * \n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n * \n * to this:\n * \n * scopeName menu-item {\n *\n **/\n insertPolyfillDirectivesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentNextSelectorRe, function(match, p1) {\n // remove end comment delimiter and add block start\n return p1.slice(0, -2) + '{';\n });\n return cssText.replace(cssContentNextSelectorRe, function(match, p1) {\n return p1 + ' {';\n });\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * \n * For example, we convert this rule:\n * \n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n * \n * to this:\n * \n * scopeName menu-item {...}\n *\n **/\n insertPolyfillRulesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentRuleRe, function(match, p1) {\n // remove end comment delimiter\n return p1.slice(0, -1);\n });\n return cssText.replace(cssContentRuleRe, function(match, p1, p2, p3) {\n var rule = match.replace(p1, '').replace(p2, '');\n return p3 + rule;\n });\n },\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n * \n * .foo {... } \n * \n * and converts this to\n * \n * scopeName .foo { ... }\n */\n scopeCssText: function(cssText, scopeSelector) {\n var unscoped = this.extractUnscopedRulesFromCssText(cssText);\n cssText = this.insertPolyfillHostInCssText(cssText);\n cssText = this.convertColonHost(cssText);\n cssText = this.convertColonHostContext(cssText);\n cssText = this.convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n var self = this, cssText;\n withCssRules(cssText, function(rules) {\n cssText = self.scopeRules(rules, scopeSelector);\n });\n\n }\n cssText = cssText + '\\n' + unscoped;\n return cssText.trim();\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare \n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n * \n * (comment start) @polyfill-unscoped-rule menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * menu-item {...}\n *\n **/\n extractUnscopedRulesFromCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n var r = '', m;\n while (m = cssCommentUnscopedRuleRe.exec(cssText)) {\n r += m[1].slice(0, -1) + '\\n\\n';\n }\n while (m = cssContentUnscopedRuleRe.exec(cssText)) {\n r += m[0].replace(m[2], '').replace(m[1], m[3]) + '\\n\\n';\n }\n return r;\n },\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar\n */\n convertColonHost: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostRe,\n this.colonHostPartReplacer);\n },\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar, .foo scopeName > .bar { }\n * \n * and\n *\n * :host-context(.foo:host) .bar { ... }\n * \n * to\n * \n * scopeName.foo .bar { ... }\n */\n convertColonHostContext: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostContextRe,\n this.colonHostContextPartReplacer);\n },\n convertColonRule: function(cssText, regExp, partReplacer) {\n // p1 = :host, p2 = contents of (), p3 rest of rule\n return cssText.replace(regExp, function(m, p1, p2, p3) {\n p1 = polyfillHostNoCombinator;\n if (p2) {\n var parts = p2.split(','), r = [];\n for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {\n p = p.trim();\n r.push(partReplacer(p1, p, p3));\n }\n return r.join(',');\n } else {\n return p1 + p3;\n }\n });\n },\n colonHostContextPartReplacer: function(host, part, suffix) {\n if (part.match(polyfillHost)) {\n return this.colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n },\n colonHostPartReplacer: function(host, part, suffix) {\n return host + part.replace(polyfillHost, '') + suffix;\n },\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n convertShadowDOMSelectors: function(cssText) {\n for (var i=0; i < shadowDOMSelectorsRe.length; i++) {\n cssText = cssText.replace(shadowDOMSelectorsRe[i], ' ');\n }\n return cssText;\n },\n // change a selector like 'div' to 'name div'\n scopeRules: function(cssRules, scopeSelector) {\n var cssText = '';\n if (cssRules) {\n Array.prototype.forEach.call(cssRules, function(rule) {\n if (rule.selectorText && (rule.style && rule.style.cssText !== undefined)) {\n cssText += this.scopeSelector(rule.selectorText, scopeSelector, \n this.strictStyling) + ' {\\n\\t';\n cssText += this.propertiesFromRule(rule) + '\\n}\\n\\n';\n } else if (rule.type === CSSRule.MEDIA_RULE) {\n cssText += '@media ' + rule.media.mediaText + ' {\\n';\n cssText += this.scopeRules(rule.cssRules, scopeSelector);\n cssText += '\\n}\\n\\n';\n } else {\n // KEYFRAMES_RULE in IE throws when we query cssText\n // when it contains a -webkit- property.\n // if this happens, we fallback to constructing the rule\n // from the CSSRuleSet\n // https://connect.microsoft.com/IE/feedbackdetail/view/955703/accessing-csstext-of-a-keyframe-rule-that-contains-a-webkit-property-via-cssom-generates-exception\n try {\n if (rule.cssText) {\n cssText += rule.cssText + '\\n\\n';\n }\n } catch(x) {\n if (rule.type === CSSRule.KEYFRAMES_RULE && rule.cssRules) {\n cssText += this.ieSafeCssTextFromKeyFrameRule(rule);\n }\n }\n }\n }, this);\n }\n return cssText;\n },\n ieSafeCssTextFromKeyFrameRule: function(rule) {\n var cssText = '@keyframes ' + rule.name + ' {';\n Array.prototype.forEach.call(rule.cssRules, function(rule) {\n cssText += ' ' + rule.keyText + ' {' + rule.style.cssText + '}';\n });\n cssText += ' }';\n return cssText;\n },\n scopeSelector: function(selector, scopeSelector, strict) {\n var r = [], parts = selector.split(',');\n parts.forEach(function(p) {\n p = p.trim();\n if (this.selectorNeedsScoping(p, scopeSelector)) {\n p = (strict && !p.match(polyfillHostNoCombinator)) ? \n this.applyStrictSelectorScope(p, scopeSelector) :\n this.applySelectorScope(p, scopeSelector);\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n selectorNeedsScoping: function(selector, scopeSelector) {\n if (Array.isArray(scopeSelector)) {\n return true;\n }\n var re = this.makeScopeMatcher(scopeSelector);\n return !selector.match(re);\n },\n makeScopeMatcher: function(scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[/g, '\\\\[').replace(/\\[/g, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + selectorReSuffix, 'm');\n },\n applySelectorScope: function(selector, selectorScope) {\n return Array.isArray(selectorScope) ?\n this.applySelectorScopeList(selector, selectorScope) :\n this.applySimpleSelectorScope(selector, selectorScope);\n },\n // apply an array of selectors\n applySelectorScopeList: function(selector, scopeSelectorList) {\n var r = [];\n for (var i=0, s; (s=scopeSelectorList[i]); i++) {\n r.push(this.applySimpleSelectorScope(selector, s));\n }\n return r.join(', ');\n },\n // scope via name and [is=name]\n applySimpleSelectorScope: function(selector, scopeSelector) {\n if (selector.match(polyfillHostRe)) {\n selector = selector.replace(polyfillHostNoCombinator, scopeSelector);\n return selector.replace(polyfillHostRe, scopeSelector + ' ');\n } else {\n return scopeSelector + ' ' + selector;\n }\n },\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]\n applyStrictSelectorScope: function(selector, scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[is=([^\\]]*)\\]/g, '$1');\n var splits = [' ', '>', '+', '~'],\n scoped = selector,\n attrName = '[' + scopeSelector + ']';\n splits.forEach(function(sep) {\n var parts = scoped.split(sep);\n scoped = parts.map(function(p) {\n // remove :host since it should be unnecessary\n var t = p.trim().replace(polyfillHostRe, '');\n if (t && (splits.indexOf(t) < 0) && (t.indexOf(attrName) < 0)) {\n p = t.replace(/([^:]*)(:*)(.*)/, '$1' + attrName + '$2$3')\n }\n return p;\n }).join(sep);\n });\n return scoped;\n },\n insertPolyfillHostInCssText: function(selector) {\n return selector.replace(colonHostContextRe, polyfillHostContext).replace(\n colonHostRe, polyfillHost);\n },\n propertiesFromRule: function(rule) {\n var cssText = rule.style.cssText;\n // TODO(sorvell): Safari cssom incorrectly removes quotes from the content\n // property. (https://bugs.webkit.org/show_bug.cgi?id=118045)\n // don't replace attr rules\n if (rule.style.content && !rule.style.content.match(/['\"]+|attr/)) {\n cssText = cssText.replace(/content:[^;]*;/g, 'content: \\'' + \n rule.style.content + '\\';');\n }\n // TODO(sorvell): we can workaround this issue here, but we need a list\n // of troublesome properties to fix https://github.com/Polymer/platform/issues/53\n //\n // inherit rules can be omitted from cssText\n // TODO(sorvell): remove when Blink bug is fixed:\n // https://code.google.com/p/chromium/issues/detail?id=358273\n var style = rule.style;\n for (var i in style) {\n if (style[i] === 'initial') {\n cssText += i + ': initial; ';\n }\n }\n return cssText;\n },\n replaceTextInStyles: function(styles, action) {\n if (styles && action) {\n if (!(styles instanceof Array)) {\n styles = [styles];\n }\n Array.prototype.forEach.call(styles, function(s) {\n s.textContent = action.call(this, s.textContent);\n }, this);\n }\n },\n addCssToDocument: function(cssText, name) {\n if (cssText.match('@import')) {\n addOwnSheet(cssText, name);\n } else {\n addCssToDocument(cssText);\n }\n }\n};\n\nvar selectorRe = /([^{]*)({[\\s\\S]*?})/gim,\n cssCommentRe = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\n // TODO(sorvell): remove either content or comment\n cssCommentNextSelectorRe = /\\/\\*\\s*@polyfill ([^*]*\\*+([^/*][^*]*\\*+)*\\/)([^{]*?){/gim,\n cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\\:[\\s]*?['\"](.*?)['\"][;\\s]*}([^{]*?){/gim, \n // TODO(sorvell): remove either content or comment\n cssCommentRuleRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentRuleRe = /(polyfill-rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n // TODO(sorvell): remove either content or comment\n cssCommentUnscopedRuleRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n cssPseudoRe = /::(x-[^\\s{,(]*)/gim,\n cssPartRe = /::part\\(([^)]*)\\)/gim,\n // note: :host pre-processed to -shadowcsshost.\n polyfillHost = '-shadowcsshost',\n // note: :host-context pre-processed to -shadowcsshostcontext.\n polyfillHostContext = '-shadowcsscontext',\n parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\n cssColonHostRe = new RegExp('(' + polyfillHost + parenSuffix, 'gim'),\n cssColonHostContextRe = new RegExp('(' + polyfillHostContext + parenSuffix, 'gim'),\n selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$',\n colonHostRe = /\\:host/gim,\n colonHostContextRe = /\\:host-context/gim,\n /* host name without combinator */\n polyfillHostNoCombinator = polyfillHost + '-no-combinator',\n polyfillHostRe = new RegExp(polyfillHost, 'gim'),\n polyfillHostContextRe = new RegExp(polyfillHostContext, 'gim'),\n shadowDOMSelectorsRe = [\n /\\^\\^/g,\n /\\^/g,\n /\\/shadow\\//g,\n /\\/shadow-deep\\//g,\n /::shadow/g,\n /\\/deep\\//g,\n /::content/g\n ];\n\nfunction stylesToCssText(styles, preserveComments) {\n var cssText = '';\n Array.prototype.forEach.call(styles, function(s) {\n cssText += s.textContent + '\\n\\n';\n });\n // strip comments for easier processing\n if (!preserveComments) {\n cssText = cssText.replace(cssCommentRe, '');\n }\n return cssText;\n}\n\nfunction cssTextToStyle(cssText) {\n var style = document.createElement('style');\n style.textContent = cssText;\n return style;\n}\n\nfunction cssToRules(cssText) {\n var style = cssTextToStyle(cssText);\n document.head.appendChild(style);\n var rules = [];\n if (style.sheet) {\n // TODO(sorvell): Firefox throws when accessing the rules of a stylesheet\n // with an @import\n // https://bugzilla.mozilla.org/show_bug.cgi?id=625013\n try {\n rules = style.sheet.cssRules;\n } catch(e) {\n //\n }\n } else {\n console.warn('sheet not found', style);\n }\n style.parentNode.removeChild(style);\n return rules;\n}\n\nvar frame = document.createElement('iframe');\nframe.style.display = 'none';\n\nfunction initFrame() {\n frame.initialized = true;\n document.body.appendChild(frame);\n var doc = frame.contentDocument;\n var base = doc.createElement('base');\n base.href = document.baseURI;\n doc.head.appendChild(base);\n}\n\nfunction inFrame(fn) {\n if (!frame.initialized) {\n initFrame();\n }\n document.body.appendChild(frame);\n fn(frame.contentDocument);\n document.body.removeChild(frame);\n}\n\n// TODO(sorvell): use an iframe if the cssText contains an @import to workaround\n// https://code.google.com/p/chromium/issues/detail?id=345114\nvar isChrome = navigator.userAgent.match('Chrome');\nfunction withCssRules(cssText, callback) {\n if (!callback) {\n return;\n }\n var rules;\n if (cssText.match('@import') && isChrome) {\n var style = cssTextToStyle(cssText);\n inFrame(function(doc) {\n doc.head.appendChild(style.impl);\n rules = Array.prototype.slice.call(style.sheet.cssRules, 0);\n callback(rules);\n });\n } else {\n rules = cssToRules(cssText);\n callback(rules);\n }\n}\n\nfunction rulesToCss(cssRules) {\n for (var i=0, css=[]; i < cssRules.length; i++) {\n css.push(cssRules[i].cssText);\n }\n return css.join('\\n\\n');\n}\n\nfunction addCssToDocument(cssText) {\n if (cssText) {\n getSheet().appendChild(document.createTextNode(cssText));\n }\n}\n\nfunction addOwnSheet(cssText, name) {\n var style = cssTextToStyle(cssText);\n style.setAttribute(name, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n document.head.appendChild(style);\n}\n\nvar SHIM_ATTRIBUTE = 'shim-shadowdom';\nvar SHIMMED_ATTRIBUTE = 'shim-shadowdom-css';\nvar NO_SHIM_ATTRIBUTE = 'no-shim';\n\nvar sheet;\nfunction getSheet() {\n if (!sheet) {\n sheet = document.createElement(\"style\");\n sheet.setAttribute(SHIMMED_ATTRIBUTE, '');\n sheet[SHIMMED_ATTRIBUTE] = true;\n }\n return sheet;\n}\n\n// add polyfill stylesheet to document\nif (window.ShadowDOMPolyfill) {\n addCssToDocument('style { display: none !important; }\\n');\n var doc = wrap(document);\n var head = doc.querySelector('head');\n head.insertBefore(getSheet(), head.childNodes[0]);\n\n // TODO(sorvell): monkey-patching HTMLImports is abusive;\n // consider a better solution.\n document.addEventListener('DOMContentLoaded', function() {\n var urlResolver = scope.urlResolver;\n \n if (window.HTMLImports && !HTMLImports.useNative) {\n var SHIM_SHEET_SELECTOR = 'link[rel=stylesheet]' +\n '[' + SHIM_ATTRIBUTE + ']';\n var SHIM_STYLE_SELECTOR = 'style[' + SHIM_ATTRIBUTE + ']';\n HTMLImports.importer.documentPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n HTMLImports.importer.importsPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n\n HTMLImports.parser.documentSelectors = [\n HTMLImports.parser.documentSelectors,\n SHIM_SHEET_SELECTOR,\n SHIM_STYLE_SELECTOR\n ].join(',');\n \n var originalParseGeneric = HTMLImports.parser.parseGeneric;\n\n HTMLImports.parser.parseGeneric = function(elt) {\n if (elt[SHIMMED_ATTRIBUTE]) {\n return;\n }\n var style = elt.__importElement || elt;\n if (!style.hasAttribute(SHIM_ATTRIBUTE)) {\n originalParseGeneric.call(this, elt);\n return;\n }\n if (elt.__resource) {\n style = elt.ownerDocument.createElement('style');\n style.textContent = elt.__resource;\n }\n // relay on HTMLImports for path fixup\n HTMLImports.path.resolveUrlsInStyle(style);\n style.textContent = ShadowCSS.shimStyle(style);\n style.removeAttribute(SHIM_ATTRIBUTE, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n style[SHIMMED_ATTRIBUTE] = true;\n // place in document\n if (style.parentNode !== head) {\n // replace links in head\n if (elt.parentNode === head) {\n head.replaceChild(style, elt);\n } else {\n this.addElementToDocument(style);\n }\n }\n style.__importParsed = true;\n this.markParsingComplete(elt);\n this.parseNext();\n }\n\n var hasResource = HTMLImports.parser.hasResource;\n HTMLImports.parser.hasResource = function(node) {\n if (node.localName === 'link' && node.rel === 'stylesheet' &&\n node.hasAttribute(SHIM_ATTRIBUTE)) {\n return (node.__resource);\n } else {\n return hasResource.call(this, node);\n }\n }\n\n }\n });\n}\n\n// exports\nscope.ShadowCSS = ShadowCSS;\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // so we can call wrap/unwrap without testing for ShadowDOMPolyfill\n window.wrap = window.unwrap = function(n){\n return n;\n }\n\n addEventListener('DOMContentLoaded', function() {\n if (CustomElements.useNative === false) {\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n }\n });\n\n})(window.Platform);\n","/* Any copyright is dedicated to the Public Domain.\n * http://creativecommons.org/publicdomain/zero/1.0/ */\n\n(function(scope) {\n 'use strict';\n\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n if (!scope.forceJURL) {\n try {\n var u = new URL('b', 'http://a');\n hasWorkingUrl = u.href === 'http://a/b';\n } catch(e) {}\n }\n\n if (hasWorkingUrl)\n return;\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['%2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping['%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRelativeScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n function invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n function IDNAToASCII(h) {\n if ('' == h) {\n invalid.call(this)\n }\n // XXX\n return h.toLowerCase()\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOverride, base) {\n function err(message) {\n errors.push(message)\n }\n\n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n errors = [];\n\n loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {\n var c = input[cursor];\n switch (state) {\n case 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else if (!stateOverride) {\n buffer = '';\n state = 'no scheme';\n continue;\n } else {\n err('Invalid scheme.');\n break loop;\n }\n break;\n\n case 'scheme':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme)) {\n this._isRelative = true;\n }\n if ('file' == this._scheme) {\n state = 'relative';\n } else if (this._isRelative && base && base._scheme == this._scheme) {\n state = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n state = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme';\n continue;\n } else if (EOF == c) {\n break loop;\n } else {\n err('Code point not allowed in scheme: ' + c)\n break loop;\n }\n break;\n\n case 'scheme data':\n if ('?' == c) {\n query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._schemeData += percentEscape(c);\n }\n }\n break;\n\n case 'no scheme':\n if (!base || !(isRelativeScheme(base._scheme))) {\n err('Missing scheme.');\n invalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or authority':\n if ('/' == c && '/' == input[cursor+1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, got: ' + c);\n state = 'relative';\n continue\n }\n break;\n\n case 'relative':\n this._isRelative = true;\n if ('file' != this._scheme)\n this._scheme = base._scheme;\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n break loop;\n } else if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c)\n err('\\\\ is an invalid code point.');\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._fragment = '#';\n state = 'fragment';\n } else {\n var nextC = input[cursor+1]\n var nextNextC = input[cursor+2]\n if (\n 'file' != this._scheme || !ALPHA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (EOF != nextNextC && '/' != nextNextC && '\\\\' != nextNextC && '?' != nextNextC && '#' != nextNextC)) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative slash':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._host = base._host;\n this._port = base._port;\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"Expected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority second slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c);\n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n (null !== this._password) ? this._password += tempC : this._username += tempC;\n }\n buffer = '';\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n cursor -= buffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {\n state = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid whitespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n if (stateOverride) {\n break loop;\n }\n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code point in host/hostname: ' + c);\n }\n break;\n\n case 'port':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c || stateOverride) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this._port = temp + '';\n }\n buffer = '';\n }\n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code point in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if ('\\\\' == c)\n err(\"'\\\\' not allowed in path.\");\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n continue;\n }\n break;\n\n case 'relative path':\n if (EOF == c || '/' == c || '\\\\' == c || (!stateOverride && ('?' == c || '#' == c))) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('');\n }\n } else if ('.' == buffer && '/' != c && '\\\\' != c) {\n this._path.push('');\n } else if ('.' != buffer) {\n if ('file' == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {\n buffer = buffer[0] + ':';\n }\n this._path.push(buffer);\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += percentEscapeQuery(c);\n }\n break;\n\n case 'fragment':\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor++;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._schemeData = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n this._fragment = '';\n this._isInvalid = false;\n this._isRelative = false;\n }\n\n // Does not process domain names or IP addresses.\n // Does not handle encoding for the query parameter.\n function jURL(url, base /* , encoding */) {\n if (base !== undefined && !(base instanceof jURL))\n base = new jURL(String(base));\n\n this._url = url;\n clear.call(this);\n\n var input = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.prototype = {\n get href() {\n if (this._isInvalid)\n return this._url;\n\n var authority = '';\n if ('' != this._username || null != this._password) {\n authority = this._username +\n (null != this._password ? ':' + this._password : '') + '@';\n }\n\n return this.protocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get protocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid)\n return;\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInvalid ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, host, 'host');\n },\n\n get hostname() {\n return this._host;\n },\n set hostname(hostname) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, hostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this._path.join('/') : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n get search() {\n return this._isInvalid || !this._query || '?' == this._query ?\n '' : this._query;\n },\n set search(search) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._query = '?';\n if ('?' == search[0])\n search = search.slice(1);\n parse.call(this, search, 'query');\n },\n\n get hash() {\n return this._isInvalid || !this._fragment || '#' == this._fragment ?\n '' : this._fragment;\n },\n set hash(hash) {\n if (this._isInvalid)\n return;\n this._fragment = '#';\n if ('#' == hash[0])\n hash = hash.slice(1);\n parse.call(this, hash, 'fragment');\n }\n };\n\n // Copy over the static methods\n var OriginalURL = scope.URL;\n if (OriginalURL) {\n jURL.createObjectURL = function(blob) {\n // IE extension allows a second optional options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh772302(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arguments);\n };\n jURL.revokeObjectURL = function(url) {\n OriginalURL.revokeObjectURL(url);\n };\n }\n\n scope.URL = jURL;\n\n})(this);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// Old versions of iOS do not have bind.\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function(scope) {\n var self = this;\n var args = Array.prototype.slice.call(arguments, 1);\n return function() {\n var args2 = args.slice();\n args2.push.apply(args2, arguments);\n return self.apply(scope, args2);\n };\n };\n}\n\n})(window.Platform);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(global) {\n\n var registrationsTable = new WeakMap();\n\n // We use setImmediate or postMessage for our future callback.\n var setImmediate = window.msSetImmediate;\n\n // Use post message to emulate setImmediate.\n if (!setImmediate) {\n var setImmediateQueue = [];\n var sentinel = String(Math.random());\n window.addEventListener('message', function(e) {\n if (e.data === sentinel) {\n var queue = setImmediateQueue;\n setImmediateQueue = [];\n queue.forEach(function(func) {\n func();\n });\n }\n });\n setImmediate = function(func) {\n setImmediateQueue.push(func);\n window.postMessage(sentinel, '*');\n };\n }\n\n // This is used to ensure that we never schedule 2 callas to setImmediate\n var isScheduled = false;\n\n // Keep track of observers that needs to be notified next time.\n var scheduledObservers = [];\n\n /**\n * Schedules |dispatchCallback| to be called in the future.\n * @param {MutationObserver} observer\n */\n function scheduleCallback(observer) {\n scheduledObservers.push(observer);\n if (!isScheduled) {\n isScheduled = true;\n setImmediate(dispatchCallbacks);\n }\n }\n\n function wrapIfNeeded(node) {\n return window.ShadowDOMPolyfill &&\n window.ShadowDOMPolyfill.wrapIfNeeded(node) ||\n node;\n }\n\n function dispatchCallbacks() {\n // http://dom.spec.whatwg.org/#mutation-observers\n\n isScheduled = false; // Used to allow a new setImmediate call above.\n\n var observers = scheduledObservers;\n scheduledObservers = [];\n // Sort observers based on their creation UID (incremental).\n observers.sort(function(o1, o2) {\n return o1.uid_ - o2.uid_;\n });\n\n var anyNonEmpty = false;\n observers.forEach(function(observer) {\n\n // 2.1, 2.2\n var queue = observer.takeRecords();\n // 2.3. Remove all transient registered observers whose observer is mo.\n removeTransientObserversFor(observer);\n\n // 2.4\n if (queue.length) {\n observer.callback_(queue, observer);\n anyNonEmpty = true;\n }\n });\n\n // 3.\n if (anyNonEmpty)\n dispatchCallbacks();\n }\n\n function removeTransientObserversFor(observer) {\n observer.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n registrations.forEach(function(registration) {\n if (registration.observer === observer)\n registration.removeTransientObservers();\n });\n });\n }\n\n /**\n * This function is used for the \"For each registered observer observer (with\n * observer's options as options) in target's list of registered observers,\n * run these substeps:\" and the \"For each ancestor ancestor of target, and for\n * each registered observer observer (with options options) in ancestor's list\n * of registered observers, run these substeps:\" part of the algorithms. The\n * |options.subtree| is checked to ensure that the callback is called\n * correctly.\n *\n * @param {Node} target\n * @param {function(MutationObserverInit):MutationRecord} callback\n */\n function forEachAncestorAndObserverEnqueueRecord(target, callback) {\n for (var node = target; node; node = node.parentNode) {\n var registrations = registrationsTable.get(node);\n\n if (registrations) {\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n\n // Only target ignores subtree.\n if (node !== target && !options.subtree)\n continue;\n\n var record = callback(options);\n if (record)\n registration.enqueue(record);\n }\n }\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function JsMutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n }\n\n JsMutationObserver.prototype = {\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n // 1.1\n if (!options.childList && !options.attributes && !options.characterData ||\n\n // 1.2\n options.attributeOldValue && !options.attributes ||\n\n // 1.3\n options.attributeFilter && options.attributeFilter.length &&\n !options.attributes ||\n\n // 1.4\n options.characterDataOldValue && !options.characterData) {\n\n throw new SyntaxError();\n }\n\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n // 2\n // If target's list of registered observers already includes a registered\n // observer associated with the context object, replace that registered\n // observer's options with options.\n var registration;\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n registration.removeListeners();\n registration.options = options;\n break;\n }\n }\n\n // 3.\n // Otherwise, add a new registered observer to target's list of registered\n // observers with the context object as the observer and options as the\n // options, and add target to context object's list of nodes on which it\n // is registered.\n if (!registration) {\n registration = new Registration(this, target, options);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n\n registration.addListeners();\n },\n\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registration.removeListeners();\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = [];\n this.removedNodes = [];\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n function copyMutationRecord(original) {\n var record = new MutationRecord(original.type, original.target);\n record.addedNodes = original.addedNodes.slice();\n record.removedNodes = original.removedNodes.slice();\n record.previousSibling = original.previousSibling;\n record.nextSibling = original.nextSibling;\n record.attributeName = original.attributeName;\n record.attributeNamespace = original.attributeNamespace;\n record.oldValue = original.oldValue;\n return record;\n };\n\n // We keep track of the two (possibly one) records used in a single mutation.\n var currentRecord, recordWithOldValue;\n\n /**\n * Creates a record without |oldValue| and caches it as |currentRecord| for\n * later use.\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecord(type, target) {\n return currentRecord = new MutationRecord(type, target);\n }\n\n /**\n * Gets or creates a record with |oldValue| based in the |currentRecord|\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecordWithOldValue(oldValue) {\n if (recordWithOldValue)\n return recordWithOldValue;\n recordWithOldValue = copyMutationRecord(currentRecord);\n recordWithOldValue.oldValue = oldValue;\n return recordWithOldValue;\n }\n\n function clearRecords() {\n currentRecord = recordWithOldValue = undefined;\n }\n\n /**\n * @param {MutationRecord} record\n * @return {boolean} Whether the record represents a record from the current\n * mutation event.\n */\n function recordRepresentsCurrentMutation(record) {\n return record === recordWithOldValue || record === currentRecord;\n }\n\n /**\n * Selects which record, if any, to replace the last record in the queue.\n * This returns |null| if no record should be replaced.\n *\n * @param {MutationRecord} lastRecord\n * @param {MutationRecord} newRecord\n * @param {MutationRecord}\n */\n function selectRecord(lastRecord, newRecord) {\n if (lastRecord === newRecord)\n return lastRecord;\n\n // Check if the the record we are adding represents the same record. If\n // so, we keep the one with the oldValue in it.\n if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord))\n return recordWithOldValue;\n\n return null;\n }\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverInit} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n enqueue: function(record) {\n var records = this.observer.records_;\n var length = records.length;\n\n // There are cases where we replace the last record with the new record.\n // For example if the record represents the same mutation we need to use\n // the one with the oldValue. If we get same record (this can happen as we\n // walk up the tree) we ignore the new record.\n if (records.length > 0) {\n var lastRecord = records[length - 1];\n var recordToReplaceLast = selectRecord(lastRecord, record);\n if (recordToReplaceLast) {\n records[length - 1] = recordToReplaceLast;\n return;\n }\n } else {\n scheduleCallback(this.observer);\n }\n\n records[length] = record;\n },\n\n addListeners: function() {\n this.addListeners_(this.target);\n },\n\n addListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.addEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.addEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.addEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.addEventListener('DOMNodeRemoved', this, true);\n },\n\n removeListeners: function() {\n this.removeListeners_(this.target);\n },\n\n removeListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.removeEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.removeEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.removeEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.removeEventListener('DOMNodeRemoved', this, true);\n },\n\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.addListeners_(node);\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n transientObservedNodes.forEach(function(node) {\n // Transient observers are never added to the target.\n this.removeListeners_(node);\n\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i] === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n },\n\n handleEvent: function(e) {\n // Stop propagation since we are managing the propagation manually.\n // This means that other mutation events on the page will not work\n // correctly but that is by design.\n e.stopImmediatePropagation();\n\n switch (e.type) {\n case 'DOMAttrModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-attributes\n\n var name = e.attrName;\n var namespace = e.relatedNode.namespaceURI;\n var target = e.target;\n\n // 1.\n var record = new getRecord('attributes', target);\n record.attributeName = name;\n record.attributeNamespace = namespace;\n\n // 2.\n var oldValue =\n e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.attributes)\n return;\n\n // 3.2, 4.3\n if (options.attributeFilter && options.attributeFilter.length &&\n options.attributeFilter.indexOf(name) === -1 &&\n options.attributeFilter.indexOf(namespace) === -1) {\n return;\n }\n // 3.3, 4.4\n if (options.attributeOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.4, 4.5\n return record;\n });\n\n break;\n\n case 'DOMCharacterDataModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-characterdata\n var target = e.target;\n\n // 1.\n var record = getRecord('characterData', target);\n\n // 2.\n var oldValue = e.prevValue;\n\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.characterData)\n return;\n\n // 3.2, 4.3\n if (options.characterDataOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.3, 4.4\n return record;\n });\n\n break;\n\n case 'DOMNodeRemoved':\n this.addTransientObserver(e.target);\n // Fall through.\n case 'DOMNodeInserted':\n // http://dom.spec.whatwg.org/#concept-mo-queue-childlist\n var target = e.relatedNode;\n var changedNode = e.target;\n var addedNodes, removedNodes;\n if (e.type === 'DOMNodeInserted') {\n addedNodes = [changedNode];\n removedNodes = [];\n } else {\n\n addedNodes = [];\n removedNodes = [changedNode];\n }\n var previousSibling = changedNode.previousSibling;\n var nextSibling = changedNode.nextSibling;\n\n // 1.\n var record = getRecord('childList', target);\n record.addedNodes = addedNodes;\n record.removedNodes = removedNodes;\n record.previousSibling = previousSibling;\n record.nextSibling = nextSibling;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 2.1, 3.2\n if (!options.childList)\n return;\n\n // 2.2, 3.3\n return record;\n });\n\n }\n\n clearRecords();\n }\n };\n\n global.JsMutationObserver = JsMutationObserver;\n\n if (!global.MutationObserver)\n global.MutationObserver = JsMutationObserver;\n\n\n})(this);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nwindow.HTMLImports = window.HTMLImports || {flags:{}};","/*\r\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\r\n */\r\n\r\n(function(scope) {\r\n\r\nvar hasNative = ('import' in document.createElement('link'));\r\nvar useNative = hasNative;\r\n\r\nisIE = /Trident/.test(navigator.userAgent);\r\n\r\n// TODO(sorvell): SD polyfill intrusion\r\nvar hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);\r\nvar wrap = function(node) {\r\n return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;\r\n};\r\nvar mainDoc = wrap(document);\r\n \r\n// NOTE: We cannot polyfill document.currentScript because it's not possible\r\n// both to override and maintain the ability to capture the native value;\r\n// therefore we choose to expose _currentScript both when native imports\r\n// and the polyfill are in use.\r\nvar currentScriptDescriptor = {\r\n get: function() {\r\n var script = HTMLImports.currentScript || document.currentScript ||\r\n // NOTE: only works when called in synchronously executing code.\r\n // readyState should check if `loading` but IE10 is \r\n // interactive when scripts run so we cheat.\r\n (document.readyState !== 'complete' ? \r\n document.scripts[document.scripts.length - 1] : null);\r\n return wrap(script);\r\n },\r\n configurable: true\r\n};\r\n\r\nObject.defineProperty(document, '_currentScript', currentScriptDescriptor);\r\nObject.defineProperty(mainDoc, '_currentScript', currentScriptDescriptor);\r\n\r\n// call a callback when all HTMLImports in the document at call (or at least\r\n// document ready) time have loaded.\r\n// 1. ensure the document is in a ready state (has dom), then \r\n// 2. watch for loading of imports and call callback when done\r\nfunction whenImportsReady(callback, doc) {\r\n doc = doc || mainDoc;\r\n // if document is loading, wait and try again\r\n whenDocumentReady(function() {\r\n watchImportsLoad(callback, doc);\r\n }, doc);\r\n}\r\n\r\n// call the callback when the document is in a ready state (has dom)\r\nvar requiredReadyState = isIE ? 'complete' : 'interactive';\r\nvar READY_EVENT = 'readystatechange';\r\nfunction isDocumentReady(doc) {\r\n return (doc.readyState === 'complete' ||\r\n doc.readyState === requiredReadyState);\r\n}\r\n\r\n// call <callback> when we ensure the document is in a ready state\r\nfunction whenDocumentReady(callback, doc) {\r\n if (!isDocumentReady(doc)) {\r\n var checkReady = function() {\r\n if (doc.readyState === 'complete' || \r\n doc.readyState === requiredReadyState) {\r\n doc.removeEventListener(READY_EVENT, checkReady);\r\n whenDocumentReady(callback, doc);\r\n }\r\n };\r\n doc.addEventListener(READY_EVENT, checkReady);\r\n } else if (callback) {\r\n callback();\r\n }\r\n}\r\n\r\nfunction markTargetLoaded(event) {\r\n event.target.__loaded = true;\r\n}\r\n\r\n// call <callback> when we ensure all imports have loaded\r\nfunction watchImportsLoad(callback, doc) {\r\n var imports = doc.querySelectorAll('link[rel=import]');\r\n var loaded = 0, l = imports.length;\r\n function checkDone(d) { \r\n if (loaded == l) {\r\n callback && callback();\r\n }\r\n }\r\n function loadedImport(e) {\r\n markTargetLoaded(e);\r\n loaded++;\r\n checkDone();\r\n }\r\n if (l) {\r\n for (var i=0, imp; (i<l) && (imp=imports[i]); i++) {\r\n if (isImportLoaded(imp)) {\r\n loadedImport.call(imp, {target: imp});\r\n } else {\r\n imp.addEventListener('load', loadedImport);\r\n imp.addEventListener('error', loadedImport);\r\n }\r\n }\r\n } else {\r\n checkDone();\r\n }\r\n}\r\n\r\n// NOTE: test for native imports loading is based on explicitly watching\r\n// all imports (see below).\r\n// We cannot rely on this entirely without watching the entire document\r\n// for import links. For perf reasons, currently only head is watched.\r\n// Instead, we fallback to checking if the import property is available \r\n// and the document is not itself loading. \r\nfunction isImportLoaded(link) {\r\n return useNative ? link.__loaded || \r\n (link.import && link.import.readyState !== 'loading') :\r\n link.__importParsed;\r\n}\r\n\r\n// TODO(sorvell): Workaround for \r\n// https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007, should be removed when\r\n// this bug is addressed.\r\n// (1) Install a mutation observer to see when HTMLImports have loaded\r\n// (2) if this script is run during document load it will watch any existing\r\n// imports for loading.\r\n//\r\n// NOTE: The workaround has restricted functionality: (1) it's only compatible\r\n// with imports that are added to document.head since the mutation observer \r\n// watches only head for perf reasons, (2) it requires this script\r\n// to run before any imports have completed loading.\r\nif (useNative) {\r\n new MutationObserver(function(mxns) {\r\n for (var i=0, l=mxns.length, m; (i < l) && (m=mxns[i]); i++) {\r\n if (m.addedNodes) {\r\n handleImports(m.addedNodes);\r\n }\r\n }\r\n }).observe(document.head, {childList: true});\r\n\r\n function handleImports(nodes) {\r\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\r\n if (isImport(n)) {\r\n handleImport(n); \r\n }\r\n }\r\n }\r\n\r\n function isImport(element) {\r\n return element.localName === 'link' && element.rel === 'import';\r\n }\r\n\r\n function handleImport(element) {\r\n var loaded = element.import;\r\n if (loaded) {\r\n markTargetLoaded({target: element});\r\n } else {\r\n element.addEventListener('load', markTargetLoaded);\r\n element.addEventListener('error', markTargetLoaded);\r\n }\r\n }\r\n\r\n // make sure to catch any imports that are in the process of loading\r\n // when this script is run.\r\n (function() {\r\n if (document.readyState === 'loading') {\r\n var imports = document.querySelectorAll('link[rel=import]');\r\n for (var i=0, l=imports.length, imp; (i<l) && (imp=imports[i]); i++) {\r\n handleImport(imp);\r\n }\r\n }\r\n })();\r\n\r\n}\r\n\r\n// Fire the 'HTMLImportsLoaded' event when imports in document at load time \r\n// have loaded. This event is required to simulate the script blocking \r\n// behavior of native imports. A main document script that needs to be sure\r\n// imports have loaded should wait for this event.\r\nwhenImportsReady(function() {\r\n HTMLImports.ready = true;\r\n HTMLImports.readyTime = new Date().getTime();\r\n mainDoc.dispatchEvent(\r\n new CustomEvent('HTMLImportsLoaded', {bubbles: true})\r\n );\r\n});\r\n\r\n// exports\r\nscope.useNative = useNative;\r\nscope.isImportLoaded = isImportLoaded;\r\nscope.whenReady = whenImportsReady;\r\nscope.isIE = isIE;\r\n\r\n// deprecated\r\nscope.whenImportsReady = whenImportsReady;\r\n\r\n})(window.HTMLImports);","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(scope) {\n\n // imports\n var path = scope.path;\n var xhr = scope.xhr;\n var flags = scope.flags;\n\n // TODO(sorvell): this loader supports a dynamic list of urls\n // and an oncomplete callback that is called when the loader is done.\n // The polyfill currently does *not* need this dynamism or the onComplete\n // concept. Because of this, the loader could be simplified quite a bit.\n var Loader = function(onLoad, onComplete) {\n this.cache = {};\n this.onload = onLoad;\n this.oncomplete = onComplete;\n this.inflight = 0;\n this.pending = {};\n };\n\n Loader.prototype = {\n addNodes: function(nodes) {\n // number of transactions to complete\n this.inflight += nodes.length;\n // commence transactions\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n this.require(n);\n }\n // anything to do?\n this.checkDone();\n },\n addNode: function(node) {\n // number of transactions to complete\n this.inflight++;\n // commence transactions\n this.require(node);\n // anything to do?\n this.checkDone();\n },\n require: function(elt) {\n var url = elt.src || elt.href;\n // ensure we have a standard url that can be used\n // reliably for deduping.\n // TODO(sjmiles): ad-hoc\n elt.__nodeUrl = url;\n // deduplication\n if (!this.dedupe(url, elt)) {\n // fetch this resource\n this.fetch(url, elt);\n }\n },\n dedupe: function(url, elt) {\n if (this.pending[url]) {\n // add to list of nodes waiting for inUrl\n this.pending[url].push(elt);\n // don't need fetch\n return true;\n }\n var resource;\n if (this.cache[url]) {\n this.onload(url, elt, this.cache[url]);\n // finished this transaction\n this.tail();\n // don't need fetch\n return true;\n }\n // first node waiting for inUrl\n this.pending[url] = [elt];\n // need fetch (not a dupe)\n return false;\n },\n fetch: function(url, elt) {\n flags.load && console.log('fetch', url, elt);\n if (url.match(/^data:/)) {\n // Handle Data URI Scheme\n var pieces = url.split(',');\n var header = pieces[0];\n var body = pieces[1];\n if(header.indexOf(';base64') > -1) {\n body = atob(body);\n } else {\n body = decodeURIComponent(body);\n }\n setTimeout(function() {\n this.receive(url, elt, null, body);\n }.bind(this), 0);\n } else {\n var receiveXhr = function(err, resource, redirectedUrl) {\n this.receive(url, elt, err, resource, redirectedUrl);\n }.bind(this);\n xhr.load(url, receiveXhr);\n // TODO(sorvell): blocked on)\n // https://code.google.com/p/chromium/issues/detail?id=257221\n // xhr'ing for a document makes scripts in imports runnable; otherwise\n // they are not; however, it requires that we have doctype=html in\n // the import which is unacceptable. This is only needed on Chrome\n // to avoid the bug above.\n /*\n if (isDocumentLink(elt)) {\n xhr.loadDocument(url, receiveXhr);\n } else {\n xhr.load(url, receiveXhr);\n }\n */\n }\n },\n receive: function(url, elt, err, resource, redirectedUrl) {\n this.cache[url] = resource;\n var $p = this.pending[url];\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\n // If url was redirected, use the redirected location so paths are\n // calculated relative to that.\n this.onload(url, p, resource, err, redirectedUrl);\n this.tail();\n }\n this.pending[url] = null;\n },\n tail: function() {\n --this.inflight;\n this.checkDone();\n },\n checkDone: function() {\n if (!this.inflight) {\n this.oncomplete();\n }\n }\n };\n\n xhr = xhr || {\n async: true,\n ok: function(request) {\n return (request.status >= 200 && request.status < 300)\n || (request.status === 304)\n || (request.status === 0);\n },\n load: function(url, next, nextContext) {\n var request = new XMLHttpRequest();\n if (scope.flags.debug || scope.flags.bust) {\n url += '?' + Math.random();\n }\n request.open('GET', url, xhr.async);\n request.addEventListener('readystatechange', function(e) {\n if (request.readyState === 4) {\n // Servers redirecting an import can add a Location header to help us\n // polyfill correctly.\n var locationHeader = request.getResponseHeader(\"Location\");\n var redirectedUrl = null;\n if (locationHeader) {\n var redirectedUrl = (locationHeader.substr( 0, 1 ) === \"/\")\n ? location.origin + locationHeader // Location is a relative path\n : locationHeader; // Full path\n }\n next.call(nextContext, !xhr.ok(request) && request,\n request.response || request.responseText, redirectedUrl);\n }\n });\n request.send();\n return request;\n },\n loadDocument: function(url, next, nextContext) {\n this.load(url, next, nextContext).responseType = 'document';\n }\n };\n\n // exports\n scope.xhr = xhr;\n scope.Loader = Loader;\n\n})(window.HTMLImports);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(scope) {\n\nvar IMPORT_LINK_TYPE = 'import';\nvar flags = scope.flags;\nvar isIE = scope.isIE;\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// importParser\n// highlander object to manage parsing of imports\n// parses import related elements\n// and ensures proper parse order\n// parse order is enforced by crawling the tree and monitoring which elements\n// have been parsed; async parsing is also supported.\n\n// highlander object for parsing a document tree\nvar importParser = {\n // parse selectors for main document elements\n documentSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // parse selectors for import document elements\n importsSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']',\n 'link[rel=stylesheet]',\n 'style',\n 'script:not([type])',\n 'script[type=\"text/javascript\"]'\n ].join(','),\n map: {\n link: 'parseLink',\n script: 'parseScript',\n style: 'parseStyle'\n },\n // try to parse the next import in the tree\n parseNext: function() {\n var next = this.nextToParse();\n if (next) {\n this.parse(next);\n }\n },\n parse: function(elt) {\n if (this.isParsed(elt)) {\n flags.parse && console.log('[%s] is already parsed', elt.localName);\n return;\n }\n var fn = this[this.map[elt.localName]];\n if (fn) {\n this.markParsing(elt);\n fn.call(this, elt);\n }\n },\n // only 1 element may be parsed at a time; parsing is async so each\n // parsing implementation must inform the system that parsing is complete\n // via markParsingComplete.\n // To prompt the system to parse the next element, parseNext should then be\n // called.\n // Note, parseNext used to be included at the end of markParsingComplete, but\n // we must not do this so that, for example, we can (1) mark parsing complete \n // then (2) fire an import load event, and then (3) parse the next resource.\n markParsing: function(elt) {\n flags.parse && console.log('parsing', elt);\n this.parsingElement = elt;\n },\n markParsingComplete: function(elt) {\n elt.__importParsed = true;\n if (elt.__importElement) {\n elt.__importElement.__importParsed = true;\n }\n this.parsingElement = null;\n flags.parse && console.log('completed', elt);\n },\n invalidateParse: function(doc) {\n if (doc && doc.__importLink) {\n doc.__importParsed = doc.__importLink.__importParsed = false;\n this.parseSoon();\n }\n },\n parseSoon: function() {\n if (this._parseSoon) {\n cancelAnimationFrame(this._parseDelay);\n }\n var parser = this;\n this._parseSoon = requestAnimationFrame(function() {\n parser.parseNext();\n });\n },\n parseImport: function(elt) {\n // TODO(sorvell): consider if there's a better way to do this;\n // expose an imports parsing hook; this is needed, for example, by the\n // CustomElements polyfill.\n if (HTMLImports.__importsParsingHook) {\n HTMLImports.__importsParsingHook(elt);\n }\n if (elt.import) {\n elt.import.__importParsed = true;\n }\n this.markParsingComplete(elt);\n // fire load event\n if (elt.__resource && !elt.__error) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false})); \n } else {\n elt.dispatchEvent(new CustomEvent('error', {bubbles: false}));\n }\n // TODO(sorvell): workaround for Safari addEventListener not working\n // for elements not in the main document.\n if (elt.__pending) {\n var fn;\n while (elt.__pending.length) {\n fn = elt.__pending.shift();\n if (fn) {\n fn({target: elt});\n }\n }\n }\n this.parseNext();\n },\n parseLink: function(linkElt) {\n if (nodeIsImport(linkElt)) {\n this.parseImport(linkElt);\n } else {\n // make href absolute\n linkElt.href = linkElt.href;\n this.parseGeneric(linkElt);\n }\n },\n parseStyle: function(elt) {\n // TODO(sorvell): style element load event can just not fire so clone styles\n var src = elt;\n elt = cloneStyle(elt);\n elt.__importElement = src;\n this.parseGeneric(elt);\n },\n parseGeneric: function(elt) {\n this.trackElement(elt);\n this.addElementToDocument(elt);\n },\n rootImportForElement: function(elt) {\n var n = elt;\n while (n.ownerDocument.__importLink) {\n n = n.ownerDocument.__importLink;\n }\n return n;\n },\n addElementToDocument: function(elt) {\n var port = this.rootImportForElement(elt.__importElement || elt);\n var l = port.__insertedElements = port.__insertedElements || 0;\n var refNode = port.nextElementSibling;\n for (var i=0; i < l; i++) {\n refNode = refNode && refNode.nextElementSibling;\n }\n port.parentNode.insertBefore(elt, refNode);\n },\n // tracks when a loadable element has loaded\n trackElement: function(elt, callback) {\n var self = this;\n var done = function(e) {\n if (callback) {\n callback(e);\n }\n self.markParsingComplete(elt);\n self.parseNext();\n };\n elt.addEventListener('load', done);\n elt.addEventListener('error', done);\n\n // NOTE: IE does not fire \"load\" event for styles that have already loaded\n // This is in violation of the spec, so we try our hardest to work around it\n if (isIE && elt.localName === 'style') {\n var fakeLoad = false;\n // If there's not @import in the textContent, assume it has loaded\n if (elt.textContent.indexOf('@import') == -1) {\n fakeLoad = true;\n // if we have a sheet, we have been parsed\n } else if (elt.sheet) {\n fakeLoad = true;\n var csr = elt.sheet.cssRules;\n var len = csr ? csr.length : 0;\n // search the rules for @import's\n for (var i = 0, r; (i < len) && (r = csr[i]); i++) {\n if (r.type === CSSRule.IMPORT_RULE) {\n // if every @import has resolved, fake the load\n fakeLoad = fakeLoad && Boolean(r.styleSheet);\n }\n }\n }\n // dispatch a fake load event and continue parsing\n if (fakeLoad) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false}));\n }\n }\n },\n // NOTE: execute scripts by injecting them and watching for the load/error\n // event. Inline scripts are handled via dataURL's because browsers tend to\n // provide correct parsing errors in this case. If this has any compatibility\n // issues, we can switch to injecting the inline script with textContent.\n // Scripts with dataURL's do not appear to generate load events and therefore\n // we assume they execute synchronously.\n parseScript: function(scriptElt) {\n var script = document.createElement('script');\n script.__importElement = scriptElt;\n script.src = scriptElt.src ? scriptElt.src : \n generateScriptDataUrl(scriptElt);\n scope.currentScript = scriptElt;\n this.trackElement(script, function(e) {\n script.parentNode.removeChild(script);\n scope.currentScript = null; \n });\n this.addElementToDocument(script);\n },\n // determine the next element in the tree which should be parsed\n nextToParse: function() {\n this._mayParse = [];\n return !this.parsingElement && this.nextToParseInDoc(mainDoc);\n },\n nextToParseInDoc: function(doc, link) {\n // use `marParse` list to avoid looping into the same document again\n // since it could cause an iloop.\n if (doc && this._mayParse.indexOf(doc) < 0) {\n this._mayParse.push(doc);\n var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));\n for (var i=0, l=nodes.length, p=0, n; (i<l) && (n=nodes[i]); i++) {\n if (!this.isParsed(n)) {\n if (this.hasResource(n)) {\n return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;\n } else {\n return;\n }\n }\n }\n }\n // all nodes have been parsed, ready to parse import, if any\n return link;\n },\n // return the set of parse selectors relevant for this node.\n parseSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentSelectors : this.importsSelectors;\n },\n isParsed: function(node) {\n return node.__importParsed;\n },\n hasResource: function(node) {\n if (nodeIsImport(node) && (node.import === undefined)) {\n return false;\n }\n return true;\n }\n};\n\nfunction nodeIsImport(elt) {\n return (elt.localName === 'link') && (elt.rel === IMPORT_LINK_TYPE);\n}\n\nfunction generateScriptDataUrl(script) {\n var scriptContent = generateScriptContent(script);\n return 'data:text/javascript;charset=utf-8,' + encodeURIComponent(scriptContent);\n}\n\nfunction generateScriptContent(script) {\n return script.textContent + generateSourceMapHint(script);\n}\n\n// calculate source map hint\nfunction generateSourceMapHint(script) {\n var moniker = script.__nodeUrl;\n if (!moniker) {\n moniker = script.ownerDocument.baseURI;\n // there could be more than one script this url\n var tag = '[' + Math.floor((Math.random()+1)*1000) + ']';\n // TODO(sjmiles): Polymer hack, should be pluggable if we need to allow \n // this sort of thing\n var matches = script.textContent.match(/Polymer\\(['\"]([^'\"]*)/);\n tag = matches && matches[1] || tag;\n // tag the moniker\n moniker += '/' + tag + '.js';\n }\n return '\\n//# sourceURL=' + moniker + '\\n';\n}\n\n// style/stylesheet handling\n\n// clone style with proper path resolution for main document\n// NOTE: styles are the only elements that require direct path fixup.\nfunction cloneStyle(style) {\n var clone = style.ownerDocument.createElement('style');\n clone.textContent = style.textContent;\n path.resolveUrlsInStyle(clone);\n return clone;\n}\n\n// path fixup: style elements in imports must be made relative to the main \n// document. We fixup url's in url() and @import.\nvar CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\nvar CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\n\nvar path = {\n resolveUrlsInStyle: function(style) {\n var doc = style.ownerDocument;\n var resolver = doc.createElement('a');\n style.textContent = this.resolveUrlsInCssText(style.textContent, resolver);\n return style; \n },\n resolveUrlsInCssText: function(cssText, urlObj) {\n var r = this.replaceUrls(cssText, urlObj, CSS_URL_REGEXP);\n r = this.replaceUrls(r, urlObj, CSS_IMPORT_REGEXP);\n return r;\n },\n replaceUrls: function(text, urlObj, regexp) {\n return text.replace(regexp, function(m, pre, url, post) {\n var urlPath = url.replace(/[\"']/g, '');\n urlObj.href = urlPath;\n urlPath = urlObj.href;\n return pre + '\\'' + urlPath + '\\'' + post;\n }); \n }\n}\n\n// exports\nscope.parser = importParser;\nscope.path = path;\n\n})(HTMLImports);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n (function(scope) {\n\nvar useNative = scope.useNative;\nvar flags = scope.flags;\nvar IMPORT_LINK_TYPE = 'import';\n\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\nif (!useNative) {\n\n // imports\n var xhr = scope.xhr;\n var Loader = scope.Loader;\n var parser = scope.parser;\n\n // importer\n // highlander object to manage loading of imports\n\n // for any document, importer:\n // - loads any linked import documents (with deduping)\n\n var importer = {\n documents: {},\n // nodes to load in the mian document\n documentPreloadSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // nodes to load in imports\n importsPreloadSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ].join(','),\n loadNode: function(node) {\n importLoader.addNode(node);\n },\n // load all loadable elements within the parent element\n loadSubtree: function(parent) {\n var nodes = this.marshalNodes(parent);\n // add these nodes to loader's queue\n importLoader.addNodes(nodes);\n },\n marshalNodes: function(parent) {\n // all preloadable nodes in inDocument\n return parent.querySelectorAll(this.loadSelectorsForNode(parent));\n },\n // find the proper set of load selectors for a given node\n loadSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentPreloadSelectors :\n this.importsPreloadSelectors;\n },\n loaded: function(url, elt, resource, err, redirectedUrl) {\n flags.load && console.log('loaded', url, elt);\n // store generic resource\n // TODO(sorvell): fails for nodes inside <template>.content\n // see https://code.google.com/p/chromium/issues/detail?id=249381.\n elt.__resource = resource;\n elt.__error = err;\n if (isDocumentLink(elt)) {\n var doc = this.documents[url];\n // if we've never seen a document at this url\n if (doc === undefined) {\n // generate an HTMLDocument from data\n doc = err ? null : makeDocument(resource, redirectedUrl || url);\n if (doc) {\n doc.__importLink = elt;\n // note, we cannot use MO to detect parsed nodes because\n // SD polyfill does not report these as mutations.\n this.bootDocument(doc);\n }\n // cache document\n this.documents[url] = doc;\n }\n // don't store import record until we're actually loaded\n // store document resource\n elt.import = doc;\n }\n parser.parseNext();\n },\n bootDocument: function(doc) {\n this.loadSubtree(doc);\n this.observe(doc);\n parser.parseNext();\n },\n loadedAll: function() {\n parser.parseNext();\n }\n };\n\n // loader singleton\n var importLoader = new Loader(importer.loaded.bind(importer), \n importer.loadedAll.bind(importer));\n\n function isDocumentLink(elt) {\n return isLinkRel(elt, IMPORT_LINK_TYPE);\n }\n\n function isLinkRel(elt, rel) {\n return elt.localName === 'link' && elt.getAttribute('rel') === rel;\n }\n\n function isScript(elt) {\n return elt.localName === 'script';\n }\n\n function makeDocument(resource, url) {\n // create a new HTML document\n var doc = resource;\n if (!(doc instanceof Document)) {\n doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);\n }\n // cache the new document's source url\n doc._URL = url;\n // establish a relative path via <base>\n var base = doc.createElement('base');\n base.setAttribute('href', url);\n // add baseURI support to browsers (IE) that lack it.\n if (!doc.baseURI) {\n doc.baseURI = url;\n }\n // ensure UTF-8 charset\n var meta = doc.createElement('meta');\n meta.setAttribute('charset', 'utf-8');\n\n doc.head.appendChild(meta);\n doc.head.appendChild(base);\n // install HTML last as it may trigger CustomElement upgrades\n // TODO(sjmiles): problem wrt to template boostrapping below,\n // template bootstrapping must (?) come before element upgrade\n // but we cannot bootstrap templates until they are in a document\n // which is too late\n if (!(resource instanceof Document)) {\n // install html\n doc.body.innerHTML = resource;\n }\n // TODO(sorvell): ideally this code is not aware of Template polyfill,\n // but for now the polyfill needs help to bootstrap these templates\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(doc);\n }\n return doc;\n }\n\n // Polyfill document.baseURI for browsers without it.\n if (!document.baseURI) {\n var baseURIDescriptor = {\n get: function() {\n var base = document.querySelector('base');\n return base ? base.href : window.location.href;\n },\n configurable: true\n };\n\n Object.defineProperty(document, 'baseURI', baseURIDescriptor);\n Object.defineProperty(mainDoc, 'baseURI', baseURIDescriptor);\n }\n\n // IE shim for CustomEvent\n if (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType, dictionary) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType,\n dictionary.bubbles === false ? false : true,\n dictionary.cancelable === false ? false : true,\n dictionary.detail);\n return e;\n };\n }\n\n} else {\n // do nothing if using native imports\n var importer = {};\n}\n\n// exports\nscope.importer = importer;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\nscope.importLoader = importLoader;\n\n\n})(window.HTMLImports);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(scope){\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\nvar importSelector = 'link[rel=' + IMPORT_LINK_TYPE + ']';\nvar importer = scope.importer;\nvar parser = scope.parser;\n\n// we track mutations for addedNodes, looking for imports\nfunction handler(mutations) {\n for (var i=0, l=mutations.length, m; (i<l) && (m=mutations[i]); i++) {\n if (m.type === 'childList' && m.addedNodes.length) {\n addedNodes(m.addedNodes);\n }\n }\n}\n\n// find loadable elements and add them to the importer\nfunction addedNodes(nodes) {\n var owner;\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n owner = owner || n.ownerDocument;\n if (shouldLoadNode(n)) {\n importer.loadNode(n);\n }\n if (n.children && n.children.length) {\n addedNodes(n.children);\n }\n }\n // TODO(sorvell): This is not the right approach here. We shouldn't need to\n // invalidate parsing when an element is added. Disabling this code \n // until a better approach is found.\n /*\n if (owner) {\n parser.invalidateParse(owner);\n }\n */\n}\n\nfunction shouldLoadNode(node) {\n return (node.nodeType === 1) && matches.call(node,\n importer.loadSelectorsForNode(node));\n}\n\n// x-plat matches\nvar matches = HTMLElement.prototype.matches || \n HTMLElement.prototype.matchesSelector || \n HTMLElement.prototype.webkitMatchesSelector ||\n HTMLElement.prototype.mozMatchesSelector ||\n HTMLElement.prototype.msMatchesSelector;\n\nvar observer = new MutationObserver(handler);\n\n// observe the given root for loadable elements\nfunction observe(root) {\n observer.observe(root, {childList: true, subtree: true});\n}\n\n// exports\n// TODO(sorvell): factor so can put on scope\nscope.observe = observe;\nimporter.observe = observe;\n\n})(HTMLImports);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(){\n\n// bootstrap\n\n// TODO(sorvell): SD polyfill intrusion\nvar doc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// no need to bootstrap the polyfill when native imports is available.\nif (!HTMLImports.useNative) {\n function bootstrap() {\n HTMLImports.importer.bootDocument(doc);\n }\n \n // TODO(sorvell): SD polyfill does *not* generate mutations for nodes added\n // by the parser. For this reason, we must wait until the dom exists to \n // bootstrap.\n if (document.readyState === 'complete' ||\n (document.readyState === 'interactive' && !window.attachEvent)) {\n bootstrap();\n } else {\n document.addEventListener('DOMContentLoaded', bootstrap);\n }\n}\n\n})();\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nwindow.CustomElements = window.CustomElements || {flags:{}};","/*\r\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\r\n */\r\n\r\n(function(scope){\r\n\r\nvar logFlags = window.logFlags || {};\r\nvar IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : 'none';\r\n\r\n// walk the subtree rooted at node, applying 'find(element, data)' function\r\n// to each element\r\n// if 'find' returns true for 'element', do not search element's subtree\r\nfunction findAll(node, find, data) {\r\n var e = node.firstElementChild;\r\n if (!e) {\r\n e = node.firstChild;\r\n while (e && e.nodeType !== Node.ELEMENT_NODE) {\r\n e = e.nextSibling;\r\n }\r\n }\r\n while (e) {\r\n if (find(e, data) !== true) {\r\n findAll(e, find, data);\r\n }\r\n e = e.nextElementSibling;\r\n }\r\n return null;\r\n}\r\n\r\n// walk all shadowRoots on a given node.\r\nfunction forRoots(node, cb) {\r\n var root = node.shadowRoot;\r\n while(root) {\r\n forSubtree(root, cb);\r\n root = root.olderShadowRoot;\r\n }\r\n}\r\n\r\n// walk the subtree rooted at node, including descent into shadow-roots,\r\n// applying 'cb' to each element\r\nfunction forSubtree(node, cb) {\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.group('subTree: ', node);\r\n findAll(node, function(e) {\r\n if (cb(e)) {\r\n return true;\r\n }\r\n forRoots(e, cb);\r\n });\r\n forRoots(node, cb);\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.groupEnd();\r\n}\r\n\r\n// manage lifecycle on added node\r\nfunction added(node) {\r\n if (upgrade(node)) {\r\n insertedNode(node);\r\n return true;\r\n }\r\n inserted(node);\r\n}\r\n\r\n// manage lifecycle on added node's subtree only\r\nfunction addedSubtree(node) {\r\n forSubtree(node, function(e) {\r\n if (added(e)) {\r\n return true;\r\n }\r\n });\r\n}\r\n\r\n// manage lifecycle on added node and it's subtree\r\nfunction addedNode(node) {\r\n return added(node) || addedSubtree(node);\r\n}\r\n\r\n// upgrade custom elements at node, if applicable\r\nfunction upgrade(node) {\r\n if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {\r\n var type = node.getAttribute('is') || node.localName;\r\n var definition = scope.registry[type];\r\n if (definition) {\r\n logFlags.dom && console.group('upgrade:', node.localName);\r\n scope.upgrade(node);\r\n logFlags.dom && console.groupEnd();\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nfunction insertedNode(node) {\r\n inserted(node);\r\n if (inDocument(node)) {\r\n forSubtree(node, function(e) {\r\n inserted(e);\r\n });\r\n }\r\n}\r\n\r\n// TODO(sorvell): on platforms without MutationObserver, mutations may not be\r\n// reliable and therefore attached/detached are not reliable.\r\n// To make these callbacks less likely to fail, we defer all inserts and removes\r\n// to give a chance for elements to be inserted into dom.\r\n// This ensures attachedCallback fires for elements that are created and\r\n// immediately added to dom.\r\nvar hasPolyfillMutations = (!window.MutationObserver ||\r\n (window.MutationObserver === window.JsMutationObserver));\r\nscope.hasPolyfillMutations = hasPolyfillMutations;\r\n\r\nvar isPendingMutations = false;\r\nvar pendingMutations = [];\r\nfunction deferMutation(fn) {\r\n pendingMutations.push(fn);\r\n if (!isPendingMutations) {\r\n isPendingMutations = true;\r\n var async = (window.Platform && window.Platform.endOfMicrotask) ||\r\n setTimeout;\r\n async(takeMutations);\r\n }\r\n}\r\n\r\nfunction takeMutations() {\r\n isPendingMutations = false;\r\n var $p = pendingMutations;\r\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\r\n p();\r\n }\r\n pendingMutations = [];\r\n}\r\n\r\nfunction inserted(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _inserted(element);\r\n });\r\n } else {\r\n _inserted(element);\r\n }\r\n}\r\n\r\n// TODO(sjmiles): if there are descents into trees that can never have inDocument(*) true, fix this\r\nfunction _inserted(element) {\r\n // TODO(sjmiles): it's possible we were inserted and removed in the space\r\n // of one microtask, in which case we won't be 'inDocument' here\r\n // But there are other cases where we are testing for inserted without\r\n // specific knowledge of mutations, and must test 'inDocument' to determine\r\n // whether to call inserted\r\n // If we can factor these cases into separate code paths we can have\r\n // better diagnostics.\r\n // TODO(sjmiles): when logging, do work on all custom elements so we can\r\n // track behavior even when callbacks not defined\r\n //console.log('inserted: ', element.localName);\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('inserted:', element.localName);\r\n if (inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) + 1;\r\n // if we are in a 'removed' state, bluntly adjust to an 'inserted' state\r\n if (element.__inserted < 1) {\r\n element.__inserted = 1;\r\n }\r\n // if we are 'over inserted', squelch the callback\r\n if (element.__inserted > 1) {\r\n logFlags.dom && console.warn('inserted:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.attachedCallback) {\r\n logFlags.dom && console.log('inserted:', element.localName);\r\n element.attachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\nfunction removedNode(node) {\r\n removed(node);\r\n forSubtree(node, function(e) {\r\n removed(e);\r\n });\r\n}\r\n\r\nfunction removed(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _removed(element);\r\n });\r\n } else {\r\n _removed(element);\r\n }\r\n}\r\n\r\nfunction _removed(element) {\r\n // TODO(sjmiles): temporary: do work on all custom elements so we can track\r\n // behavior even when callbacks not defined\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('removed:', element.localName);\r\n if (!inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) - 1;\r\n // if we are in a 'inserted' state, bluntly adjust to an 'removed' state\r\n if (element.__inserted > 0) {\r\n element.__inserted = 0;\r\n }\r\n // if we are 'over removed', squelch the callback\r\n if (element.__inserted < 0) {\r\n logFlags.dom && console.warn('removed:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.detachedCallback) {\r\n element.detachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\n// SD polyfill intrustion due mainly to the fact that 'document'\r\n// is not entirely wrapped\r\nfunction wrapIfNeeded(node) {\r\n return window.ShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node)\r\n : node;\r\n}\r\n\r\nfunction inDocument(element) {\r\n var p = element;\r\n var doc = wrapIfNeeded(document);\r\n while (p) {\r\n if (p == doc) {\r\n return true;\r\n }\r\n p = p.parentNode || p.host;\r\n }\r\n}\r\n\r\nfunction watchShadow(node) {\r\n if (node.shadowRoot && !node.shadowRoot.__watched) {\r\n logFlags.dom && console.log('watching shadow-root for: ', node.localName);\r\n // watch all unwatched roots...\r\n var root = node.shadowRoot;\r\n while (root) {\r\n watchRoot(root);\r\n root = root.olderShadowRoot;\r\n }\r\n }\r\n}\r\n\r\nfunction watchRoot(root) {\r\n observe(root);\r\n}\r\n\r\nfunction handler(mutations) {\r\n //\r\n if (logFlags.dom) {\r\n var mx = mutations[0];\r\n if (mx && mx.type === 'childList' && mx.addedNodes) {\r\n if (mx.addedNodes) {\r\n var d = mx.addedNodes[0];\r\n while (d && d !== document && !d.host) {\r\n d = d.parentNode;\r\n }\r\n var u = d && (d.URL || d._URL || (d.host && d.host.localName)) || '';\r\n u = u.split('/?').shift().split('/').pop();\r\n }\r\n }\r\n console.group('mutations (%d) [%s]', mutations.length, u || '');\r\n }\r\n //\r\n mutations.forEach(function(mx) {\r\n //logFlags.dom && console.group('mutation');\r\n if (mx.type === 'childList') {\r\n forEach(mx.addedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n // nodes added may need lifecycle management\r\n addedNode(n);\r\n });\r\n // removed nodes may need lifecycle management\r\n forEach(mx.removedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n removedNode(n);\r\n });\r\n }\r\n //logFlags.dom && console.groupEnd();\r\n });\r\n logFlags.dom && console.groupEnd();\r\n};\r\n\r\nfunction takeRecords(node) {\r\n // If the optional node is not supplied, assume we mean the whole document.\r\n if (!node) node = wrapIfNeeded(document);\r\n\r\n // Find the root of the tree, which will be an Document or ShadowRoot.\r\n while (node.parentNode) {\r\n node = node.parentNode;\r\n }\r\n\r\n var observer = node.__observer;\r\n if (observer) {\r\n handler(observer.takeRecords());\r\n takeMutations();\r\n }\r\n}\r\n\r\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\r\n\r\nfunction observe(inRoot) {\r\n if (inRoot.__observer) return;\r\n\r\n // For each ShadowRoot, we create a new MutationObserver, so the root can be\r\n // garbage collected once all references to the `inRoot` node are gone.\r\n var observer = new MutationObserver(handler);\r\n observer.observe(inRoot, {childList: true, subtree: true});\r\n inRoot.__observer = observer;\r\n}\r\n\r\nfunction observeDocument(doc) {\r\n observe(doc);\r\n}\r\n\r\nfunction upgradeDocument(doc) {\r\n logFlags.dom && console.group('upgradeDocument: ', (doc.baseURI).split('/').pop());\r\n addedNode(doc);\r\n logFlags.dom && console.groupEnd();\r\n}\r\n\r\n/*\r\nThis method is intended to be called when the document tree (including imports)\r\nhas pending custom elements to upgrade. It can be called multiple times and \r\nshould do nothing if no elements are in need of upgrade.\r\n\r\nNote that the import tree can consume itself and therefore special care\r\nmust be taken to avoid recursion.\r\n*/\r\nvar upgradedDocuments;\r\nfunction upgradeDocumentTree(doc) {\r\n upgradedDocuments = [];\r\n _upgradeDocumentTree(doc);\r\n upgradedDocuments = null;\r\n}\r\n\r\n\r\nfunction _upgradeDocumentTree(doc) {\r\n doc = wrapIfNeeded(doc);\r\n if (upgradedDocuments.indexOf(doc) >= 0) {\r\n return;\r\n }\r\n upgradedDocuments.push(doc);\r\n //console.log('upgradeDocumentTree: ', (doc.baseURI).split('/').pop());\r\n // upgrade contained imported documents\r\n var imports = doc.querySelectorAll('link[rel=' + IMPORT_LINK_TYPE + ']');\r\n for (var i=0, l=imports.length, n; (i<l) && (n=imports[i]); i++) {\r\n if (n.import && n.import.__parsed) {\r\n _upgradeDocumentTree(n.import);\r\n }\r\n }\r\n upgradeDocument(doc);\r\n}\r\n\r\n// exports\r\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\r\nscope.watchShadow = watchShadow;\r\nscope.upgradeDocumentTree = upgradeDocumentTree;\r\nscope.upgradeAll = addedNode;\r\nscope.upgradeSubtree = addedSubtree;\r\nscope.insertedNode = insertedNode;\r\n\r\nscope.observeDocument = observeDocument;\r\nscope.upgradeDocument = upgradeDocument;\r\n\r\nscope.takeRecords = takeRecords;\r\n\r\n})(window.CustomElements);\r\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * Implements `document.registerElement`\n * @module CustomElements\n*/\n\n/**\n * Polyfilled extensions to the `document` object.\n * @class Document\n*/\n\n(function(scope) {\n\n// imports\n\nif (!scope) {\n scope = window.CustomElements = {flags:{}};\n}\nvar flags = scope.flags;\n\n// native document.registerElement?\n\nvar hasNative = Boolean(document.registerElement);\n// For consistent timing, use native custom elements only when not polyfilling\n// other key related web components features.\nvar useNative = !flags.register && hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);\n\nif (useNative) {\n\n // stub\n var nop = function() {};\n\n // exports\n scope.registry = {};\n scope.upgradeElement = nop;\n\n scope.watchShadow = nop;\n scope.upgrade = nop;\n scope.upgradeAll = nop;\n scope.upgradeSubtree = nop;\n scope.observeDocument = nop;\n scope.upgradeDocument = nop;\n scope.upgradeDocumentTree = nop;\n scope.takeRecords = nop;\n scope.reservedTagList = [];\n\n} else {\n\n /**\n * Registers a custom tag name with the document.\n *\n * When a registered element is created, a `readyCallback` method is called\n * in the scope of the element. The `readyCallback` method can be specified on\n * either `options.prototype` or `options.lifecycle` with the latter taking\n * precedence.\n *\n * @method register\n * @param {String} name The tag name to register. Must include a dash ('-'),\n * for example 'x-component'.\n * @param {Object} options\n * @param {String} [options.extends]\n * (_off spec_) Tag name of an element to extend (or blank for a new\n * element). This parameter is not part of the specification, but instead\n * is a hint for the polyfill because the extendee is difficult to infer.\n * Remember that the input prototype must chain to the extended element's\n * prototype (or HTMLElement.prototype) regardless of the value of\n * `extends`.\n * @param {Object} options.prototype The prototype to use for the new\n * element. The prototype must inherit from HTMLElement.\n * @param {Object} [options.lifecycle]\n * Callbacks that fire at important phases in the life of the custom\n * element.\n *\n * @example\n * FancyButton = document.registerElement(\"fancy-button\", {\n * extends: 'button',\n * prototype: Object.create(HTMLButtonElement.prototype, {\n * readyCallback: {\n * value: function() {\n * console.log(\"a fancy-button was created\",\n * }\n * }\n * })\n * });\n * @return {Function} Constructor for the newly registered type.\n */\n function register(name, options) {\n //console.warn('document.registerElement(\"' + name + '\", ', options, ')');\n // construct a defintion out of options\n // TODO(sjmiles): probably should clone options instead of mutating it\n var definition = options || {};\n if (!name) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument `name` must not be empty');\n }\n if (name.indexOf('-') < 0) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument (\\'name\\') must contain a dash (\\'-\\'). Argument provided was \\'' + String(name) + '\\'.');\n }\n // prevent registering reserved names\n if (isReservedTag(name)) {\n throw new Error('Failed to execute \\'registerElement\\' on \\'Document\\': Registration failed for type \\'' + String(name) + '\\'. The type name is invalid.');\n }\n // elements may only be registered once\n if (getRegisteredDefinition(name)) {\n throw new Error('DuplicateDefinitionError: a type with name \\'' + String(name) + '\\' is already registered');\n }\n // must have a prototype, default to an extension of HTMLElement\n // TODO(sjmiles): probably should throw if no prototype, check spec\n if (!definition.prototype) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('Options missing required prototype property');\n }\n // record name\n definition.__name = name.toLowerCase();\n // ensure a lifecycle object so we don't have to null test it\n definition.lifecycle = definition.lifecycle || {};\n // build a list of ancestral custom elements (for native base detection)\n // TODO(sjmiles): we used to need to store this, but current code only\n // uses it in 'resolveTagName': it should probably be inlined\n definition.ancestry = ancestry(definition.extends);\n // extensions of native specializations of HTMLElement require localName\n // to remain native, and use secondary 'is' specifier for extension type\n resolveTagName(definition);\n // some platforms require modifications to the user-supplied prototype\n // chain\n resolvePrototypeChain(definition);\n // overrides to implement attributeChanged callback\n overrideAttributeApi(definition.prototype);\n // 7.1.5: Register the DEFINITION with DOCUMENT\n registerDefinition(definition.__name, definition);\n // 7.1.7. Run custom element constructor generation algorithm with PROTOTYPE\n // 7.1.8. Return the output of the previous step.\n definition.ctor = generateConstructor(definition);\n definition.ctor.prototype = definition.prototype;\n // force our .constructor to be our actual constructor\n definition.prototype.constructor = definition.ctor;\n // if initial parsing is complete\n if (scope.ready) {\n // upgrade any pre-existing nodes of this type\n scope.upgradeDocumentTree(document);\n }\n return definition.ctor;\n }\n\n function isReservedTag(name) {\n for (var i = 0; i < reservedTagList.length; i++) {\n if (name === reservedTagList[i]) {\n return true;\n }\n }\n }\n\n var reservedTagList = [\n 'annotation-xml', 'color-profile', 'font-face', 'font-face-src',\n 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph'\n ];\n\n function ancestry(extnds) {\n var extendee = getRegisteredDefinition(extnds);\n if (extendee) {\n return ancestry(extendee.extends).concat([extendee]);\n }\n return [];\n }\n\n function resolveTagName(definition) {\n // if we are explicitly extending something, that thing is our\n // baseTag, unless it represents a custom component\n var baseTag = definition.extends;\n // if our ancestry includes custom components, we only have a\n // baseTag if one of them does\n for (var i=0, a; (a=definition.ancestry[i]); i++) {\n baseTag = a.is && a.tag;\n }\n // our tag is our baseTag, if it exists, and otherwise just our name\n definition.tag = baseTag || definition.__name;\n if (baseTag) {\n // if there is a base tag, use secondary 'is' specifier\n definition.is = definition.__name;\n }\n }\n\n function resolvePrototypeChain(definition) {\n // if we don't support __proto__ we need to locate the native level\n // prototype for precise mixing in\n if (!Object.__proto__) {\n // default prototype\n var nativePrototype = HTMLElement.prototype;\n // work out prototype when using type-extension\n if (definition.is) {\n var inst = document.createElement(definition.tag);\n var expectedPrototype = Object.getPrototypeOf(inst);\n // only set nativePrototype if it will actually appear in the definition's chain\n if (expectedPrototype === definition.prototype) {\n nativePrototype = expectedPrototype;\n }\n }\n // ensure __proto__ reference is installed at each point on the prototype\n // chain.\n // NOTE: On platforms without __proto__, a mixin strategy is used instead\n // of prototype swizzling. In this case, this generated __proto__ provides\n // limited support for prototype traversal.\n var proto = definition.prototype, ancestor;\n while (proto && (proto !== nativePrototype)) {\n ancestor = Object.getPrototypeOf(proto);\n proto.__proto__ = ancestor;\n proto = ancestor;\n }\n // cache this in case of mixin\n definition.native = nativePrototype;\n }\n }\n\n // SECTION 4\n\n function instantiate(definition) {\n // 4.a.1. Create a new object that implements PROTOTYPE\n // 4.a.2. Let ELEMENT by this new object\n //\n // the custom element instantiation algorithm must also ensure that the\n // output is a valid DOM element with the proper wrapper in place.\n //\n return upgrade(domCreateElement(definition.tag), definition);\n }\n\n function upgrade(element, definition) {\n // some definitions specify an 'is' attribute\n if (definition.is) {\n element.setAttribute('is', definition.is);\n }\n // make 'element' implement definition.prototype\n implement(element, definition);\n // flag as upgraded\n element.__upgraded__ = true;\n // lifecycle management\n created(element);\n // attachedCallback fires in tree order, call before recursing\n scope.insertedNode(element);\n // there should never be a shadow root on element at this point\n scope.upgradeSubtree(element);\n // OUTPUT\n return element;\n }\n\n function implement(element, definition) {\n // prototype swizzling is best\n if (Object.__proto__) {\n element.__proto__ = definition.prototype;\n } else {\n // where above we can re-acquire inPrototype via\n // getPrototypeOf(Element), we cannot do so when\n // we use mixin, so we install a magic reference\n customMixin(element, definition.prototype, definition.native);\n element.__proto__ = definition.prototype;\n }\n }\n\n function customMixin(inTarget, inSrc, inNative) {\n // TODO(sjmiles): 'used' allows us to only copy the 'youngest' version of\n // any property. This set should be precalculated. We also need to\n // consider this for supporting 'super'.\n var used = {};\n // start with inSrc\n var p = inSrc;\n // The default is HTMLElement.prototype, so we add a test to avoid mixing in\n // native prototypes\n while (p !== inNative && p !== HTMLElement.prototype) {\n var keys = Object.getOwnPropertyNames(p);\n for (var i=0, k; k=keys[i]; i++) {\n if (!used[k]) {\n Object.defineProperty(inTarget, k,\n Object.getOwnPropertyDescriptor(p, k));\n used[k] = 1;\n }\n }\n p = Object.getPrototypeOf(p);\n }\n }\n\n function created(element) {\n // invoke createdCallback\n if (element.createdCallback) {\n element.createdCallback();\n }\n }\n\n // attribute watching\n\n function overrideAttributeApi(prototype) {\n // overrides to implement callbacks\n // TODO(sjmiles): should support access via .attributes NamedNodeMap\n // TODO(sjmiles): preserves user defined overrides, if any\n if (prototype.setAttribute._polyfilled) {\n return;\n }\n var setAttribute = prototype.setAttribute;\n prototype.setAttribute = function(name, value) {\n changeAttribute.call(this, name, value, setAttribute);\n }\n var removeAttribute = prototype.removeAttribute;\n prototype.removeAttribute = function(name) {\n changeAttribute.call(this, name, null, removeAttribute);\n }\n prototype.setAttribute._polyfilled = true;\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/\n // index.html#dfn-attribute-changed-callback\n function changeAttribute(name, value, operation) {\n name = name.toLowerCase();\n var oldValue = this.getAttribute(name);\n operation.apply(this, arguments);\n var newValue = this.getAttribute(name);\n if (this.attributeChangedCallback\n && (newValue !== oldValue)) {\n this.attributeChangedCallback(name, oldValue, newValue);\n }\n }\n\n // element registry (maps tag names to definitions)\n\n var registry = {};\n\n function getRegisteredDefinition(name) {\n if (name) {\n return registry[name.toLowerCase()];\n }\n }\n\n function registerDefinition(name, definition) {\n registry[name] = definition;\n }\n\n function generateConstructor(definition) {\n return function() {\n return instantiate(definition);\n };\n }\n\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n function createElementNS(namespace, tag, typeExtension) {\n // NOTE: we do not support non-HTML elements,\n // just call createElementNS for non HTML Elements\n if (namespace === HTML_NAMESPACE) {\n return createElement(tag, typeExtension);\n } else {\n return domCreateElementNS(namespace, tag);\n }\n }\n\n function createElement(tag, typeExtension) {\n // TODO(sjmiles): ignore 'tag' when using 'typeExtension', we could\n // error check it, or perhaps there should only ever be one argument\n var definition = getRegisteredDefinition(typeExtension || tag);\n if (definition) {\n if (tag == definition.tag && typeExtension == definition.is) {\n return new definition.ctor();\n }\n // Handle empty string for type extension.\n if (!typeExtension && !definition.is) {\n return new definition.ctor();\n }\n }\n\n if (typeExtension) {\n var element = createElement(tag);\n element.setAttribute('is', typeExtension);\n return element;\n }\n var element = domCreateElement(tag);\n // Custom tags should be HTMLElements even if not upgraded.\n if (tag.indexOf('-') >= 0) {\n implement(element, HTMLElement);\n }\n return element;\n }\n\n function upgradeElement(element) {\n if (!element.__upgraded__ && (element.nodeType === Node.ELEMENT_NODE)) {\n var is = element.getAttribute('is');\n var definition = getRegisteredDefinition(is || element.localName);\n if (definition) {\n if (is && definition.tag == element.localName) {\n return upgrade(element, definition);\n } else if (!is && !definition.extends) {\n return upgrade(element, definition);\n }\n }\n }\n }\n\n function cloneNode(deep) {\n // call original clone\n var n = domCloneNode.call(this, deep);\n // upgrade the element and subtree\n scope.upgradeAll(n);\n // return the clone\n return n;\n }\n // capture native createElement before we override it\n\n var domCreateElement = document.createElement.bind(document);\n var domCreateElementNS = document.createElementNS.bind(document);\n\n // capture native cloneNode before we override it\n\n var domCloneNode = Node.prototype.cloneNode;\n\n // exports\n\n document.registerElement = register;\n document.createElement = createElement; // override\n document.createElementNS = createElementNS; // override\n Node.prototype.cloneNode = cloneNode; // override\n\n scope.registry = registry;\n\n /**\n * Upgrade an element to a custom element. Upgrading an element\n * causes the custom prototype to be applied, an `is` attribute\n * to be attached (as needed), and invocation of the `readyCallback`.\n * `upgrade` does nothing if the element is already upgraded, or\n * if it matches no registered custom tag name.\n *\n * @method ugprade\n * @param {Element} element The element to upgrade.\n * @return {Element} The upgraded element.\n */\n scope.upgrade = upgradeElement;\n}\n\n// Create a custom 'instanceof'. This is necessary when CustomElements\n// are implemented via a mixin strategy, as for example on IE10.\nvar isInstance;\nif (!Object.__proto__ && !useNative) {\n isInstance = function(obj, ctor) {\n var p = obj;\n while (p) {\n // NOTE: this is not technically correct since we're not checking if\n // an object is an instance of a constructor; however, this should\n // be good enough for the mixin strategy.\n if (p === ctor.prototype) {\n return true;\n }\n p = p.__proto__;\n }\n return false;\n }\n} else {\n isInstance = function(obj, base) {\n return obj instanceof base;\n }\n}\n\n// exports\nscope.instanceof = isInstance;\nscope.reservedTagList = reservedTagList;\n\n// bc\ndocument.register = document.registerElement;\n\nscope.hasNative = hasNative;\nscope.useNative = useNative;\n\n})(window.CustomElements);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// import\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\n\n// highlander object for parsing a document tree\n\nvar parser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ],\n map: {\n link: 'parseLink'\n },\n parse: function(inDocument) {\n if (!inDocument.__parsed) {\n // only parse once\n inDocument.__parsed = true;\n // all parsable elements in inDocument (depth-first pre-order traversal)\n var elts = inDocument.querySelectorAll(parser.selectors);\n // for each parsable node type, call the mapped parsing method\n forEach(elts, function(e) {\n parser[parser.map[e.localName]](e);\n });\n // upgrade all upgradeable static elements, anything dynamically\n // created should be caught by observer\n CustomElements.upgradeDocument(inDocument);\n // observe document for dom changes\n CustomElements.observeDocument(inDocument);\n }\n },\n parseLink: function(linkElt) {\n // imports\n if (isDocumentLink(linkElt)) {\n this.parseImport(linkElt);\n }\n },\n parseImport: function(linkElt) {\n if (linkElt.import) {\n parser.parse(linkElt.import);\n }\n }\n};\n\nfunction isDocumentLink(inElt) {\n return (inElt.localName === 'link'\n && inElt.getAttribute('rel') === IMPORT_LINK_TYPE);\n}\n\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n// exports\n\nscope.parser = parser;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\n\n})(window.CustomElements);","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(scope){\n\n// bootstrap parsing\nfunction bootstrap() {\n // parse document\n CustomElements.parser.parse(document);\n // one more pass before register is 'live'\n CustomElements.upgradeDocument(document);\n // install upgrade hook if HTMLImports are available\n if (window.HTMLImports) {\n HTMLImports.__importsParsingHook = function(elt) {\n CustomElements.parser.parse(elt.import);\n }\n }\n // set internal 'ready' flag, now document.registerElement will trigger \n // synchronous upgrades\n CustomElements.ready = true;\n // async to ensure *native* custom elements upgrade prior to this\n // DOMContentLoaded can fire before elements upgrade (e.g. when there's\n // an external script)\n setTimeout(function() {\n // capture blunt profiling data\n CustomElements.readyTime = Date.now();\n if (window.HTMLImports) {\n CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;\n }\n // notify the system that we are bootstrapped\n document.dispatchEvent(\n new CustomEvent('WebComponentsReady', {bubbles: true})\n );\n });\n}\n\n// CustomEvent shim for IE\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType, params) {\n params = params || {};\n var e = document.createEvent('CustomEvent');\n e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);\n return e;\n };\n window.CustomEvent.prototype = window.Event.prototype;\n}\n\n// When loading at readyState complete time (or via flag), boot custom elements\n// immediately.\n// If relevant, HTMLImports must already be loaded.\nif (document.readyState === 'complete' || scope.flags.eager) {\n bootstrap();\n// When loading at readyState interactive time, bootstrap only if HTMLImports\n// are not pending. Also avoid IE as the semantics of this state are unreliable.\n} else if (document.readyState === 'interactive' && !window.attachEvent &&\n (!window.HTMLImports || window.HTMLImports.ready)) {\n bootstrap();\n// When loading at other readyStates, wait for the appropriate DOM event to \n// bootstrap.\n} else {\n var loadEvent = window.HTMLImports && !HTMLImports.ready ?\n 'HTMLImportsLoaded' : 'DOMContentLoaded';\n window.addEventListener(loadEvent, bootstrap);\n}\n\n})(window.CustomElements);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function() {\n\nif (window.ShadowDOMPolyfill) {\n\n // ensure wrapped inputs for these functions\n var fns = ['upgradeAll', 'upgradeSubtree', 'observeDocument',\n 'upgradeDocument'];\n\n // cache originals\n var original = {};\n fns.forEach(function(fn) {\n original[fn] = CustomElements[fn];\n });\n\n // override\n fns.forEach(function(fn) {\n CustomElements[fn] = function(inNode) {\n return original[fn](wrap(inNode));\n };\n });\n\n}\n\n})();\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n 'use strict';\n\n // polyfill performance.now\n\n if (!window.performance) {\n var start = Date.now();\n // only at millisecond precision\n window.performance = {now: function(){ return Date.now() - start }};\n }\n\n // polyfill for requestAnimationFrame\n\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = (function() {\n var nativeRaf = window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame;\n\n return nativeRaf ?\n function(callback) {\n return nativeRaf(function() {\n callback(performance.now());\n });\n } :\n function( callback ){\n return window.setTimeout(callback, 1000 / 60);\n };\n })();\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = (function() {\n return window.webkitCancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n function(id) {\n clearTimeout(id);\n };\n })();\n }\n\n // Make a stub for Polymer() for polyfill purposes; under the HTMLImports\n // polyfill, scripts in the main document run before imports. That means\n // if (1) polymer is imported and (2) Polymer() is called in the main document\n // in a script after the import, 2 occurs before 1. We correct this here\n // by specfiically patching Polymer(); this is not necessary under native\n // HTMLImports.\n var elementDeclarations = [];\n\n var polymerStub = function(name, dictionary) {\n if ((typeof name !== 'string') && (arguments.length === 1)) {\n Array.prototype.push.call(arguments, document._currentScript);\n }\n elementDeclarations.push(arguments);\n };\n window.Polymer = polymerStub;\n\n // deliver queued delcarations\n scope.consumeDeclarations = function(callback) {\n scope.consumeDeclarations = function() {\n throw 'Possible attempt to load Polymer twice';\n };\n if (callback) {\n callback(elementDeclarations);\n }\n elementDeclarations = null;\n };\n\n function installPolymerWarning() {\n if (window.Polymer === polymerStub) {\n window.Polymer = function() {\n throw new Error('You tried to use polymer without loading it first. To ' +\n 'load polymer, <link rel=\"import\" href=\"' + \n 'components/polymer/polymer.html\">');\n };\n }\n }\n\n // Once DOMContent has loaded, any main document scripts that depend on\n // Polymer() should have run. Calling Polymer() now is an error until\n // polymer is imported.\n if (HTMLImports.useNative) {\n installPolymerWarning();\n } else {\n addEventListener('DOMContentLoaded', installPolymerWarning);\n }\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // It's desireable to provide a default stylesheet \n // that's convenient for styling unresolved elements, but\n // it's cumbersome to have to include this manually in every page.\n // It would make sense to put inside some HTMLImport but \n // the HTMLImports polyfill does not allow loading of stylesheets \n // that block rendering. Therefore this injection is tolerated here.\n //\n // NOTE: position: relative fixes IE's failure to inherit opacity \n // when a child is not statically positioned.\n var style = document.createElement('style');\n style.textContent = ''\n + 'body {'\n + 'transition: opacity ease-in 0.2s;' \n + ' } \\n'\n + 'body[unresolved] {'\n + 'opacity: 0; display: block; overflow: hidden; position: relative;' \n + ' } \\n'\n ;\n var head = document.querySelector('head');\n head.insertBefore(style, head.firstChild);\n\n})(Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n function withDependencies(task, depends) {\n depends = depends || [];\n if (!depends.map) {\n depends = [depends];\n }\n return task.apply(this, depends.map(marshal));\n }\n\n function module(name, dependsOrFactory, moduleFactory) {\n var module;\n switch (arguments.length) {\n case 0:\n return;\n case 1:\n module = null;\n break;\n case 2:\n // dependsOrFactory is `factory` in this case\n module = dependsOrFactory.apply(this);\n break;\n default:\n // dependsOrFactory is `depends` in this case\n module = withDependencies(moduleFactory, dependsOrFactory);\n break;\n }\n modules[name] = module;\n };\n\n function marshal(name) {\n return modules[name];\n }\n\n var modules = {};\n\n function using(depends, task) {\n HTMLImports.whenImportsReady(function() {\n withDependencies(task, depends);\n });\n };\n\n // exports\n\n scope.marshal = marshal;\n // `module` confuses commonjs detectors\n scope.modularize = module;\n scope.using = using;\n\n})(window);\n"]}