mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 19:38:20 -07:00
merge from dev
This commit is contained in:
parent
d96250df7f
commit
bcfee41a57
@ -16,12 +16,12 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.0.21",
|
"version": "1.0.25",
|
||||||
"_release": "1.0.21",
|
"_release": "1.0.25",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.0.21",
|
"tag": "1.0.25",
|
||||||
"commit": "e341b097c05c31ec012e04dfbd0455ae9dfc4929"
|
"commit": "f2e83b0e30527b5182ceb043d170ad7188368245"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
|
"_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
|
||||||
"_target": "~1.0.3",
|
"_target": "~1.0.3",
|
||||||
|
@ -1123,7 +1123,7 @@
|
|||||||
if (options.updateDateLastAccessed !== false) {
|
if (options.updateDateLastAccessed !== false) {
|
||||||
server.DateLastAccessed = new Date().getTime();
|
server.DateLastAccessed = new Date().getTime();
|
||||||
|
|
||||||
if (server.LastConnectionMode == ConnectionMode.Local) {
|
if (connectionMode == ConnectionMode.Local) {
|
||||||
server.DateLastLocalConnection = new Date().getTime();
|
server.DateLastLocalConnection = new Date().getTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1466,6 +1466,17 @@
|
|||||||
|
|
||||||
self.getRegistrationInfo = function (feature, apiClient) {
|
self.getRegistrationInfo = function (feature, apiClient) {
|
||||||
|
|
||||||
|
if (isConnectUserSupporter()) {
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
resolve({
|
||||||
|
Name: feature,
|
||||||
|
IsRegistered: true,
|
||||||
|
IsTrial: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return self.getAvailableServers().then(function (servers) {
|
return self.getAvailableServers().then(function (servers) {
|
||||||
|
|
||||||
var matchedServers = servers.filter(function (s) {
|
var matchedServers = servers.filter(function (s) {
|
||||||
@ -1498,6 +1509,19 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function isConnectUserSupporter() {
|
||||||
|
|
||||||
|
if (self.isLoggedIntoConnect()) {
|
||||||
|
|
||||||
|
var connectUser = self.connectUser();
|
||||||
|
|
||||||
|
if (connectUser && connectUser.IsSupporter) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function updateDateLastLocalConnection(serverId) {
|
function updateDateLastLocalConnection(serverId) {
|
||||||
|
|
||||||
var credentials = credentialProvider.credentials();
|
var credentials = credentialProvider.credentials();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
(function (globalScope, localStorage, sessionStorage) {
|
(function (globalScope) {
|
||||||
|
|
||||||
function myStore(defaultObject) {
|
function myStore(defaultObject) {
|
||||||
|
|
||||||
@ -45,7 +45,7 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
globalScope.appStorage = new myStore(localStorage);
|
globalScope.appStorage = new myStore(globalScope.localStorage);
|
||||||
globalScope.sessionStore = new myStore(sessionStorage);
|
globalScope.sessionStore = new myStore(globalScope.sessionStorage);
|
||||||
|
|
||||||
})(window, window.localStorage, window.sessionStorage);
|
})(this);
|
34
dashboard-ui/bower_components/emby-webcomponents/visibleinviewport.js
vendored
Normal file
34
dashboard-ui/bower_components/emby-webcomponents/visibleinviewport.js
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
define([], function () {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright 2012, Digital Fusion
|
||||||
|
* Licensed under the MIT license.
|
||||||
|
* http://teamdf.com/jquery-plugins/license/
|
||||||
|
*
|
||||||
|
* @author Sam Sehnert
|
||||||
|
* @desc A small plugin that checks whether elements are within
|
||||||
|
* the user visible viewport of a web browser.
|
||||||
|
* only accounts for vertical position, not horizontal.
|
||||||
|
*/
|
||||||
|
function visibleInViewport(elem, partial, thresholdX, thresholdY) {
|
||||||
|
|
||||||
|
thresholdX = thresholdX || 0;
|
||||||
|
thresholdY = thresholdY || 0;
|
||||||
|
|
||||||
|
var vpWidth = window.innerWidth,
|
||||||
|
vpHeight = window.innerHeight;
|
||||||
|
|
||||||
|
// Use this native browser method, if available.
|
||||||
|
var rec = elem.getBoundingClientRect(),
|
||||||
|
tViz = rec.top >= 0 && rec.top < vpHeight + thresholdY,
|
||||||
|
bViz = rec.bottom > 0 && rec.bottom <= vpHeight + thresholdY,
|
||||||
|
lViz = rec.left >= 0 && rec.left < vpWidth + thresholdX,
|
||||||
|
rViz = rec.right > 0 && rec.right <= vpWidth + thresholdX,
|
||||||
|
vVisible = partial ? tViz || bViz : tViz && bViz,
|
||||||
|
hVisible = partial ? lViz || rViz : lViz && rViz;
|
||||||
|
|
||||||
|
return vVisible && hVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
return visibleInViewport;
|
||||||
|
});
|
13
dashboard-ui/bower_components/hls.js/.bower.json
vendored
13
dashboard-ui/bower_components/hls.js/.bower.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.3.15",
|
"version": "0.4.5",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
"authors": [
|
"authors": [
|
||||||
@ -15,13 +15,14 @@
|
|||||||
"test",
|
"test",
|
||||||
"tests"
|
"tests"
|
||||||
],
|
],
|
||||||
"_release": "0.3.15",
|
"_release": "0.4.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v0.3.15",
|
"tag": "v0.4.5",
|
||||||
"commit": "d3ecf55b89063d7ba3bd70800d5839755b0c7e63"
|
"commit": "908ac4a44a182bdbede9c1830828983c18532ca0"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||||
"_target": "~0.3.11",
|
"_target": "~0.4.5",
|
||||||
"_originalSource": "dailymotion/hls.js"
|
"_originalSource": "dailymotion/hls.js",
|
||||||
|
"_direct": true
|
||||||
}
|
}
|
42
dashboard-ui/bower_components/hls.js/API.md
vendored
42
dashboard-ui/bower_components/hls.js/API.md
vendored
@ -184,17 +184,21 @@ configuration parameters could be provided to hls.js upon instantiation of Hls O
|
|||||||
debug : false,
|
debug : false,
|
||||||
autoStartLoad : true,
|
autoStartLoad : true,
|
||||||
maxBufferLength : 30,
|
maxBufferLength : 30,
|
||||||
|
maxMaxBufferLength : 600,
|
||||||
maxBufferSize : 60*1000*1000,
|
maxBufferSize : 60*1000*1000,
|
||||||
liveSyncDurationCount : 3,
|
liveSyncDurationCount : 3,
|
||||||
liveMaxLatencyDurationCount: 10,
|
liveMaxLatencyDurationCount: 10,
|
||||||
enableWorker : true,
|
enableWorker : true,
|
||||||
enableSoftwareAES: true,
|
enableSoftwareAES: true,
|
||||||
fragLoadingTimeOut : 20000,
|
|
||||||
fragLoadingMaxRetry : 6,
|
|
||||||
fragLoadingRetryDelay : 500,
|
|
||||||
manifestLoadingTimeOut : 10000,
|
manifestLoadingTimeOut : 10000,
|
||||||
manifestLoadingMaxRetry : 6,
|
manifestLoadingMaxRetry : 6,
|
||||||
manifestLoadingRetryDelay : 500,
|
manifestLoadingRetryDelay : 500,
|
||||||
|
levelLoadingTimeOut : 10000,
|
||||||
|
levelLoadingMaxRetry : 6,
|
||||||
|
levelLoadingRetryDelay : 500,
|
||||||
|
fragLoadingTimeOut : 20000,
|
||||||
|
fragLoadingMaxRetry : 6,
|
||||||
|
fragLoadingRetryDelay : 500,
|
||||||
fpsDroppedMonitoringPeriod : 5000,
|
fpsDroppedMonitoringPeriod : 5000,
|
||||||
fpsDroppedMonitoringThreshold : 0.2,
|
fpsDroppedMonitoringThreshold : 0.2,
|
||||||
appendErrorMaxRetry : 3,
|
appendErrorMaxRetry : 3,
|
||||||
@ -209,6 +213,10 @@ configuration parameters could be provided to hls.js upon instantiation of Hls O
|
|||||||
var hls = new Hls(config);
|
var hls = new Hls(config);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### ```Hls.DefaultConfig get/set```
|
||||||
|
this getter/setter allows to retrieve and override Hls default configuration.
|
||||||
|
this configuration will be applied by default to all instances.
|
||||||
|
|
||||||
#### ```debug```
|
#### ```debug```
|
||||||
(default false)
|
(default false)
|
||||||
|
|
||||||
@ -225,10 +233,24 @@ a logger object could also be provided for custom logging : ```config.debug=cust
|
|||||||
(default 30s)
|
(default 30s)
|
||||||
|
|
||||||
maximum buffer Length in seconds. if buffer length is/become less than this value, a new fragment will be loaded.
|
maximum buffer Length in seconds. if buffer length is/become less than this value, a new fragment will be loaded.
|
||||||
|
this is the guaranteed buffer length hls.js will try to reach, regardless of maxBufferSize.
|
||||||
|
|
||||||
#### ```maxBufferSize```
|
#### ```maxBufferSize```
|
||||||
(default 60 MB)
|
(default 60 MB)
|
||||||
|
|
||||||
maximum buffer size in bytes. if buffer size upfront is bigger than this value, no fragment will be loaded.
|
'minimum' maximum buffer size in bytes. if buffer size upfront is bigger than this value, no fragment will be loaded.
|
||||||
|
|
||||||
|
#### ```maxMaxBufferLength```
|
||||||
|
(default 600s)
|
||||||
|
|
||||||
|
maximum buffer Length in seconds. hls.js will never exceed this value. even if maxBufferSize is not reached yet.
|
||||||
|
|
||||||
|
hls.js tries to buffer up to a maximum number of bytes (60 MB by default) rather than to buffer up to a maximum nb of seconds.
|
||||||
|
this is to mimic the browser behaviour (the buffer eviction algorithm is starting after the browser detects that video buffer size reaches a limit in bytes)
|
||||||
|
|
||||||
|
config.maxBufferLength is the minimum guaranteed buffer length that hls.js will try to achieve, even if that value exceeds the amount of bytes 60 MB of memory.
|
||||||
|
maxMaxBufferLength acts as a capping value, as if bitrate is really low, you could need more than one hour of buffer to fill 60 MB....
|
||||||
|
|
||||||
|
|
||||||
#### ```liveSyncDurationCount```
|
#### ```liveSyncDurationCount```
|
||||||
(default 3)
|
(default 3)
|
||||||
@ -255,19 +277,19 @@ enable webworker (if available on browser) for TS demuxing/MP4 remuxing, to impr
|
|||||||
|
|
||||||
enable to use JavaScript version AES decryption for fallback of WebCrypto API.
|
enable to use JavaScript version AES decryption for fallback of WebCrypto API.
|
||||||
|
|
||||||
#### ```fragLoadingTimeOut```/```manifestLoadingTimeOut```
|
#### ```fragLoadingTimeOut```/```manifestLoadingTimeOut```/```levelLoadingTimeOut```
|
||||||
(default 60000ms for fragment/10000ms for manifest)
|
(default 60000ms for fragment/10000ms for level and manifest)
|
||||||
|
|
||||||
URL Loader timeout.
|
URL Loader timeout.
|
||||||
A timeout callback will be triggered if loading duration exceeds this timeout.
|
A timeout callback will be triggered if loading duration exceeds this timeout.
|
||||||
no further action will be done : the load operation will not be cancelled/aborted.
|
no further action will be done : the load operation will not be cancelled/aborted.
|
||||||
It is up to the application to catch this event and treat it as needed.
|
It is up to the application to catch this event and treat it as needed.
|
||||||
#### ```fragLoadingMaxRetry```/```manifestLoadingMaxRetry```
|
#### ```fragLoadingMaxRetry```/```manifestLoadingMaxRetry```/```levelLoadingMaxRetry```
|
||||||
(default 3)
|
(default 3)
|
||||||
|
|
||||||
max nb of load retry
|
max nb of load retry
|
||||||
#### ```fragLoadingRetryDelay```/```manifestLoadingRetryDelay```
|
#### ```fragLoadingRetryDelay```/```manifestLoadingRetryDelay```/```levelLoadingRetryDelay```
|
||||||
(default 500ms)
|
(default 1000ms)
|
||||||
|
|
||||||
initial delay between XmlHttpRequest error and first load retry (in ms)
|
initial delay between XmlHttpRequest error and first load retry (in ms)
|
||||||
any I/O error will trigger retries every 500ms,1s,2s,4s,8s, ... capped to 64s (exponential backoff)
|
any I/O error will trigger retries every 500ms,1s,2s,4s,8s, ... capped to 64s (exponential backoff)
|
||||||
@ -485,7 +507,7 @@ full list of Events available below :
|
|||||||
- `Hls.Events.FRAG_LOADING` - fired when a fragment loading starts
|
- `Hls.Events.FRAG_LOADING` - fired when a fragment loading starts
|
||||||
- data: { frag : fragment object}
|
- data: { frag : fragment object}
|
||||||
- `Hls.Events.FRAG_LOAD_PROGRESS` - fired when a fragment load is in progress
|
- `Hls.Events.FRAG_LOAD_PROGRESS` - fired when a fragment load is in progress
|
||||||
- data: { frag : fragment object, stats : progress event }
|
- data: { frag : fragment object with frag.loaded=stats.loaded, stats : { trequest, tfirst, loaded} }
|
||||||
- `Hls.Events.FRAG_LOADED` - fired when a fragment loading is completed
|
- `Hls.Events.FRAG_LOADED` - fired when a fragment loading is completed
|
||||||
- data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length}}
|
- data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length}}
|
||||||
- `Hls.Events.FRAG_PARSING_INIT_SEGMENT` - fired when Init Segment has been extracted from fragment
|
- `Hls.Events.FRAG_PARSING_INIT_SEGMENT` - fired when Init Segment has been extracted from fragment
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.3.15",
|
"version": "0.4.5",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
@ -75,6 +75,7 @@ header {
|
|||||||
<label class="innerControls"><input id="enableStreaming" type=checkbox checked/> Enable Streaming</label>
|
<label class="innerControls"><input id="enableStreaming" type=checkbox checked/> Enable Streaming</label>
|
||||||
<label class="innerControls"><input id="autoRecoverError" type=checkbox checked/> Auto-Recover Media Error</label>
|
<label class="innerControls"><input id="autoRecoverError" type=checkbox checked/> Auto-Recover Media Error</label>
|
||||||
<label class="innerControls"><input id="enableWorker" type=checkbox checked/> Enable Worker</label>
|
<label class="innerControls"><input id="enableWorker" type=checkbox checked/> Enable Worker</label>
|
||||||
|
<label class="innerControls">Level Capping <input id="levelCapping" type=number/></label>
|
||||||
<div id="StreamPermalink" class="innerControls"></div>
|
<div id="StreamPermalink" class="innerControls"></div>
|
||||||
<div>
|
<div>
|
||||||
<select id="videoSize" style="float:left">
|
<select id="videoSize" style="float:left">
|
||||||
@ -205,9 +206,11 @@ $(document).ready(function() {
|
|||||||
$('#enableStreaming').click(function() { enableStreaming = this.checked; loadStream($('#streamURL').val()); });
|
$('#enableStreaming').click(function() { enableStreaming = this.checked; loadStream($('#streamURL').val()); });
|
||||||
$('#autoRecoverError').click(function() { autoRecoverError = this.checked; updatePermalink();});
|
$('#autoRecoverError').click(function() { autoRecoverError = this.checked; updatePermalink();});
|
||||||
$('#enableWorker').click(function() { enableWorker = this.checked; updatePermalink();});
|
$('#enableWorker').click(function() { enableWorker = this.checked; updatePermalink();});
|
||||||
|
$('#levelCapping').change(function() { levelCapping = this.value; updatePermalink();});
|
||||||
$('#enableStreaming').prop( "checked", enableStreaming );
|
$('#enableStreaming').prop( "checked", enableStreaming );
|
||||||
$('#autoRecoverError').prop( "checked", autoRecoverError );
|
$('#autoRecoverError').prop( "checked", autoRecoverError );
|
||||||
$('#enableWorker').prop( "checked", enableWorker );
|
$('#enableWorker').prop( "checked", enableWorker );
|
||||||
|
$('#levelCapping').val(levelCapping);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -216,6 +219,7 @@ $(document).ready(function() {
|
|||||||
enableStreaming = JSON.parse(getURLParam('enableStreaming',true))
|
enableStreaming = JSON.parse(getURLParam('enableStreaming',true))
|
||||||
autoRecoverError = JSON.parse(getURLParam('autoRecoverError',true)),
|
autoRecoverError = JSON.parse(getURLParam('autoRecoverError',true)),
|
||||||
enableWorker = JSON.parse(getURLParam('enableWorker',true));
|
enableWorker = JSON.parse(getURLParam('enableWorker',true));
|
||||||
|
levelCapping = JSON.parse(getURLParam('levelCapping',-1));
|
||||||
var video = $('#video')[0];
|
var video = $('#video')[0];
|
||||||
video.volume = 0.05;
|
video.volume = 0.05;
|
||||||
|
|
||||||
@ -247,6 +251,7 @@ $(document).ready(function() {
|
|||||||
hls = new Hls({debug:true, enableWorker : enableWorker});
|
hls = new Hls({debug:true, enableWorker : enableWorker});
|
||||||
$("#HlsStatus").text('loading manifest and attaching video element...');
|
$("#HlsStatus").text('loading manifest and attaching video element...');
|
||||||
hls.loadSource(url);
|
hls.loadSource(url);
|
||||||
|
hls.autoLevelCapping = levelCapping;
|
||||||
hls.attachMedia(video);
|
hls.attachMedia(video);
|
||||||
hls.on(Hls.Events.MEDIA_ATTACHED,function() {
|
hls.on(Hls.Events.MEDIA_ATTACHED,function() {
|
||||||
$("#HlsStatus").text('MediaSource attached...');
|
$("#HlsStatus").text('MediaSource attached...');
|
||||||
@ -429,17 +434,29 @@ $(document).ready(function() {
|
|||||||
$("#HlsStatus").html("cannot Load <a href=\"" + data.url + "\">" + url + "</a><br>Reason:Load " + data.event.type);
|
$("#HlsStatus").html("cannot Load <a href=\"" + data.url + "\">" + url + "</a><br>Reason:Load " + data.event.type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Hls.ErrorDetails.MANIFEST_LOAD_TIMEOUT:
|
||||||
|
$("#HlsStatus").text("timeout while loading manifest");
|
||||||
|
break;
|
||||||
|
case Hls.ErrorDetails.MANIFEST_PARSING_ERROR:
|
||||||
|
$("#HlsStatus").text("error while parsing manifest:" + data.reason);
|
||||||
|
break;
|
||||||
case Hls.ErrorDetails.LEVEL_LOAD_ERROR:
|
case Hls.ErrorDetails.LEVEL_LOAD_ERROR:
|
||||||
$("#HlsStatus").text("error while trying to load level playlist");
|
$("#HlsStatus").text("error while loading level playlist");
|
||||||
|
break;
|
||||||
|
case Hls.ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
||||||
|
$("#HlsStatus").text("timeout while loading level playlist");
|
||||||
break;
|
break;
|
||||||
case Hls.ErrorDetails.LEVEL_SWITCH_ERROR:
|
case Hls.ErrorDetails.LEVEL_SWITCH_ERROR:
|
||||||
$("#HlsStatus").text("error while trying to switch to level " + data.level);
|
$("#HlsStatus").text("error while trying to switch to level " + data.level);
|
||||||
break;
|
break;
|
||||||
case Hls.ErrorDetails.FRAG_LOAD_ERROR:
|
case Hls.ErrorDetails.FRAG_LOAD_ERROR:
|
||||||
$("#HlsStatus").text("error while trying to load fragment " + data.frag.url);
|
$("#HlsStatus").text("error while loading fragment " + data.frag.url);
|
||||||
break;
|
break;
|
||||||
case Hls.ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
case Hls.ErrorDetails.FRAG_LOAD_TIMEOUT:
|
||||||
$("#HlsStatus").text("timeout while trying to load level playlist");
|
$("#HlsStatus").text("timeout while loading fragment " + data.frag.url);
|
||||||
|
break;
|
||||||
|
case Hls.ErrorDetails.FRAG_LOOP_LOADING_ERROR:
|
||||||
|
$("#HlsStatus").text("Frag Loop Loading Error");
|
||||||
break;
|
break;
|
||||||
case Hls.ErrorDetails.FRAG_DECRYPT_ERROR:
|
case Hls.ErrorDetails.FRAG_DECRYPT_ERROR:
|
||||||
$("#HlsStatus").text("Decrypting Error:" + data.reason);
|
$("#HlsStatus").text("Decrypting Error:" + data.reason);
|
||||||
@ -447,15 +464,18 @@ $(document).ready(function() {
|
|||||||
case Hls.ErrorDetails.FRAG_PARSING_ERROR:
|
case Hls.ErrorDetails.FRAG_PARSING_ERROR:
|
||||||
$("#HlsStatus").text("Parsing Error:" + data.reason);
|
$("#HlsStatus").text("Parsing Error:" + data.reason);
|
||||||
break;
|
break;
|
||||||
|
case Hls.ErrorDetails.KEY_LOAD_ERROR:
|
||||||
|
$("#HlsStatus").text("error while loading key " + data.frag.decryptdata.uri);
|
||||||
|
break;
|
||||||
|
case Hls.ErrorDetails.KEY_LOAD_TIMEOUT:
|
||||||
|
$("#HlsStatus").text("timeout while loading key " + data.frag.decryptdata.uri);
|
||||||
|
break;
|
||||||
case Hls.ErrorDetails.BUFFER_APPEND_ERROR:
|
case Hls.ErrorDetails.BUFFER_APPEND_ERROR:
|
||||||
$("#HlsStatus").text("Buffer Append Error");
|
$("#HlsStatus").text("Buffer Append Error");
|
||||||
break;
|
break;
|
||||||
case Hls.ErrorDetails.BUFFER_APPENDING_ERROR:
|
case Hls.ErrorDetails.BUFFER_APPENDING_ERROR:
|
||||||
$("#HlsStatus").text("Buffer Appending Error");
|
$("#HlsStatus").text("Buffer Appending Error");
|
||||||
break;
|
break;
|
||||||
case Hls.ErrorDetails.FRAG_LOOP_LOADING_ERROR:
|
|
||||||
$("#HlsStatus").text("Frag Loop Loading Error");
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -835,7 +855,7 @@ function timeRangesToString(r) {
|
|||||||
} else {
|
} else {
|
||||||
html3 += button_disabled;
|
html3 += button_disabled;
|
||||||
}
|
}
|
||||||
html3 += 'onclick="hls.autoLevelCapping=-1;updateLevelInfo()">auto</button>';
|
html3 += 'onclick="levelCapping=hls.autoLevelCapping=-1;updateLevelInfo();updatePermalink();">auto</button>';
|
||||||
|
|
||||||
var html4 = button_template;
|
var html4 = button_template;
|
||||||
if(hls.autoLevelEnabled) {
|
if(hls.autoLevelEnabled) {
|
||||||
@ -872,7 +892,7 @@ function timeRangesToString(r) {
|
|||||||
} else {
|
} else {
|
||||||
html3 += button_disabled;
|
html3 += button_disabled;
|
||||||
}
|
}
|
||||||
html3 += 'onclick="hls.autoLevelCapping=' + i + ';updateLevelInfo()">' + levelName + '</button>';
|
html3 += 'onclick="levelCapping=hls.autoLevelCapping=' + i + ';updateLevelInfo();updatePermalink();">' + levelName + '</button>';
|
||||||
|
|
||||||
html4 += button_template;
|
html4 += button_template;
|
||||||
if(hls.nextLevel === i) {
|
if(hls.nextLevel === i) {
|
||||||
@ -925,7 +945,11 @@ function timeRangesToString(r) {
|
|||||||
|
|
||||||
function updatePermalink() {
|
function updatePermalink() {
|
||||||
var url = $('#streamURL').val();
|
var url = $('#streamURL').val();
|
||||||
var hlsLink = document.URL.split('?')[0] + '?src=' + encodeURIComponent(url) + '&enableStreaming=' + enableStreaming + '&autoRecoverError=' + autoRecoverError + '&enableWorker=' + enableWorker;
|
var hlsLink = document.URL.split('?')[0] + '?src=' + encodeURIComponent(url) +
|
||||||
|
'&enableStreaming=' + enableStreaming +
|
||||||
|
'&autoRecoverError=' + autoRecoverError +
|
||||||
|
'&enableWorker=' + enableWorker +
|
||||||
|
'&levelCapping=' + levelCapping;
|
||||||
var description = 'permalink: ' + "<a href=\"" + hlsLink + "\">" + hlsLink + "</a>";
|
var description = 'permalink: ' + "<a href=\"" + hlsLink + "\">" + hlsLink + "</a>";
|
||||||
$("#StreamPermalink").html(description);
|
$("#StreamPermalink").html(description);
|
||||||
}
|
}
|
||||||
|
18
dashboard-ui/bower_components/hls.js/design.md
vendored
18
dashboard-ui/bower_components/hls.js/design.md
vendored
@ -39,10 +39,17 @@ design idea is pretty simple :
|
|||||||
- [src/controller/abr-controller.js][]
|
- [src/controller/abr-controller.js][]
|
||||||
- in charge of determining auto quality level.
|
- in charge of determining auto quality level.
|
||||||
- auto quality switch algorithm is pretty naive and simple ATM and similar to the one that could be found in google [StageFright](https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp)
|
- auto quality switch algorithm is pretty naive and simple ATM and similar to the one that could be found in google [StageFright](https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp)
|
||||||
|
- [src/crypt/aes.js][]
|
||||||
|
- AES 128 software decryption routine, low level class handling decryption of 128 bit of data.
|
||||||
|
- [src/crypt/aes128-decrypter.js][]
|
||||||
|
- AES 128-CBC software decryption routine, high-level class handling cipher-block chaining (CBC), and that should also handle padding (TODO).
|
||||||
|
- [src/crypt/decrypter.js][]
|
||||||
|
- decrypter interface, use either WebCrypto API if available and enabled, or fallback on AES 128 software decryption routine.
|
||||||
- [src/demux/aacdemuxer.js][]
|
- [src/demux/aacdemuxer.js][]
|
||||||
- AAC ES demuxer
|
- AAC ES demuxer
|
||||||
- extract ADTS samples from AAC ES
|
- extract ADTS samples from AAC ES
|
||||||
|
- [src/demux/adts.js][]
|
||||||
|
- ADTS header parser helper, extract audio config from ADTS header. used by AAC ES and TS demuxer.
|
||||||
- [src/demux/demuxer.js][]
|
- [src/demux/demuxer.js][]
|
||||||
- demuxer abstraction interface, that will either use a [Worker](https://en.wikipedia.org/wiki/Web_worker) to demux or demux inline depending on config/browser capabilities.
|
- demuxer abstraction interface, that will either use a [Worker](https://en.wikipedia.org/wiki/Web_worker) to demux or demux inline depending on config/browser capabilities.
|
||||||
- also handle fragment decryption using WebCrypto API (fragment decryption is performed in main thread)
|
- also handle fragment decryption using WebCrypto API (fragment decryption is performed in main thread)
|
||||||
@ -90,6 +97,8 @@ design idea is pretty simple :
|
|||||||
- in charge of converting AVC/AAC samples provided by demuxer into fragmented ISO BMFF boxes, compatible with MediaSource
|
- in charge of converting AVC/AAC samples provided by demuxer into fragmented ISO BMFF boxes, compatible with MediaSource
|
||||||
- this remuxer is able to deal with small gaps between fragments and ensure timestamp continuity.
|
- this remuxer is able to deal with small gaps between fragments and ensure timestamp continuity.
|
||||||
- it notifies remuxing completion using events (```FRAG_PARSING_INIT_SEGMENT```and ```FRAG_PARSING_DATA```)
|
- it notifies remuxing completion using events (```FRAG_PARSING_INIT_SEGMENT```and ```FRAG_PARSING_DATA```)
|
||||||
|
- [src/utils/attr-list.js][]
|
||||||
|
- Attribute List parsing helper class, used by playlist-loader
|
||||||
- [src/utils/binary-search.js][]
|
- [src/utils/binary-search.js][]
|
||||||
- binary search helper class
|
- binary search helper class
|
||||||
- [src/utils/hex.js][]
|
- [src/utils/hex.js][]
|
||||||
@ -111,7 +120,11 @@ design idea is pretty simple :
|
|||||||
[src/controller/fps-controller.js]: src/controller/fps-controller.js
|
[src/controller/fps-controller.js]: src/controller/fps-controller.js
|
||||||
[src/controller/level-controller.js]: src/controller/level-controller.js
|
[src/controller/level-controller.js]: src/controller/level-controller.js
|
||||||
[src/controller/mse-media-controller.js]: src/controller/mse-media-controller.js
|
[src/controller/mse-media-controller.js]: src/controller/mse-media-controller.js
|
||||||
|
[src/crypt/aes.js]: src/crypt/aes.js
|
||||||
|
[src/crypt/aes128-decrypter.js]: src/crypt/aes128-decrypter.js
|
||||||
|
[src/crypt/decrypter.js]: src/crypt/decrypter.js
|
||||||
[src/demux/aacdemuxer.js]: src/demux/aacdemuxer.js
|
[src/demux/aacdemuxer.js]: src/demux/aacdemuxer.js
|
||||||
|
[src/demux/adts.js]: src/demux/adts.js
|
||||||
[src/demux/demuxer.js]: src/demux/demuxer.js
|
[src/demux/demuxer.js]: src/demux/demuxer.js
|
||||||
[src/demux/demuxer-inline.js]: src/demux/demuxer-inline.js
|
[src/demux/demuxer-inline.js]: src/demux/demuxer-inline.js
|
||||||
[src/demux/demuxer-worker.js]: src/demux/demuxer-worker.js
|
[src/demux/demuxer-worker.js]: src/demux/demuxer-worker.js
|
||||||
@ -125,6 +138,7 @@ design idea is pretty simple :
|
|||||||
[src/remux/dummy-remuxer.js]: src/remux/dummy-remuxer.js
|
[src/remux/dummy-remuxer.js]: src/remux/dummy-remuxer.js
|
||||||
[src/remux/mp4-generator.js]: src/remux/mp4-generator.js
|
[src/remux/mp4-generator.js]: src/remux/mp4-generator.js
|
||||||
[src/remux/mp4-remuxer.js]: src/remux/mp4-remuxer.js
|
[src/remux/mp4-remuxer.js]: src/remux/mp4-remuxer.js
|
||||||
|
[src/utils/attr-list.js]: src/utils/attr-list.js
|
||||||
[src/utils/binary-search.js]: src/utils/binary-search.js
|
[src/utils/binary-search.js]: src/utils/binary-search.js
|
||||||
[src/utils/hex.js]: src/utils/hex.js
|
[src/utils/hex.js]: src/utils/hex.js
|
||||||
[src/utils/logger.js]: src/utils/logger.js
|
[src/utils/logger.js]: src/utils/logger.js
|
||||||
@ -151,5 +165,5 @@ design idea is pretty simple :
|
|||||||
- if frag level is 0 or auto level switch is disabled, this error is marked as fatal and a call to ```hls.startLoad()``` could help recover it.
|
- if frag level is 0 or auto level switch is disabled, this error is marked as fatal and a call to ```hls.startLoad()``` could help recover it.
|
||||||
- ```FRAG_PARSING_ERROR``` is raised by [src/demux/tsdemuxer.js][] upon TS parsing error. this error is not fatal.
|
- ```FRAG_PARSING_ERROR``` is raised by [src/demux/tsdemuxer.js][] upon TS parsing error. this error is not fatal.
|
||||||
- ```FRAG_DECRYPT_ERROR``` is raised by [src/demux/demuxer.js][] upon fragment decrypting error. this error is fatal.
|
- ```FRAG_DECRYPT_ERROR``` is raised by [src/demux/demuxer.js][] upon fragment decrypting error. this error is fatal.
|
||||||
- ```BUFFER_PREPARE_APPEND_ERROR``` is raised by [src/controller/mse-media-controller.js][] when an exception is raised when calling sourceBuffer.appendBuffer(). this error is non fatal and become fatal after config.appendErrorMaxRetry retries. when fatal, a call to ```hls.recoverMediaError()``` could help recover it.
|
- ```BUFFER_APPEND_ERROR``` is raised by [src/controller/mse-media-controller.js][] when an exception is raised when calling sourceBuffer.appendBuffer(). this error is non fatal and become fatal after config.appendErrorMaxRetry retries. when fatal, a call to ```hls.recoverMediaError()``` could help recover it.
|
||||||
- ```BUFFER_APPENDING_ERROR``` is raised by [src/controller/mse-media-controller.js][] after SourceBuffer appending error. this error is fatal and a call to ```hls.recoverMediaError()``` could help recover it.
|
- ```BUFFER_APPENDING_ERROR``` is raised by [src/controller/mse-media-controller.js][] after SourceBuffer appending error. this error is fatal and a call to ```hls.recoverMediaError()``` could help recover it.
|
||||||
|
983
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
983
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.3.15",
|
"version": "0.4.5",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
"authors": "Guillaume du Pontavice <guillaume.dupontavice@dailymotion.com>",
|
"authors": "Guillaume du Pontavice <guillaume.dupontavice@dailymotion.com>",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"minify": "uglifyjs dist/hls.js -c sequences=true,dead_code=true,conditionals=true,booleans=true,unused=true,if_return=true,join_vars=true,drop_console=true -m sort --screw-ie8 > dist/hls.min.js",
|
"minify": "uglifyjs dist/hls.js -c sequences=true,dead_code=true,conditionals=true,booleans=true,unused=true,if_return=true,join_vars=true,drop_console=true -m sort --screw-ie8 > dist/hls.min.js",
|
||||||
"watch": "watchify --debug -s Hls src/hls.js -o dist/hls.js",
|
"watch": "watchify --debug -s Hls src/hls.js -o dist/hls.js",
|
||||||
"pretest": "npm run lint",
|
"pretest": "npm run lint",
|
||||||
"test": "mocha --recursive tests/unit",
|
"test": "mocha --compilers js:babel/register --recursive tests/unit",
|
||||||
"lint": "jshint src/",
|
"lint": "jshint src/",
|
||||||
"serve": "http-server -p 8000 .",
|
"serve": "http-server -p 8000 .",
|
||||||
"open": "opener http://localhost:8000/demo/",
|
"open": "opener http://localhost:8000/demo/",
|
||||||
@ -38,7 +38,10 @@
|
|||||||
"webworkify": "^1.0.2"
|
"webworkify": "^1.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"arraybuffer-equal": "^1.0.4",
|
||||||
|
"babel": "^5.8.34",
|
||||||
"browserify": "^8.1.1",
|
"browserify": "^8.1.1",
|
||||||
|
"deep-strict-equal": "^0.1.0",
|
||||||
"exorcist": "^0.4.0",
|
"exorcist": "^0.4.0",
|
||||||
"http-server": "^0.7.4",
|
"http-server": "^0.7.4",
|
||||||
"jshint": "^2.5.11",
|
"jshint": "^2.5.11",
|
||||||
|
@ -15,11 +15,12 @@ const State = {
|
|||||||
IDLE : 0,
|
IDLE : 0,
|
||||||
KEY_LOADING : 1,
|
KEY_LOADING : 1,
|
||||||
FRAG_LOADING : 2,
|
FRAG_LOADING : 2,
|
||||||
WAITING_LEVEL : 3,
|
FRAG_LOADING_WAITING_RETRY : 3,
|
||||||
PARSING : 4,
|
WAITING_LEVEL : 4,
|
||||||
PARSED : 5,
|
PARSING : 5,
|
||||||
APPENDING : 6,
|
PARSED : 6,
|
||||||
BUFFER_FLUSHING : 7
|
APPENDING : 7,
|
||||||
|
BUFFER_FLUSHING : 8
|
||||||
};
|
};
|
||||||
|
|
||||||
class MSEMediaController {
|
class MSEMediaController {
|
||||||
@ -28,6 +29,7 @@ class MSEMediaController {
|
|||||||
this.config = hls.config;
|
this.config = hls.config;
|
||||||
this.audioCodecSwap = false;
|
this.audioCodecSwap = false;
|
||||||
this.hls = hls;
|
this.hls = hls;
|
||||||
|
this.ticks = 0;
|
||||||
// Source Buffer listeners
|
// Source Buffer listeners
|
||||||
this.onsbue = this.onSBUpdateEnd.bind(this);
|
this.onsbue = this.onSBUpdateEnd.bind(this);
|
||||||
this.onsbe = this.onSBUpdateError.bind(this);
|
this.onsbe = this.onSBUpdateError.bind(this);
|
||||||
@ -84,6 +86,7 @@ class MSEMediaController {
|
|||||||
this.demuxer = new Demuxer(hls);
|
this.demuxer = new Demuxer(hls);
|
||||||
this.timer = setInterval(this.ontick, 100);
|
this.timer = setInterval(this.ontick, 100);
|
||||||
this.level = -1;
|
this.level = -1;
|
||||||
|
this.fragLoadError = 0;
|
||||||
hls.on(Event.FRAG_LOADED, this.onfl);
|
hls.on(Event.FRAG_LOADED, this.onfl);
|
||||||
hls.on(Event.FRAG_PARSING_INIT_SEGMENT, this.onis);
|
hls.on(Event.FRAG_PARSING_INIT_SEGMENT, this.onis);
|
||||||
hls.on(Event.FRAG_PARSING_DATA, this.onfpg);
|
hls.on(Event.FRAG_PARSING_DATA, this.onfpg);
|
||||||
@ -136,6 +139,17 @@ class MSEMediaController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tick() {
|
tick() {
|
||||||
|
this.ticks++;
|
||||||
|
if (this.ticks === 1) {
|
||||||
|
this.doTick();
|
||||||
|
if (this.ticks > 1) {
|
||||||
|
setTimeout(this.tick, 1);
|
||||||
|
}
|
||||||
|
this.ticks = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
doTick() {
|
||||||
var pos, level, levelDetails, hls = this.hls;
|
var pos, level, levelDetails, hls = this.hls;
|
||||||
switch(this.state) {
|
switch(this.state) {
|
||||||
case State.ERROR:
|
case State.ERROR:
|
||||||
@ -367,6 +381,17 @@ class MSEMediaController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case State.FRAG_LOADING_WAITING_RETRY:
|
||||||
|
var now = performance.now();
|
||||||
|
var retryDate = this.retryDate;
|
||||||
|
var media = this.media;
|
||||||
|
var isSeeking = media && media.seeking;
|
||||||
|
// if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading
|
||||||
|
if(!retryDate || (now >= retryDate) || isSeeking) {
|
||||||
|
logger.log(`mediaController: retryDate reached, switch back to IDLE state`);
|
||||||
|
this.state = State.IDLE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case State.PARSING:
|
case State.PARSING:
|
||||||
// nothing to do, wait for fragment being parsed
|
// nothing to do, wait for fragment being parsed
|
||||||
break;
|
break;
|
||||||
@ -454,10 +479,10 @@ class MSEMediaController {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// check/update current fragment
|
|
||||||
this._checkFragmentChanged();
|
|
||||||
// check buffer
|
// check buffer
|
||||||
this._checkBuffer();
|
this._checkBuffer();
|
||||||
|
// check/update current fragment
|
||||||
|
this._checkFragmentChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -876,8 +901,12 @@ class MSEMediaController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMediaMetadata() {
|
onMediaMetadata() {
|
||||||
if (this.media.currentTime !== this.startPosition) {
|
var media = this.media,
|
||||||
this.media.currentTime = this.startPosition;
|
currentTime = media.currentTime;
|
||||||
|
// only adjust currentTime if not equal to 0
|
||||||
|
if (!currentTime && currentTime !== this.startPosition) {
|
||||||
|
logger.log('onMediaMetadata: adjust currentTime to startPosition');
|
||||||
|
media.currentTime = this.startPosition;
|
||||||
}
|
}
|
||||||
this.loadedmetadata = true;
|
this.loadedmetadata = true;
|
||||||
this.tick();
|
this.tick();
|
||||||
@ -992,8 +1021,11 @@ class MSEMediaController {
|
|||||||
level = fragCurrent.level,
|
level = fragCurrent.level,
|
||||||
sn = fragCurrent.sn,
|
sn = fragCurrent.sn,
|
||||||
audioCodec = currentLevel.audioCodec;
|
audioCodec = currentLevel.audioCodec;
|
||||||
if(audioCodec && this.audioCodecSwap) {
|
if(this.audioCodecSwap) {
|
||||||
logger.log('swapping playlist audio codec');
|
logger.log('swapping playlist audio codec');
|
||||||
|
if(audioCodec === undefined) {
|
||||||
|
audioCodec = this.lastAudioCodec;
|
||||||
|
}
|
||||||
if(audioCodec.indexOf('mp4a.40.5') !==-1) {
|
if(audioCodec.indexOf('mp4a.40.5') !==-1) {
|
||||||
audioCodec = 'mp4a.40.2';
|
audioCodec = 'mp4a.40.2';
|
||||||
} else {
|
} else {
|
||||||
@ -1012,6 +1044,7 @@ class MSEMediaController {
|
|||||||
// check if codecs have been explicitely defined in the master playlist for this level;
|
// check if codecs have been explicitely defined in the master playlist for this level;
|
||||||
// if yes use these ones instead of the ones parsed from the demux
|
// if yes use these ones instead of the ones parsed from the demux
|
||||||
var audioCodec = this.levels[this.level].audioCodec, videoCodec = this.levels[this.level].videoCodec, sb;
|
var audioCodec = this.levels[this.level].audioCodec, videoCodec = this.levels[this.level].videoCodec, sb;
|
||||||
|
this.lastAudioCodec = data.audioCodec;
|
||||||
if(audioCodec && this.audioCodecSwap) {
|
if(audioCodec && this.audioCodecSwap) {
|
||||||
logger.log('swapping playlist audio codec');
|
logger.log('swapping playlist audio codec');
|
||||||
if(audioCodec.indexOf('mp4a.40.5') !==-1) {
|
if(audioCodec.indexOf('mp4a.40.5') !==-1) {
|
||||||
@ -1070,7 +1103,7 @@ class MSEMediaController {
|
|||||||
this.tparse2 = Date.now();
|
this.tparse2 = Date.now();
|
||||||
var level = this.levels[this.level],
|
var level = this.levels[this.level],
|
||||||
frag = this.fragCurrent;
|
frag = this.fragCurrent;
|
||||||
logger.log(`parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:${data.type}/${data.startPTS.toFixed(3)}/${data.endPTS.toFixed(3)}/${data.startDTS.toFixed(3)}/${data.endDTS.toFixed(3)}/${data.nb}`);
|
logger.log(`parsed ${data.type},PTS:[${data.startPTS.toFixed(3)},${data.endPTS.toFixed(3)}],DTS:[${data.startDTS.toFixed(3)}/${data.endDTS.toFixed(3)}],nb:${data.nb}`);
|
||||||
var drift = LevelHelper.updateFragPTS(level.details,frag.sn,data.startPTS,data.endPTS);
|
var drift = LevelHelper.updateFragPTS(level.details,frag.sn,data.startPTS,data.endPTS);
|
||||||
this.hls.trigger(Event.LEVEL_PTS_UPDATED, {details: level.details, level: this.level, drift: drift});
|
this.hls.trigger(Event.LEVEL_PTS_UPDATED, {details: level.details, level: this.level, drift: drift});
|
||||||
|
|
||||||
@ -1097,9 +1130,9 @@ class MSEMediaController {
|
|||||||
|
|
||||||
onError(event, data) {
|
onError(event, data) {
|
||||||
switch(data.details) {
|
switch(data.details) {
|
||||||
// abort fragment loading on errors
|
|
||||||
case ErrorDetails.FRAG_LOAD_ERROR:
|
case ErrorDetails.FRAG_LOAD_ERROR:
|
||||||
case ErrorDetails.FRAG_LOAD_TIMEOUT:
|
case ErrorDetails.FRAG_LOAD_TIMEOUT:
|
||||||
|
if(!data.fatal) {
|
||||||
var loadError = this.fragLoadError;
|
var loadError = this.fragLoadError;
|
||||||
if(loadError) {
|
if(loadError) {
|
||||||
loadError++;
|
loadError++;
|
||||||
@ -1108,8 +1141,14 @@ class MSEMediaController {
|
|||||||
}
|
}
|
||||||
if (loadError <= this.config.fragLoadingMaxRetry) {
|
if (loadError <= this.config.fragLoadingMaxRetry) {
|
||||||
this.fragLoadError = loadError;
|
this.fragLoadError = loadError;
|
||||||
// retry loading
|
// reset load counter to avoid frag loop loading error
|
||||||
this.state = State.IDLE;
|
data.frag.loadCounter = 0;
|
||||||
|
// exponential backoff capped to 64s
|
||||||
|
var delay = Math.min(Math.pow(2,loadError-1)*this.config.fragLoadingRetryDelay,64000);
|
||||||
|
logger.warn(`mediaController: frag loading failed, retry in ${delay} ms`);
|
||||||
|
this.retryDate = performance.now() + delay;
|
||||||
|
// retry loading state
|
||||||
|
this.state = State.FRAG_LOADING_WAITING_RETRY;
|
||||||
} else {
|
} else {
|
||||||
logger.error(`mediaController: ${data.details} reaches max retry, redispatch as fatal ...`);
|
logger.error(`mediaController: ${data.details} reaches max retry, redispatch as fatal ...`);
|
||||||
// redispatch same error but with fatal set to true
|
// redispatch same error but with fatal set to true
|
||||||
@ -1117,6 +1156,7 @@ class MSEMediaController {
|
|||||||
this.hls.trigger(event, data);
|
this.hls.trigger(event, data);
|
||||||
this.state = State.ERROR;
|
this.state = State.ERROR;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ErrorDetails.FRAG_LOOP_LOADING_ERROR:
|
case ErrorDetails.FRAG_LOOP_LOADING_ERROR:
|
||||||
case ErrorDetails.LEVEL_LOAD_ERROR:
|
case ErrorDetails.LEVEL_LOAD_ERROR:
|
||||||
@ -1162,20 +1202,30 @@ _checkBuffer() {
|
|||||||
media.currentTime = seekAfterBuffered;
|
media.currentTime = seekAfterBuffered;
|
||||||
this.seekAfterBuffered = undefined;
|
this.seekAfterBuffered = undefined;
|
||||||
}
|
}
|
||||||
} else if(readyState < 3 ) {
|
} else {
|
||||||
// readyState = 1 or 2
|
var currentTime = media.currentTime,
|
||||||
// HAVE_METADATA (numeric value 1) Enough of the resource has been obtained that the duration of the resource is available.
|
bufferInfo = this.bufferInfo(currentTime,0),
|
||||||
// The API will no longer throw an exception when seeking.
|
isPlaying = !(media.paused || media.ended || media.seeking || readyState < 3),
|
||||||
// HAVE_CURRENT_DATA (numeric value 2) Data for the immediate current playback position is available,
|
jumpThreshold = 0.2;
|
||||||
// but either not enough data is available that the user agent could
|
|
||||||
// successfully advance the current playback position
|
// check buffer upfront
|
||||||
var currentTime = media.currentTime;
|
// if less than 200ms is buffered, and media is playing but playhead is not moving,
|
||||||
var bufferInfo = this.bufferInfo(currentTime,0);
|
// and we have a new buffer range available upfront, let's seek to that one
|
||||||
// check if current time is buffered or not
|
if(bufferInfo.len <= jumpThreshold) {
|
||||||
if(bufferInfo.len === 0) {
|
if(currentTime > media.playbackRate*this.lastCurrentTime || !isPlaying) {
|
||||||
// no buffer available @ currentTime, check if next buffer is close (in a 300 ms range)
|
// playhead moving or media not playing
|
||||||
var nextBufferStart = bufferInfo.nextStart;
|
jumpThreshold = 0;
|
||||||
if(nextBufferStart && (nextBufferStart - currentTime < 0.3)) {
|
} else {
|
||||||
|
logger.trace('playback seems stuck');
|
||||||
|
}
|
||||||
|
// if we are below threshold, try to jump if next buffer range is close
|
||||||
|
if(bufferInfo.len <= jumpThreshold) {
|
||||||
|
// no buffer available @ currentTime, check if next buffer is close (more than 5ms diff but within a 300 ms range)
|
||||||
|
var nextBufferStart = bufferInfo.nextStart, delta = nextBufferStart-currentTime;
|
||||||
|
if(nextBufferStart &&
|
||||||
|
(delta < 0.3) &&
|
||||||
|
(delta > 0.005) &&
|
||||||
|
!media.seeking) {
|
||||||
// next buffer is close ! adjust currentTime to nextBufferStart
|
// next buffer is close ! adjust currentTime to nextBufferStart
|
||||||
// this will ensure effective video decoding
|
// this will ensure effective video decoding
|
||||||
logger.log(`adjust currentTime from ${currentTime} to ${nextBufferStart}`);
|
logger.log(`adjust currentTime from ${currentTime} to ${nextBufferStart}`);
|
||||||
@ -1186,6 +1236,7 @@ _checkBuffer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
swapAudioCodec() {
|
swapAudioCodec() {
|
||||||
this.audioCodecSwap = !this.audioCodecSwap;
|
this.audioCodecSwap = !this.audioCodecSwap;
|
||||||
|
@ -130,7 +130,7 @@ class AES128Decrypter {
|
|||||||
return decrypted;
|
return decrypted;
|
||||||
}
|
}
|
||||||
|
|
||||||
localDecript(encrypted, key, initVector, decrypted) {
|
localDecrypt(encrypted, key, initVector, decrypted) {
|
||||||
var bytes = this.doDecrypt(encrypted,
|
var bytes = this.doDecrypt(encrypted,
|
||||||
key,
|
key,
|
||||||
initVector);
|
initVector);
|
||||||
@ -148,7 +148,7 @@ class AES128Decrypter {
|
|||||||
// split up the encryption job and do the individual chunks asynchronously
|
// split up the encryption job and do the individual chunks asynchronously
|
||||||
var key = this.key;
|
var key = this.key;
|
||||||
var initVector = this.iv;
|
var initVector = this.iv;
|
||||||
this.localDecript(encrypted32.subarray(i, i + step), key, initVector, decrypted);
|
this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);
|
||||||
|
|
||||||
for (i = step; i < encrypted32.length; i += step) {
|
for (i = step; i < encrypted32.length; i += step) {
|
||||||
initVector = new Uint32Array([
|
initVector = new Uint32Array([
|
||||||
@ -157,7 +157,7 @@ class AES128Decrypter {
|
|||||||
this.ntoh(encrypted32[i - 2]),
|
this.ntoh(encrypted32[i - 2]),
|
||||||
this.ntoh(encrypted32[i - 1])
|
this.ntoh(encrypted32[i - 1])
|
||||||
]);
|
]);
|
||||||
this.localDecript(encrypted32.subarray(i, i + step), key, initVector, decrypted);
|
this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);
|
||||||
}
|
}
|
||||||
|
|
||||||
return decrypted;
|
return decrypted;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* AAC demuxer
|
* AAC demuxer
|
||||||
*/
|
*/
|
||||||
|
import ADTS from './adts';
|
||||||
import {logger} from '../utils/logger';
|
import {logger} from '../utils/logger';
|
||||||
import ID3 from '../demux/id3';
|
import ID3 from '../demux/id3';
|
||||||
import {ErrorTypes, ErrorDetails} from '../errors';
|
|
||||||
|
|
||||||
class AACDemuxer {
|
class AACDemuxer {
|
||||||
|
|
||||||
@ -32,7 +32,10 @@ import {ErrorTypes, ErrorDetails} from '../errors';
|
|||||||
|
|
||||||
// feed incoming data to the front of the parsing pipeline
|
// feed incoming data to the front of the parsing pipeline
|
||||||
push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration) {
|
push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration) {
|
||||||
var id3 = new ID3(data), adtsStartOffset,len, track = this._aacTrack, pts = id3.timeStamp, config, nbSamples,adtsFrameSize,adtsHeaderLen,stamp,aacSample;
|
var track = this._aacTrack,
|
||||||
|
id3 = new ID3(data),
|
||||||
|
pts = 90*id3.timeStamp,
|
||||||
|
config, adtsFrameSize, adtsStartOffset, adtsHeaderLen, stamp, nbSamples, len, aacSample;
|
||||||
// look for ADTS header (0xFFFx)
|
// look for ADTS header (0xFFFx)
|
||||||
for (adtsStartOffset = id3.length, len = data.length; adtsStartOffset < len - 1; adtsStartOffset++) {
|
for (adtsStartOffset = id3.length, len = data.length; adtsStartOffset < len - 1; adtsStartOffset++) {
|
||||||
if ((data[adtsStartOffset] === 0xff) && (data[adtsStartOffset+1] & 0xf0) === 0xf0) {
|
if ((data[adtsStartOffset] === 0xff) && (data[adtsStartOffset+1] & 0xf0) === 0xf0) {
|
||||||
@ -41,7 +44,7 @@ import {ErrorTypes, ErrorDetails} from '../errors';
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!track.audiosamplerate) {
|
if (!track.audiosamplerate) {
|
||||||
config = this._ADTStoAudioConfig(data, adtsStartOffset, audioCodec);
|
config = ADTS.getAudioConfig(this.observer,data, adtsStartOffset, audioCodec);
|
||||||
track.config = config.config;
|
track.config = config.config;
|
||||||
track.audiosamplerate = config.samplerate;
|
track.audiosamplerate = config.samplerate;
|
||||||
track.channelCount = config.channelCount;
|
track.channelCount = config.channelCount;
|
||||||
@ -60,7 +63,7 @@ import {ErrorTypes, ErrorDetails} from '../errors';
|
|||||||
adtsFrameSize |= ((data[adtsStartOffset + 5] & 0xE0) >>> 5);
|
adtsFrameSize |= ((data[adtsStartOffset + 5] & 0xE0) >>> 5);
|
||||||
adtsHeaderLen = (!!(data[adtsStartOffset + 1] & 0x01) ? 7 : 9);
|
adtsHeaderLen = (!!(data[adtsStartOffset + 1] & 0x01) ? 7 : 9);
|
||||||
adtsFrameSize -= adtsHeaderLen;
|
adtsFrameSize -= adtsHeaderLen;
|
||||||
stamp = Math.round(90*pts + nbSamples * 1024 * 90000 / track.audiosamplerate);
|
stamp = Math.round(pts + nbSamples * 1024 * 90000 / track.audiosamplerate);
|
||||||
//stamp = pes.pts;
|
//stamp = pes.pts;
|
||||||
//console.log('AAC frame, offset/length/pts:' + (adtsStartOffset+7) + '/' + adtsFrameSize + '/' + stamp.toFixed(0));
|
//console.log('AAC frame, offset/length/pts:' + (adtsStartOffset+7) + '/' + adtsFrameSize + '/' + stamp.toFixed(0));
|
||||||
if ((adtsFrameSize > 0) && ((adtsStartOffset + adtsHeaderLen + adtsFrameSize) <= len)) {
|
if ((adtsFrameSize > 0) && ((adtsStartOffset + adtsHeaderLen + adtsFrameSize) <= len)) {
|
||||||
@ -82,124 +85,6 @@ import {ErrorTypes, ErrorDetails} from '../errors';
|
|||||||
this.remuxer.remux(this._aacTrack,{samples : []}, {samples : [ { pts: pts, dts : pts, unit : id3.payload} ]}, timeOffset);
|
this.remuxer.remux(this._aacTrack,{samples : []}, {samples : [ { pts: pts, dts : pts, unit : id3.payload} ]}, timeOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ADTStoAudioConfig(data, offset, audioCodec) {
|
|
||||||
var adtsObjectType, // :int
|
|
||||||
adtsSampleingIndex, // :int
|
|
||||||
adtsExtensionSampleingIndex, // :int
|
|
||||||
adtsChanelConfig, // :int
|
|
||||||
config,
|
|
||||||
userAgent = navigator.userAgent.toLowerCase(),
|
|
||||||
adtsSampleingRates = [
|
|
||||||
96000, 88200,
|
|
||||||
64000, 48000,
|
|
||||||
44100, 32000,
|
|
||||||
24000, 22050,
|
|
||||||
16000, 12000,
|
|
||||||
11025, 8000,
|
|
||||||
7350];
|
|
||||||
// byte 2
|
|
||||||
adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;
|
|
||||||
adtsSampleingIndex = ((data[offset + 2] & 0x3C) >>> 2);
|
|
||||||
if(adtsSampleingIndex > adtsSampleingRates.length-1) {
|
|
||||||
this.observer.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: `invalid ADTS sampling index:${adtsSampleingIndex}`});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
adtsChanelConfig = ((data[offset + 2] & 0x01) << 2);
|
|
||||||
// byte 3
|
|
||||||
adtsChanelConfig |= ((data[offset + 3] & 0xC0) >>> 6);
|
|
||||||
logger.log(`manifest codec:${audioCodec},ADTS data:type:${adtsObjectType},sampleingIndex:${adtsSampleingIndex}[${adtsSampleingRates[adtsSampleingIndex]}Hz],channelConfig:${adtsChanelConfig}`);
|
|
||||||
// firefox: freq less than 24kHz = AAC SBR (HE-AAC)
|
|
||||||
if (userAgent.indexOf('firefox') !== -1) {
|
|
||||||
if (adtsSampleingIndex >= 6) {
|
|
||||||
adtsObjectType = 5;
|
|
||||||
config = new Array(4);
|
|
||||||
// HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
|
|
||||||
// there is a factor 2 between frame sample rate and output sample rate
|
|
||||||
// multiply frequency by 2 (see table below, equivalent to substract 3)
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
|
|
||||||
} else {
|
|
||||||
adtsObjectType = 2;
|
|
||||||
config = new Array(2);
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
|
||||||
}
|
|
||||||
// Android : always use AAC
|
|
||||||
} else if (userAgent.indexOf('android') !== -1) {
|
|
||||||
adtsObjectType = 2;
|
|
||||||
config = new Array(2);
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
|
||||||
} else {
|
|
||||||
/* for other browsers (chrome ...)
|
|
||||||
always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)
|
|
||||||
*/
|
|
||||||
adtsObjectType = 5;
|
|
||||||
config = new Array(4);
|
|
||||||
// if (manifest codec is HE-AAC) OR (manifest codec not specified AND frequency less than 24kHz)
|
|
||||||
if ((audioCodec && audioCodec.indexOf('mp4a.40.5') !== -1) || (!audioCodec && adtsSampleingIndex >= 6)) {
|
|
||||||
// HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
|
|
||||||
// there is a factor 2 between frame sample rate and output sample rate
|
|
||||||
// multiply frequency by 2 (see table below, equivalent to substract 3)
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
|
|
||||||
} else {
|
|
||||||
// if (manifest codec is AAC) AND (frequency less than 24kHz OR nb channel is 1)
|
|
||||||
if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && (adtsSampleingIndex >= 6 || adtsChanelConfig === 1)) {
|
|
||||||
adtsObjectType = 2;
|
|
||||||
config = new Array(2);
|
|
||||||
}
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config
|
|
||||||
ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()
|
|
||||||
Audio Profile / Audio Object Type
|
|
||||||
0: Null
|
|
||||||
1: AAC Main
|
|
||||||
2: AAC LC (Low Complexity)
|
|
||||||
3: AAC SSR (Scalable Sample Rate)
|
|
||||||
4: AAC LTP (Long Term Prediction)
|
|
||||||
5: SBR (Spectral Band Replication)
|
|
||||||
6: AAC Scalable
|
|
||||||
sampling freq
|
|
||||||
0: 96000 Hz
|
|
||||||
1: 88200 Hz
|
|
||||||
2: 64000 Hz
|
|
||||||
3: 48000 Hz
|
|
||||||
4: 44100 Hz
|
|
||||||
5: 32000 Hz
|
|
||||||
6: 24000 Hz
|
|
||||||
7: 22050 Hz
|
|
||||||
8: 16000 Hz
|
|
||||||
9: 12000 Hz
|
|
||||||
10: 11025 Hz
|
|
||||||
11: 8000 Hz
|
|
||||||
12: 7350 Hz
|
|
||||||
13: Reserved
|
|
||||||
14: Reserved
|
|
||||||
15: frequency is written explictly
|
|
||||||
Channel Configurations
|
|
||||||
These are the channel configurations:
|
|
||||||
0: Defined in AOT Specifc Config
|
|
||||||
1: 1 channel: front-center
|
|
||||||
2: 2 channels: front-left, front-right
|
|
||||||
*/
|
|
||||||
// audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1
|
|
||||||
config[0] = adtsObjectType << 3;
|
|
||||||
// samplingFrequencyIndex
|
|
||||||
config[0] |= (adtsSampleingIndex & 0x0E) >> 1;
|
|
||||||
config[1] |= (adtsSampleingIndex & 0x01) << 7;
|
|
||||||
// channelConfiguration
|
|
||||||
config[1] |= adtsChanelConfig << 3;
|
|
||||||
if (adtsObjectType === 5) {
|
|
||||||
// adtsExtensionSampleingIndex
|
|
||||||
config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;
|
|
||||||
config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;
|
|
||||||
// adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???
|
|
||||||
// https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc
|
|
||||||
config[2] |= 2 << 2;
|
|
||||||
config[3] = 0;
|
|
||||||
}
|
|
||||||
return {config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: ('mp4a.40.' + adtsObjectType)};
|
|
||||||
}
|
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
132
dashboard-ui/bower_components/hls.js/src/demux/adts.js
vendored
Normal file
132
dashboard-ui/bower_components/hls.js/src/demux/adts.js
vendored
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
/**
|
||||||
|
* ADTS parser helper
|
||||||
|
*/
|
||||||
|
import {logger} from '../utils/logger';
|
||||||
|
import {ErrorTypes, ErrorDetails} from '../errors';
|
||||||
|
|
||||||
|
class ADTS {
|
||||||
|
|
||||||
|
static getAudioConfig(observer, data, offset, audioCodec) {
|
||||||
|
var adtsObjectType, // :int
|
||||||
|
adtsSampleingIndex, // :int
|
||||||
|
adtsExtensionSampleingIndex, // :int
|
||||||
|
adtsChanelConfig, // :int
|
||||||
|
config,
|
||||||
|
userAgent = navigator.userAgent.toLowerCase(),
|
||||||
|
adtsSampleingRates = [
|
||||||
|
96000, 88200,
|
||||||
|
64000, 48000,
|
||||||
|
44100, 32000,
|
||||||
|
24000, 22050,
|
||||||
|
16000, 12000,
|
||||||
|
11025, 8000,
|
||||||
|
7350];
|
||||||
|
// byte 2
|
||||||
|
adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;
|
||||||
|
adtsSampleingIndex = ((data[offset + 2] & 0x3C) >>> 2);
|
||||||
|
if(adtsSampleingIndex > adtsSampleingRates.length-1) {
|
||||||
|
observer.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: `invalid ADTS sampling index:${adtsSampleingIndex}`});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
adtsChanelConfig = ((data[offset + 2] & 0x01) << 2);
|
||||||
|
// byte 3
|
||||||
|
adtsChanelConfig |= ((data[offset + 3] & 0xC0) >>> 6);
|
||||||
|
logger.log(`manifest codec:${audioCodec},ADTS data:type:${adtsObjectType},sampleingIndex:${adtsSampleingIndex}[${adtsSampleingRates[adtsSampleingIndex]}Hz],channelConfig:${adtsChanelConfig}`);
|
||||||
|
// firefox: freq less than 24kHz = AAC SBR (HE-AAC)
|
||||||
|
if (userAgent.indexOf('firefox') !== -1) {
|
||||||
|
if (adtsSampleingIndex >= 6) {
|
||||||
|
adtsObjectType = 5;
|
||||||
|
config = new Array(4);
|
||||||
|
// HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
|
||||||
|
// there is a factor 2 between frame sample rate and output sample rate
|
||||||
|
// multiply frequency by 2 (see table below, equivalent to substract 3)
|
||||||
|
adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
|
||||||
|
} else {
|
||||||
|
adtsObjectType = 2;
|
||||||
|
config = new Array(2);
|
||||||
|
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
||||||
|
}
|
||||||
|
// Android : always use AAC
|
||||||
|
} else if (userAgent.indexOf('android') !== -1) {
|
||||||
|
adtsObjectType = 2;
|
||||||
|
config = new Array(2);
|
||||||
|
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
||||||
|
} else {
|
||||||
|
/* for other browsers (chrome ...)
|
||||||
|
always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)
|
||||||
|
*/
|
||||||
|
adtsObjectType = 5;
|
||||||
|
config = new Array(4);
|
||||||
|
// if (manifest codec is HE-AAC or HE-AACv2) OR (manifest codec not specified AND frequency less than 24kHz)
|
||||||
|
if ((audioCodec && ((audioCodec.indexOf('mp4a.40.29') !== -1) ||
|
||||||
|
(audioCodec.indexOf('mp4a.40.5') !== -1))) ||
|
||||||
|
(!audioCodec && adtsSampleingIndex >= 6)) {
|
||||||
|
// HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
|
||||||
|
// there is a factor 2 between frame sample rate and output sample rate
|
||||||
|
// multiply frequency by 2 (see table below, equivalent to substract 3)
|
||||||
|
adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
|
||||||
|
} else {
|
||||||
|
// if (manifest codec is AAC) AND (frequency less than 24kHz OR nb channel is 1) OR (manifest codec not specified and mono audio)
|
||||||
|
// Chrome fails to play back with AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.
|
||||||
|
if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && (adtsSampleingIndex >= 6 || adtsChanelConfig === 1) ||
|
||||||
|
(!audioCodec && adtsChanelConfig === 1)) {
|
||||||
|
adtsObjectType = 2;
|
||||||
|
config = new Array(2);
|
||||||
|
}
|
||||||
|
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config
|
||||||
|
ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()
|
||||||
|
Audio Profile / Audio Object Type
|
||||||
|
0: Null
|
||||||
|
1: AAC Main
|
||||||
|
2: AAC LC (Low Complexity)
|
||||||
|
3: AAC SSR (Scalable Sample Rate)
|
||||||
|
4: AAC LTP (Long Term Prediction)
|
||||||
|
5: SBR (Spectral Band Replication)
|
||||||
|
6: AAC Scalable
|
||||||
|
sampling freq
|
||||||
|
0: 96000 Hz
|
||||||
|
1: 88200 Hz
|
||||||
|
2: 64000 Hz
|
||||||
|
3: 48000 Hz
|
||||||
|
4: 44100 Hz
|
||||||
|
5: 32000 Hz
|
||||||
|
6: 24000 Hz
|
||||||
|
7: 22050 Hz
|
||||||
|
8: 16000 Hz
|
||||||
|
9: 12000 Hz
|
||||||
|
10: 11025 Hz
|
||||||
|
11: 8000 Hz
|
||||||
|
12: 7350 Hz
|
||||||
|
13: Reserved
|
||||||
|
14: Reserved
|
||||||
|
15: frequency is written explictly
|
||||||
|
Channel Configurations
|
||||||
|
These are the channel configurations:
|
||||||
|
0: Defined in AOT Specifc Config
|
||||||
|
1: 1 channel: front-center
|
||||||
|
2: 2 channels: front-left, front-right
|
||||||
|
*/
|
||||||
|
// audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1
|
||||||
|
config[0] = adtsObjectType << 3;
|
||||||
|
// samplingFrequencyIndex
|
||||||
|
config[0] |= (adtsSampleingIndex & 0x0E) >> 1;
|
||||||
|
config[1] |= (adtsSampleingIndex & 0x01) << 7;
|
||||||
|
// channelConfiguration
|
||||||
|
config[1] |= adtsChanelConfig << 3;
|
||||||
|
if (adtsObjectType === 5) {
|
||||||
|
// adtsExtensionSampleingIndex
|
||||||
|
config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;
|
||||||
|
config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;
|
||||||
|
// adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???
|
||||||
|
// https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc
|
||||||
|
config[2] |= 2 << 2;
|
||||||
|
config[3] = 0;
|
||||||
|
}
|
||||||
|
return {config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: ('mp4a.40.' + adtsObjectType)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ADTS;
|
@ -179,7 +179,12 @@ class ExpGolomb {
|
|||||||
if (profileIdc === 100 ||
|
if (profileIdc === 100 ||
|
||||||
profileIdc === 110 ||
|
profileIdc === 110 ||
|
||||||
profileIdc === 122 ||
|
profileIdc === 122 ||
|
||||||
profileIdc === 144) {
|
profileIdc === 244 ||
|
||||||
|
profileIdc === 44 ||
|
||||||
|
profileIdc === 83 ||
|
||||||
|
profileIdc === 86 ||
|
||||||
|
profileIdc === 118 ||
|
||||||
|
profileIdc === 128) {
|
||||||
var chromaFormatIdc = this.readUEG();
|
var chromaFormatIdc = this.readUEG();
|
||||||
if (chromaFormatIdc === 3) {
|
if (chromaFormatIdc === 3) {
|
||||||
this.skipBits(1); // separate_colour_plane_flag
|
this.skipBits(1); // separate_colour_plane_flag
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.
|
* upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import ADTS from './adts';
|
||||||
import Event from '../events';
|
import Event from '../events';
|
||||||
import ExpGolomb from './exp-golomb';
|
import ExpGolomb from './exp-golomb';
|
||||||
// import Hex from '../utils/hex';
|
// import Hex from '../utils/hex';
|
||||||
@ -21,7 +22,6 @@
|
|||||||
this.observer = observer;
|
this.observer = observer;
|
||||||
this.remuxerClass = remuxerClass;
|
this.remuxerClass = remuxerClass;
|
||||||
this.lastCC = 0;
|
this.lastCC = 0;
|
||||||
this.PES_TIMESCALE = 90000;
|
|
||||||
this.remuxer = new this.remuxerClass(observer);
|
this.remuxer = new this.remuxerClass(observer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,16 +423,19 @@
|
|||||||
// If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.
|
// If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.
|
||||||
overflow = i - state - 1;
|
overflow = i - state - 1;
|
||||||
if (overflow) {
|
if (overflow) {
|
||||||
|
var track = this._avcTrack,
|
||||||
|
samples = track.samples;
|
||||||
//logger.log('first NALU found with overflow:' + overflow);
|
//logger.log('first NALU found with overflow:' + overflow);
|
||||||
if (this._avcTrack.samples.length) {
|
if (samples.length) {
|
||||||
var lastavcSample = this._avcTrack.samples[this._avcTrack.samples.length - 1];
|
var lastavcSample = samples[samples.length - 1],
|
||||||
var lastUnit = lastavcSample.units.units[lastavcSample.units.units.length - 1];
|
lastUnits = lastavcSample.units.units,
|
||||||
var tmp = new Uint8Array(lastUnit.data.byteLength + overflow);
|
lastUnit = lastUnits[lastUnits.length - 1],
|
||||||
|
tmp = new Uint8Array(lastUnit.data.byteLength + overflow);
|
||||||
tmp.set(lastUnit.data, 0);
|
tmp.set(lastUnit.data, 0);
|
||||||
tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);
|
tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);
|
||||||
lastUnit.data = tmp;
|
lastUnit.data = tmp;
|
||||||
lastavcSample.units.length += overflow;
|
lastavcSample.units.length += overflow;
|
||||||
this._avcTrack.len += overflow;
|
track.len += overflow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -460,7 +463,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
_parseAACPES(pes) {
|
_parseAACPES(pes) {
|
||||||
var track = this._aacTrack, aacSample, data = pes.data, config, adtsFrameSize, adtsStartOffset, adtsHeaderLen, stamp, nbSamples, len;
|
var track = this._aacTrack,
|
||||||
|
data = pes.data,
|
||||||
|
pts = pes.pts,
|
||||||
|
startOffset = 0,
|
||||||
|
duration = this._duration,
|
||||||
|
audioCodec = this.audioCodec,
|
||||||
|
config, frameLength, frameDuration, frameIndex, offset, headerLength, stamp, len, aacSample;
|
||||||
if (this.aacOverFlow) {
|
if (this.aacOverFlow) {
|
||||||
var tmp = new Uint8Array(this.aacOverFlow.byteLength + data.byteLength);
|
var tmp = new Uint8Array(this.aacOverFlow.byteLength + data.byteLength);
|
||||||
tmp.set(this.aacOverFlow, 0);
|
tmp.set(this.aacOverFlow, 0);
|
||||||
@ -468,16 +477,16 @@
|
|||||||
data = tmp;
|
data = tmp;
|
||||||
}
|
}
|
||||||
// look for ADTS header (0xFFFx)
|
// look for ADTS header (0xFFFx)
|
||||||
for (adtsStartOffset = 0, len = data.length; adtsStartOffset < len - 1; adtsStartOffset++) {
|
for (offset = startOffset, len = data.length; offset < len - 1; offset++) {
|
||||||
if ((data[adtsStartOffset] === 0xff) && (data[adtsStartOffset+1] & 0xf0) === 0xf0) {
|
if ((data[offset] === 0xff) && (data[offset+1] & 0xf0) === 0xf0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if ADTS header does not start straight from the beginning of the PES payload, raise an error
|
// if ADTS header does not start straight from the beginning of the PES payload, raise an error
|
||||||
if (adtsStartOffset) {
|
if (offset) {
|
||||||
var reason, fatal;
|
var reason, fatal;
|
||||||
if (adtsStartOffset < len - 1) {
|
if (offset < len - 1) {
|
||||||
reason = `AAC PES did not start with ADTS header,offset:${adtsStartOffset}`;
|
reason = `AAC PES did not start with ADTS header,offset:${offset}`;
|
||||||
fatal = false;
|
fatal = false;
|
||||||
} else {
|
} else {
|
||||||
reason = 'no ADTS header found in AAC PES';
|
reason = 'no ADTS header found in AAC PES';
|
||||||
@ -489,37 +498,38 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!track.audiosamplerate) {
|
if (!track.audiosamplerate) {
|
||||||
config = this._ADTStoAudioConfig(data, adtsStartOffset, this.audioCodec);
|
config = ADTS.getAudioConfig(this.observer,data, offset, audioCodec);
|
||||||
track.config = config.config;
|
track.config = config.config;
|
||||||
track.audiosamplerate = config.samplerate;
|
track.audiosamplerate = config.samplerate;
|
||||||
track.channelCount = config.channelCount;
|
track.channelCount = config.channelCount;
|
||||||
track.codec = config.codec;
|
track.codec = config.codec;
|
||||||
track.timescale = this.remuxer.timescale;
|
track.timescale = this.remuxer.timescale;
|
||||||
track.duration = this.remuxer.timescale * this._duration;
|
track.duration = track.timescale * duration;
|
||||||
logger.log(`parsed codec:${track.codec},rate:${config.samplerate},nb channel:${config.channelCount}`);
|
logger.log(`parsed codec:${track.codec},rate:${config.samplerate},nb channel:${config.channelCount}`);
|
||||||
}
|
}
|
||||||
nbSamples = 0;
|
frameIndex = 0;
|
||||||
while ((adtsStartOffset + 5) < len) {
|
frameDuration = 1024 * 90000 / track.audiosamplerate;
|
||||||
|
while ((offset + 5) < len) {
|
||||||
|
// The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header
|
||||||
|
headerLength = (!!(data[offset + 1] & 0x01) ? 7 : 9);
|
||||||
// retrieve frame size
|
// retrieve frame size
|
||||||
adtsFrameSize = ((data[adtsStartOffset + 3] & 0x03) << 11);
|
frameLength = ((data[offset + 3] & 0x03) << 11) |
|
||||||
// byte 4
|
(data[offset + 4] << 3) |
|
||||||
adtsFrameSize |= (data[adtsStartOffset + 4] << 3);
|
((data[offset + 5] & 0xE0) >>> 5);
|
||||||
// byte 5
|
frameLength -= headerLength;
|
||||||
adtsFrameSize |= ((data[adtsStartOffset + 5] & 0xE0) >>> 5);
|
stamp = Math.round(pts + frameIndex * frameDuration);
|
||||||
adtsHeaderLen = (!!(data[adtsStartOffset + 1] & 0x01) ? 7 : 9);
|
|
||||||
adtsFrameSize -= adtsHeaderLen;
|
|
||||||
stamp = Math.round(pes.pts + nbSamples * 1024 * this.PES_TIMESCALE / track.audiosamplerate);
|
|
||||||
//stamp = pes.pts;
|
//stamp = pes.pts;
|
||||||
//console.log('AAC frame, offset/length/pts:' + (adtsStartOffset+7) + '/' + adtsFrameSize + '/' + stamp.toFixed(0));
|
|
||||||
if ((adtsFrameSize > 0) && ((adtsStartOffset + adtsHeaderLen + adtsFrameSize) <= len)) {
|
//console.log('AAC frame, offset/length/pts:' + (offset+headerLength) + '/' + frameLength + '/' + stamp.toFixed(0));
|
||||||
aacSample = {unit: data.subarray(adtsStartOffset + adtsHeaderLen, adtsStartOffset + adtsHeaderLen + adtsFrameSize), pts: stamp, dts: stamp};
|
if ((frameLength > 0) && ((offset + headerLength + frameLength) <= len)) {
|
||||||
this._aacTrack.samples.push(aacSample);
|
aacSample = {unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp};
|
||||||
this._aacTrack.len += adtsFrameSize;
|
track.samples.push(aacSample);
|
||||||
adtsStartOffset += adtsFrameSize + adtsHeaderLen;
|
track.len += frameLength;
|
||||||
nbSamples++;
|
offset += frameLength + headerLength;
|
||||||
|
frameIndex++;
|
||||||
// look for ADTS header (0xFFFx)
|
// look for ADTS header (0xFFFx)
|
||||||
for ( ; adtsStartOffset < (len - 1); adtsStartOffset++) {
|
for ( ; offset < (len - 1); offset++) {
|
||||||
if ((data[adtsStartOffset] === 0xff) && ((data[adtsStartOffset + 1] & 0xf0) === 0xf0)) {
|
if ((data[offset] === 0xff) && ((data[offset + 1] & 0xf0) === 0xf0)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -527,135 +537,13 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (adtsStartOffset < len) {
|
if (offset < len) {
|
||||||
this.aacOverFlow = data.subarray(adtsStartOffset, len);
|
this.aacOverFlow = data.subarray(offset, len);
|
||||||
} else {
|
} else {
|
||||||
this.aacOverFlow = null;
|
this.aacOverFlow = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ADTStoAudioConfig(data, offset, audioCodec) {
|
|
||||||
var adtsObjectType, // :int
|
|
||||||
adtsSampleingIndex, // :int
|
|
||||||
adtsExtensionSampleingIndex, // :int
|
|
||||||
adtsChanelConfig, // :int
|
|
||||||
config,
|
|
||||||
userAgent = navigator.userAgent.toLowerCase(),
|
|
||||||
adtsSampleingRates = [
|
|
||||||
96000, 88200,
|
|
||||||
64000, 48000,
|
|
||||||
44100, 32000,
|
|
||||||
24000, 22050,
|
|
||||||
16000, 12000,
|
|
||||||
11025, 8000,
|
|
||||||
7350];
|
|
||||||
// byte 2
|
|
||||||
adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;
|
|
||||||
adtsSampleingIndex = ((data[offset + 2] & 0x3C) >>> 2);
|
|
||||||
if(adtsSampleingIndex > adtsSampleingRates.length-1) {
|
|
||||||
this.observer.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: `invalid ADTS sampling index:${adtsSampleingIndex}`});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
adtsChanelConfig = ((data[offset + 2] & 0x01) << 2);
|
|
||||||
// byte 3
|
|
||||||
adtsChanelConfig |= ((data[offset + 3] & 0xC0) >>> 6);
|
|
||||||
logger.log(`manifest codec:${audioCodec},ADTS data:type:${adtsObjectType},sampleingIndex:${adtsSampleingIndex}[${adtsSampleingRates[adtsSampleingIndex]}Hz],channelConfig:${adtsChanelConfig}`);
|
|
||||||
// firefox: freq less than 24kHz = AAC SBR (HE-AAC)
|
|
||||||
if (userAgent.indexOf('firefox') !== -1) {
|
|
||||||
if (adtsSampleingIndex >= 6) {
|
|
||||||
adtsObjectType = 5;
|
|
||||||
config = new Array(4);
|
|
||||||
// HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
|
|
||||||
// there is a factor 2 between frame sample rate and output sample rate
|
|
||||||
// multiply frequency by 2 (see table below, equivalent to substract 3)
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
|
|
||||||
} else {
|
|
||||||
adtsObjectType = 2;
|
|
||||||
config = new Array(2);
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
|
||||||
}
|
|
||||||
// Android : always use AAC
|
|
||||||
} else if (userAgent.indexOf('android') !== -1) {
|
|
||||||
adtsObjectType = 2;
|
|
||||||
config = new Array(2);
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
|
||||||
} else {
|
|
||||||
/* for other browsers (chrome ...)
|
|
||||||
always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)
|
|
||||||
*/
|
|
||||||
adtsObjectType = 5;
|
|
||||||
config = new Array(4);
|
|
||||||
// if (manifest codec is HE-AAC or HE-AACv2) OR (manifest codec not specified AND frequency less than 24kHz)
|
|
||||||
if ((audioCodec && ((audioCodec.indexOf('mp4a.40.29') !== -1) ||
|
|
||||||
(audioCodec.indexOf('mp4a.40.5') !== -1))) ||
|
|
||||||
(!audioCodec && adtsSampleingIndex >= 6)) {
|
|
||||||
// HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
|
|
||||||
// there is a factor 2 between frame sample rate and output sample rate
|
|
||||||
// multiply frequency by 2 (see table below, equivalent to substract 3)
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
|
|
||||||
} else {
|
|
||||||
// if (manifest codec is AAC) AND (frequency less than 24kHz OR nb channel is 1) OR (manifest codec not specified and mono audio)
|
|
||||||
// Chrome fails to play back with AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.
|
|
||||||
if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && (adtsSampleingIndex >= 6 || adtsChanelConfig === 1) ||
|
|
||||||
(!audioCodec && adtsChanelConfig === 1)) {
|
|
||||||
adtsObjectType = 2;
|
|
||||||
config = new Array(2);
|
|
||||||
}
|
|
||||||
adtsExtensionSampleingIndex = adtsSampleingIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config
|
|
||||||
ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()
|
|
||||||
Audio Profile / Audio Object Type
|
|
||||||
0: Null
|
|
||||||
1: AAC Main
|
|
||||||
2: AAC LC (Low Complexity)
|
|
||||||
3: AAC SSR (Scalable Sample Rate)
|
|
||||||
4: AAC LTP (Long Term Prediction)
|
|
||||||
5: SBR (Spectral Band Replication)
|
|
||||||
6: AAC Scalable
|
|
||||||
sampling freq
|
|
||||||
0: 96000 Hz
|
|
||||||
1: 88200 Hz
|
|
||||||
2: 64000 Hz
|
|
||||||
3: 48000 Hz
|
|
||||||
4: 44100 Hz
|
|
||||||
5: 32000 Hz
|
|
||||||
6: 24000 Hz
|
|
||||||
7: 22050 Hz
|
|
||||||
8: 16000 Hz
|
|
||||||
9: 12000 Hz
|
|
||||||
10: 11025 Hz
|
|
||||||
11: 8000 Hz
|
|
||||||
12: 7350 Hz
|
|
||||||
13: Reserved
|
|
||||||
14: Reserved
|
|
||||||
15: frequency is written explictly
|
|
||||||
Channel Configurations
|
|
||||||
These are the channel configurations:
|
|
||||||
0: Defined in AOT Specifc Config
|
|
||||||
1: 1 channel: front-center
|
|
||||||
2: 2 channels: front-left, front-right
|
|
||||||
*/
|
|
||||||
// audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1
|
|
||||||
config[0] = adtsObjectType << 3;
|
|
||||||
// samplingFrequencyIndex
|
|
||||||
config[0] |= (adtsSampleingIndex & 0x0E) >> 1;
|
|
||||||
config[1] |= (adtsSampleingIndex & 0x01) << 7;
|
|
||||||
// channelConfiguration
|
|
||||||
config[1] |= adtsChanelConfig << 3;
|
|
||||||
if (adtsObjectType === 5) {
|
|
||||||
// adtsExtensionSampleingIndex
|
|
||||||
config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;
|
|
||||||
config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;
|
|
||||||
// adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???
|
|
||||||
// https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc
|
|
||||||
config[2] |= 2 << 2;
|
|
||||||
config[3] = 0;
|
|
||||||
}
|
|
||||||
return {config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: ('mp4a.40.' + adtsObjectType)};
|
|
||||||
}
|
|
||||||
|
|
||||||
_parseID3PES(pes) {
|
_parseID3PES(pes) {
|
||||||
this._id3Track.samples.push(pes);
|
this._id3Track.samples.push(pes);
|
||||||
}
|
}
|
||||||
|
@ -66,8 +66,8 @@ class LevelHelper {
|
|||||||
fragments = details.fragments;
|
fragments = details.fragments;
|
||||||
frag = fragments[fragIdx];
|
frag = fragments[fragIdx];
|
||||||
if(!isNaN(frag.startPTS)) {
|
if(!isNaN(frag.startPTS)) {
|
||||||
startPTS = Math.max(startPTS,frag.startPTS);
|
startPTS = Math.min(startPTS,frag.startPTS);
|
||||||
endPTS = Math.min(endPTS, frag.endPTS);
|
endPTS = Math.max(endPTS, frag.endPTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
var drift = startPTS - frag.start;
|
var drift = startPTS - frag.start;
|
||||||
@ -99,12 +99,12 @@ class LevelHelper {
|
|||||||
if (toIdx > fromIdx) {
|
if (toIdx > fromIdx) {
|
||||||
fragFrom.duration = fragToPTS-fragFrom.start;
|
fragFrom.duration = fragToPTS-fragFrom.start;
|
||||||
if(fragFrom.duration < 0) {
|
if(fragFrom.duration < 0) {
|
||||||
logger.error(`negative duration computed for ${fragFrom}, there should be some duration drift between playlist and fragment!`);
|
logger.error(`negative duration computed for frag ${fragFrom.sn},level ${fragFrom.level}, there should be some duration drift between playlist and fragment!`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fragTo.duration = fragFrom.start - fragToPTS;
|
fragTo.duration = fragFrom.start - fragToPTS;
|
||||||
if(fragTo.duration < 0) {
|
if(fragTo.duration < 0) {
|
||||||
logger.error(`negative duration computed for ${fragTo}, there should be some duration drift between playlist and fragment!`);
|
logger.error(`negative duration computed for frag ${fragTo.sn},level ${fragTo.level}, there should be some duration drift between playlist and fragment!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
28
dashboard-ui/bower_components/hls.js/src/hls.js
vendored
28
dashboard-ui/bower_components/hls.js/src/hls.js
vendored
@ -34,8 +34,9 @@ class Hls {
|
|||||||
return ErrorDetails;
|
return ErrorDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(config = {}) {
|
static get DefaultConfig() {
|
||||||
var configDefault = {
|
if(!Hls.defaultConfig) {
|
||||||
|
Hls.defaultConfig = {
|
||||||
autoStartLoad: true,
|
autoStartLoad: true,
|
||||||
debug: false,
|
debug: false,
|
||||||
maxBufferLength: 30,
|
maxBufferLength: 30,
|
||||||
@ -45,13 +46,16 @@ class Hls {
|
|||||||
maxMaxBufferLength: 600,
|
maxMaxBufferLength: 600,
|
||||||
enableWorker: true,
|
enableWorker: true,
|
||||||
enableSoftwareAES: true,
|
enableSoftwareAES: true,
|
||||||
|
manifestLoadingTimeOut: 10000,
|
||||||
|
manifestLoadingMaxRetry: 1,
|
||||||
|
manifestLoadingRetryDelay: 1000,
|
||||||
|
levelLoadingTimeOut: 10000,
|
||||||
|
levelLoadingMaxRetry: 4,
|
||||||
|
levelLoadingRetryDelay: 1000,
|
||||||
fragLoadingTimeOut: 20000,
|
fragLoadingTimeOut: 20000,
|
||||||
fragLoadingMaxRetry: 6,
|
fragLoadingMaxRetry: 6,
|
||||||
fragLoadingRetryDelay: 1000,
|
fragLoadingRetryDelay: 1000,
|
||||||
fragLoadingLoopThreshold: 3,
|
fragLoadingLoopThreshold: 3,
|
||||||
manifestLoadingTimeOut: 10000,
|
|
||||||
manifestLoadingMaxRetry: 1,
|
|
||||||
manifestLoadingRetryDelay: 1000,
|
|
||||||
// fpsDroppedMonitoringPeriod: 5000,
|
// fpsDroppedMonitoringPeriod: 5000,
|
||||||
// fpsDroppedMonitoringThreshold: 0.2,
|
// fpsDroppedMonitoringThreshold: 0.2,
|
||||||
appendErrorMaxRetry: 3,
|
appendErrorMaxRetry: 3,
|
||||||
@ -61,9 +65,19 @@ class Hls {
|
|||||||
abrController : AbrController,
|
abrController : AbrController,
|
||||||
mediaController: MSEMediaController
|
mediaController: MSEMediaController
|
||||||
};
|
};
|
||||||
for (var prop in configDefault) {
|
}
|
||||||
|
return Hls.defaultConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
static set DefaultConfig(defaultConfig) {
|
||||||
|
Hls.defaultConfig = defaultConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(config = {}) {
|
||||||
|
var defaultConfig = Hls.DefaultConfig;
|
||||||
|
for (var prop in defaultConfig) {
|
||||||
if (prop in config) { continue; }
|
if (prop in config) { continue; }
|
||||||
config[prop] = configDefault[prop];
|
config[prop] = defaultConfig[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {
|
if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {
|
||||||
|
@ -27,7 +27,7 @@ class FragmentLoader {
|
|||||||
this.frag.loaded = 0;
|
this.frag.loaded = 0;
|
||||||
var config = this.hls.config;
|
var config = this.hls.config;
|
||||||
frag.loader = this.loader = typeof(config.fLoader) !== 'undefined' ? new config.fLoader(config) : new config.loader(config);
|
frag.loader = this.loader = typeof(config.fLoader) !== 'undefined' ? new config.fLoader(config) : new config.loader(config);
|
||||||
this.loader.load(frag.url, 'arraybuffer', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), config.fragLoadingTimeOut, 1, config.fragLoadingRetryDelay, this.loadprogress.bind(this), frag);
|
this.loader.load(frag.url, 'arraybuffer', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), config.fragLoadingTimeOut, 1, 0, this.loadprogress.bind(this), frag);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadsuccess(event, stats) {
|
loadsuccess(event, stats) {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
import Event from '../events';
|
import Event from '../events';
|
||||||
import {ErrorTypes, ErrorDetails} from '../errors';
|
import {ErrorTypes, ErrorDetails} from '../errors';
|
||||||
import URLHelper from '../utils/url';
|
import URLHelper from '../utils/url';
|
||||||
|
import AttrList from '../utils/attr-list';
|
||||||
//import {logger} from '../utils/logger';
|
//import {logger} from '../utils/logger';
|
||||||
|
|
||||||
class PlaylistLoader {
|
class PlaylistLoader {
|
||||||
@ -36,12 +37,24 @@ class PlaylistLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
load(url, id1, id2) {
|
load(url, id1, id2) {
|
||||||
var config = this.hls.config;
|
var config = this.hls.config,
|
||||||
|
retry,
|
||||||
|
timeout,
|
||||||
|
retryDelay;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.id = id1;
|
this.id = id1;
|
||||||
this.id2 = id2;
|
this.id2 = id2;
|
||||||
|
if(this.id === undefined) {
|
||||||
|
retry = config.manifestLoadingMaxRetry;
|
||||||
|
timeout = config.manifestLoadingTimeOut;
|
||||||
|
retryDelay = config.manifestLoadingRetryDelay;
|
||||||
|
} else {
|
||||||
|
retry = config.levelLoadingMaxRetry;
|
||||||
|
timeout = config.levelLoadingTimeOut;
|
||||||
|
retryDelay = config.levelLoadingRetryDelay;
|
||||||
|
}
|
||||||
this.loader = typeof(config.pLoader) !== 'undefined' ? new config.pLoader(config) : new config.loader(config);
|
this.loader = typeof(config.pLoader) !== 'undefined' ? new config.pLoader(config) : new config.loader(config);
|
||||||
this.loader.load(url, '', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), config.manifestLoadingTimeOut, config.manifestLoadingMaxRetry, config.manifestLoadingRetryDelay);
|
this.loader.load(url, '', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), timeout, retry, retryDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(url, baseUrl) {
|
resolve(url, baseUrl) {
|
||||||
@ -49,42 +62,38 @@ class PlaylistLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parseMasterPlaylist(string, baseurl) {
|
parseMasterPlaylist(string, baseurl) {
|
||||||
var levels = [], level = {}, result, codecs, codec;
|
let levels = [], result;
|
||||||
|
|
||||||
// https://regex101.com is your friend
|
// https://regex101.com is your friend
|
||||||
var re = /#EXT-X-STREAM-INF:([^\n\r]*(BAND)WIDTH=(\d+))?([^\n\r]*(CODECS)=\"([^\"\n\r]*)\",?)?([^\n\r]*(RES)OLUTION=(\d+)x(\d+))?([^\n\r]*(NAME)=\"(.*)\")?[^\n\r]*[\r\n]+([^\r\n]+)/g;
|
const re = /#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g;
|
||||||
while ((result = re.exec(string)) != null){
|
while ((result = re.exec(string)) != null){
|
||||||
result.shift();
|
const level = {};
|
||||||
result = result.filter(function(n) { return (n !== undefined); });
|
|
||||||
level.url = this.resolve(result.pop(), baseurl);
|
var attrs = level.attrs = new AttrList(result[1]);
|
||||||
while (result.length > 0) {
|
level.url = this.resolve(result[2], baseurl);
|
||||||
switch (result.shift()) {
|
|
||||||
case 'RES':
|
var resolution = attrs.decimalResolution('RESOLUTION');
|
||||||
level.width = parseInt(result.shift());
|
if(resolution) {
|
||||||
level.height = parseInt(result.shift());
|
level.width = resolution.width;
|
||||||
break;
|
level.height = resolution.height;
|
||||||
case 'BAND':
|
}
|
||||||
level.bitrate = parseInt(result.shift());
|
level.bitrate = attrs.decimalInteger('BANDWIDTH');
|
||||||
break;
|
level.name = attrs.NAME;
|
||||||
case 'NAME':
|
|
||||||
level.name = result.shift();
|
var codecs = attrs.CODECS;
|
||||||
break;
|
if(codecs) {
|
||||||
case 'CODECS':
|
codecs = codecs.split(',');
|
||||||
codecs = result.shift().split(',');
|
for (let i = 0; i < codecs.length; i++) {
|
||||||
while (codecs.length > 0) {
|
const codec = codecs[i];
|
||||||
codec = codecs.shift();
|
|
||||||
if (codec.indexOf('avc1') !== -1) {
|
if (codec.indexOf('avc1') !== -1) {
|
||||||
level.videoCodec = this.avc1toavcoti(codec);
|
level.videoCodec = this.avc1toavcoti(codec);
|
||||||
} else {
|
} else {
|
||||||
level.audioCodec = codec;
|
level.audioCodec = codec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
levels.push(level);
|
levels.push(level);
|
||||||
level = {};
|
|
||||||
}
|
}
|
||||||
return levels;
|
return levels;
|
||||||
}
|
}
|
||||||
@ -101,26 +110,24 @@ class PlaylistLoader {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
parseKeyParamsByRegex(string, regexp) {
|
|
||||||
var result = regexp.exec(string);
|
|
||||||
if (result) {
|
|
||||||
result.shift();
|
|
||||||
result = result.filter(function(n) { return (n !== undefined); });
|
|
||||||
if (result.length === 2) {
|
|
||||||
return result[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
cloneObj(obj) {
|
cloneObj(obj) {
|
||||||
return JSON.parse(JSON.stringify(obj));
|
return JSON.parse(JSON.stringify(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
parseLevelPlaylist(string, baseurl, id) {
|
parseLevelPlaylist(string, baseurl, id) {
|
||||||
var currentSN = 0, totalduration = 0, level = {url: baseurl, fragments: [], live: true, startSN: 0}, result, regexp, cc = 0, frag, byteRangeEndOffset, byteRangeStartOffset;
|
var currentSN = 0,
|
||||||
var levelkey = {method : null, key : null, iv : null, uri : null};
|
totalduration = 0,
|
||||||
regexp = /(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.*))|(?:#EXT(INF):([\d\.]+)[^\r\n]*([\r\n]+[^#|\r\n]+)?)|(?:#EXT-X-(BYTERANGE):([\d]+[@[\d]*)]*[\r\n]+([^#|\r\n]+)?|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))/g;
|
level = {url: baseurl, fragments: [], live: true, startSN: 0},
|
||||||
|
levelkey = {method : null, key : null, iv : null, uri : null},
|
||||||
|
cc = 0,
|
||||||
|
programDateTime = null,
|
||||||
|
frag = null,
|
||||||
|
result,
|
||||||
|
regexp,
|
||||||
|
byteRangeEndOffset,
|
||||||
|
byteRangeStartOffset;
|
||||||
|
|
||||||
|
regexp = /(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.*))|(?:#EXT(INF):([\d\.]+)[^\r\n]*([\r\n]+[^#|\r\n]+)?)|(?:#EXT-X-(BYTERANGE):([\d]+[@[\d]*)]*[\r\n]+([^#|\r\n]+)?|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.*))/g;
|
||||||
while ((result = regexp.exec(string)) !== null) {
|
while ((result = regexp.exec(string)) !== null) {
|
||||||
result.shift();
|
result.shift();
|
||||||
result = result.filter(function(n) { return (n !== undefined); });
|
result = result.filter(function(n) { return (n !== undefined); });
|
||||||
@ -145,7 +152,6 @@ class PlaylistLoader {
|
|||||||
byteRangeStartOffset = parseInt(params[1]);
|
byteRangeStartOffset = parseInt(params[1]);
|
||||||
}
|
}
|
||||||
byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset;
|
byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset;
|
||||||
frag = level.fragments.length ? level.fragments[level.fragments.length - 1] : null;
|
|
||||||
if (frag && !frag.url) {
|
if (frag && !frag.url) {
|
||||||
frag.byteRangeStartOffset = byteRangeStartOffset;
|
frag.byteRangeStartOffset = byteRangeStartOffset;
|
||||||
frag.byteRangeEndOffset = byteRangeEndOffset;
|
frag.byteRangeEndOffset = byteRangeEndOffset;
|
||||||
@ -167,17 +173,21 @@ class PlaylistLoader {
|
|||||||
} else {
|
} else {
|
||||||
fragdecryptdata = levelkey;
|
fragdecryptdata = levelkey;
|
||||||
}
|
}
|
||||||
level.fragments.push({url: result[2] ? this.resolve(result[2], baseurl) : null, duration: duration, start: totalduration, sn: sn, level: id, cc: cc, byteRangeStartOffset: byteRangeStartOffset, byteRangeEndOffset: byteRangeEndOffset, decryptdata : fragdecryptdata});
|
var url = result[2] ? this.resolve(result[2], baseurl) : null;
|
||||||
|
frag = {url: url, duration: duration, start: totalduration, sn: sn, level: id, cc: cc, byteRangeStartOffset: byteRangeStartOffset, byteRangeEndOffset: byteRangeEndOffset, decryptdata : fragdecryptdata, programDateTime: programDateTime};
|
||||||
|
level.fragments.push(frag);
|
||||||
totalduration += duration;
|
totalduration += duration;
|
||||||
byteRangeStartOffset = null;
|
byteRangeStartOffset = null;
|
||||||
|
programDateTime = null;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'KEY':
|
case 'KEY':
|
||||||
// https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4
|
// https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4
|
||||||
var decryptparams = result[1];
|
var decryptparams = result[1];
|
||||||
var decryptmethod = this.parseKeyParamsByRegex(decryptparams, /(METHOD)=([^,]*)/),
|
var keyAttrs = new AttrList(decryptparams);
|
||||||
decrypturi = this.parseKeyParamsByRegex(decryptparams, /(URI)=["]([^,]*)["]/),
|
var decryptmethod = keyAttrs.enumeratedString('METHOD'),
|
||||||
decryptiv = this.parseKeyParamsByRegex(decryptparams, /(IV)=([^,]*)/);
|
decrypturi = keyAttrs.URI,
|
||||||
|
decryptiv = keyAttrs.hexadecimalInteger('IV');
|
||||||
if (decryptmethod) {
|
if (decryptmethod) {
|
||||||
levelkey = { method: null, key: null, iv: null, uri: null };
|
levelkey = { method: null, key: null, iv: null, uri: null };
|
||||||
if ((decrypturi) && (decryptmethod === 'AES-128')) {
|
if ((decrypturi) && (decryptmethod === 'AES-128')) {
|
||||||
@ -186,40 +196,42 @@ class PlaylistLoader {
|
|||||||
levelkey.uri = this.resolve(decrypturi, baseurl);
|
levelkey.uri = this.resolve(decrypturi, baseurl);
|
||||||
levelkey.key = null;
|
levelkey.key = null;
|
||||||
// Initialization Vector (IV)
|
// Initialization Vector (IV)
|
||||||
if (decryptiv) {
|
|
||||||
levelkey.iv = decryptiv;
|
levelkey.iv = decryptiv;
|
||||||
if (levelkey.iv.substring(0, 2) === '0x') {
|
|
||||||
levelkey.iv = levelkey.iv.substring(2);
|
|
||||||
}
|
|
||||||
levelkey.iv = levelkey.iv.match(/.{8}/g);
|
|
||||||
levelkey.iv[0] = parseInt(levelkey.iv[0], 16);
|
|
||||||
levelkey.iv[1] = parseInt(levelkey.iv[1], 16);
|
|
||||||
levelkey.iv[2] = parseInt(levelkey.iv[2], 16);
|
|
||||||
levelkey.iv[3] = parseInt(levelkey.iv[3], 16);
|
|
||||||
levelkey.iv = new Uint32Array(levelkey.iv);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'PROGRAM-DATE-TIME':
|
||||||
|
programDateTime = new Date(Date.parse(result[1]));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//logger.log('found ' + level.fragments.length + ' fragments');
|
//logger.log('found ' + level.fragments.length + ' fragments');
|
||||||
|
if(frag && !frag.url) {
|
||||||
|
level.fragments.pop();
|
||||||
|
totalduration-=frag.duration;
|
||||||
|
}
|
||||||
level.totalduration = totalduration;
|
level.totalduration = totalduration;
|
||||||
level.endSN = currentSN - 1;
|
level.endSN = currentSN - 1;
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadsuccess(event, stats) {
|
loadsuccess(event, stats) {
|
||||||
var string = event.currentTarget.responseText, url = event.currentTarget.responseURL, id = this.id, id2 = this.id2, hls = this.hls, levels;
|
var target = event.currentTarget,
|
||||||
|
string = target.responseText,
|
||||||
|
url = target.responseURL,
|
||||||
|
id = this.id,
|
||||||
|
id2 = this.id2,
|
||||||
|
hls = this.hls,
|
||||||
|
levels;
|
||||||
// responseURL not supported on some browsers (it is used to detect URL redirection)
|
// responseURL not supported on some browsers (it is used to detect URL redirection)
|
||||||
if (url === undefined) {
|
if (url === undefined) {
|
||||||
// fallback to initial URL
|
// fallback to initial URL
|
||||||
url = this.url;
|
url = this.url;
|
||||||
}
|
}
|
||||||
stats.tload = performance.now();
|
stats.tload = performance.now();
|
||||||
stats.mtime = new Date(event.currentTarget.getResponseHeader('Last-Modified'));
|
stats.mtime = new Date(target.getResponseHeader('Last-Modified'));
|
||||||
if (string.indexOf('#EXTM3U') === 0) {
|
if (string.indexOf('#EXTM3U') === 0) {
|
||||||
if (string.indexOf('#EXTINF:') > 0) {
|
if (string.indexOf('#EXTINF:') > 0) {
|
||||||
// 1 level playlist
|
// 1 level playlist
|
||||||
|
@ -54,23 +54,7 @@ class MP4 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MP4.MAJOR_BRAND = new Uint8Array([
|
var videoHdlr = new Uint8Array([
|
||||||
'i'.charCodeAt(0),
|
|
||||||
's'.charCodeAt(0),
|
|
||||||
'o'.charCodeAt(0),
|
|
||||||
'm'.charCodeAt(0)
|
|
||||||
]);
|
|
||||||
|
|
||||||
MP4.AVC1_BRAND = new Uint8Array([
|
|
||||||
'a'.charCodeAt(0),
|
|
||||||
'v'.charCodeAt(0),
|
|
||||||
'c'.charCodeAt(0),
|
|
||||||
'1'.charCodeAt(0)
|
|
||||||
]);
|
|
||||||
|
|
||||||
MP4.MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);
|
|
||||||
|
|
||||||
MP4.VIDEO_HDLR = new Uint8Array([
|
|
||||||
0x00, // version 0
|
0x00, // version 0
|
||||||
0x00, 0x00, 0x00, // flags
|
0x00, 0x00, 0x00, // flags
|
||||||
0x00, 0x00, 0x00, 0x00, // pre_defined
|
0x00, 0x00, 0x00, 0x00, // pre_defined
|
||||||
@ -83,7 +67,7 @@ class MP4 {
|
|||||||
0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'
|
0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
MP4.AUDIO_HDLR = new Uint8Array([
|
var audioHdlr = new Uint8Array([
|
||||||
0x00, // version 0
|
0x00, // version 0
|
||||||
0x00, 0x00, 0x00, // flags
|
0x00, 0x00, 0x00, // flags
|
||||||
0x00, 0x00, 0x00, 0x00, // pre_defined
|
0x00, 0x00, 0x00, 0x00, // pre_defined
|
||||||
@ -97,11 +81,11 @@ class MP4 {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
MP4.HDLR_TYPES = {
|
MP4.HDLR_TYPES = {
|
||||||
'video': MP4.VIDEO_HDLR,
|
'video': videoHdlr,
|
||||||
'audio': MP4.AUDIO_HDLR
|
'audio': audioHdlr
|
||||||
};
|
};
|
||||||
|
|
||||||
MP4.DREF = new Uint8Array([
|
var dref = new Uint8Array([
|
||||||
0x00, // version 0
|
0x00, // version 0
|
||||||
0x00, 0x00, 0x00, // flags
|
0x00, 0x00, 0x00, // flags
|
||||||
0x00, 0x00, 0x00, 0x01, // entry_count
|
0x00, 0x00, 0x00, 0x01, // entry_count
|
||||||
@ -110,13 +94,15 @@ class MP4 {
|
|||||||
0x00, // version 0
|
0x00, // version 0
|
||||||
0x00, 0x00, 0x01 // entry_flags
|
0x00, 0x00, 0x01 // entry_flags
|
||||||
]);
|
]);
|
||||||
MP4.STCO = new Uint8Array([
|
|
||||||
|
var stco = new Uint8Array([
|
||||||
0x00, // version
|
0x00, // version
|
||||||
0x00, 0x00, 0x00, // flags
|
0x00, 0x00, 0x00, // flags
|
||||||
0x00, 0x00, 0x00, 0x00 // entry_count
|
0x00, 0x00, 0x00, 0x00 // entry_count
|
||||||
]);
|
]);
|
||||||
MP4.STSC = MP4.STCO;
|
|
||||||
MP4.STTS = MP4.STCO;
|
MP4.STTS = MP4.STSC = MP4.STCO = stco;
|
||||||
|
|
||||||
MP4.STSZ = new Uint8Array([
|
MP4.STSZ = new Uint8Array([
|
||||||
0x00, // version
|
0x00, // version
|
||||||
0x00, 0x00, 0x00, // flags
|
0x00, 0x00, 0x00, // flags
|
||||||
@ -143,28 +129,34 @@ class MP4 {
|
|||||||
0x00, 0x00, 0x00, // flags
|
0x00, 0x00, 0x00, // flags
|
||||||
0x00, 0x00, 0x00, 0x01]);// entry_count
|
0x00, 0x00, 0x00, 0x01]);// entry_count
|
||||||
|
|
||||||
MP4.FTYP = MP4.box(MP4.types.ftyp, MP4.MAJOR_BRAND, MP4.MINOR_VERSION, MP4.MAJOR_BRAND, MP4.AVC1_BRAND);
|
var majorBrand = new Uint8Array([105,115,111,109]); // isom
|
||||||
MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, MP4.DREF));
|
var avc1Brand = new Uint8Array([97,118,99,49]); // avc1
|
||||||
|
var minorVersion = new Uint8Array([0, 0, 0, 1]);
|
||||||
|
|
||||||
|
MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);
|
||||||
|
MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));
|
||||||
}
|
}
|
||||||
|
|
||||||
static box(type) {
|
static box(type) {
|
||||||
var
|
var
|
||||||
payload = Array.prototype.slice.call(arguments, 1),
|
payload = Array.prototype.slice.call(arguments, 1),
|
||||||
size = 0,
|
size = 8,
|
||||||
i = payload.length,
|
i = payload.length,
|
||||||
len = i,
|
len = i,
|
||||||
result,
|
result;
|
||||||
view;
|
|
||||||
// calculate the total size we need to allocate
|
// calculate the total size we need to allocate
|
||||||
while (i--) {
|
while (i--) {
|
||||||
size += payload[i].byteLength;
|
size += payload[i].byteLength;
|
||||||
}
|
}
|
||||||
result = new Uint8Array(size + 8);
|
result = new Uint8Array(size);
|
||||||
view = new DataView(result.buffer);
|
result[0] = (size >> 24) & 0xff;
|
||||||
view.setUint32(0, result.byteLength);
|
result[1] = (size >> 16) & 0xff;
|
||||||
|
result[2] = (size >> 8) & 0xff;
|
||||||
|
result[3] = size & 0xff;
|
||||||
result.set(type, 4);
|
result.set(type, 4);
|
||||||
// copy the payload into the result
|
// copy the payload into the result
|
||||||
for (i = 0, size = 8; i < len; i++) {
|
for (i = 0, size = 8; i < len; i++) {
|
||||||
|
// copy payload[i] array @ offset size
|
||||||
result.set(payload[i], size);
|
result.set(payload[i], size);
|
||||||
size += payload[i].byteLength;
|
size += payload[i].byteLength;
|
||||||
}
|
}
|
||||||
@ -564,7 +556,7 @@ class MP4 {
|
|||||||
(size >>> 16) & 0xFF,
|
(size >>> 16) & 0xFF,
|
||||||
(size >>> 8) & 0xFF,
|
(size >>> 8) & 0xFF,
|
||||||
size & 0xFF, // sample_size
|
size & 0xFF, // sample_size
|
||||||
(flags.isLeading << 2) | sample.flags.dependsOn,
|
(flags.isLeading << 2) | flags.dependsOn,
|
||||||
(flags.isDependedOn << 6) |
|
(flags.isDependedOn << 6) |
|
||||||
(flags.hasRedundancy << 4) |
|
(flags.hasRedundancy << 4) |
|
||||||
(flags.paddingValue << 1) |
|
(flags.paddingValue << 1) |
|
||||||
|
@ -119,7 +119,7 @@ class MP4Remuxer {
|
|||||||
|
|
||||||
remuxVideo(track, timeOffset, contiguous) {
|
remuxVideo(track, timeOffset, contiguous) {
|
||||||
var view,
|
var view,
|
||||||
i = 8,
|
offset = 8,
|
||||||
pesTimeScale = this.PES_TIMESCALE,
|
pesTimeScale = this.PES_TIMESCALE,
|
||||||
pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,
|
pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,
|
||||||
avcSample,
|
avcSample,
|
||||||
@ -142,25 +142,28 @@ class MP4Remuxer {
|
|||||||
// convert NALU bitstream to MP4 format (prepend NALU with size field)
|
// convert NALU bitstream to MP4 format (prepend NALU with size field)
|
||||||
while (avcSample.units.units.length) {
|
while (avcSample.units.units.length) {
|
||||||
unit = avcSample.units.units.shift();
|
unit = avcSample.units.units.shift();
|
||||||
view.setUint32(i, unit.data.byteLength);
|
view.setUint32(offset, unit.data.byteLength);
|
||||||
i += 4;
|
offset += 4;
|
||||||
mdat.set(unit.data, i);
|
mdat.set(unit.data, offset);
|
||||||
i += unit.data.byteLength;
|
offset += unit.data.byteLength;
|
||||||
mp4SampleLength += 4 + unit.data.byteLength;
|
mp4SampleLength += 4 + unit.data.byteLength;
|
||||||
}
|
}
|
||||||
pts = avcSample.pts - this._initDTS;
|
pts = avcSample.pts - this._initDTS;
|
||||||
dts = avcSample.dts - this._initDTS;
|
dts = avcSample.dts - this._initDTS;
|
||||||
//logger.log('Video/PTS/DTS:' + pts + '/' + dts);
|
// ensure DTS is not bigger than PTS
|
||||||
|
dts = Math.min(pts,dts);
|
||||||
|
//logger.log(`Video/PTS/DTS:${pts}/${dts}`);
|
||||||
// if not first AVC sample of video track, normalize PTS/DTS with previous sample value
|
// if not first AVC sample of video track, normalize PTS/DTS with previous sample value
|
||||||
// and ensure that sample duration is positive
|
// and ensure that sample duration is positive
|
||||||
if (lastDTS !== undefined) {
|
if (lastDTS !== undefined) {
|
||||||
ptsnorm = this._PTSNormalize(pts, lastDTS);
|
ptsnorm = this._PTSNormalize(pts, lastDTS);
|
||||||
dtsnorm = this._PTSNormalize(dts, lastDTS);
|
dtsnorm = this._PTSNormalize(dts, lastDTS);
|
||||||
mp4Sample.duration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;
|
var sampleDuration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;
|
||||||
if (mp4Sample.duration < 0) {
|
if (sampleDuration <= 0) {
|
||||||
//logger.log('invalid sample duration at PTS/DTS::' + avcSample.pts + '/' + avcSample.dts + ':' + mp4Sample.duration);
|
logger.log(`invalid sample duration at PTS/DTS: ${avcSample.pts}/${avcSample.dts}:${sampleDuration}`);
|
||||||
mp4Sample.duration = 0;
|
sampleDuration = 1;
|
||||||
}
|
}
|
||||||
|
mp4Sample.duration = sampleDuration;
|
||||||
} else {
|
} else {
|
||||||
var nextAvcDts = this.nextAvcDts,delta;
|
var nextAvcDts = this.nextAvcDts,delta;
|
||||||
// first AVC sample of video track, normalize PTS/DTS
|
// first AVC sample of video track, normalize PTS/DTS
|
||||||
@ -179,7 +182,7 @@ class MP4Remuxer {
|
|||||||
dtsnorm = nextAvcDts;
|
dtsnorm = nextAvcDts;
|
||||||
// offset PTS as well, ensure that PTS is smaller or equal than new DTS
|
// offset PTS as well, ensure that PTS is smaller or equal than new DTS
|
||||||
ptsnorm = Math.max(ptsnorm - delta, dtsnorm);
|
ptsnorm = Math.max(ptsnorm - delta, dtsnorm);
|
||||||
logger.log('Video/PTS/DTS adjusted:' + ptsnorm + '/' + dtsnorm);
|
logger.log(`Video/PTS/DTS adjusted: ${ptsnorm}/${dtsnorm},delta:${delta}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// remember first PTS of our avcSamples, ensure value is positive
|
// remember first PTS of our avcSamples, ensure value is positive
|
||||||
@ -209,18 +212,21 @@ class MP4Remuxer {
|
|||||||
samples.push(mp4Sample);
|
samples.push(mp4Sample);
|
||||||
lastDTS = dtsnorm;
|
lastDTS = dtsnorm;
|
||||||
}
|
}
|
||||||
|
var lastSampleDuration = 0;
|
||||||
if (samples.length >= 2) {
|
if (samples.length >= 2) {
|
||||||
mp4Sample.duration = samples[samples.length - 2].duration;
|
lastSampleDuration = samples[samples.length - 2].duration;
|
||||||
|
mp4Sample.duration = lastSampleDuration;
|
||||||
}
|
}
|
||||||
// next AVC sample DTS should be equal to last sample DTS + last sample duration
|
// next AVC sample DTS should be equal to last sample DTS + last sample duration
|
||||||
this.nextAvcDts = dtsnorm + mp4Sample.duration * pes2mp4ScaleFactor;
|
this.nextAvcDts = dtsnorm + lastSampleDuration * pes2mp4ScaleFactor;
|
||||||
track.len = 0;
|
track.len = 0;
|
||||||
track.nbNalu = 0;
|
track.nbNalu = 0;
|
||||||
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
|
if(samples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
|
||||||
|
var flags = samples[0].flags;
|
||||||
// chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue
|
// chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue
|
||||||
// https://code.google.com/p/chromium/issues/detail?id=229412
|
// https://code.google.com/p/chromium/issues/detail?id=229412
|
||||||
samples[0].flags.dependsOn = 2;
|
flags.dependsOn = 2;
|
||||||
samples[0].flags.isNonSync = 0;
|
flags.isNonSync = 0;
|
||||||
}
|
}
|
||||||
track.samples = samples;
|
track.samples = samples;
|
||||||
moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);
|
moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);
|
||||||
@ -229,9 +235,9 @@ class MP4Remuxer {
|
|||||||
moof: moof,
|
moof: moof,
|
||||||
mdat: mdat,
|
mdat: mdat,
|
||||||
startPTS: firstPTS / pesTimeScale,
|
startPTS: firstPTS / pesTimeScale,
|
||||||
endPTS: (ptsnorm + pes2mp4ScaleFactor * mp4Sample.duration) / pesTimeScale,
|
endPTS: (ptsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,
|
||||||
startDTS: firstDTS / pesTimeScale,
|
startDTS: firstDTS / pesTimeScale,
|
||||||
endDTS: (dtsnorm + pes2mp4ScaleFactor * mp4Sample.duration) / pesTimeScale,
|
endDTS: this.nextAvcDts / pesTimeScale,
|
||||||
type: 'video',
|
type: 'video',
|
||||||
nb: samples.length
|
nb: samples.length
|
||||||
});
|
});
|
||||||
@ -239,7 +245,7 @@ class MP4Remuxer {
|
|||||||
|
|
||||||
remuxAudio(track,timeOffset, contiguous) {
|
remuxAudio(track,timeOffset, contiguous) {
|
||||||
var view,
|
var view,
|
||||||
i = 8,
|
offset = 8,
|
||||||
pesTimeScale = this.PES_TIMESCALE,
|
pesTimeScale = this.PES_TIMESCALE,
|
||||||
pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,
|
pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,
|
||||||
aacSample, mp4Sample,
|
aacSample, mp4Sample,
|
||||||
@ -247,27 +253,32 @@ class MP4Remuxer {
|
|||||||
mdat, moof,
|
mdat, moof,
|
||||||
firstPTS, firstDTS, lastDTS,
|
firstPTS, firstDTS, lastDTS,
|
||||||
pts, dts, ptsnorm, dtsnorm,
|
pts, dts, ptsnorm, dtsnorm,
|
||||||
samples = [];
|
samples = [],
|
||||||
/* concatenate the audio data and construct the mdat in place
|
samples0 = [];
|
||||||
(need 8 more bytes to fill length and mdat type) */
|
|
||||||
mdat = new Uint8Array(track.len + 8);
|
track.samples.forEach(aacSample => {
|
||||||
view = new DataView(mdat.buffer);
|
if(pts === undefined || aacSample.pts > pts) {
|
||||||
view.setUint32(0, mdat.byteLength);
|
samples0.push(aacSample);
|
||||||
mdat.set(MP4.types.mdat, 4);
|
pts = aacSample.pts;
|
||||||
while (track.samples.length) {
|
} else {
|
||||||
aacSample = track.samples.shift();
|
logger.warn('dropping past audio frame');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
while (samples0.length) {
|
||||||
|
aacSample = samples0.shift();
|
||||||
unit = aacSample.unit;
|
unit = aacSample.unit;
|
||||||
mdat.set(unit, i);
|
|
||||||
i += unit.byteLength;
|
|
||||||
pts = aacSample.pts - this._initDTS;
|
pts = aacSample.pts - this._initDTS;
|
||||||
dts = aacSample.dts - this._initDTS;
|
dts = aacSample.dts - this._initDTS;
|
||||||
//logger.log('Audio/PTS:' + aacSample.pts.toFixed(0));
|
//logger.log(`Audio/PTS:${aacSample.pts.toFixed(0)}`);
|
||||||
|
// if not first sample
|
||||||
if (lastDTS !== undefined) {
|
if (lastDTS !== undefined) {
|
||||||
ptsnorm = this._PTSNormalize(pts, lastDTS);
|
ptsnorm = this._PTSNormalize(pts, lastDTS);
|
||||||
dtsnorm = this._PTSNormalize(dts, lastDTS);
|
dtsnorm = this._PTSNormalize(dts, lastDTS);
|
||||||
// we use DTS to compute sample duration, but we use PTS to compute initPTS which is used to sync audio and video
|
// let's compute sample duration
|
||||||
mp4Sample.duration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;
|
mp4Sample.duration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;
|
||||||
if (mp4Sample.duration < 0) {
|
if (mp4Sample.duration < 0) {
|
||||||
|
// not expected to happen ...
|
||||||
logger.log(`invalid AAC sample duration at PTS:${aacSample.pts}:${mp4Sample.duration}`);
|
logger.log(`invalid AAC sample duration at PTS:${aacSample.pts}:${mp4Sample.duration}`);
|
||||||
mp4Sample.duration = 0;
|
mp4Sample.duration = 0;
|
||||||
}
|
}
|
||||||
@ -280,11 +291,13 @@ class MP4Remuxer {
|
|||||||
if (contiguous || Math.abs(delta) < 600) {
|
if (contiguous || Math.abs(delta) < 600) {
|
||||||
// log delta
|
// log delta
|
||||||
if (delta) {
|
if (delta) {
|
||||||
if (delta > 1) {
|
if (delta > 0) {
|
||||||
logger.log(`${delta} ms hole between AAC samples detected,filling it`);
|
logger.log(`${delta} ms hole between AAC samples detected,filling it`);
|
||||||
// set PTS to next PTS, and ensure PTS is greater or equal than last DTS
|
} else if (delta < 0) {
|
||||||
} else if (delta < -1) {
|
// drop overlapping audio frames... browser will deal with it
|
||||||
logger.log(`${(-delta)} ms overlapping between AAC samples detected`);
|
logger.log(`${(-delta)} ms overlapping between AAC samples detected, drop frame`);
|
||||||
|
track.len -= unit.byteLength;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
// set DTS to next DTS
|
// set DTS to next DTS
|
||||||
ptsnorm = dtsnorm = nextAacPts;
|
ptsnorm = dtsnorm = nextAacPts;
|
||||||
@ -293,7 +306,15 @@ class MP4Remuxer {
|
|||||||
// remember first PTS of our aacSamples, ensure value is positive
|
// remember first PTS of our aacSamples, ensure value is positive
|
||||||
firstPTS = Math.max(0, ptsnorm);
|
firstPTS = Math.max(0, ptsnorm);
|
||||||
firstDTS = Math.max(0, dtsnorm);
|
firstDTS = Math.max(0, dtsnorm);
|
||||||
|
/* concatenate the audio data and construct the mdat in place
|
||||||
|
(need 8 more bytes to fill length and mdat type) */
|
||||||
|
mdat = new Uint8Array(track.len + 8);
|
||||||
|
view = new DataView(mdat.buffer);
|
||||||
|
view.setUint32(0, mdat.byteLength);
|
||||||
|
mdat.set(MP4.types.mdat, 4);
|
||||||
}
|
}
|
||||||
|
mdat.set(unit, offset);
|
||||||
|
offset += unit.byteLength;
|
||||||
//console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');
|
//console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');
|
||||||
mp4Sample = {
|
mp4Sample = {
|
||||||
size: unit.byteLength,
|
size: unit.byteLength,
|
||||||
@ -310,12 +331,16 @@ class MP4Remuxer {
|
|||||||
samples.push(mp4Sample);
|
samples.push(mp4Sample);
|
||||||
lastDTS = dtsnorm;
|
lastDTS = dtsnorm;
|
||||||
}
|
}
|
||||||
|
var lastSampleDuration = 0;
|
||||||
|
var nbSamples = samples.length;
|
||||||
//set last sample duration as being identical to previous sample
|
//set last sample duration as being identical to previous sample
|
||||||
if (samples.length >= 2) {
|
if (nbSamples >= 2) {
|
||||||
mp4Sample.duration = samples[samples.length - 2].duration;
|
lastSampleDuration = samples[nbSamples - 2].duration;
|
||||||
|
mp4Sample.duration = lastSampleDuration;
|
||||||
}
|
}
|
||||||
|
if (nbSamples) {
|
||||||
// next aac sample PTS should be equal to last sample PTS + duration
|
// next aac sample PTS should be equal to last sample PTS + duration
|
||||||
this.nextAacPts = ptsnorm + pes2mp4ScaleFactor * mp4Sample.duration;
|
this.nextAacPts = ptsnorm + pes2mp4ScaleFactor * lastSampleDuration;
|
||||||
//logger.log('Audio/PTS/PTSend:' + aacSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));
|
//logger.log('Audio/PTS/PTSend:' + aacSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));
|
||||||
track.len = 0;
|
track.len = 0;
|
||||||
track.samples = samples;
|
track.samples = samples;
|
||||||
@ -327,11 +352,12 @@ class MP4Remuxer {
|
|||||||
startPTS: firstPTS / pesTimeScale,
|
startPTS: firstPTS / pesTimeScale,
|
||||||
endPTS: this.nextAacPts / pesTimeScale,
|
endPTS: this.nextAacPts / pesTimeScale,
|
||||||
startDTS: firstDTS / pesTimeScale,
|
startDTS: firstDTS / pesTimeScale,
|
||||||
endDTS: (dtsnorm + pes2mp4ScaleFactor * mp4Sample.duration) / pesTimeScale,
|
endDTS: (dtsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,
|
||||||
type: 'audio',
|
type: 'audio',
|
||||||
nb: samples.length
|
nb: nbSamples
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
remuxID3(track,timeOffset) {
|
remuxID3(track,timeOffset) {
|
||||||
var length = track.samples.length, sample;
|
var length = track.samples.length, sample;
|
||||||
|
83
dashboard-ui/bower_components/hls.js/src/utils/attr-list.js
vendored
Normal file
83
dashboard-ui/bower_components/hls.js/src/utils/attr-list.js
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
|
||||||
|
// adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js
|
||||||
|
class AttrList {
|
||||||
|
|
||||||
|
constructor(attrs) {
|
||||||
|
if (typeof attrs === 'string') {
|
||||||
|
attrs = AttrList.parseAttrList(attrs);
|
||||||
|
}
|
||||||
|
for(var attr in attrs){
|
||||||
|
if(attrs.hasOwnProperty(attr)) {
|
||||||
|
this[attr] = attrs[attr];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
decimalInteger(attrName) {
|
||||||
|
const intValue = parseInt(this[attrName], 10);
|
||||||
|
if (intValue > Number.MAX_SAFE_INTEGER) {
|
||||||
|
return Infinity;
|
||||||
|
}
|
||||||
|
return intValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
hexadecimalInteger(attrName) {
|
||||||
|
if(this[attrName]) {
|
||||||
|
let stringValue = (this[attrName] || '0x').slice(2);
|
||||||
|
stringValue = ((stringValue.length & 1) ? '0' : '') + stringValue;
|
||||||
|
|
||||||
|
const value = new Uint8Array(stringValue.length / 2);
|
||||||
|
for (let i = 0; i < stringValue.length / 2; i++) {
|
||||||
|
value[i] = parseInt(stringValue.slice(i * 2, i * 2 + 2), 16);
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hexadecimalIntegerAsNumber(attrName) {
|
||||||
|
const intValue = parseInt(this[attrName], 16);
|
||||||
|
if (intValue > Number.MAX_SAFE_INTEGER) {
|
||||||
|
return Infinity;
|
||||||
|
}
|
||||||
|
return intValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
decimalFloatingPoint(attrName) {
|
||||||
|
return parseFloat(this[attrName]);
|
||||||
|
}
|
||||||
|
|
||||||
|
enumeratedString(attrName) {
|
||||||
|
return this[attrName];
|
||||||
|
}
|
||||||
|
|
||||||
|
decimalResolution(attrName) {
|
||||||
|
const res = /^(\d+)x(\d+)$/.exec(this[attrName]);
|
||||||
|
if (res === null) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
width: parseInt(res[1], 10),
|
||||||
|
height: parseInt(res[2], 10)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
static parseAttrList(input) {
|
||||||
|
const re = /(.+?)=((?:\".*?\")|.*?)(?:,|$)/g;
|
||||||
|
var match, attrs = {};
|
||||||
|
while ((match = re.exec(input)) !== null) {
|
||||||
|
var value = match[2], quote = '"';
|
||||||
|
|
||||||
|
if (value.indexOf(quote) === 0 &&
|
||||||
|
value.lastIndexOf(quote) === (value.length-1)) {
|
||||||
|
value = value.slice(1, -1);
|
||||||
|
}
|
||||||
|
attrs[match[1]] = value;
|
||||||
|
}
|
||||||
|
return attrs;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AttrList;
|
@ -18,19 +18,21 @@ class XhrLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
abort() {
|
abort() {
|
||||||
if (this.loader && this.loader.readyState !== 4) {
|
var loader = this.loader,
|
||||||
|
timeoutHandle = this.timeoutHandle;
|
||||||
|
if (loader && loader.readyState !== 4) {
|
||||||
this.stats.aborted = true;
|
this.stats.aborted = true;
|
||||||
this.loader.abort();
|
loader.abort();
|
||||||
}
|
}
|
||||||
if (this.timeoutHandle) {
|
if (timeoutHandle) {
|
||||||
window.clearTimeout(this.timeoutHandle);
|
window.clearTimeout(timeoutHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
load(url, responseType, onSuccess, onError, onTimeout, timeout, maxRetry, retryDelay, onProgress = null, frag = null) {
|
load(url, responseType, onSuccess, onError, onTimeout, timeout, maxRetry, retryDelay, onProgress = null, frag = null) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
if (frag && !isNaN(frag.byteRangeStartOffset) && !isNaN(frag.byteRangeEndOffset)) {
|
if (frag && !isNaN(frag.byteRangeStartOffset) && !isNaN(frag.byteRangeEndOffset)) {
|
||||||
this.byteRange = frag.byteRangeStartOffset + '-' + frag.byteRangeEndOffset;
|
this.byteRange = frag.byteRangeStartOffset + '-' + (frag.byteRangeEndOffset-1);
|
||||||
}
|
}
|
||||||
this.responseType = responseType;
|
this.responseType = responseType;
|
||||||
this.onSuccess = onSuccess;
|
this.onSuccess = onSuccess;
|
||||||
@ -47,9 +49,9 @@ class XhrLoader {
|
|||||||
|
|
||||||
loadInternal() {
|
loadInternal() {
|
||||||
var xhr = this.loader = new XMLHttpRequest();
|
var xhr = this.loader = new XMLHttpRequest();
|
||||||
xhr.onload = this.loadsuccess.bind(this);
|
xhr.onreadystatechange = this.statechange.bind(this);
|
||||||
xhr.onerror = this.loaderror.bind(this);
|
|
||||||
xhr.onprogress = this.loadprogress.bind(this);
|
xhr.onprogress = this.loadprogress.bind(this);
|
||||||
|
|
||||||
xhr.open('GET', this.url, true);
|
xhr.open('GET', this.url, true);
|
||||||
if (this.byteRange) {
|
if (this.byteRange) {
|
||||||
xhr.setRequestHeader('Range', 'bytes=' + this.byteRange);
|
xhr.setRequestHeader('Range', 'bytes=' + this.byteRange);
|
||||||
@ -63,26 +65,35 @@ class XhrLoader {
|
|||||||
xhr.send();
|
xhr.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadsuccess(event) {
|
statechange(event) {
|
||||||
|
var xhr = event.currentTarget,
|
||||||
|
status = xhr.status,
|
||||||
|
stats = this.stats;
|
||||||
|
// don't proceed if xhr has been aborted
|
||||||
|
// 4 = Response from server has been completely loaded.
|
||||||
|
if (!stats.aborted && xhr.readyState === 4) {
|
||||||
|
// http status between 200 to 299 are all successful
|
||||||
|
if (status >= 200 && status < 300) {
|
||||||
window.clearTimeout(this.timeoutHandle);
|
window.clearTimeout(this.timeoutHandle);
|
||||||
this.stats.tload = performance.now();
|
stats.tload = performance.now();
|
||||||
this.onSuccess(event, this.stats);
|
this.onSuccess(event, stats);
|
||||||
}
|
} else {
|
||||||
|
// error ...
|
||||||
loaderror(event) {
|
if (stats.retry < this.maxRetry) {
|
||||||
if (this.stats.retry < this.maxRetry) {
|
logger.warn(`${status} while loading ${this.url}, retrying in ${this.retryDelay}...`);
|
||||||
logger.warn(`${event.type} while loading ${this.url}, retrying in ${this.retryDelay}...`);
|
|
||||||
this.destroy();
|
this.destroy();
|
||||||
window.setTimeout(this.loadInternal.bind(this), this.retryDelay);
|
window.setTimeout(this.loadInternal.bind(this), this.retryDelay);
|
||||||
// exponential backoff
|
// exponential backoff
|
||||||
this.retryDelay = Math.min(2 * this.retryDelay, 64000);
|
this.retryDelay = Math.min(2 * this.retryDelay, 64000);
|
||||||
this.stats.retry++;
|
stats.retry++;
|
||||||
} else {
|
} else {
|
||||||
window.clearTimeout(this.timeoutHandle);
|
window.clearTimeout(this.timeoutHandle);
|
||||||
logger.error(`${event.type} while loading ${this.url}` );
|
logger.error(`${status} while loading ${this.url}` );
|
||||||
this.onError(event);
|
this.onError(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadtimeout(event) {
|
loadtimeout(event) {
|
||||||
logger.warn(`timeout while loading ${this.url}` );
|
logger.warn(`timeout while loading ${this.url}` );
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "iron-a11y-keys-behavior",
|
"name": "iron-a11y-keys-behavior",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "A behavior that enables keybindings for greater a11y.",
|
"description": "A behavior that enables keybindings for greater a11y.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"web-components",
|
"web-components",
|
||||||
@ -31,11 +31,11 @@
|
|||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
|
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
|
||||||
"_release": "1.1.0",
|
"_release": "1.1.1",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.0",
|
"tag": "v1.1.1",
|
||||||
"commit": "cd8c972278c0d916bef57209d7dce5b81e67687c"
|
"commit": "12af7cb19b2c6b3887e37a5ea1501ffe676d1e8a"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git",
|
"_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "iron-a11y-keys-behavior",
|
"name": "iron-a11y-keys-behavior",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "A behavior that enables keybindings for greater a11y.",
|
"description": "A behavior that enables keybindings for greater a11y.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"web-components",
|
"web-components",
|
||||||
|
@ -86,7 +86,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
keyBindings: {
|
keyBindings: {
|
||||||
'* pageup pagedown left right down up home end space enter @ ~ " $ ? ! \\ + : # backspace': '_updatePressed',
|
'* pageup pagedown left right down up home end space enter @ ~ " $ ? ! \\ + : # backspace': '_updatePressed',
|
||||||
'a': '_updatePressed',
|
'a': '_updatePressed',
|
||||||
'shift+a alt+a': '_updatePressed'
|
'shift+a alt+a': '_updatePressed',
|
||||||
|
'shift+tab shift+space': '_updatePressed'
|
||||||
},
|
},
|
||||||
|
|
||||||
_updatePressed: function(event) {
|
_updatePressed: function(event) {
|
||||||
|
@ -65,6 +65,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
'meta': 'metaKey'
|
'meta': 'metaKey'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* KeyboardEvent.key is mostly represented by printable character made by
|
||||||
|
* the keyboard, with unprintable keys labeled nicely.
|
||||||
|
*
|
||||||
|
* However, on OS X, Alt+char can make a Unicode character that follows an
|
||||||
|
* Apple-specific mapping. In this case, we fall back to .keyCode.
|
||||||
|
*/
|
||||||
|
var KEY_CHAR = /[a-z0-9*]/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Matches a keyIdentifier string.
|
* Matches a keyIdentifier string.
|
||||||
*/
|
*/
|
||||||
@ -81,14 +90,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
*/
|
*/
|
||||||
var SPACE_KEY = /^space(bar)?/;
|
var SPACE_KEY = /^space(bar)?/;
|
||||||
|
|
||||||
function transformKey(key) {
|
/**
|
||||||
|
* Transforms the key.
|
||||||
|
* @param {string} key The KeyBoardEvent.key
|
||||||
|
* @param {Boolean} [noSpecialChars] Limits the transformation to
|
||||||
|
* alpha-numeric characters.
|
||||||
|
*/
|
||||||
|
function transformKey(key, noSpecialChars) {
|
||||||
var validKey = '';
|
var validKey = '';
|
||||||
if (key) {
|
if (key) {
|
||||||
var lKey = key.toLowerCase();
|
var lKey = key.toLowerCase();
|
||||||
if (lKey === ' ' || SPACE_KEY.test(lKey)) {
|
if (lKey === ' ' || SPACE_KEY.test(lKey)) {
|
||||||
validKey = 'space';
|
validKey = 'space';
|
||||||
} else if (lKey.length == 1) {
|
} else if (lKey.length == 1) {
|
||||||
|
if (!noSpecialChars || KEY_CHAR.test(lKey)) {
|
||||||
validKey = lKey;
|
validKey = lKey;
|
||||||
|
}
|
||||||
} else if (ARROW_KEY.test(lKey)) {
|
} else if (ARROW_KEY.test(lKey)) {
|
||||||
validKey = lKey.replace('arrow', '');
|
validKey = lKey.replace('arrow', '');
|
||||||
} else if (lKey == 'multiply') {
|
} else if (lKey == 'multiply') {
|
||||||
@ -139,17 +156,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
return validKey;
|
return validKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizedKeyForEvent(keyEvent) {
|
/**
|
||||||
// fall back from .key, to .keyIdentifier, to .keyCode, and then to
|
* Calculates the normalized key for a KeyboardEvent.
|
||||||
// .detail.key to support artificial keyboard events
|
* @param {KeyboardEvent} keyEvent
|
||||||
return transformKey(keyEvent.key) ||
|
* @param {Boolean} [noSpecialChars] Set to true to limit keyEvent.key
|
||||||
|
* transformation to alpha-numeric chars. This is useful with key
|
||||||
|
* combinations like shift + 2, which on FF for MacOS produces
|
||||||
|
* keyEvent.key = @
|
||||||
|
* To get 2 returned, set noSpecialChars = true
|
||||||
|
* To get @ returned, set noSpecialChars = false
|
||||||
|
*/
|
||||||
|
function normalizedKeyForEvent(keyEvent, noSpecialChars) {
|
||||||
|
// Fall back from .key, to .keyIdentifier, to .keyCode, and then to
|
||||||
|
// .detail.key to support artificial keyboard events.
|
||||||
|
return transformKey(keyEvent.key, noSpecialChars) ||
|
||||||
transformKeyIdentifier(keyEvent.keyIdentifier) ||
|
transformKeyIdentifier(keyEvent.keyIdentifier) ||
|
||||||
transformKeyCode(keyEvent.keyCode) ||
|
transformKeyCode(keyEvent.keyCode) ||
|
||||||
transformKey(keyEvent.detail.key) || '';
|
transformKey(keyEvent.detail.key, noSpecialChars) || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function keyComboMatchesEvent(keyCombo, event, eventKey) {
|
function keyComboMatchesEvent(keyCombo, event) {
|
||||||
return eventKey === keyCombo.key &&
|
// For combos with modifiers we support only alpha-numeric keys
|
||||||
|
var keyEvent = normalizedKeyForEvent(event, keyCombo.hasModifiers);
|
||||||
|
return keyEvent === keyCombo.key &&
|
||||||
(!keyCombo.hasModifiers || (
|
(!keyCombo.hasModifiers || (
|
||||||
!!event.shiftKey === !!keyCombo.shiftKey &&
|
!!event.shiftKey === !!keyCombo.shiftKey &&
|
||||||
!!event.ctrlKey === !!keyCombo.ctrlKey &&
|
!!event.ctrlKey === !!keyCombo.ctrlKey &&
|
||||||
@ -286,9 +315,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
|
|
||||||
keyboardEventMatchesKeys: function(event, eventString) {
|
keyboardEventMatchesKeys: function(event, eventString) {
|
||||||
var keyCombos = parseEventString(eventString);
|
var keyCombos = parseEventString(eventString);
|
||||||
var eventKey = normalizedKeyForEvent(event);
|
|
||||||
for (var i = 0; i < keyCombos.length; ++i) {
|
for (var i = 0; i < keyCombos.length; ++i) {
|
||||||
if (keyComboMatchesEvent(keyCombos[i], event, eventKey)) {
|
if (keyComboMatchesEvent(keyCombos[i], event)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -388,11 +416,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var eventKey = normalizedKeyForEvent(event);
|
|
||||||
for (var i = 0; i < keyBindings.length; i++) {
|
for (var i = 0; i < keyBindings.length; i++) {
|
||||||
var keyCombo = keyBindings[i][0];
|
var keyCombo = keyBindings[i][0];
|
||||||
var handlerName = keyBindings[i][1];
|
var handlerName = keyBindings[i][1];
|
||||||
if (keyComboMatchesEvent(keyCombo, event, eventKey)) {
|
if (keyComboMatchesEvent(keyCombo, event)) {
|
||||||
this._triggerKeyHandler(keyCombo, handlerName, event);
|
this._triggerKeyHandler(keyCombo, handlerName, event);
|
||||||
// exit the loop if eventDefault was prevented
|
// exit the loop if eventDefault was prevented
|
||||||
if (event.defaultPrevented) {
|
if (event.defaultPrevented) {
|
||||||
|
@ -97,7 +97,8 @@ suite('Polymer.IronA11yKeysBehavior', function() {
|
|||||||
],
|
],
|
||||||
|
|
||||||
keyBindings: {
|
keyBindings: {
|
||||||
'space': '_keyHandler'
|
'space': '_keyHandler',
|
||||||
|
'@': '_keyHandler'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -179,6 +180,13 @@ suite('Polymer.IronA11yKeysBehavior', function() {
|
|||||||
expect(keys.keyCount).to.be.equal(1);
|
expect(keys.keyCount).to.be.equal(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('handles special character @', function() {
|
||||||
|
var event = new CustomEvent('keydown');
|
||||||
|
event.key = '@';
|
||||||
|
keys.dispatchEvent(event);
|
||||||
|
expect(keys.keyCount).to.be.equal(1);
|
||||||
|
});
|
||||||
|
|
||||||
test('do not trigger the handler for non-specified keys', function() {
|
test('do not trigger the handler for non-specified keys', function() {
|
||||||
MockInteractions.pressEnter(keys);
|
MockInteractions.pressEnter(keys);
|
||||||
|
|
||||||
@ -284,6 +292,19 @@ suite('Polymer.IronA11yKeysBehavior', function() {
|
|||||||
expect(keys.keyCount).to.be.equal(1);
|
expect(keys.keyCount).to.be.equal(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('check if KeyBoardEvent.key is alpha-numberic', function() {
|
||||||
|
var event = new CustomEvent('keydown');
|
||||||
|
|
||||||
|
event.ctrlKey = true;
|
||||||
|
event.shiftKey = true;
|
||||||
|
event.key = 'å';
|
||||||
|
event.keyCode = event.code = 65;
|
||||||
|
|
||||||
|
keys.dispatchEvent(event);
|
||||||
|
|
||||||
|
expect(keys.keyCount).to.be.equal(1);
|
||||||
|
});
|
||||||
|
|
||||||
test('trigger also bindings without modifiers', function() {
|
test('trigger also bindings without modifiers', function() {
|
||||||
var event = new CustomEvent('keydown');
|
var event = new CustomEvent('keydown');
|
||||||
// Combo `shift+enter`.
|
// Combo `shift+enter`.
|
||||||
@ -305,6 +326,7 @@ suite('Polymer.IronA11yKeysBehavior', function() {
|
|||||||
expect(shiftEnterSpy.called).to.be.true;
|
expect(shiftEnterSpy.called).to.be.true;
|
||||||
expect(enterSpy.calledAfter(shiftEnterSpy)).to.be.true;
|
expect(enterSpy.calledAfter(shiftEnterSpy)).to.be.true;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
suite('alternative event keys', function() {
|
suite('alternative event keys', function() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "iron-icons",
|
"name": "iron-icons",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "A set of icons for use with iron-icon",
|
"description": "A set of icons for use with iron-icon",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
@ -34,11 +34,11 @@
|
|||||||
"util",
|
"util",
|
||||||
"update-icons.sh"
|
"update-icons.sh"
|
||||||
],
|
],
|
||||||
"_release": "1.1.0",
|
"_release": "1.1.1",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.0",
|
"tag": "v1.1.1",
|
||||||
"commit": "623d8dae77cd8658ce1f6834b30a4f3f6e2100ea"
|
"commit": "77a8e0190d6c481d8b5df0495fa484928880ea53"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-icons.git",
|
"_source": "git://github.com/PolymerElements/iron-icons.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "iron-icons",
|
"name": "iron-icons",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "A set of icons for use with iron-icon",
|
"description": "A set of icons for use with iron-icon",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -30,6 +30,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
<link rel="import" href="../maps-icons.html">
|
<link rel="import" href="../maps-icons.html">
|
||||||
<link rel="import" href="../notification-icons.html">
|
<link rel="import" href="../notification-icons.html">
|
||||||
<link rel="import" href="../social-icons.html">
|
<link rel="import" href="../social-icons.html">
|
||||||
|
<link rel="import" href="../places-icons.html">
|
||||||
|
|
||||||
<style is="custom-style">
|
<style is="custom-style">
|
||||||
|
|
||||||
|
32
dashboard-ui/bower_components/jquery/.bower.json
vendored
32
dashboard-ui/bower_components/jquery/.bower.json
vendored
@ -1,36 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "jquery",
|
"name": "jquery",
|
||||||
"version": "2.1.4",
|
|
||||||
"main": "dist/jquery.js",
|
|
||||||
"license": "MIT",
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"build",
|
|
||||||
"dist/cdn",
|
|
||||||
"speed",
|
|
||||||
"test",
|
|
||||||
"*.md",
|
|
||||||
"AUTHORS.txt",
|
|
||||||
"Gruntfile.js",
|
|
||||||
"package.json"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"sizzle": "2.1.1-jquery.2.1.2",
|
|
||||||
"requirejs": "2.1.10",
|
|
||||||
"qunit": "1.14.0",
|
|
||||||
"sinon": "1.8.1"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"jquery",
|
|
||||||
"javascript",
|
|
||||||
"library"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/jquery/jquery",
|
"homepage": "https://github.com/jquery/jquery",
|
||||||
"_release": "2.1.4",
|
"version": "2.2.0",
|
||||||
|
"_release": "2.2.0",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "2.1.4",
|
"tag": "2.2.0",
|
||||||
"commit": "7751e69b615c6eca6f783a81e292a55725af6b85"
|
"commit": "33b548c8e3d43b2ebdfb129fd8086a3b0c905919"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/jquery/jquery.git",
|
"_source": "git://github.com/jquery/jquery.git",
|
||||||
"_target": ">=1.9.1",
|
"_target": ">=1.9.1",
|
||||||
|
27
dashboard-ui/bower_components/jquery/.editorconfig
vendored
Normal file
27
dashboard-ui/bower_components/jquery/.editorconfig
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# This file is for unifying the coding style for different editors and IDEs
|
||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
# Tabs in JS unless otherwise specified
|
||||||
|
[**.js]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[test/**.xml]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[test/**.php]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[test/**.html]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[test/**.css]
|
||||||
|
indent_style = tab
|
5
dashboard-ui/bower_components/jquery/.gitattributes
vendored
Normal file
5
dashboard-ui/bower_components/jquery/.gitattributes
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# JS files must always use LF for tools to work
|
||||||
|
*.js eol=lf
|
14
dashboard-ui/bower_components/jquery/.gitignore
vendored
Normal file
14
dashboard-ui/bower_components/jquery/.gitignore
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.project
|
||||||
|
.settings
|
||||||
|
*~
|
||||||
|
*.diff
|
||||||
|
*.patch
|
||||||
|
/*.html
|
||||||
|
.DS_Store
|
||||||
|
.bower.json
|
||||||
|
.sizecache.json
|
||||||
|
|
||||||
|
/dist
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
/test/node_smoke_tests/lib/ensure_iterability.js
|
10
dashboard-ui/bower_components/jquery/.jscsrc
vendored
Normal file
10
dashboard-ui/bower_components/jquery/.jscsrc
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"preset": "jquery",
|
||||||
|
|
||||||
|
// remove after https://github.com/jscs-dev/node-jscs/issues/1685
|
||||||
|
// and https://github.com/jscs-dev/node-jscs/issues/1686
|
||||||
|
"requireCapitalizedComments": null,
|
||||||
|
|
||||||
|
"excludeFiles": [ "external", "src/intro.js", "src/outro.js",
|
||||||
|
"test/node_smoke_tests/lib/ensure_iterability.js", "node_modules" ]
|
||||||
|
}
|
12
dashboard-ui/bower_components/jquery/.jshintignore
vendored
Normal file
12
dashboard-ui/bower_components/jquery/.jshintignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
external
|
||||||
|
src/intro.js
|
||||||
|
src/outro.js
|
||||||
|
test/data/jquery-1.9.1.js
|
||||||
|
test/data/badcall.js
|
||||||
|
test/data/badjson.js
|
||||||
|
test/data/json_obj.js
|
||||||
|
test/data/readywaitasset.js
|
||||||
|
test/data/readywaitloader.js
|
||||||
|
test/data/support/csp.js
|
||||||
|
test/data/support/getComputedSupport.js
|
||||||
|
test/node_smoke_tests/lib/ensure_iterability.js
|
14
dashboard-ui/bower_components/jquery/.jshintrc
vendored
Normal file
14
dashboard-ui/bower_components/jquery/.jshintrc
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"boss": true,
|
||||||
|
"curly": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"eqnull": true,
|
||||||
|
"expr": true,
|
||||||
|
"immed": true,
|
||||||
|
"noarg": true,
|
||||||
|
"quotmark": "double",
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
|
||||||
|
"node": true
|
||||||
|
}
|
104
dashboard-ui/bower_components/jquery/.mailmap
vendored
Normal file
104
dashboard-ui/bower_components/jquery/.mailmap
vendored
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
Adam Coulombe <me@adam.co> <adamcoulombe187@hotmail.com>
|
||||||
|
Adam J. Sontag <ajpiano@ajpiano.com>
|
||||||
|
Alexander Farkas <info@corrupt-system.de>
|
||||||
|
Alexander Farkas <info@corrupt-system.de> <a.farkas.pm@googlemail.com>
|
||||||
|
Alexis Abril <me@alexisabril.com> <alexis.abril@gmail.com>
|
||||||
|
Andrew E Monat <amonat@gmail.com>
|
||||||
|
Anton Matzneller <obhvsbypqghgc@gmail.com>
|
||||||
|
Anton Matzneller <obhvsbypqghgc@gmail.com> <haskell_noob-github@yahoo.de>
|
||||||
|
Batiste Bieler <batiste.bieler@gmail.com>
|
||||||
|
Benjamin Truyman <bentruyman@gmail.com>
|
||||||
|
Brandon Aaron <brandon.aaron@gmail.com>
|
||||||
|
Carl Danley <carldanley@gmail.com>
|
||||||
|
Carl Fürstenberg <azatoth@gmail.com>
|
||||||
|
Carl Fürstenberg <azatoth@gmail.com> <carl@excito.com>
|
||||||
|
Charles McNulty <cmcnulty@kznf.com>
|
||||||
|
Christopher Jones <chris@cjqed.com> cjqed <christopherjonesqed@gmail.com>
|
||||||
|
Colin Snover <github.com@zetafleet.com> <colin@alpha.zetafleet.com>
|
||||||
|
Corey Frang <gnarf37@gmail.com> <gnarf@gnarf.net>
|
||||||
|
Dan Heberden <danheberden@gmail.com>
|
||||||
|
Daniel Chatfield <chatfielddaniel@gmail.com> <chatfielddaniel@googlemail.com>
|
||||||
|
Daniel Gálvez <dgalvez@editablething.com>
|
||||||
|
Danil Somsikov <danilasomsikov@gmail.com>
|
||||||
|
Dave Methvin <dave.methvin@gmail.com>
|
||||||
|
Dave Reed <dareed@microsoft.com>
|
||||||
|
David Fox <dfoxinator@gmail.com> <dfox@snap-interactive.com>
|
||||||
|
David Hong <d.hong@me.com>
|
||||||
|
David Murdoch <david@davidmurdoch.com> <musicisair@yahoo.com>
|
||||||
|
Devin Cooper <cooper.semantics@gmail.com> <dcooper@snap-interactive.com>
|
||||||
|
Douglas Neiner <doug@dougneiner.com> <doug@pixelgraphics.us>
|
||||||
|
Dmitry Gusev <dmitry.gusev@gmail.com>
|
||||||
|
Earle Castledine <mrspeaker@gmail.com>
|
||||||
|
Erick Ruiz de Chávez <erickrdch@gmail.com>
|
||||||
|
Gianni Alessandro Chiappetta <gianni@runlevel6.org>
|
||||||
|
Heungsub Lee <h@subl.ee> <lee@heungsub.net>
|
||||||
|
Iraê Carvalho <irae@irae.pro.br>
|
||||||
|
Isaac Z. Schlueter <i@izs.me>
|
||||||
|
Ismail Khair <ismail.khair@gmail.com>
|
||||||
|
James Burke <jrburke@gmail.com>
|
||||||
|
James Padolsey <cla@padolsey.net> <jamespadolsey@gmail.com>
|
||||||
|
Jason Bedard <jason+jquery@jbedard.ca> <github@jbedard.ca>
|
||||||
|
Jay Merrifield <fracmak@gmail.com>
|
||||||
|
Jay Merrifield <fracmak@gmail.com> <jmerrifiel@gannett.com>
|
||||||
|
Jean Boussier <jean.boussier@gmail.com>
|
||||||
|
Jephte Clain <Jephte.Clain@univ-reunion.fr>
|
||||||
|
Jess Thrysoee <jess@thrysoee.dk>
|
||||||
|
Joao Henrique de Andrade Bruni <joaohbruni@yahoo.com.br>
|
||||||
|
Joe Presbrey <presbrey@gmail.com> <presbrey+jwp@gmail.com>
|
||||||
|
John Resig <jeresig@gmail.com>
|
||||||
|
John Resig <jeresig@gmail.com> <jeresig@Archimedes.local>
|
||||||
|
Jordan Boesch <jboesch26@gmail.com> <jordan@boedesign.com>
|
||||||
|
Josh Varner <josh.varner@gmail.com> <josh.varner@gmail.com>
|
||||||
|
Julian Aubourg <aubourg.julian@gmail.com>
|
||||||
|
Julian Aubourg <aubourg.julian@gmail.com> <j@ubourg.net>
|
||||||
|
Julian Aubourg <aubourg.julian@gmail.com> <Julian@.(none)>
|
||||||
|
Jörn Zaefferer <joern.zaefferer@gmail.com>
|
||||||
|
Jörn Zaefferer <joern.zaefferer@gmail.com> <joern.zaefferer@googlemail.com>
|
||||||
|
Jörn Zaefferer <joern.zaefferer@gmail.com> <JZA@.(none)>
|
||||||
|
Karl Swedberg <kswedberg@gmail.com> <karl@englishrules.com>
|
||||||
|
Klaus Hartl <klaus.hartl@gmail.com> <klaus.hartl@googlemail.com>
|
||||||
|
Kris Borchers <kris.borchers@gmail.com>
|
||||||
|
Lee Carpenter <elcarpie@gmail.com>
|
||||||
|
Li Xudong <istonelee@gmail.com>
|
||||||
|
Louis-Rémi Babé <lrbabe@gmail.com>
|
||||||
|
Louis-Rémi Babé <lrbabe@gmail.com> <louisremi@louisremi-laptop.(none)>
|
||||||
|
Louis-Rémi Babé <lrbabe@gmail.com> <lrbabe@lrbabe-laptop.(none)>
|
||||||
|
Louis-Rémi Babé <lrbabe@gmail.com> <lrbabe@lrbabe-laptop>
|
||||||
|
Marcel Greter <marcel.greter@ocbnet.ch> <mgr@rtp.ch>
|
||||||
|
Matthias Jäggli <matthias.jaeggli@gmail.com> <matthias.jaeggli@scout24.ch>
|
||||||
|
Michael Murray <m@murz.net> <mmurray.wa@gmail.com>
|
||||||
|
Michał Gołębiowski <m.goleb@gmail.com>
|
||||||
|
Michał Gołębiowski <m.goleb@gmail.com> <michal.golebiowski@laboratorium.ee>
|
||||||
|
Mike Alsup <malsup@gmail.com>
|
||||||
|
Nguyen Phuc Lam <ruado1987@gmail.com>
|
||||||
|
Oleg Gaidarenko <markelog@gmail.com>
|
||||||
|
Paul Bakaus <paul.bakaus@gmail.com> <paul.bakaus@googlemail.com>
|
||||||
|
Rafaël Blais Masson <rafbmasson@gmail.com>
|
||||||
|
Richard D. Worth <rdworth@gmail.com>
|
||||||
|
Rick Waldron <waldron.rick@gmail.com>
|
||||||
|
Rick Waldron <waldron.rick@gmail.com> <rick@bocoup.com>
|
||||||
|
Robert Katić <robert.katic@gmail.com>
|
||||||
|
Roman Reiß <me@silverwind.io>
|
||||||
|
Ron Otten <r.j.g.otten@gmail.com>
|
||||||
|
Sai Lung Wong <sai.wong@huffingtonpost.com>
|
||||||
|
Scott González <scott.gonzalez@gmail.com> <sgonzale@sgonzale-laptop.local>
|
||||||
|
Scott Jehl <scottjehl@gmail.com> <scott@scottjehl.com>
|
||||||
|
Sebastian Burkhard <sebi.burkhard@gmail.com>
|
||||||
|
Senya Pugach <upisfree@outlook.com>
|
||||||
|
Thomas Tortorini <thomastortorini@gmail.com> Mr21
|
||||||
|
Timmy Willison <timmywillisn@gmail.com>
|
||||||
|
Timmy Willison <timmywillisn@gmail.com> <tim.willison@thisismedium.com>
|
||||||
|
Timo Tijhof <krinklemail@gmail.com>
|
||||||
|
TJ Holowaychuk <tj@vision-media.ca>
|
||||||
|
Tom H Fuertes <tomfuertes@gmail.com>
|
||||||
|
Tom H Fuertes <tomfuertes@gmail.com> Tom H Fuertes <TomFuertes@gmail.com>
|
||||||
|
Tom Viner <github@viner.tv>
|
||||||
|
Wesley Walser <waw325@gmail.com> <wwalser@atlassian.com>
|
||||||
|
Xavi Ramirez <xavi.rmz@gmail.com>
|
||||||
|
Xavier Montillet <xavierm02.net@gmail.com>
|
||||||
|
Yehuda Katz <wycats@gmail.com>
|
||||||
|
Yehuda Katz <wycats@gmail.com> <wycats@12-189-125-93.att-inc.com>
|
||||||
|
Yehuda Katz <wycats@gmail.com> <wycats@mobile005.mycingular.net>
|
||||||
|
Yehuda Katz <wycats@gmail.com> <wycats@Yehuda-Katz.local>
|
||||||
|
Yiming He <yiminghe@gmail.com>
|
||||||
|
Terry Jones <terry@jon.es> <terry@fluidinfo.com>
|
17
dashboard-ui/bower_components/jquery/.npmignore
vendored
Normal file
17
dashboard-ui/bower_components/jquery/.npmignore
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.jshintignore
|
||||||
|
.jshintrc
|
||||||
|
|
||||||
|
/.editorconfig
|
||||||
|
/.gitattributes
|
||||||
|
/.jscs.json
|
||||||
|
/.mailmap
|
||||||
|
/.travis.yml
|
||||||
|
|
||||||
|
/build
|
||||||
|
/speed
|
||||||
|
/test
|
||||||
|
/Gruntfile.js
|
||||||
|
|
||||||
|
/external/qunit
|
||||||
|
/external/requirejs
|
||||||
|
/external/sinon
|
7
dashboard-ui/bower_components/jquery/.travis.yml
vendored
Normal file
7
dashboard-ui/bower_components/jquery/.travis.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
language: node_js
|
||||||
|
sudo: false
|
||||||
|
node_js:
|
||||||
|
- "0.10"
|
||||||
|
- "0.12"
|
||||||
|
- "4"
|
||||||
|
- "5"
|
275
dashboard-ui/bower_components/jquery/AUTHORS.txt
vendored
Normal file
275
dashboard-ui/bower_components/jquery/AUTHORS.txt
vendored
Normal file
@ -0,0 +1,275 @@
|
|||||||
|
Authors ordered by first contribution.
|
||||||
|
|
||||||
|
John Resig <jeresig@gmail.com>
|
||||||
|
Gilles van den Hoven <gilles0181@gmail.com>
|
||||||
|
Michael Geary <mike@geary.com>
|
||||||
|
Stefan Petre <stefan.petre@gmail.com>
|
||||||
|
Yehuda Katz <wycats@gmail.com>
|
||||||
|
Corey Jewett <cj@syntheticplayground.com>
|
||||||
|
Klaus Hartl <klaus.hartl@gmail.com>
|
||||||
|
Franck Marcia <franck.marcia@gmail.com>
|
||||||
|
Jörn Zaefferer <joern.zaefferer@gmail.com>
|
||||||
|
Paul Bakaus <paul.bakaus@gmail.com>
|
||||||
|
Brandon Aaron <brandon.aaron@gmail.com>
|
||||||
|
Mike Alsup <malsup@gmail.com>
|
||||||
|
Dave Methvin <dave.methvin@gmail.com>
|
||||||
|
Ed Engelhardt <edengelhardt@gmail.com>
|
||||||
|
Sean Catchpole <littlecooldude@gmail.com>
|
||||||
|
Paul Mclanahan <pmclanahan@gmail.com>
|
||||||
|
David Serduke <davidserduke@gmail.com>
|
||||||
|
Richard D. Worth <rdworth@gmail.com>
|
||||||
|
Scott González <scott.gonzalez@gmail.com>
|
||||||
|
Ariel Flesler <aflesler@gmail.com>
|
||||||
|
Jon Evans <jon@springyweb.com>
|
||||||
|
TJ Holowaychuk <tj@vision-media.ca>
|
||||||
|
Michael Bensoussan <mickey@seesmic.com>
|
||||||
|
Robert Katić <robert.katic@gmail.com>
|
||||||
|
Louis-Rémi Babé <lrbabe@gmail.com>
|
||||||
|
Earle Castledine <mrspeaker@gmail.com>
|
||||||
|
Damian Janowski <damian.janowski@gmail.com>
|
||||||
|
Rich Dougherty <rich@rd.gen.nz>
|
||||||
|
Kim Dalsgaard <kim@kimdalsgaard.com>
|
||||||
|
Andrea Giammarchi <andrea.giammarchi@gmail.com>
|
||||||
|
Mark Gibson <jollytoad@gmail.com>
|
||||||
|
Karl Swedberg <kswedberg@gmail.com>
|
||||||
|
Justin Meyer <justinbmeyer@gmail.com>
|
||||||
|
Ben Alman <cowboy@rj3.net>
|
||||||
|
James Padolsey <cla@padolsey.net>
|
||||||
|
David Petersen <public@petersendidit.com>
|
||||||
|
Batiste Bieler <batiste.bieler@gmail.com>
|
||||||
|
Alexander Farkas <info@corrupt-system.de>
|
||||||
|
Rick Waldron <waldron.rick@gmail.com>
|
||||||
|
Filipe Fortes <filipe@fortes.com>
|
||||||
|
Neeraj Singh <neerajdotname@gmail.com>
|
||||||
|
Paul Irish <paul.irish@gmail.com>
|
||||||
|
Iraê Carvalho <irae@irae.pro.br>
|
||||||
|
Matt Curry <matt@pseudocoder.com>
|
||||||
|
Michael Monteleone <michael@michaelmonteleone.net>
|
||||||
|
Noah Sloan <noah.sloan@gmail.com>
|
||||||
|
Tom Viner <github@viner.tv>
|
||||||
|
Douglas Neiner <doug@dougneiner.com>
|
||||||
|
Adam J. Sontag <ajpiano@ajpiano.com>
|
||||||
|
Dave Reed <dareed@microsoft.com>
|
||||||
|
Ralph Whitbeck <ralph.whitbeck@gmail.com>
|
||||||
|
Carl Fürstenberg <azatoth@gmail.com>
|
||||||
|
Jacob Wright <jacwright@gmail.com>
|
||||||
|
J. Ryan Stinnett <jryans@gmail.com>
|
||||||
|
unknown <Igen005@.upcorp.ad.uprr.com>
|
||||||
|
temp01 <temp01irc@gmail.com>
|
||||||
|
Heungsub Lee <h@subl.ee>
|
||||||
|
Colin Snover <github.com@zetafleet.com>
|
||||||
|
Ryan W Tenney <ryan@10e.us>
|
||||||
|
Pinhook <contact@pinhooklabs.com>
|
||||||
|
Ron Otten <r.j.g.otten@gmail.com>
|
||||||
|
Jephte Clain <Jephte.Clain@univ-reunion.fr>
|
||||||
|
Anton Matzneller <obhvsbypqghgc@gmail.com>
|
||||||
|
Alex Sexton <AlexSexton@gmail.com>
|
||||||
|
Dan Heberden <danheberden@gmail.com>
|
||||||
|
Henri Wiechers <hwiechers@gmail.com>
|
||||||
|
Russell Holbrook <russell.holbrook@patch.com>
|
||||||
|
Julian Aubourg <aubourg.julian@gmail.com>
|
||||||
|
Gianni Alessandro Chiappetta <gianni@runlevel6.org>
|
||||||
|
Scott Jehl <scottjehl@gmail.com>
|
||||||
|
James Burke <jrburke@gmail.com>
|
||||||
|
Jonas Pfenniger <jonas@pfenniger.name>
|
||||||
|
Xavi Ramirez <xavi.rmz@gmail.com>
|
||||||
|
Jared Grippe <jared@deadlyicon.com>
|
||||||
|
Sylvester Keil <sylvester@keil.or.at>
|
||||||
|
Brandon Sterne <bsterne@mozilla.com>
|
||||||
|
Mathias Bynens <mathias@qiwi.be>
|
||||||
|
Timmy Willison <timmywillisn@gmail.com>
|
||||||
|
Corey Frang <gnarf37@gmail.com>
|
||||||
|
Digitalxero <digitalxero>
|
||||||
|
Anton Kovalyov <anton@kovalyov.net>
|
||||||
|
David Murdoch <david@davidmurdoch.com>
|
||||||
|
Josh Varner <josh.varner@gmail.com>
|
||||||
|
Charles McNulty <cmcnulty@kznf.com>
|
||||||
|
Jordan Boesch <jboesch26@gmail.com>
|
||||||
|
Jess Thrysoee <jess@thrysoee.dk>
|
||||||
|
Michael Murray <m@murz.net>
|
||||||
|
Lee Carpenter <elcarpie@gmail.com>
|
||||||
|
Alexis Abril <me@alexisabril.com>
|
||||||
|
Rob Morgan <robbym@gmail.com>
|
||||||
|
John Firebaugh <john_firebaugh@bigfix.com>
|
||||||
|
Sam Bisbee <sam@sbisbee.com>
|
||||||
|
Gilmore Davidson <gilmoreorless@gmail.com>
|
||||||
|
Brian Brennan <me@brianlovesthings.com>
|
||||||
|
Xavier Montillet <xavierm02.net@gmail.com>
|
||||||
|
Daniel Pihlstrom <sciolist.se@gmail.com>
|
||||||
|
Sahab Yazdani <sahab.yazdani+github@gmail.com>
|
||||||
|
avaly <github-com@agachi.name>
|
||||||
|
Scott Hughes <hi@scott-hughes.me>
|
||||||
|
Mike Sherov <mike.sherov@gmail.com>
|
||||||
|
Greg Hazel <ghazel@gmail.com>
|
||||||
|
Schalk Neethling <schalk@ossreleasefeed.com>
|
||||||
|
Denis Knauf <Denis.Knauf@gmail.com>
|
||||||
|
Timo Tijhof <krinklemail@gmail.com>
|
||||||
|
Steen Nielsen <swinedk@gmail.com>
|
||||||
|
Anton Ryzhov <anton@ryzhov.me>
|
||||||
|
Shi Chuan <shichuanr@gmail.com>
|
||||||
|
Berker Peksag <berker.peksag@gmail.com>
|
||||||
|
Toby Brain <tobyb@freshview.com>
|
||||||
|
Matt Mueller <mattmuelle@gmail.com>
|
||||||
|
Justin <drakefjustin@gmail.com>
|
||||||
|
Daniel Herman <daniel.c.herman@gmail.com>
|
||||||
|
Oleg Gaidarenko <markelog@gmail.com>
|
||||||
|
Richard Gibson <richard.gibson@gmail.com>
|
||||||
|
Rafaël Blais Masson <rafbmasson@gmail.com>
|
||||||
|
cmc3cn <59194618@qq.com>
|
||||||
|
Joe Presbrey <presbrey@gmail.com>
|
||||||
|
Sindre Sorhus <sindresorhus@gmail.com>
|
||||||
|
Arne de Bree <arne@bukkie.nl>
|
||||||
|
Vladislav Zarakovsky <vlad.zar@gmail.com>
|
||||||
|
Andrew E Monat <amonat@gmail.com>
|
||||||
|
Oskari <admin@o-programs.com>
|
||||||
|
Joao Henrique de Andrade Bruni <joaohbruni@yahoo.com.br>
|
||||||
|
tsinha <tsinha@Anthonys-MacBook-Pro.local>
|
||||||
|
Matt Farmer <matt@frmr.me>
|
||||||
|
Trey Hunner <treyhunner@gmail.com>
|
||||||
|
Jason Moon <jmoon@socialcast.com>
|
||||||
|
Jeffery To <jeffery.to@gmail.com>
|
||||||
|
Kris Borchers <kris.borchers@gmail.com>
|
||||||
|
Vladimir Zhuravlev <private.face@gmail.com>
|
||||||
|
Jacob Thornton <jacobthornton@gmail.com>
|
||||||
|
Chad Killingsworth <chadkillingsworth@missouristate.edu>
|
||||||
|
Nowres Rafid <nowres.rafed@gmail.com>
|
||||||
|
David Benjamin <davidben@mit.edu>
|
||||||
|
Uri Gilad <antishok@gmail.com>
|
||||||
|
Chris Faulkner <thefaulkner@gmail.com>
|
||||||
|
Elijah Manor <elijah.manor@gmail.com>
|
||||||
|
Daniel Chatfield <chatfielddaniel@gmail.com>
|
||||||
|
Nikita Govorov <nikita.govorov@gmail.com>
|
||||||
|
Wesley Walser <waw325@gmail.com>
|
||||||
|
Mike Pennisi <mike@mikepennisi.com>
|
||||||
|
Markus Staab <markus.staab@redaxo.de>
|
||||||
|
Dave Riddle <david@joyvuu.com>
|
||||||
|
Callum Macrae <callum@lynxphp.com>
|
||||||
|
Benjamin Truyman <bentruyman@gmail.com>
|
||||||
|
James Huston <james@jameshuston.net>
|
||||||
|
Erick Ruiz de Chávez <erickrdch@gmail.com>
|
||||||
|
David Bonner <dbonner@cogolabs.com>
|
||||||
|
Akintayo Akinwunmi <aakinwunmi@judge.com>
|
||||||
|
MORGAN <morgan@morgangraphics.com>
|
||||||
|
Ismail Khair <ismail.khair@gmail.com>
|
||||||
|
Carl Danley <carldanley@gmail.com>
|
||||||
|
Mike Petrovich <michael.c.petrovich@gmail.com>
|
||||||
|
Greg Lavallee <greglavallee@wapolabs.com>
|
||||||
|
Daniel Gálvez <dgalvez@editablething.com>
|
||||||
|
Sai Lung Wong <sai.wong@huffingtonpost.com>
|
||||||
|
Tom H Fuertes <TomFuertes@gmail.com>
|
||||||
|
Roland Eckl <eckl.roland@googlemail.com>
|
||||||
|
Jay Merrifield <fracmak@gmail.com>
|
||||||
|
Allen J Schmidt Jr <cobrasoft@gmail.com>
|
||||||
|
Jonathan Sampson <jjdsampson@gmail.com>
|
||||||
|
Marcel Greter <marcel.greter@ocbnet.ch>
|
||||||
|
Matthias Jäggli <matthias.jaeggli@gmail.com>
|
||||||
|
David Fox <dfoxinator@gmail.com>
|
||||||
|
Yiming He <yiminghe@gmail.com>
|
||||||
|
Devin Cooper <cooper.semantics@gmail.com>
|
||||||
|
Paul Ramos <paul.b.ramos@gmail.com>
|
||||||
|
Rod Vagg <rod@vagg.org>
|
||||||
|
Bennett Sorbo <bsorbo@gmail.com>
|
||||||
|
Sebastian Burkhard <sebi.burkhard@gmail.com>
|
||||||
|
Zachary Adam Kaplan <razic@viralkitty.com>
|
||||||
|
nanto_vi <nanto@moon.email.ne.jp>
|
||||||
|
nanto <nanto@moon.email.ne.jp>
|
||||||
|
Danil Somsikov <danilasomsikov@gmail.com>
|
||||||
|
Ryunosuke SATO <tricknotes.rs@gmail.com>
|
||||||
|
Jean Boussier <jean.boussier@gmail.com>
|
||||||
|
Adam Coulombe <me@adam.co>
|
||||||
|
Andrew Plummer <plummer.andrew@gmail.com>
|
||||||
|
Mark Raddatz <mraddatz@gmail.com>
|
||||||
|
Isaac Z. Schlueter <i@izs.me>
|
||||||
|
Karl Sieburg <ksieburg@yahoo.com>
|
||||||
|
Pascal Borreli <pascal@borreli.com>
|
||||||
|
Nguyen Phuc Lam <ruado1987@gmail.com>
|
||||||
|
Dmitry Gusev <dmitry.gusev@gmail.com>
|
||||||
|
Michał Gołębiowski <m.goleb@gmail.com>
|
||||||
|
Li Xudong <istonelee@gmail.com>
|
||||||
|
Steven Benner <admin@stevenbenner.com>
|
||||||
|
Tom H Fuertes <tomfuertes@gmail.com>
|
||||||
|
Renato Oliveira dos Santos <ros3@cin.ufpe.br>
|
||||||
|
ros3cin <ros3@cin.ufpe.br>
|
||||||
|
Jason Bedard <jason+jquery@jbedard.ca>
|
||||||
|
Kyle Robinson Young <kyle@dontkry.com>
|
||||||
|
Chris Talkington <chris@talkingtontech.com>
|
||||||
|
Eddie Monge <eddie@eddiemonge.com>
|
||||||
|
Terry Jones <terry@jon.es>
|
||||||
|
Jason Merino <jasonmerino@gmail.com>
|
||||||
|
Jeremy Dunck <jdunck@gmail.com>
|
||||||
|
Chris Price <price.c@gmail.com>
|
||||||
|
Guy Bedford <guybedford@gmail.com>
|
||||||
|
Amey Sakhadeo <me@ameyms.com>
|
||||||
|
Mike Sidorov <mikes.ekb@gmail.com>
|
||||||
|
Anthony Ryan <anthonyryan1@gmail.com>
|
||||||
|
Dominik D. Geyer <dominik.geyer@gmail.com>
|
||||||
|
George Kats <katsgeorgeek@gmail.com>
|
||||||
|
Lihan Li <frankieteardrop@gmail.com>
|
||||||
|
Ronny Springer <springer.ronny@gmail.com>
|
||||||
|
Chris Antaki <ChrisAntaki@gmail.com>
|
||||||
|
Marian Sollmann <marian.sollmann@cargomedia.ch>
|
||||||
|
njhamann <njhamann@gmail.com>
|
||||||
|
Ilya Kantor <iliakan@gmail.com>
|
||||||
|
David Hong <d.hong@me.com>
|
||||||
|
John Paul <john@johnkpaul.com>
|
||||||
|
Jakob Stoeck <jakob@pokermania.de>
|
||||||
|
Christopher Jones <chris@cjqed.com>
|
||||||
|
Forbes Lindesay <forbes@lindesay.co.uk>
|
||||||
|
S. Andrew Sheppard <andrew@wq.io>
|
||||||
|
Leonardo Balter <leonardo.balter@gmail.com>
|
||||||
|
Roman Reiß <me@silverwind.io>
|
||||||
|
Benjy Cui <benjytrys@gmail.com>
|
||||||
|
Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
|
||||||
|
John Hoven <hovenj@gmail.com>
|
||||||
|
Philip Jägenstedt <philip@foolip.org>
|
||||||
|
Christian Kosmowski <ksmwsk@gmail.com>
|
||||||
|
Liang Peng <poppinlp@gmail.com>
|
||||||
|
TJ VanToll <tj.vantoll@gmail.com>
|
||||||
|
Senya Pugach <upisfree@outlook.com>
|
||||||
|
Aurelio De Rosa <aurelioderosa@gmail.com>
|
||||||
|
Nazar Mokrynskyi <nazar@mokrynskyi.com>
|
||||||
|
Amit Merchant <bullredeyes@gmail.com>
|
||||||
|
Jason Bedard <jason+github@jbedard.ca>
|
||||||
|
Arthur Verschaeve <contact@arthurverschaeve.be>
|
||||||
|
Dan Hart <danhart@notonthehighstreet.com>
|
||||||
|
Bin Xin <rhyzix@gmail.com>
|
||||||
|
David Corbacho <davidcorbacho@gmail.com>
|
||||||
|
Veaceslav Grimalschi <grimalschi@yandex.ru>
|
||||||
|
Daniel Husar <dano.husar@gmail.com>
|
||||||
|
Frederic Hemberger <mail@frederic-hemberger.de>
|
||||||
|
Ben Toews <mastahyeti@gmail.com>
|
||||||
|
Aditya Raghavan <araghavan3@gmail.com>
|
||||||
|
Victor Homyakov <vkhomyackov@gmail.com>
|
||||||
|
Shivaji Varma <contact@shivajivarma.com>
|
||||||
|
Nicolas HENRY <icewil@gmail.com>
|
||||||
|
Anne-Gaelle Colom <coloma@westminster.ac.uk>
|
||||||
|
George Mauer <gmauer@gmail.com>
|
||||||
|
Leonardo Braga <leonardo.braga@gmail.com>
|
||||||
|
Stephen Edgar <stephen@netweb.com.au>
|
||||||
|
Thomas Tortorini <thomastortorini@gmail.com>
|
||||||
|
Winston Howes <winstonhowes@gmail.com>
|
||||||
|
Jon Hester <jon.d.hester@gmail.com>
|
||||||
|
Alexander O'Mara <me@alexomara.com>
|
||||||
|
Bastian Buchholz <buchholz.bastian@googlemail.com>
|
||||||
|
Arthur Stolyar <nekr.fabula@gmail.com>
|
||||||
|
Calvin Metcalf <calvin.metcalf@gmail.com>
|
||||||
|
Mu Haibao <mhbseal@163.com>
|
||||||
|
Richard McDaniel <rm0026@uah.edu>
|
||||||
|
Chris Rebert <github@rebertia.com>
|
||||||
|
Gabriel Schulhof <gabriel.schulhof@intel.com>
|
||||||
|
Gilad Peleg <giladp007@gmail.com>
|
||||||
|
Martin Naumann <martin@geekonaut.de>
|
||||||
|
Marek Lewandowski <m.lewandowski@cksource.com>
|
||||||
|
Bruno Pérel <brunoperel@gmail.com>
|
||||||
|
Reed Loden <reed@reedloden.com>
|
||||||
|
Daniel Nill <daniellnill@gmail.com>
|
||||||
|
Yongwoo Jeon <yongwoo.jeon@navercorp.com>
|
||||||
|
Sean Henderson <seanh.za@gmail.com>
|
||||||
|
Richard Kraaijenhagen <stdin+git@riichard.com>
|
||||||
|
Connor Atherton <c.liam.atherton@gmail.com>
|
||||||
|
Gary Ye <garysye@gmail.com>
|
||||||
|
Christian Grete <webmaster@christiangrete.com>
|
||||||
|
Liza Ramo <liza.h.ramo@gmail.com>
|
||||||
|
Julian Alexander Murillo <julian.alexander.murillo@gmail.com>
|
||||||
|
Joelle Fleurantin <joasqueeniebee@gmail.com>
|
||||||
|
Jun Sun <klsforever@gmail.com>
|
132
dashboard-ui/bower_components/jquery/CONTRIBUTING.md
vendored
Normal file
132
dashboard-ui/bower_components/jquery/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
# Contributing to jQuery
|
||||||
|
|
||||||
|
1. [Getting Involved](#getting-involved)
|
||||||
|
2. [Questions and Discussion](#questions-and-discussion)
|
||||||
|
3. [How To Report Bugs](#how-to-report-bugs)
|
||||||
|
4. [Tips for Bug Patching](#tips-for-bug-patching)
|
||||||
|
|
||||||
|
Note: This is the code development repository for *jQuery Core* only. Before opening an issue or making a pull request, be sure you're in the right place.
|
||||||
|
* jQuery plugin issues should be reported to the author of the plugin.
|
||||||
|
* jQuery Core API documentation issues can be filed [at the API repo](http://github.com/jquery/api.jquery.com/issues).
|
||||||
|
* Bugs or suggestions for other jQuery Foundation projects should be filed in [their respective repos](http://github.com/jquery/).
|
||||||
|
|
||||||
|
## Getting Involved
|
||||||
|
|
||||||
|
We've put together [a short guide with tips, tricks, and ideas on getting started](http://contribute.jquery.org/open-source/). We're always looking for help identifying bugs, writing and reducing test cases, and documentation.
|
||||||
|
|
||||||
|
More information on how to contribute to this and other jQuery Foundation projects is at [contribute.jquery.org](http://contribute.jquery.org). Please review our [commit & pull request guide](http://contribute.jquery.org/commits-and-pull-requests/) and [style guides](http://contribute.jquery.org/style-guide/) for instructions on how to maintain a fork and submit patches. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](http://contribute.jquery.org/cla/).
|
||||||
|
|
||||||
|
|
||||||
|
## Questions and Discussion
|
||||||
|
|
||||||
|
### Forum and IRC
|
||||||
|
|
||||||
|
jQuery is so popular that many developers have knowledge of its capabilities and limitations. Most questions about using jQuery can be answered on popular forums such as [Stack Overflow](http://stackoverflow.com). Please start there when you have questions, even if you think you've found a bug.
|
||||||
|
|
||||||
|
The jQuery Core team watches the [jQuery Development Forum](http://forum.jquery.com/developing-jquery-core). If you have longer posts or questions that can't be answered in places such as Stack Overflow, please feel free to post them there. If you think you've found a bug, please [file it in the bug tracker](#how-to-report-bugs). The Core team can be found in the [#jquery-dev](http://webchat.freenode.net/?channels=jquery-dev) IRC channel on irc.freenode.net.
|
||||||
|
|
||||||
|
### Weekly Status Meetings
|
||||||
|
|
||||||
|
The jQuery Core team has a weekly meeting to discuss the progress of current work. The meeting is held in the [#jquery-meeting](http://webchat.freenode.net/?channels=jquery-meeting) IRC channel on irc.freenode.net at [Noon EST](http://www.timeanddate.com/worldclock/fixedtime.html?month=1&day=17&year=2011&hour=12&min=0&sec=0&p1=43) on Mondays.
|
||||||
|
|
||||||
|
[jQuery Core Meeting Notes](http://meetings.jquery.org/category/core/)
|
||||||
|
|
||||||
|
|
||||||
|
## How to Report Bugs
|
||||||
|
|
||||||
|
### Make sure it is a jQuery bug
|
||||||
|
|
||||||
|
Most bugs reported to our bug tracker are actually bugs in user code, not in jQuery code. Keep in mind that just because your code throws an error inside of jQuery, this does *not* mean the bug is a jQuery bug.
|
||||||
|
|
||||||
|
Ask for help first in the [Using jQuery Forum](http://forum.jquery.com/using-jquery) or another discussion forum like [Stack Overflow](http://stackoverflow.com/). You will get much quicker support, and you will help avoid tying up the jQuery team with invalid bug reports.
|
||||||
|
|
||||||
|
### Disable browser extensions
|
||||||
|
|
||||||
|
Make sure you have reproduced the bug with all browser extensions and add-ons disabled, as these can sometimes cause things to break in interesting and unpredictable ways. Try using incognito, stealth or anonymous browsing modes.
|
||||||
|
|
||||||
|
### Try the latest version of jQuery
|
||||||
|
|
||||||
|
Bugs in old versions of jQuery may have already been fixed. In order to avoid reporting known issues, make sure you are always testing against the [latest build](http://code.jquery.com/jquery.js). We cannot fix bugs in older released files, if a bug has been fixed in a subsequent version of jQuery the site should upgrade.
|
||||||
|
|
||||||
|
### Simplify the test case
|
||||||
|
|
||||||
|
When experiencing a problem, [reduce your code](http://webkit.org/quality/reduction.html) to the bare minimum required to reproduce the issue. This makes it *much* easier to isolate and fix the offending code. Bugs reported without reduced test cases take on average 9001% longer to fix than bugs that are submitted with them, so you really should try to do this if at all possible.
|
||||||
|
|
||||||
|
### Search for related or duplicate issues
|
||||||
|
|
||||||
|
Go to the [jQuery Core issue tracker](https://github.com/jquery/jquery/issues) and make sure the problem hasn't already been reported. If not, create a new issue there and include your test case.
|
||||||
|
|
||||||
|
|
||||||
|
## Tips For Bug Patching
|
||||||
|
|
||||||
|
We *love* when people contribute back to the project by patching the bugs they find. Since jQuery is used by so many people, we are cautious about the patches we accept and want to be sure they don't have a negative impact on the millions of people using jQuery each day. For that reason it can take a while for any suggested patch to work its way through the review and release process. The reward for you is knowing that the problem you fixed will improve things for millions of sites and billions of visits per day.
|
||||||
|
|
||||||
|
### Build a Local Copy of jQuery
|
||||||
|
|
||||||
|
Create a fork of the jQuery repo on github at http://github.com/jquery/jquery
|
||||||
|
|
||||||
|
Change directory to your web root directory, whatever that might be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cd /path/to/your/www/root/
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone your jQuery fork to work locally
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git clone git@github.com:username/jquery.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Change directory to the newly created dir jquery/
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cd jquery
|
||||||
|
```
|
||||||
|
|
||||||
|
Add the jQuery master as a remote. I label mine "upstream"
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git remote add upstream git://github.com/jquery/jquery.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Get in the habit of pulling in the "upstream" master to stay up to date as jQuery receives new commits
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git pull upstream master
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the build script
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the Grunt tools:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ grunt && grunt watch
|
||||||
|
```
|
||||||
|
|
||||||
|
Now open the jQuery test suite in a browser at http://localhost/test. If there is a port, be sure to include it.
|
||||||
|
|
||||||
|
Success! You just built and tested jQuery!
|
||||||
|
|
||||||
|
|
||||||
|
### Test Suite Tips...
|
||||||
|
|
||||||
|
During the process of writing your patch, you will run the test suite MANY times. You can speed up the process by narrowing the running test suite down to the module you are testing by either double clicking the title of the test or appending it to the url. The following examples assume you're working on a local repo, hosted on your localhost server.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
http://localhost/test/?filter=css
|
||||||
|
|
||||||
|
This will only run the "css" module tests. This will significantly speed up your development and debugging.
|
||||||
|
|
||||||
|
**ALWAYS RUN THE FULL SUITE BEFORE COMMITTING AND PUSHING A PATCH!**
|
||||||
|
|
||||||
|
|
||||||
|
### Browser support
|
||||||
|
|
||||||
|
Remember that jQuery supports multiple browsers and their versions; any contributed code must work in all of them. You can refer to the [browser support page](http://jquery.com/browser-support/) for the current list of supported browsers.
|
||||||
|
|
||||||
|
Note that browser support differs depending on whether you are targeting the `master` or `compat` branch.
|
212
dashboard-ui/bower_components/jquery/Gruntfile.js
vendored
Normal file
212
dashboard-ui/bower_components/jquery/Gruntfile.js
vendored
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
module.exports = function( grunt ) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
function readOptionalJSON( filepath ) {
|
||||||
|
var data = {};
|
||||||
|
try {
|
||||||
|
data = JSON.parse( stripJSONComments(
|
||||||
|
fs.readFileSync( filepath, { encoding: "utf8" } )
|
||||||
|
) );
|
||||||
|
} catch ( e ) {}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
var fs = require( "fs" ),
|
||||||
|
stripJSONComments = require( "strip-json-comments" ),
|
||||||
|
gzip = require( "gzip-js" ),
|
||||||
|
srcHintOptions = readOptionalJSON( "src/.jshintrc" ),
|
||||||
|
newNode = !/^v0/.test( process.version ),
|
||||||
|
|
||||||
|
// Allow to skip jsdom-related tests in Node.js < 1.0.0
|
||||||
|
runJsdomTests = newNode || ( function() {
|
||||||
|
try {
|
||||||
|
require( "jsdom" );
|
||||||
|
return true;
|
||||||
|
} catch ( e ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} )();
|
||||||
|
|
||||||
|
// The concatenated file won't pass onevar
|
||||||
|
// But our modules can
|
||||||
|
delete srcHintOptions.onevar;
|
||||||
|
|
||||||
|
grunt.initConfig( {
|
||||||
|
pkg: grunt.file.readJSON( "package.json" ),
|
||||||
|
dst: readOptionalJSON( "dist/.destination.json" ),
|
||||||
|
"compare_size": {
|
||||||
|
files: [ "dist/jquery.js", "dist/jquery.min.js" ],
|
||||||
|
options: {
|
||||||
|
compress: {
|
||||||
|
gz: function( contents ) {
|
||||||
|
return gzip.zip( contents, {} ).length;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cache: "build/.sizecache.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
babel: {
|
||||||
|
options: {
|
||||||
|
sourceMap: "inline",
|
||||||
|
retainLines: true
|
||||||
|
},
|
||||||
|
nodeSmokeTests: {
|
||||||
|
files: {
|
||||||
|
"test/node_smoke_tests/lib/ensure_iterability.js":
|
||||||
|
"test/node_smoke_tests/lib/ensure_iterability_es6.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
all: {
|
||||||
|
dest: "dist/jquery.js",
|
||||||
|
minimum: [
|
||||||
|
"core",
|
||||||
|
"selector"
|
||||||
|
],
|
||||||
|
|
||||||
|
// Exclude specified modules if the module matching the key is removed
|
||||||
|
removeWith: {
|
||||||
|
ajax: [ "manipulation/_evalUrl", "event/ajax" ],
|
||||||
|
callbacks: [ "deferred" ],
|
||||||
|
css: [ "effects", "dimensions", "offset" ],
|
||||||
|
sizzle: [ "css/hiddenVisibleSelectors", "effects/animatedSelector" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
npmcopy: {
|
||||||
|
all: {
|
||||||
|
options: {
|
||||||
|
destPrefix: "external"
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
"sizzle/dist": "sizzle/dist",
|
||||||
|
"sizzle/LICENSE.txt": "sizzle/LICENSE.txt",
|
||||||
|
|
||||||
|
"npo/npo.js": "native-promise-only/npo.js",
|
||||||
|
|
||||||
|
"qunit/qunit.js": "qunitjs/qunit/qunit.js",
|
||||||
|
"qunit/qunit.css": "qunitjs/qunit/qunit.css",
|
||||||
|
"qunit/LICENSE.txt": "qunitjs/LICENSE.txt",
|
||||||
|
|
||||||
|
"qunit-assert-step/qunit-assert-step.js":
|
||||||
|
"qunit-assert-step/qunit-assert-step.js",
|
||||||
|
"qunit-assert-step/MIT-LICENSE.txt":
|
||||||
|
"qunit-assert-step/MIT-LICENSE.txt",
|
||||||
|
|
||||||
|
"requirejs/require.js": "requirejs/require.js",
|
||||||
|
|
||||||
|
"sinon/fake_timers.js": "sinon/lib/sinon/util/fake_timers.js",
|
||||||
|
"sinon/LICENSE.txt": "sinon/LICENSE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
jsonlint: {
|
||||||
|
pkg: {
|
||||||
|
src: [ "package.json" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
jshint: {
|
||||||
|
all: {
|
||||||
|
src: [
|
||||||
|
"src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js"
|
||||||
|
],
|
||||||
|
options: {
|
||||||
|
jshintrc: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dist: {
|
||||||
|
src: "dist/jquery.js",
|
||||||
|
options: srcHintOptions
|
||||||
|
}
|
||||||
|
},
|
||||||
|
jscs: {
|
||||||
|
src: "src",
|
||||||
|
gruntfile: "Gruntfile.js",
|
||||||
|
|
||||||
|
// Check parts of tests that pass
|
||||||
|
test: [
|
||||||
|
"test/data/testrunner.js",
|
||||||
|
"test/unit/basic.js",
|
||||||
|
"test/unit/wrap.js"
|
||||||
|
],
|
||||||
|
build: "build"
|
||||||
|
},
|
||||||
|
testswarm: {
|
||||||
|
tests: [
|
||||||
|
|
||||||
|
// A special module with basic tests, meant for
|
||||||
|
// not fully supported environments like Android 2.3,
|
||||||
|
// jsdom or PhantomJS. We run it everywhere, though,
|
||||||
|
// to make sure tests are not broken.
|
||||||
|
"basic",
|
||||||
|
|
||||||
|
"ajax",
|
||||||
|
"attributes",
|
||||||
|
"callbacks",
|
||||||
|
"core",
|
||||||
|
"css",
|
||||||
|
"data",
|
||||||
|
"deferred",
|
||||||
|
"deprecated",
|
||||||
|
"dimensions",
|
||||||
|
"effects",
|
||||||
|
"event",
|
||||||
|
"manipulation",
|
||||||
|
"offset",
|
||||||
|
"queue",
|
||||||
|
"selector",
|
||||||
|
"serialize",
|
||||||
|
"support",
|
||||||
|
"traversing"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
files: [ "<%= jshint.all.src %>" ],
|
||||||
|
tasks: [ "dev" ]
|
||||||
|
},
|
||||||
|
uglify: {
|
||||||
|
all: {
|
||||||
|
files: {
|
||||||
|
"dist/jquery.min.js": [ "dist/jquery.js" ]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
preserveComments: false,
|
||||||
|
sourceMap: true,
|
||||||
|
sourceMapName: "dist/jquery.min.map",
|
||||||
|
report: "min",
|
||||||
|
beautify: {
|
||||||
|
"ascii_only": true
|
||||||
|
},
|
||||||
|
banner: "/*! jQuery v<%= pkg.version %> | " +
|
||||||
|
"(c) jQuery Foundation | jquery.org/license */",
|
||||||
|
compress: {
|
||||||
|
"hoist_funs": false,
|
||||||
|
loops: false,
|
||||||
|
unused: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Load grunt tasks from NPM packages
|
||||||
|
require( "load-grunt-tasks" )( grunt );
|
||||||
|
|
||||||
|
// Integrate jQuery specific tasks
|
||||||
|
grunt.loadTasks( "build/tasks" );
|
||||||
|
|
||||||
|
grunt.registerTask( "lint", [ "jsonlint", "jshint", "jscs" ] );
|
||||||
|
|
||||||
|
// Don't run Node-related tests in Node.js < 1.0.0 as they require an old
|
||||||
|
// jsdom version that needs compiling, making it harder for people to compile
|
||||||
|
// jQuery on Windows. (see gh-2519)
|
||||||
|
grunt.registerTask( "test_fast", runJsdomTests ? [ "node_smoke_tests" ] : [] );
|
||||||
|
|
||||||
|
grunt.registerTask( "test", [ "test_fast" ] );
|
||||||
|
|
||||||
|
// Short list as a high frequency watch task
|
||||||
|
grunt.registerTask( "dev", [ "build:*:*", "lint", "uglify", "remove_map_comment", "dist:*" ] );
|
||||||
|
|
||||||
|
grunt.registerTask( "default", [ "dev", "test_fast", "compare_size" ] );
|
||||||
|
};
|
36
dashboard-ui/bower_components/jquery/LICENSE.txt
vendored
Normal file
36
dashboard-ui/bower_components/jquery/LICENSE.txt
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||||
|
|
||||||
|
This software consists of voluntary contributions made by many
|
||||||
|
individuals. For exact contribution history, see the revision history
|
||||||
|
available at https://github.com/jquery/jquery
|
||||||
|
|
||||||
|
The following license applies to all parts of this software except as
|
||||||
|
documented below:
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
All files located in the node_modules and external directories are
|
||||||
|
externally maintained libraries used by this software which have their
|
||||||
|
own licenses; we recommend you read them, as their terms may differ from
|
||||||
|
the terms above.
|
28
dashboard-ui/bower_components/jquery/bower.json
vendored
28
dashboard-ui/bower_components/jquery/bower.json
vendored
@ -1,28 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "jquery",
|
|
||||||
"version": "2.1.4",
|
|
||||||
"main": "dist/jquery.js",
|
|
||||||
"license": "MIT",
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"build",
|
|
||||||
"dist/cdn",
|
|
||||||
"speed",
|
|
||||||
"test",
|
|
||||||
"*.md",
|
|
||||||
"AUTHORS.txt",
|
|
||||||
"Gruntfile.js",
|
|
||||||
"package.json"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"sizzle": "2.1.1-jquery.2.1.2",
|
|
||||||
"requirejs": "2.1.10",
|
|
||||||
"qunit": "1.14.0",
|
|
||||||
"sinon": "1.8.1"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"jquery",
|
|
||||||
"javascript",
|
|
||||||
"library"
|
|
||||||
]
|
|
||||||
}
|
|
3683
dashboard-ui/bower_components/jquery/dist/jquery.js
vendored
3683
dashboard-ui/bower_components/jquery/dist/jquery.js
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5
dashboard-ui/bower_components/jquery/external/npo/npo.js
vendored
Normal file
5
dashboard-ui/bower_components/jquery/external/npo/npo.js
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/*! Native Promise Only
|
||||||
|
v0.7.8-a (c) Kyle Simpson
|
||||||
|
MIT License: http://getify.mit-license.org
|
||||||
|
*/
|
||||||
|
!function(t,n,e){n[t]=n[t]||e(),"undefined"!=typeof module&&module.exports?module.exports=n[t]:"function"==typeof define&&define.amd&&define(function(){return n[t]})}("Promise","undefined"!=typeof global?global:this,function(){"use strict";function t(t,n){l.add(t,n),h||(h=y(l.drain))}function n(t){var n,e=typeof t;return null==t||"object"!=e&&"function"!=e||(n=t.then),"function"==typeof n?n:!1}function e(){for(var t=0;t<this.chain.length;t++)o(this,1===this.state?this.chain[t].success:this.chain[t].failure,this.chain[t]);this.chain.length=0}function o(t,e,o){var r,i;try{e===!1?o.reject(t.msg):(r=e===!0?t.msg:e.call(void 0,t.msg),r===o.promise?o.reject(TypeError("Promise-chain cycle")):(i=n(r))?i.call(r,o.resolve,o.reject):o.resolve(r))}catch(c){o.reject(c)}}function r(o){var c,u,a=this;if(!a.triggered){a.triggered=!0,a.def&&(a=a.def);try{(c=n(o))?(u=new f(a),c.call(o,function(){r.apply(u,arguments)},function(){i.apply(u,arguments)})):(a.msg=o,a.state=1,a.chain.length>0&&t(e,a))}catch(s){i.call(u||new f(a),s)}}}function i(n){var o=this;o.triggered||(o.triggered=!0,o.def&&(o=o.def),o.msg=n,o.state=2,o.chain.length>0&&t(e,o))}function c(t,n,e,o){for(var r=0;r<n.length;r++)!function(r){t.resolve(n[r]).then(function(t){e(r,t)},o)}(r)}function f(t){this.def=t,this.triggered=!1}function u(t){this.promise=t,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function a(n){if("function"!=typeof n)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var o=new u(this);this.then=function(n,r){var i={success:"function"==typeof n?n:!0,failure:"function"==typeof r?r:!1};return i.promise=new this.constructor(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");i.resolve=t,i.reject=n}),o.chain.push(i),0!==o.state&&t(e,o),i.promise},this["catch"]=function(t){return this.then(void 0,t)};try{n.call(void 0,function(t){r.call(o,t)},function(t){i.call(o,t)})}catch(c){i.call(o,c)}}var s,h,l,p=Object.prototype.toString,y="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),s=function(t,n,e,o){return Object.defineProperty(t,n,{value:e,writable:!0,configurable:o!==!1})}}catch(d){s=function(t,n,e){return t[n]=e,t}}l=function(){function t(t,n){this.fn=t,this.self=n,this.next=void 0}var n,e,o;return{add:function(r,i){o=new t(r,i),e?e.next=o:n=o,e=o,o=void 0},drain:function(){var t=n;for(n=e=h=void 0;t;)t.fn.call(t.self),t=t.next}}}();var g=s({},"constructor",a,!1);return a.prototype=g,s(g,"__NPO__",0,!1),s(a,"resolve",function(t){var n=this;return t&&"object"==typeof t&&1===t.__NPO__?t:new n(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");n(t)})}),s(a,"reject",function(t){return new this(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");e(t)})}),s(a,"all",function(t){var n=this;return"[object Array]"!=p.call(t)?n.reject(TypeError("Not an array")):0===t.length?n.resolve([]):new n(function(e,o){if("function"!=typeof e||"function"!=typeof o)throw TypeError("Not a function");var r=t.length,i=Array(r),f=0;c(n,t,function(t,n){i[t]=n,++f===r&&e(i)},o)})}),s(a,"race",function(t){var n=this;return"[object Array]"!=p.call(t)?n.reject(TypeError("Not an array")):new n(function(e,o){if("function"!=typeof e||"function"!=typeof o)throw TypeError("Not a function");c(n,t,function(t,n){e(n)},o)})}),a});
|
@ -1,4 +1,4 @@
|
|||||||
Copyright 2014 jQuery Foundation and other contributors
|
Copyright jQuery Foundation and other contributors
|
||||||
http://jquery.com/
|
http://jquery.com/
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
26
dashboard-ui/bower_components/jquery/external/qunit-assert-step/qunit-assert-step.js
vendored
Normal file
26
dashboard-ui/bower_components/jquery/external/qunit-assert-step/qunit-assert-step.js
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
QUnit.extend( QUnit.assert, {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check the sequence/order
|
||||||
|
*
|
||||||
|
* @example test('Example unit test', function(assert) { assert.step(1); setTimeout(function () { assert.step(3); start(); }, 100); assert.step(2); stop(); });
|
||||||
|
* @param Number expected The excepted step within the test()
|
||||||
|
* @param String message (optional)
|
||||||
|
*/
|
||||||
|
step: function (expected, message) {
|
||||||
|
// increment internal step counter.
|
||||||
|
QUnit.config.current.step++;
|
||||||
|
if (typeof message === "undefined") {
|
||||||
|
message = "step " + expected;
|
||||||
|
}
|
||||||
|
var actual = QUnit.config.current.step;
|
||||||
|
QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the step counter for every test()
|
||||||
|
*/
|
||||||
|
QUnit.testStart(function () {
|
||||||
|
QUnit.config.current.step = 0;
|
||||||
|
});
|
36
dashboard-ui/bower_components/jquery/external/qunit/LICENSE.txt
vendored
Normal file
36
dashboard-ui/bower_components/jquery/external/qunit/LICENSE.txt
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||||
|
|
||||||
|
This software consists of voluntary contributions made by many
|
||||||
|
individuals. For exact contribution history, see the revision history
|
||||||
|
available at https://github.com/jquery/qunit
|
||||||
|
|
||||||
|
The following license applies to all parts of this software except as
|
||||||
|
documented below:
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
All files located in the node_modules and external directories are
|
||||||
|
externally maintained libraries used by this software which have their
|
||||||
|
own licenses; we recommend you read them, as their terms may differ from
|
||||||
|
the terms above.
|
21
dashboard-ui/bower_components/jquery/external/qunit/MIT-LICENSE.txt
vendored
Normal file
21
dashboard-ui/bower_components/jquery/external/qunit/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Copyright 2013 jQuery Foundation and other contributors
|
||||||
|
http://jquery.com/
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
280
dashboard-ui/bower_components/jquery/external/qunit/qunit.css
vendored
Normal file
280
dashboard-ui/bower_components/jquery/external/qunit/qunit.css
vendored
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
/*!
|
||||||
|
* QUnit 1.17.1
|
||||||
|
* http://qunitjs.com/
|
||||||
|
*
|
||||||
|
* Copyright jQuery Foundation and other contributors
|
||||||
|
* Released under the MIT license
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* Date: 2015-01-20T19:39Z
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Font Family and Sizes */
|
||||||
|
|
||||||
|
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||||
|
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||||
|
#qunit-tests { font-size: smaller; }
|
||||||
|
|
||||||
|
|
||||||
|
/** Resets */
|
||||||
|
|
||||||
|
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Header */
|
||||||
|
|
||||||
|
#qunit-header {
|
||||||
|
padding: 0.5em 0 0.5em 1em;
|
||||||
|
|
||||||
|
color: #8699A4;
|
||||||
|
background-color: #0D3349;
|
||||||
|
|
||||||
|
font-size: 1.5em;
|
||||||
|
line-height: 1em;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
border-radius: 5px 5px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-header a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #C2CCD1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-header a:hover,
|
||||||
|
#qunit-header a:focus {
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-testrunner-toolbar label {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 0.5em 0 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-banner {
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-testrunner-toolbar {
|
||||||
|
padding: 0.5em 1em 0.5em 1em;
|
||||||
|
color: #5E740B;
|
||||||
|
background-color: #EEE;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-userAgent {
|
||||||
|
padding: 0.5em 1em 0.5em 1em;
|
||||||
|
background-color: #2B81AF;
|
||||||
|
color: #FFF;
|
||||||
|
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-modulefilter-container {
|
||||||
|
float: right;
|
||||||
|
padding: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qunit-url-config {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qunit-filter {
|
||||||
|
display: block;
|
||||||
|
float: right;
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Tests: Pass/Fail */
|
||||||
|
|
||||||
|
#qunit-tests {
|
||||||
|
list-style-position: inside;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests li {
|
||||||
|
padding: 0.4em 1em 0.4em 1em;
|
||||||
|
border-bottom: 1px solid #FFF;
|
||||||
|
list-style-position: inside;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests > li {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests li.running,
|
||||||
|
#qunit-tests li.pass,
|
||||||
|
#qunit-tests li.fail,
|
||||||
|
#qunit-tests li.skipped {
|
||||||
|
display: list-item;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests.hidepass li.running,
|
||||||
|
#qunit-tests.hidepass li.pass {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests li strong {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests li.skipped strong {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests li a {
|
||||||
|
padding: 0.5em;
|
||||||
|
color: #C2CCD1;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
#qunit-tests li a:hover,
|
||||||
|
#qunit-tests li a:focus {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests li .runtime {
|
||||||
|
float: right;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qunit-assert-list {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
padding: 0.5em;
|
||||||
|
|
||||||
|
background-color: #FFF;
|
||||||
|
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qunit-collapsed {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-top: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests th {
|
||||||
|
text-align: right;
|
||||||
|
vertical-align: top;
|
||||||
|
padding: 0 0.5em 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests pre {
|
||||||
|
margin: 0;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests del {
|
||||||
|
background-color: #E0F2BE;
|
||||||
|
color: #374E0C;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests ins {
|
||||||
|
background-color: #FFCACA;
|
||||||
|
color: #500;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** Test Counts */
|
||||||
|
|
||||||
|
#qunit-tests b.counts { color: #000; }
|
||||||
|
#qunit-tests b.passed { color: #5E740B; }
|
||||||
|
#qunit-tests b.failed { color: #710909; }
|
||||||
|
|
||||||
|
#qunit-tests li li {
|
||||||
|
padding: 5px;
|
||||||
|
background-color: #FFF;
|
||||||
|
border-bottom: none;
|
||||||
|
list-style-position: inside;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** Passing Styles */
|
||||||
|
|
||||||
|
#qunit-tests li li.pass {
|
||||||
|
color: #3C510C;
|
||||||
|
background-color: #FFF;
|
||||||
|
border-left: 10px solid #C6E746;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||||
|
#qunit-tests .pass .test-name { color: #366097; }
|
||||||
|
|
||||||
|
#qunit-tests .pass .test-actual,
|
||||||
|
#qunit-tests .pass .test-expected { color: #999; }
|
||||||
|
|
||||||
|
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||||
|
|
||||||
|
/*** Failing Styles */
|
||||||
|
|
||||||
|
#qunit-tests li li.fail {
|
||||||
|
color: #710909;
|
||||||
|
background-color: #FFF;
|
||||||
|
border-left: 10px solid #EE5757;
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests > li:last-child {
|
||||||
|
border-radius: 0 0 5px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
||||||
|
#qunit-tests .fail .test-name,
|
||||||
|
#qunit-tests .fail .module-name { color: #000; }
|
||||||
|
|
||||||
|
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||||
|
#qunit-tests .fail .test-expected { color: #008000; }
|
||||||
|
|
||||||
|
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||||
|
|
||||||
|
/*** Skipped tests */
|
||||||
|
|
||||||
|
#qunit-tests .skipped {
|
||||||
|
background-color: #EBECE9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#qunit-tests .qunit-skipped-label {
|
||||||
|
background-color: #F4FF77;
|
||||||
|
display: inline-block;
|
||||||
|
font-style: normal;
|
||||||
|
color: #366097;
|
||||||
|
line-height: 1.8em;
|
||||||
|
padding: 0 0.5em;
|
||||||
|
margin: -0.4em 0.4em -0.4em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Result */
|
||||||
|
|
||||||
|
#qunit-testresult {
|
||||||
|
padding: 0.5em 1em 0.5em 1em;
|
||||||
|
|
||||||
|
color: #2B81AF;
|
||||||
|
background-color: #D2E0E6;
|
||||||
|
|
||||||
|
border-bottom: 1px solid #FFF;
|
||||||
|
}
|
||||||
|
#qunit-testresult .module-name {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Fixture */
|
||||||
|
|
||||||
|
#qunit-fixture {
|
||||||
|
position: absolute;
|
||||||
|
top: -10000px;
|
||||||
|
left: -10000px;
|
||||||
|
width: 1000px;
|
||||||
|
height: 1000px;
|
||||||
|
}
|
2875
dashboard-ui/bower_components/jquery/external/qunit/qunit.js
vendored
Normal file
2875
dashboard-ui/bower_components/jquery/external/qunit/qunit.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2076
dashboard-ui/bower_components/jquery/external/requirejs/require.js
vendored
Normal file
2076
dashboard-ui/bower_components/jquery/external/requirejs/require.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5931
dashboard-ui/bower_components/jquery/external/sinon/sinon-1.14.1.js
vendored
Normal file
5931
dashboard-ui/bower_components/jquery/external/sinon/sinon-1.14.1.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
36
dashboard-ui/bower_components/jquery/external/sizzle/LICENSE.txt
vendored
Normal file
36
dashboard-ui/bower_components/jquery/external/sizzle/LICENSE.txt
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||||
|
|
||||||
|
This software consists of voluntary contributions made by many
|
||||||
|
individuals. For exact contribution history, see the revision history
|
||||||
|
available at https://github.com/jquery/sizzle
|
||||||
|
|
||||||
|
The following license applies to all parts of this software except as
|
||||||
|
documented below:
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
====
|
||||||
|
|
||||||
|
All files located in the node_modules and external directories are
|
||||||
|
externally maintained libraries used by this software which have their
|
||||||
|
own licenses; we recommend you read them, as their terms may differ from
|
||||||
|
the terms above.
|
@ -1,12 +1,12 @@
|
|||||||
/*!
|
/*!
|
||||||
* Sizzle CSS Selector Engine v2.2.0-pre
|
* Sizzle CSS Selector Engine v2.2.1
|
||||||
* http://sizzlejs.com/
|
* http://sizzlejs.com/
|
||||||
*
|
*
|
||||||
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
|
* Copyright jQuery Foundation and other contributors
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* http://jquery.org/license
|
* http://jquery.org/license
|
||||||
*
|
*
|
||||||
* Date: 2014-12-16
|
* Date: 2015-10-17
|
||||||
*/
|
*/
|
||||||
(function( window ) {
|
(function( window ) {
|
||||||
|
|
||||||
@ -74,25 +74,21 @@ var i,
|
|||||||
|
|
||||||
// Regular expressions
|
// Regular expressions
|
||||||
|
|
||||||
// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
|
// http://www.w3.org/TR/css3-selectors/#whitespace
|
||||||
whitespace = "[\\x20\\t\\r\\n\\f]",
|
whitespace = "[\\x20\\t\\r\\n\\f]",
|
||||||
// http://www.w3.org/TR/css3-syntax/#characters
|
|
||||||
characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
|
|
||||||
|
|
||||||
// Loosely modeled on CSS identifier characters
|
// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
|
||||||
// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
|
identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
|
||||||
// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
|
|
||||||
identifier = characterEncoding.replace( "w", "w#" ),
|
|
||||||
|
|
||||||
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
|
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
|
||||||
attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
|
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
||||||
// Operator (capture 2)
|
// Operator (capture 2)
|
||||||
"*([*^$|!~]?=)" + whitespace +
|
"*([*^$|!~]?=)" + whitespace +
|
||||||
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
||||||
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
|
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
|
||||||
"*\\]",
|
"*\\]",
|
||||||
|
|
||||||
pseudos = ":(" + characterEncoding + ")(?:\\((" +
|
pseudos = ":(" + identifier + ")(?:\\((" +
|
||||||
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
|
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
|
||||||
// 1. quoted (capture 3; capture 4 or capture 5)
|
// 1. quoted (capture 3; capture 4 or capture 5)
|
||||||
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
||||||
@ -115,9 +111,9 @@ var i,
|
|||||||
ridentifier = new RegExp( "^" + identifier + "$" ),
|
ridentifier = new RegExp( "^" + identifier + "$" ),
|
||||||
|
|
||||||
matchExpr = {
|
matchExpr = {
|
||||||
"ID": new RegExp( "^#(" + characterEncoding + ")" ),
|
"ID": new RegExp( "^#(" + identifier + ")" ),
|
||||||
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
|
"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
|
||||||
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
|
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
|
||||||
"ATTR": new RegExp( "^" + attributes ),
|
"ATTR": new RegExp( "^" + attributes ),
|
||||||
"PSEUDO": new RegExp( "^" + pseudos ),
|
"PSEUDO": new RegExp( "^" + pseudos ),
|
||||||
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
|
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
|
||||||
@ -195,37 +191,45 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Sizzle( selector, context, results, seed ) {
|
function Sizzle( selector, context, results, seed ) {
|
||||||
var match, elem, m, nodeType,
|
var m, i, elem, nid, nidselect, match, groups, newSelector,
|
||||||
// QSA vars
|
newContext = context && context.ownerDocument,
|
||||||
i, groups, old, nid, newContext, newSelector;
|
|
||||||
|
|
||||||
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
// nodeType defaults to 9, since context defaults to document
|
||||||
setDocument( context );
|
nodeType = context ? context.nodeType : 9;
|
||||||
}
|
|
||||||
|
|
||||||
context = context || document;
|
|
||||||
results = results || [];
|
results = results || [];
|
||||||
nodeType = context.nodeType;
|
|
||||||
|
|
||||||
|
// Return early from calls with invalid selector or context
|
||||||
if ( typeof selector !== "string" || !selector ||
|
if ( typeof selector !== "string" || !selector ||
|
||||||
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !seed && documentIsHTML ) {
|
// Try to shortcut find operations (as opposed to filters) in HTML documents
|
||||||
|
if ( !seed ) {
|
||||||
|
|
||||||
// Try to shortcut find operations when possible (e.g., not under DocumentFragment)
|
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
||||||
|
setDocument( context );
|
||||||
|
}
|
||||||
|
context = context || document;
|
||||||
|
|
||||||
|
if ( documentIsHTML ) {
|
||||||
|
|
||||||
|
// If the selector is sufficiently simple, try using a "get*By*" DOM method
|
||||||
|
// (excepting DocumentFragment context, where the methods don't exist)
|
||||||
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
||||||
// Speed-up: Sizzle("#ID")
|
|
||||||
|
// ID selector
|
||||||
if ( (m = match[1]) ) {
|
if ( (m = match[1]) ) {
|
||||||
|
|
||||||
|
// Document context
|
||||||
if ( nodeType === 9 ) {
|
if ( nodeType === 9 ) {
|
||||||
elem = context.getElementById( m );
|
if ( (elem = context.getElementById( m )) ) {
|
||||||
// Check parentNode to catch when Blackberry 4.6 returns
|
|
||||||
// nodes that are no longer in the document (jQuery #6963)
|
// Support: IE, Opera, Webkit
|
||||||
if ( elem && elem.parentNode ) {
|
// TODO: identify versions
|
||||||
// Handle the case where IE, Opera, and Webkit return items
|
// getElementById can match elements by name instead of ID
|
||||||
// by name instead of ID
|
|
||||||
if ( elem.id === m ) {
|
if ( elem.id === m ) {
|
||||||
results.push( elem );
|
results.push( elem );
|
||||||
return results;
|
return results;
|
||||||
@ -233,53 +237,70 @@ function Sizzle( selector, context, results, seed ) {
|
|||||||
} else {
|
} else {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Element context
|
||||||
} else {
|
} else {
|
||||||
// Context is not a document
|
|
||||||
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
|
// Support: IE, Opera, Webkit
|
||||||
contains( context, elem ) && elem.id === m ) {
|
// TODO: identify versions
|
||||||
|
// getElementById can match elements by name instead of ID
|
||||||
|
if ( newContext && (elem = newContext.getElementById( m )) &&
|
||||||
|
contains( context, elem ) &&
|
||||||
|
elem.id === m ) {
|
||||||
|
|
||||||
results.push( elem );
|
results.push( elem );
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Speed-up: Sizzle("TAG")
|
// Type selector
|
||||||
} else if ( match[2] ) {
|
} else if ( match[2] ) {
|
||||||
push.apply( results, context.getElementsByTagName( selector ) );
|
push.apply( results, context.getElementsByTagName( selector ) );
|
||||||
return results;
|
return results;
|
||||||
|
|
||||||
// Speed-up: Sizzle(".CLASS")
|
// Class selector
|
||||||
} else if ( (m = match[3]) && support.getElementsByClassName ) {
|
} else if ( (m = match[3]) && support.getElementsByClassName &&
|
||||||
|
context.getElementsByClassName ) {
|
||||||
|
|
||||||
push.apply( results, context.getElementsByClassName( m ) );
|
push.apply( results, context.getElementsByClassName( m ) );
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QSA path
|
// Take advantage of querySelectorAll
|
||||||
if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
if ( support.qsa &&
|
||||||
nid = old = expando;
|
!compilerCache[ selector + " " ] &&
|
||||||
|
(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
||||||
|
|
||||||
|
if ( nodeType !== 1 ) {
|
||||||
newContext = context;
|
newContext = context;
|
||||||
newSelector = nodeType !== 1 && selector;
|
newSelector = selector;
|
||||||
|
|
||||||
// qSA works strangely on Element-rooted queries
|
// qSA looks outside Element context, which is not what we want
|
||||||
// We can work around this by specifying an extra ID on the root
|
// Thanks to Andrew Dupont for this workaround technique
|
||||||
// and working up from there (Thanks to Andrew Dupont for the technique)
|
// Support: IE <=8
|
||||||
// IE 8 doesn't work on object elements
|
// Exclude object elements
|
||||||
if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
|
} else if ( context.nodeName.toLowerCase() !== "object" ) {
|
||||||
groups = tokenize( selector );
|
|
||||||
|
|
||||||
if ( (old = context.getAttribute("id")) ) {
|
// Capture the context ID, setting it first if necessary
|
||||||
nid = old.replace( rescape, "\\$&" );
|
if ( (nid = context.getAttribute( "id" )) ) {
|
||||||
|
nid = nid.replace( rescape, "\\$&" );
|
||||||
} else {
|
} else {
|
||||||
context.setAttribute( "id", nid );
|
context.setAttribute( "id", (nid = expando) );
|
||||||
}
|
}
|
||||||
nid = "[id='" + nid + "'] ";
|
|
||||||
|
|
||||||
|
// Prefix every selector in the list
|
||||||
|
groups = tokenize( selector );
|
||||||
i = groups.length;
|
i = groups.length;
|
||||||
|
nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
groups[i] = nid + toSelector( groups[i] );
|
groups[i] = nidselect + " " + toSelector( groups[i] );
|
||||||
}
|
}
|
||||||
newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
|
|
||||||
newSelector = groups.join( "," );
|
newSelector = groups.join( "," );
|
||||||
|
|
||||||
|
// Expand context for sibling selectors
|
||||||
|
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
||||||
|
context;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( newSelector ) {
|
if ( newSelector ) {
|
||||||
@ -290,13 +311,14 @@ function Sizzle( selector, context, results, seed ) {
|
|||||||
return results;
|
return results;
|
||||||
} catch ( qsaError ) {
|
} catch ( qsaError ) {
|
||||||
} finally {
|
} finally {
|
||||||
if ( !old ) {
|
if ( nid === expando ) {
|
||||||
context.removeAttribute( "id" );
|
context.removeAttribute( "id" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// All others
|
// All others
|
||||||
return select( selector.replace( rtrim, "$1" ), context, results, seed );
|
return select( selector.replace( rtrim, "$1" ), context, results, seed );
|
||||||
@ -304,7 +326,7 @@ function Sizzle( selector, context, results, seed ) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create key-value caches of limited size
|
* Create key-value caches of limited size
|
||||||
* @returns {Function(string, Object)} Returns the Object data after storing it on itself with
|
* @returns {function(string, object)} Returns the Object data after storing it on itself with
|
||||||
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
|
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
|
||||||
* deleting the oldest entry
|
* deleting the oldest entry
|
||||||
*/
|
*/
|
||||||
@ -359,7 +381,7 @@ function assert( fn ) {
|
|||||||
*/
|
*/
|
||||||
function addHandle( attrs, handler ) {
|
function addHandle( attrs, handler ) {
|
||||||
var arr = attrs.split("|"),
|
var arr = attrs.split("|"),
|
||||||
i = attrs.length;
|
i = arr.length;
|
||||||
|
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
Expr.attrHandle[ arr[i] ] = handler;
|
Expr.attrHandle[ arr[i] ] = handler;
|
||||||
@ -472,33 +494,29 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
var hasCompare, parent,
|
var hasCompare, parent,
|
||||||
doc = node ? node.ownerDocument || node : preferredDoc;
|
doc = node ? node.ownerDocument || node : preferredDoc;
|
||||||
|
|
||||||
// If no document and documentElement is available, return
|
// Return early if doc is invalid or already selected
|
||||||
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
||||||
return document;
|
return document;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set our document
|
// Update global variables
|
||||||
document = doc;
|
document = doc;
|
||||||
docElem = doc.documentElement;
|
docElem = document.documentElement;
|
||||||
parent = doc.defaultView;
|
documentIsHTML = !isXML( document );
|
||||||
|
|
||||||
// Support: IE>8
|
// Support: IE 9-11, Edge
|
||||||
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
|
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
|
||||||
// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
|
if ( (parent = document.defaultView) && parent.top !== parent ) {
|
||||||
// IE6-8 do not support the defaultView property so parent will be undefined
|
// Support: IE 11
|
||||||
if ( parent && parent !== parent.top ) {
|
|
||||||
// IE11 does not have attachEvent, so all must suffer
|
|
||||||
if ( parent.addEventListener ) {
|
if ( parent.addEventListener ) {
|
||||||
parent.addEventListener( "unload", unloadHandler, false );
|
parent.addEventListener( "unload", unloadHandler, false );
|
||||||
|
|
||||||
|
// Support: IE 9 - 10 only
|
||||||
} else if ( parent.attachEvent ) {
|
} else if ( parent.attachEvent ) {
|
||||||
parent.attachEvent( "onunload", unloadHandler );
|
parent.attachEvent( "onunload", unloadHandler );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support tests
|
|
||||||
---------------------------------------------------------------------- */
|
|
||||||
documentIsHTML = !isXML( doc );
|
|
||||||
|
|
||||||
/* Attributes
|
/* Attributes
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -515,12 +533,12 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
|
|
||||||
// Check if getElementsByTagName("*") returns only elements
|
// Check if getElementsByTagName("*") returns only elements
|
||||||
support.getElementsByTagName = assert(function( div ) {
|
support.getElementsByTagName = assert(function( div ) {
|
||||||
div.appendChild( doc.createComment("") );
|
div.appendChild( document.createComment("") );
|
||||||
return !div.getElementsByTagName("*").length;
|
return !div.getElementsByTagName("*").length;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Support: IE<9
|
// Support: IE<9
|
||||||
support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
|
support.getElementsByClassName = rnative.test( document.getElementsByClassName );
|
||||||
|
|
||||||
// Support: IE<10
|
// Support: IE<10
|
||||||
// Check if getElementById returns elements by name
|
// Check if getElementById returns elements by name
|
||||||
@ -528,7 +546,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
// so use a roundabout getElementsByName test
|
// so use a roundabout getElementsByName test
|
||||||
support.getById = assert(function( div ) {
|
support.getById = assert(function( div ) {
|
||||||
docElem.appendChild( div ).id = expando;
|
docElem.appendChild( div ).id = expando;
|
||||||
return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
|
return !document.getElementsByName || !document.getElementsByName( expando ).length;
|
||||||
});
|
});
|
||||||
|
|
||||||
// ID find and filter
|
// ID find and filter
|
||||||
@ -536,9 +554,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
Expr.find["ID"] = function( id, context ) {
|
Expr.find["ID"] = function( id, context ) {
|
||||||
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
||||||
var m = context.getElementById( id );
|
var m = context.getElementById( id );
|
||||||
// Check parentNode to catch when Blackberry 4.6 returns
|
return m ? [ m ] : [];
|
||||||
// nodes that are no longer in the document #6963
|
|
||||||
return m && m.parentNode ? [ m ] : [];
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Expr.filter["ID"] = function( id ) {
|
Expr.filter["ID"] = function( id ) {
|
||||||
@ -555,7 +571,8 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
Expr.filter["ID"] = function( id ) {
|
Expr.filter["ID"] = function( id ) {
|
||||||
var attrId = id.replace( runescape, funescape );
|
var attrId = id.replace( runescape, funescape );
|
||||||
return function( elem ) {
|
return function( elem ) {
|
||||||
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
|
var node = typeof elem.getAttributeNode !== "undefined" &&
|
||||||
|
elem.getAttributeNode("id");
|
||||||
return node && node.value === attrId;
|
return node && node.value === attrId;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -595,7 +612,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
|
|
||||||
// Class
|
// Class
|
||||||
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
||||||
if ( documentIsHTML ) {
|
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
||||||
return context.getElementsByClassName( className );
|
return context.getElementsByClassName( className );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -615,7 +632,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
// See http://bugs.jquery.com/ticket/13378
|
// See http://bugs.jquery.com/ticket/13378
|
||||||
rbuggyQSA = [];
|
rbuggyQSA = [];
|
||||||
|
|
||||||
if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
|
if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
|
||||||
// Build QSA regex
|
// Build QSA regex
|
||||||
// Regex strategy adopted from Diego Perini
|
// Regex strategy adopted from Diego Perini
|
||||||
assert(function( div ) {
|
assert(function( div ) {
|
||||||
@ -625,7 +642,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
// since its presence should be enough
|
// since its presence should be enough
|
||||||
// http://bugs.jquery.com/ticket/12359
|
// http://bugs.jquery.com/ticket/12359
|
||||||
docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
|
docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
|
||||||
"<select id='" + expando + "-\f]' msallowcapture=''>" +
|
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
||||||
"<option selected=''></option></select>";
|
"<option selected=''></option></select>";
|
||||||
|
|
||||||
// Support: IE8, Opera 11-12.16
|
// Support: IE8, Opera 11-12.16
|
||||||
@ -642,7 +659,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
|
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
|
||||||
if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
||||||
rbuggyQSA.push("~=");
|
rbuggyQSA.push("~=");
|
||||||
}
|
}
|
||||||
@ -665,7 +682,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
assert(function( div ) {
|
assert(function( div ) {
|
||||||
// Support: Windows 8 Native Apps
|
// Support: Windows 8 Native Apps
|
||||||
// The type and name attributes are restricted during .innerHTML assignment
|
// The type and name attributes are restricted during .innerHTML assignment
|
||||||
var input = doc.createElement("input");
|
var input = document.createElement("input");
|
||||||
input.setAttribute( "type", "hidden" );
|
input.setAttribute( "type", "hidden" );
|
||||||
div.appendChild( input ).setAttribute( "name", "D" );
|
div.appendChild( input ).setAttribute( "name", "D" );
|
||||||
|
|
||||||
@ -713,7 +730,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
||||||
|
|
||||||
// Element contains another
|
// Element contains another
|
||||||
// Purposefully does not implement inclusive descendent
|
// Purposefully self-exclusive
|
||||||
// As in, an element does not contain itself
|
// As in, an element does not contain itself
|
||||||
contains = hasCompare || rnative.test( docElem.contains ) ?
|
contains = hasCompare || rnative.test( docElem.contains ) ?
|
||||||
function( a, b ) {
|
function( a, b ) {
|
||||||
@ -767,10 +784,10 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
|
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
|
||||||
|
|
||||||
// Choose the first element that is related to our preferred document
|
// Choose the first element that is related to our preferred document
|
||||||
if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
|
if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
|
if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -798,8 +815,8 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
|
|
||||||
// Parentless nodes are either documents or disconnected
|
// Parentless nodes are either documents or disconnected
|
||||||
if ( !aup || !bup ) {
|
if ( !aup || !bup ) {
|
||||||
return a === doc ? -1 :
|
return a === document ? -1 :
|
||||||
b === doc ? 1 :
|
b === document ? 1 :
|
||||||
aup ? -1 :
|
aup ? -1 :
|
||||||
bup ? 1 :
|
bup ? 1 :
|
||||||
sortInput ?
|
sortInput ?
|
||||||
@ -836,7 +853,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||||||
0;
|
0;
|
||||||
};
|
};
|
||||||
|
|
||||||
return doc;
|
return document;
|
||||||
};
|
};
|
||||||
|
|
||||||
Sizzle.matches = function( expr, elements ) {
|
Sizzle.matches = function( expr, elements ) {
|
||||||
@ -853,6 +870,7 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|||||||
expr = expr.replace( rattributeQuotes, "='$1']" );
|
expr = expr.replace( rattributeQuotes, "='$1']" );
|
||||||
|
|
||||||
if ( support.matchesSelector && documentIsHTML &&
|
if ( support.matchesSelector && documentIsHTML &&
|
||||||
|
!compilerCache[ expr + " " ] &&
|
||||||
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
|
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
|
||||||
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
||||||
|
|
||||||
@ -1126,11 +1144,12 @@ Expr = Sizzle.selectors = {
|
|||||||
} :
|
} :
|
||||||
|
|
||||||
function( elem, context, xml ) {
|
function( elem, context, xml ) {
|
||||||
var cache, outerCache, node, diff, nodeIndex, start,
|
var cache, uniqueCache, outerCache, node, nodeIndex, start,
|
||||||
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
||||||
parent = elem.parentNode,
|
parent = elem.parentNode,
|
||||||
name = ofType && elem.nodeName.toLowerCase(),
|
name = ofType && elem.nodeName.toLowerCase(),
|
||||||
useCache = !xml && !ofType;
|
useCache = !xml && !ofType,
|
||||||
|
diff = false;
|
||||||
|
|
||||||
if ( parent ) {
|
if ( parent ) {
|
||||||
|
|
||||||
@ -1139,7 +1158,10 @@ Expr = Sizzle.selectors = {
|
|||||||
while ( dir ) {
|
while ( dir ) {
|
||||||
node = elem;
|
node = elem;
|
||||||
while ( (node = node[ dir ]) ) {
|
while ( (node = node[ dir ]) ) {
|
||||||
if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
|
if ( ofType ?
|
||||||
|
node.nodeName.toLowerCase() === name :
|
||||||
|
node.nodeType === 1 ) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1153,11 +1175,21 @@ Expr = Sizzle.selectors = {
|
|||||||
|
|
||||||
// non-xml :nth-child(...) stores cache data on `parent`
|
// non-xml :nth-child(...) stores cache data on `parent`
|
||||||
if ( forward && useCache ) {
|
if ( forward && useCache ) {
|
||||||
|
|
||||||
// Seek `elem` from a previously-cached index
|
// Seek `elem` from a previously-cached index
|
||||||
outerCache = parent[ expando ] || (parent[ expando ] = {});
|
|
||||||
cache = outerCache[ type ] || [];
|
// ...in a gzip-friendly way
|
||||||
|
node = parent;
|
||||||
|
outerCache = node[ expando ] || (node[ expando ] = {});
|
||||||
|
|
||||||
|
// Support: IE <9 only
|
||||||
|
// Defend against cloned attroperties (jQuery gh-1709)
|
||||||
|
uniqueCache = outerCache[ node.uniqueID ] ||
|
||||||
|
(outerCache[ node.uniqueID ] = {});
|
||||||
|
|
||||||
|
cache = uniqueCache[ type ] || [];
|
||||||
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
||||||
diff = cache[0] === dirruns && cache[2];
|
diff = nodeIndex && cache[ 2 ];
|
||||||
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
||||||
|
|
||||||
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
||||||
@ -1167,25 +1199,50 @@ Expr = Sizzle.selectors = {
|
|||||||
|
|
||||||
// When found, cache indexes on `parent` and break
|
// When found, cache indexes on `parent` and break
|
||||||
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
||||||
outerCache[ type ] = [ dirruns, nodeIndex, diff ];
|
uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use previously-cached element index if available
|
|
||||||
} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
|
|
||||||
diff = cache[1];
|
|
||||||
|
|
||||||
// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
|
|
||||||
} else {
|
} else {
|
||||||
|
// Use previously-cached element index if available
|
||||||
|
if ( useCache ) {
|
||||||
|
// ...in a gzip-friendly way
|
||||||
|
node = elem;
|
||||||
|
outerCache = node[ expando ] || (node[ expando ] = {});
|
||||||
|
|
||||||
|
// Support: IE <9 only
|
||||||
|
// Defend against cloned attroperties (jQuery gh-1709)
|
||||||
|
uniqueCache = outerCache[ node.uniqueID ] ||
|
||||||
|
(outerCache[ node.uniqueID ] = {});
|
||||||
|
|
||||||
|
cache = uniqueCache[ type ] || [];
|
||||||
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
||||||
|
diff = nodeIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
// xml :nth-child(...)
|
||||||
|
// or :nth-last-child(...) or :nth(-last)?-of-type(...)
|
||||||
|
if ( diff === false ) {
|
||||||
// Use the same loop as above to seek `elem` from the start
|
// Use the same loop as above to seek `elem` from the start
|
||||||
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
||||||
(diff = nodeIndex = 0) || start.pop()) ) {
|
(diff = nodeIndex = 0) || start.pop()) ) {
|
||||||
|
|
||||||
if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
|
if ( ( ofType ?
|
||||||
|
node.nodeName.toLowerCase() === name :
|
||||||
|
node.nodeType === 1 ) &&
|
||||||
|
++diff ) {
|
||||||
|
|
||||||
// Cache the index of each encountered element
|
// Cache the index of each encountered element
|
||||||
if ( useCache ) {
|
if ( useCache ) {
|
||||||
(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
|
outerCache = node[ expando ] || (node[ expando ] = {});
|
||||||
|
|
||||||
|
// Support: IE <9 only
|
||||||
|
// Defend against cloned attroperties (jQuery gh-1709)
|
||||||
|
uniqueCache = outerCache[ node.uniqueID ] ||
|
||||||
|
(outerCache[ node.uniqueID ] = {});
|
||||||
|
|
||||||
|
uniqueCache[ type ] = [ dirruns, diff ];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( node === elem ) {
|
if ( node === elem ) {
|
||||||
@ -1194,6 +1251,7 @@ Expr = Sizzle.selectors = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Incorporate the offset, then check against cycle size
|
// Incorporate the offset, then check against cycle size
|
||||||
diff -= last;
|
diff -= last;
|
||||||
@ -1551,10 +1609,10 @@ function addCombinator( matcher, combinator, base ) {
|
|||||||
|
|
||||||
// Check against all ancestor/preceding elements
|
// Check against all ancestor/preceding elements
|
||||||
function( elem, context, xml ) {
|
function( elem, context, xml ) {
|
||||||
var oldCache, outerCache,
|
var oldCache, uniqueCache, outerCache,
|
||||||
newCache = [ dirruns, doneName ];
|
newCache = [ dirruns, doneName ];
|
||||||
|
|
||||||
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
|
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
|
||||||
if ( xml ) {
|
if ( xml ) {
|
||||||
while ( (elem = elem[ dir ]) ) {
|
while ( (elem = elem[ dir ]) ) {
|
||||||
if ( elem.nodeType === 1 || checkNonElements ) {
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
||||||
@ -1567,14 +1625,19 @@ function addCombinator( matcher, combinator, base ) {
|
|||||||
while ( (elem = elem[ dir ]) ) {
|
while ( (elem = elem[ dir ]) ) {
|
||||||
if ( elem.nodeType === 1 || checkNonElements ) {
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
||||||
outerCache = elem[ expando ] || (elem[ expando ] = {});
|
outerCache = elem[ expando ] || (elem[ expando ] = {});
|
||||||
if ( (oldCache = outerCache[ dir ]) &&
|
|
||||||
|
// Support: IE <9 only
|
||||||
|
// Defend against cloned attroperties (jQuery gh-1709)
|
||||||
|
uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
|
||||||
|
|
||||||
|
if ( (oldCache = uniqueCache[ dir ]) &&
|
||||||
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
||||||
|
|
||||||
// Assign to newCache so results back-propagate to previous elements
|
// Assign to newCache so results back-propagate to previous elements
|
||||||
return (newCache[ 2 ] = oldCache[ 2 ]);
|
return (newCache[ 2 ] = oldCache[ 2 ]);
|
||||||
} else {
|
} else {
|
||||||
// Reuse newcache so results back-propagate to previous elements
|
// Reuse newcache so results back-propagate to previous elements
|
||||||
outerCache[ dir ] = newCache;
|
uniqueCache[ dir ] = newCache;
|
||||||
|
|
||||||
// A match means we're done; a fail means we have to keep checking
|
// A match means we're done; a fail means we have to keep checking
|
||||||
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
|
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
|
||||||
@ -1799,18 +1862,21 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|||||||
len = elems.length;
|
len = elems.length;
|
||||||
|
|
||||||
if ( outermost ) {
|
if ( outermost ) {
|
||||||
outermostContext = context !== document && context;
|
outermostContext = context === document || context || outermost;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add elements passing elementMatchers directly to results
|
// Add elements passing elementMatchers directly to results
|
||||||
// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
|
|
||||||
// Support: IE<9, Safari
|
// Support: IE<9, Safari
|
||||||
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
|
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
|
||||||
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
|
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
|
||||||
if ( byElement && elem ) {
|
if ( byElement && elem ) {
|
||||||
j = 0;
|
j = 0;
|
||||||
|
if ( !context && elem.ownerDocument !== document ) {
|
||||||
|
setDocument( elem );
|
||||||
|
xml = !documentIsHTML;
|
||||||
|
}
|
||||||
while ( (matcher = elementMatchers[j++]) ) {
|
while ( (matcher = elementMatchers[j++]) ) {
|
||||||
if ( matcher( elem, context, xml ) ) {
|
if ( matcher( elem, context || document, xml) ) {
|
||||||
results.push( elem );
|
results.push( elem );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1834,8 +1900,17 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply set filters to unmatched elements
|
// `i` is now the count of elements visited above, and adding it to `matchedCount`
|
||||||
|
// makes the latter nonnegative.
|
||||||
matchedCount += i;
|
matchedCount += i;
|
||||||
|
|
||||||
|
// Apply set filters to unmatched elements
|
||||||
|
// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
|
||||||
|
// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
|
||||||
|
// no element matchers and no seed.
|
||||||
|
// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
|
||||||
|
// case, which will result in a "00" `matchedCount` that differs from `i` but is also
|
||||||
|
// numerically zero.
|
||||||
if ( bySet && i !== matchedCount ) {
|
if ( bySet && i !== matchedCount ) {
|
||||||
j = 0;
|
j = 0;
|
||||||
while ( (matcher = setMatchers[j++]) ) {
|
while ( (matcher = setMatchers[j++]) ) {
|
||||||
@ -1927,10 +2002,11 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|||||||
|
|
||||||
results = results || [];
|
results = results || [];
|
||||||
|
|
||||||
// Try to minimize operations if there is no seed and only one group
|
// Try to minimize operations if there is only one selector in the list and no seed
|
||||||
|
// (the latter of which guarantees us context)
|
||||||
if ( match.length === 1 ) {
|
if ( match.length === 1 ) {
|
||||||
|
|
||||||
// Take a shortcut and set the context if the root selector is an ID
|
// Reduce context if the leading compound selector is an ID
|
||||||
tokens = match[0] = match[0].slice( 0 );
|
tokens = match[0] = match[0].slice( 0 );
|
||||||
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
||||||
support.getById && context.nodeType === 9 && documentIsHTML &&
|
support.getById && context.nodeType === 9 && documentIsHTML &&
|
||||||
@ -1985,7 +2061,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|||||||
context,
|
context,
|
||||||
!documentIsHTML,
|
!documentIsHTML,
|
||||||
results,
|
results,
|
||||||
rsibling.test( selector ) && testContext( context.parentNode ) || context
|
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
||||||
);
|
);
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
3
dashboard-ui/bower_components/jquery/external/sizzle/dist/sizzle.min.js
vendored
Normal file
3
dashboard-ui/bower_components/jquery/external/sizzle/dist/sizzle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dashboard-ui/bower_components/jquery/external/sizzle/dist/sizzle.min.map
vendored
Normal file
1
dashboard-ui/bower_components/jquery/external/sizzle/dist/sizzle.min.map
vendored
Normal file
File diff suppressed because one or more lines are too long
84
dashboard-ui/bower_components/jquery/package.json
vendored
Normal file
84
dashboard-ui/bower_components/jquery/package.json
vendored
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
"name": "jquery",
|
||||||
|
"title": "jQuery",
|
||||||
|
"description": "JavaScript library for DOM operations",
|
||||||
|
"version": "2.2.0",
|
||||||
|
"main": "dist/jquery.js",
|
||||||
|
"homepage": "http://jquery.com",
|
||||||
|
"author": {
|
||||||
|
"name": "jQuery Foundation and other contributors",
|
||||||
|
"url": "https://github.com/jquery/jquery/blob/2.2.0/AUTHORS.txt"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/jquery/jquery.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"jquery",
|
||||||
|
"javascript",
|
||||||
|
"browser",
|
||||||
|
"library"
|
||||||
|
],
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/jquery/jquery/issues"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {},
|
||||||
|
"devDependencies": {
|
||||||
|
"commitplease": "2.0.0",
|
||||||
|
"core-js": "0.9.17",
|
||||||
|
"grunt": "0.4.5",
|
||||||
|
"grunt-babel": "5.0.1",
|
||||||
|
"grunt-cli": "0.1.13",
|
||||||
|
"grunt-compare-size": "0.4.0",
|
||||||
|
"grunt-contrib-jshint": "0.11.2",
|
||||||
|
"grunt-contrib-uglify": "0.9.2",
|
||||||
|
"grunt-contrib-watch": "0.6.1",
|
||||||
|
"grunt-git-authors": "2.0.1",
|
||||||
|
"grunt-jscs": "2.1.0",
|
||||||
|
"grunt-jsonlint": "1.0.4",
|
||||||
|
"grunt-npmcopy": "0.1.0",
|
||||||
|
"gzip-js": "0.3.2",
|
||||||
|
"jsdom": "5.6.1",
|
||||||
|
"load-grunt-tasks": "1.0.0",
|
||||||
|
"qunitjs": "1.17.1",
|
||||||
|
"qunit-assert-step": "1.0.3",
|
||||||
|
"requirejs": "2.1.17",
|
||||||
|
"sinon": "1.10.3",
|
||||||
|
"sizzle": "2.2.1",
|
||||||
|
"strip-json-comments": "1.0.3",
|
||||||
|
"testswarm": "1.1.0",
|
||||||
|
"win-spawn": "2.0.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "npm install && grunt",
|
||||||
|
"start": "grunt watch",
|
||||||
|
"test": "grunt && grunt test"
|
||||||
|
},
|
||||||
|
"commitplease": {
|
||||||
|
"components": [
|
||||||
|
"Docs",
|
||||||
|
"Tests",
|
||||||
|
"Build",
|
||||||
|
"Release",
|
||||||
|
"Core",
|
||||||
|
"Ajax",
|
||||||
|
"Attributes",
|
||||||
|
"Callbacks",
|
||||||
|
"CSS",
|
||||||
|
"Data",
|
||||||
|
"Deferred",
|
||||||
|
"Deprecated",
|
||||||
|
"Dimensions",
|
||||||
|
"Effects",
|
||||||
|
"Event",
|
||||||
|
"Manipulation",
|
||||||
|
"Offset",
|
||||||
|
"Queue",
|
||||||
|
"Selector",
|
||||||
|
"Serialize",
|
||||||
|
"Traversing",
|
||||||
|
"Wrap"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
29
dashboard-ui/bower_components/jquery/src/.jshintrc
vendored
Normal file
29
dashboard-ui/bower_components/jquery/src/.jshintrc
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"boss": true,
|
||||||
|
"curly": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"eqnull": true,
|
||||||
|
"expr": true,
|
||||||
|
"immed": true,
|
||||||
|
"noarg": true,
|
||||||
|
"quotmark": "double",
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
|
||||||
|
"sub": true,
|
||||||
|
|
||||||
|
// Support: IE < 10, Android < 4.1
|
||||||
|
// The above browsers are failing a lot of tests in the ES5
|
||||||
|
// test suite at http://test262.ecmascript.org.
|
||||||
|
"es3": true,
|
||||||
|
|
||||||
|
"globals": {
|
||||||
|
"window": true,
|
||||||
|
"JSON": false,
|
||||||
|
|
||||||
|
"jQuery": true,
|
||||||
|
"define": true,
|
||||||
|
"module": true,
|
||||||
|
"noGlobal": true
|
||||||
|
}
|
||||||
|
}
|
125
dashboard-ui/bower_components/jquery/src/ajax.js
vendored
125
dashboard-ui/bower_components/jquery/src/ajax.js
vendored
@ -1,23 +1,27 @@
|
|||||||
define( [
|
define( [
|
||||||
"./core",
|
"./core",
|
||||||
|
"./var/document",
|
||||||
"./var/rnotwhite",
|
"./var/rnotwhite",
|
||||||
|
"./ajax/var/location",
|
||||||
"./ajax/var/nonce",
|
"./ajax/var/nonce",
|
||||||
"./ajax/var/rquery",
|
"./ajax/var/rquery",
|
||||||
|
|
||||||
"./core/init",
|
"./core/init",
|
||||||
"./ajax/parseJSON",
|
"./ajax/parseJSON",
|
||||||
"./ajax/parseXML",
|
"./ajax/parseXML",
|
||||||
|
"./event/trigger",
|
||||||
"./deferred"
|
"./deferred"
|
||||||
], function( jQuery, rnotwhite, nonce, rquery ) {
|
], function( jQuery, document, rnotwhite, location, nonce, rquery ) {
|
||||||
|
|
||||||
var
|
var
|
||||||
rhash = /#.*$/,
|
rhash = /#.*$/,
|
||||||
rts = /([?&])_=[^&]*/,
|
rts = /([?&])_=[^&]*/,
|
||||||
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
||||||
|
|
||||||
// #7653, #8125, #8152: local protocol detection
|
// #7653, #8125, #8152: local protocol detection
|
||||||
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
||||||
rnoContent = /^(?:GET|HEAD)$/,
|
rnoContent = /^(?:GET|HEAD)$/,
|
||||||
rprotocol = /^\/\//,
|
rprotocol = /^\/\//,
|
||||||
rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
|
|
||||||
|
|
||||||
/* Prefilters
|
/* Prefilters
|
||||||
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
||||||
@ -40,11 +44,9 @@ var
|
|||||||
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
||||||
allTypes = "*/".concat( "*" ),
|
allTypes = "*/".concat( "*" ),
|
||||||
|
|
||||||
// Document location
|
// Anchor tag for parsing the document origin
|
||||||
ajaxLocation = window.location.href,
|
originAnchor = document.createElement( "a" );
|
||||||
|
originAnchor.href = location.href;
|
||||||
// Segment location into parts
|
|
||||||
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
|
|
||||||
|
|
||||||
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
||||||
function addToPrefiltersOrTransports( structure ) {
|
function addToPrefiltersOrTransports( structure ) {
|
||||||
@ -62,8 +64,10 @@ function addToPrefiltersOrTransports( structure ) {
|
|||||||
dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
|
dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
|
||||||
|
|
||||||
if ( jQuery.isFunction( func ) ) {
|
if ( jQuery.isFunction( func ) ) {
|
||||||
|
|
||||||
// For each dataType in the dataTypeExpression
|
// For each dataType in the dataTypeExpression
|
||||||
while ( ( dataType = dataTypes[ i++ ] ) ) {
|
while ( ( dataType = dataTypes[ i++ ] ) ) {
|
||||||
|
|
||||||
// Prepend if requested
|
// Prepend if requested
|
||||||
if ( dataType[ 0 ] === "+" ) {
|
if ( dataType[ 0 ] === "+" ) {
|
||||||
dataType = dataType.slice( 1 ) || "*";
|
dataType = dataType.slice( 1 ) || "*";
|
||||||
@ -89,7 +93,9 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
|
|||||||
inspected[ dataType ] = true;
|
inspected[ dataType ] = true;
|
||||||
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
||||||
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
||||||
if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
if ( typeof dataTypeOrTransport === "string" &&
|
||||||
|
!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
||||||
|
|
||||||
options.dataTypes.unshift( dataTypeOrTransport );
|
options.dataTypes.unshift( dataTypeOrTransport );
|
||||||
inspect( dataTypeOrTransport );
|
inspect( dataTypeOrTransport );
|
||||||
return false;
|
return false;
|
||||||
@ -154,6 +160,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) {
|
|||||||
if ( dataTypes[ 0 ] in responses ) {
|
if ( dataTypes[ 0 ] in responses ) {
|
||||||
finalDataType = dataTypes[ 0 ];
|
finalDataType = dataTypes[ 0 ];
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Try convertible dataTypes
|
// Try convertible dataTypes
|
||||||
for ( type in responses ) {
|
for ( type in responses ) {
|
||||||
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
|
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
|
||||||
@ -164,6 +171,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) {
|
|||||||
firstDataType = type;
|
firstDataType = type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Or just use first one
|
// Or just use first one
|
||||||
finalDataType = finalDataType || firstDataType;
|
finalDataType = finalDataType || firstDataType;
|
||||||
}
|
}
|
||||||
@ -185,6 +193,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) {
|
|||||||
function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
||||||
var conv2, current, conv, tmp, prev,
|
var conv2, current, conv, tmp, prev,
|
||||||
converters = {},
|
converters = {},
|
||||||
|
|
||||||
// Work with a copy of dataTypes in case we need to modify it for conversion
|
// Work with a copy of dataTypes in case we need to modify it for conversion
|
||||||
dataTypes = s.dataTypes.slice();
|
dataTypes = s.dataTypes.slice();
|
||||||
|
|
||||||
@ -237,6 +246,7 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
|||||||
conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
||||||
converters[ "* " + tmp[ 0 ] ];
|
converters[ "* " + tmp[ 0 ] ];
|
||||||
if ( conv ) {
|
if ( conv ) {
|
||||||
|
|
||||||
// Condense equivalence converters
|
// Condense equivalence converters
|
||||||
if ( conv === true ) {
|
if ( conv === true ) {
|
||||||
conv = converters[ conv2 ];
|
conv = converters[ conv2 ];
|
||||||
@ -256,13 +266,16 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
|||||||
if ( conv !== true ) {
|
if ( conv !== true ) {
|
||||||
|
|
||||||
// Unless errors are allowed to bubble, catch and return them
|
// Unless errors are allowed to bubble, catch and return them
|
||||||
if ( conv && s[ "throws" ] ) {
|
if ( conv && s.throws ) {
|
||||||
response = conv( response );
|
response = conv( response );
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
response = conv( response );
|
response = conv( response );
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
|
return {
|
||||||
|
state: "parsererror",
|
||||||
|
error: conv ? e : "No conversion from " + prev + " to " + current
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -283,9 +296,9 @@ jQuery.extend({
|
|||||||
etag: {},
|
etag: {},
|
||||||
|
|
||||||
ajaxSettings: {
|
ajaxSettings: {
|
||||||
url: ajaxLocation,
|
url: location.href,
|
||||||
type: "GET",
|
type: "GET",
|
||||||
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
|
isLocal: rlocalProtocol.test( location.protocol ),
|
||||||
global: true,
|
global: true,
|
||||||
processData: true,
|
processData: true,
|
||||||
async: true,
|
async: true,
|
||||||
@ -311,9 +324,9 @@ jQuery.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
contents: {
|
contents: {
|
||||||
xml: /xml/,
|
xml: /\bxml\b/,
|
||||||
html: /html/,
|
html: /\bhtml/,
|
||||||
json: /json/
|
json: /\bjson\b/
|
||||||
},
|
},
|
||||||
|
|
||||||
responseFields: {
|
responseFields: {
|
||||||
@ -378,39 +391,55 @@ jQuery.extend({
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
var transport,
|
var transport,
|
||||||
|
|
||||||
// URL without anti-cache param
|
// URL without anti-cache param
|
||||||
cacheURL,
|
cacheURL,
|
||||||
|
|
||||||
// Response headers
|
// Response headers
|
||||||
responseHeadersString,
|
responseHeadersString,
|
||||||
responseHeaders,
|
responseHeaders,
|
||||||
|
|
||||||
// timeout handle
|
// timeout handle
|
||||||
timeoutTimer,
|
timeoutTimer,
|
||||||
// Cross-domain detection vars
|
|
||||||
parts,
|
// Url cleanup var
|
||||||
|
urlAnchor,
|
||||||
|
|
||||||
// To know if global events are to be dispatched
|
// To know if global events are to be dispatched
|
||||||
fireGlobals,
|
fireGlobals,
|
||||||
|
|
||||||
// Loop variable
|
// Loop variable
|
||||||
i,
|
i,
|
||||||
|
|
||||||
// Create the final options object
|
// Create the final options object
|
||||||
s = jQuery.ajaxSetup( {}, options ),
|
s = jQuery.ajaxSetup( {}, options ),
|
||||||
|
|
||||||
// Callbacks context
|
// Callbacks context
|
||||||
callbackContext = s.context || s,
|
callbackContext = s.context || s,
|
||||||
|
|
||||||
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
||||||
globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
|
globalEventContext = s.context &&
|
||||||
|
( callbackContext.nodeType || callbackContext.jquery ) ?
|
||||||
jQuery( callbackContext ) :
|
jQuery( callbackContext ) :
|
||||||
jQuery.event,
|
jQuery.event,
|
||||||
|
|
||||||
// Deferreds
|
// Deferreds
|
||||||
deferred = jQuery.Deferred(),
|
deferred = jQuery.Deferred(),
|
||||||
completeDeferred = jQuery.Callbacks( "once memory" ),
|
completeDeferred = jQuery.Callbacks( "once memory" ),
|
||||||
|
|
||||||
// Status-dependent callbacks
|
// Status-dependent callbacks
|
||||||
statusCode = s.statusCode || {},
|
statusCode = s.statusCode || {},
|
||||||
|
|
||||||
// Headers (they are sent all at once)
|
// Headers (they are sent all at once)
|
||||||
requestHeaders = {},
|
requestHeaders = {},
|
||||||
requestHeadersNames = {},
|
requestHeadersNames = {},
|
||||||
|
|
||||||
// The jqXHR state
|
// The jqXHR state
|
||||||
state = 0,
|
state = 0,
|
||||||
|
|
||||||
// Default abort message
|
// Default abort message
|
||||||
strAbort = "canceled",
|
strAbort = "canceled",
|
||||||
|
|
||||||
// Fake xhr
|
// Fake xhr
|
||||||
jqXHR = {
|
jqXHR = {
|
||||||
readyState: 0,
|
readyState: 0,
|
||||||
@ -459,10 +488,12 @@ jQuery.extend({
|
|||||||
if ( map ) {
|
if ( map ) {
|
||||||
if ( state < 2 ) {
|
if ( state < 2 ) {
|
||||||
for ( code in map ) {
|
for ( code in map ) {
|
||||||
|
|
||||||
// Lazy-add the new callback in a way that preserves old ones
|
// Lazy-add the new callback in a way that preserves old ones
|
||||||
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Execute the appropriate callbacks
|
// Execute the appropriate callbacks
|
||||||
jqXHR.always( map[ jqXHR.status ] );
|
jqXHR.always( map[ jqXHR.status ] );
|
||||||
}
|
}
|
||||||
@ -490,8 +521,8 @@ jQuery.extend({
|
|||||||
// Add protocol if not provided (prefilters might expect it)
|
// Add protocol if not provided (prefilters might expect it)
|
||||||
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
||||||
// We also use the url parameter if available
|
// We also use the url parameter if available
|
||||||
s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
|
s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
|
||||||
.replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
.replace( rprotocol, location.protocol + "//" );
|
||||||
|
|
||||||
// Alias method option to type as per ticket #12004
|
// Alias method option to type as per ticket #12004
|
||||||
s.type = options.method || options.type || s.method || s.type;
|
s.type = options.method || options.type || s.method || s.type;
|
||||||
@ -499,14 +530,26 @@ jQuery.extend({
|
|||||||
// Extract dataTypes list
|
// Extract dataTypes list
|
||||||
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
|
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
|
||||||
|
|
||||||
// A cross-domain request is in order when we have a protocol:host:port mismatch
|
// A cross-domain request is in order when the origin doesn't match the current origin.
|
||||||
if ( s.crossDomain == null ) {
|
if ( s.crossDomain == null ) {
|
||||||
parts = rurl.exec( s.url.toLowerCase() );
|
urlAnchor = document.createElement( "a" );
|
||||||
s.crossDomain = !!( parts &&
|
|
||||||
( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
|
// Support: IE8-11+
|
||||||
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
|
// IE throws exception if url is malformed, e.g. http://example.com:80x/
|
||||||
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
|
try {
|
||||||
);
|
urlAnchor.href = s.url;
|
||||||
|
|
||||||
|
// Support: IE8-11+
|
||||||
|
// Anchor's host property isn't correctly set when s.url is relative
|
||||||
|
urlAnchor.href = urlAnchor.href;
|
||||||
|
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
||||||
|
urlAnchor.protocol + "//" + urlAnchor.host;
|
||||||
|
} catch ( e ) {
|
||||||
|
|
||||||
|
// If there is an error parsing the URL, assume it is crossDomain,
|
||||||
|
// it can be rejected by the transport if it is invalid
|
||||||
|
s.crossDomain = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert data if not already a string
|
// Convert data if not already a string
|
||||||
@ -547,6 +590,7 @@ jQuery.extend({
|
|||||||
// If data is available, append data to url
|
// If data is available, append data to url
|
||||||
if ( s.data ) {
|
if ( s.data ) {
|
||||||
cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
|
cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
|
||||||
|
|
||||||
// #9682: remove data so that it's not used in an eventual retry
|
// #9682: remove data so that it's not used in an eventual retry
|
||||||
delete s.data;
|
delete s.data;
|
||||||
}
|
}
|
||||||
@ -582,7 +626,8 @@ jQuery.extend({
|
|||||||
jqXHR.setRequestHeader(
|
jqXHR.setRequestHeader(
|
||||||
"Accept",
|
"Accept",
|
||||||
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
|
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
|
||||||
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
s.accepts[ s.dataTypes[ 0 ] ] +
|
||||||
|
( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
||||||
s.accepts[ "*" ]
|
s.accepts[ "*" ]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -592,7 +637,9 @@ jQuery.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Allow custom headers/mimetypes and early abort
|
// Allow custom headers/mimetypes and early abort
|
||||||
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
|
if ( s.beforeSend &&
|
||||||
|
( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
|
||||||
|
|
||||||
// Abort if not done already and return
|
// Abort if not done already and return
|
||||||
return jqXHR.abort();
|
return jqXHR.abort();
|
||||||
}
|
}
|
||||||
@ -618,9 +665,15 @@ jQuery.extend({
|
|||||||
if ( fireGlobals ) {
|
if ( fireGlobals ) {
|
||||||
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If request was aborted inside ajaxSend, stop there
|
||||||
|
if ( state === 2 ) {
|
||||||
|
return jqXHR;
|
||||||
|
}
|
||||||
|
|
||||||
// Timeout
|
// Timeout
|
||||||
if ( s.async && s.timeout > 0 ) {
|
if ( s.async && s.timeout > 0 ) {
|
||||||
timeoutTimer = setTimeout(function() {
|
timeoutTimer = window.setTimeout( function() {
|
||||||
jqXHR.abort( "timeout" );
|
jqXHR.abort( "timeout" );
|
||||||
}, s.timeout );
|
}, s.timeout );
|
||||||
}
|
}
|
||||||
@ -629,9 +682,11 @@ jQuery.extend({
|
|||||||
state = 1;
|
state = 1;
|
||||||
transport.send( requestHeaders, done );
|
transport.send( requestHeaders, done );
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
|
|
||||||
// Propagate exception as error if not done
|
// Propagate exception as error if not done
|
||||||
if ( state < 2 ) {
|
if ( state < 2 ) {
|
||||||
done( -1, e );
|
done( -1, e );
|
||||||
|
|
||||||
// Simply rethrow otherwise
|
// Simply rethrow otherwise
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
@ -654,7 +709,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
// Clear timeout if it exists
|
// Clear timeout if it exists
|
||||||
if ( timeoutTimer ) {
|
if ( timeoutTimer ) {
|
||||||
clearTimeout( timeoutTimer );
|
window.clearTimeout( timeoutTimer );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dereference transport for early garbage collection
|
// Dereference transport for early garbage collection
|
||||||
@ -709,6 +764,7 @@ jQuery.extend({
|
|||||||
isSuccess = !error;
|
isSuccess = !error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Extract error from statusText and normalize for non-aborts
|
// Extract error from statusText and normalize for non-aborts
|
||||||
error = statusText;
|
error = statusText;
|
||||||
if ( status || !statusText ) {
|
if ( status || !statusText ) {
|
||||||
@ -744,6 +800,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
if ( fireGlobals ) {
|
if ( fireGlobals ) {
|
||||||
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
||||||
|
|
||||||
// Handle the global AJAX counter
|
// Handle the global AJAX counter
|
||||||
if ( !( --jQuery.active ) ) {
|
if ( !( --jQuery.active ) ) {
|
||||||
jQuery.event.trigger( "ajaxStop" );
|
jQuery.event.trigger( "ajaxStop" );
|
||||||
@ -765,6 +822,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
jQuery.each( [ "get", "post" ], function( i, method ) {
|
jQuery.each( [ "get", "post" ], function( i, method ) {
|
||||||
jQuery[ method ] = function( url, data, callback, type ) {
|
jQuery[ method ] = function( url, data, callback, type ) {
|
||||||
|
|
||||||
// Shift arguments if data argument was omitted
|
// Shift arguments if data argument was omitted
|
||||||
if ( jQuery.isFunction( data ) ) {
|
if ( jQuery.isFunction( data ) ) {
|
||||||
type = type || callback;
|
type = type || callback;
|
||||||
@ -772,13 +830,14 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
|
|||||||
data = undefined;
|
data = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return jQuery.ajax({
|
// The url can be an options object (which then must have .url)
|
||||||
|
return jQuery.ajax( jQuery.extend( {
|
||||||
url: url,
|
url: url,
|
||||||
type: method,
|
type: method,
|
||||||
dataType: type,
|
dataType: type,
|
||||||
data: data,
|
data: data,
|
||||||
success: callback
|
success: callback
|
||||||
});
|
}, jQuery.isPlainObject( url ) && url ) );
|
||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -24,7 +24,10 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|||||||
var callbackName, overwritten, responseContainer,
|
var callbackName, overwritten, responseContainer,
|
||||||
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
||||||
"url" :
|
"url" :
|
||||||
typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
|
typeof s.data === "string" &&
|
||||||
|
( s.contentType || "" )
|
||||||
|
.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
|
||||||
|
rjsonp.test( s.data ) && "data"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Handle iff the expected data type is "jsonp" or we have a parameter to set
|
// Handle iff the expected data type is "jsonp" or we have a parameter to set
|
||||||
@ -50,7 +53,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|||||||
return responseContainer[ 0 ];
|
return responseContainer[ 0 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
// force json dataType
|
// Force json dataType
|
||||||
s.dataTypes[ 0 ] = "json";
|
s.dataTypes[ 0 ] = "json";
|
||||||
|
|
||||||
// Install callback
|
// Install callback
|
||||||
@ -61,15 +64,23 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|||||||
|
|
||||||
// Clean-up function (fires after converters)
|
// Clean-up function (fires after converters)
|
||||||
jqXHR.always( function() {
|
jqXHR.always( function() {
|
||||||
// Restore preexisting value
|
|
||||||
|
// If previous value didn't exist - remove it
|
||||||
|
if ( overwritten === undefined ) {
|
||||||
|
jQuery( window ).removeProp( callbackName );
|
||||||
|
|
||||||
|
// Otherwise restore preexisting value
|
||||||
|
} else {
|
||||||
window[ callbackName ] = overwritten;
|
window[ callbackName ] = overwritten;
|
||||||
|
}
|
||||||
|
|
||||||
// Save back as free
|
// Save back as free
|
||||||
if ( s[ callbackName ] ) {
|
if ( s[ callbackName ] ) {
|
||||||
// make sure that re-using the options doesn't screw things around
|
|
||||||
|
// Make sure that re-using the options doesn't screw things around
|
||||||
s.jsonpCallback = originalSettings.jsonpCallback;
|
s.jsonpCallback = originalSettings.jsonpCallback;
|
||||||
|
|
||||||
// save the callback name for future use
|
// Save the callback name for future use
|
||||||
oldCallbacks.push( callbackName );
|
oldCallbacks.push( callbackName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ define([
|
|||||||
"../traversing",
|
"../traversing",
|
||||||
"../manipulation",
|
"../manipulation",
|
||||||
"../selector",
|
"../selector",
|
||||||
|
|
||||||
// Optional event/alias dependency
|
// Optional event/alias dependency
|
||||||
"../event/alias"
|
"../event/alias"
|
||||||
], function( jQuery ) {
|
], function( jQuery ) {
|
||||||
@ -24,7 +25,7 @@ jQuery.fn.load = function( url, params, callback ) {
|
|||||||
self = this,
|
self = this,
|
||||||
off = url.indexOf( " " );
|
off = url.indexOf( " " );
|
||||||
|
|
||||||
if ( off >= 0 ) {
|
if ( off > -1 ) {
|
||||||
selector = jQuery.trim( url.slice( off ) );
|
selector = jQuery.trim( url.slice( off ) );
|
||||||
url = url.slice( 0, off );
|
url = url.slice( 0, off );
|
||||||
}
|
}
|
||||||
@ -46,8 +47,10 @@ jQuery.fn.load = function( url, params, callback ) {
|
|||||||
jQuery.ajax( {
|
jQuery.ajax( {
|
||||||
url: url,
|
url: url,
|
||||||
|
|
||||||
// if "type" variable is undefined, then "GET" method will be used
|
// If "type" variable is undefined, then "GET" method will be used.
|
||||||
type: type,
|
// Make value of this field explicit since
|
||||||
|
// user can override it through ajaxSetup method
|
||||||
|
type: type || "GET",
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
data: params
|
data: params
|
||||||
} ).done( function( responseText ) {
|
} ).done( function( responseText ) {
|
||||||
@ -64,8 +67,13 @@ jQuery.fn.load = function( url, params, callback ) {
|
|||||||
// Otherwise use the full result
|
// Otherwise use the full result
|
||||||
responseText );
|
responseText );
|
||||||
|
|
||||||
}).complete( callback && function( jqXHR, status ) {
|
// If the request succeeds, this function gets "data", "status", "jqXHR"
|
||||||
self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
|
// but they are ignored because response was set above.
|
||||||
|
// If it fails, this function gets "jqXHR", "status", "error"
|
||||||
|
} ).always( callback && function( jqXHR, status ) {
|
||||||
|
self.each( function() {
|
||||||
|
callback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] );
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,15 +4,14 @@ define([
|
|||||||
|
|
||||||
// Cross-browser xml parsing
|
// Cross-browser xml parsing
|
||||||
jQuery.parseXML = function( data ) {
|
jQuery.parseXML = function( data ) {
|
||||||
var xml, tmp;
|
var xml;
|
||||||
if ( !data || typeof data !== "string" ) {
|
if ( !data || typeof data !== "string" ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: IE9
|
// Support: IE9
|
||||||
try {
|
try {
|
||||||
tmp = new DOMParser();
|
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
||||||
xml = tmp.parseFromString( data, "text/xml" );
|
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
xml = undefined;
|
xml = undefined;
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
|
"../var/document",
|
||||||
"../ajax"
|
"../ajax"
|
||||||
], function( jQuery ) {
|
], function( jQuery, document ) {
|
||||||
|
|
||||||
// Install script dataType
|
// Install script dataType
|
||||||
jQuery.ajaxSetup( {
|
jQuery.ajaxSetup( {
|
||||||
accepts: {
|
accepts: {
|
||||||
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
|
script: "text/javascript, application/javascript, " +
|
||||||
|
"application/ecmascript, application/x-ecmascript"
|
||||||
},
|
},
|
||||||
contents: {
|
contents: {
|
||||||
script: /(?:java|ecma)script/
|
script: /\b(?:java|ecma)script\b/
|
||||||
},
|
},
|
||||||
converters: {
|
converters: {
|
||||||
"text script": function( text ) {
|
"text script": function( text ) {
|
||||||
@ -31,13 +33,13 @@ jQuery.ajaxPrefilter( "script", function( s ) {
|
|||||||
|
|
||||||
// Bind script tag hack transport
|
// Bind script tag hack transport
|
||||||
jQuery.ajaxTransport( "script", function( s ) {
|
jQuery.ajaxTransport( "script", function( s ) {
|
||||||
|
|
||||||
// This transport only deals with cross domain requests
|
// This transport only deals with cross domain requests
|
||||||
if ( s.crossDomain ) {
|
if ( s.crossDomain ) {
|
||||||
var script, callback;
|
var script, callback;
|
||||||
return {
|
return {
|
||||||
send: function( _, complete ) {
|
send: function( _, complete ) {
|
||||||
script = jQuery( "<script>" ).prop( {
|
script = jQuery( "<script>" ).prop( {
|
||||||
async: true,
|
|
||||||
charset: s.scriptCharset,
|
charset: s.scriptCharset,
|
||||||
src: s.url
|
src: s.url
|
||||||
} ).on(
|
} ).on(
|
||||||
@ -50,6 +52,8 @@ jQuery.ajaxTransport( "script", function( s ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
||||||
document.head.appendChild( script[ 0 ] );
|
document.head.appendChild( script[ 0 ] );
|
||||||
},
|
},
|
||||||
abort: function() {
|
abort: function() {
|
||||||
|
@ -6,47 +6,41 @@ define([
|
|||||||
|
|
||||||
jQuery.ajaxSettings.xhr = function() {
|
jQuery.ajaxSettings.xhr = function() {
|
||||||
try {
|
try {
|
||||||
return new XMLHttpRequest();
|
return new window.XMLHttpRequest();
|
||||||
} catch ( e ) {}
|
} catch ( e ) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
var xhrId = 0,
|
var xhrSuccessStatus = {
|
||||||
xhrCallbacks = {},
|
|
||||||
xhrSuccessStatus = {
|
// File protocol always yields status code 0, assume 200
|
||||||
// file protocol always yields status code 0, assume 200
|
|
||||||
0: 200,
|
0: 200,
|
||||||
|
|
||||||
// Support: IE9
|
// Support: IE9
|
||||||
// #1450: sometimes IE returns 1223 when it should be 204
|
// #1450: sometimes IE returns 1223 when it should be 204
|
||||||
1223: 204
|
1223: 204
|
||||||
},
|
},
|
||||||
xhrSupported = jQuery.ajaxSettings.xhr();
|
xhrSupported = jQuery.ajaxSettings.xhr();
|
||||||
|
|
||||||
// Support: IE9
|
|
||||||
// Open requests must be manually aborted on unload (#5280)
|
|
||||||
// See https://support.microsoft.com/kb/2856746 for more info
|
|
||||||
if ( window.attachEvent ) {
|
|
||||||
window.attachEvent( "onunload", function() {
|
|
||||||
for ( var key in xhrCallbacks ) {
|
|
||||||
xhrCallbacks[ key ]();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
||||||
support.ajax = xhrSupported = !!xhrSupported;
|
support.ajax = xhrSupported = !!xhrSupported;
|
||||||
|
|
||||||
jQuery.ajaxTransport( function( options ) {
|
jQuery.ajaxTransport( function( options ) {
|
||||||
var callback;
|
var callback, errorCallback;
|
||||||
|
|
||||||
// Cross domain only allowed if supported through XMLHttpRequest
|
// Cross domain only allowed if supported through XMLHttpRequest
|
||||||
if ( support.cors || xhrSupported && !options.crossDomain ) {
|
if ( support.cors || xhrSupported && !options.crossDomain ) {
|
||||||
return {
|
return {
|
||||||
send: function( headers, complete ) {
|
send: function( headers, complete ) {
|
||||||
var i,
|
var i,
|
||||||
xhr = options.xhr(),
|
xhr = options.xhr();
|
||||||
id = ++xhrId;
|
|
||||||
|
|
||||||
xhr.open( options.type, options.url, options.async, options.username, options.password );
|
xhr.open(
|
||||||
|
options.type,
|
||||||
|
options.url,
|
||||||
|
options.async,
|
||||||
|
options.username,
|
||||||
|
options.password
|
||||||
|
);
|
||||||
|
|
||||||
// Apply custom fields if provided
|
// Apply custom fields if provided
|
||||||
if ( options.xhrFields ) {
|
if ( options.xhrFields ) {
|
||||||
@ -78,27 +72,38 @@ jQuery.ajaxTransport(function( options ) {
|
|||||||
callback = function( type ) {
|
callback = function( type ) {
|
||||||
return function() {
|
return function() {
|
||||||
if ( callback ) {
|
if ( callback ) {
|
||||||
delete xhrCallbacks[ id ];
|
callback = errorCallback = xhr.onload =
|
||||||
callback = xhr.onload = xhr.onerror = null;
|
xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
|
||||||
|
|
||||||
if ( type === "abort" ) {
|
if ( type === "abort" ) {
|
||||||
xhr.abort();
|
xhr.abort();
|
||||||
} else if ( type === "error" ) {
|
} else if ( type === "error" ) {
|
||||||
|
|
||||||
|
// Support: IE9
|
||||||
|
// On a manual native abort, IE9 throws
|
||||||
|
// errors on any property access that is not readyState
|
||||||
|
if ( typeof xhr.status !== "number" ) {
|
||||||
|
complete( 0, "error" );
|
||||||
|
} else {
|
||||||
complete(
|
complete(
|
||||||
// file: protocol always yields status 0; see #8605, #14207
|
|
||||||
|
// File: protocol always yields status 0; see #8605, #14207
|
||||||
xhr.status,
|
xhr.status,
|
||||||
xhr.statusText
|
xhr.statusText
|
||||||
);
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
complete(
|
complete(
|
||||||
xhrSuccessStatus[ xhr.status ] || xhr.status,
|
xhrSuccessStatus[ xhr.status ] || xhr.status,
|
||||||
xhr.statusText,
|
xhr.statusText,
|
||||||
// Support: IE9
|
|
||||||
// Accessing binary-data responseText throws an exception
|
// Support: IE9 only
|
||||||
// (#11426)
|
// IE9 has no XHR2 but throws on binary (trac-11426)
|
||||||
typeof xhr.responseText === "string" ? {
|
// For XHR2 non-text, let the caller handle it (gh-2498)
|
||||||
text: xhr.responseText
|
( xhr.responseType || "text" ) !== "text" ||
|
||||||
} : undefined,
|
typeof xhr.responseText !== "string" ?
|
||||||
|
{ binary: xhr.response } :
|
||||||
|
{ text: xhr.responseText },
|
||||||
xhr.getAllResponseHeaders()
|
xhr.getAllResponseHeaders()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -108,15 +113,41 @@ jQuery.ajaxTransport(function( options ) {
|
|||||||
|
|
||||||
// Listen to events
|
// Listen to events
|
||||||
xhr.onload = callback();
|
xhr.onload = callback();
|
||||||
xhr.onerror = callback("error");
|
errorCallback = xhr.onerror = callback( "error" );
|
||||||
|
|
||||||
|
// Support: IE9
|
||||||
|
// Use onreadystatechange to replace onabort
|
||||||
|
// to handle uncaught aborts
|
||||||
|
if ( xhr.onabort !== undefined ) {
|
||||||
|
xhr.onabort = errorCallback;
|
||||||
|
} else {
|
||||||
|
xhr.onreadystatechange = function() {
|
||||||
|
|
||||||
|
// Check readyState before timeout as it changes
|
||||||
|
if ( xhr.readyState === 4 ) {
|
||||||
|
|
||||||
|
// Allow onerror to be called first,
|
||||||
|
// but that will not handle a native abort
|
||||||
|
// Also, save errorCallback to a variable
|
||||||
|
// as xhr.onerror cannot be accessed
|
||||||
|
window.setTimeout( function() {
|
||||||
|
if ( callback ) {
|
||||||
|
errorCallback();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Create the abort callback
|
// Create the abort callback
|
||||||
callback = xhrCallbacks[ id ] = callback("abort");
|
callback = callback( "abort" );
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Do send the request (this may raise an exception)
|
// Do send the request (this may raise an exception)
|
||||||
xhr.send( options.hasContent && options.data || null );
|
xhr.send( options.hasContent && options.data || null );
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
|
|
||||||
// #14683: Only rethrow if this hasn't been notified as an error yet
|
// #14683: Only rethrow if this hasn't been notified as an error yet
|
||||||
if ( callback ) {
|
if ( callback ) {
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
"../var/rnotwhite",
|
|
||||||
"../var/strundefined",
|
|
||||||
"../core/access",
|
"../core/access",
|
||||||
"./support",
|
"./support",
|
||||||
|
"../var/rnotwhite",
|
||||||
"../selector"
|
"../selector"
|
||||||
], function( jQuery, rnotwhite, strundefined, access, support ) {
|
], function( jQuery, access, support, rnotwhite ) {
|
||||||
|
|
||||||
var nodeHook, boolHook,
|
var boolHook,
|
||||||
attrHandle = jQuery.expr.attrHandle;
|
attrHandle = jQuery.expr.attrHandle;
|
||||||
|
|
||||||
jQuery.fn.extend( {
|
jQuery.fn.extend( {
|
||||||
@ -24,16 +23,16 @@ jQuery.fn.extend({
|
|||||||
|
|
||||||
jQuery.extend( {
|
jQuery.extend( {
|
||||||
attr: function( elem, name, value ) {
|
attr: function( elem, name, value ) {
|
||||||
var hooks, ret,
|
var ret, hooks,
|
||||||
nType = elem.nodeType;
|
nType = elem.nodeType;
|
||||||
|
|
||||||
// don't get/set attributes on text, comment and attribute nodes
|
// Don't get/set attributes on text, comment and attribute nodes
|
||||||
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback to prop when attributes are not supported
|
// Fallback to prop when attributes are not supported
|
||||||
if ( typeof elem.getAttribute === strundefined ) {
|
if ( typeof elem.getAttribute === "undefined" ) {
|
||||||
return jQuery.prop( elem, name, value );
|
return jQuery.prop( elem, name, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,53 +41,32 @@ jQuery.extend({
|
|||||||
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
hooks = jQuery.attrHooks[ name ] ||
|
hooks = jQuery.attrHooks[ name ] ||
|
||||||
( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
|
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( value !== undefined ) {
|
if ( value !== undefined ) {
|
||||||
|
|
||||||
if ( value === null ) {
|
if ( value === null ) {
|
||||||
jQuery.removeAttr( elem, name );
|
jQuery.removeAttr( elem, name );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
if ( hooks && "set" in hooks &&
|
||||||
|
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
elem.setAttribute( name, value + "" );
|
elem.setAttribute( name, value + "" );
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
|
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
ret = jQuery.find.attr( elem, name );
|
ret = jQuery.find.attr( elem, name );
|
||||||
|
|
||||||
// Non-existent attributes return null, we normalize to undefined
|
// Non-existent attributes return null, we normalize to undefined
|
||||||
return ret == null ?
|
return ret == null ? undefined : ret;
|
||||||
undefined :
|
|
||||||
ret;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
removeAttr: function( elem, value ) {
|
|
||||||
var name, propName,
|
|
||||||
i = 0,
|
|
||||||
attrNames = value && value.match( rnotwhite );
|
|
||||||
|
|
||||||
if ( attrNames && elem.nodeType === 1 ) {
|
|
||||||
while ( (name = attrNames[i++]) ) {
|
|
||||||
propName = jQuery.propFix[ name ] || name;
|
|
||||||
|
|
||||||
// Boolean attributes get special treatment (#10870)
|
|
||||||
if ( jQuery.expr.match.bool.test( name ) ) {
|
|
||||||
// Set corresponding property to false
|
|
||||||
elem[ propName ] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
elem.removeAttribute( name );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
attrHooks: {
|
attrHooks: {
|
||||||
@ -105,6 +83,27 @@ jQuery.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
removeAttr: function( elem, value ) {
|
||||||
|
var name, propName,
|
||||||
|
i = 0,
|
||||||
|
attrNames = value && value.match( rnotwhite );
|
||||||
|
|
||||||
|
if ( attrNames && elem.nodeType === 1 ) {
|
||||||
|
while ( ( name = attrNames[ i++ ] ) ) {
|
||||||
|
propName = jQuery.propFix[ name ] || name;
|
||||||
|
|
||||||
|
// Boolean attributes get special treatment (#10870)
|
||||||
|
if ( jQuery.expr.match.bool.test( name ) ) {
|
||||||
|
|
||||||
|
// Set corresponding property to false
|
||||||
|
elem[ propName ] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.removeAttribute( name );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -112,6 +111,7 @@ jQuery.extend({
|
|||||||
boolHook = {
|
boolHook = {
|
||||||
set: function( elem, value, name ) {
|
set: function( elem, value, name ) {
|
||||||
if ( value === false ) {
|
if ( value === false ) {
|
||||||
|
|
||||||
// Remove boolean attributes when set to false
|
// Remove boolean attributes when set to false
|
||||||
jQuery.removeAttr( elem, name );
|
jQuery.removeAttr( elem, name );
|
||||||
} else {
|
} else {
|
||||||
@ -126,6 +126,7 @@ jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name )
|
|||||||
attrHandle[ name ] = function( elem, name, isXML ) {
|
attrHandle[ name ] = function( elem, name, isXML ) {
|
||||||
var ret, handle;
|
var ret, handle;
|
||||||
if ( !isXML ) {
|
if ( !isXML ) {
|
||||||
|
|
||||||
// Avoid an infinite loop by temporarily removing this function from the getter
|
// Avoid an infinite loop by temporarily removing this function from the getter
|
||||||
handle = attrHandle[ name ];
|
handle = attrHandle[ name ];
|
||||||
attrHandle[ name ] = ret;
|
attrHandle[ name ] = ret;
|
||||||
|
@ -1,36 +1,34 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
"../var/rnotwhite",
|
"../var/rnotwhite",
|
||||||
"../var/strundefined",
|
"../data/var/dataPriv",
|
||||||
"../data/var/data_priv",
|
|
||||||
"../core/init"
|
"../core/init"
|
||||||
], function( jQuery, rnotwhite, strundefined, data_priv ) {
|
], function( jQuery, rnotwhite, dataPriv ) {
|
||||||
|
|
||||||
var rclass = /[\t\r\n\f]/g;
|
var rclass = /[\t\r\n\f]/g;
|
||||||
|
|
||||||
|
function getClass( elem ) {
|
||||||
|
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.fn.extend( {
|
jQuery.fn.extend( {
|
||||||
addClass: function( value ) {
|
addClass: function( value ) {
|
||||||
var classes, elem, cur, clazz, j, finalValue,
|
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||||
proceed = typeof value === "string" && value,
|
i = 0;
|
||||||
i = 0,
|
|
||||||
len = this.length;
|
|
||||||
|
|
||||||
if ( jQuery.isFunction( value ) ) {
|
if ( jQuery.isFunction( value ) ) {
|
||||||
return this.each( function( j ) {
|
return this.each( function( j ) {
|
||||||
jQuery( this ).addClass( value.call( this, j, this.className ) );
|
jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( proceed ) {
|
if ( typeof value === "string" && value ) {
|
||||||
// The disjunction here is for better compressibility (see removeClass)
|
classes = value.match( rnotwhite ) || [];
|
||||||
classes = ( value || "" ).match( rnotwhite ) || [];
|
|
||||||
|
|
||||||
for ( ; i < len; i++ ) {
|
while ( ( elem = this[ i++ ] ) ) {
|
||||||
elem = this[ i ];
|
curValue = getClass( elem );
|
||||||
cur = elem.nodeType === 1 && ( elem.className ?
|
cur = elem.nodeType === 1 &&
|
||||||
( " " + elem.className + " " ).replace( rclass, " " ) :
|
( " " + curValue + " " ).replace( rclass, " " );
|
||||||
" "
|
|
||||||
);
|
|
||||||
|
|
||||||
if ( cur ) {
|
if ( cur ) {
|
||||||
j = 0;
|
j = 0;
|
||||||
@ -40,10 +38,10 @@ jQuery.fn.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// only assign if different to avoid unneeded rendering.
|
// Only assign if different to avoid unneeded rendering.
|
||||||
finalValue = jQuery.trim( cur );
|
finalValue = jQuery.trim( cur );
|
||||||
if ( elem.className !== finalValue ) {
|
if ( curValue !== finalValue ) {
|
||||||
elem.className = finalValue;
|
elem.setAttribute( "class", finalValue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -53,40 +51,43 @@ jQuery.fn.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
removeClass: function( value ) {
|
removeClass: function( value ) {
|
||||||
var classes, elem, cur, clazz, j, finalValue,
|
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||||
proceed = arguments.length === 0 || typeof value === "string" && value,
|
i = 0;
|
||||||
i = 0,
|
|
||||||
len = this.length;
|
|
||||||
|
|
||||||
if ( jQuery.isFunction( value ) ) {
|
if ( jQuery.isFunction( value ) ) {
|
||||||
return this.each( function( j ) {
|
return this.each( function( j ) {
|
||||||
jQuery( this ).removeClass( value.call( this, j, this.className ) );
|
jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
if ( proceed ) {
|
|
||||||
classes = ( value || "" ).match( rnotwhite ) || [];
|
|
||||||
|
|
||||||
for ( ; i < len; i++ ) {
|
if ( !arguments.length ) {
|
||||||
elem = this[ i ];
|
return this.attr( "class", "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( typeof value === "string" && value ) {
|
||||||
|
classes = value.match( rnotwhite ) || [];
|
||||||
|
|
||||||
|
while ( ( elem = this[ i++ ] ) ) {
|
||||||
|
curValue = getClass( elem );
|
||||||
|
|
||||||
// This expression is here for better compressibility (see addClass)
|
// This expression is here for better compressibility (see addClass)
|
||||||
cur = elem.nodeType === 1 && ( elem.className ?
|
cur = elem.nodeType === 1 &&
|
||||||
( " " + elem.className + " " ).replace( rclass, " " ) :
|
( " " + curValue + " " ).replace( rclass, " " );
|
||||||
""
|
|
||||||
);
|
|
||||||
|
|
||||||
if ( cur ) {
|
if ( cur ) {
|
||||||
j = 0;
|
j = 0;
|
||||||
while ( ( clazz = classes[ j++ ] ) ) {
|
while ( ( clazz = classes[ j++ ] ) ) {
|
||||||
|
|
||||||
// Remove *all* instances
|
// Remove *all* instances
|
||||||
while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
|
while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
|
||||||
cur = cur.replace( " " + clazz + " ", " " );
|
cur = cur.replace( " " + clazz + " ", " " );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only assign if different to avoid unneeded rendering.
|
// Only assign if different to avoid unneeded rendering.
|
||||||
finalValue = value ? jQuery.trim( cur ) : "";
|
finalValue = jQuery.trim( cur );
|
||||||
if ( elem.className !== finalValue ) {
|
if ( curValue !== finalValue ) {
|
||||||
elem.className = finalValue;
|
elem.setAttribute( "class", finalValue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -104,19 +105,25 @@ jQuery.fn.extend({
|
|||||||
|
|
||||||
if ( jQuery.isFunction( value ) ) {
|
if ( jQuery.isFunction( value ) ) {
|
||||||
return this.each( function( i ) {
|
return this.each( function( i ) {
|
||||||
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
|
jQuery( this ).toggleClass(
|
||||||
|
value.call( this, i, getClass( this ), stateVal ),
|
||||||
|
stateVal
|
||||||
|
);
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.each( function() {
|
return this.each( function() {
|
||||||
|
var className, i, self, classNames;
|
||||||
|
|
||||||
if ( type === "string" ) {
|
if ( type === "string" ) {
|
||||||
|
|
||||||
// Toggle individual class names
|
// Toggle individual class names
|
||||||
var className,
|
i = 0;
|
||||||
i = 0,
|
self = jQuery( this );
|
||||||
self = jQuery( this ),
|
|
||||||
classNames = value.match( rnotwhite ) || [];
|
classNames = value.match( rnotwhite ) || [];
|
||||||
|
|
||||||
while ( ( className = classNames[ i++ ] ) ) {
|
while ( ( className = classNames[ i++ ] ) ) {
|
||||||
|
|
||||||
// Check each className given, space separated list
|
// Check each className given, space separated list
|
||||||
if ( self.hasClass( className ) ) {
|
if ( self.hasClass( className ) ) {
|
||||||
self.removeClass( className );
|
self.removeClass( className );
|
||||||
@ -126,27 +133,39 @@ jQuery.fn.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toggle whole class name
|
// Toggle whole class name
|
||||||
} else if ( type === strundefined || type === "boolean" ) {
|
} else if ( value === undefined || type === "boolean" ) {
|
||||||
if ( this.className ) {
|
className = getClass( this );
|
||||||
// store className if set
|
if ( className ) {
|
||||||
data_priv.set( this, "__className__", this.className );
|
|
||||||
|
// Store className if set
|
||||||
|
dataPriv.set( this, "__className__", className );
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the element has a class name or if we're passed `false`,
|
// If the element has a class name or if we're passed `false`,
|
||||||
// then remove the whole classname (if there was one, the above saved it).
|
// then remove the whole classname (if there was one, the above saved it).
|
||||||
// Otherwise bring back whatever was previously saved (if anything),
|
// Otherwise bring back whatever was previously saved (if anything),
|
||||||
// falling back to the empty string if nothing was stored.
|
// falling back to the empty string if nothing was stored.
|
||||||
this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
|
if ( this.setAttribute ) {
|
||||||
|
this.setAttribute( "class",
|
||||||
|
className || value === false ?
|
||||||
|
"" :
|
||||||
|
dataPriv.get( this, "__className__" ) || ""
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
hasClass: function( selector ) {
|
hasClass: function( selector ) {
|
||||||
var className = " " + selector + " ",
|
var className, elem,
|
||||||
i = 0,
|
i = 0;
|
||||||
l = this.length;
|
|
||||||
for ( ; i < l; i++ ) {
|
className = " " + selector + " ";
|
||||||
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
|
while ( ( elem = this[ i++ ] ) ) {
|
||||||
|
if ( elem.nodeType === 1 &&
|
||||||
|
( " " + getClass( elem ) + " " ).replace( rclass, " " )
|
||||||
|
.indexOf( className ) > -1
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
"../core/access",
|
"../core/access",
|
||||||
"./support"
|
"./support",
|
||||||
|
"../selector"
|
||||||
], function( jQuery, access, support ) {
|
], function( jQuery, access, support ) {
|
||||||
|
|
||||||
var rfocusable = /^(?:input|select|textarea|button)$/i;
|
var rfocusable = /^(?:input|select|textarea|button)$/i,
|
||||||
|
rclickable = /^(?:a|area)$/i;
|
||||||
|
|
||||||
jQuery.fn.extend( {
|
jQuery.fn.extend( {
|
||||||
prop: function( name, value ) {
|
prop: function( name, value ) {
|
||||||
@ -19,48 +21,61 @@ jQuery.fn.extend({
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
jQuery.extend( {
|
jQuery.extend( {
|
||||||
propFix: {
|
|
||||||
"for": "htmlFor",
|
|
||||||
"class": "className"
|
|
||||||
},
|
|
||||||
|
|
||||||
prop: function( elem, name, value ) {
|
prop: function( elem, name, value ) {
|
||||||
var ret, hooks, notxml,
|
var ret, hooks,
|
||||||
nType = elem.nodeType;
|
nType = elem.nodeType;
|
||||||
|
|
||||||
// Don't get/set properties on text, comment and attribute nodes
|
// Don't get/set properties on text, comment and attribute nodes
|
||||||
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
||||||
|
|
||||||
if ( notxml ) {
|
|
||||||
// Fix name and attach hooks
|
// Fix name and attach hooks
|
||||||
name = jQuery.propFix[ name ] || name;
|
name = jQuery.propFix[ name ] || name;
|
||||||
hooks = jQuery.propHooks[ name ];
|
hooks = jQuery.propHooks[ name ];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( value !== undefined ) {
|
if ( value !== undefined ) {
|
||||||
return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
|
if ( hooks && "set" in hooks &&
|
||||||
ret :
|
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
||||||
( elem[ name ] = value );
|
return ret;
|
||||||
|
|
||||||
} else {
|
|
||||||
return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
|
|
||||||
ret :
|
|
||||||
elem[ name ];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ( elem[ name ] = value );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return elem[ name ];
|
||||||
},
|
},
|
||||||
|
|
||||||
propHooks: {
|
propHooks: {
|
||||||
tabIndex: {
|
tabIndex: {
|
||||||
get: function( elem ) {
|
get: function( elem ) {
|
||||||
return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
|
|
||||||
elem.tabIndex :
|
// elem.tabIndex doesn't always return the
|
||||||
|
// correct value when it hasn't been explicitly set
|
||||||
|
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
||||||
|
// Use proper attribute retrieval(#12072)
|
||||||
|
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
||||||
|
|
||||||
|
return tabindex ?
|
||||||
|
parseInt( tabindex, 10 ) :
|
||||||
|
rfocusable.test( elem.nodeName ) ||
|
||||||
|
rclickable.test( elem.nodeName ) && elem.href ?
|
||||||
|
0 :
|
||||||
-1;
|
-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
propFix: {
|
||||||
|
"for": "htmlFor",
|
||||||
|
"class": "className"
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
define( [
|
define( [
|
||||||
|
"../var/document",
|
||||||
"../var/support"
|
"../var/support"
|
||||||
], function( support ) {
|
], function( document, support ) {
|
||||||
|
|
||||||
( function() {
|
( function() {
|
||||||
var input = document.createElement( "input" ),
|
var input = document.createElement( "input" ),
|
||||||
|
@ -13,17 +13,23 @@ jQuery.fn.extend({
|
|||||||
|
|
||||||
if ( !arguments.length ) {
|
if ( !arguments.length ) {
|
||||||
if ( elem ) {
|
if ( elem ) {
|
||||||
hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
hooks = jQuery.valHooks[ elem.type ] ||
|
||||||
|
jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
||||||
|
|
||||||
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
|
if ( hooks &&
|
||||||
|
"get" in hooks &&
|
||||||
|
( ret = hooks.get( elem, "value" ) ) !== undefined
|
||||||
|
) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = elem.value;
|
ret = elem.value;
|
||||||
|
|
||||||
return typeof ret === "string" ?
|
return typeof ret === "string" ?
|
||||||
|
|
||||||
// Handle most common string cases
|
// Handle most common string cases
|
||||||
ret.replace( rreturn, "" ) :
|
ret.replace( rreturn, "" ) :
|
||||||
|
|
||||||
// Handle cases where value is null/undef or number
|
// Handle cases where value is null/undef or number
|
||||||
ret == null ? "" : ret;
|
ret == null ? "" : ret;
|
||||||
}
|
}
|
||||||
@ -73,12 +79,10 @@ jQuery.extend({
|
|||||||
valHooks: {
|
valHooks: {
|
||||||
option: {
|
option: {
|
||||||
get: function( elem ) {
|
get: function( elem ) {
|
||||||
var val = jQuery.find.attr( elem, "value" );
|
|
||||||
return val != null ?
|
// Support: IE<11
|
||||||
val :
|
// option.value not trimmed (#14858)
|
||||||
// Support: IE10-11+
|
return jQuery.trim( elem.value );
|
||||||
// option.text throws exceptions (#14686, #14858)
|
|
||||||
jQuery.trim( jQuery.text( elem ) );
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
@ -97,11 +101,14 @@ jQuery.extend({
|
|||||||
for ( ; i < max; i++ ) {
|
for ( ; i < max; i++ ) {
|
||||||
option = options[ i ];
|
option = options[ i ];
|
||||||
|
|
||||||
// IE6-9 doesn't update selected after form reset (#2551)
|
// IE8-9 doesn't update selected after form reset (#2551)
|
||||||
if ( ( option.selected || i === index ) &&
|
if ( ( option.selected || i === index ) &&
|
||||||
|
|
||||||
// Don't return options that are disabled or in a disabled optgroup
|
// Don't return options that are disabled or in a disabled optgroup
|
||||||
( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
|
( support.optDisabled ?
|
||||||
( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
!option.disabled : option.getAttribute( "disabled" ) === null ) &&
|
||||||
|
( !option.parentNode.disabled ||
|
||||||
|
!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||||
|
|
||||||
// Get the specific value for the option
|
// Get the specific value for the option
|
||||||
value = jQuery( option ).val();
|
value = jQuery( option ).val();
|
||||||
@ -127,7 +134,9 @@ jQuery.extend({
|
|||||||
|
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
option = options[ i ];
|
option = options[ i ];
|
||||||
if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
|
if ( option.selected =
|
||||||
|
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
||||||
|
) {
|
||||||
optionSet = true;
|
optionSet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,7 +156,7 @@ jQuery.each([ "radio", "checkbox" ], function() {
|
|||||||
jQuery.valHooks[ this ] = {
|
jQuery.valHooks[ this ] = {
|
||||||
set: function( elem, value ) {
|
set: function( elem, value ) {
|
||||||
if ( jQuery.isArray( value ) ) {
|
if ( jQuery.isArray( value ) ) {
|
||||||
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
|
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,12 +3,9 @@ define([
|
|||||||
"./var/rnotwhite"
|
"./var/rnotwhite"
|
||||||
], function( jQuery, rnotwhite ) {
|
], function( jQuery, rnotwhite ) {
|
||||||
|
|
||||||
// String to Object options format cache
|
// Convert String-formatted options into Object-formatted ones
|
||||||
var optionsCache = {};
|
|
||||||
|
|
||||||
// Convert String-formatted options into Object-formatted ones and store in cache
|
|
||||||
function createOptions( options ) {
|
function createOptions( options ) {
|
||||||
var object = optionsCache[ options ] = {};
|
var object = {};
|
||||||
jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
|
jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
|
||||||
object[ flag ] = true;
|
object[ flag ] = true;
|
||||||
} );
|
} );
|
||||||
@ -42,156 +39,186 @@ jQuery.Callbacks = function( options ) {
|
|||||||
// Convert options from String-formatted to Object-formatted if needed
|
// Convert options from String-formatted to Object-formatted if needed
|
||||||
// (we check in cache first)
|
// (we check in cache first)
|
||||||
options = typeof options === "string" ?
|
options = typeof options === "string" ?
|
||||||
( optionsCache[ options ] || createOptions( options ) ) :
|
createOptions( options ) :
|
||||||
jQuery.extend( {}, options );
|
jQuery.extend( {}, options );
|
||||||
|
|
||||||
var // Last fire value (for non-forgettable lists)
|
var // Flag to know if list is currently firing
|
||||||
|
firing,
|
||||||
|
|
||||||
|
// Last fire value for non-forgettable lists
|
||||||
memory,
|
memory,
|
||||||
|
|
||||||
// Flag to know if list was already fired
|
// Flag to know if list was already fired
|
||||||
fired,
|
fired,
|
||||||
// Flag to know if list is currently firing
|
|
||||||
firing,
|
// Flag to prevent firing
|
||||||
// First callback to fire (used internally by add and fireWith)
|
locked,
|
||||||
firingStart,
|
|
||||||
// End of the loop when firing
|
|
||||||
firingLength,
|
|
||||||
// Index of currently firing callback (modified by remove if needed)
|
|
||||||
firingIndex,
|
|
||||||
// Actual callback list
|
// Actual callback list
|
||||||
list = [],
|
list = [],
|
||||||
// Stack of fire calls for repeatable lists
|
|
||||||
stack = !options.once && [],
|
// Queue of execution data for repeatable lists
|
||||||
|
queue = [],
|
||||||
|
|
||||||
|
// Index of currently firing callback (modified by add/remove as needed)
|
||||||
|
firingIndex = -1,
|
||||||
|
|
||||||
// Fire callbacks
|
// Fire callbacks
|
||||||
fire = function( data ) {
|
fire = function() {
|
||||||
memory = options.memory && data;
|
|
||||||
fired = true;
|
// Enforce single-firing
|
||||||
firingIndex = firingStart || 0;
|
locked = options.once;
|
||||||
firingStart = 0;
|
|
||||||
firingLength = list.length;
|
// Execute callbacks for all pending executions,
|
||||||
firing = true;
|
// respecting firingIndex overrides and runtime changes
|
||||||
for ( ; list && firingIndex < firingLength; firingIndex++ ) {
|
fired = firing = true;
|
||||||
if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
|
for ( ; queue.length; firingIndex = -1 ) {
|
||||||
memory = false; // To prevent further calls using add
|
memory = queue.shift();
|
||||||
break;
|
while ( ++firingIndex < list.length ) {
|
||||||
|
|
||||||
|
// Run callback and check for early termination
|
||||||
|
if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
|
||||||
|
options.stopOnFalse ) {
|
||||||
|
|
||||||
|
// Jump to end and forget the data so .add doesn't re-fire
|
||||||
|
firingIndex = list.length;
|
||||||
|
memory = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Forget the data if we're done with it
|
||||||
|
if ( !options.memory ) {
|
||||||
|
memory = false;
|
||||||
|
}
|
||||||
|
|
||||||
firing = false;
|
firing = false;
|
||||||
if ( list ) {
|
|
||||||
if ( stack ) {
|
// Clean up if we're done firing for good
|
||||||
if ( stack.length ) {
|
if ( locked ) {
|
||||||
fire( stack.shift() );
|
|
||||||
}
|
// Keep an empty list if we have data for future add calls
|
||||||
} else if ( memory ) {
|
if ( memory ) {
|
||||||
list = [];
|
list = [];
|
||||||
|
|
||||||
|
// Otherwise, this object is spent
|
||||||
} else {
|
} else {
|
||||||
self.disable();
|
list = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Actual Callbacks object
|
// Actual Callbacks object
|
||||||
self = {
|
self = {
|
||||||
|
|
||||||
// Add a callback or a collection of callbacks to the list
|
// Add a callback or a collection of callbacks to the list
|
||||||
add: function() {
|
add: function() {
|
||||||
if ( list ) {
|
if ( list ) {
|
||||||
// First, we save the current length
|
|
||||||
var start = list.length;
|
// If we have memory from a past run, we should fire after adding
|
||||||
|
if ( memory && !firing ) {
|
||||||
|
firingIndex = list.length - 1;
|
||||||
|
queue.push( memory );
|
||||||
|
}
|
||||||
|
|
||||||
( function add( args ) {
|
( function add( args ) {
|
||||||
jQuery.each( args, function( _, arg ) {
|
jQuery.each( args, function( _, arg ) {
|
||||||
var type = jQuery.type( arg );
|
if ( jQuery.isFunction( arg ) ) {
|
||||||
if ( type === "function" ) {
|
|
||||||
if ( !options.unique || !self.has( arg ) ) {
|
if ( !options.unique || !self.has( arg ) ) {
|
||||||
list.push( arg );
|
list.push( arg );
|
||||||
}
|
}
|
||||||
} else if ( arg && arg.length && type !== "string" ) {
|
} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
|
||||||
|
|
||||||
// Inspect recursively
|
// Inspect recursively
|
||||||
add( arg );
|
add( arg );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
} )( arguments );
|
} )( arguments );
|
||||||
// Do we need to add the callbacks to the
|
|
||||||
// current firing batch?
|
if ( memory && !firing ) {
|
||||||
if ( firing ) {
|
fire();
|
||||||
firingLength = list.length;
|
|
||||||
// With memory, if we're not firing then
|
|
||||||
// we should call right away
|
|
||||||
} else if ( memory ) {
|
|
||||||
firingStart = start;
|
|
||||||
fire( memory );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Remove a callback from the list
|
// Remove a callback from the list
|
||||||
remove: function() {
|
remove: function() {
|
||||||
if ( list ) {
|
|
||||||
jQuery.each( arguments, function( _, arg ) {
|
jQuery.each( arguments, function( _, arg ) {
|
||||||
var index;
|
var index;
|
||||||
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
||||||
list.splice( index, 1 );
|
list.splice( index, 1 );
|
||||||
|
|
||||||
// Handle firing indexes
|
// Handle firing indexes
|
||||||
if ( firing ) {
|
|
||||||
if ( index <= firingLength ) {
|
|
||||||
firingLength--;
|
|
||||||
}
|
|
||||||
if ( index <= firingIndex ) {
|
if ( index <= firingIndex ) {
|
||||||
firingIndex--;
|
firingIndex--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} );
|
} );
|
||||||
}
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Check if a given callback is in the list.
|
// Check if a given callback is in the list.
|
||||||
// If no argument is given, return whether or not list has callbacks attached.
|
// If no argument is given, return whether or not list has callbacks attached.
|
||||||
has: function( fn ) {
|
has: function( fn ) {
|
||||||
return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
|
return fn ?
|
||||||
|
jQuery.inArray( fn, list ) > -1 :
|
||||||
|
list.length > 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Remove all callbacks from the list
|
// Remove all callbacks from the list
|
||||||
empty: function() {
|
empty: function() {
|
||||||
|
if ( list ) {
|
||||||
list = [];
|
list = [];
|
||||||
firingLength = 0;
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
// Have the list do nothing anymore
|
|
||||||
|
// Disable .fire and .add
|
||||||
|
// Abort any current/pending executions
|
||||||
|
// Clear all callbacks and values
|
||||||
disable: function() {
|
disable: function() {
|
||||||
list = stack = memory = undefined;
|
locked = queue = [];
|
||||||
|
list = memory = "";
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
// Is it disabled?
|
|
||||||
disabled: function() {
|
disabled: function() {
|
||||||
return !list;
|
return !list;
|
||||||
},
|
},
|
||||||
// Lock the list in its current state
|
|
||||||
|
// Disable .fire
|
||||||
|
// Also disable .add unless we have memory (since it would have no effect)
|
||||||
|
// Abort any pending executions
|
||||||
lock: function() {
|
lock: function() {
|
||||||
stack = undefined;
|
locked = queue = [];
|
||||||
if ( !memory ) {
|
if ( !memory ) {
|
||||||
self.disable();
|
list = memory = "";
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
// Is it locked?
|
|
||||||
locked: function() {
|
locked: function() {
|
||||||
return !stack;
|
return !!locked;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Call all callbacks with the given context and arguments
|
// Call all callbacks with the given context and arguments
|
||||||
fireWith: function( context, args ) {
|
fireWith: function( context, args ) {
|
||||||
if ( list && ( !fired || stack ) ) {
|
if ( !locked ) {
|
||||||
args = args || [];
|
args = args || [];
|
||||||
args = [ context, args.slice ? args.slice() : args ];
|
args = [ context, args.slice ? args.slice() : args ];
|
||||||
if ( firing ) {
|
queue.push( args );
|
||||||
stack.push( args );
|
if ( !firing ) {
|
||||||
} else {
|
fire();
|
||||||
fire( args );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Call all the callbacks with the given arguments
|
// Call all the callbacks with the given arguments
|
||||||
fire: function() {
|
fire: function() {
|
||||||
self.fireWith( this, arguments );
|
self.fireWith( this, arguments );
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
// To know if the callbacks have already been called at least once
|
// To know if the callbacks have already been called at least once
|
||||||
fired: function() {
|
fired: function() {
|
||||||
return !!fired;
|
return !!fired;
|
||||||
|
103
dashboard-ui/bower_components/jquery/src/core.js
vendored
103
dashboard-ui/bower_components/jquery/src/core.js
vendored
@ -1,5 +1,6 @@
|
|||||||
define( [
|
define( [
|
||||||
"./var/arr",
|
"./var/arr",
|
||||||
|
"./var/document",
|
||||||
"./var/slice",
|
"./var/slice",
|
||||||
"./var/concat",
|
"./var/concat",
|
||||||
"./var/push",
|
"./var/push",
|
||||||
@ -8,16 +9,14 @@ define([
|
|||||||
"./var/toString",
|
"./var/toString",
|
||||||
"./var/hasOwn",
|
"./var/hasOwn",
|
||||||
"./var/support"
|
"./var/support"
|
||||||
], function( arr, slice, concat, push, indexOf, class2type, toString, hasOwn, support ) {
|
], function( arr, document, slice, concat, push, indexOf, class2type, toString, hasOwn, support ) {
|
||||||
|
|
||||||
var
|
var
|
||||||
// Use the correct document accordingly with window argument (sandbox)
|
|
||||||
document = window.document,
|
|
||||||
|
|
||||||
version = "@VERSION",
|
version = "@VERSION",
|
||||||
|
|
||||||
// Define a local copy of jQuery
|
// Define a local copy of jQuery
|
||||||
jQuery = function( selector, context ) {
|
jQuery = function( selector, context ) {
|
||||||
|
|
||||||
// The jQuery object is actually just the init constructor 'enhanced'
|
// The jQuery object is actually just the init constructor 'enhanced'
|
||||||
// Need init if jQuery is called (just allow error to be thrown if not included)
|
// Need init if jQuery is called (just allow error to be thrown if not included)
|
||||||
return new jQuery.fn.init( selector, context );
|
return new jQuery.fn.init( selector, context );
|
||||||
@ -37,6 +36,7 @@ var
|
|||||||
};
|
};
|
||||||
|
|
||||||
jQuery.fn = jQuery.prototype = {
|
jQuery.fn = jQuery.prototype = {
|
||||||
|
|
||||||
// The current version of jQuery being used
|
// The current version of jQuery being used
|
||||||
jquery: version,
|
jquery: version,
|
||||||
|
|
||||||
@ -80,10 +80,8 @@ jQuery.fn = jQuery.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Execute a callback for every element in the matched set.
|
// Execute a callback for every element in the matched set.
|
||||||
// (You can seed the arguments with an array of args, but this is
|
each: function( callback ) {
|
||||||
// only used internally.)
|
return jQuery.each( this, callback );
|
||||||
each: function( callback, args ) {
|
|
||||||
return jQuery.each( this, callback, args );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
map: function( callback ) {
|
map: function( callback ) {
|
||||||
@ -111,7 +109,7 @@ jQuery.fn = jQuery.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
end: function() {
|
end: function() {
|
||||||
return this.prevObject || this.constructor(null);
|
return this.prevObject || this.constructor();
|
||||||
},
|
},
|
||||||
|
|
||||||
// For internal use only.
|
// For internal use only.
|
||||||
@ -149,8 +147,10 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ( ; i < length; i++ ) {
|
for ( ; i < length; i++ ) {
|
||||||
|
|
||||||
// Only deal with non-null/undefined values
|
// Only deal with non-null/undefined values
|
||||||
if ( ( options = arguments[ i ] ) != null ) {
|
if ( ( options = arguments[ i ] ) != null ) {
|
||||||
|
|
||||||
// Extend the base object
|
// Extend the base object
|
||||||
for ( name in options ) {
|
for ( name in options ) {
|
||||||
src = target[ name ];
|
src = target[ name ];
|
||||||
@ -162,7 +162,9 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recurse if we're merging plain objects or arrays
|
// Recurse if we're merging plain objects or arrays
|
||||||
if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
|
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
||||||
|
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
||||||
|
|
||||||
if ( copyIsArray ) {
|
if ( copyIsArray ) {
|
||||||
copyIsArray = false;
|
copyIsArray = false;
|
||||||
clone = src && jQuery.isArray( src ) ? src : [];
|
clone = src && jQuery.isArray( src ) ? src : [];
|
||||||
@ -187,6 +189,7 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
jQuery.extend( {
|
jQuery.extend( {
|
||||||
|
|
||||||
// Unique for each copy of jQuery on the page
|
// Unique for each copy of jQuery on the page
|
||||||
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
||||||
|
|
||||||
@ -210,14 +213,17 @@ jQuery.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
isNumeric: function( obj ) {
|
isNumeric: function( obj ) {
|
||||||
|
|
||||||
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
|
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
|
||||||
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
||||||
// subtraction forces infinities to NaN
|
// subtraction forces infinities to NaN
|
||||||
// adding 1 corrects loss of precision from parseFloat (#15100)
|
// adding 1 corrects loss of precision from parseFloat (#15100)
|
||||||
return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
|
var realStringObj = obj && obj.toString();
|
||||||
|
return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
isPlainObject: function( obj ) {
|
isPlainObject: function( obj ) {
|
||||||
|
|
||||||
// Not plain objects:
|
// Not plain objects:
|
||||||
// - Any object or value whose internal [[Class]] property is not "[object Object]"
|
// - Any object or value whose internal [[Class]] property is not "[object Object]"
|
||||||
// - DOM nodes
|
// - DOM nodes
|
||||||
@ -248,6 +254,7 @@ jQuery.extend({
|
|||||||
if ( obj == null ) {
|
if ( obj == null ) {
|
||||||
return obj + "";
|
return obj + "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: Android<4.0, iOS<6 (functionish RegExp)
|
// Support: Android<4.0, iOS<6 (functionish RegExp)
|
||||||
return typeof obj === "object" || typeof obj === "function" ?
|
return typeof obj === "object" || typeof obj === "function" ?
|
||||||
class2type[ toString.call( obj ) ] || "object" :
|
class2type[ toString.call( obj ) ] || "object" :
|
||||||
@ -262,6 +269,7 @@ jQuery.extend({
|
|||||||
code = jQuery.trim( code );
|
code = jQuery.trim( code );
|
||||||
|
|
||||||
if ( code ) {
|
if ( code ) {
|
||||||
|
|
||||||
// If the code includes a valid, prologue position
|
// If the code includes a valid, prologue position
|
||||||
// strict mode pragma, execute code by injecting a
|
// strict mode pragma, execute code by injecting a
|
||||||
// script tag into the document.
|
// script tag into the document.
|
||||||
@ -270,8 +278,10 @@ jQuery.extend({
|
|||||||
script.text = code;
|
script.text = code;
|
||||||
document.head.appendChild( script ).parentNode.removeChild( script );
|
document.head.appendChild( script ).parentNode.removeChild( script );
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Otherwise, avoid the DOM node creation, insertion
|
// Otherwise, avoid the DOM node creation, insertion
|
||||||
// and removal by using an indirect global eval
|
// and removal by using an indirect global eval
|
||||||
|
|
||||||
indirect( code );
|
indirect( code );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -288,53 +298,24 @@ jQuery.extend({
|
|||||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||||
},
|
},
|
||||||
|
|
||||||
// args is for internal usage only
|
each: function( obj, callback ) {
|
||||||
each: function( obj, callback, args ) {
|
var length, i = 0;
|
||||||
var value,
|
|
||||||
i = 0,
|
|
||||||
length = obj.length,
|
|
||||||
isArray = isArraylike( obj );
|
|
||||||
|
|
||||||
if ( args ) {
|
if ( isArrayLike( obj ) ) {
|
||||||
if ( isArray ) {
|
length = obj.length;
|
||||||
for ( ; i < length; i++ ) {
|
for ( ; i < length; i++ ) {
|
||||||
value = callback.apply( obj[ i ], args );
|
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
||||||
|
|
||||||
if ( value === false ) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for ( i in obj ) {
|
for ( i in obj ) {
|
||||||
value = callback.apply( obj[ i ], args );
|
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
||||||
|
|
||||||
if ( value === false ) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// A special, fast, case for the most common use of each
|
|
||||||
} else {
|
|
||||||
if ( isArray ) {
|
|
||||||
for ( ; i < length; i++ ) {
|
|
||||||
value = callback.call( obj[ i ], i, obj[ i ] );
|
|
||||||
|
|
||||||
if ( value === false ) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for ( i in obj ) {
|
|
||||||
value = callback.call( obj[ i ], i, obj[ i ] );
|
|
||||||
|
|
||||||
if ( value === false ) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -350,7 +331,7 @@ jQuery.extend({
|
|||||||
var ret = results || [];
|
var ret = results || [];
|
||||||
|
|
||||||
if ( arr != null ) {
|
if ( arr != null ) {
|
||||||
if ( isArraylike( Object(arr) ) ) {
|
if ( isArrayLike( Object( arr ) ) ) {
|
||||||
jQuery.merge( ret,
|
jQuery.merge( ret,
|
||||||
typeof arr === "string" ?
|
typeof arr === "string" ?
|
||||||
[ arr ] : arr
|
[ arr ] : arr
|
||||||
@ -402,14 +383,13 @@ jQuery.extend({
|
|||||||
|
|
||||||
// arg is for internal usage only
|
// arg is for internal usage only
|
||||||
map: function( elems, callback, arg ) {
|
map: function( elems, callback, arg ) {
|
||||||
var value,
|
var length, value,
|
||||||
i = 0,
|
i = 0,
|
||||||
length = elems.length,
|
|
||||||
isArray = isArraylike( elems ),
|
|
||||||
ret = [];
|
ret = [];
|
||||||
|
|
||||||
// Go through the array, translating each of the items to their new values
|
// Go through the array, translating each of the items to their new values
|
||||||
if ( isArray ) {
|
if ( isArrayLike( elems ) ) {
|
||||||
|
length = elems.length;
|
||||||
for ( ; i < length; i++ ) {
|
for ( ; i < length; i++ ) {
|
||||||
value = callback( elems[ i ], i, arg );
|
value = callback( elems[ i ], i, arg );
|
||||||
|
|
||||||
@ -472,28 +452,35 @@ jQuery.extend({
|
|||||||
support: support
|
support: support
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// JSHint would error on this code due to the Symbol not being defined in ES5.
|
||||||
|
// Defining this global in .jshintrc would create a danger of using the global
|
||||||
|
// unguarded in another place, it seems safer to just disable JSHint for these
|
||||||
|
// three lines.
|
||||||
|
/* jshint ignore: start */
|
||||||
|
if ( typeof Symbol === "function" ) {
|
||||||
|
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
||||||
|
}
|
||||||
|
/* jshint ignore: end */
|
||||||
|
|
||||||
// Populate the class2type map
|
// Populate the class2type map
|
||||||
jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
|
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
||||||
|
function( i, name ) {
|
||||||
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
function isArraylike( obj ) {
|
function isArrayLike( obj ) {
|
||||||
|
|
||||||
// Support: iOS 8.2 (not reproducible in simulator)
|
// Support: iOS 8.2 (not reproducible in simulator)
|
||||||
// `in` check used to prevent JIT error (gh-2145)
|
// `in` check used to prevent JIT error (gh-2145)
|
||||||
// hasOwn isn't used here due to false negatives
|
// hasOwn isn't used here due to false negatives
|
||||||
// regarding Nodelist length in IE
|
// regarding Nodelist length in IE
|
||||||
var length = "length" in obj && obj.length,
|
var length = !!obj && "length" in obj && obj.length,
|
||||||
type = jQuery.type( obj );
|
type = jQuery.type( obj );
|
||||||
|
|
||||||
if ( type === "function" || jQuery.isWindow( obj ) ) {
|
if ( type === "function" || jQuery.isWindow( obj ) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( obj.nodeType === 1 && length ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return type === "array" || length === 0 ||
|
return type === "array" || length === 0 ||
|
||||||
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ define([
|
|||||||
|
|
||||||
// Multifunctional method to get and set values of a collection
|
// Multifunctional method to get and set values of a collection
|
||||||
// The value/s can optionally be executed if it's a function
|
// The value/s can optionally be executed if it's a function
|
||||||
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
||||||
var i = 0,
|
var i = 0,
|
||||||
len = elems.length,
|
len = elems.length,
|
||||||
bulk = key == null;
|
bulk = key == null;
|
||||||
@ -13,7 +13,7 @@ var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGe
|
|||||||
if ( jQuery.type( key ) === "object" ) {
|
if ( jQuery.type( key ) === "object" ) {
|
||||||
chainable = true;
|
chainable = true;
|
||||||
for ( i in key ) {
|
for ( i in key ) {
|
||||||
jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
|
access( elems, fn, i, key[ i ], true, emptyGet, raw );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets one value
|
// Sets one value
|
||||||
@ -25,6 +25,7 @@ var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGe
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( bulk ) {
|
if ( bulk ) {
|
||||||
|
|
||||||
// Bulk operations run against the entire set
|
// Bulk operations run against the entire set
|
||||||
if ( raw ) {
|
if ( raw ) {
|
||||||
fn.call( elems, value );
|
fn.call( elems, value );
|
||||||
@ -41,7 +42,11 @@ var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGe
|
|||||||
|
|
||||||
if ( fn ) {
|
if ( fn ) {
|
||||||
for ( ; i < len; i++ ) {
|
for ( ; i < len; i++ ) {
|
||||||
fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
|
fn(
|
||||||
|
elems[ i ], key, raw ?
|
||||||
|
value :
|
||||||
|
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
// Initialize a jQuery object
|
// Initialize a jQuery object
|
||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
|
"../var/document",
|
||||||
"./var/rsingleTag",
|
"./var/rsingleTag",
|
||||||
"../traversing/findFilter"
|
"../traversing/findFilter"
|
||||||
], function( jQuery, rsingleTag ) {
|
], function( jQuery, document, rsingleTag ) {
|
||||||
|
|
||||||
// A central reference to the root jQuery(document)
|
// A central reference to the root jQuery(document)
|
||||||
var rootjQuery,
|
var rootjQuery,
|
||||||
@ -13,7 +14,7 @@ var rootjQuery,
|
|||||||
// Strict HTML recognition (#11290: must start with <)
|
// Strict HTML recognition (#11290: must start with <)
|
||||||
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
|
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
|
||||||
|
|
||||||
init = jQuery.fn.init = function( selector, context ) {
|
init = jQuery.fn.init = function( selector, context, root ) {
|
||||||
var match, elem;
|
var match, elem;
|
||||||
|
|
||||||
// HANDLE: $(""), $(null), $(undefined), $(false)
|
// HANDLE: $(""), $(null), $(undefined), $(false)
|
||||||
@ -21,9 +22,16 @@ var rootjQuery,
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Method init() accepts an alternate rootjQuery
|
||||||
|
// so migrate can support jQuery.sub (gh-2101)
|
||||||
|
root = root || rootjQuery;
|
||||||
|
|
||||||
// Handle HTML strings
|
// Handle HTML strings
|
||||||
if ( typeof selector === "string" ) {
|
if ( typeof selector === "string" ) {
|
||||||
if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
|
if ( selector[ 0 ] === "<" &&
|
||||||
|
selector[ selector.length - 1 ] === ">" &&
|
||||||
|
selector.length >= 3 ) {
|
||||||
|
|
||||||
// Assume that strings that start and end with <> are HTML and skip the regex check
|
// Assume that strings that start and end with <> are HTML and skip the regex check
|
||||||
match = [ null, selector, null ];
|
match = [ null, selector, null ];
|
||||||
|
|
||||||
@ -49,6 +57,7 @@ var rootjQuery,
|
|||||||
// HANDLE: $(html, props)
|
// HANDLE: $(html, props)
|
||||||
if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
|
if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
|
||||||
for ( match in context ) {
|
for ( match in context ) {
|
||||||
|
|
||||||
// Properties of context are called as methods if possible
|
// Properties of context are called as methods if possible
|
||||||
if ( jQuery.isFunction( this[ match ] ) ) {
|
if ( jQuery.isFunction( this[ match ] ) ) {
|
||||||
this[ match ]( context[ match ] );
|
this[ match ]( context[ match ] );
|
||||||
@ -69,6 +78,7 @@ var rootjQuery,
|
|||||||
// Support: Blackberry 4.6
|
// Support: Blackberry 4.6
|
||||||
// gEBID returns nodes no longer in the document (#6963)
|
// gEBID returns nodes no longer in the document (#6963)
|
||||||
if ( elem && elem.parentNode ) {
|
if ( elem && elem.parentNode ) {
|
||||||
|
|
||||||
// Inject the element directly into the jQuery object
|
// Inject the element directly into the jQuery object
|
||||||
this.length = 1;
|
this.length = 1;
|
||||||
this[ 0 ] = elem;
|
this[ 0 ] = elem;
|
||||||
@ -81,7 +91,7 @@ var rootjQuery,
|
|||||||
|
|
||||||
// HANDLE: $(expr, $(...))
|
// HANDLE: $(expr, $(...))
|
||||||
} else if ( !context || context.jquery ) {
|
} else if ( !context || context.jquery ) {
|
||||||
return ( context || rootjQuery ).find( selector );
|
return ( context || root ).find( selector );
|
||||||
|
|
||||||
// HANDLE: $(expr, context)
|
// HANDLE: $(expr, context)
|
||||||
// (which is just equivalent to: $(context).find(expr)
|
// (which is just equivalent to: $(context).find(expr)
|
||||||
@ -98,8 +108,9 @@ var rootjQuery,
|
|||||||
// HANDLE: $(function)
|
// HANDLE: $(function)
|
||||||
// Shortcut for document ready
|
// Shortcut for document ready
|
||||||
} else if ( jQuery.isFunction( selector ) ) {
|
} else if ( jQuery.isFunction( selector ) ) {
|
||||||
return typeof rootjQuery.ready !== "undefined" ?
|
return root.ready !== undefined ?
|
||||||
rootjQuery.ready( selector ) :
|
root.ready( selector ) :
|
||||||
|
|
||||||
// Execute immediately if ready is not present
|
// Execute immediately if ready is not present
|
||||||
selector( jQuery );
|
selector( jQuery );
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
|
"../var/document",
|
||||||
"./var/rsingleTag",
|
"./var/rsingleTag",
|
||||||
"../manipulation" // buildFragment
|
"../manipulation/buildFragment",
|
||||||
], function( jQuery, rsingleTag ) {
|
|
||||||
|
|
||||||
// data: string of html
|
// This is the only module that needs core/support
|
||||||
// context (optional): If specified, the fragment will be created in this context, defaults to document
|
"./support"
|
||||||
|
], function( jQuery, document, rsingleTag, buildFragment, support ) {
|
||||||
|
|
||||||
|
// Argument "data" should be string of html
|
||||||
|
// context (optional): If specified, the fragment will be created in this context,
|
||||||
|
// defaults to document
|
||||||
// keepScripts (optional): If true, will include scripts passed in the html string
|
// keepScripts (optional): If true, will include scripts passed in the html string
|
||||||
jQuery.parseHTML = function( data, context, keepScripts ) {
|
jQuery.parseHTML = function( data, context, keepScripts ) {
|
||||||
if ( !data || typeof data !== "string" ) {
|
if ( !data || typeof data !== "string" ) {
|
||||||
@ -15,7 +20,12 @@ jQuery.parseHTML = function( data, context, keepScripts ) {
|
|||||||
keepScripts = context;
|
keepScripts = context;
|
||||||
context = false;
|
context = false;
|
||||||
}
|
}
|
||||||
context = context || document;
|
|
||||||
|
// Stop scripts or inline event handlers from being executed immediately
|
||||||
|
// by using document.implementation
|
||||||
|
context = context || ( support.createHTMLDocument ?
|
||||||
|
document.implementation.createHTMLDocument( "" ) :
|
||||||
|
document );
|
||||||
|
|
||||||
var parsed = rsingleTag.exec( data ),
|
var parsed = rsingleTag.exec( data ),
|
||||||
scripts = !keepScripts && [];
|
scripts = !keepScripts && [];
|
||||||
@ -25,7 +35,7 @@ jQuery.parseHTML = function( data, context, keepScripts ) {
|
|||||||
return [ context.createElement( parsed[ 1 ] ) ];
|
return [ context.createElement( parsed[ 1 ] ) ];
|
||||||
}
|
}
|
||||||
|
|
||||||
parsed = jQuery.buildFragment( [ data ], context, scripts );
|
parsed = buildFragment( [ data ], context, scripts );
|
||||||
|
|
||||||
if ( scripts && scripts.length ) {
|
if ( scripts && scripts.length ) {
|
||||||
jQuery( scripts ).remove();
|
jQuery( scripts ).remove();
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
|
"../var/document",
|
||||||
"../core/init",
|
"../core/init",
|
||||||
"../deferred"
|
"../deferred"
|
||||||
], function( jQuery ) {
|
], function( jQuery, document ) {
|
||||||
|
|
||||||
// The deferred used on DOM ready
|
// The deferred used on DOM ready
|
||||||
var readyList;
|
var readyList;
|
||||||
|
|
||||||
jQuery.fn.ready = function( fn ) {
|
jQuery.fn.ready = function( fn ) {
|
||||||
|
|
||||||
// Add the callback
|
// Add the callback
|
||||||
jQuery.ready.promise().done( fn );
|
jQuery.ready.promise().done( fn );
|
||||||
|
|
||||||
@ -15,6 +17,7 @@ jQuery.fn.ready = function( fn ) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
jQuery.extend( {
|
jQuery.extend( {
|
||||||
|
|
||||||
// Is the DOM ready to be used? Set to true once it occurs.
|
// Is the DOM ready to be used? Set to true once it occurs.
|
||||||
isReady: false,
|
isReady: false,
|
||||||
|
|
||||||
@ -62,8 +65,8 @@ jQuery.extend({
|
|||||||
* The ready event handler and self cleanup method
|
* The ready event handler and self cleanup method
|
||||||
*/
|
*/
|
||||||
function completed() {
|
function completed() {
|
||||||
document.removeEventListener( "DOMContentLoaded", completed, false );
|
document.removeEventListener( "DOMContentLoaded", completed );
|
||||||
window.removeEventListener( "load", completed, false );
|
window.removeEventListener( "load", completed );
|
||||||
jQuery.ready();
|
jQuery.ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,20 +75,23 @@ jQuery.ready.promise = function( obj ) {
|
|||||||
|
|
||||||
readyList = jQuery.Deferred();
|
readyList = jQuery.Deferred();
|
||||||
|
|
||||||
// Catch cases where $(document).ready() is called after the browser event has already occurred.
|
// Catch cases where $(document).ready() is called
|
||||||
// We once tried to use readyState "interactive" here, but it caused issues like the one
|
// after the browser event has already occurred.
|
||||||
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
|
// Support: IE9-10 only
|
||||||
if ( document.readyState === "complete" ) {
|
// Older IE sometimes signals "interactive" too soon
|
||||||
|
if ( document.readyState === "complete" ||
|
||||||
|
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
||||||
|
|
||||||
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
||||||
setTimeout( jQuery.ready );
|
window.setTimeout( jQuery.ready );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Use the handy event callback
|
// Use the handy event callback
|
||||||
document.addEventListener( "DOMContentLoaded", completed, false );
|
document.addEventListener( "DOMContentLoaded", completed );
|
||||||
|
|
||||||
// A fallback to window.onload, that will always work
|
// A fallback to window.onload, that will always work
|
||||||
window.addEventListener( "load", completed, false );
|
window.addEventListener( "load", completed );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return readyList.promise( obj );
|
return readyList.promise( obj );
|
||||||
|
18
dashboard-ui/bower_components/jquery/src/core/support.js
vendored
Normal file
18
dashboard-ui/bower_components/jquery/src/core/support.js
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
define( [
|
||||||
|
"../var/document",
|
||||||
|
"../var/support"
|
||||||
|
], function( document, support ) {
|
||||||
|
|
||||||
|
// Support: Safari 8+
|
||||||
|
// In Safari 8 documents created via document.implementation.createHTMLDocument
|
||||||
|
// collapse sibling forms: the second one becomes a child of the first one.
|
||||||
|
// Because of that, this security measure has to be disabled in Safari 8.
|
||||||
|
// https://bugs.webkit.org/show_bug.cgi?id=137337
|
||||||
|
support.createHTMLDocument = ( function() {
|
||||||
|
var body = document.implementation.createHTMLDocument( "" ).body;
|
||||||
|
body.innerHTML = "<form></form><form></form>";
|
||||||
|
return body.childNodes.length === 2;
|
||||||
|
} )();
|
||||||
|
|
||||||
|
return support;
|
||||||
|
} );
|
137
dashboard-ui/bower_components/jquery/src/css.js
vendored
137
dashboard-ui/bower_components/jquery/src/css.js
vendored
@ -3,29 +3,32 @@ define([
|
|||||||
"./var/pnum",
|
"./var/pnum",
|
||||||
"./core/access",
|
"./core/access",
|
||||||
"./css/var/rmargin",
|
"./css/var/rmargin",
|
||||||
|
"./var/document",
|
||||||
|
"./var/rcssNum",
|
||||||
"./css/var/rnumnonpx",
|
"./css/var/rnumnonpx",
|
||||||
"./css/var/cssExpand",
|
"./css/var/cssExpand",
|
||||||
"./css/var/isHidden",
|
"./css/var/isHidden",
|
||||||
"./css/var/getStyles",
|
"./css/var/getStyles",
|
||||||
|
"./css/var/swap",
|
||||||
"./css/curCSS",
|
"./css/curCSS",
|
||||||
|
"./css/adjustCSS",
|
||||||
"./css/defaultDisplay",
|
"./css/defaultDisplay",
|
||||||
"./css/addGetHookIf",
|
"./css/addGetHookIf",
|
||||||
"./css/support",
|
"./css/support",
|
||||||
"./data/var/data_priv",
|
"./data/var/dataPriv",
|
||||||
|
|
||||||
"./core/init",
|
"./core/init",
|
||||||
"./css/swap",
|
|
||||||
"./core/ready",
|
"./core/ready",
|
||||||
"./selector" // contains
|
"./selector" // contains
|
||||||
], function( jQuery, pnum, access, rmargin, rnumnonpx, cssExpand, isHidden,
|
], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand, isHidden,
|
||||||
getStyles, curCSS, defaultDisplay, addGetHookIf, support, data_priv ) {
|
getStyles, swap, curCSS, adjustCSS, defaultDisplay, addGetHookIf, support, dataPriv ) {
|
||||||
|
|
||||||
var
|
var
|
||||||
// Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
|
|
||||||
|
// Swappable if display is none or starts with table
|
||||||
|
// except "table", "table-cell", or "table-caption"
|
||||||
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
||||||
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
||||||
rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
|
|
||||||
rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
|
|
||||||
|
|
||||||
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
||||||
cssNormalTransform = {
|
cssNormalTransform = {
|
||||||
@ -33,55 +36,61 @@ var
|
|||||||
fontWeight: "400"
|
fontWeight: "400"
|
||||||
},
|
},
|
||||||
|
|
||||||
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
|
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
|
||||||
|
emptyStyle = document.createElement( "div" ).style;
|
||||||
|
|
||||||
// Return a css property mapped to a potentially vendor prefixed property
|
// Return a css property mapped to a potentially vendor prefixed property
|
||||||
function vendorPropName( style, name ) {
|
function vendorPropName( name ) {
|
||||||
|
|
||||||
// Shortcut for names that are not vendor prefixed
|
// Shortcut for names that are not vendor prefixed
|
||||||
if ( name in style ) {
|
if ( name in emptyStyle ) {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for vendor prefixed names
|
// Check for vendor prefixed names
|
||||||
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
||||||
origName = name,
|
|
||||||
i = cssPrefixes.length;
|
i = cssPrefixes.length;
|
||||||
|
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
name = cssPrefixes[ i ] + capName;
|
name = cssPrefixes[ i ] + capName;
|
||||||
if ( name in style ) {
|
if ( name in emptyStyle ) {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return origName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPositiveNumber( elem, value, subtract ) {
|
function setPositiveNumber( elem, value, subtract ) {
|
||||||
var matches = rnumsplit.exec( value );
|
|
||||||
|
// Any relative (+/-) values have already been
|
||||||
|
// normalized at this point
|
||||||
|
var matches = rcssNum.exec( value );
|
||||||
return matches ?
|
return matches ?
|
||||||
|
|
||||||
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
||||||
Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
|
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
||||||
value;
|
value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
||||||
var i = extra === ( isBorderBox ? "border" : "content" ) ?
|
var i = extra === ( isBorderBox ? "border" : "content" ) ?
|
||||||
|
|
||||||
// If we already have the right measurement, avoid augmentation
|
// If we already have the right measurement, avoid augmentation
|
||||||
4 :
|
4 :
|
||||||
|
|
||||||
// Otherwise initialize for horizontal or vertical properties
|
// Otherwise initialize for horizontal or vertical properties
|
||||||
name === "width" ? 1 : 0,
|
name === "width" ? 1 : 0,
|
||||||
|
|
||||||
val = 0;
|
val = 0;
|
||||||
|
|
||||||
for ( ; i < 4; i += 2 ) {
|
for ( ; i < 4; i += 2 ) {
|
||||||
|
|
||||||
// Both box models exclude margin, so add it if we want it
|
// Both box models exclude margin, so add it if we want it
|
||||||
if ( extra === "margin" ) {
|
if ( extra === "margin" ) {
|
||||||
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
|
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isBorderBox ) {
|
if ( isBorderBox ) {
|
||||||
|
|
||||||
// border-box includes padding, so remove it if we want content
|
// border-box includes padding, so remove it if we want content
|
||||||
if ( extra === "content" ) {
|
if ( extra === "content" ) {
|
||||||
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
||||||
@ -92,6 +101,7 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
|||||||
val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// At this point, extra isn't content, so add padding
|
// At this point, extra isn't content, so add padding
|
||||||
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
||||||
|
|
||||||
@ -113,10 +123,24 @@ function getWidthOrHeight( elem, name, extra ) {
|
|||||||
styles = getStyles( elem ),
|
styles = getStyles( elem ),
|
||||||
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||||
|
|
||||||
|
// Support: IE11 only
|
||||||
|
// In IE 11 fullscreen elements inside of an iframe have
|
||||||
|
// 100x too small dimensions (gh-1764).
|
||||||
|
if ( document.msFullscreenElement && window.top !== window ) {
|
||||||
|
|
||||||
|
// Support: IE11 only
|
||||||
|
// Running getBoundingClientRect on a disconnected node
|
||||||
|
// in IE throws an error.
|
||||||
|
if ( elem.getClientRects().length ) {
|
||||||
|
val = Math.round( elem.getBoundingClientRect()[ name ] * 100 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
||||||
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
||||||
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
||||||
if ( val <= 0 || val == null ) {
|
if ( val <= 0 || val == null ) {
|
||||||
|
|
||||||
// Fall back to computed then uncomputed css if necessary
|
// Fall back to computed then uncomputed css if necessary
|
||||||
val = curCSS( elem, name, styles );
|
val = curCSS( elem, name, styles );
|
||||||
if ( val < 0 || val == null ) {
|
if ( val < 0 || val == null ) {
|
||||||
@ -161,9 +185,10 @@ function showHide( elements, show ) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
values[ index ] = data_priv.get( elem, "olddisplay" );
|
values[ index ] = dataPriv.get( elem, "olddisplay" );
|
||||||
display = elem.style.display;
|
display = elem.style.display;
|
||||||
if ( show ) {
|
if ( show ) {
|
||||||
|
|
||||||
// Reset the inline display of this element to learn if it is
|
// Reset the inline display of this element to learn if it is
|
||||||
// being hidden by cascaded rules or not
|
// being hidden by cascaded rules or not
|
||||||
if ( !values[ index ] && display === "none" ) {
|
if ( !values[ index ] && display === "none" ) {
|
||||||
@ -174,13 +199,21 @@ function showHide( elements, show ) {
|
|||||||
// in a stylesheet to whatever the default browser style is
|
// in a stylesheet to whatever the default browser style is
|
||||||
// for such an element
|
// for such an element
|
||||||
if ( elem.style.display === "" && isHidden( elem ) ) {
|
if ( elem.style.display === "" && isHidden( elem ) ) {
|
||||||
values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
|
values[ index ] = dataPriv.access(
|
||||||
|
elem,
|
||||||
|
"olddisplay",
|
||||||
|
defaultDisplay( elem.nodeName )
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hidden = isHidden( elem );
|
hidden = isHidden( elem );
|
||||||
|
|
||||||
if ( display !== "none" || !hidden ) {
|
if ( display !== "none" || !hidden ) {
|
||||||
data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
|
dataPriv.set(
|
||||||
|
elem,
|
||||||
|
"olddisplay",
|
||||||
|
hidden ? display : jQuery.css( elem, "display" )
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,6 +252,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
// Don't automatically add "px" to these possibly-unitless properties
|
// Don't automatically add "px" to these possibly-unitless properties
|
||||||
cssNumber: {
|
cssNumber: {
|
||||||
|
"animationIterationCount": true,
|
||||||
"columnCount": true,
|
"columnCount": true,
|
||||||
"fillOpacity": true,
|
"fillOpacity": true,
|
||||||
"flexGrow": true,
|
"flexGrow": true,
|
||||||
@ -252,7 +286,8 @@ jQuery.extend({
|
|||||||
origName = jQuery.camelCase( name ),
|
origName = jQuery.camelCase( name ),
|
||||||
style = elem.style;
|
style = elem.style;
|
||||||
|
|
||||||
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
|
name = jQuery.cssProps[ origName ] ||
|
||||||
|
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||||
|
|
||||||
// Gets hook for the prefixed version, then unprefixed version
|
// Gets hook for the prefixed version, then unprefixed version
|
||||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||||
@ -262,8 +297,9 @@ jQuery.extend({
|
|||||||
type = typeof value;
|
type = typeof value;
|
||||||
|
|
||||||
// Convert "+=" or "-=" to relative numbers (#7345)
|
// Convert "+=" or "-=" to relative numbers (#7345)
|
||||||
if ( type === "string" && (ret = rrelNum.exec( value )) ) {
|
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
||||||
value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
|
value = adjustCSS( elem, name, ret );
|
||||||
|
|
||||||
// Fixes bug #9237
|
// Fixes bug #9237
|
||||||
type = "number";
|
type = "number";
|
||||||
}
|
}
|
||||||
@ -273,9 +309,9 @@ jQuery.extend({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a number, add 'px' to the (except for certain CSS properties)
|
// If a number was passed in, add the unit (except for certain CSS properties)
|
||||||
if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
|
if ( type === "number" ) {
|
||||||
value += "px";
|
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: IE9-11+
|
// Support: IE9-11+
|
||||||
@ -285,13 +321,18 @@ jQuery.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If a hook was provided, use that value, otherwise just set the specified value
|
// If a hook was provided, use that value, otherwise just set the specified value
|
||||||
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
|
if ( !hooks || !( "set" in hooks ) ||
|
||||||
|
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
||||||
|
|
||||||
style[ name ] = value;
|
style[ name ] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// If a hook was provided get the non-computed value from there
|
// If a hook was provided get the non-computed value from there
|
||||||
if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
|
if ( hooks && "get" in hooks &&
|
||||||
|
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,7 +346,8 @@ jQuery.extend({
|
|||||||
origName = jQuery.camelCase( name );
|
origName = jQuery.camelCase( name );
|
||||||
|
|
||||||
// Make sure that we're working with the right name
|
// Make sure that we're working with the right name
|
||||||
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
|
name = jQuery.cssProps[ origName ] ||
|
||||||
|
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||||
|
|
||||||
// Try prefixed name followed by the unprefixed name
|
// Try prefixed name followed by the unprefixed name
|
||||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||||
@ -328,7 +370,7 @@ jQuery.extend({
|
|||||||
// Make numeric if forced or a qualifier was provided and val looks numeric
|
// Make numeric if forced or a qualifier was provided and val looks numeric
|
||||||
if ( extra === "" || extra ) {
|
if ( extra === "" || extra ) {
|
||||||
num = parseFloat( val );
|
num = parseFloat( val );
|
||||||
return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
|
return extra === true || isFinite( num ) ? num || 0 : val;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@ -341,8 +383,9 @@ jQuery.each([ "height", "width" ], function( i, name ) {
|
|||||||
|
|
||||||
// Certain elements can have dimension info if we invisibly show them
|
// Certain elements can have dimension info if we invisibly show them
|
||||||
// but it must have a current display style that would benefit
|
// but it must have a current display style that would benefit
|
||||||
return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
|
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
||||||
jQuery.swap( elem, cssShow, function() {
|
elem.offsetWidth === 0 ?
|
||||||
|
swap( elem, cssShow, function() {
|
||||||
return getWidthOrHeight( elem, name, extra );
|
return getWidthOrHeight( elem, name, extra );
|
||||||
} ) :
|
} ) :
|
||||||
getWidthOrHeight( elem, name, extra );
|
getWidthOrHeight( elem, name, extra );
|
||||||
@ -350,25 +393,47 @@ jQuery.each([ "height", "width" ], function( i, name ) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set: function( elem, value, extra ) {
|
set: function( elem, value, extra ) {
|
||||||
var styles = extra && getStyles( elem );
|
var matches,
|
||||||
return setPositiveNumber( elem, value, extra ?
|
styles = extra && getStyles( elem ),
|
||||||
augmentWidthOrHeight(
|
subtract = extra && augmentWidthOrHeight(
|
||||||
elem,
|
elem,
|
||||||
name,
|
name,
|
||||||
extra,
|
extra,
|
||||||
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
||||||
styles
|
styles
|
||||||
) : 0
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Convert to pixels if value adjustment is needed
|
||||||
|
if ( subtract && ( matches = rcssNum.exec( value ) ) &&
|
||||||
|
( matches[ 3 ] || "px" ) !== "px" ) {
|
||||||
|
|
||||||
|
elem.style[ name ] = value;
|
||||||
|
value = jQuery.css( elem, name );
|
||||||
|
}
|
||||||
|
|
||||||
|
return setPositiveNumber( elem, value, subtract );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
||||||
|
function( elem, computed ) {
|
||||||
|
if ( computed ) {
|
||||||
|
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
||||||
|
elem.getBoundingClientRect().left -
|
||||||
|
swap( elem, { marginLeft: 0 }, function() {
|
||||||
|
return elem.getBoundingClientRect().left;
|
||||||
|
} )
|
||||||
|
) + "px";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// Support: Android 2.3
|
// Support: Android 2.3
|
||||||
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
|
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
|
||||||
function( elem, computed ) {
|
function( elem, computed ) {
|
||||||
if ( computed ) {
|
if ( computed ) {
|
||||||
return jQuery.swap( elem, { "display": "inline-block" },
|
return swap( elem, { "display": "inline-block" },
|
||||||
curCSS, [ elem, "marginRight" ] );
|
curCSS, [ elem, "marginRight" ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
define( function() {
|
define( function() {
|
||||||
|
|
||||||
function addGetHookIf( conditionFn, hookFn ) {
|
function addGetHookIf( conditionFn, hookFn ) {
|
||||||
|
|
||||||
// Define the hook, we'll check on the first run if it's really needed.
|
// Define the hook, we'll check on the first run if it's really needed.
|
||||||
return {
|
return {
|
||||||
get: function() {
|
get: function() {
|
||||||
if ( conditionFn() ) {
|
if ( conditionFn() ) {
|
||||||
|
|
||||||
// Hook not needed (or it's not possible to use it due
|
// Hook not needed (or it's not possible to use it due
|
||||||
// to missing dependency), remove it.
|
// to missing dependency), remove it.
|
||||||
delete this.get;
|
delete this.get;
|
||||||
|
65
dashboard-ui/bower_components/jquery/src/css/adjustCSS.js
vendored
Normal file
65
dashboard-ui/bower_components/jquery/src/css/adjustCSS.js
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
define( [
|
||||||
|
"../core",
|
||||||
|
"../var/rcssNum"
|
||||||
|
], function( jQuery, rcssNum ) {
|
||||||
|
|
||||||
|
function adjustCSS( elem, prop, valueParts, tween ) {
|
||||||
|
var adjusted,
|
||||||
|
scale = 1,
|
||||||
|
maxIterations = 20,
|
||||||
|
currentValue = tween ?
|
||||||
|
function() { return tween.cur(); } :
|
||||||
|
function() { return jQuery.css( elem, prop, "" ); },
|
||||||
|
initial = currentValue(),
|
||||||
|
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
||||||
|
|
||||||
|
// Starting value computation is required for potential unit mismatches
|
||||||
|
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
||||||
|
rcssNum.exec( jQuery.css( elem, prop ) );
|
||||||
|
|
||||||
|
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
|
||||||
|
|
||||||
|
// Trust units reported by jQuery.css
|
||||||
|
unit = unit || initialInUnit[ 3 ];
|
||||||
|
|
||||||
|
// Make sure we update the tween properties later on
|
||||||
|
valueParts = valueParts || [];
|
||||||
|
|
||||||
|
// Iteratively approximate from a nonzero starting point
|
||||||
|
initialInUnit = +initial || 1;
|
||||||
|
|
||||||
|
do {
|
||||||
|
|
||||||
|
// If previous iteration zeroed out, double until we get *something*.
|
||||||
|
// Use string for doubling so we don't accidentally see scale as unchanged below
|
||||||
|
scale = scale || ".5";
|
||||||
|
|
||||||
|
// Adjust and apply
|
||||||
|
initialInUnit = initialInUnit / scale;
|
||||||
|
jQuery.style( elem, prop, initialInUnit + unit );
|
||||||
|
|
||||||
|
// Update scale, tolerating zero or NaN from tween.cur()
|
||||||
|
// Break the loop if scale is unchanged or perfect, or if we've just had enough.
|
||||||
|
} while (
|
||||||
|
scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( valueParts ) {
|
||||||
|
initialInUnit = +initialInUnit || +initial || 0;
|
||||||
|
|
||||||
|
// Apply relative offset (+=/-=) if specified
|
||||||
|
adjusted = valueParts[ 1 ] ?
|
||||||
|
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
|
||||||
|
+valueParts[ 2 ];
|
||||||
|
if ( tween ) {
|
||||||
|
tween.unit = unit;
|
||||||
|
tween.start = initialInUnit;
|
||||||
|
tween.end = adjusted;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return adjusted;
|
||||||
|
}
|
||||||
|
|
||||||
|
return adjustCSS;
|
||||||
|
} );
|
@ -3,8 +3,9 @@ define([
|
|||||||
"./var/rnumnonpx",
|
"./var/rnumnonpx",
|
||||||
"./var/rmargin",
|
"./var/rmargin",
|
||||||
"./var/getStyles",
|
"./var/getStyles",
|
||||||
"../selector" // contains
|
"./support",
|
||||||
], function( jQuery, rnumnonpx, rmargin, getStyles ) {
|
"../selector" // Get jQuery.contains
|
||||||
|
], function( jQuery, rnumnonpx, rmargin, getStyles, support ) {
|
||||||
|
|
||||||
function curCSS( elem, name, computed ) {
|
function curCSS( elem, name, computed ) {
|
||||||
var width, minWidth, maxWidth, ret,
|
var width, minWidth, maxWidth, ret,
|
||||||
@ -16,19 +17,17 @@ function curCSS( elem, name, computed ) {
|
|||||||
// getPropertyValue is only needed for .css('filter') (#12537)
|
// getPropertyValue is only needed for .css('filter') (#12537)
|
||||||
if ( computed ) {
|
if ( computed ) {
|
||||||
ret = computed.getPropertyValue( name ) || computed[ name ];
|
ret = computed.getPropertyValue( name ) || computed[ name ];
|
||||||
}
|
|
||||||
|
|
||||||
if ( computed ) {
|
|
||||||
|
|
||||||
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
||||||
ret = jQuery.style( elem, name );
|
ret = jQuery.style( elem, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: iOS < 6
|
|
||||||
// A tribute to the "awesome hack by Dean Edwards"
|
// A tribute to the "awesome hack by Dean Edwards"
|
||||||
// iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
|
// Android Browser returns percentage for some values,
|
||||||
// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
|
// but width seems to be reliably pixels.
|
||||||
if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
// This is against the CSSOM draft spec:
|
||||||
|
// http://dev.w3.org/csswg/cssom/#resolved-values
|
||||||
|
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
||||||
|
|
||||||
// Remember the original values
|
// Remember the original values
|
||||||
width = style.width;
|
width = style.width;
|
||||||
@ -47,7 +46,8 @@ function curCSS( elem, name, computed ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ret !== undefined ?
|
return ret !== undefined ?
|
||||||
// Support: IE
|
|
||||||
|
// Support: IE9-11+
|
||||||
// IE returns zIndex value as an integer.
|
// IE returns zIndex value as an integer.
|
||||||
ret + "" :
|
ret + "" :
|
||||||
ret;
|
ret;
|
||||||
|
@ -1,27 +1,29 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
|
"../var/document",
|
||||||
"../manipulation" // appendTo
|
"../manipulation" // appendTo
|
||||||
], function( jQuery ) {
|
], function( jQuery, document ) {
|
||||||
|
|
||||||
var iframe,
|
var iframe,
|
||||||
elemdisplay = {};
|
elemdisplay = {
|
||||||
|
|
||||||
|
// Support: Firefox
|
||||||
|
// We have to pre-define these values for FF (#10227)
|
||||||
|
HTML: "block",
|
||||||
|
BODY: "block"
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the actual display of a element
|
* Retrieve the actual display of a element
|
||||||
* @param {String} name nodeName of the element
|
* @param {String} name nodeName of the element
|
||||||
* @param {Object} doc Document object
|
* @param {Object} doc Document object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Called only from within defaultDisplay
|
// Called only from within defaultDisplay
|
||||||
function actualDisplay( name, doc ) {
|
function actualDisplay( name, doc ) {
|
||||||
var style,
|
var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
|
||||||
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
|
|
||||||
|
|
||||||
// getDefaultComputedStyle might be reliably used only on attached element
|
display = jQuery.css( elem[ 0 ], "display" );
|
||||||
display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
|
|
||||||
|
|
||||||
// Use of this method is a temporary fix (more like optimization) until something better comes along,
|
|
||||||
// since it was removed from specification and supported only in FF
|
|
||||||
style.display : jQuery.css( elem[ 0 ], "display" );
|
|
||||||
|
|
||||||
// We don't have any data stored on the element,
|
// We don't have any data stored on the element,
|
||||||
// so use "detach" method as fast way to get rid of the element
|
// so use "detach" method as fast way to get rid of the element
|
||||||
@ -45,7 +47,8 @@ function defaultDisplay( nodeName ) {
|
|||||||
if ( display === "none" || !display ) {
|
if ( display === "none" || !display ) {
|
||||||
|
|
||||||
// Use the already-created iframe if possible
|
// Use the already-created iframe if possible
|
||||||
iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
|
iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
|
||||||
|
.appendTo( doc.documentElement );
|
||||||
|
|
||||||
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
|
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
|
||||||
doc = iframe[ 0 ].contentDocument;
|
doc = iframe[ 0 ].contentDocument;
|
||||||
@ -66,5 +69,4 @@ function defaultDisplay( nodeName ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return defaultDisplay;
|
return defaultDisplay;
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
@ -4,12 +4,15 @@ define([
|
|||||||
], function( jQuery ) {
|
], function( jQuery ) {
|
||||||
|
|
||||||
jQuery.expr.filters.hidden = function( elem ) {
|
jQuery.expr.filters.hidden = function( elem ) {
|
||||||
// Support: Opera <= 12.12
|
return !jQuery.expr.filters.visible( elem );
|
||||||
// Opera reports offsetWidths and offsetHeights less than zero on some elements
|
|
||||||
return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
|
|
||||||
};
|
};
|
||||||
jQuery.expr.filters.visible = function( elem ) {
|
jQuery.expr.filters.visible = function( elem ) {
|
||||||
return !jQuery.expr.filters.hidden( elem );
|
|
||||||
|
// Support: Opera <= 12.12
|
||||||
|
// Opera reports offsetWidths and offsetHeights less than zero on some elements
|
||||||
|
// Use OR instead of AND as the element is not visible if either is true
|
||||||
|
// See tickets #10406 and #13132
|
||||||
|
return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
48
dashboard-ui/bower_components/jquery/src/css/showHide.js
vendored
Normal file
48
dashboard-ui/bower_components/jquery/src/css/showHide.js
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
define( [
|
||||||
|
"../data/var/dataPriv"
|
||||||
|
], function( dataPriv ) {
|
||||||
|
|
||||||
|
function showHide( elements, show ) {
|
||||||
|
var display, elem,
|
||||||
|
values = [],
|
||||||
|
index = 0,
|
||||||
|
length = elements.length;
|
||||||
|
|
||||||
|
// Determine new display value for elements that need to change
|
||||||
|
for ( ; index < length; index++ ) {
|
||||||
|
elem = elements[ index ];
|
||||||
|
if ( !elem.style ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
display = elem.style.display;
|
||||||
|
if ( show ) {
|
||||||
|
if ( display === "none" ) {
|
||||||
|
|
||||||
|
// Restore a pre-hide() value if we have one
|
||||||
|
values[ index ] = dataPriv.get( elem, "display" ) || "";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ( display !== "none" ) {
|
||||||
|
values[ index ] = "none";
|
||||||
|
|
||||||
|
// Remember the value we're replacing
|
||||||
|
dataPriv.set( elem, "display", display );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the display of the elements in a second loop
|
||||||
|
// to avoid the constant reflow
|
||||||
|
for ( index = 0; index < length; index++ ) {
|
||||||
|
if ( values[ index ] != null ) {
|
||||||
|
elements[ index ].style.display = values[ index ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return elements;
|
||||||
|
}
|
||||||
|
|
||||||
|
return showHide;
|
||||||
|
|
||||||
|
} );
|
@ -1,14 +1,16 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
|
"../var/document",
|
||||||
|
"../var/documentElement",
|
||||||
"../var/support"
|
"../var/support"
|
||||||
], function( jQuery, support ) {
|
], function( jQuery, document, documentElement, support ) {
|
||||||
|
|
||||||
( function() {
|
( function() {
|
||||||
var pixelPositionVal, boxSizingReliableVal,
|
var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
|
||||||
docElem = document.documentElement,
|
|
||||||
container = document.createElement( "div" ),
|
container = document.createElement( "div" ),
|
||||||
div = document.createElement( "div" );
|
div = document.createElement( "div" );
|
||||||
|
|
||||||
|
// Finish early in limited (non-browser) environments
|
||||||
if ( !div.style ) {
|
if ( !div.style ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -19,47 +21,70 @@ define([
|
|||||||
div.cloneNode( true ).style.backgroundClip = "";
|
div.cloneNode( true ).style.backgroundClip = "";
|
||||||
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
||||||
|
|
||||||
container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
|
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
|
||||||
"position:absolute";
|
"padding:0;margin-top:1px;position:absolute";
|
||||||
container.appendChild( div );
|
container.appendChild( div );
|
||||||
|
|
||||||
// Executing both pixelPosition & boxSizingReliable tests require only one layout
|
// Executing both pixelPosition & boxSizingReliable tests require only one layout
|
||||||
// so they're executed at the same time to save the second computation.
|
// so they're executed at the same time to save the second computation.
|
||||||
function computePixelPositionAndBoxSizingReliable() {
|
function computeStyleTests() {
|
||||||
div.style.cssText =
|
div.style.cssText =
|
||||||
|
|
||||||
// Support: Firefox<29, Android 2.3
|
// Support: Firefox<29, Android 2.3
|
||||||
// Vendor-prefix box-sizing
|
// Vendor-prefix box-sizing
|
||||||
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
|
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +
|
||||||
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
|
"position:relative;display:block;" +
|
||||||
"border:1px;padding:1px;width:4px;position:absolute";
|
"margin:auto;border:1px;padding:1px;" +
|
||||||
|
"top:1%;width:50%";
|
||||||
div.innerHTML = "";
|
div.innerHTML = "";
|
||||||
docElem.appendChild( container );
|
documentElement.appendChild( container );
|
||||||
|
|
||||||
var divStyle = window.getComputedStyle( div, null );
|
var divStyle = window.getComputedStyle( div );
|
||||||
pixelPositionVal = divStyle.top !== "1%";
|
pixelPositionVal = divStyle.top !== "1%";
|
||||||
|
reliableMarginLeftVal = divStyle.marginLeft === "2px";
|
||||||
boxSizingReliableVal = divStyle.width === "4px";
|
boxSizingReliableVal = divStyle.width === "4px";
|
||||||
|
|
||||||
docElem.removeChild( container );
|
// Support: Android 4.0 - 4.3 only
|
||||||
|
// Some styles come back with percentage values, even though they shouldn't
|
||||||
|
div.style.marginRight = "50%";
|
||||||
|
pixelMarginRightVal = divStyle.marginRight === "4px";
|
||||||
|
|
||||||
|
documentElement.removeChild( container );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: node.js jsdom
|
|
||||||
// Don't assume that getComputedStyle is a property of the global object
|
|
||||||
if ( window.getComputedStyle ) {
|
|
||||||
jQuery.extend( support, {
|
jQuery.extend( support, {
|
||||||
pixelPosition: function() {
|
pixelPosition: function() {
|
||||||
|
|
||||||
// This test is executed only once but we still do memoizing
|
// This test is executed only once but we still do memoizing
|
||||||
// since we can use the boxSizingReliable pre-computing.
|
// since we can use the boxSizingReliable pre-computing.
|
||||||
// No need to check if the test was already performed, though.
|
// No need to check if the test was already performed, though.
|
||||||
computePixelPositionAndBoxSizingReliable();
|
computeStyleTests();
|
||||||
return pixelPositionVal;
|
return pixelPositionVal;
|
||||||
},
|
},
|
||||||
boxSizingReliable: function() {
|
boxSizingReliable: function() {
|
||||||
if ( boxSizingReliableVal == null ) {
|
if ( boxSizingReliableVal == null ) {
|
||||||
computePixelPositionAndBoxSizingReliable();
|
computeStyleTests();
|
||||||
}
|
}
|
||||||
return boxSizingReliableVal;
|
return boxSizingReliableVal;
|
||||||
},
|
},
|
||||||
|
pixelMarginRight: function() {
|
||||||
|
|
||||||
|
// Support: Android 4.0-4.3
|
||||||
|
// We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
|
||||||
|
// since that compresses better and they're computed together anyway.
|
||||||
|
if ( boxSizingReliableVal == null ) {
|
||||||
|
computeStyleTests();
|
||||||
|
}
|
||||||
|
return pixelMarginRightVal;
|
||||||
|
},
|
||||||
|
reliableMarginLeft: function() {
|
||||||
|
|
||||||
|
// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
|
||||||
|
if ( boxSizingReliableVal == null ) {
|
||||||
|
computeStyleTests();
|
||||||
|
}
|
||||||
|
return reliableMarginLeftVal;
|
||||||
|
},
|
||||||
reliableMarginRight: function() {
|
reliableMarginRight: function() {
|
||||||
|
|
||||||
// Support: Android 2.3
|
// Support: Android 2.3
|
||||||
@ -72,23 +97,23 @@ define([
|
|||||||
|
|
||||||
// Reset CSS: box-sizing; display; margin; border; padding
|
// Reset CSS: box-sizing; display; margin; border; padding
|
||||||
marginDiv.style.cssText = div.style.cssText =
|
marginDiv.style.cssText = div.style.cssText =
|
||||||
// Support: Firefox<29, Android 2.3
|
|
||||||
|
// Support: Android 2.3
|
||||||
// Vendor-prefix box-sizing
|
// Vendor-prefix box-sizing
|
||||||
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
|
"-webkit-box-sizing:content-box;box-sizing:content-box;" +
|
||||||
"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
|
"display:block;margin:0;border:0;padding:0";
|
||||||
marginDiv.style.marginRight = marginDiv.style.width = "0";
|
marginDiv.style.marginRight = marginDiv.style.width = "0";
|
||||||
div.style.width = "1px";
|
div.style.width = "1px";
|
||||||
docElem.appendChild( container );
|
documentElement.appendChild( container );
|
||||||
|
|
||||||
ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
|
ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );
|
||||||
|
|
||||||
docElem.removeChild( container );
|
documentElement.removeChild( container );
|
||||||
div.removeChild( marginDiv );
|
div.removeChild( marginDiv );
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
|
||||||
} )();
|
} )();
|
||||||
|
|
||||||
return support;
|
return support;
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
define([
|
|
||||||
"../core"
|
|
||||||
], function( jQuery ) {
|
|
||||||
|
|
||||||
// A method for quickly swapping in/out CSS properties to get correct calculations.
|
|
||||||
jQuery.swap = function( elem, options, callback, args ) {
|
|
||||||
var ret, name,
|
|
||||||
old = {};
|
|
||||||
|
|
||||||
// Remember the old values, and insert the new ones
|
|
||||||
for ( name in options ) {
|
|
||||||
old[ name ] = elem.style[ name ];
|
|
||||||
elem.style[ name ] = options[ name ];
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = callback.apply( elem, args || [] );
|
|
||||||
|
|
||||||
// Revert the old values
|
|
||||||
for ( name in options ) {
|
|
||||||
elem.style[ name ] = old[ name ];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
|
|
||||||
return jQuery.swap;
|
|
||||||
|
|
||||||
});
|
|
61
dashboard-ui/bower_components/jquery/src/data.js
vendored
61
dashboard-ui/bower_components/jquery/src/data.js
vendored
@ -1,10 +1,9 @@
|
|||||||
define( [
|
define( [
|
||||||
"./core",
|
"./core",
|
||||||
"./var/rnotwhite",
|
|
||||||
"./core/access",
|
"./core/access",
|
||||||
"./data/var/data_priv",
|
"./data/var/dataPriv",
|
||||||
"./data/var/data_user"
|
"./data/var/dataUser"
|
||||||
], function( jQuery, rnotwhite, access, data_priv, data_user ) {
|
], function( jQuery, access, dataPriv, dataUser ) {
|
||||||
|
|
||||||
// Implementation Summary
|
// Implementation Summary
|
||||||
//
|
//
|
||||||
@ -17,7 +16,7 @@ define([
|
|||||||
// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
|
// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
|
||||||
|
|
||||||
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
||||||
rmultiDash = /([A-Z])/g;
|
rmultiDash = /[A-Z]/g;
|
||||||
|
|
||||||
function dataAttr( elem, key, data ) {
|
function dataAttr( elem, key, data ) {
|
||||||
var name;
|
var name;
|
||||||
@ -25,7 +24,7 @@ function dataAttr( elem, key, data ) {
|
|||||||
// If nothing was found internally, try to fetch any
|
// If nothing was found internally, try to fetch any
|
||||||
// data from the HTML5 data-* attribute
|
// data from the HTML5 data-* attribute
|
||||||
if ( data === undefined && elem.nodeType === 1 ) {
|
if ( data === undefined && elem.nodeType === 1 ) {
|
||||||
name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
|
name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
|
||||||
data = elem.getAttribute( name );
|
data = elem.getAttribute( name );
|
||||||
|
|
||||||
if ( typeof data === "string" ) {
|
if ( typeof data === "string" ) {
|
||||||
@ -33,6 +32,7 @@ function dataAttr( elem, key, data ) {
|
|||||||
data = data === "true" ? true :
|
data = data === "true" ? true :
|
||||||
data === "false" ? false :
|
data === "false" ? false :
|
||||||
data === "null" ? null :
|
data === "null" ? null :
|
||||||
|
|
||||||
// Only convert to a number if it doesn't change the string
|
// Only convert to a number if it doesn't change the string
|
||||||
+data + "" === data ? +data :
|
+data + "" === data ? +data :
|
||||||
rbrace.test( data ) ? jQuery.parseJSON( data ) :
|
rbrace.test( data ) ? jQuery.parseJSON( data ) :
|
||||||
@ -40,7 +40,7 @@ function dataAttr( elem, key, data ) {
|
|||||||
} catch ( e ) {}
|
} catch ( e ) {}
|
||||||
|
|
||||||
// Make sure we set the data so it isn't changed later
|
// Make sure we set the data so it isn't changed later
|
||||||
data_user.set( elem, key, data );
|
dataUser.set( elem, key, data );
|
||||||
} else {
|
} else {
|
||||||
data = undefined;
|
data = undefined;
|
||||||
}
|
}
|
||||||
@ -50,25 +50,25 @@ function dataAttr( elem, key, data ) {
|
|||||||
|
|
||||||
jQuery.extend( {
|
jQuery.extend( {
|
||||||
hasData: function( elem ) {
|
hasData: function( elem ) {
|
||||||
return data_user.hasData( elem ) || data_priv.hasData( elem );
|
return dataUser.hasData( elem ) || dataPriv.hasData( elem );
|
||||||
},
|
},
|
||||||
|
|
||||||
data: function( elem, name, data ) {
|
data: function( elem, name, data ) {
|
||||||
return data_user.access( elem, name, data );
|
return dataUser.access( elem, name, data );
|
||||||
},
|
},
|
||||||
|
|
||||||
removeData: function( elem, name ) {
|
removeData: function( elem, name ) {
|
||||||
data_user.remove( elem, name );
|
dataUser.remove( elem, name );
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: Now that all calls to _data and _removeData have been replaced
|
// TODO: Now that all calls to _data and _removeData have been replaced
|
||||||
// with direct calls to data_priv methods, these can be deprecated.
|
// with direct calls to dataPriv methods, these can be deprecated.
|
||||||
_data: function( elem, name, data ) {
|
_data: function( elem, name, data ) {
|
||||||
return data_priv.access( elem, name, data );
|
return dataPriv.access( elem, name, data );
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeData: function( elem, name ) {
|
_removeData: function( elem, name ) {
|
||||||
data_priv.remove( elem, name );
|
dataPriv.remove( elem, name );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -81,9 +81,9 @@ jQuery.fn.extend({
|
|||||||
// Gets all values
|
// Gets all values
|
||||||
if ( key === undefined ) {
|
if ( key === undefined ) {
|
||||||
if ( this.length ) {
|
if ( this.length ) {
|
||||||
data = data_user.get( elem );
|
data = dataUser.get( elem );
|
||||||
|
|
||||||
if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
|
if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
|
||||||
i = attrs.length;
|
i = attrs.length;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ jQuery.fn.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data_priv.set( elem, "hasDataAttrs", true );
|
dataPriv.set( elem, "hasDataAttrs", true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,13 +107,12 @@ jQuery.fn.extend({
|
|||||||
// Sets multiple values
|
// Sets multiple values
|
||||||
if ( typeof key === "object" ) {
|
if ( typeof key === "object" ) {
|
||||||
return this.each( function() {
|
return this.each( function() {
|
||||||
data_user.set( this, key );
|
dataUser.set( this, key );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
return access( this, function( value ) {
|
return access( this, function( value ) {
|
||||||
var data,
|
var data, camelKey;
|
||||||
camelKey = jQuery.camelCase( key );
|
|
||||||
|
|
||||||
// The calling jQuery object (element matches) is not empty
|
// The calling jQuery object (element matches) is not empty
|
||||||
// (and therefore has an element appears at this[ 0 ]) and the
|
// (and therefore has an element appears at this[ 0 ]) and the
|
||||||
@ -121,16 +120,24 @@ jQuery.fn.extend({
|
|||||||
// will result in `undefined` for elem = this[ 0 ] which will
|
// will result in `undefined` for elem = this[ 0 ] which will
|
||||||
// throw an exception if an attempt to read a data cache is made.
|
// throw an exception if an attempt to read a data cache is made.
|
||||||
if ( elem && value === undefined ) {
|
if ( elem && value === undefined ) {
|
||||||
|
|
||||||
// Attempt to get data from the cache
|
// Attempt to get data from the cache
|
||||||
// with the key as-is
|
// with the key as-is
|
||||||
data = data_user.get( elem, key );
|
data = dataUser.get( elem, key ) ||
|
||||||
|
|
||||||
|
// Try to find dashed key if it exists (gh-2779)
|
||||||
|
// This is for 2.2.x only
|
||||||
|
dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
|
||||||
|
|
||||||
if ( data !== undefined ) {
|
if ( data !== undefined ) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
camelKey = jQuery.camelCase( key );
|
||||||
|
|
||||||
// Attempt to get data from the cache
|
// Attempt to get data from the cache
|
||||||
// with the key camelized
|
// with the key camelized
|
||||||
data = data_user.get( elem, camelKey );
|
data = dataUser.get( elem, camelKey );
|
||||||
if ( data !== undefined ) {
|
if ( data !== undefined ) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@ -147,21 +154,23 @@ jQuery.fn.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the data...
|
// Set the data...
|
||||||
|
camelKey = jQuery.camelCase( key );
|
||||||
this.each( function() {
|
this.each( function() {
|
||||||
|
|
||||||
// First, attempt to store a copy or reference of any
|
// First, attempt to store a copy or reference of any
|
||||||
// data that might've been store with a camelCased key.
|
// data that might've been store with a camelCased key.
|
||||||
var data = data_user.get( this, camelKey );
|
var data = dataUser.get( this, camelKey );
|
||||||
|
|
||||||
// For HTML5 data-* attribute interop, we have to
|
// For HTML5 data-* attribute interop, we have to
|
||||||
// store property names with dashes in a camelCase form.
|
// store property names with dashes in a camelCase form.
|
||||||
// This might not apply to all properties...*
|
// This might not apply to all properties...*
|
||||||
data_user.set( this, camelKey, value );
|
dataUser.set( this, camelKey, value );
|
||||||
|
|
||||||
// *... In the case of properties that might _actually_
|
// *... In the case of properties that might _actually_
|
||||||
// have dashes, we need to also store a copy of that
|
// have dashes, we need to also store a copy of that
|
||||||
// unchanged property.
|
// unchanged property.
|
||||||
if ( key.indexOf("-") !== -1 && data !== undefined ) {
|
if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
|
||||||
data_user.set( this, key, value );
|
dataUser.set( this, key, value );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}, null, value, arguments.length > 1, null, true );
|
}, null, value, arguments.length > 1, null, true );
|
||||||
@ -169,7 +178,7 @@ jQuery.fn.extend({
|
|||||||
|
|
||||||
removeData: function( key ) {
|
removeData: function( key ) {
|
||||||
return this.each( function() {
|
return this.each( function() {
|
||||||
data_user.remove( this, key );
|
dataUser.remove( this, key );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
@ -1,69 +1,80 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
"../var/rnotwhite",
|
"../var/rnotwhite",
|
||||||
"./accepts"
|
"./var/acceptData"
|
||||||
], function( jQuery, rnotwhite ) {
|
], function( jQuery, rnotwhite, acceptData ) {
|
||||||
|
|
||||||
function Data() {
|
function Data() {
|
||||||
// Support: Android<4,
|
|
||||||
// Old WebKit does not have Object.preventExtensions/freeze method,
|
|
||||||
// return new empty object instead with no [[set]] accessor
|
|
||||||
Object.defineProperty( this.cache = {}, 0, {
|
|
||||||
get: function() {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.expando = jQuery.expando + Data.uid++;
|
this.expando = jQuery.expando + Data.uid++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Data.uid = 1;
|
Data.uid = 1;
|
||||||
Data.accepts = jQuery.acceptData;
|
|
||||||
|
|
||||||
Data.prototype = {
|
Data.prototype = {
|
||||||
key: function( owner ) {
|
|
||||||
|
register: function( owner, initial ) {
|
||||||
|
var value = initial || {};
|
||||||
|
|
||||||
|
// If it is a node unlikely to be stringify-ed or looped over
|
||||||
|
// use plain assignment
|
||||||
|
if ( owner.nodeType ) {
|
||||||
|
owner[ this.expando ] = value;
|
||||||
|
|
||||||
|
// Otherwise secure it in a non-enumerable, non-writable property
|
||||||
|
// configurability must be true to allow the property to be
|
||||||
|
// deleted with the delete operator
|
||||||
|
} else {
|
||||||
|
Object.defineProperty( owner, this.expando, {
|
||||||
|
value: value,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
return owner[ this.expando ];
|
||||||
|
},
|
||||||
|
cache: function( owner ) {
|
||||||
|
|
||||||
// We can accept data for non-element nodes in modern browsers,
|
// We can accept data for non-element nodes in modern browsers,
|
||||||
// but we should not, see #8335.
|
// but we should not, see #8335.
|
||||||
// Always return the key for a frozen object.
|
// Always return an empty object.
|
||||||
if ( !Data.accepts( owner ) ) {
|
if ( !acceptData( owner ) ) {
|
||||||
return 0;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
var descriptor = {},
|
// Check if the owner object already has a cache
|
||||||
// Check if the owner object already has a cache key
|
var value = owner[ this.expando ];
|
||||||
unlock = owner[ this.expando ];
|
|
||||||
|
|
||||||
// If not, create one
|
// If not, create one
|
||||||
if ( !unlock ) {
|
if ( !value ) {
|
||||||
unlock = Data.uid++;
|
value = {};
|
||||||
|
|
||||||
// Secure it in a non-enumerable, non-writable property
|
// We can accept data for non-element nodes in modern browsers,
|
||||||
try {
|
// but we should not, see #8335.
|
||||||
descriptor[ this.expando ] = { value: unlock };
|
// Always return an empty object.
|
||||||
Object.defineProperties( owner, descriptor );
|
if ( acceptData( owner ) ) {
|
||||||
|
|
||||||
// Support: Android<4
|
// If it is a node unlikely to be stringify-ed or looped over
|
||||||
// Fallback to a less secure definition
|
// use plain assignment
|
||||||
} catch ( e ) {
|
if ( owner.nodeType ) {
|
||||||
descriptor[ this.expando ] = unlock;
|
owner[ this.expando ] = value;
|
||||||
jQuery.extend( owner, descriptor );
|
|
||||||
|
// Otherwise secure it in a non-enumerable property
|
||||||
|
// configurable must be true to allow the property to be
|
||||||
|
// deleted when data is removed
|
||||||
|
} else {
|
||||||
|
Object.defineProperty( owner, this.expando, {
|
||||||
|
value: value,
|
||||||
|
configurable: true
|
||||||
|
} );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the cache object
|
return value;
|
||||||
if ( !this.cache[ unlock ] ) {
|
|
||||||
this.cache[ unlock ] = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
return unlock;
|
|
||||||
},
|
},
|
||||||
set: function( owner, data, value ) {
|
set: function( owner, data, value ) {
|
||||||
var prop,
|
var prop,
|
||||||
// There may be an unlock assigned to this node,
|
cache = this.cache( owner );
|
||||||
// if there is no entry for this "owner", create one inline
|
|
||||||
// and set the unlock as though an owner entry had always existed
|
|
||||||
unlock = this.key( owner ),
|
|
||||||
cache = this.cache[ unlock ];
|
|
||||||
|
|
||||||
// Handle: [ owner, key, value ] args
|
// Handle: [ owner, key, value ] args
|
||||||
if ( typeof data === "string" ) {
|
if ( typeof data === "string" ) {
|
||||||
@ -71,30 +82,22 @@ Data.prototype = {
|
|||||||
|
|
||||||
// Handle: [ owner, { properties } ] args
|
// Handle: [ owner, { properties } ] args
|
||||||
} else {
|
} else {
|
||||||
// Fresh assignments by object are shallow copied
|
|
||||||
if ( jQuery.isEmptyObject( cache ) ) {
|
// Copy the properties one-by-one to the cache object
|
||||||
jQuery.extend( this.cache[ unlock ], data );
|
|
||||||
// Otherwise, copy the properties one-by-one to the cache object
|
|
||||||
} else {
|
|
||||||
for ( prop in data ) {
|
for ( prop in data ) {
|
||||||
cache[ prop ] = data[ prop ];
|
cache[ prop ] = data[ prop ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return cache;
|
return cache;
|
||||||
},
|
},
|
||||||
get: function( owner, key ) {
|
get: function( owner, key ) {
|
||||||
// Either a valid cache is found, or will be created.
|
|
||||||
// New caches will be created and the unlock returned,
|
|
||||||
// allowing direct access to the newly created
|
|
||||||
// empty data object. A valid owner object must be provided.
|
|
||||||
var cache = this.cache[ this.key( owner ) ];
|
|
||||||
|
|
||||||
return key === undefined ?
|
return key === undefined ?
|
||||||
cache : cache[ key ];
|
this.cache( owner ) :
|
||||||
|
owner[ this.expando ] && owner[ this.expando ][ key ];
|
||||||
},
|
},
|
||||||
access: function( owner, key, value ) {
|
access: function( owner, key, value ) {
|
||||||
var stored;
|
var stored;
|
||||||
|
|
||||||
// In cases where either:
|
// In cases where either:
|
||||||
//
|
//
|
||||||
// 1. No key was specified
|
// 1. No key was specified
|
||||||
@ -115,7 +118,7 @@ Data.prototype = {
|
|||||||
stored : this.get( owner, jQuery.camelCase( key ) );
|
stored : this.get( owner, jQuery.camelCase( key ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// [*]When the key is not a string, or both a key and value
|
// When the key is not a string, or both a key and value
|
||||||
// are specified, set or extend (existing objects) with either:
|
// are specified, set or extend (existing objects) with either:
|
||||||
//
|
//
|
||||||
// 1. An object of properties
|
// 1. An object of properties
|
||||||
@ -129,15 +132,20 @@ Data.prototype = {
|
|||||||
},
|
},
|
||||||
remove: function( owner, key ) {
|
remove: function( owner, key ) {
|
||||||
var i, name, camel,
|
var i, name, camel,
|
||||||
unlock = this.key( owner ),
|
cache = owner[ this.expando ];
|
||||||
cache = this.cache[ unlock ];
|
|
||||||
|
if ( cache === undefined ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( key === undefined ) {
|
if ( key === undefined ) {
|
||||||
this.cache[ unlock ] = {};
|
this.register( owner );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Support array or space separated string of keys
|
// Support array or space separated string of keys
|
||||||
if ( jQuery.isArray( key ) ) {
|
if ( jQuery.isArray( key ) ) {
|
||||||
|
|
||||||
// If "name" is an array of keys...
|
// If "name" is an array of keys...
|
||||||
// When data is initially created, via ("key", "val") signature,
|
// When data is initially created, via ("key", "val") signature,
|
||||||
// keys will be converted to camelCase.
|
// keys will be converted to camelCase.
|
||||||
@ -147,10 +155,12 @@ Data.prototype = {
|
|||||||
name = key.concat( key.map( jQuery.camelCase ) );
|
name = key.concat( key.map( jQuery.camelCase ) );
|
||||||
} else {
|
} else {
|
||||||
camel = jQuery.camelCase( key );
|
camel = jQuery.camelCase( key );
|
||||||
|
|
||||||
// Try the string as a key before any manipulation
|
// Try the string as a key before any manipulation
|
||||||
if ( key in cache ) {
|
if ( key in cache ) {
|
||||||
name = [ key, camel ];
|
name = [ key, camel ];
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// If a key with the spaces exists, use it.
|
// If a key with the spaces exists, use it.
|
||||||
// Otherwise, create an array by matching non-whitespace
|
// Otherwise, create an array by matching non-whitespace
|
||||||
name = camel;
|
name = camel;
|
||||||
@ -160,20 +170,29 @@ Data.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
i = name.length;
|
i = name.length;
|
||||||
|
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
delete cache[ name[ i ] ];
|
delete cache[ name[ i ] ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove the expando if there's no more data
|
||||||
|
if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
|
||||||
|
|
||||||
|
// Support: Chrome <= 35-45+
|
||||||
|
// Webkit & Blink performance suffers when deleting properties
|
||||||
|
// from DOM nodes, so set to undefined instead
|
||||||
|
// https://code.google.com/p/chromium/issues/detail?id=378607
|
||||||
|
if ( owner.nodeType ) {
|
||||||
|
owner[ this.expando ] = undefined;
|
||||||
|
} else {
|
||||||
|
delete owner[ this.expando ];
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
hasData: function( owner ) {
|
hasData: function( owner ) {
|
||||||
return !jQuery.isEmptyObject(
|
var cache = owner[ this.expando ];
|
||||||
this.cache[ owner[ this.expando ] ] || {}
|
return cache !== undefined && !jQuery.isEmptyObject( cache );
|
||||||
);
|
|
||||||
},
|
|
||||||
discard: function( owner ) {
|
|
||||||
if ( owner[ this.expando ] ) {
|
|
||||||
delete this.cache[ owner[ this.expando ] ];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
define([
|
|
||||||
"../core"
|
|
||||||
], function( jQuery ) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines whether an object can have data
|
|
||||||
*/
|
|
||||||
jQuery.acceptData = function( owner ) {
|
|
||||||
// Accepts only:
|
|
||||||
// - Node
|
|
||||||
// - Node.ELEMENT_NODE
|
|
||||||
// - Node.DOCUMENT_NODE
|
|
||||||
// - Object
|
|
||||||
// - Any
|
|
||||||
/* jshint -W018 */
|
|
||||||
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
|
|
||||||
};
|
|
||||||
|
|
||||||
return jQuery.acceptData;
|
|
||||||
});
|
|
@ -8,6 +8,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
Deferred: function( func ) {
|
Deferred: function( func ) {
|
||||||
var tuples = [
|
var tuples = [
|
||||||
|
|
||||||
// action, add listener, listener list, final state
|
// action, add listener, listener list, final state
|
||||||
[ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
|
[ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
|
||||||
[ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
|
[ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
|
||||||
@ -27,22 +28,27 @@ jQuery.extend({
|
|||||||
return jQuery.Deferred( function( newDefer ) {
|
return jQuery.Deferred( function( newDefer ) {
|
||||||
jQuery.each( tuples, function( i, tuple ) {
|
jQuery.each( tuples, function( i, tuple ) {
|
||||||
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
|
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
|
||||||
|
|
||||||
// deferred[ done | fail | progress ] for forwarding actions to newDefer
|
// deferred[ done | fail | progress ] for forwarding actions to newDefer
|
||||||
deferred[ tuple[ 1 ] ]( function() {
|
deferred[ tuple[ 1 ] ]( function() {
|
||||||
var returned = fn && fn.apply( this, arguments );
|
var returned = fn && fn.apply( this, arguments );
|
||||||
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
||||||
returned.promise()
|
returned.promise()
|
||||||
|
.progress( newDefer.notify )
|
||||||
.done( newDefer.resolve )
|
.done( newDefer.resolve )
|
||||||
.fail( newDefer.reject )
|
.fail( newDefer.reject );
|
||||||
.progress( newDefer.notify );
|
|
||||||
} else {
|
} else {
|
||||||
newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
|
newDefer[ tuple[ 0 ] + "With" ](
|
||||||
|
this === promise ? newDefer.promise() : this,
|
||||||
|
fn ? [ returned ] : arguments
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
fns = null;
|
fns = null;
|
||||||
} ).promise();
|
} ).promise();
|
||||||
},
|
},
|
||||||
|
|
||||||
// Get a promise for this deferred
|
// Get a promise for this deferred
|
||||||
// If obj is provided, the promise aspect is added to the object
|
// If obj is provided, the promise aspect is added to the object
|
||||||
promise: function( obj ) {
|
promise: function( obj ) {
|
||||||
@ -65,6 +71,7 @@ jQuery.extend({
|
|||||||
// Handle state
|
// Handle state
|
||||||
if ( stateString ) {
|
if ( stateString ) {
|
||||||
list.add( function() {
|
list.add( function() {
|
||||||
|
|
||||||
// state = [ resolved | rejected ]
|
// state = [ resolved | rejected ]
|
||||||
state = stateString;
|
state = stateString;
|
||||||
|
|
||||||
@ -99,9 +106,11 @@ jQuery.extend({
|
|||||||
length = resolveValues.length,
|
length = resolveValues.length,
|
||||||
|
|
||||||
// the count of uncompleted subordinates
|
// the count of uncompleted subordinates
|
||||||
remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
|
remaining = length !== 1 ||
|
||||||
|
( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
|
||||||
|
|
||||||
// the master Deferred. If resolveValues consist of only a single Deferred, just use that.
|
// the master Deferred.
|
||||||
|
// If resolveValues consist of only a single Deferred, just use that.
|
||||||
deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
|
deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
|
||||||
|
|
||||||
// Update function for both resolve and progress values
|
// Update function for both resolve and progress values
|
||||||
@ -127,9 +136,9 @@ jQuery.extend({
|
|||||||
for ( ; i < length; i++ ) {
|
for ( ; i < length; i++ ) {
|
||||||
if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
|
if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
|
||||||
resolveValues[ i ].promise()
|
resolveValues[ i ].promise()
|
||||||
|
.progress( updateFunc( i, progressContexts, progressValues ) )
|
||||||
.done( updateFunc( i, resolveContexts, resolveValues ) )
|
.done( updateFunc( i, resolveContexts, resolveValues ) )
|
||||||
.fail( deferred.reject )
|
.fail( deferred.reject );
|
||||||
.progress( updateFunc( i, progressContexts, progressValues ) );
|
|
||||||
} else {
|
} else {
|
||||||
--remaining;
|
--remaining;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,32 @@
|
|||||||
define( [
|
define( [
|
||||||
"./core",
|
"./core"
|
||||||
"./traversing"
|
|
||||||
], function( jQuery ) {
|
], function( jQuery ) {
|
||||||
|
|
||||||
// The number of elements contained in the matched element set
|
jQuery.fn.extend( {
|
||||||
jQuery.fn.size = function() {
|
|
||||||
|
bind: function( types, data, fn ) {
|
||||||
|
return this.on( types, null, data, fn );
|
||||||
|
},
|
||||||
|
unbind: function( types, fn ) {
|
||||||
|
return this.off( types, null, fn );
|
||||||
|
},
|
||||||
|
|
||||||
|
delegate: function( selector, types, data, fn ) {
|
||||||
|
return this.on( types, selector, data, fn );
|
||||||
|
},
|
||||||
|
undelegate: function( selector, types, fn ) {
|
||||||
|
|
||||||
|
// ( namespace ) or ( selector, types [, fn] )
|
||||||
|
return arguments.length === 1 ?
|
||||||
|
this.off( selector, "**" ) :
|
||||||
|
this.off( types, selector || "**", fn );
|
||||||
|
},
|
||||||
|
size: function() {
|
||||||
return this.length;
|
return this.length;
|
||||||
};
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
jQuery.fn.andSelf = jQuery.fn.addBack;
|
jQuery.fn.andSelf = jQuery.fn.addBack;
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user