ember-source 1.7.0.beta.5 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +1704 -1077
- data/dist/ember-tests.js +72 -15
- data/dist/ember.js +1853 -1126
- data/dist/ember.min.js +19 -19
- data/dist/ember.prod.js +1852 -1125
- metadata +4 -4
data/dist/ember-tests.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.7.0
|
8
|
+
* @version 1.7.0
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -10751,6 +10751,23 @@ define("ember-handlebars/tests/helpers/view_test",
|
|
10751
10751
|
ok(jQuery('#bar').hasClass('bar'));
|
10752
10752
|
equal(jQuery('#bar').text(), 'Bar');
|
10753
10753
|
});
|
10754
|
+
|
10755
|
+
test("Should apply class without condition always", function() {
|
10756
|
+
var container = new Container();
|
10757
|
+
container.register('view:toplevel', EmberView.extend());
|
10758
|
+
|
10759
|
+
view = EmberView.create({
|
10760
|
+
context: [],
|
10761
|
+
container: container,
|
10762
|
+
controller: Ember.Object.create(),
|
10763
|
+
template: Ember.Handlebars.compile('{{#view id="foo" classBinding=":foo"}} Foo{{/view}}')
|
10764
|
+
});
|
10765
|
+
|
10766
|
+
run(view, 'appendTo', '#qunit-fixture');
|
10767
|
+
|
10768
|
+
ok(jQuery('#foo').hasClass('foo'), "Always applies classbinding without condition");
|
10769
|
+
|
10770
|
+
});
|
10754
10771
|
});
|
10755
10772
|
define("ember-handlebars/tests/helpers/view_test.jshint",
|
10756
10773
|
[],
|
@@ -21497,8 +21514,6 @@ define("ember-routing-handlebars/tests/helpers/action_test",
|
|
21497
21514
|
|
21498
21515
|
delete EmberHandlebars.helpers['action'];
|
21499
21516
|
EmberHandlebars.helpers['action'] = originalActionHelper;
|
21500
|
-
|
21501
|
-
Ember.TESTING_DEPRECATION = false;
|
21502
21517
|
}
|
21503
21518
|
});
|
21504
21519
|
|
@@ -22421,7 +22436,7 @@ define("ember-routing-handlebars/tests/helpers/action_test",
|
|
22421
22436
|
});
|
22422
22437
|
|
22423
22438
|
test("a quoteless parameter that also exists as an action name functions properly", function(){
|
22424
|
-
|
22439
|
+
expectDeprecation('You specified a quoteless path to the {{action}} helper \'ohNoeNotValid\' which did not resolve to an actionName. Perhaps you meant to use a quoted actionName? (e.g. {{action \'ohNoeNotValid\'}}).');
|
22425
22440
|
var triggeredAction;
|
22426
22441
|
|
22427
22442
|
view = EmberView.create({
|
@@ -22448,7 +22463,9 @@ define("ember-routing-handlebars/tests/helpers/action_test",
|
|
22448
22463
|
ok(triggeredAction, 'the action was triggered');
|
22449
22464
|
});
|
22450
22465
|
|
22451
|
-
test("a quoteless parameter that also exists as an action name results in
|
22466
|
+
test("a quoteless parameter that also exists as an action name results in a deprecation", function(){
|
22467
|
+
expectDeprecation('You specified a quoteless path to the {{action}} helper \'ohNoeNotValid\' which did not resolve to an actionName. Perhaps you meant to use a quoted actionName? (e.g. {{action \'ohNoeNotValid\'}}).');
|
22468
|
+
|
22452
22469
|
var triggeredAction;
|
22453
22470
|
|
22454
22471
|
view = EmberView.create({
|
@@ -22468,18 +22485,11 @@ define("ember-routing-handlebars/tests/helpers/action_test",
|
|
22468
22485
|
view.appendTo('#qunit-fixture');
|
22469
22486
|
});
|
22470
22487
|
|
22471
|
-
var oldAssert = Ember.assert;
|
22472
|
-
Ember.assert = function(message, test){
|
22473
|
-
ok(test, message + " -- was properly asserted");
|
22474
|
-
};
|
22475
|
-
|
22476
22488
|
run(function(){
|
22477
22489
|
view.$("#oops-bound-param").click();
|
22478
22490
|
});
|
22479
22491
|
|
22480
22492
|
ok(triggeredAction, 'the action was triggered');
|
22481
|
-
|
22482
|
-
Ember.assert = oldAssert;
|
22483
22493
|
});
|
22484
22494
|
|
22485
22495
|
test("a quoteless parameter that also exists as an action name in deprecated action in controller style results in an assertion", function(){
|
@@ -25391,6 +25401,27 @@ define("ember-runtime/tests/computed/computed_macros_test",
|
|
25391
25401
|
equal(get(obj, 'bestLannisterUnspecified'), false, "empty respects strings");
|
25392
25402
|
equal(get(obj, 'noLannistersKnown'), false, "empty respects array mutations");
|
25393
25403
|
});
|
25404
|
+
|
25405
|
+
testBoth('Ember.computed.notEmpty', function(get, set) {
|
25406
|
+
var obj = EmberObject.extend({
|
25407
|
+
bestLannister: null,
|
25408
|
+
lannisters: null,
|
25409
|
+
|
25410
|
+
bestLannisterSpecified: computed.notEmpty('bestLannister'),
|
25411
|
+
LannistersKnown: computed.notEmpty('lannisters')
|
25412
|
+
}).create({
|
25413
|
+
lannisters: Ember.A([])
|
25414
|
+
});
|
25415
|
+
|
25416
|
+
equal(get(obj, 'bestLannisterSpecified'), false, "bestLannister initially empty");
|
25417
|
+
equal(get(obj, 'LannistersKnown'), false, "lannisters initially empty");
|
25418
|
+
|
25419
|
+
get(obj, 'lannisters').pushObject('Tyrion');
|
25420
|
+
set(obj, 'bestLannister', 'Tyrion');
|
25421
|
+
|
25422
|
+
equal(get(obj, 'bestLannisterSpecified'), true, "empty respects strings");
|
25423
|
+
equal(get(obj, 'LannistersKnown'), true, "empty respects array mutations");
|
25424
|
+
});
|
25394
25425
|
});
|
25395
25426
|
define("ember-runtime/tests/computed/computed_macros_test.jshint",
|
25396
25427
|
[],
|
@@ -51142,7 +51173,7 @@ define("ember/tests/helpers/link_to_test",
|
|
51142
51173
|
});
|
51143
51174
|
|
51144
51175
|
test("The {{link-to}} helper binds some anchor html tag common attributes", function() {
|
51145
|
-
Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3>{{#link-to 'index' id='self-link' title='title-attr' rel='rel-attr'}}Self{{/link-to}}");
|
51176
|
+
Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3>{{#link-to 'index' id='self-link' title='title-attr' rel='rel-attr' tabindex='-1'}}Self{{/link-to}}");
|
51146
51177
|
bootApplication();
|
51147
51178
|
|
51148
51179
|
Ember.run(function() {
|
@@ -51152,6 +51183,7 @@ define("ember/tests/helpers/link_to_test",
|
|
51152
51183
|
var link = Ember.$('#self-link', '#qunit-fixture');
|
51153
51184
|
equal(link.attr('title'), 'title-attr', "The self-link contains title attribute");
|
51154
51185
|
equal(link.attr('rel'), 'rel-attr', "The self-link contains rel attribute");
|
51186
|
+
equal(link.attr('tabindex'), '-1', "The self-link contains tabindex attribute");
|
51155
51187
|
});
|
51156
51188
|
|
51157
51189
|
|
@@ -52153,6 +52185,7 @@ define("ember/tests/helpers/link_to_test",
|
|
52153
52185
|
Ember.TEMPLATES.application = Ember.Handlebars.compile(
|
52154
52186
|
"{{#link-to 'parent' id='parent-link'}}Parent{{/link-to}} " +
|
52155
52187
|
"{{#link-to 'parent.child' id='parent-child-link'}}Child{{/link-to}} " +
|
52188
|
+
"{{#link-to 'parent' (query-params foo=cat) id='parent-link-qp'}}Parent{{/link-to}} " +
|
52156
52189
|
"{{outlet}}"
|
52157
52190
|
);
|
52158
52191
|
|
@@ -52164,8 +52197,10 @@ define("ember/tests/helpers/link_to_test",
|
|
52164
52197
|
bootApplication();
|
52165
52198
|
shouldNotBeActive('#parent-link');
|
52166
52199
|
shouldNotBeActive('#parent-child-link');
|
52200
|
+
shouldNotBeActive('#parent-link-qp');
|
52167
52201
|
Ember.run(router, 'handleURL', '/parent/child?foo=dog');
|
52168
52202
|
shouldBeActive('#parent-link');
|
52203
|
+
shouldNotBeActive('#parent-link-qp');
|
52169
52204
|
});
|
52170
52205
|
|
52171
52206
|
test("The {{link-to}} helper disregards query-params in activeness computation when currentWhen specified", function() {
|
@@ -55800,13 +55835,14 @@ define("ember/tests/routing/basic_test.jshint",
|
|
55800
55835
|
});
|
55801
55836
|
});
|
55802
55837
|
define("ember/tests/routing/query_params_test",
|
55803
|
-
["ember","ember-metal/enumerable_utils","ember-metal/computed","ember-metal/platform"],
|
55804
|
-
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__) {
|
55838
|
+
["ember","ember-metal/enumerable_utils","ember-metal/computed","ember-metal/platform","ember-runtime/system/string"],
|
55839
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
|
55805
55840
|
"use strict";
|
55806
55841
|
var forEach = __dependency2__.forEach;
|
55807
55842
|
var map = __dependency2__.map;
|
55808
55843
|
var computed = __dependency3__.computed;
|
55809
55844
|
var platform = __dependency4__.platform;
|
55845
|
+
var capitalize = __dependency5__.capitalize;
|
55810
55846
|
|
55811
55847
|
var Router, App, AppView, templates, router, container;
|
55812
55848
|
var get = Ember.get;
|
@@ -56991,6 +57027,27 @@ define("ember/tests/routing/query_params_test",
|
|
56991
57027
|
bootApplication();
|
56992
57028
|
});
|
56993
57029
|
|
57030
|
+
var testParamlessLinks = function(routeName) {
|
57031
|
+
test("param-less links in an app booted with query params in the URL don't reset the query params: " + routeName, function() {
|
57032
|
+
expect(1);
|
57033
|
+
|
57034
|
+
Ember.TEMPLATES[routeName] = compile("{{link-to 'index' 'index' id='index-link'}}");
|
57035
|
+
|
57036
|
+
App[capitalize(routeName) + "Controller"] = Ember.Controller.extend({
|
57037
|
+
queryParams: ['foo'],
|
57038
|
+
foo: "wat"
|
57039
|
+
});
|
57040
|
+
|
57041
|
+
startingURL = '/?foo=YEAH';
|
57042
|
+
bootApplication();
|
57043
|
+
|
57044
|
+
equal(Ember.$('#index-link').attr('href'), '/?foo=YEAH');
|
57045
|
+
});
|
57046
|
+
};
|
57047
|
+
|
57048
|
+
testParamlessLinks('application');
|
57049
|
+
testParamlessLinks('index');
|
57050
|
+
|
56994
57051
|
QUnit.module("Model Dep Query Params", {
|
56995
57052
|
setup: function() {
|
56996
57053
|
sharedSetup();
|
data/dist/ember.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.7.0
|
8
|
+
* @version 1.7.0
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -868,6 +868,47 @@ define("backburner/utils",
|
|
868
868
|
};
|
869
869
|
});
|
870
870
|
|
871
|
+
define("calculateVersion",
|
872
|
+
[],
|
873
|
+
function() {
|
874
|
+
"use strict";
|
875
|
+
'use strict';
|
876
|
+
|
877
|
+
var fs = require('fs');
|
878
|
+
var path = require('path');
|
879
|
+
|
880
|
+
module.exports = function () {
|
881
|
+
var packageVersion = require('../package.json').version;
|
882
|
+
var output = [packageVersion];
|
883
|
+
var gitPath = path.join(__dirname,'..','.git');
|
884
|
+
var headFilePath = path.join(gitPath, 'HEAD');
|
885
|
+
|
886
|
+
if (packageVersion.indexOf('+') > -1) {
|
887
|
+
try {
|
888
|
+
if (fs.existsSync(headFilePath)) {
|
889
|
+
var headFile = fs.readFileSync(headFilePath, {encoding: 'utf8'});
|
890
|
+
var branchName = headFile.split('/').slice(-1)[0].trim();
|
891
|
+
var refPath = headFile.split(' ')[1];
|
892
|
+
var branchSHA;
|
893
|
+
|
894
|
+
if (refPath) {
|
895
|
+
var branchPath = path.join(gitPath, refPath.trim());
|
896
|
+
branchSHA = fs.readFileSync(branchPath);
|
897
|
+
} else {
|
898
|
+
branchSHA = branchName;
|
899
|
+
}
|
900
|
+
|
901
|
+
output.push(branchSHA.slice(0,10));
|
902
|
+
}
|
903
|
+
} catch (err) {
|
904
|
+
console.error(err.stack);
|
905
|
+
}
|
906
|
+
return output.join('.');
|
907
|
+
} else {
|
908
|
+
return packageVersion;
|
909
|
+
}
|
910
|
+
};
|
911
|
+
});
|
871
912
|
define("container",
|
872
913
|
["container/container","exports"],
|
873
914
|
function(__dependency1__, __exports__) {
|
@@ -3127,11 +3168,28 @@ define("ember-application/system/dag",
|
|
3127
3168
|
path.pop();
|
3128
3169
|
}
|
3129
3170
|
|
3171
|
+
|
3172
|
+
/**
|
3173
|
+
* DAG stands for Directed acyclic graph.
|
3174
|
+
*
|
3175
|
+
* It is used to build a graph of dependencies checking that there isn't circular
|
3176
|
+
* dependencies. p.e Registering initializers with a certain precedence order.
|
3177
|
+
*
|
3178
|
+
* @class DAG
|
3179
|
+
* @constructor
|
3180
|
+
*/
|
3130
3181
|
function DAG() {
|
3131
3182
|
this.names = [];
|
3132
3183
|
this.vertices = {};
|
3133
3184
|
}
|
3134
3185
|
|
3186
|
+
/**
|
3187
|
+
* Adds a vertex entry to the graph unless it is already added.
|
3188
|
+
*
|
3189
|
+
* @private
|
3190
|
+
* @method add
|
3191
|
+
* @param {String} name The name of the vertex to add
|
3192
|
+
*/
|
3135
3193
|
DAG.prototype.add = function(name) {
|
3136
3194
|
if (!name) { return; }
|
3137
3195
|
if (this.vertices.hasOwnProperty(name)) {
|
@@ -3145,10 +3203,27 @@ define("ember-application/system/dag",
|
|
3145
3203
|
return vertex;
|
3146
3204
|
};
|
3147
3205
|
|
3206
|
+
/**
|
3207
|
+
* Adds a vertex to the graph and sets its value.
|
3208
|
+
*
|
3209
|
+
* @private
|
3210
|
+
* @method map
|
3211
|
+
* @param {String} name The name of the vertex.
|
3212
|
+
* @param value The value to put in the vertex.
|
3213
|
+
*/
|
3148
3214
|
DAG.prototype.map = function(name, value) {
|
3149
3215
|
this.add(name).value = value;
|
3150
3216
|
};
|
3151
3217
|
|
3218
|
+
/**
|
3219
|
+
* Connects the vertices with the given names, adding them to the graph if
|
3220
|
+
* necesary, only if this does not produce is any circular dependency.
|
3221
|
+
*
|
3222
|
+
* @private
|
3223
|
+
* @method addEdge
|
3224
|
+
* @param {String} fromName The name the vertex where the edge starts.
|
3225
|
+
* @param {String} toName The name the vertex where the edge ends.
|
3226
|
+
*/
|
3152
3227
|
DAG.prototype.addEdge = function(fromName, toName) {
|
3153
3228
|
if (!fromName || !toName || fromName === toName) {
|
3154
3229
|
return;
|
@@ -3168,6 +3243,13 @@ define("ember-application/system/dag",
|
|
3168
3243
|
to.incomingNames.push(fromName);
|
3169
3244
|
};
|
3170
3245
|
|
3246
|
+
/**
|
3247
|
+
* Visits all the vertex of the graph calling the given function with each one,
|
3248
|
+
* ensuring that the vertices are visited respecting their precedence.
|
3249
|
+
*
|
3250
|
+
* @method topsort
|
3251
|
+
* @param {Function} fn The function to be invoked on each vertex.
|
3252
|
+
*/
|
3171
3253
|
DAG.prototype.topsort = function(fn) {
|
3172
3254
|
var visited = {};
|
3173
3255
|
var vertices = this.vertices;
|
@@ -3183,6 +3265,23 @@ define("ember-application/system/dag",
|
|
3183
3265
|
}
|
3184
3266
|
};
|
3185
3267
|
|
3268
|
+
/**
|
3269
|
+
* Adds a vertex with the given name and value to the graph and joins it with the
|
3270
|
+
* vertices referenced in _before_ and _after_. If there isn't vertices with those
|
3271
|
+
* names, they are added too.
|
3272
|
+
*
|
3273
|
+
* If either _before_ or _after_ are falsy/empty, the added vertex will not have
|
3274
|
+
* an incoming/outgoing edge.
|
3275
|
+
*
|
3276
|
+
* @method addEdges
|
3277
|
+
* @param {String} name The name of the vertex to be added.
|
3278
|
+
* @param value The value of that vertex.
|
3279
|
+
* @param before An string or array of strings with the names of the vertices before
|
3280
|
+
* which this vertex must be visited.
|
3281
|
+
* @param after An string or array of strings with the names of the vertex after
|
3282
|
+
* which this vertex must be visited.
|
3283
|
+
*
|
3284
|
+
*/
|
3186
3285
|
DAG.prototype.addEdges = function(name, value, before, after) {
|
3187
3286
|
var i;
|
3188
3287
|
this.map(name, value);
|
@@ -9244,8 +9343,10 @@ define("ember-handlebars/helpers/view",
|
|
9244
9343
|
//
|
9245
9344
|
// classNameBinding="_parentView.context.isGreen:green"
|
9246
9345
|
var parsedPath = View._parsePropertyPath(full);
|
9247
|
-
|
9248
|
-
|
9346
|
+
if(parsedPath.path !== '') {
|
9347
|
+
path = this.contextualizeBindingPath(parsedPath.path, data);
|
9348
|
+
if (path) { extensions.classNameBindings[b] = path + parsedPath.classNames; }
|
9349
|
+
}
|
9249
9350
|
}
|
9250
9351
|
}
|
9251
9352
|
}
|
@@ -11141,7 +11242,7 @@ define("ember-metal/binding",
|
|
11141
11242
|
|
11142
11243
|
Properties ending in a `Binding` suffix will be converted to `Ember.Binding`
|
11143
11244
|
instances. The value of this property should be a string representing a path
|
11144
|
-
to another object or a custom binding
|
11245
|
+
to another object or a custom binding instance created using Binding helpers
|
11145
11246
|
(see "One Way Bindings"):
|
11146
11247
|
|
11147
11248
|
```
|
@@ -11197,7 +11298,7 @@ define("ember-metal/binding",
|
|
11197
11298
|
something like this on your binding:
|
11198
11299
|
|
11199
11300
|
```javascript
|
11200
|
-
binding = Ember.Binding.from(
|
11301
|
+
binding = Ember.Binding.from("valueBinding").to("value");
|
11201
11302
|
```
|
11202
11303
|
|
11203
11304
|
This creates a new binding instance based on the template you provide, and
|
@@ -11214,6 +11315,19 @@ define("ember-metal/binding",
|
|
11214
11315
|
to side of the binding when inspecting relative paths. This allows the
|
11215
11316
|
binding to be automatically inherited by subclassed objects as well.
|
11216
11317
|
|
11318
|
+
This also allows you to bind between objects using the paths you declare in
|
11319
|
+
`from` and `to`:
|
11320
|
+
|
11321
|
+
```javascript
|
11322
|
+
// Example 1
|
11323
|
+
binding = Ember.Binding.from("App.someObject.value").to("value");
|
11324
|
+
binding.connect(this);
|
11325
|
+
|
11326
|
+
// Example 2
|
11327
|
+
binding = Ember.Binding.from("parentView.value").to("App.someObject.value");
|
11328
|
+
binding.connect(this);
|
11329
|
+
```
|
11330
|
+
|
11217
11331
|
Now that the binding is connected, it will observe both the from and to side
|
11218
11332
|
and relay changes.
|
11219
11333
|
|
@@ -12239,15 +12353,11 @@ define("ember-metal/computed_macros",
|
|
12239
12353
|
A computed property that returns true if the value of the dependent
|
12240
12354
|
property is NOT null, an empty string, empty array, or empty function.
|
12241
12355
|
|
12242
|
-
Note: When using `computed.notEmpty` to watch an array make sure to
|
12243
|
-
use the `array.[]` syntax so the computed can subscribe to transitions
|
12244
|
-
from empty to non-empty states.
|
12245
|
-
|
12246
12356
|
Example
|
12247
12357
|
|
12248
12358
|
```javascript
|
12249
12359
|
var Hamster = Ember.Object.extend({
|
12250
|
-
hasStuff: Ember.computed.notEmpty('backpack
|
12360
|
+
hasStuff: Ember.computed.notEmpty('backpack')
|
12251
12361
|
});
|
12252
12362
|
|
12253
12363
|
var hamster = Hamster.create({ backpack: ['Food', 'Sleeping Bag', 'Tent'] });
|
@@ -12263,9 +12373,11 @@ define("ember-metal/computed_macros",
|
|
12263
12373
|
@return {Ember.ComputedProperty} computed property which returns true if
|
12264
12374
|
original value for property is not empty.
|
12265
12375
|
*/
|
12266
|
-
|
12267
|
-
return
|
12268
|
-
|
12376
|
+
computed.notEmpty = function(dependentKey) {
|
12377
|
+
return computed(dependentKey + '.length', function () {
|
12378
|
+
return !isEmpty(get(this, dependentKey));
|
12379
|
+
});
|
12380
|
+
};
|
12269
12381
|
|
12270
12382
|
/**
|
12271
12383
|
A computed property that returns true if the value of the dependent
|
@@ -12846,6 +12958,7 @@ define("ember-metal/computed_macros",
|
|
12846
12958
|
@param {String} dependentKey
|
12847
12959
|
@return {Ember.ComputedProperty} computed property which creates an
|
12848
12960
|
alias with a deprecation to the original value for property.
|
12961
|
+
@since 1.7.0
|
12849
12962
|
*/
|
12850
12963
|
computed.deprecatingAlias = function(dependentKey) {
|
12851
12964
|
return computed(dependentKey, function(key, value) {
|
@@ -12888,7 +13001,7 @@ define("ember-metal/core",
|
|
12888
13001
|
|
12889
13002
|
@class Ember
|
12890
13003
|
@static
|
12891
|
-
@version 1.7.0
|
13004
|
+
@version 1.7.0
|
12892
13005
|
*/
|
12893
13006
|
|
12894
13007
|
if ('undefined' === typeof Ember) {
|
@@ -12915,10 +13028,10 @@ define("ember-metal/core",
|
|
12915
13028
|
/**
|
12916
13029
|
@property VERSION
|
12917
13030
|
@type String
|
12918
|
-
@default '1.7.0
|
13031
|
+
@default '1.7.0'
|
12919
13032
|
@static
|
12920
13033
|
*/
|
12921
|
-
Ember.VERSION = '1.7.0
|
13034
|
+
Ember.VERSION = '1.7.0';
|
12922
13035
|
|
12923
13036
|
/**
|
12924
13037
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -12955,7 +13068,7 @@ define("ember-metal/core",
|
|
12955
13068
|
MetamorphENV.DISABLE_RANGE_API = Ember.ENV.DISABLE_RANGE_API;
|
12956
13069
|
|
12957
13070
|
/**
|
12958
|
-
Hash of enabled Canary features. Add to before creating your application.
|
13071
|
+
Hash of enabled Canary features. Add to this before creating your application.
|
12959
13072
|
|
12960
13073
|
You can also define `ENV.FEATURES` if you need to enable features flagged at runtime.
|
12961
13074
|
|
@@ -16239,6 +16352,7 @@ define("ember-metal/properties",
|
|
16239
16352
|
@param {String} deprecatedKey The property to add (and print deprecation warnings upon accessing).
|
16240
16353
|
@param {String} newKey The property that will be aliased.
|
16241
16354
|
@private
|
16355
|
+
@since 1.7.0
|
16242
16356
|
*/
|
16243
16357
|
|
16244
16358
|
function deprecateProperty(object, deprecatedKey, newKey) {
|
@@ -18715,8 +18829,8 @@ define("ember-routing-handlebars/helpers/action",
|
|
18715
18829
|
if (options.boundProperty) {
|
18716
18830
|
actionName = resolveParams(parameters.context, [actionNameOrPath], { types: ['ID'], data: parameters.options.data })[0];
|
18717
18831
|
|
18718
|
-
if(typeof actionName === 'undefined' || typeof actionName === 'function') {
|
18719
|
-
Ember.
|
18832
|
+
if (typeof actionName === 'undefined' || typeof actionName === 'function') {
|
18833
|
+
Ember.deprecate("You specified a quoteless path to the {{action}} helper '" + actionNameOrPath + "' which did not resolve to an actionName. Perhaps you meant to use a quoted actionName? (e.g. {{action '" + actionNameOrPath + "'}}).");
|
18720
18834
|
actionName = actionNameOrPath;
|
18721
18835
|
}
|
18722
18836
|
}
|
@@ -19088,7 +19202,7 @@ define("ember-routing-handlebars/helpers/link_to",
|
|
19088
19202
|
@type Array | String
|
19089
19203
|
@default ['href', 'title', 'rel']
|
19090
19204
|
**/
|
19091
|
-
attributeBindings: ['href', 'title', 'rel'],
|
19205
|
+
attributeBindings: ['href', 'title', 'rel', 'tabindex'],
|
19092
19206
|
|
19093
19207
|
/**
|
19094
19208
|
By default the `{{link-to}}` helper will bind to the `active`, `loading`, and
|
@@ -19247,13 +19361,16 @@ define("ember-routing-handlebars/helpers/link_to",
|
|
19247
19361
|
active: computed('loadedParams', function computeLinkViewActive() {
|
19248
19362
|
if (get(this, 'loading')) { return false; }
|
19249
19363
|
|
19250
|
-
var router = get(this, 'router')
|
19251
|
-
|
19252
|
-
|
19253
|
-
|
19254
|
-
|
19255
|
-
|
19256
|
-
|
19364
|
+
var router = get(this, 'router');
|
19365
|
+
var loadedParams = get(this, 'loadedParams');
|
19366
|
+
var contexts = loadedParams.models;
|
19367
|
+
var currentWhen = this.currentWhen;
|
19368
|
+
var isCurrentWhenSpecified = Boolean(currentWhen);
|
19369
|
+
currentWhen = currentWhen || loadedParams.targetRouteName;
|
19370
|
+
|
19371
|
+
var handlers = router.router.recognizer.handlersFor(currentWhen);
|
19372
|
+
var leafName = handlers[handlers.length-1].handler;
|
19373
|
+
var maximumContexts = numberOfContextsAcceptedByHandler(currentWhen, handlers);
|
19257
19374
|
|
19258
19375
|
// NOTE: any ugliness in the calculation of activeness is largely
|
19259
19376
|
// due to the fact that we support automatic normalizing of
|
@@ -19274,7 +19391,9 @@ define("ember-routing-handlebars/helpers/link_to",
|
|
19274
19391
|
if (!isActive) { return false; }
|
19275
19392
|
|
19276
19393
|
|
19277
|
-
|
19394
|
+
var emptyQueryParams = Ember.isEmpty(Ember.keys(loadedParams.queryParams));
|
19395
|
+
|
19396
|
+
if (!isCurrentWhenSpecified && !emptyQueryParams && isActive) {
|
19278
19397
|
var visibleQueryParams = {};
|
19279
19398
|
merge(visibleQueryParams, loadedParams.queryParams);
|
19280
19399
|
router._prepareQueryParams(loadedParams.targetRouteName, loadedParams.models, visibleQueryParams);
|
@@ -22194,7 +22313,8 @@ define("ember-routing/system/route",
|
|
22194
22313
|
/**
|
22195
22314
|
@private
|
22196
22315
|
|
22197
|
-
@method
|
22316
|
+
@method _reset
|
22317
|
+
@since 1.7.0
|
22198
22318
|
*/
|
22199
22319
|
_reset: function(isExiting, transition) {
|
22200
22320
|
|
@@ -22849,13 +22969,15 @@ define("ember-routing/system/route",
|
|
22849
22969
|
var states = get(this, '_qp.states');
|
22850
22970
|
if (transition) {
|
22851
22971
|
// Update the model dep values used to calculate cache keys.
|
22972
|
+
stashParamNames(this.router, transition.state.handlerInfos);
|
22852
22973
|
controller._qpDelegate = states.changingKeys;
|
22853
22974
|
controller._updateCacheParams(transition.params);
|
22854
22975
|
}
|
22855
22976
|
controller._qpDelegate = states.allowOverrides;
|
22856
22977
|
|
22857
22978
|
if (transition) {
|
22858
|
-
|
22979
|
+
var qpValues = getQueryParamsFor(this, transition.state);
|
22980
|
+
controller.setProperties(qpValues);
|
22859
22981
|
}
|
22860
22982
|
|
22861
22983
|
this.setupController(controller, context, transition);
|
@@ -23035,12 +23157,29 @@ define("ember-routing/system/route",
|
|
23035
23157
|
* The find method is called on the model class with the value of
|
23036
23158
|
the dynamic segment.
|
23037
23159
|
|
23038
|
-
Note that for routes with dynamic segments, this hook is
|
23039
|
-
executed
|
23040
|
-
|
23041
|
-
|
23042
|
-
is not called.
|
23043
|
-
|
23160
|
+
Note that for routes with dynamic segments, this hook is not always
|
23161
|
+
executed. If the route is entered through a transition (e.g. when
|
23162
|
+
using the `link-to` Handlebars helper or the `transitionTo` method
|
23163
|
+
of routes), and a model context is already provided this hook
|
23164
|
+
is not called.
|
23165
|
+
|
23166
|
+
A model context does not include a primitive string or number,
|
23167
|
+
which does cause the model hook to be called.
|
23168
|
+
|
23169
|
+
Routes without dynamic segments will always execute the model hook.
|
23170
|
+
|
23171
|
+
```js
|
23172
|
+
// no dynamic segment, model hook always called
|
23173
|
+
this.transitionTo('posts');
|
23174
|
+
|
23175
|
+
// model passed in, so model hook not called
|
23176
|
+
thePost = store.find('post', 1);
|
23177
|
+
this.transitionTo('post', thePost);
|
23178
|
+
|
23179
|
+
// integer passed in, model hook is called
|
23180
|
+
this.transitionTo('post', 1);
|
23181
|
+
```
|
23182
|
+
|
23044
23183
|
|
23045
23184
|
This hook follows the asynchronous/promise semantics
|
23046
23185
|
described in the documentation for `beforeModel`. In particular,
|
@@ -23916,6 +24055,7 @@ define("ember-routing/system/route",
|
|
23916
24055
|
@param {Controller} controller instance
|
23917
24056
|
@param {Boolean} isExiting
|
23918
24057
|
@param {Object} transition
|
24058
|
+
@since 1.7.0
|
23919
24059
|
*/
|
23920
24060
|
resetController: Ember.K
|
23921
24061
|
});
|
@@ -24318,12 +24458,13 @@ define("ember-routing/system/router",
|
|
24318
24458
|
manual concatenation of the arguments into a single
|
24319
24459
|
array.
|
24320
24460
|
|
24321
|
-
@method
|
24461
|
+
@method isActiveIntent
|
24322
24462
|
@param routeName
|
24323
24463
|
@param models
|
24324
24464
|
@param queryParams
|
24325
24465
|
@return {Boolean}
|
24326
24466
|
@private
|
24467
|
+
@since 1.7.0
|
24327
24468
|
*/
|
24328
24469
|
isActiveIntent: function(routeName, models, queryParams) {
|
24329
24470
|
var router = this.router;
|
@@ -24843,6 +24984,25 @@ define("ember-routing/system/router",
|
|
24843
24984
|
|
24844
24985
|
EmberRouter.reopenClass({
|
24845
24986
|
router: null,
|
24987
|
+
|
24988
|
+
/**
|
24989
|
+
The `Router.map` function allows you to define mappings from URLs to routes
|
24990
|
+
and resources in your application. These mappings are defined within the
|
24991
|
+
supplied callback function using `this.resource` and `this.route`.
|
24992
|
+
|
24993
|
+
```javascript
|
24994
|
+
App.Router.map(function({
|
24995
|
+
this.route('about');
|
24996
|
+
this.resource('article');
|
24997
|
+
}));
|
24998
|
+
```
|
24999
|
+
|
25000
|
+
For more detailed examples please see
|
25001
|
+
[the guides](http://emberjs.com/guides/routing/defining-your-routes/).
|
25002
|
+
|
25003
|
+
@method map
|
25004
|
+
@param callback
|
25005
|
+
*/
|
24846
25006
|
map: function(callback) {
|
24847
25007
|
var router = this.router;
|
24848
25008
|
if (!router) {
|
@@ -26740,12 +26900,6 @@ define("ember-runtime/computed/reduce_computed_macros",
|
|
26740
26900
|
duplicated elements from the dependent arrays
|
26741
26901
|
*/
|
26742
26902
|
function intersect() {
|
26743
|
-
var getDependentKeyGuids = function (changeMeta) {
|
26744
|
-
return map(changeMeta.property._dependentKeys, function (dependentKey) {
|
26745
|
-
return guidFor(dependentKey);
|
26746
|
-
});
|
26747
|
-
};
|
26748
|
-
|
26749
26903
|
var args = a_slice.call(arguments);
|
26750
26904
|
args.push({
|
26751
26905
|
initialize: function (array, changeMeta, instanceMeta) {
|
@@ -26753,11 +26907,10 @@ define("ember-runtime/computed/reduce_computed_macros",
|
|
26753
26907
|
},
|
26754
26908
|
|
26755
26909
|
addedItem: function(array, item, changeMeta, instanceMeta) {
|
26756
|
-
var itemGuid = guidFor(item)
|
26757
|
-
|
26758
|
-
|
26759
|
-
|
26760
|
-
itemCounts = instanceMeta.itemCounts;
|
26910
|
+
var itemGuid = guidFor(item);
|
26911
|
+
var dependentGuid = guidFor(changeMeta.arrayChanged);
|
26912
|
+
var numberOfDependentArrays = changeMeta.property._dependentKeys.length;
|
26913
|
+
var itemCounts = instanceMeta.itemCounts;
|
26761
26914
|
|
26762
26915
|
if (!itemCounts[itemGuid]) { itemCounts[itemGuid] = {}; }
|
26763
26916
|
if (itemCounts[itemGuid][dependentGuid] === undefined) { itemCounts[itemGuid][dependentGuid] = 0; }
|
@@ -26770,14 +26923,16 @@ define("ember-runtime/computed/reduce_computed_macros",
|
|
26770
26923
|
return array;
|
26771
26924
|
},
|
26772
26925
|
removedItem: function(array, item, changeMeta, instanceMeta) {
|
26773
|
-
var itemGuid = guidFor(item)
|
26774
|
-
|
26775
|
-
|
26776
|
-
|
26777
|
-
|
26778
|
-
|
26926
|
+
var itemGuid = guidFor(item);
|
26927
|
+
var dependentGuid = guidFor(changeMeta.arrayChanged);
|
26928
|
+
var numberOfDependentArrays = changeMeta.property._dependentKeys.length;
|
26929
|
+
var numberOfArraysItemAppearsIn;
|
26930
|
+
var itemCounts = instanceMeta.itemCounts;
|
26931
|
+
|
26932
|
+
if (itemCounts[itemGuid][dependentGuid] === undefined) {
|
26933
|
+
itemCounts[itemGuid][dependentGuid] = 0;
|
26934
|
+
}
|
26779
26935
|
|
26780
|
-
if (itemCounts[itemGuid][dependentGuid] === undefined) { itemCounts[itemGuid][dependentGuid] = 0; }
|
26781
26936
|
if (--itemCounts[itemGuid][dependentGuid] === 0) {
|
26782
26937
|
delete itemCounts[itemGuid][dependentGuid];
|
26783
26938
|
numberOfArraysItemAppearsIn = keys(itemCounts[itemGuid]).length;
|
@@ -27917,7 +28072,7 @@ define("ember-runtime/keys",
|
|
27917
28072
|
if (key.substring(0,2) === '__') return;
|
27918
28073
|
if (key === '_super') return;
|
27919
28074
|
if (EnumerableUtils.indexOf(array, key) >= 0) return;
|
27920
|
-
if (
|
28075
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) return;
|
27921
28076
|
|
27922
28077
|
array.push(key);
|
27923
28078
|
};
|
@@ -28726,7 +28881,18 @@ define("ember-runtime/mixins/controller",
|
|
28726
28881
|
|
28727
28882
|
store: null,
|
28728
28883
|
|
28884
|
+
/**
|
28885
|
+
The controller's current model. When retrieving or modifying a controller's
|
28886
|
+
model, this property should be used instead of the `content` property.
|
28887
|
+
|
28888
|
+
@property model
|
28889
|
+
@public
|
28890
|
+
*/
|
28729
28891
|
model: null,
|
28892
|
+
|
28893
|
+
/**
|
28894
|
+
@private
|
28895
|
+
*/
|
28730
28896
|
content: computed.alias('model'),
|
28731
28897
|
|
28732
28898
|
deprecatedSendHandles: function(actionName) {
|
@@ -28769,6 +28935,8 @@ define("ember-runtime/mixins/controller_content_model_alias_deprecation",
|
|
28769
28935
|
|
28770
28936
|
@class ControllerContentModelAliasDeprecation
|
28771
28937
|
@namespace Ember
|
28938
|
+
@private
|
28939
|
+
@since 1.7.0
|
28772
28940
|
*/
|
28773
28941
|
__exports__["default"] = Mixin.create({
|
28774
28942
|
/**
|
@@ -36081,6 +36249,7 @@ define("ember-testing/test",
|
|
36081
36249
|
|
36082
36250
|
@property _helpers
|
36083
36251
|
@private
|
36252
|
+
@since 1.7.0
|
36084
36253
|
*/
|
36085
36254
|
_helpers: helpers,
|
36086
36255
|
|
@@ -36884,6 +37053,7 @@ define("ember-views/system/event_dispatcher",
|
|
36884
37053
|
@property canDispatchToEventManager
|
36885
37054
|
@type boolean
|
36886
37055
|
@default 'true'
|
37056
|
+
@since 1.7.0
|
36887
37057
|
*/
|
36888
37058
|
canDispatchToEventManager: true,
|
36889
37059
|
|
@@ -39543,14 +39713,15 @@ define("ember-views/views/states/in_dom",
|
|
39543
39713
|
__exports__["default"] = inDOM;
|
39544
39714
|
});
|
39545
39715
|
define("ember-views/views/states/pre_render",
|
39546
|
-
["ember-views/views/states/default","ember-metal/platform","ember-metal/merge","exports"],
|
39547
|
-
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
39716
|
+
["ember-views/views/states/default","ember-metal/platform","ember-metal/merge","ember-views/system/jquery","exports"],
|
39717
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
|
39548
39718
|
"use strict";
|
39549
39719
|
/* global Node */
|
39550
39720
|
|
39551
39721
|
var _default = __dependency1__["default"];
|
39552
39722
|
var create = __dependency2__.create;
|
39553
39723
|
var merge = __dependency3__["default"];
|
39724
|
+
var jQuery = __dependency4__["default"];
|
39554
39725
|
|
39555
39726
|
/**
|
39556
39727
|
@module ember
|
@@ -39558,23 +39729,6 @@ define("ember-views/views/states/pre_render",
|
|
39558
39729
|
*/
|
39559
39730
|
var preRender = create(_default);
|
39560
39731
|
|
39561
|
-
var containsElement;
|
39562
|
-
if (typeof Node === 'object') {
|
39563
|
-
containsElement = Node.prototype.contains;
|
39564
|
-
|
39565
|
-
if (!containsElement && Node.prototype.compareDocumentPosition) {
|
39566
|
-
// polyfill for older Firefox.
|
39567
|
-
// http://compatibility.shwups-cms.ch/en/polyfills/?&id=52
|
39568
|
-
containsElement = function(node){
|
39569
|
-
return !!(this.compareDocumentPosition(node) & 16);
|
39570
|
-
};
|
39571
|
-
}
|
39572
|
-
} else {
|
39573
|
-
containsElement = function(element) {
|
39574
|
-
return this.contains(element);
|
39575
|
-
};
|
39576
|
-
}
|
39577
|
-
|
39578
39732
|
merge(preRender, {
|
39579
39733
|
// a view leaves the preRender state once its element has been
|
39580
39734
|
// created (createElement).
|
@@ -39588,7 +39742,7 @@ define("ember-views/views/states/pre_render",
|
|
39588
39742
|
|
39589
39743
|
// We transition to `inDOM` if the element exists in the DOM
|
39590
39744
|
var element = view.get('element');
|
39591
|
-
if (
|
39745
|
+
if (jQuery.contains(document.body, element)) {
|
39592
39746
|
viewCollection.transitionTo('inDOM', false);
|
39593
39747
|
viewCollection.trigger('didInsertElement');
|
39594
39748
|
}
|
@@ -42627,9 +42781,11 @@ define("metamorph",
|
|
42627
42781
|
});
|
42628
42782
|
|
42629
42783
|
define("route-recognizer",
|
42630
|
-
["exports"],
|
42631
|
-
function(__exports__) {
|
42784
|
+
["route-recognizer/dsl","exports"],
|
42785
|
+
function(__dependency1__, __exports__) {
|
42632
42786
|
"use strict";
|
42787
|
+
var map = __dependency1__["default"];
|
42788
|
+
|
42633
42789
|
var specials = [
|
42634
42790
|
'/', '.', '*', '+', '?', '|',
|
42635
42791
|
'(', ')', '[', ']', '{', '}', '\\'
|
@@ -43055,7 +43211,7 @@ define("route-recognizer",
|
|
43055
43211
|
if (value == null) {
|
43056
43212
|
continue;
|
43057
43213
|
}
|
43058
|
-
var pair = key;
|
43214
|
+
var pair = encodeURIComponent(key);
|
43059
43215
|
if (isArray(value)) {
|
43060
43216
|
for (var j = 0, l = value.length; j < l; j++) {
|
43061
43217
|
var arrayPair = key + '[]' + '=' + encodeURIComponent(value[j]);
|
@@ -43096,7 +43252,7 @@ define("route-recognizer",
|
|
43096
43252
|
if (isArray) {
|
43097
43253
|
queryParams[key].push(value);
|
43098
43254
|
} else {
|
43099
|
-
queryParams[key] =
|
43255
|
+
queryParams[key] = value;
|
43100
43256
|
}
|
43101
43257
|
}
|
43102
43258
|
return queryParams;
|
@@ -43107,8 +43263,6 @@ define("route-recognizer",
|
|
43107
43263
|
pathLen, i, l, queryStart, queryParams = {},
|
43108
43264
|
isSlashDropped = false;
|
43109
43265
|
|
43110
|
-
path = decodeURI(path);
|
43111
|
-
|
43112
43266
|
queryStart = path.indexOf('?');
|
43113
43267
|
if (queryStart !== -1) {
|
43114
43268
|
var queryString = path.substr(queryStart + 1, path.length);
|
@@ -43116,6 +43270,8 @@ define("route-recognizer",
|
|
43116
43270
|
queryParams = this.parseQueryString(queryString);
|
43117
43271
|
}
|
43118
43272
|
|
43273
|
+
path = decodeURI(path);
|
43274
|
+
|
43119
43275
|
// DEBUG GROUP path
|
43120
43276
|
|
43121
43277
|
if (path.charAt(0) !== "/") { path = "/" + path; }
|
@@ -43153,8 +43309,14 @@ define("route-recognizer",
|
|
43153
43309
|
}
|
43154
43310
|
};
|
43155
43311
|
|
43156
|
-
|
43312
|
+
RouteRecognizer.prototype.map = map;
|
43157
43313
|
|
43314
|
+
__exports__["default"] = RouteRecognizer;
|
43315
|
+
});
|
43316
|
+
define("route-recognizer/dsl",
|
43317
|
+
["exports"],
|
43318
|
+
function(__exports__) {
|
43319
|
+
"use strict";
|
43158
43320
|
function Target(path, matcher, delegate) {
|
43159
43321
|
this.path = path;
|
43160
43322
|
this.matcher = matcher;
|
@@ -43244,7 +43406,7 @@ define("route-recognizer",
|
|
43244
43406
|
}
|
43245
43407
|
}
|
43246
43408
|
|
43247
|
-
|
43409
|
+
__exports__["default"] = function(callback, addRouteCallback) {
|
43248
43410
|
var matcher = new Matcher();
|
43249
43411
|
|
43250
43412
|
callback(generateMatch("", matcher, this.delegate));
|
@@ -43253,7 +43415,7 @@ define("route-recognizer",
|
|
43253
43415
|
if (addRouteCallback) { addRouteCallback(this, route); }
|
43254
43416
|
else { this.add(route); }
|
43255
43417
|
}, this);
|
43256
|
-
}
|
43418
|
+
}
|
43257
43419
|
});
|
43258
43420
|
|
43259
43421
|
define("router/handler-info",
|
@@ -45346,226 +45508,370 @@ define("router",
|
|
45346
45508
|
__exports__["default"] = Router;
|
45347
45509
|
});
|
45348
45510
|
|
45349
|
-
|
45350
|
-
|
45351
|
-
|
45352
|
-
|
45353
|
-
|
45354
|
-
|
45355
|
-
|
45356
|
-
|
45357
|
-
|
45358
|
-
|
45359
|
-
|
45511
|
+
define("rsvp",
|
45512
|
+
["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all-settled","./rsvp/race","./rsvp/hash","./rsvp/hash-settled","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/filter","./rsvp/asap","exports"],
|
45513
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __exports__) {
|
45514
|
+
"use strict";
|
45515
|
+
var Promise = __dependency1__["default"];
|
45516
|
+
var EventTarget = __dependency2__["default"];
|
45517
|
+
var denodeify = __dependency3__["default"];
|
45518
|
+
var all = __dependency4__["default"];
|
45519
|
+
var allSettled = __dependency5__["default"];
|
45520
|
+
var race = __dependency6__["default"];
|
45521
|
+
var hash = __dependency7__["default"];
|
45522
|
+
var hashSettled = __dependency8__["default"];
|
45523
|
+
var rethrow = __dependency9__["default"];
|
45524
|
+
var defer = __dependency10__["default"];
|
45525
|
+
var config = __dependency11__.config;
|
45526
|
+
var configure = __dependency11__.configure;
|
45527
|
+
var map = __dependency12__["default"];
|
45528
|
+
var resolve = __dependency13__["default"];
|
45529
|
+
var reject = __dependency14__["default"];
|
45530
|
+
var filter = __dependency15__["default"];
|
45531
|
+
var asap = __dependency16__["default"];
|
45532
|
+
|
45533
|
+
config.async = asap; // default async is asap;
|
45534
|
+
var cast = resolve;
|
45535
|
+
function async(callback, arg) {
|
45536
|
+
config.async(callback, arg);
|
45537
|
+
}
|
45538
|
+
|
45539
|
+
function on() {
|
45540
|
+
config.on.apply(config, arguments);
|
45541
|
+
}
|
45542
|
+
|
45543
|
+
function off() {
|
45544
|
+
config.off.apply(config, arguments);
|
45545
|
+
}
|
45546
|
+
|
45547
|
+
// Set up instrumentation through `window.__PROMISE_INTRUMENTATION__`
|
45548
|
+
if (typeof window !== 'undefined' && typeof window['__PROMISE_INSTRUMENTATION__'] === 'object') {
|
45549
|
+
var callbacks = window['__PROMISE_INSTRUMENTATION__'];
|
45550
|
+
configure('instrument', true);
|
45551
|
+
for (var eventName in callbacks) {
|
45552
|
+
if (callbacks.hasOwnProperty(eventName)) {
|
45553
|
+
on(eventName, callbacks[eventName]);
|
45554
|
+
}
|
45555
|
+
}
|
45556
|
+
}
|
45557
|
+
|
45558
|
+
__exports__.cast = cast;
|
45559
|
+
__exports__.Promise = Promise;
|
45560
|
+
__exports__.EventTarget = EventTarget;
|
45561
|
+
__exports__.all = all;
|
45562
|
+
__exports__.allSettled = allSettled;
|
45563
|
+
__exports__.race = race;
|
45564
|
+
__exports__.hash = hash;
|
45565
|
+
__exports__.hashSettled = hashSettled;
|
45566
|
+
__exports__.rethrow = rethrow;
|
45567
|
+
__exports__.defer = defer;
|
45568
|
+
__exports__.denodeify = denodeify;
|
45569
|
+
__exports__.configure = configure;
|
45570
|
+
__exports__.on = on;
|
45571
|
+
__exports__.off = off;
|
45572
|
+
__exports__.resolve = resolve;
|
45573
|
+
__exports__.reject = reject;
|
45574
|
+
__exports__.async = async;
|
45575
|
+
__exports__.map = map;
|
45576
|
+
__exports__.filter = filter;
|
45577
|
+
});
|
45578
|
+
define("rsvp.umd",
|
45579
|
+
["./rsvp"],
|
45580
|
+
function(__dependency1__) {
|
45581
|
+
"use strict";
|
45582
|
+
var Promise = __dependency1__.Promise;
|
45583
|
+
var allSettled = __dependency1__.allSettled;
|
45584
|
+
var hash = __dependency1__.hash;
|
45585
|
+
var hashSettled = __dependency1__.hashSettled;
|
45586
|
+
var denodeify = __dependency1__.denodeify;
|
45587
|
+
var on = __dependency1__.on;
|
45588
|
+
var off = __dependency1__.off;
|
45589
|
+
var map = __dependency1__.map;
|
45590
|
+
var filter = __dependency1__.filter;
|
45591
|
+
var resolve = __dependency1__.resolve;
|
45592
|
+
var reject = __dependency1__.reject;
|
45593
|
+
var rethrow = __dependency1__.rethrow;
|
45594
|
+
var all = __dependency1__.all;
|
45595
|
+
var defer = __dependency1__.defer;
|
45596
|
+
var EventTarget = __dependency1__.EventTarget;
|
45597
|
+
var configure = __dependency1__.configure;
|
45598
|
+
var race = __dependency1__.race;
|
45599
|
+
var async = __dependency1__.async;
|
45600
|
+
|
45601
|
+
var RSVP = {
|
45602
|
+
'race': race,
|
45603
|
+
'Promise': Promise,
|
45604
|
+
'allSettled': allSettled,
|
45605
|
+
'hash': hash,
|
45606
|
+
'hashSettled': hashSettled,
|
45607
|
+
'denodeify': denodeify,
|
45608
|
+
'on': on,
|
45609
|
+
'off': off,
|
45610
|
+
'map': map,
|
45611
|
+
'filter': filter,
|
45612
|
+
'resolve': resolve,
|
45613
|
+
'reject': reject,
|
45614
|
+
'all': all,
|
45615
|
+
'rethrow': rethrow,
|
45616
|
+
'defer': defer,
|
45617
|
+
'EventTarget': EventTarget,
|
45618
|
+
'configure': configure,
|
45619
|
+
'async': async
|
45620
|
+
};
|
45621
|
+
|
45622
|
+
/* global define:true module:true window: true */
|
45623
|
+
if (typeof define === 'function' && define.amd) {
|
45624
|
+
define(function() { return RSVP; });
|
45625
|
+
} else if (typeof module !== 'undefined' && module.exports) {
|
45626
|
+
module.exports = RSVP;
|
45627
|
+
} else if (typeof this !== 'undefined') {
|
45628
|
+
this['RSVP'] = RSVP;
|
45629
|
+
}
|
45630
|
+
});
|
45631
|
+
define("rsvp/-internal",
|
45632
|
+
["./utils","./instrument","./config","exports"],
|
45633
|
+
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
45634
|
+
"use strict";
|
45360
45635
|
var objectOrFunction = __dependency1__.objectOrFunction;
|
45361
45636
|
var isFunction = __dependency1__.isFunction;
|
45362
|
-
|
45363
|
-
var instrument = __dependency2__[
|
45637
|
+
|
45638
|
+
var instrument = __dependency2__["default"];
|
45639
|
+
|
45364
45640
|
var config = __dependency3__.config;
|
45365
|
-
|
45366
|
-
}
|
45367
|
-
|
45641
|
+
|
45642
|
+
function noop() {}
|
45643
|
+
|
45644
|
+
var PENDING = void 0;
|
45368
45645
|
var FULFILLED = 1;
|
45369
|
-
var REJECTED
|
45646
|
+
var REJECTED = 2;
|
45647
|
+
|
45370
45648
|
var GET_THEN_ERROR = new ErrorObject();
|
45649
|
+
|
45371
45650
|
function getThen(promise) {
|
45372
|
-
|
45373
|
-
|
45374
|
-
|
45375
|
-
|
45376
|
-
|
45377
|
-
|
45651
|
+
try {
|
45652
|
+
return promise.then;
|
45653
|
+
} catch(error) {
|
45654
|
+
GET_THEN_ERROR.error = error;
|
45655
|
+
return GET_THEN_ERROR;
|
45656
|
+
}
|
45378
45657
|
}
|
45658
|
+
|
45379
45659
|
function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
|
45380
|
-
|
45381
|
-
|
45382
|
-
|
45383
|
-
|
45384
|
-
|
45660
|
+
try {
|
45661
|
+
then.call(value, fulfillmentHandler, rejectionHandler);
|
45662
|
+
} catch(e) {
|
45663
|
+
return e;
|
45664
|
+
}
|
45385
45665
|
}
|
45666
|
+
|
45386
45667
|
function handleForeignThenable(promise, thenable, then) {
|
45387
|
-
|
45388
|
-
|
45389
|
-
|
45390
|
-
|
45391
|
-
|
45392
|
-
|
45393
|
-
|
45394
|
-
|
45395
|
-
|
45396
|
-
|
45397
|
-
|
45398
|
-
|
45399
|
-
|
45400
|
-
|
45401
|
-
|
45402
|
-
|
45403
|
-
|
45404
|
-
|
45405
|
-
|
45406
|
-
|
45407
|
-
|
45408
|
-
|
45409
|
-
}
|
45410
|
-
}, promise);
|
45668
|
+
config.async(function(promise) {
|
45669
|
+
var sealed = false;
|
45670
|
+
var error = tryThen(then, thenable, function(value) {
|
45671
|
+
if (sealed) { return; }
|
45672
|
+
sealed = true;
|
45673
|
+
if (thenable !== value) {
|
45674
|
+
resolve(promise, value);
|
45675
|
+
} else {
|
45676
|
+
fulfill(promise, value);
|
45677
|
+
}
|
45678
|
+
}, function(reason) {
|
45679
|
+
if (sealed) { return; }
|
45680
|
+
sealed = true;
|
45681
|
+
|
45682
|
+
reject(promise, reason);
|
45683
|
+
}, 'Settle: ' + (promise._label || ' unknown promise'));
|
45684
|
+
|
45685
|
+
if (!sealed && error) {
|
45686
|
+
sealed = true;
|
45687
|
+
reject(promise, error);
|
45688
|
+
}
|
45689
|
+
}, promise);
|
45411
45690
|
}
|
45691
|
+
|
45412
45692
|
function handleOwnThenable(promise, thenable) {
|
45413
|
-
|
45414
|
-
|
45415
|
-
|
45416
|
-
|
45417
|
-
|
45418
|
-
|
45419
|
-
|
45420
|
-
|
45421
|
-
|
45422
|
-
|
45423
|
-
|
45424
|
-
|
45425
|
-
|
45426
|
-
|
45427
|
-
|
45428
|
-
}
|
45693
|
+
if (thenable._state === FULFILLED) {
|
45694
|
+
fulfill(promise, thenable._result);
|
45695
|
+
} else if (promise._state === REJECTED) {
|
45696
|
+
reject(promise, thenable._result);
|
45697
|
+
} else {
|
45698
|
+
subscribe(thenable, undefined, function(value) {
|
45699
|
+
if (thenable !== value) {
|
45700
|
+
resolve(promise, value);
|
45701
|
+
} else {
|
45702
|
+
fulfill(promise, value);
|
45703
|
+
}
|
45704
|
+
}, function(reason) {
|
45705
|
+
reject(promise, reason);
|
45706
|
+
});
|
45707
|
+
}
|
45429
45708
|
}
|
45709
|
+
|
45430
45710
|
function handleMaybeThenable(promise, maybeThenable) {
|
45431
|
-
|
45432
|
-
|
45711
|
+
if (maybeThenable.constructor === promise.constructor) {
|
45712
|
+
handleOwnThenable(promise, maybeThenable);
|
45713
|
+
} else {
|
45714
|
+
var then = getThen(maybeThenable);
|
45715
|
+
|
45716
|
+
if (then === GET_THEN_ERROR) {
|
45717
|
+
reject(promise, GET_THEN_ERROR.error);
|
45718
|
+
} else if (then === undefined) {
|
45719
|
+
fulfill(promise, maybeThenable);
|
45720
|
+
} else if (isFunction(then)) {
|
45721
|
+
handleForeignThenable(promise, maybeThenable, then);
|
45433
45722
|
} else {
|
45434
|
-
|
45435
|
-
if (then === GET_THEN_ERROR) {
|
45436
|
-
reject(promise, GET_THEN_ERROR.error);
|
45437
|
-
} else if (then === undefined) {
|
45438
|
-
fulfill(promise, maybeThenable);
|
45439
|
-
} else if (isFunction(then)) {
|
45440
|
-
handleForeignThenable(promise, maybeThenable, then);
|
45441
|
-
} else {
|
45442
|
-
fulfill(promise, maybeThenable);
|
45443
|
-
}
|
45723
|
+
fulfill(promise, maybeThenable);
|
45444
45724
|
}
|
45725
|
+
}
|
45445
45726
|
}
|
45727
|
+
|
45446
45728
|
function resolve(promise, value) {
|
45447
|
-
|
45448
|
-
|
45449
|
-
|
45450
|
-
|
45451
|
-
|
45452
|
-
|
45453
|
-
|
45729
|
+
if (promise === value) {
|
45730
|
+
fulfill(promise, value);
|
45731
|
+
} else if (objectOrFunction(value)) {
|
45732
|
+
handleMaybeThenable(promise, value);
|
45733
|
+
} else {
|
45734
|
+
fulfill(promise, value);
|
45735
|
+
}
|
45454
45736
|
}
|
45737
|
+
|
45455
45738
|
function publishRejection(promise) {
|
45456
|
-
|
45457
|
-
|
45458
|
-
|
45459
|
-
|
45739
|
+
if (promise._onerror) {
|
45740
|
+
promise._onerror(promise._result);
|
45741
|
+
}
|
45742
|
+
|
45743
|
+
publish(promise);
|
45460
45744
|
}
|
45745
|
+
|
45461
45746
|
function fulfill(promise, value) {
|
45462
|
-
|
45463
|
-
|
45464
|
-
|
45465
|
-
|
45466
|
-
|
45467
|
-
|
45468
|
-
|
45469
|
-
|
45470
|
-
}
|
45471
|
-
} else {
|
45472
|
-
config.async(publish, promise);
|
45747
|
+
if (promise._state !== PENDING) { return; }
|
45748
|
+
|
45749
|
+
promise._result = value;
|
45750
|
+
promise._state = FULFILLED;
|
45751
|
+
|
45752
|
+
if (promise._subscribers.length === 0) {
|
45753
|
+
if (config.instrument) {
|
45754
|
+
instrument('fulfilled', promise);
|
45473
45755
|
}
|
45756
|
+
} else {
|
45757
|
+
config.async(publish, promise);
|
45758
|
+
}
|
45474
45759
|
}
|
45760
|
+
|
45475
45761
|
function reject(promise, reason) {
|
45476
|
-
|
45477
|
-
|
45478
|
-
|
45479
|
-
|
45480
|
-
|
45481
|
-
config.async(publishRejection, promise);
|
45762
|
+
if (promise._state !== PENDING) { return; }
|
45763
|
+
promise._state = REJECTED;
|
45764
|
+
promise._result = reason;
|
45765
|
+
|
45766
|
+
config.async(publishRejection, promise);
|
45482
45767
|
}
|
45768
|
+
|
45483
45769
|
function subscribe(parent, child, onFulfillment, onRejection) {
|
45484
|
-
|
45485
|
-
|
45486
|
-
|
45487
|
-
|
45488
|
-
|
45489
|
-
|
45490
|
-
|
45491
|
-
|
45492
|
-
|
45770
|
+
var subscribers = parent._subscribers;
|
45771
|
+
var length = subscribers.length;
|
45772
|
+
|
45773
|
+
parent._onerror = null;
|
45774
|
+
|
45775
|
+
subscribers[length] = child;
|
45776
|
+
subscribers[length + FULFILLED] = onFulfillment;
|
45777
|
+
subscribers[length + REJECTED] = onRejection;
|
45778
|
+
|
45779
|
+
if (length === 0 && parent._state) {
|
45780
|
+
config.async(publish, parent);
|
45781
|
+
}
|
45493
45782
|
}
|
45783
|
+
|
45494
45784
|
function publish(promise) {
|
45495
|
-
|
45496
|
-
|
45497
|
-
|
45498
|
-
|
45499
|
-
|
45500
|
-
|
45501
|
-
|
45502
|
-
|
45503
|
-
|
45504
|
-
|
45505
|
-
|
45506
|
-
|
45507
|
-
|
45508
|
-
|
45509
|
-
|
45510
|
-
|
45511
|
-
|
45785
|
+
var subscribers = promise._subscribers;
|
45786
|
+
var settled = promise._state;
|
45787
|
+
|
45788
|
+
if (config.instrument) {
|
45789
|
+
instrument(settled === FULFILLED ? 'fulfilled' : 'rejected', promise);
|
45790
|
+
}
|
45791
|
+
|
45792
|
+
if (subscribers.length === 0) { return; }
|
45793
|
+
|
45794
|
+
var child, callback, detail = promise._result;
|
45795
|
+
|
45796
|
+
for (var i = 0; i < subscribers.length; i += 3) {
|
45797
|
+
child = subscribers[i];
|
45798
|
+
callback = subscribers[i + settled];
|
45799
|
+
|
45800
|
+
if (child) {
|
45801
|
+
invokeCallback(settled, child, callback, detail);
|
45802
|
+
} else {
|
45803
|
+
callback(detail);
|
45512
45804
|
}
|
45513
|
-
|
45805
|
+
}
|
45806
|
+
|
45807
|
+
promise._subscribers.length = 0;
|
45514
45808
|
}
|
45809
|
+
|
45515
45810
|
function ErrorObject() {
|
45516
|
-
|
45811
|
+
this.error = null;
|
45517
45812
|
}
|
45813
|
+
|
45518
45814
|
var TRY_CATCH_ERROR = new ErrorObject();
|
45815
|
+
|
45519
45816
|
function tryCatch(callback, detail) {
|
45520
|
-
|
45521
|
-
|
45522
|
-
|
45523
|
-
|
45524
|
-
|
45525
|
-
|
45817
|
+
try {
|
45818
|
+
return callback(detail);
|
45819
|
+
} catch(e) {
|
45820
|
+
TRY_CATCH_ERROR.error = e;
|
45821
|
+
return TRY_CATCH_ERROR;
|
45822
|
+
}
|
45526
45823
|
}
|
45824
|
+
|
45527
45825
|
function invokeCallback(settled, promise, callback, detail) {
|
45528
|
-
|
45529
|
-
|
45530
|
-
|
45531
|
-
|
45532
|
-
|
45533
|
-
|
45534
|
-
|
45535
|
-
|
45536
|
-
|
45537
|
-
|
45538
|
-
if (promise === value) {
|
45539
|
-
reject(promise, new TypeError('A promises callback cannot return that same promise.'));
|
45540
|
-
return;
|
45541
|
-
}
|
45826
|
+
var hasCallback = isFunction(callback),
|
45827
|
+
value, error, succeeded, failed;
|
45828
|
+
|
45829
|
+
if (hasCallback) {
|
45830
|
+
value = tryCatch(callback, detail);
|
45831
|
+
|
45832
|
+
if (value === TRY_CATCH_ERROR) {
|
45833
|
+
failed = true;
|
45834
|
+
error = value.error;
|
45835
|
+
value = null;
|
45542
45836
|
} else {
|
45543
|
-
|
45544
|
-
succeeded = true;
|
45837
|
+
succeeded = true;
|
45545
45838
|
}
|
45546
|
-
|
45547
|
-
|
45548
|
-
|
45549
|
-
|
45550
|
-
} else if (failed) {
|
45551
|
-
reject(promise, error);
|
45552
|
-
} else if (settled === FULFILLED) {
|
45553
|
-
fulfill(promise, value);
|
45554
|
-
} else if (settled === REJECTED) {
|
45555
|
-
reject(promise, value);
|
45839
|
+
|
45840
|
+
if (promise === value) {
|
45841
|
+
reject(promise, new TypeError('A promises callback cannot return that same promise.'));
|
45842
|
+
return;
|
45556
45843
|
}
|
45844
|
+
|
45845
|
+
} else {
|
45846
|
+
value = detail;
|
45847
|
+
succeeded = true;
|
45848
|
+
}
|
45849
|
+
|
45850
|
+
if (promise._state !== PENDING) {
|
45851
|
+
// noop
|
45852
|
+
} else if (hasCallback && succeeded) {
|
45853
|
+
resolve(promise, value);
|
45854
|
+
} else if (failed) {
|
45855
|
+
reject(promise, error);
|
45856
|
+
} else if (settled === FULFILLED) {
|
45857
|
+
fulfill(promise, value);
|
45858
|
+
} else if (settled === REJECTED) {
|
45859
|
+
reject(promise, value);
|
45860
|
+
}
|
45557
45861
|
}
|
45862
|
+
|
45558
45863
|
function initializePromise(promise, resolver) {
|
45559
|
-
|
45560
|
-
|
45561
|
-
|
45562
|
-
|
45563
|
-
|
45564
|
-
|
45565
|
-
|
45566
|
-
|
45567
|
-
|
45864
|
+
try {
|
45865
|
+
resolver(function resolvePromise(value){
|
45866
|
+
resolve(promise, value);
|
45867
|
+
}, function rejectPromise(reason) {
|
45868
|
+
reject(promise, reason);
|
45869
|
+
});
|
45870
|
+
} catch(e) {
|
45871
|
+
reject(promise, e);
|
45872
|
+
}
|
45568
45873
|
}
|
45874
|
+
|
45569
45875
|
__exports__.noop = noop;
|
45570
45876
|
__exports__.resolve = resolve;
|
45571
45877
|
__exports__.reject = reject;
|
@@ -45577,27 +45883,28 @@ define('rsvp/-internal', [
|
|
45577
45883
|
__exports__.invokeCallback = invokeCallback;
|
45578
45884
|
__exports__.FULFILLED = FULFILLED;
|
45579
45885
|
__exports__.REJECTED = REJECTED;
|
45580
|
-
|
45581
|
-
|
45582
|
-
|
45583
|
-
|
45584
|
-
|
45585
|
-
|
45586
|
-
|
45587
|
-
'use strict';
|
45588
|
-
var Enumerator = __dependency1__['default'];
|
45886
|
+
__exports__.PENDING = PENDING;
|
45887
|
+
});
|
45888
|
+
define("rsvp/all-settled",
|
45889
|
+
["./enumerator","./promise","./utils","exports"],
|
45890
|
+
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
45891
|
+
"use strict";
|
45892
|
+
var Enumerator = __dependency1__["default"];
|
45589
45893
|
var makeSettledResult = __dependency1__.makeSettledResult;
|
45590
|
-
var Promise = __dependency2__[
|
45894
|
+
var Promise = __dependency2__["default"];
|
45591
45895
|
var o_create = __dependency3__.o_create;
|
45896
|
+
|
45592
45897
|
function AllSettled(Constructor, entries, label) {
|
45593
|
-
|
45898
|
+
this._superConstructor(Constructor, entries, false /* don't abort on reject */, label);
|
45594
45899
|
}
|
45900
|
+
|
45595
45901
|
AllSettled.prototype = o_create(Enumerator.prototype);
|
45596
45902
|
AllSettled.prototype._superConstructor = Enumerator;
|
45597
45903
|
AllSettled.prototype._makeResult = makeSettledResult;
|
45598
|
-
AllSettled.prototype._validationError = function
|
45599
|
-
|
45904
|
+
AllSettled.prototype._validationError = function() {
|
45905
|
+
return new Error('allSettled must be called with an array');
|
45600
45906
|
};
|
45907
|
+
|
45601
45908
|
/**
|
45602
45909
|
`RSVP.allSettled` is similar to `RSVP.all`, but instead of implementing
|
45603
45910
|
a fail-fast method, it waits until all the promises have returned and
|
@@ -45632,8 +45939,8 @@ define('rsvp/all-settled', [
|
|
45632
45939
|
// { state: 'rejected', reason: Error },
|
45633
45940
|
// { state: 'rejected', reason: Error }
|
45634
45941
|
// ]
|
45635
|
-
// Note that for the second item, reason.message will be
|
45636
|
-
// third item, reason.message will be
|
45942
|
+
// Note that for the second item, reason.message will be '2', and for the
|
45943
|
+
// third item, reason.message will be '3'.
|
45637
45944
|
}, function(error) {
|
45638
45945
|
// Not run. (This block would only be called if allSettled had failed,
|
45639
45946
|
// for instance if passed an incorrect argument type.)
|
@@ -45649,16 +45956,17 @@ define('rsvp/all-settled', [
|
|
45649
45956
|
@return {Promise} promise that is fulfilled with an array of the settled
|
45650
45957
|
states of the constituent promises.
|
45651
45958
|
*/
|
45652
|
-
|
45653
|
-
|
45654
|
-
|
45655
|
-
}
|
45656
|
-
|
45657
|
-
|
45658
|
-
|
45659
|
-
|
45660
|
-
|
45661
|
-
var Promise = __dependency1__[
|
45959
|
+
|
45960
|
+
__exports__["default"] = function allSettled(entries, label) {
|
45961
|
+
return new AllSettled(Promise, entries, label).promise;
|
45962
|
+
}
|
45963
|
+
});
|
45964
|
+
define("rsvp/all",
|
45965
|
+
["./promise","exports"],
|
45966
|
+
function(__dependency1__, __exports__) {
|
45967
|
+
"use strict";
|
45968
|
+
var Promise = __dependency1__["default"];
|
45969
|
+
|
45662
45970
|
/**
|
45663
45971
|
This is a convenient alias for `RSVP.Promise.all`.
|
45664
45972
|
|
@@ -45669,110 +45977,134 @@ define('rsvp/all', [
|
|
45669
45977
|
@param {String} label An optional label. This is useful
|
45670
45978
|
for tooling.
|
45671
45979
|
*/
|
45672
|
-
__exports__[
|
45673
|
-
|
45674
|
-
}
|
45675
|
-
});
|
45676
|
-
define(
|
45677
|
-
|
45678
|
-
|
45679
|
-
|
45680
|
-
|
45681
|
-
|
45682
|
-
|
45683
|
-
|
45684
|
-
|
45685
|
-
|
45686
|
-
|
45687
|
-
|
45688
|
-
|
45689
|
-
|
45690
|
-
|
45980
|
+
__exports__["default"] = function all(array, label) {
|
45981
|
+
return Promise.all(array, label);
|
45982
|
+
}
|
45983
|
+
});
|
45984
|
+
define("rsvp/asap",
|
45985
|
+
["exports"],
|
45986
|
+
function(__exports__) {
|
45987
|
+
"use strict";
|
45988
|
+
var len = 0;
|
45989
|
+
|
45990
|
+
__exports__["default"] = function asap(callback, arg) {
|
45991
|
+
queue[len] = callback;
|
45992
|
+
queue[len + 1] = arg;
|
45993
|
+
len += 2;
|
45994
|
+
if (len === 2) {
|
45995
|
+
// If len is 1, that means that we need to schedule an async flush.
|
45996
|
+
// If additional callbacks are queued before the queue is flushed, they
|
45997
|
+
// will be processed by this flush that we are scheduling.
|
45998
|
+
scheduleFlush();
|
45999
|
+
}
|
46000
|
+
}
|
46001
|
+
|
46002
|
+
var browserGlobal = (typeof window !== 'undefined') ? window : {};
|
45691
46003
|
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
|
46004
|
+
|
45692
46005
|
// test for web worker but not in IE10
|
45693
|
-
var isWorker = typeof Uint8ClampedArray !== 'undefined' &&
|
46006
|
+
var isWorker = typeof Uint8ClampedArray !== 'undefined' &&
|
46007
|
+
typeof importScripts !== 'undefined' &&
|
46008
|
+
typeof MessageChannel !== 'undefined';
|
46009
|
+
|
45694
46010
|
// node
|
45695
46011
|
function useNextTick() {
|
45696
|
-
|
45697
|
-
|
45698
|
-
|
46012
|
+
return function() {
|
46013
|
+
process.nextTick(flush);
|
46014
|
+
};
|
45699
46015
|
}
|
46016
|
+
|
45700
46017
|
function useMutationObserver() {
|
45701
|
-
|
45702
|
-
|
45703
|
-
|
45704
|
-
|
45705
|
-
|
45706
|
-
|
45707
|
-
|
46018
|
+
var iterations = 0;
|
46019
|
+
var observer = new BrowserMutationObserver(flush);
|
46020
|
+
var node = document.createTextNode('');
|
46021
|
+
observer.observe(node, { characterData: true });
|
46022
|
+
|
46023
|
+
return function() {
|
46024
|
+
node.data = (iterations = ++iterations % 2);
|
46025
|
+
};
|
45708
46026
|
}
|
46027
|
+
|
45709
46028
|
// web worker
|
45710
46029
|
function useMessageChannel() {
|
45711
|
-
|
45712
|
-
|
45713
|
-
|
45714
|
-
|
45715
|
-
|
46030
|
+
var channel = new MessageChannel();
|
46031
|
+
channel.port1.onmessage = flush;
|
46032
|
+
return function () {
|
46033
|
+
channel.port2.postMessage(0);
|
46034
|
+
};
|
45716
46035
|
}
|
46036
|
+
|
45717
46037
|
function useSetTimeout() {
|
45718
|
-
|
45719
|
-
|
45720
|
-
|
46038
|
+
return function() {
|
46039
|
+
setTimeout(flush, 1);
|
46040
|
+
};
|
45721
46041
|
}
|
46042
|
+
|
45722
46043
|
var queue = new Array(1000);
|
45723
46044
|
function flush() {
|
45724
|
-
|
45725
|
-
|
45726
|
-
|
45727
|
-
|
45728
|
-
|
45729
|
-
|
45730
|
-
|
45731
|
-
|
46045
|
+
for (var i = 0; i < len; i+=2) {
|
46046
|
+
var callback = queue[i];
|
46047
|
+
var arg = queue[i+1];
|
46048
|
+
|
46049
|
+
callback(arg);
|
46050
|
+
|
46051
|
+
queue[i] = undefined;
|
46052
|
+
queue[i+1] = undefined;
|
46053
|
+
}
|
46054
|
+
|
46055
|
+
len = 0;
|
45732
46056
|
}
|
46057
|
+
|
45733
46058
|
var scheduleFlush;
|
46059
|
+
|
45734
46060
|
// Decide what async method to use to triggering processing of queued callbacks:
|
45735
46061
|
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
|
45736
|
-
|
46062
|
+
scheduleFlush = useNextTick();
|
45737
46063
|
} else if (BrowserMutationObserver) {
|
45738
|
-
|
46064
|
+
scheduleFlush = useMutationObserver();
|
45739
46065
|
} else if (isWorker) {
|
45740
|
-
|
46066
|
+
scheduleFlush = useMessageChannel();
|
45741
46067
|
} else {
|
45742
|
-
|
46068
|
+
scheduleFlush = useSetTimeout();
|
45743
46069
|
}
|
45744
|
-
});
|
45745
|
-
define(
|
45746
|
-
|
45747
|
-
|
45748
|
-
|
45749
|
-
|
45750
|
-
|
45751
|
-
var config = {
|
46070
|
+
});
|
46071
|
+
define("rsvp/config",
|
46072
|
+
["./events","exports"],
|
46073
|
+
function(__dependency1__, __exports__) {
|
46074
|
+
"use strict";
|
46075
|
+
var EventTarget = __dependency1__["default"];
|
46076
|
+
|
46077
|
+
var config = {
|
46078
|
+
instrument: false
|
46079
|
+
};
|
46080
|
+
|
45752
46081
|
EventTarget.mixin(config);
|
46082
|
+
|
45753
46083
|
function configure(name, value) {
|
45754
|
-
|
45755
|
-
|
45756
|
-
|
45757
|
-
|
45758
|
-
|
45759
|
-
|
45760
|
-
|
45761
|
-
|
45762
|
-
|
45763
|
-
|
45764
|
-
|
45765
|
-
|
46084
|
+
if (name === 'onerror') {
|
46085
|
+
// handle for legacy users that expect the actual
|
46086
|
+
// error to be passed to their function added via
|
46087
|
+
// `RSVP.configure('onerror', someFunctionHere);`
|
46088
|
+
config.on('error', value);
|
46089
|
+
return;
|
46090
|
+
}
|
46091
|
+
|
46092
|
+
if (arguments.length === 2) {
|
46093
|
+
config[name] = value;
|
46094
|
+
} else {
|
46095
|
+
return config[name];
|
46096
|
+
}
|
45766
46097
|
}
|
46098
|
+
|
45767
46099
|
__exports__.config = config;
|
45768
46100
|
__exports__.configure = configure;
|
45769
|
-
});
|
45770
|
-
define(
|
45771
|
-
|
45772
|
-
|
45773
|
-
|
45774
|
-
|
45775
|
-
|
46101
|
+
});
|
46102
|
+
define("rsvp/defer",
|
46103
|
+
["./promise","exports"],
|
46104
|
+
function(__dependency1__, __exports__) {
|
46105
|
+
"use strict";
|
46106
|
+
var Promise = __dependency1__["default"];
|
46107
|
+
|
45776
46108
|
/**
|
45777
46109
|
`RSVP.defer` returns an object similar to jQuery's `$.Deferred`.
|
45778
46110
|
`RSVP.defer` should be used when porting over code reliant on `$.Deferred`'s
|
@@ -45805,23 +46137,25 @@ define('rsvp/defer', [
|
|
45805
46137
|
Useful for tooling.
|
45806
46138
|
@return {Object}
|
45807
46139
|
*/
|
45808
|
-
|
45809
|
-
|
45810
|
-
|
45811
|
-
|
45812
|
-
|
45813
|
-
|
45814
|
-
|
45815
|
-
|
45816
|
-
|
45817
|
-
|
45818
|
-
|
45819
|
-
|
45820
|
-
|
45821
|
-
|
45822
|
-
|
46140
|
+
|
46141
|
+
__exports__["default"] = function defer(label) {
|
46142
|
+
var deferred = { };
|
46143
|
+
|
46144
|
+
deferred.promise = new Promise(function(resolve, reject) {
|
46145
|
+
deferred.resolve = resolve;
|
46146
|
+
deferred.reject = reject;
|
46147
|
+
}, label);
|
46148
|
+
|
46149
|
+
return deferred;
|
46150
|
+
}
|
46151
|
+
});
|
46152
|
+
define("rsvp/enumerator",
|
46153
|
+
["./utils","./-internal","exports"],
|
46154
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
46155
|
+
"use strict";
|
45823
46156
|
var isArray = __dependency1__.isArray;
|
45824
46157
|
var isMaybeThenable = __dependency1__.isMaybeThenable;
|
46158
|
+
|
45825
46159
|
var noop = __dependency2__.noop;
|
45826
46160
|
var reject = __dependency2__.reject;
|
45827
46161
|
var fulfill = __dependency2__.fulfill;
|
@@ -45829,173 +46163,331 @@ define('rsvp/enumerator', [
|
|
45829
46163
|
var FULFILLED = __dependency2__.FULFILLED;
|
45830
46164
|
var REJECTED = __dependency2__.REJECTED;
|
45831
46165
|
var PENDING = __dependency2__.PENDING;
|
45832
|
-
|
45833
|
-
__exports__.ABORT_ON_REJECTION = ABORT_ON_REJECTION;
|
46166
|
+
|
45834
46167
|
function makeSettledResult(state, position, value) {
|
45835
|
-
|
45836
|
-
|
45837
|
-
|
45838
|
-
|
45839
|
-
|
45840
|
-
|
45841
|
-
|
45842
|
-
|
45843
|
-
|
45844
|
-
|
45845
|
-
|
46168
|
+
if (state === FULFILLED) {
|
46169
|
+
return {
|
46170
|
+
state: 'fulfilled',
|
46171
|
+
value: value
|
46172
|
+
};
|
46173
|
+
} else {
|
46174
|
+
return {
|
46175
|
+
state: 'rejected',
|
46176
|
+
reason: value
|
46177
|
+
};
|
46178
|
+
}
|
45846
46179
|
}
|
45847
|
-
|
45848
|
-
function Enumerator(Constructor, input, abortOnReject, label) {
|
45849
|
-
|
45850
|
-
|
45851
|
-
|
45852
|
-
|
45853
|
-
|
45854
|
-
|
45855
|
-
|
45856
|
-
|
45857
|
-
|
45858
|
-
|
45859
|
-
|
45860
|
-
|
45861
|
-
|
45862
|
-
if (this._remaining === 0) {
|
45863
|
-
fulfill(this.promise, this._result);
|
45864
|
-
}
|
45865
|
-
}
|
46180
|
+
|
46181
|
+
__exports__.makeSettledResult = makeSettledResult;function Enumerator(Constructor, input, abortOnReject, label) {
|
46182
|
+
this._instanceConstructor = Constructor;
|
46183
|
+
this.promise = new Constructor(noop, label);
|
46184
|
+
this._abortOnReject = abortOnReject;
|
46185
|
+
|
46186
|
+
if (this._validateInput(input)) {
|
46187
|
+
this._input = input;
|
46188
|
+
this.length = input.length;
|
46189
|
+
this._remaining = input.length;
|
46190
|
+
|
46191
|
+
this._init();
|
46192
|
+
|
46193
|
+
if (this.length === 0) {
|
46194
|
+
fulfill(this.promise, this._result);
|
45866
46195
|
} else {
|
45867
|
-
|
46196
|
+
this.length = this.length || 0;
|
46197
|
+
this._enumerate();
|
46198
|
+
if (this._remaining === 0) {
|
46199
|
+
fulfill(this.promise, this._result);
|
46200
|
+
}
|
45868
46201
|
}
|
46202
|
+
} else {
|
46203
|
+
reject(this.promise, this._validationError());
|
46204
|
+
}
|
45869
46205
|
}
|
45870
|
-
|
45871
|
-
|
46206
|
+
|
46207
|
+
Enumerator.prototype._validateInput = function(input) {
|
46208
|
+
return isArray(input);
|
45872
46209
|
};
|
45873
|
-
|
45874
|
-
|
46210
|
+
|
46211
|
+
Enumerator.prototype._validationError = function() {
|
46212
|
+
return new Error('Array Methods must be provided an Array');
|
45875
46213
|
};
|
45876
|
-
|
45877
|
-
|
46214
|
+
|
46215
|
+
Enumerator.prototype._init = function() {
|
46216
|
+
this._result = new Array(this.length);
|
45878
46217
|
};
|
45879
|
-
|
45880
|
-
|
45881
|
-
|
45882
|
-
|
45883
|
-
|
45884
|
-
|
45885
|
-
|
45886
|
-
|
46218
|
+
|
46219
|
+
__exports__["default"] = Enumerator;
|
46220
|
+
|
46221
|
+
Enumerator.prototype._enumerate = function() {
|
46222
|
+
var length = this.length;
|
46223
|
+
var promise = this.promise;
|
46224
|
+
var input = this._input;
|
46225
|
+
|
46226
|
+
for (var i = 0; promise._state === PENDING && i < length; i++) {
|
46227
|
+
this._eachEntry(input[i], i);
|
46228
|
+
}
|
45887
46229
|
};
|
45888
|
-
|
45889
|
-
|
45890
|
-
|
45891
|
-
|
45892
|
-
|
45893
|
-
|
45894
|
-
|
45895
|
-
this._willSettleAt(c.resolve(entry), i);
|
45896
|
-
}
|
46230
|
+
|
46231
|
+
Enumerator.prototype._eachEntry = function(entry, i) {
|
46232
|
+
var c = this._instanceConstructor;
|
46233
|
+
if (isMaybeThenable(entry)) {
|
46234
|
+
if (entry.constructor === c && entry._state !== PENDING) {
|
46235
|
+
entry._onerror = null;
|
46236
|
+
this._settledAt(entry._state, i, entry._result);
|
45897
46237
|
} else {
|
45898
|
-
|
45899
|
-
this._result[i] = this._makeResult(FULFILLED, i, entry);
|
46238
|
+
this._willSettleAt(c.resolve(entry), i);
|
45900
46239
|
}
|
46240
|
+
} else {
|
46241
|
+
this._remaining--;
|
46242
|
+
this._result[i] = this._makeResult(FULFILLED, i, entry);
|
46243
|
+
}
|
45901
46244
|
};
|
45902
|
-
|
45903
|
-
|
45904
|
-
|
45905
|
-
|
45906
|
-
|
45907
|
-
|
45908
|
-
|
45909
|
-
|
45910
|
-
|
45911
|
-
}
|
45912
|
-
|
45913
|
-
fulfill(promise, this._result);
|
46245
|
+
|
46246
|
+
Enumerator.prototype._settledAt = function(state, i, value) {
|
46247
|
+
var promise = this.promise;
|
46248
|
+
|
46249
|
+
if (promise._state === PENDING) {
|
46250
|
+
this._remaining--;
|
46251
|
+
|
46252
|
+
if (this._abortOnReject && state === REJECTED) {
|
46253
|
+
reject(promise, value);
|
46254
|
+
} else {
|
46255
|
+
this._result[i] = this._makeResult(state, i, value);
|
45914
46256
|
}
|
46257
|
+
}
|
46258
|
+
|
46259
|
+
if (this._remaining === 0) {
|
46260
|
+
fulfill(promise, this._result);
|
46261
|
+
}
|
45915
46262
|
};
|
45916
|
-
|
45917
|
-
|
46263
|
+
|
46264
|
+
Enumerator.prototype._makeResult = function(state, i, value) {
|
46265
|
+
return value;
|
45918
46266
|
};
|
45919
|
-
|
45920
|
-
|
45921
|
-
|
45922
|
-
|
45923
|
-
|
45924
|
-
|
45925
|
-
|
46267
|
+
|
46268
|
+
Enumerator.prototype._willSettleAt = function(promise, i) {
|
46269
|
+
var enumerator = this;
|
46270
|
+
|
46271
|
+
subscribe(promise, undefined, function(value) {
|
46272
|
+
enumerator._settledAt(FULFILLED, i, value);
|
46273
|
+
}, function(reason) {
|
46274
|
+
enumerator._settledAt(REJECTED, i, reason);
|
46275
|
+
});
|
45926
46276
|
};
|
45927
|
-
});
|
45928
|
-
define(
|
45929
|
-
|
46277
|
+
});
|
46278
|
+
define("rsvp/events",
|
46279
|
+
["exports"],
|
46280
|
+
function(__exports__) {
|
46281
|
+
"use strict";
|
45930
46282
|
function indexOf(callbacks, callback) {
|
45931
|
-
|
45932
|
-
|
45933
|
-
|
45934
|
-
|
45935
|
-
|
45936
|
-
return -1;
|
46283
|
+
for (var i=0, l=callbacks.length; i<l; i++) {
|
46284
|
+
if (callbacks[i] === callback) { return i; }
|
46285
|
+
}
|
46286
|
+
|
46287
|
+
return -1;
|
45937
46288
|
}
|
46289
|
+
|
45938
46290
|
function callbacksFor(object) {
|
45939
|
-
|
45940
|
-
|
45941
|
-
|
45942
|
-
}
|
45943
|
-
|
46291
|
+
var callbacks = object._promiseCallbacks;
|
46292
|
+
|
46293
|
+
if (!callbacks) {
|
46294
|
+
callbacks = object._promiseCallbacks = {};
|
46295
|
+
}
|
46296
|
+
|
46297
|
+
return callbacks;
|
45944
46298
|
}
|
46299
|
+
|
45945
46300
|
/**
|
45946
46301
|
@class RSVP.EventTarget
|
45947
46302
|
*/
|
45948
|
-
__exports__[
|
45949
|
-
|
45950
|
-
|
45951
|
-
|
45952
|
-
|
45953
|
-
|
45954
|
-
|
45955
|
-
}
|
45956
|
-
|
45957
|
-
|
45958
|
-
|
45959
|
-
|
45960
|
-
|
45961
|
-
|
45962
|
-
|
45963
|
-
|
45964
|
-
|
45965
|
-
|
45966
|
-
|
45967
|
-
|
45968
|
-
|
45969
|
-
|
45970
|
-
|
45971
|
-
|
45972
|
-
|
45973
|
-
|
45974
|
-
|
45975
|
-
|
45976
|
-
|
45977
|
-
}
|
45978
|
-
|
45979
|
-
|
45980
|
-
|
45981
|
-
|
45982
|
-
|
45983
|
-
|
45984
|
-
|
45985
|
-
|
45986
|
-
|
46303
|
+
__exports__["default"] = {
|
46304
|
+
|
46305
|
+
/**
|
46306
|
+
`RSVP.EventTarget.mixin` extends an object with EventTarget methods. For
|
46307
|
+
Example:
|
46308
|
+
|
46309
|
+
```javascript
|
46310
|
+
var object = {};
|
46311
|
+
|
46312
|
+
RSVP.EventTarget.mixin(object);
|
46313
|
+
|
46314
|
+
object.on('finished', function(event) {
|
46315
|
+
// handle event
|
46316
|
+
});
|
46317
|
+
|
46318
|
+
object.trigger('finished', { detail: value });
|
46319
|
+
```
|
46320
|
+
|
46321
|
+
`EventTarget.mixin` also works with prototypes:
|
46322
|
+
|
46323
|
+
```javascript
|
46324
|
+
var Person = function() {};
|
46325
|
+
RSVP.EventTarget.mixin(Person.prototype);
|
46326
|
+
|
46327
|
+
var yehuda = new Person();
|
46328
|
+
var tom = new Person();
|
46329
|
+
|
46330
|
+
yehuda.on('poke', function(event) {
|
46331
|
+
console.log('Yehuda says OW');
|
46332
|
+
});
|
46333
|
+
|
46334
|
+
tom.on('poke', function(event) {
|
46335
|
+
console.log('Tom says OW');
|
46336
|
+
});
|
46337
|
+
|
46338
|
+
yehuda.trigger('poke');
|
46339
|
+
tom.trigger('poke');
|
46340
|
+
```
|
46341
|
+
|
46342
|
+
@method mixin
|
46343
|
+
@for RSVP.EventTarget
|
46344
|
+
@private
|
46345
|
+
@param {Object} object object to extend with EventTarget methods
|
46346
|
+
*/
|
46347
|
+
mixin: function(object) {
|
46348
|
+
object.on = this.on;
|
46349
|
+
object.off = this.off;
|
46350
|
+
object.trigger = this.trigger;
|
46351
|
+
object._promiseCallbacks = undefined;
|
46352
|
+
return object;
|
46353
|
+
},
|
46354
|
+
|
46355
|
+
/**
|
46356
|
+
Registers a callback to be executed when `eventName` is triggered
|
46357
|
+
|
46358
|
+
```javascript
|
46359
|
+
object.on('event', function(eventInfo){
|
46360
|
+
// handle the event
|
46361
|
+
});
|
46362
|
+
|
46363
|
+
object.trigger('event');
|
46364
|
+
```
|
46365
|
+
|
46366
|
+
@method on
|
46367
|
+
@for RSVP.EventTarget
|
46368
|
+
@private
|
46369
|
+
@param {String} eventName name of the event to listen for
|
46370
|
+
@param {Function} callback function to be called when the event is triggered.
|
46371
|
+
*/
|
46372
|
+
on: function(eventName, callback) {
|
46373
|
+
var allCallbacks = callbacksFor(this), callbacks;
|
46374
|
+
|
46375
|
+
callbacks = allCallbacks[eventName];
|
46376
|
+
|
46377
|
+
if (!callbacks) {
|
46378
|
+
callbacks = allCallbacks[eventName] = [];
|
46379
|
+
}
|
46380
|
+
|
46381
|
+
if (indexOf(callbacks, callback) === -1) {
|
46382
|
+
callbacks.push(callback);
|
46383
|
+
}
|
46384
|
+
},
|
46385
|
+
|
46386
|
+
/**
|
46387
|
+
You can use `off` to stop firing a particular callback for an event:
|
46388
|
+
|
46389
|
+
```javascript
|
46390
|
+
function doStuff() { // do stuff! }
|
46391
|
+
object.on('stuff', doStuff);
|
46392
|
+
|
46393
|
+
object.trigger('stuff'); // doStuff will be called
|
46394
|
+
|
46395
|
+
// Unregister ONLY the doStuff callback
|
46396
|
+
object.off('stuff', doStuff);
|
46397
|
+
object.trigger('stuff'); // doStuff will NOT be called
|
46398
|
+
```
|
46399
|
+
|
46400
|
+
If you don't pass a `callback` argument to `off`, ALL callbacks for the
|
46401
|
+
event will not be executed when the event fires. For example:
|
46402
|
+
|
46403
|
+
```javascript
|
46404
|
+
var callback1 = function(){};
|
46405
|
+
var callback2 = function(){};
|
46406
|
+
|
46407
|
+
object.on('stuff', callback1);
|
46408
|
+
object.on('stuff', callback2);
|
46409
|
+
|
46410
|
+
object.trigger('stuff'); // callback1 and callback2 will be executed.
|
46411
|
+
|
46412
|
+
object.off('stuff');
|
46413
|
+
object.trigger('stuff'); // callback1 and callback2 will not be executed!
|
46414
|
+
```
|
46415
|
+
|
46416
|
+
@method off
|
46417
|
+
@for RSVP.EventTarget
|
46418
|
+
@private
|
46419
|
+
@param {String} eventName event to stop listening to
|
46420
|
+
@param {Function} callback optional argument. If given, only the function
|
46421
|
+
given will be removed from the event's callback queue. If no `callback`
|
46422
|
+
argument is given, all callbacks will be removed from the event's callback
|
46423
|
+
queue.
|
46424
|
+
*/
|
46425
|
+
off: function(eventName, callback) {
|
46426
|
+
var allCallbacks = callbacksFor(this), callbacks, index;
|
46427
|
+
|
46428
|
+
if (!callback) {
|
46429
|
+
allCallbacks[eventName] = [];
|
46430
|
+
return;
|
46431
|
+
}
|
46432
|
+
|
46433
|
+
callbacks = allCallbacks[eventName];
|
46434
|
+
|
46435
|
+
index = indexOf(callbacks, callback);
|
46436
|
+
|
46437
|
+
if (index !== -1) { callbacks.splice(index, 1); }
|
46438
|
+
},
|
46439
|
+
|
46440
|
+
/**
|
46441
|
+
Use `trigger` to fire custom events. For example:
|
46442
|
+
|
46443
|
+
```javascript
|
46444
|
+
object.on('foo', function(){
|
46445
|
+
console.log('foo event happened!');
|
46446
|
+
});
|
46447
|
+
object.trigger('foo');
|
46448
|
+
// 'foo event happened!' logged to the console
|
46449
|
+
```
|
46450
|
+
|
46451
|
+
You can also pass a value as a second argument to `trigger` that will be
|
46452
|
+
passed as an argument to all event listeners for the event:
|
46453
|
+
|
46454
|
+
```javascript
|
46455
|
+
object.on('foo', function(value){
|
46456
|
+
console.log(value.name);
|
46457
|
+
});
|
46458
|
+
|
46459
|
+
object.trigger('foo', { name: 'bar' });
|
46460
|
+
// 'bar' logged to the console
|
46461
|
+
```
|
46462
|
+
|
46463
|
+
@method trigger
|
46464
|
+
@for RSVP.EventTarget
|
46465
|
+
@private
|
46466
|
+
@param {String} eventName name of the event to be triggered
|
46467
|
+
@param {Any} options optional value to be passed to any event handlers for
|
46468
|
+
the given `eventName`
|
46469
|
+
*/
|
46470
|
+
trigger: function(eventName, options) {
|
46471
|
+
var allCallbacks = callbacksFor(this), callbacks, callback;
|
46472
|
+
|
46473
|
+
if (callbacks = allCallbacks[eventName]) {
|
46474
|
+
// Don't cache the callbacks.length since it may grow
|
46475
|
+
for (var i=0; i<callbacks.length; i++) {
|
46476
|
+
callback = callbacks[i];
|
46477
|
+
|
46478
|
+
callback(options);
|
46479
|
+
}
|
45987
46480
|
}
|
46481
|
+
}
|
45988
46482
|
};
|
45989
|
-
});
|
45990
|
-
define(
|
45991
|
-
|
45992
|
-
|
45993
|
-
|
45994
|
-
|
45995
|
-
'use strict';
|
45996
|
-
var Promise = __dependency1__['default'];
|
46483
|
+
});
|
46484
|
+
define("rsvp/filter",
|
46485
|
+
["./promise","./utils","exports"],
|
46486
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
46487
|
+
"use strict";
|
46488
|
+
var Promise = __dependency1__["default"];
|
45997
46489
|
var isFunction = __dependency2__.isFunction;
|
45998
|
-
|
46490
|
+
|
45999
46491
|
/**
|
46000
46492
|
`RSVP.filter` is similar to JavaScript's native `filter` method, except that it
|
46001
46493
|
waits for all promises to become fulfilled before running the `filterFn` on
|
@@ -46028,8 +46520,8 @@ define('rsvp/filter', [
|
|
46028
46520
|
|
46029
46521
|
```javascript
|
46030
46522
|
var promise1 = RSVP.resolve(1);
|
46031
|
-
var promise2 = RSVP.reject(new Error(
|
46032
|
-
var promise3 = RSVP.reject(new Error(
|
46523
|
+
var promise2 = RSVP.reject(new Error('2'));
|
46524
|
+
var promise3 = RSVP.reject(new Error('3'));
|
46033
46525
|
var promises = [ promise1, promise2, promise3 ];
|
46034
46526
|
|
46035
46527
|
var filterFn = function(item){
|
@@ -46039,7 +46531,7 @@ define('rsvp/filter', [
|
|
46039
46531
|
RSVP.filter(promises, filterFn).then(function(array){
|
46040
46532
|
// Code here never runs because there are rejected promises!
|
46041
46533
|
}, function(reason) {
|
46042
|
-
// reason.message ===
|
46534
|
+
// reason.message === '2'
|
46043
46535
|
});
|
46044
46536
|
```
|
46045
46537
|
|
@@ -46081,53 +46573,59 @@ define('rsvp/filter', [
|
|
46081
46573
|
tooling.
|
46082
46574
|
@return {Promise}
|
46083
46575
|
*/
|
46084
|
-
__exports__[
|
46085
|
-
|
46086
|
-
|
46087
|
-
|
46088
|
-
|
46089
|
-
|
46090
|
-
|
46091
|
-
|
46092
|
-
|
46576
|
+
__exports__["default"] = function filter(promises, filterFn, label) {
|
46577
|
+
return Promise.all(promises, label).then(function(values) {
|
46578
|
+
if (!isFunction(filterFn)) {
|
46579
|
+
throw new TypeError("You must pass a function as filter's second argument.");
|
46580
|
+
}
|
46581
|
+
|
46582
|
+
var length = values.length;
|
46583
|
+
var filtered = new Array(length);
|
46584
|
+
|
46585
|
+
for (var i = 0; i < length; i++) {
|
46586
|
+
filtered[i] = filterFn(values[i]);
|
46587
|
+
}
|
46588
|
+
|
46589
|
+
return Promise.all(filtered, label).then(function(filtered) {
|
46590
|
+
var results = new Array(length);
|
46591
|
+
var newLength = 0;
|
46592
|
+
|
46593
|
+
for (var i = 0; i < length; i++) {
|
46594
|
+
if (filtered[i]) {
|
46595
|
+
results[newLength] = values[i];
|
46596
|
+
newLength++;
|
46093
46597
|
}
|
46094
|
-
|
46095
|
-
|
46096
|
-
|
46097
|
-
|
46098
|
-
|
46099
|
-
results[newLength] = values[i$2];
|
46100
|
-
newLength++;
|
46101
|
-
}
|
46102
|
-
}
|
46103
|
-
results.length = newLength;
|
46104
|
-
return results;
|
46105
|
-
});
|
46598
|
+
}
|
46599
|
+
|
46600
|
+
results.length = newLength;
|
46601
|
+
|
46602
|
+
return results;
|
46106
46603
|
});
|
46107
|
-
|
46108
|
-
}
|
46109
|
-
|
46110
|
-
|
46111
|
-
|
46112
|
-
|
46113
|
-
|
46114
|
-
|
46115
|
-
], function (__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
|
46116
|
-
'use strict';
|
46117
|
-
var Promise = __dependency1__['default'];
|
46604
|
+
});
|
46605
|
+
}
|
46606
|
+
});
|
46607
|
+
define("rsvp/hash-settled",
|
46608
|
+
["./promise","./enumerator","./promise-hash","./utils","exports"],
|
46609
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
|
46610
|
+
"use strict";
|
46611
|
+
var Promise = __dependency1__["default"];
|
46118
46612
|
var makeSettledResult = __dependency2__.makeSettledResult;
|
46119
|
-
var PromiseHash = __dependency3__[
|
46120
|
-
var Enumerator = __dependency2__[
|
46613
|
+
var PromiseHash = __dependency3__["default"];
|
46614
|
+
var Enumerator = __dependency2__["default"];
|
46121
46615
|
var o_create = __dependency4__.o_create;
|
46616
|
+
|
46122
46617
|
function HashSettled(Constructor, object, label) {
|
46123
|
-
|
46618
|
+
this._superConstructor(Constructor, object, false, label);
|
46124
46619
|
}
|
46620
|
+
|
46125
46621
|
HashSettled.prototype = o_create(PromiseHash.prototype);
|
46126
46622
|
HashSettled.prototype._superConstructor = Enumerator;
|
46127
46623
|
HashSettled.prototype._makeResult = makeSettledResult;
|
46128
|
-
|
46129
|
-
|
46624
|
+
|
46625
|
+
HashSettled.prototype._validationError = function() {
|
46626
|
+
return new Error('hashSettled must be called with an object');
|
46130
46627
|
};
|
46628
|
+
|
46131
46629
|
/**
|
46132
46630
|
`RSVP.hashSettled` is similar to `RSVP.allSettled`, but takes an object
|
46133
46631
|
instead of an array for its `promises` argument.
|
@@ -46176,7 +46674,7 @@ define('rsvp/hash-settled', [
|
|
46176
46674
|
var promises = {
|
46177
46675
|
myPromise: RSVP.Promise.resolve(1),
|
46178
46676
|
rejectedPromise: RSVP.Promise.reject(new Error('rejection')),
|
46179
|
-
anotherRejectedPromise: RSVP.Promise.reject(new Error('more rejection'))
|
46677
|
+
anotherRejectedPromise: RSVP.Promise.reject(new Error('more rejection')),
|
46180
46678
|
};
|
46181
46679
|
|
46182
46680
|
RSVP.hashSettled(promises).then(function(hash){
|
@@ -46229,20 +46727,17 @@ define('rsvp/hash-settled', [
|
|
46229
46727
|
have been settled.
|
46230
46728
|
@static
|
46231
46729
|
*/
|
46232
|
-
__exports__[
|
46233
|
-
|
46234
|
-
}
|
46235
|
-
});
|
46236
|
-
define(
|
46237
|
-
|
46238
|
-
|
46239
|
-
|
46240
|
-
|
46241
|
-
|
46242
|
-
|
46243
|
-
var Promise = __dependency1__['default'];
|
46244
|
-
var PromiseHash = __dependency2__['default'];
|
46245
|
-
var ABORT_ON_REJECTION = __dependency3__.ABORT_ON_REJECTION;
|
46730
|
+
__exports__["default"] = function hashSettled(object, label) {
|
46731
|
+
return new HashSettled(Promise, object, label).promise;
|
46732
|
+
}
|
46733
|
+
});
|
46734
|
+
define("rsvp/hash",
|
46735
|
+
["./promise","./promise-hash","exports"],
|
46736
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
46737
|
+
"use strict";
|
46738
|
+
var Promise = __dependency1__["default"];
|
46739
|
+
var PromiseHash = __dependency2__["default"];
|
46740
|
+
|
46246
46741
|
/**
|
46247
46742
|
`RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array
|
46248
46743
|
for its `promises` argument.
|
@@ -46282,14 +46777,14 @@ define('rsvp/hash', [
|
|
46282
46777
|
```javascript
|
46283
46778
|
var promises = {
|
46284
46779
|
myPromise: RSVP.resolve(1),
|
46285
|
-
rejectedPromise: RSVP.reject(new Error(
|
46286
|
-
anotherRejectedPromise: RSVP.reject(new Error(
|
46780
|
+
rejectedPromise: RSVP.reject(new Error('rejectedPromise')),
|
46781
|
+
anotherRejectedPromise: RSVP.reject(new Error('anotherRejectedPromise')),
|
46287
46782
|
};
|
46288
46783
|
|
46289
46784
|
RSVP.hash(promises).then(function(hash){
|
46290
46785
|
// Code here never runs because there are rejected promises!
|
46291
46786
|
}, function(reason) {
|
46292
|
-
// reason.message ===
|
46787
|
+
// reason.message === 'rejectedPromise'
|
46293
46788
|
});
|
46294
46789
|
```
|
46295
46790
|
|
@@ -46301,11 +46796,11 @@ define('rsvp/hash', [
|
|
46301
46796
|
|
46302
46797
|
```javascript
|
46303
46798
|
function MyConstructor(){
|
46304
|
-
this.example = RSVP.resolve(
|
46799
|
+
this.example = RSVP.resolve('Example');
|
46305
46800
|
}
|
46306
46801
|
|
46307
46802
|
MyConstructor.prototype = {
|
46308
|
-
protoProperty: RSVP.resolve(
|
46803
|
+
protoProperty: RSVP.resolve('Proto Property')
|
46309
46804
|
};
|
46310
46805
|
|
46311
46806
|
var myObject = new MyConstructor();
|
@@ -46314,7 +46809,7 @@ define('rsvp/hash', [
|
|
46314
46809
|
// protoProperty will not be present, instead you will just have an
|
46315
46810
|
// object that looks like:
|
46316
46811
|
// {
|
46317
|
-
// example:
|
46812
|
+
// example: 'Example'
|
46318
46813
|
// }
|
46319
46814
|
//
|
46320
46815
|
// hash.hasOwnProperty('protoProperty'); // false
|
@@ -46331,52 +46826,50 @@ define('rsvp/hash', [
|
|
46331
46826
|
@return {Promise} promise that is fulfilled when all properties of `promises`
|
46332
46827
|
have been fulfilled, or rejected if any of them become rejected.
|
46333
46828
|
*/
|
46334
|
-
__exports__[
|
46335
|
-
|
46336
|
-
}
|
46337
|
-
});
|
46338
|
-
define(
|
46339
|
-
|
46340
|
-
|
46341
|
-
|
46342
|
-
], function (__dependency1__, __dependency2__, __exports__) {
|
46343
|
-
'use strict';
|
46829
|
+
__exports__["default"] = function hash(object, label) {
|
46830
|
+
return new PromiseHash(Promise, object, label).promise;
|
46831
|
+
}
|
46832
|
+
});
|
46833
|
+
define("rsvp/instrument",
|
46834
|
+
["./config","./utils","exports"],
|
46835
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
46836
|
+
"use strict";
|
46344
46837
|
var config = __dependency1__.config;
|
46345
46838
|
var now = __dependency2__.now;
|
46839
|
+
|
46346
46840
|
var queue = [];
|
46347
|
-
|
46348
|
-
|
46349
|
-
|
46350
|
-
|
46351
|
-
|
46352
|
-
|
46353
|
-
|
46354
|
-
|
46355
|
-
|
46356
|
-
|
46357
|
-
|
46358
|
-
|
46359
|
-
|
46360
|
-
|
46361
|
-
|
46362
|
-
|
46363
|
-
|
46364
|
-
|
46365
|
-
|
46366
|
-
|
46841
|
+
|
46842
|
+
__exports__["default"] = function instrument(eventName, promise, child) {
|
46843
|
+
if (1 === queue.push({
|
46844
|
+
name: eventName,
|
46845
|
+
payload: {
|
46846
|
+
guid: promise._guidKey + promise._id,
|
46847
|
+
eventName: eventName,
|
46848
|
+
detail: promise._result,
|
46849
|
+
childGuid: child && promise._guidKey + child._id,
|
46850
|
+
label: promise._label,
|
46851
|
+
timeStamp: now(),
|
46852
|
+
stack: new Error(promise._label).stack
|
46853
|
+
}})) {
|
46854
|
+
|
46855
|
+
setTimeout(function() {
|
46856
|
+
var entry;
|
46857
|
+
for (var i = 0; i < queue.length; i++) {
|
46858
|
+
entry = queue[i];
|
46859
|
+
config.trigger(entry.name, entry.payload);
|
46860
|
+
}
|
46861
|
+
queue.length = 0;
|
46367
46862
|
}, 50);
|
46368
|
-
|
46369
|
-
|
46370
|
-
});
|
46371
|
-
define(
|
46372
|
-
|
46373
|
-
|
46374
|
-
|
46375
|
-
|
46376
|
-
'use strict';
|
46377
|
-
var Promise = __dependency1__['default'];
|
46378
|
-
var isArray = __dependency2__.isArray;
|
46863
|
+
}
|
46864
|
+
}
|
46865
|
+
});
|
46866
|
+
define("rsvp/map",
|
46867
|
+
["./promise","./utils","exports"],
|
46868
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
46869
|
+
"use strict";
|
46870
|
+
var Promise = __dependency1__["default"];
|
46379
46871
|
var isFunction = __dependency2__.isFunction;
|
46872
|
+
|
46380
46873
|
/**
|
46381
46874
|
`RSVP.map` is similar to JavaScript's native `map` method, except that it
|
46382
46875
|
waits for all promises to become fulfilled before running the `mapFn` on
|
@@ -46408,8 +46901,8 @@ define('rsvp/map', [
|
|
46408
46901
|
|
46409
46902
|
```javascript
|
46410
46903
|
var promise1 = RSVP.resolve(1);
|
46411
|
-
var promise2 = RSVP.reject(new Error(
|
46412
|
-
var promise3 = RSVP.reject(new Error(
|
46904
|
+
var promise2 = RSVP.reject(new Error('2'));
|
46905
|
+
var promise3 = RSVP.reject(new Error('3'));
|
46413
46906
|
var promises = [ promise1, promise2, promise3 ];
|
46414
46907
|
|
46415
46908
|
var mapFn = function(item){
|
@@ -46419,7 +46912,7 @@ define('rsvp/map', [
|
|
46419
46912
|
RSVP.map(promises, mapFn).then(function(array){
|
46420
46913
|
// Code here never runs because there are rejected promises!
|
46421
46914
|
}, function(reason) {
|
46422
|
-
// reason.message ===
|
46915
|
+
// reason.message === '2'
|
46423
46916
|
});
|
46424
46917
|
```
|
46425
46918
|
|
@@ -46455,31 +46948,99 @@ define('rsvp/map', [
|
|
46455
46948
|
The promise will be rejected if any of the given `promises` become rejected.
|
46456
46949
|
@static
|
46457
46950
|
*/
|
46458
|
-
__exports__[
|
46459
|
-
|
46460
|
-
|
46461
|
-
|
46462
|
-
|
46463
|
-
|
46464
|
-
|
46465
|
-
|
46466
|
-
|
46467
|
-
|
46468
|
-
|
46469
|
-
}
|
46470
|
-
|
46471
|
-
|
46472
|
-
|
46473
|
-
|
46474
|
-
|
46475
|
-
|
46476
|
-
|
46477
|
-
|
46478
|
-
|
46479
|
-
var Promise = __dependency1__[
|
46480
|
-
var
|
46951
|
+
__exports__["default"] = function map(promises, mapFn, label) {
|
46952
|
+
return Promise.all(promises, label).then(function(values) {
|
46953
|
+
if (!isFunction(mapFn)) {
|
46954
|
+
throw new TypeError("You must pass a function as map's second argument.");
|
46955
|
+
}
|
46956
|
+
|
46957
|
+
var length = values.length;
|
46958
|
+
var results = new Array(length);
|
46959
|
+
|
46960
|
+
for (var i = 0; i < length; i++) {
|
46961
|
+
results[i] = mapFn(values[i]);
|
46962
|
+
}
|
46963
|
+
|
46964
|
+
return Promise.all(results, label);
|
46965
|
+
});
|
46966
|
+
}
|
46967
|
+
});
|
46968
|
+
define("rsvp/node",
|
46969
|
+
["./promise","./-internal","./utils","exports"],
|
46970
|
+
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
46971
|
+
"use strict";
|
46972
|
+
var Promise = __dependency1__["default"];
|
46973
|
+
var noop = __dependency2__.noop;
|
46974
|
+
var resolve = __dependency2__.resolve;
|
46975
|
+
var reject = __dependency2__.reject;
|
46976
|
+
var isArray = __dependency3__.isArray;
|
46977
|
+
|
46978
|
+
function Result() {
|
46979
|
+
this.value = undefined;
|
46980
|
+
}
|
46981
|
+
|
46982
|
+
var ERROR = new Result();
|
46983
|
+
var GET_THEN_ERROR = new Result();
|
46984
|
+
|
46985
|
+
function getThen(obj) {
|
46986
|
+
try {
|
46987
|
+
return obj.then;
|
46988
|
+
} catch(error) {
|
46989
|
+
ERROR.value= error;
|
46990
|
+
return ERROR;
|
46991
|
+
}
|
46992
|
+
}
|
46993
|
+
|
46994
|
+
|
46995
|
+
function tryApply(f, s, a) {
|
46996
|
+
try {
|
46997
|
+
f.apply(s, a);
|
46998
|
+
} catch(error) {
|
46999
|
+
ERROR.value = error;
|
47000
|
+
return ERROR;
|
47001
|
+
}
|
47002
|
+
}
|
47003
|
+
|
47004
|
+
function makeObject(_, argumentNames) {
|
47005
|
+
var obj = {};
|
47006
|
+
var name;
|
47007
|
+
var i;
|
47008
|
+
var length = _.length;
|
47009
|
+
var args = new Array(length);
|
47010
|
+
|
47011
|
+
for (var x = 0; x < length; x++) {
|
47012
|
+
args[x] = _[x];
|
47013
|
+
}
|
47014
|
+
|
47015
|
+
for (i = 0; i < argumentNames.length; i++) {
|
47016
|
+
name = argumentNames[i];
|
47017
|
+
obj[name] = args[i + 1];
|
47018
|
+
}
|
47019
|
+
|
47020
|
+
return obj;
|
47021
|
+
}
|
47022
|
+
|
47023
|
+
function arrayResult(_) {
|
47024
|
+
var length = _.length;
|
47025
|
+
var args = new Array(length - 1);
|
47026
|
+
|
47027
|
+
for (var i = 1; i < length; i++) {
|
47028
|
+
args[i - 1] = _[i];
|
47029
|
+
}
|
47030
|
+
|
47031
|
+
return args;
|
47032
|
+
}
|
47033
|
+
|
47034
|
+
function wrapThenable(then, promise) {
|
47035
|
+
return {
|
47036
|
+
then: function(onFulFillment, onRejection) {
|
47037
|
+
return then.call(promise, onFulFillment, onRejection);
|
47038
|
+
}
|
47039
|
+
};
|
47040
|
+
}
|
47041
|
+
|
46481
47042
|
/**
|
46482
|
-
`RSVP.denodeify` takes a
|
47043
|
+
`RSVP.denodeify` takes a 'node-style' function and returns a function that
|
46483
47044
|
will return an `RSVP.Promise`. You can use `denodeify` in Node.js or the
|
46484
47045
|
browser when you'd prefer to use promises over using callbacks. For example,
|
46485
47046
|
`denodeify` transforms the following:
|
@@ -46592,10 +47153,10 @@ define('rsvp/node', [
|
|
46592
47153
|
@method denodeify
|
46593
47154
|
@static
|
46594
47155
|
@for RSVP
|
46595
|
-
@param {Function} nodeFunc a
|
47156
|
+
@param {Function} nodeFunc a 'node-style' function that takes a callback as
|
46596
47157
|
its last argument. The callback expects an error to be passed as its first
|
46597
47158
|
argument (if an error occurred, otherwise null), and the value from the
|
46598
|
-
operation as its second argument (
|
47159
|
+
operation as its second argument ('function(err, value){ }').
|
46599
47160
|
@param {Boolean|Array} argumentNames An optional paramter that if set
|
46600
47161
|
to `true` causes the promise to fulfill with the callback's success arguments
|
46601
47162
|
as an array. This is useful if the node function has multiple success
|
@@ -46606,153 +47167,173 @@ define('rsvp/node', [
|
|
46606
47167
|
`RSVP.Promise`
|
46607
47168
|
@static
|
46608
47169
|
*/
|
46609
|
-
__exports__[
|
46610
|
-
|
46611
|
-
var
|
46612
|
-
|
46613
|
-
|
46614
|
-
|
46615
|
-
|
46616
|
-
|
46617
|
-
|
46618
|
-
|
46619
|
-
|
46620
|
-
|
46621
|
-
|
46622
|
-
|
46623
|
-
|
46624
|
-
|
46625
|
-
|
47170
|
+
__exports__["default"] = function denodeify(nodeFunc, options) {
|
47171
|
+
var fn = function() {
|
47172
|
+
var self = this;
|
47173
|
+
var l = arguments.length;
|
47174
|
+
var args = new Array(l + 1);
|
47175
|
+
var arg;
|
47176
|
+
var promiseInput = false;
|
47177
|
+
|
47178
|
+
for (var i = 0; i < l; ++i) {
|
47179
|
+
arg = arguments[i];
|
47180
|
+
|
47181
|
+
if (!promiseInput) {
|
47182
|
+
// TODO: clean this up
|
47183
|
+
promiseInput = needsPromiseInput(arg);
|
47184
|
+
if (promiseInput === GET_THEN_ERROR) {
|
47185
|
+
var p = new Promise(noop);
|
47186
|
+
reject(p, GET_THEN_ERROR.value);
|
47187
|
+
return p;
|
47188
|
+
} else if (promiseInput && promiseInput !== true) {
|
47189
|
+
arg = wrapThenable(promiseInput, arg);
|
46626
47190
|
}
|
46627
|
-
|
46628
|
-
|
46629
|
-
// sweet.js has a bug, this resolver can't be defined in the constructor
|
46630
|
-
// or the arraySlice macro doesn't work
|
46631
|
-
function resolver(resolve, reject) {
|
46632
|
-
function callback() {
|
46633
|
-
var length$2 = arguments.length;
|
46634
|
-
var args = new Array(length$2);
|
46635
|
-
for (var i$2 = 0; i$2 < length$2; i$2++) {
|
46636
|
-
args[i$2] = arguments[i$2];
|
46637
|
-
}
|
46638
|
-
var error = args[0];
|
46639
|
-
var value = args[1];
|
46640
|
-
if (error) {
|
46641
|
-
reject(error);
|
46642
|
-
} else if (asArray) {
|
46643
|
-
resolve(args.slice(1));
|
46644
|
-
} else if (asHash) {
|
46645
|
-
var obj = {};
|
46646
|
-
var successArguments = args.slice(1);
|
46647
|
-
var name;
|
46648
|
-
var i$3;
|
46649
|
-
for (i$3 = 0; i$3 < argumentNames.length; i$3++) {
|
46650
|
-
name = argumentNames[i$3];
|
46651
|
-
obj[name] = successArguments[i$3];
|
46652
|
-
}
|
46653
|
-
resolve(obj);
|
46654
|
-
} else {
|
46655
|
-
resolve(value);
|
46656
|
-
}
|
46657
|
-
}
|
46658
|
-
nodeArgs$2.push(callback);
|
46659
|
-
nodeFunc.apply(thisArg, nodeArgs$2);
|
46660
|
-
}
|
46661
|
-
});
|
47191
|
+
}
|
47192
|
+
args[i] = arg;
|
46662
47193
|
}
|
46663
|
-
|
46664
|
-
|
46665
|
-
|
46666
|
-
|
46667
|
-
|
46668
|
-
|
46669
|
-
|
46670
|
-
|
46671
|
-
|
46672
|
-
|
46673
|
-
|
46674
|
-
|
47194
|
+
|
47195
|
+
var promise = new Promise(noop);
|
47196
|
+
|
47197
|
+
args[l] = function(err, val) {
|
47198
|
+
if (err)
|
47199
|
+
reject(promise, err);
|
47200
|
+
else if (options === undefined)
|
47201
|
+
resolve(promise, val);
|
47202
|
+
else if (options === true)
|
47203
|
+
resolve(promise, arrayResult(arguments));
|
47204
|
+
else if (isArray(options))
|
47205
|
+
resolve(promise, makeObject(arguments, options));
|
47206
|
+
else
|
47207
|
+
resolve(promise, val);
|
47208
|
+
};
|
47209
|
+
|
47210
|
+
if (promiseInput) {
|
47211
|
+
return handlePromiseInput(promise, args, nodeFunc, self);
|
47212
|
+
} else {
|
47213
|
+
return handleValueInput(promise, args, nodeFunc, self);
|
47214
|
+
}
|
47215
|
+
};
|
47216
|
+
|
47217
|
+
fn.__proto__ = nodeFunc;
|
47218
|
+
|
47219
|
+
return fn;
|
47220
|
+
}
|
47221
|
+
|
47222
|
+
function handleValueInput(promise, args, nodeFunc, self) {
|
47223
|
+
var result = tryApply(nodeFunc, self, args);
|
47224
|
+
if (result === ERROR) {
|
47225
|
+
reject(promise, result.value);
|
47226
|
+
}
|
47227
|
+
return promise;
|
47228
|
+
}
|
47229
|
+
|
47230
|
+
function handlePromiseInput(promise, args, nodeFunc, self){
|
47231
|
+
return Promise.all(args).then(function(args){
|
47232
|
+
var result = tryApply(nodeFunc, self, args);
|
47233
|
+
if (result === ERROR) {
|
47234
|
+
reject(promise, result.value);
|
47235
|
+
}
|
47236
|
+
return promise;
|
47237
|
+
});
|
47238
|
+
}
|
47239
|
+
|
47240
|
+
function needsPromiseInput(arg) {
|
47241
|
+
if (arg && typeof arg === 'object') {
|
47242
|
+
if (arg.constructor === Promise) {
|
47243
|
+
return true;
|
47244
|
+
} else {
|
47245
|
+
return getThen(arg);
|
47246
|
+
}
|
47247
|
+
} else {
|
47248
|
+
return false;
|
47249
|
+
}
|
47250
|
+
}
|
47251
|
+
});
|
47252
|
+
define("rsvp/promise-hash",
|
47253
|
+
["./enumerator","./-internal","./utils","exports"],
|
47254
|
+
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
47255
|
+
"use strict";
|
47256
|
+
var Enumerator = __dependency1__["default"];
|
46675
47257
|
var PENDING = __dependency2__.PENDING;
|
46676
|
-
var FULFILLED = __dependency2__.FULFILLED;
|
46677
47258
|
var o_create = __dependency3__.o_create;
|
47259
|
+
|
46678
47260
|
function PromiseHash(Constructor, object, label) {
|
46679
|
-
|
47261
|
+
this._superConstructor(Constructor, object, true, label);
|
46680
47262
|
}
|
46681
|
-
|
47263
|
+
|
47264
|
+
__exports__["default"] = PromiseHash;
|
47265
|
+
|
46682
47266
|
PromiseHash.prototype = o_create(Enumerator.prototype);
|
46683
47267
|
PromiseHash.prototype._superConstructor = Enumerator;
|
46684
|
-
PromiseHash.prototype._init = function
|
46685
|
-
|
47268
|
+
PromiseHash.prototype._init = function() {
|
47269
|
+
this._result = {};
|
46686
47270
|
};
|
46687
|
-
|
46688
|
-
|
47271
|
+
|
47272
|
+
PromiseHash.prototype._validateInput = function(input) {
|
47273
|
+
return input && typeof input === 'object';
|
46689
47274
|
};
|
46690
|
-
|
46691
|
-
|
47275
|
+
|
47276
|
+
PromiseHash.prototype._validationError = function() {
|
47277
|
+
return new Error('Promise.hash must be called with an object');
|
46692
47278
|
};
|
46693
|
-
|
46694
|
-
|
46695
|
-
|
46696
|
-
|
46697
|
-
|
46698
|
-
|
46699
|
-
|
46700
|
-
|
46701
|
-
|
46702
|
-
|
46703
|
-
|
46704
|
-
|
46705
|
-
var length = results.length;
|
46706
|
-
this._remaining = length;
|
46707
|
-
var result;
|
46708
|
-
for (var i = 0; promise._state === PENDING && i < length; i++) {
|
46709
|
-
result = results[i];
|
46710
|
-
this._eachEntry(result.entry, result.position);
|
47279
|
+
|
47280
|
+
PromiseHash.prototype._enumerate = function() {
|
47281
|
+
var promise = this.promise;
|
47282
|
+
var input = this._input;
|
47283
|
+
var results = [];
|
47284
|
+
|
47285
|
+
for (var key in input) {
|
47286
|
+
if (promise._state === PENDING && input.hasOwnProperty(key)) {
|
47287
|
+
results.push({
|
47288
|
+
position: key,
|
47289
|
+
entry: input[key]
|
47290
|
+
});
|
46711
47291
|
}
|
47292
|
+
}
|
47293
|
+
|
47294
|
+
var length = results.length;
|
47295
|
+
this._remaining = length;
|
47296
|
+
var result;
|
47297
|
+
|
47298
|
+
for (var i = 0; promise._state === PENDING && i < length; i++) {
|
47299
|
+
result = results[i];
|
47300
|
+
this._eachEntry(result.entry, result.position);
|
47301
|
+
}
|
46712
47302
|
};
|
46713
|
-
});
|
46714
|
-
define(
|
46715
|
-
|
46716
|
-
|
46717
|
-
|
46718
|
-
'./utils',
|
46719
|
-
'./-internal',
|
46720
|
-
'./promise/cast',
|
46721
|
-
'./promise/all',
|
46722
|
-
'./promise/race',
|
46723
|
-
'./promise/resolve',
|
46724
|
-
'./promise/reject',
|
46725
|
-
'exports'
|
46726
|
-
], function (__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __exports__) {
|
46727
|
-
'use strict';
|
47303
|
+
});
|
47304
|
+
define("rsvp/promise",
|
47305
|
+
["./config","./instrument","./utils","./-internal","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"],
|
47306
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __exports__) {
|
47307
|
+
"use strict";
|
46728
47308
|
var config = __dependency1__.config;
|
46729
|
-
var
|
46730
|
-
|
46731
|
-
var
|
46732
|
-
var
|
46733
|
-
|
46734
|
-
var noop =
|
46735
|
-
var
|
46736
|
-
var
|
46737
|
-
var
|
46738
|
-
var
|
46739
|
-
var
|
46740
|
-
|
46741
|
-
var
|
46742
|
-
var
|
46743
|
-
var
|
46744
|
-
var
|
46745
|
-
|
46746
|
-
var Reject = __dependency10__['default'];
|
47309
|
+
var instrument = __dependency2__["default"];
|
47310
|
+
|
47311
|
+
var isFunction = __dependency3__.isFunction;
|
47312
|
+
var now = __dependency3__.now;
|
47313
|
+
|
47314
|
+
var noop = __dependency4__.noop;
|
47315
|
+
var subscribe = __dependency4__.subscribe;
|
47316
|
+
var initializePromise = __dependency4__.initializePromise;
|
47317
|
+
var invokeCallback = __dependency4__.invokeCallback;
|
47318
|
+
var FULFILLED = __dependency4__.FULFILLED;
|
47319
|
+
var REJECTED = __dependency4__.REJECTED;
|
47320
|
+
|
47321
|
+
var all = __dependency5__["default"];
|
47322
|
+
var race = __dependency6__["default"];
|
47323
|
+
var Resolve = __dependency7__["default"];
|
47324
|
+
var Reject = __dependency8__["default"];
|
47325
|
+
|
46747
47326
|
var guidKey = 'rsvp_' + now() + '-';
|
46748
47327
|
var counter = 0;
|
47328
|
+
|
46749
47329
|
function needsResolver() {
|
46750
|
-
|
47330
|
+
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
46751
47331
|
}
|
47332
|
+
|
46752
47333
|
function needsNew() {
|
46753
|
-
|
47334
|
+
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
46754
47335
|
}
|
46755
|
-
__exports__[
|
47336
|
+
__exports__["default"] = Promise;
|
46756
47337
|
/**
|
46757
47338
|
Promise objects represent the eventual result of an asynchronous operation. The
|
46758
47339
|
primary way of interacting with a promise is through its `then` method, which
|
@@ -46823,7 +47404,7 @@ define('rsvp/promise', [
|
|
46823
47404
|
if (this.status === 200) {
|
46824
47405
|
resolve(this.response);
|
46825
47406
|
} else {
|
46826
|
-
reject(new Error(
|
47407
|
+
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
|
46827
47408
|
}
|
46828
47409
|
}
|
46829
47410
|
};
|
@@ -46858,79 +47439,363 @@ define('rsvp/promise', [
|
|
46858
47439
|
@constructor
|
46859
47440
|
*/
|
46860
47441
|
function Promise(resolver, label) {
|
46861
|
-
|
46862
|
-
|
46863
|
-
|
46864
|
-
|
46865
|
-
|
47442
|
+
this._id = counter++;
|
47443
|
+
this._label = label;
|
47444
|
+
this._state = undefined;
|
47445
|
+
this._result = undefined;
|
47446
|
+
this._subscribers = [];
|
47447
|
+
|
47448
|
+
if (config.instrument) {
|
47449
|
+
instrument('created', this);
|
47450
|
+
}
|
47451
|
+
|
47452
|
+
if (noop !== resolver) {
|
47453
|
+
if (!isFunction(resolver)) {
|
47454
|
+
needsResolver();
|
46866
47455
|
}
|
46867
|
-
|
46868
|
-
|
46869
|
-
|
46870
|
-
}
|
46871
|
-
if (!(this instanceof Promise)) {
|
46872
|
-
needsNew();
|
46873
|
-
}
|
46874
|
-
initializePromise(this, resolver);
|
47456
|
+
|
47457
|
+
if (!(this instanceof Promise)) {
|
47458
|
+
needsNew();
|
46875
47459
|
}
|
47460
|
+
|
47461
|
+
initializePromise(this, resolver);
|
47462
|
+
}
|
46876
47463
|
}
|
46877
|
-
|
47464
|
+
|
47465
|
+
Promise.cast = Resolve; // deprecated
|
46878
47466
|
Promise.all = all;
|
46879
47467
|
Promise.race = race;
|
46880
47468
|
Promise.resolve = Resolve;
|
46881
47469
|
Promise.reject = Reject;
|
47470
|
+
|
46882
47471
|
Promise.prototype = {
|
46883
|
-
|
46884
|
-
|
46885
|
-
|
46886
|
-
|
46887
|
-
|
46888
|
-
|
46889
|
-
|
46890
|
-
|
46891
|
-
|
46892
|
-
|
46893
|
-
|
46894
|
-
|
46895
|
-
|
46896
|
-
|
46897
|
-
|
46898
|
-
|
46899
|
-
|
46900
|
-
|
46901
|
-
|
46902
|
-
|
46903
|
-
|
46904
|
-
|
46905
|
-
|
46906
|
-
|
46907
|
-
|
46908
|
-
|
46909
|
-
|
46910
|
-
|
46911
|
-
|
46912
|
-
|
46913
|
-
|
46914
|
-
|
46915
|
-
|
46916
|
-
|
46917
|
-
|
46918
|
-
|
46919
|
-
|
46920
|
-
|
46921
|
-
|
46922
|
-
|
46923
|
-
|
46924
|
-
|
47472
|
+
constructor: Promise,
|
47473
|
+
|
47474
|
+
_guidKey: guidKey,
|
47475
|
+
|
47476
|
+
_onerror: function (reason) {
|
47477
|
+
config.trigger('error', reason);
|
47478
|
+
},
|
47479
|
+
|
47480
|
+
/**
|
47481
|
+
The primary way of interacting with a promise is through its `then` method,
|
47482
|
+
which registers callbacks to receive either a promise's eventual value or the
|
47483
|
+
reason why the promise cannot be fulfilled.
|
47484
|
+
|
47485
|
+
```js
|
47486
|
+
findUser().then(function(user){
|
47487
|
+
// user is available
|
47488
|
+
}, function(reason){
|
47489
|
+
// user is unavailable, and you are given the reason why
|
47490
|
+
});
|
47491
|
+
```
|
47492
|
+
|
47493
|
+
Chaining
|
47494
|
+
--------
|
47495
|
+
|
47496
|
+
The return value of `then` is itself a promise. This second, 'downstream'
|
47497
|
+
promise is resolved with the return value of the first promise's fulfillment
|
47498
|
+
or rejection handler, or rejected if the handler throws an exception.
|
47499
|
+
|
47500
|
+
```js
|
47501
|
+
findUser().then(function (user) {
|
47502
|
+
return user.name;
|
47503
|
+
}, function (reason) {
|
47504
|
+
return 'default name';
|
47505
|
+
}).then(function (userName) {
|
47506
|
+
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
47507
|
+
// will be `'default name'`
|
47508
|
+
});
|
47509
|
+
|
47510
|
+
findUser().then(function (user) {
|
47511
|
+
throw new Error('Found user, but still unhappy');
|
47512
|
+
}, function (reason) {
|
47513
|
+
throw new Error('`findUser` rejected and we're unhappy');
|
47514
|
+
}).then(function (value) {
|
47515
|
+
// never reached
|
47516
|
+
}, function (reason) {
|
47517
|
+
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
47518
|
+
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
47519
|
+
});
|
47520
|
+
```
|
47521
|
+
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
47522
|
+
|
47523
|
+
```js
|
47524
|
+
findUser().then(function (user) {
|
47525
|
+
throw new PedagogicalException('Upstream error');
|
47526
|
+
}).then(function (value) {
|
47527
|
+
// never reached
|
47528
|
+
}).then(function (value) {
|
47529
|
+
// never reached
|
47530
|
+
}, function (reason) {
|
47531
|
+
// The `PedgagocialException` is propagated all the way down to here
|
47532
|
+
});
|
47533
|
+
```
|
47534
|
+
|
47535
|
+
Assimilation
|
47536
|
+
------------
|
47537
|
+
|
47538
|
+
Sometimes the value you want to propagate to a downstream promise can only be
|
47539
|
+
retrieved asynchronously. This can be achieved by returning a promise in the
|
47540
|
+
fulfillment or rejection handler. The downstream promise will then be pending
|
47541
|
+
until the returned promise is settled. This is called *assimilation*.
|
47542
|
+
|
47543
|
+
```js
|
47544
|
+
findUser().then(function (user) {
|
47545
|
+
return findCommentsByAuthor(user);
|
47546
|
+
}).then(function (comments) {
|
47547
|
+
// The user's comments are now available
|
47548
|
+
});
|
47549
|
+
```
|
47550
|
+
|
47551
|
+
If the assimliated promise rejects, then the downstream promise will also reject.
|
47552
|
+
|
47553
|
+
```js
|
47554
|
+
findUser().then(function (user) {
|
47555
|
+
return findCommentsByAuthor(user);
|
47556
|
+
}).then(function (comments) {
|
47557
|
+
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
47558
|
+
}, function (reason) {
|
47559
|
+
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
47560
|
+
});
|
47561
|
+
```
|
47562
|
+
|
47563
|
+
Simple Example
|
47564
|
+
--------------
|
47565
|
+
|
47566
|
+
Synchronous Example
|
47567
|
+
|
47568
|
+
```javascript
|
47569
|
+
var result;
|
47570
|
+
|
47571
|
+
try {
|
47572
|
+
result = findResult();
|
47573
|
+
// success
|
47574
|
+
} catch(reason) {
|
47575
|
+
// failure
|
47576
|
+
}
|
47577
|
+
```
|
47578
|
+
|
47579
|
+
Errback Example
|
47580
|
+
|
47581
|
+
```js
|
47582
|
+
findResult(function(result, err){
|
47583
|
+
if (err) {
|
47584
|
+
// failure
|
47585
|
+
} else {
|
47586
|
+
// success
|
47587
|
+
}
|
47588
|
+
});
|
47589
|
+
```
|
47590
|
+
|
47591
|
+
Promise Example;
|
47592
|
+
|
47593
|
+
```javascript
|
47594
|
+
findResult().then(function(result){
|
47595
|
+
// success
|
47596
|
+
}, function(reason){
|
47597
|
+
// failure
|
47598
|
+
});
|
47599
|
+
```
|
47600
|
+
|
47601
|
+
Advanced Example
|
47602
|
+
--------------
|
47603
|
+
|
47604
|
+
Synchronous Example
|
47605
|
+
|
47606
|
+
```javascript
|
47607
|
+
var author, books;
|
47608
|
+
|
47609
|
+
try {
|
47610
|
+
author = findAuthor();
|
47611
|
+
books = findBooksByAuthor(author);
|
47612
|
+
// success
|
47613
|
+
} catch(reason) {
|
47614
|
+
// failure
|
47615
|
+
}
|
47616
|
+
```
|
47617
|
+
|
47618
|
+
Errback Example
|
47619
|
+
|
47620
|
+
```js
|
47621
|
+
|
47622
|
+
function foundBooks(books) {
|
47623
|
+
|
47624
|
+
}
|
47625
|
+
|
47626
|
+
function failure(reason) {
|
47627
|
+
|
47628
|
+
}
|
47629
|
+
|
47630
|
+
findAuthor(function(author, err){
|
47631
|
+
if (err) {
|
47632
|
+
failure(err);
|
47633
|
+
// failure
|
47634
|
+
} else {
|
47635
|
+
try {
|
47636
|
+
findBoooksByAuthor(author, function(books, err) {
|
47637
|
+
if (err) {
|
47638
|
+
failure(err);
|
47639
|
+
} else {
|
47640
|
+
try {
|
47641
|
+
foundBooks(books);
|
47642
|
+
} catch(reason) {
|
47643
|
+
failure(reason);
|
47644
|
+
}
|
47645
|
+
}
|
47646
|
+
});
|
47647
|
+
} catch(error) {
|
47648
|
+
failure(err);
|
47649
|
+
}
|
47650
|
+
// success
|
46925
47651
|
}
|
47652
|
+
});
|
47653
|
+
```
|
47654
|
+
|
47655
|
+
Promise Example;
|
47656
|
+
|
47657
|
+
```javascript
|
47658
|
+
findAuthor().
|
47659
|
+
then(findBooksByAuthor).
|
47660
|
+
then(function(books){
|
47661
|
+
// found books
|
47662
|
+
}).catch(function(reason){
|
47663
|
+
// something went wrong
|
47664
|
+
});
|
47665
|
+
```
|
47666
|
+
|
47667
|
+
@method then
|
47668
|
+
@param {Function} onFulfilled
|
47669
|
+
@param {Function} onRejected
|
47670
|
+
@param {String} label optional string for labeling the promise.
|
47671
|
+
Useful for tooling.
|
47672
|
+
@return {Promise}
|
47673
|
+
*/
|
47674
|
+
then: function(onFulfillment, onRejection, label) {
|
47675
|
+
var parent = this;
|
47676
|
+
var state = parent._state;
|
47677
|
+
|
47678
|
+
if (state === FULFILLED && !onFulfillment || state === REJECTED && !onRejection) {
|
47679
|
+
if (config.instrument) {
|
47680
|
+
instrument('chained', this, this);
|
47681
|
+
}
|
47682
|
+
return this;
|
47683
|
+
}
|
47684
|
+
|
47685
|
+
parent._onerror = null;
|
47686
|
+
|
47687
|
+
var child = new this.constructor(noop, label);
|
47688
|
+
var result = parent._result;
|
47689
|
+
|
47690
|
+
if (config.instrument) {
|
47691
|
+
instrument('chained', parent, child);
|
47692
|
+
}
|
47693
|
+
|
47694
|
+
if (state) {
|
47695
|
+
var callback = arguments[state - 1];
|
47696
|
+
config.async(function(){
|
47697
|
+
invokeCallback(state, child, callback, result);
|
47698
|
+
});
|
47699
|
+
} else {
|
47700
|
+
subscribe(parent, child, onFulfillment, onRejection);
|
47701
|
+
}
|
47702
|
+
|
47703
|
+
return child;
|
47704
|
+
},
|
47705
|
+
|
47706
|
+
/**
|
47707
|
+
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
47708
|
+
as the catch block of a try/catch statement.
|
47709
|
+
|
47710
|
+
```js
|
47711
|
+
function findAuthor(){
|
47712
|
+
throw new Error('couldn't find that author');
|
47713
|
+
}
|
47714
|
+
|
47715
|
+
// synchronous
|
47716
|
+
try {
|
47717
|
+
findAuthor();
|
47718
|
+
} catch(reason) {
|
47719
|
+
// something went wrong
|
47720
|
+
}
|
47721
|
+
|
47722
|
+
// async with promises
|
47723
|
+
findAuthor().catch(function(reason){
|
47724
|
+
// something went wrong
|
47725
|
+
});
|
47726
|
+
```
|
47727
|
+
|
47728
|
+
@method catch
|
47729
|
+
@param {Function} onRejection
|
47730
|
+
@param {String} label optional string for labeling the promise.
|
47731
|
+
Useful for tooling.
|
47732
|
+
@return {Promise}
|
47733
|
+
*/
|
47734
|
+
'catch': function(onRejection, label) {
|
47735
|
+
return this.then(null, onRejection, label);
|
47736
|
+
},
|
47737
|
+
|
47738
|
+
/**
|
47739
|
+
`finally` will be invoked regardless of the promise's fate just as native
|
47740
|
+
try/catch/finally behaves
|
47741
|
+
|
47742
|
+
Synchronous example:
|
47743
|
+
|
47744
|
+
```js
|
47745
|
+
findAuthor() {
|
47746
|
+
if (Math.random() > 0.5) {
|
47747
|
+
throw new Error();
|
47748
|
+
}
|
47749
|
+
return new Author();
|
47750
|
+
}
|
47751
|
+
|
47752
|
+
try {
|
47753
|
+
return findAuthor(); // succeed or fail
|
47754
|
+
} catch(error) {
|
47755
|
+
return findOtherAuther();
|
47756
|
+
} finally {
|
47757
|
+
// always runs
|
47758
|
+
// doesn't affect the return value
|
47759
|
+
}
|
47760
|
+
```
|
47761
|
+
|
47762
|
+
Asynchronous example:
|
47763
|
+
|
47764
|
+
```js
|
47765
|
+
findAuthor().catch(function(reason){
|
47766
|
+
return findOtherAuther();
|
47767
|
+
}).finally(function(){
|
47768
|
+
// author was either found, or not
|
47769
|
+
});
|
47770
|
+
```
|
47771
|
+
|
47772
|
+
@method finally
|
47773
|
+
@param {Function} callback
|
47774
|
+
@param {String} label optional string for labeling the promise.
|
47775
|
+
Useful for tooling.
|
47776
|
+
@return {Promise}
|
47777
|
+
*/
|
47778
|
+
'finally': function(callback, label) {
|
47779
|
+
var constructor = this.constructor;
|
47780
|
+
|
47781
|
+
return this.then(function(value) {
|
47782
|
+
return constructor.resolve(callback()).then(function(){
|
47783
|
+
return value;
|
47784
|
+
});
|
47785
|
+
}, function(reason) {
|
47786
|
+
return constructor.resolve(callback()).then(function(){
|
47787
|
+
throw reason;
|
47788
|
+
});
|
47789
|
+
}, label);
|
47790
|
+
}
|
46926
47791
|
};
|
46927
|
-
});
|
46928
|
-
define(
|
46929
|
-
|
46930
|
-
|
46931
|
-
|
46932
|
-
|
46933
|
-
|
47792
|
+
});
|
47793
|
+
define("rsvp/promise/all",
|
47794
|
+
["../enumerator","exports"],
|
47795
|
+
function(__dependency1__, __exports__) {
|
47796
|
+
"use strict";
|
47797
|
+
var Enumerator = __dependency1__["default"];
|
47798
|
+
|
46934
47799
|
/**
|
46935
47800
|
`RSVP.Promise.all` accepts an array of promises, and returns a new promise which
|
46936
47801
|
is fulfilled with an array of fulfillment values for the passed promises, or
|
@@ -46978,100 +47843,22 @@ define('rsvp/promise/all', [
|
|
46978
47843
|
fulfilled, or rejected if any of them become rejected.
|
46979
47844
|
@static
|
46980
47845
|
*/
|
46981
|
-
__exports__[
|
46982
|
-
|
46983
|
-
}
|
46984
|
-
});
|
46985
|
-
define(
|
46986
|
-
|
46987
|
-
|
46988
|
-
|
46989
|
-
'use strict';
|
46990
|
-
var resolve = __dependency1__['default'];
|
46991
|
-
/**
|
46992
|
-
@deprecated
|
46993
|
-
|
46994
|
-
`RSVP.Promise.cast` coerces its argument to a promise, or returns the
|
46995
|
-
argument if it is already a promise which shares a constructor with the caster.
|
46996
|
-
|
46997
|
-
Example:
|
46998
|
-
|
46999
|
-
```javascript
|
47000
|
-
var promise = RSVP.Promise.resolve(1);
|
47001
|
-
var casted = RSVP.Promise.cast(promise);
|
47002
|
-
|
47003
|
-
console.log(promise === casted); // true
|
47004
|
-
```
|
47005
|
-
|
47006
|
-
In the case of a promise whose constructor does not match, it is assimilated.
|
47007
|
-
The resulting promise will fulfill or reject based on the outcome of the
|
47008
|
-
promise being casted.
|
47009
|
-
|
47010
|
-
Example:
|
47011
|
-
|
47012
|
-
```javascript
|
47013
|
-
var thennable = $.getJSON('/api/foo');
|
47014
|
-
var casted = RSVP.Promise.cast(thennable);
|
47015
|
-
|
47016
|
-
console.log(thennable === casted); // false
|
47017
|
-
console.log(casted instanceof RSVP.Promise) // true
|
47018
|
-
|
47019
|
-
casted.then(function(data) {
|
47020
|
-
// data is the value getJSON fulfills with
|
47021
|
-
});
|
47022
|
-
```
|
47023
|
-
|
47024
|
-
In the case of a non-promise, a promise which will fulfill with that value is
|
47025
|
-
returned.
|
47026
|
-
|
47027
|
-
Example:
|
47028
|
-
|
47029
|
-
```javascript
|
47030
|
-
var value = 1; // could be a number, boolean, string, undefined...
|
47031
|
-
var casted = RSVP.Promise.cast(value);
|
47032
|
-
|
47033
|
-
console.log(value === casted); // false
|
47034
|
-
console.log(casted instanceof RSVP.Promise) // true
|
47035
|
-
|
47036
|
-
casted.then(function(val) {
|
47037
|
-
val === value // => true
|
47038
|
-
});
|
47039
|
-
```
|
47040
|
-
|
47041
|
-
`RSVP.Promise.cast` is similar to `RSVP.Promise.resolve`, but `RSVP.Promise.cast` differs in the
|
47042
|
-
following ways:
|
47043
|
-
|
47044
|
-
* `RSVP.Promise.cast` serves as a memory-efficient way of getting a promise, when you
|
47045
|
-
have something that could either be a promise or a value. RSVP.resolve
|
47046
|
-
will have the same effect but will create a new promise wrapper if the
|
47047
|
-
argument is a promise.
|
47048
|
-
* `RSVP.Promise.cast` is a way of casting incoming thenables or promise subclasses to
|
47049
|
-
promises of the exact class specified, so that the resulting object's `then` is
|
47050
|
-
ensured to have the behavior of the constructor you are calling cast on (i.e., RSVP.Promise).
|
47051
|
-
|
47052
|
-
@method cast
|
47053
|
-
@static
|
47054
|
-
@param {Object} object to be casted
|
47055
|
-
@param {String} label optional string for labeling the promise.
|
47056
|
-
Useful for tooling.
|
47057
|
-
@return {Promise} promise
|
47058
|
-
*/
|
47059
|
-
__exports__['default'] = resolve;
|
47060
|
-
});
|
47061
|
-
define('rsvp/promise/race', [
|
47062
|
-
'../utils',
|
47063
|
-
'../-internal',
|
47064
|
-
'exports'
|
47065
|
-
], function (__dependency1__, __dependency2__, __exports__) {
|
47066
|
-
'use strict';
|
47846
|
+
__exports__["default"] = function all(entries, label) {
|
47847
|
+
return new Enumerator(this, entries, true /* abort on reject */, label).promise;
|
47848
|
+
}
|
47849
|
+
});
|
47850
|
+
define("rsvp/promise/race",
|
47851
|
+
["../utils","../-internal","exports"],
|
47852
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
47853
|
+
"use strict";
|
47067
47854
|
var isArray = __dependency1__.isArray;
|
47068
|
-
|
47069
|
-
var isMaybeThenable = __dependency1__.isMaybeThenable;
|
47855
|
+
|
47070
47856
|
var noop = __dependency2__.noop;
|
47071
47857
|
var resolve = __dependency2__.resolve;
|
47072
47858
|
var reject = __dependency2__.reject;
|
47073
47859
|
var subscribe = __dependency2__.subscribe;
|
47074
47860
|
var PENDING = __dependency2__.PENDING;
|
47861
|
+
|
47075
47862
|
/**
|
47076
47863
|
`RSVP.Promise.race` returns a new promise which is settled in the same way as the
|
47077
47864
|
first passed promise to settle.
|
@@ -47081,18 +47868,18 @@ define('rsvp/promise/race', [
|
|
47081
47868
|
```javascript
|
47082
47869
|
var promise1 = new RSVP.Promise(function(resolve, reject){
|
47083
47870
|
setTimeout(function(){
|
47084
|
-
resolve(
|
47871
|
+
resolve('promise 1');
|
47085
47872
|
}, 200);
|
47086
47873
|
});
|
47087
47874
|
|
47088
47875
|
var promise2 = new RSVP.Promise(function(resolve, reject){
|
47089
47876
|
setTimeout(function(){
|
47090
|
-
resolve(
|
47877
|
+
resolve('promise 2');
|
47091
47878
|
}, 100);
|
47092
47879
|
});
|
47093
47880
|
|
47094
47881
|
RSVP.Promise.race([promise1, promise2]).then(function(result){
|
47095
|
-
// result ===
|
47882
|
+
// result === 'promise 2' because it was resolved before promise1
|
47096
47883
|
// was resolved.
|
47097
47884
|
});
|
47098
47885
|
```
|
@@ -47106,20 +47893,20 @@ define('rsvp/promise/race', [
|
|
47106
47893
|
```javascript
|
47107
47894
|
var promise1 = new RSVP.Promise(function(resolve, reject){
|
47108
47895
|
setTimeout(function(){
|
47109
|
-
resolve(
|
47896
|
+
resolve('promise 1');
|
47110
47897
|
}, 200);
|
47111
47898
|
});
|
47112
47899
|
|
47113
47900
|
var promise2 = new RSVP.Promise(function(resolve, reject){
|
47114
47901
|
setTimeout(function(){
|
47115
|
-
reject(new Error(
|
47902
|
+
reject(new Error('promise 2'));
|
47116
47903
|
}, 100);
|
47117
47904
|
});
|
47118
47905
|
|
47119
47906
|
RSVP.Promise.race([promise1, promise2]).then(function(result){
|
47120
47907
|
// Code here never runs
|
47121
47908
|
}, function(reason){
|
47122
|
-
// reason.message ===
|
47909
|
+
// reason.message === 'promise 2' because promise 2 became rejected before
|
47123
47910
|
// promise 1 became fulfilled
|
47124
47911
|
});
|
47125
47912
|
```
|
@@ -47138,34 +47925,41 @@ define('rsvp/promise/race', [
|
|
47138
47925
|
@return {Promise} a promise which settles in the same way as the first passed
|
47139
47926
|
promise to settle.
|
47140
47927
|
*/
|
47141
|
-
__exports__[
|
47142
|
-
|
47143
|
-
|
47144
|
-
|
47145
|
-
|
47146
|
-
|
47147
|
-
|
47148
|
-
|
47149
|
-
var length = entries.length;
|
47150
|
-
function onFulfillment(value) {
|
47151
|
-
resolve(promise, value);
|
47152
|
-
}
|
47153
|
-
function onRejection(reason) {
|
47154
|
-
reject(promise, reason);
|
47155
|
-
}
|
47156
|
-
for (var i = 0; promise._state === PENDING && i < length; i++) {
|
47157
|
-
subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
|
47158
|
-
}
|
47928
|
+
__exports__["default"] = function race(entries, label) {
|
47929
|
+
/*jshint validthis:true */
|
47930
|
+
var Constructor = this;
|
47931
|
+
|
47932
|
+
var promise = new Constructor(noop, label);
|
47933
|
+
|
47934
|
+
if (!isArray(entries)) {
|
47935
|
+
reject(promise, new TypeError('You must pass an array to race.'));
|
47159
47936
|
return promise;
|
47160
|
-
|
47161
|
-
|
47162
|
-
|
47163
|
-
|
47164
|
-
|
47165
|
-
|
47166
|
-
|
47937
|
+
}
|
47938
|
+
|
47939
|
+
var length = entries.length;
|
47940
|
+
|
47941
|
+
function onFulfillment(value) {
|
47942
|
+
resolve(promise, value);
|
47943
|
+
}
|
47944
|
+
|
47945
|
+
function onRejection(reason) {
|
47946
|
+
reject(promise, reason);
|
47947
|
+
}
|
47948
|
+
|
47949
|
+
for (var i = 0; promise._state === PENDING && i < length; i++) {
|
47950
|
+
subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
|
47951
|
+
}
|
47952
|
+
|
47953
|
+
return promise;
|
47954
|
+
}
|
47955
|
+
});
|
47956
|
+
define("rsvp/promise/reject",
|
47957
|
+
["../-internal","exports"],
|
47958
|
+
function(__dependency1__, __exports__) {
|
47959
|
+
"use strict";
|
47167
47960
|
var noop = __dependency1__.noop;
|
47168
47961
|
var _reject = __dependency1__.reject;
|
47962
|
+
|
47169
47963
|
/**
|
47170
47964
|
`RSVP.Promise.reject` returns a promise rejected with the passed `reason`.
|
47171
47965
|
It is shorthand for the following:
|
@@ -47201,21 +47995,21 @@ define('rsvp/promise/reject', [
|
|
47201
47995
|
Useful for tooling.
|
47202
47996
|
@return {Promise} a promise rejected with the given `reason`.
|
47203
47997
|
*/
|
47204
|
-
__exports__[
|
47205
|
-
|
47206
|
-
|
47207
|
-
|
47208
|
-
|
47209
|
-
|
47210
|
-
}
|
47211
|
-
});
|
47212
|
-
define(
|
47213
|
-
|
47214
|
-
|
47215
|
-
|
47216
|
-
'use strict';
|
47998
|
+
__exports__["default"] = function reject(reason, label) {
|
47999
|
+
/*jshint validthis:true */
|
48000
|
+
var Constructor = this;
|
48001
|
+
var promise = new Constructor(noop, label);
|
48002
|
+
_reject(promise, reason);
|
48003
|
+
return promise;
|
48004
|
+
}
|
48005
|
+
});
|
48006
|
+
define("rsvp/promise/resolve",
|
48007
|
+
["../-internal","exports"],
|
48008
|
+
function(__dependency1__, __exports__) {
|
48009
|
+
"use strict";
|
47217
48010
|
var noop = __dependency1__.noop;
|
47218
48011
|
var _resolve = __dependency1__.resolve;
|
48012
|
+
|
47219
48013
|
/**
|
47220
48014
|
`RSVP.Promise.resolve` returns a promise that will become resolved with the
|
47221
48015
|
passed `value`. It is shorthand for the following:
|
@@ -47248,23 +48042,25 @@ define('rsvp/promise/resolve', [
|
|
47248
48042
|
@return {Promise} a promise that will become fulfilled with the given
|
47249
48043
|
`value`
|
47250
48044
|
*/
|
47251
|
-
__exports__[
|
47252
|
-
|
47253
|
-
|
47254
|
-
|
47255
|
-
|
47256
|
-
|
47257
|
-
|
47258
|
-
|
47259
|
-
|
47260
|
-
|
47261
|
-
|
47262
|
-
|
47263
|
-
|
47264
|
-
|
47265
|
-
],
|
47266
|
-
|
47267
|
-
|
48045
|
+
__exports__["default"] = function resolve(object, label) {
|
48046
|
+
/*jshint validthis:true */
|
48047
|
+
var Constructor = this;
|
48048
|
+
|
48049
|
+
if (object && typeof object === 'object' && object.constructor === Constructor) {
|
48050
|
+
return object;
|
48051
|
+
}
|
48052
|
+
|
48053
|
+
var promise = new Constructor(noop, label);
|
48054
|
+
_resolve(promise, object);
|
48055
|
+
return promise;
|
48056
|
+
}
|
48057
|
+
});
|
48058
|
+
define("rsvp/race",
|
48059
|
+
["./promise","exports"],
|
48060
|
+
function(__dependency1__, __exports__) {
|
48061
|
+
"use strict";
|
48062
|
+
var Promise = __dependency1__["default"];
|
48063
|
+
|
47268
48064
|
/**
|
47269
48065
|
This is a convenient alias for `RSVP.Promise.race`.
|
47270
48066
|
|
@@ -47275,16 +48071,16 @@ define('rsvp/race', [
|
|
47275
48071
|
@param {String} label An optional label. This is useful
|
47276
48072
|
for tooling.
|
47277
48073
|
*/
|
47278
|
-
__exports__[
|
47279
|
-
|
47280
|
-
}
|
47281
|
-
});
|
47282
|
-
define(
|
47283
|
-
|
47284
|
-
|
47285
|
-
|
47286
|
-
|
47287
|
-
|
48074
|
+
__exports__["default"] = function race(array, label) {
|
48075
|
+
return Promise.race(array, label);
|
48076
|
+
}
|
48077
|
+
});
|
48078
|
+
define("rsvp/reject",
|
48079
|
+
["./promise","exports"],
|
48080
|
+
function(__dependency1__, __exports__) {
|
48081
|
+
"use strict";
|
48082
|
+
var Promise = __dependency1__["default"];
|
48083
|
+
|
47288
48084
|
/**
|
47289
48085
|
This is a convenient alias for `RSVP.Promise.reject`.
|
47290
48086
|
|
@@ -47296,16 +48092,16 @@ define('rsvp/reject', [
|
|
47296
48092
|
Useful for tooling.
|
47297
48093
|
@return {Promise} a promise rejected with the given `reason`.
|
47298
48094
|
*/
|
47299
|
-
__exports__[
|
47300
|
-
|
47301
|
-
}
|
47302
|
-
});
|
47303
|
-
define(
|
47304
|
-
|
47305
|
-
|
47306
|
-
|
47307
|
-
|
47308
|
-
|
48095
|
+
__exports__["default"] = function reject(reason, label) {
|
48096
|
+
return Promise.reject(reason, label);
|
48097
|
+
}
|
48098
|
+
});
|
48099
|
+
define("rsvp/resolve",
|
48100
|
+
["./promise","exports"],
|
48101
|
+
function(__dependency1__, __exports__) {
|
48102
|
+
"use strict";
|
48103
|
+
var Promise = __dependency1__["default"];
|
48104
|
+
|
47309
48105
|
/**
|
47310
48106
|
This is a convenient alias for `RSVP.Promise.resolve`.
|
47311
48107
|
|
@@ -47318,12 +48114,14 @@ define('rsvp/resolve', [
|
|
47318
48114
|
@return {Promise} a promise that will become fulfilled with the given
|
47319
48115
|
`value`
|
47320
48116
|
*/
|
47321
|
-
__exports__[
|
47322
|
-
|
47323
|
-
}
|
47324
|
-
});
|
47325
|
-
define(
|
47326
|
-
|
48117
|
+
__exports__["default"] = function resolve(value, label) {
|
48118
|
+
return Promise.resolve(value, label);
|
48119
|
+
}
|
48120
|
+
});
|
48121
|
+
define("rsvp/rethrow",
|
48122
|
+
["exports"],
|
48123
|
+
function(__exports__) {
|
48124
|
+
"use strict";
|
47327
48125
|
/**
|
47328
48126
|
`RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event
|
47329
48127
|
loop in order to aid debugging.
|
@@ -47364,129 +48162,58 @@ define('rsvp/rethrow', ['exports'], function (__exports__) {
|
|
47364
48162
|
@throws Error
|
47365
48163
|
@static
|
47366
48164
|
*/
|
47367
|
-
__exports__[
|
47368
|
-
|
47369
|
-
throw reason;
|
47370
|
-
});
|
48165
|
+
__exports__["default"] = function rethrow(reason) {
|
48166
|
+
setTimeout(function() {
|
47371
48167
|
throw reason;
|
47372
|
-
|
47373
|
-
|
47374
|
-
|
47375
|
-
|
48168
|
+
});
|
48169
|
+
throw reason;
|
48170
|
+
}
|
48171
|
+
});
|
48172
|
+
define("rsvp/utils",
|
48173
|
+
["exports"],
|
48174
|
+
function(__exports__) {
|
48175
|
+
"use strict";
|
47376
48176
|
function objectOrFunction(x) {
|
47377
|
-
|
48177
|
+
return typeof x === 'function' || (typeof x === 'object' && x !== null);
|
47378
48178
|
}
|
47379
|
-
|
47380
|
-
function isFunction(x) {
|
47381
|
-
|
48179
|
+
|
48180
|
+
__exports__.objectOrFunction = objectOrFunction;function isFunction(x) {
|
48181
|
+
return typeof x === 'function';
|
47382
48182
|
}
|
47383
|
-
|
47384
|
-
function isMaybeThenable(x) {
|
47385
|
-
|
48183
|
+
|
48184
|
+
__exports__.isFunction = isFunction;function isMaybeThenable(x) {
|
48185
|
+
return typeof x === 'object' && x !== null;
|
47386
48186
|
}
|
47387
|
-
|
47388
|
-
var _isArray;
|
48187
|
+
|
48188
|
+
__exports__.isMaybeThenable = isMaybeThenable;var _isArray;
|
47389
48189
|
if (!Array.isArray) {
|
47390
|
-
|
47391
|
-
|
47392
|
-
|
48190
|
+
_isArray = function (x) {
|
48191
|
+
return Object.prototype.toString.call(x) === '[object Array]';
|
48192
|
+
};
|
47393
48193
|
} else {
|
47394
|
-
|
48194
|
+
_isArray = Array.isArray;
|
47395
48195
|
}
|
48196
|
+
|
47396
48197
|
var isArray = _isArray;
|
47397
48198
|
__exports__.isArray = isArray;
|
47398
48199
|
// Date.now is not available in browsers < IE9
|
47399
48200
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility
|
47400
|
-
var now = Date.now || function ()
|
47401
|
-
return new Date().getTime();
|
47402
|
-
};
|
48201
|
+
var now = Date.now || function() { return new Date().getTime(); };
|
47403
48202
|
__exports__.now = now;
|
47404
|
-
|
47405
|
-
var o = function () {
|
47406
|
-
};
|
47407
|
-
o.prototype = object;
|
47408
|
-
return o;
|
47409
|
-
};
|
47410
|
-
__exports__.o_create = o_create;
|
47411
|
-
});
|
47412
|
-
define('rsvp', [
|
47413
|
-
'./rsvp/promise',
|
47414
|
-
'./rsvp/events',
|
47415
|
-
'./rsvp/node',
|
47416
|
-
'./rsvp/all',
|
47417
|
-
'./rsvp/all-settled',
|
47418
|
-
'./rsvp/race',
|
47419
|
-
'./rsvp/hash',
|
47420
|
-
'./rsvp/hash-settled',
|
47421
|
-
'./rsvp/rethrow',
|
47422
|
-
'./rsvp/defer',
|
47423
|
-
'./rsvp/config',
|
47424
|
-
'./rsvp/map',
|
47425
|
-
'./rsvp/resolve',
|
47426
|
-
'./rsvp/reject',
|
47427
|
-
'./rsvp/filter',
|
47428
|
-
'./rsvp/asap',
|
47429
|
-
'exports'
|
47430
|
-
], function (__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __exports__) {
|
47431
|
-
'use strict';
|
47432
|
-
var Promise = __dependency1__['default'];
|
47433
|
-
var EventTarget = __dependency2__['default'];
|
47434
|
-
var denodeify = __dependency3__['default'];
|
47435
|
-
var all = __dependency4__['default'];
|
47436
|
-
var allSettled = __dependency5__['default'];
|
47437
|
-
var race = __dependency6__['default'];
|
47438
|
-
var hash = __dependency7__['default'];
|
47439
|
-
var hashSettled = __dependency8__['default'];
|
47440
|
-
var rethrow = __dependency9__['default'];
|
47441
|
-
var defer = __dependency10__['default'];
|
47442
|
-
var config = __dependency11__.config;
|
47443
|
-
var configure = __dependency11__.configure;
|
47444
|
-
var map = __dependency12__['default'];
|
47445
|
-
var resolve = __dependency13__['default'];
|
47446
|
-
var reject = __dependency14__['default'];
|
47447
|
-
var filter = __dependency15__['default'];
|
47448
|
-
var asap = __dependency16__['default'];
|
47449
|
-
config.async = asap;
|
47450
|
-
// default async is asap;
|
47451
|
-
function async(callback, arg) {
|
47452
|
-
config.async(callback, arg);
|
47453
|
-
}
|
47454
|
-
function on() {
|
47455
|
-
config.on.apply(config, arguments);
|
47456
|
-
}
|
47457
|
-
function off() {
|
47458
|
-
config.off.apply(config, arguments);
|
47459
|
-
}
|
47460
|
-
// Set up instrumentation through `window.__PROMISE_INTRUMENTATION__`
|
47461
|
-
if (typeof window !== 'undefined' && typeof window.__PROMISE_INSTRUMENTATION__ === 'object') {
|
47462
|
-
var callbacks = window.__PROMISE_INSTRUMENTATION__;
|
47463
|
-
configure('instrument', true);
|
47464
|
-
for (var eventName in callbacks) {
|
47465
|
-
if (callbacks.hasOwnProperty(eventName)) {
|
47466
|
-
on(eventName, callbacks[eventName]);
|
47467
|
-
}
|
47468
|
-
}
|
47469
|
-
}
|
47470
|
-
__exports__.Promise = Promise;
|
47471
|
-
__exports__.EventTarget = EventTarget;
|
47472
|
-
__exports__.all = all;
|
47473
|
-
__exports__.allSettled = allSettled;
|
47474
|
-
__exports__.race = race;
|
47475
|
-
__exports__.hash = hash;
|
47476
|
-
__exports__.hashSettled = hashSettled;
|
47477
|
-
__exports__.rethrow = rethrow;
|
47478
|
-
__exports__.defer = defer;
|
47479
|
-
__exports__.denodeify = denodeify;
|
47480
|
-
__exports__.configure = configure;
|
47481
|
-
__exports__.on = on;
|
47482
|
-
__exports__.off = off;
|
47483
|
-
__exports__.resolve = resolve;
|
47484
|
-
__exports__.reject = reject;
|
47485
|
-
__exports__.async = async;
|
47486
|
-
__exports__.map = map;
|
47487
|
-
__exports__.filter = filter;
|
47488
|
-
});
|
48203
|
+
function F() { }
|
47489
48204
|
|
48205
|
+
var o_create = (Object.create || function (o) {
|
48206
|
+
if (arguments.length > 1) {
|
48207
|
+
throw new Error('Second argument not supported');
|
48208
|
+
}
|
48209
|
+
if (typeof o !== 'object') {
|
48210
|
+
throw new TypeError('Argument must be an object');
|
48211
|
+
}
|
48212
|
+
F.prototype = o;
|
48213
|
+
return new F();
|
48214
|
+
});
|
48215
|
+
__exports__.o_create = o_create;
|
48216
|
+
});
|
47490
48217
|
requireModule("ember");
|
47491
48218
|
|
47492
48219
|
})();
|