mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
encode with qsv
This commit is contained in:
parent
67524136ed
commit
64dfb8ef38
42 changed files with 945 additions and 370 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "webcomponentsjs",
|
||||
"main": "webcomponents.js",
|
||||
"version": "0.7.15",
|
||||
"version": "0.7.16",
|
||||
"homepage": "http://webcomponents.org",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -15,11 +15,14 @@
|
|||
],
|
||||
"license": "BSD",
|
||||
"ignore": [],
|
||||
"_release": "0.7.15",
|
||||
"devDependencies": {
|
||||
"web-component-tester": "~3.3.10"
|
||||
},
|
||||
"_release": "0.7.16",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.7.15",
|
||||
"commit": "d90a442cdf31ae10a7b5b62e667cc749a2a6da61"
|
||||
"tag": "v0.7.16",
|
||||
"commit": "26216d9a5579b7b31b98f1b1b2ced009bf9ed2b3"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/webcomponentsjs.git",
|
||||
"_target": "^0.7.2",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.15
|
||||
// @version 0.7.16
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
@ -349,6 +349,77 @@ if (typeof WeakMap === "undefined") {
|
|||
}
|
||||
})(self);
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
if (!window.performance) {
|
||||
var start = Date.now();
|
||||
window.performance = {
|
||||
now: function() {
|
||||
return Date.now() - start;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function() {
|
||||
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
return nativeRaf ? function(callback) {
|
||||
return nativeRaf(function() {
|
||||
callback(performance.now());
|
||||
});
|
||||
} : function(callback) {
|
||||
return window.setTimeout(callback, 1e3 / 60);
|
||||
};
|
||||
}();
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function() {
|
||||
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}();
|
||||
}
|
||||
var workingDefaultPrevented = function() {
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent("foo", true, true);
|
||||
e.preventDefault();
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
if (!workingDefaultPrevented) {
|
||||
var origPreventDefault = Event.prototype.preventDefault;
|
||||
Event.prototype.preventDefault = function() {
|
||||
if (!this.cancelable) {
|
||||
return;
|
||||
}
|
||||
origPreventDefault.call(this);
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (!window.Event || isIE && typeof window.Event !== "function") {
|
||||
var origEvent = window.Event;
|
||||
window.Event = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
|
||||
return e;
|
||||
};
|
||||
window.Event.prototype = origEvent.prototype;
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
window.CustomElements = window.CustomElements || {
|
||||
flags: {}
|
||||
};
|
||||
|
@ -953,22 +1024,6 @@ window.CustomElements.addModule(function(scope) {
|
|||
});
|
||||
});
|
||||
}
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (document.readyState === "complete" || scope.flags.eager) {
|
||||
bootstrap();
|
||||
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.15
|
||||
// @version 0.7.16
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
@ -349,6 +349,77 @@ if (typeof WeakMap === "undefined") {
|
|||
}
|
||||
})(self);
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
if (!window.performance) {
|
||||
var start = Date.now();
|
||||
window.performance = {
|
||||
now: function() {
|
||||
return Date.now() - start;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function() {
|
||||
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
return nativeRaf ? function(callback) {
|
||||
return nativeRaf(function() {
|
||||
callback(performance.now());
|
||||
});
|
||||
} : function(callback) {
|
||||
return window.setTimeout(callback, 1e3 / 60);
|
||||
};
|
||||
}();
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function() {
|
||||
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}();
|
||||
}
|
||||
var workingDefaultPrevented = function() {
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent("foo", true, true);
|
||||
e.preventDefault();
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
if (!workingDefaultPrevented) {
|
||||
var origPreventDefault = Event.prototype.preventDefault;
|
||||
Event.prototype.preventDefault = function() {
|
||||
if (!this.cancelable) {
|
||||
return;
|
||||
}
|
||||
origPreventDefault.call(this);
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (!window.Event || isIE && typeof window.Event !== "function") {
|
||||
var origEvent = window.Event;
|
||||
window.Event = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
|
||||
return e;
|
||||
};
|
||||
window.Event.prototype = origEvent.prototype;
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
window.HTMLImports = window.HTMLImports || {
|
||||
flags: {}
|
||||
};
|
||||
|
@ -550,10 +621,14 @@ window.HTMLImports.addModule(function(scope) {
|
|||
request.open("GET", url, xhr.async);
|
||||
request.addEventListener("readystatechange", function(e) {
|
||||
if (request.readyState === 4) {
|
||||
var locationHeader = request.getResponseHeader("Location");
|
||||
var redirectedUrl = null;
|
||||
if (locationHeader) {
|
||||
var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
|
||||
try {
|
||||
var locationHeader = request.getResponseHeader("Location");
|
||||
if (locationHeader) {
|
||||
redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
|
||||
}
|
||||
|
@ -1067,22 +1142,6 @@ window.HTMLImports.addModule(function(scope) {
|
|||
if (scope.useNative) {
|
||||
return;
|
||||
}
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
initializeModules();
|
||||
var rootDocument = scope.rootDocument;
|
||||
function bootstrap() {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.15
|
||||
// @version 0.7.16
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.15
|
||||
// @version 0.7.16
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
@ -1118,6 +1118,23 @@ window.ShadowDOMPolyfill = {};
|
|||
stopImmediatePropagationTable.set(this, true);
|
||||
}
|
||||
};
|
||||
var supportsDefaultPrevented = function() {
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent("test", true, true);
|
||||
e.preventDefault();
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
if (!supportsDefaultPrevented) {
|
||||
Event.prototype.preventDefault = function() {
|
||||
if (!this.cancelable) return;
|
||||
unsafeUnwrap(this).preventDefault();
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
registerWrapper(OriginalEvent, Event, document.createEvent("Event"));
|
||||
function unwrapOptions(options) {
|
||||
if (!options || !options.relatedTarget) return options;
|
||||
|
@ -3378,6 +3395,9 @@ window.ShadowDOMPolyfill = {};
|
|||
},
|
||||
elementFromPoint: function(x, y) {
|
||||
return elementFromPoint(this, this.ownerDocument, x, y);
|
||||
},
|
||||
getSelection: function() {
|
||||
return document.getSelection();
|
||||
}
|
||||
});
|
||||
scope.wrappers.ShadowRoot = ShadowRoot;
|
||||
|
@ -3969,7 +3989,7 @@ window.ShadowDOMPolyfill = {};
|
|||
unsafeUnwrap(this).removeRange(unwrap(range));
|
||||
},
|
||||
selectAllChildren: function(node) {
|
||||
unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));
|
||||
unsafeUnwrap(this).selectAllChildren(node instanceof ShadowRoot ? unsafeUnwrap(node.host) : unwrapIfNeeded(node));
|
||||
},
|
||||
toString: function() {
|
||||
return unsafeUnwrap(this).toString();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "webcomponentsjs",
|
||||
"main": "webcomponents.js",
|
||||
"version": "0.7.15",
|
||||
"version": "0.7.16",
|
||||
"homepage": "http://webcomponents.org",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -14,5 +14,8 @@
|
|||
"webcomponents"
|
||||
],
|
||||
"license": "BSD",
|
||||
"ignore": []
|
||||
"ignore": [],
|
||||
"devDependencies": {
|
||||
"web-component-tester": "~3.3.10"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webcomponents.js",
|
||||
"version": "0.7.15",
|
||||
"version": "0.7.16",
|
||||
"description": "webcomponents.js",
|
||||
"main": "webcomponents.js",
|
||||
"directories": {
|
||||
|
@ -11,10 +11,7 @@
|
|||
"url": "https://github.com/webcomponents/webcomponentsjs.git"
|
||||
},
|
||||
"author": "The Polymer Authors",
|
||||
"license": {
|
||||
"type": "BSD-3-Clause",
|
||||
"url": "http://polymer.github.io/LICENSE.txt"
|
||||
},
|
||||
"license": "BSD-3-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/webcomponents/webcomponentsjs/issues"
|
||||
},
|
||||
|
@ -26,6 +23,6 @@
|
|||
"gulp-header": "^1.1.1",
|
||||
"gulp-uglify": "^1.0.1",
|
||||
"run-sequence": "^1.0.1",
|
||||
"web-component-tester": "*"
|
||||
"web-component-tester": "^3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.15
|
||||
// @version 0.7.16
|
||||
(function() {
|
||||
window.WebComponents = window.WebComponents || {
|
||||
flags: {}
|
||||
|
@ -912,6 +912,159 @@ if (typeof WeakMap === "undefined") {
|
|||
}
|
||||
})(self);
|
||||
|
||||
if (typeof HTMLTemplateElement === "undefined") {
|
||||
(function() {
|
||||
var TEMPLATE_TAG = "template";
|
||||
var contentDoc = document.implementation.createHTMLDocument("template");
|
||||
var canDecorate = true;
|
||||
HTMLTemplateElement = function() {};
|
||||
HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
|
||||
HTMLTemplateElement.decorate = function(template) {
|
||||
if (!template.content) {
|
||||
template.content = contentDoc.createDocumentFragment();
|
||||
}
|
||||
var child;
|
||||
while (child = template.firstChild) {
|
||||
template.content.appendChild(child);
|
||||
}
|
||||
if (canDecorate) {
|
||||
try {
|
||||
Object.defineProperty(template, "innerHTML", {
|
||||
get: function() {
|
||||
var o = "";
|
||||
for (var e = this.content.firstChild; e; e = e.nextSibling) {
|
||||
o += e.outerHTML || escapeData(e.data);
|
||||
}
|
||||
return o;
|
||||
},
|
||||
set: function(text) {
|
||||
contentDoc.body.innerHTML = text;
|
||||
HTMLTemplateElement.bootstrap(contentDoc);
|
||||
while (this.content.firstChild) {
|
||||
this.content.removeChild(this.content.firstChild);
|
||||
}
|
||||
while (contentDoc.body.firstChild) {
|
||||
this.content.appendChild(contentDoc.body.firstChild);
|
||||
}
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
} catch (err) {
|
||||
canDecorate = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
HTMLTemplateElement.bootstrap = function(doc) {
|
||||
var templates = doc.querySelectorAll(TEMPLATE_TAG);
|
||||
for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) {
|
||||
HTMLTemplateElement.decorate(t);
|
||||
}
|
||||
};
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
HTMLTemplateElement.bootstrap(document);
|
||||
});
|
||||
var createElement = document.createElement;
|
||||
document.createElement = function() {
|
||||
"use strict";
|
||||
var el = createElement.apply(document, arguments);
|
||||
if (el.localName == "template") {
|
||||
HTMLTemplateElement.decorate(el);
|
||||
}
|
||||
return el;
|
||||
};
|
||||
var escapeDataRegExp = /[&\u00A0<>]/g;
|
||||
function escapeReplace(c) {
|
||||
switch (c) {
|
||||
case "&":
|
||||
return "&";
|
||||
|
||||
case "<":
|
||||
return "<";
|
||||
|
||||
case ">":
|
||||
return ">";
|
||||
|
||||
case " ":
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
function escapeData(s) {
|
||||
return s.replace(escapeDataRegExp, escapeReplace);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
if (!window.performance) {
|
||||
var start = Date.now();
|
||||
window.performance = {
|
||||
now: function() {
|
||||
return Date.now() - start;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function() {
|
||||
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
return nativeRaf ? function(callback) {
|
||||
return nativeRaf(function() {
|
||||
callback(performance.now());
|
||||
});
|
||||
} : function(callback) {
|
||||
return window.setTimeout(callback, 1e3 / 60);
|
||||
};
|
||||
}();
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function() {
|
||||
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}();
|
||||
}
|
||||
var workingDefaultPrevented = function() {
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent("foo", true, true);
|
||||
e.preventDefault();
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
if (!workingDefaultPrevented) {
|
||||
var origPreventDefault = Event.prototype.preventDefault;
|
||||
Event.prototype.preventDefault = function() {
|
||||
if (!this.cancelable) {
|
||||
return;
|
||||
}
|
||||
origPreventDefault.call(this);
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (!window.Event || isIE && typeof window.Event !== "function") {
|
||||
var origEvent = window.Event;
|
||||
window.Event = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
|
||||
return e;
|
||||
};
|
||||
window.Event.prototype = origEvent.prototype;
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
window.HTMLImports = window.HTMLImports || {
|
||||
flags: {}
|
||||
};
|
||||
|
@ -1113,10 +1266,14 @@ window.HTMLImports.addModule(function(scope) {
|
|||
request.open("GET", url, xhr.async);
|
||||
request.addEventListener("readystatechange", function(e) {
|
||||
if (request.readyState === 4) {
|
||||
var locationHeader = request.getResponseHeader("Location");
|
||||
var redirectedUrl = null;
|
||||
if (locationHeader) {
|
||||
var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
|
||||
try {
|
||||
var locationHeader = request.getResponseHeader("Location");
|
||||
if (locationHeader) {
|
||||
redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
|
||||
}
|
||||
|
@ -1630,22 +1787,6 @@ window.HTMLImports.addModule(function(scope) {
|
|||
if (scope.useNative) {
|
||||
return;
|
||||
}
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
initializeModules();
|
||||
var rootDocument = scope.rootDocument;
|
||||
function bootstrap() {
|
||||
|
@ -2262,22 +2403,6 @@ window.CustomElements.addModule(function(scope) {
|
|||
});
|
||||
});
|
||||
}
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (document.readyState === "complete" || scope.flags.eager) {
|
||||
bootstrap();
|
||||
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
|
||||
|
@ -2288,119 +2413,6 @@ window.CustomElements.addModule(function(scope) {
|
|||
}
|
||||
})(window.CustomElements);
|
||||
|
||||
if (typeof HTMLTemplateElement === "undefined") {
|
||||
(function() {
|
||||
var TEMPLATE_TAG = "template";
|
||||
var contentDoc = document.implementation.createHTMLDocument("template");
|
||||
var canDecorate = true;
|
||||
HTMLTemplateElement = function() {};
|
||||
HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
|
||||
HTMLTemplateElement.decorate = function(template) {
|
||||
if (!template.content) {
|
||||
template.content = contentDoc.createDocumentFragment();
|
||||
}
|
||||
var child;
|
||||
while (child = template.firstChild) {
|
||||
template.content.appendChild(child);
|
||||
}
|
||||
if (canDecorate) {
|
||||
try {
|
||||
Object.defineProperty(template, "innerHTML", {
|
||||
get: function() {
|
||||
var o = "";
|
||||
for (var e = this.content.firstChild; e; e = e.nextSibling) {
|
||||
o += e.outerHTML || escapeData(e.data);
|
||||
}
|
||||
return o;
|
||||
},
|
||||
set: function(text) {
|
||||
contentDoc.body.innerHTML = text;
|
||||
HTMLTemplateElement.bootstrap(contentDoc);
|
||||
while (this.content.firstChild) {
|
||||
this.content.removeChild(this.content.firstChild);
|
||||
}
|
||||
while (contentDoc.body.firstChild) {
|
||||
this.content.appendChild(contentDoc.body.firstChild);
|
||||
}
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
} catch (err) {
|
||||
canDecorate = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
HTMLTemplateElement.bootstrap = function(doc) {
|
||||
var templates = doc.querySelectorAll(TEMPLATE_TAG);
|
||||
for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) {
|
||||
HTMLTemplateElement.decorate(t);
|
||||
}
|
||||
};
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
HTMLTemplateElement.bootstrap(document);
|
||||
});
|
||||
var createElement = document.createElement;
|
||||
document.createElement = function() {
|
||||
"use strict";
|
||||
var el = createElement.apply(document, arguments);
|
||||
if (el.localName == "template") {
|
||||
HTMLTemplateElement.decorate(el);
|
||||
}
|
||||
return el;
|
||||
};
|
||||
var escapeDataRegExp = /[&\u00A0<>]/g;
|
||||
function escapeReplace(c) {
|
||||
switch (c) {
|
||||
case "&":
|
||||
return "&";
|
||||
|
||||
case "<":
|
||||
return "<";
|
||||
|
||||
case ">":
|
||||
return ">";
|
||||
|
||||
case " ":
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
function escapeData(s) {
|
||||
return s.replace(escapeDataRegExp, escapeReplace);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
if (!window.performance) {
|
||||
var start = Date.now();
|
||||
window.performance = {
|
||||
now: function() {
|
||||
return Date.now() - start;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function() {
|
||||
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
return nativeRaf ? function(callback) {
|
||||
return nativeRaf(function() {
|
||||
callback(performance.now());
|
||||
});
|
||||
} : function(callback) {
|
||||
return window.setTimeout(callback, 1e3 / 60);
|
||||
};
|
||||
}();
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function() {
|
||||
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}();
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
(function(scope) {
|
||||
var style = document.createElement("style");
|
||||
style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.15
|
||||
// @version 0.7.16
|
||||
(function() {
|
||||
window.WebComponents = window.WebComponents || {
|
||||
flags: {}
|
||||
|
@ -1159,6 +1159,23 @@ if (WebComponents.flags.shadow) {
|
|||
stopImmediatePropagationTable.set(this, true);
|
||||
}
|
||||
};
|
||||
var supportsDefaultPrevented = function() {
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent("test", true, true);
|
||||
e.preventDefault();
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
if (!supportsDefaultPrevented) {
|
||||
Event.prototype.preventDefault = function() {
|
||||
if (!this.cancelable) return;
|
||||
unsafeUnwrap(this).preventDefault();
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
registerWrapper(OriginalEvent, Event, document.createEvent("Event"));
|
||||
function unwrapOptions(options) {
|
||||
if (!options || !options.relatedTarget) return options;
|
||||
|
@ -3387,6 +3404,9 @@ if (WebComponents.flags.shadow) {
|
|||
},
|
||||
elementFromPoint: function(x, y) {
|
||||
return elementFromPoint(this, this.ownerDocument, x, y);
|
||||
},
|
||||
getSelection: function() {
|
||||
return document.getSelection();
|
||||
}
|
||||
});
|
||||
scope.wrappers.ShadowRoot = ShadowRoot;
|
||||
|
@ -3974,7 +3994,7 @@ if (WebComponents.flags.shadow) {
|
|||
unsafeUnwrap(this).removeRange(unwrap(range));
|
||||
},
|
||||
selectAllChildren: function(node) {
|
||||
unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));
|
||||
unsafeUnwrap(this).selectAllChildren(node instanceof ShadowRoot ? unsafeUnwrap(node.host) : unwrapIfNeeded(node));
|
||||
},
|
||||
toString: function() {
|
||||
return unsafeUnwrap(this).toString();
|
||||
|
@ -5705,6 +5725,77 @@ if (WebComponents.flags.shadow) {
|
|||
}
|
||||
})(self);
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
if (!window.performance) {
|
||||
var start = Date.now();
|
||||
window.performance = {
|
||||
now: function() {
|
||||
return Date.now() - start;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function() {
|
||||
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
return nativeRaf ? function(callback) {
|
||||
return nativeRaf(function() {
|
||||
callback(performance.now());
|
||||
});
|
||||
} : function(callback) {
|
||||
return window.setTimeout(callback, 1e3 / 60);
|
||||
};
|
||||
}();
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function() {
|
||||
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}();
|
||||
}
|
||||
var workingDefaultPrevented = function() {
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent("foo", true, true);
|
||||
e.preventDefault();
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
if (!workingDefaultPrevented) {
|
||||
var origPreventDefault = Event.prototype.preventDefault;
|
||||
Event.prototype.preventDefault = function() {
|
||||
if (!this.cancelable) {
|
||||
return;
|
||||
}
|
||||
origPreventDefault.call(this);
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
var isIE = /Trident/.test(navigator.userAgent);
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (!window.Event || isIE && typeof window.Event !== "function") {
|
||||
var origEvent = window.Event;
|
||||
window.Event = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("Event");
|
||||
e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
|
||||
return e;
|
||||
};
|
||||
window.Event.prototype = origEvent.prototype;
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
window.HTMLImports = window.HTMLImports || {
|
||||
flags: {}
|
||||
};
|
||||
|
@ -5906,10 +5997,14 @@ window.HTMLImports.addModule(function(scope) {
|
|||
request.open("GET", url, xhr.async);
|
||||
request.addEventListener("readystatechange", function(e) {
|
||||
if (request.readyState === 4) {
|
||||
var locationHeader = request.getResponseHeader("Location");
|
||||
var redirectedUrl = null;
|
||||
if (locationHeader) {
|
||||
var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
|
||||
try {
|
||||
var locationHeader = request.getResponseHeader("Location");
|
||||
if (locationHeader) {
|
||||
redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
|
||||
}
|
||||
|
@ -6423,22 +6518,6 @@ window.HTMLImports.addModule(function(scope) {
|
|||
if (scope.useNative) {
|
||||
return;
|
||||
}
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
initializeModules();
|
||||
var rootDocument = scope.rootDocument;
|
||||
function bootstrap() {
|
||||
|
@ -7055,22 +7134,6 @@ window.CustomElements.addModule(function(scope) {
|
|||
});
|
||||
});
|
||||
}
|
||||
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
||||
window.CustomEvent = function(inType, params) {
|
||||
params = params || {};
|
||||
var e = document.createEvent("CustomEvent");
|
||||
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
|
||||
e.preventDefault = function() {
|
||||
Object.defineProperty(this, "defaultPrevented", {
|
||||
get: function() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
};
|
||||
return e;
|
||||
};
|
||||
window.CustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
if (document.readyState === "complete" || scope.flags.eager) {
|
||||
bootstrap();
|
||||
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
|
||||
|
@ -7095,37 +7158,6 @@ window.CustomElements.addModule(function(scope) {
|
|||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
(function(scope) {
|
||||
"use strict";
|
||||
if (!window.performance) {
|
||||
var start = Date.now();
|
||||
window.performance = {
|
||||
now: function() {
|
||||
return Date.now() - start;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function() {
|
||||
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
return nativeRaf ? function(callback) {
|
||||
return nativeRaf(function() {
|
||||
callback(performance.now());
|
||||
});
|
||||
} : function(callback) {
|
||||
return window.setTimeout(callback, 1e3 / 60);
|
||||
};
|
||||
}();
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function() {
|
||||
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}();
|
||||
}
|
||||
})(window.WebComponents);
|
||||
|
||||
(function(scope) {
|
||||
var style = document.createElement("style");
|
||||
style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue