govuk_publishing_components 17.7.0 → 17.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +3 -24
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +6 -18
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +35 -45
- data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +0 -4
- data/lib/govuk_publishing_components.rb +0 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +1 -1
- data/node_modules/define-properties/package.json +2 -1
- data/node_modules/function-bind/package.json +2 -1
- data/node_modules/has-symbols/package.json +2 -1
- data/node_modules/jsx-ast-utils/CHANGELOG.md +16 -0
- data/node_modules/jsx-ast-utils/__tests__/helper.js +2 -0
- data/node_modules/jsx-ast-utils/__tests__/src/getPropLiteralValue-test.js +39 -3
- data/node_modules/jsx-ast-utils/__tests__/src/getPropValue-test.js +9 -4
- data/node_modules/jsx-ast-utils/lib/values/expressions/ObjectExpression.js +9 -2
- data/node_modules/jsx-ast-utils/lib/values/expressions/index.js +21 -6
- data/node_modules/jsx-ast-utils/lib/values/index.js +5 -1
- data/node_modules/jsx-ast-utils/package.json +35 -31
- data/node_modules/jsx-ast-utils/src/values/expressions/ObjectExpression.js +3 -1
- data/node_modules/jsx-ast-utils/src/values/expressions/index.js +12 -4
- data/node_modules/object-keys/package.json +2 -1
- data/node_modules/object.assign/CHANGELOG.md +179 -0
- data/node_modules/object.assign/LICENSE +21 -0
- data/node_modules/object.assign/README.md +135 -0
- data/node_modules/object.assign/auto.js +3 -0
- data/node_modules/object.assign/dist/browser.js +492 -0
- data/node_modules/object.assign/hasSymbols.js +41 -0
- data/node_modules/object.assign/implementation.js +41 -0
- data/node_modules/object.assign/index.js +17 -0
- data/node_modules/object.assign/package.json +148 -0
- data/node_modules/object.assign/polyfill.js +51 -0
- data/node_modules/object.assign/shim.js +14 -0
- data/node_modules/object.assign/test.sh +53 -0
- data/node_modules/object.assign/test/index.js +17 -0
- data/node_modules/object.assign/test/native.js +47 -0
- data/node_modules/object.assign/test/shimmed.js +50 -0
- data/node_modules/object.assign/test/tests.js +224 -0
- metadata +18 -3
- data/lib/govuk_publishing_components/presenters/cookie_banner_helper.rb +0 -23
@@ -0,0 +1,492 @@
|
|
1
|
+
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var keys = require('object-keys').shim();
|
5
|
+
delete keys.shim;
|
6
|
+
|
7
|
+
var assign = require('./');
|
8
|
+
|
9
|
+
module.exports = assign.shim();
|
10
|
+
|
11
|
+
delete assign.shim;
|
12
|
+
|
13
|
+
},{"./":3,"object-keys":9}],2:[function(require,module,exports){
|
14
|
+
'use strict';
|
15
|
+
|
16
|
+
// modified from https://github.com/es-shims/es6-shim
|
17
|
+
var keys = require('object-keys');
|
18
|
+
var bind = require('function-bind');
|
19
|
+
var canBeObject = function (obj) {
|
20
|
+
return typeof obj !== 'undefined' && obj !== null;
|
21
|
+
};
|
22
|
+
var hasSymbols = require('has-symbols/shams')();
|
23
|
+
var toObject = Object;
|
24
|
+
var push = bind.call(Function.call, Array.prototype.push);
|
25
|
+
var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);
|
26
|
+
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
|
27
|
+
|
28
|
+
module.exports = function assign(target, source1) {
|
29
|
+
if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
|
30
|
+
var objTarget = toObject(target);
|
31
|
+
var s, source, i, props, syms, value, key;
|
32
|
+
for (s = 1; s < arguments.length; ++s) {
|
33
|
+
source = toObject(arguments[s]);
|
34
|
+
props = keys(source);
|
35
|
+
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
|
36
|
+
if (getSymbols) {
|
37
|
+
syms = getSymbols(source);
|
38
|
+
for (i = 0; i < syms.length; ++i) {
|
39
|
+
key = syms[i];
|
40
|
+
if (propIsEnumerable(source, key)) {
|
41
|
+
push(props, key);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
for (i = 0; i < props.length; ++i) {
|
46
|
+
key = props[i];
|
47
|
+
value = source[key];
|
48
|
+
if (propIsEnumerable(source, key)) {
|
49
|
+
objTarget[key] = value;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
return objTarget;
|
54
|
+
};
|
55
|
+
|
56
|
+
},{"function-bind":7,"has-symbols/shams":8,"object-keys":9}],3:[function(require,module,exports){
|
57
|
+
'use strict';
|
58
|
+
|
59
|
+
var defineProperties = require('define-properties');
|
60
|
+
|
61
|
+
var implementation = require('./implementation');
|
62
|
+
var getPolyfill = require('./polyfill');
|
63
|
+
var shim = require('./shim');
|
64
|
+
|
65
|
+
var polyfill = getPolyfill();
|
66
|
+
|
67
|
+
defineProperties(polyfill, {
|
68
|
+
getPolyfill: getPolyfill,
|
69
|
+
implementation: implementation,
|
70
|
+
shim: shim
|
71
|
+
});
|
72
|
+
|
73
|
+
module.exports = polyfill;
|
74
|
+
|
75
|
+
},{"./implementation":2,"./polyfill":11,"./shim":12,"define-properties":4}],4:[function(require,module,exports){
|
76
|
+
'use strict';
|
77
|
+
|
78
|
+
var keys = require('object-keys');
|
79
|
+
var foreach = require('foreach');
|
80
|
+
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
|
81
|
+
|
82
|
+
var toStr = Object.prototype.toString;
|
83
|
+
|
84
|
+
var isFunction = function (fn) {
|
85
|
+
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
86
|
+
};
|
87
|
+
|
88
|
+
var arePropertyDescriptorsSupported = function () {
|
89
|
+
var obj = {};
|
90
|
+
try {
|
91
|
+
Object.defineProperty(obj, 'x', { enumerable: false, value: obj });
|
92
|
+
/* eslint-disable no-unused-vars, no-restricted-syntax */
|
93
|
+
for (var _ in obj) { return false; }
|
94
|
+
/* eslint-enable no-unused-vars, no-restricted-syntax */
|
95
|
+
return obj.x === obj;
|
96
|
+
} catch (e) { /* this is IE 8. */
|
97
|
+
return false;
|
98
|
+
}
|
99
|
+
};
|
100
|
+
var supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();
|
101
|
+
|
102
|
+
var defineProperty = function (object, name, value, predicate) {
|
103
|
+
if (name in object && (!isFunction(predicate) || !predicate())) {
|
104
|
+
return;
|
105
|
+
}
|
106
|
+
if (supportsDescriptors) {
|
107
|
+
Object.defineProperty(object, name, {
|
108
|
+
configurable: true,
|
109
|
+
enumerable: false,
|
110
|
+
value: value,
|
111
|
+
writable: true
|
112
|
+
});
|
113
|
+
} else {
|
114
|
+
object[name] = value;
|
115
|
+
}
|
116
|
+
};
|
117
|
+
|
118
|
+
var defineProperties = function (object, map) {
|
119
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
120
|
+
var props = keys(map);
|
121
|
+
if (hasSymbols) {
|
122
|
+
props = props.concat(Object.getOwnPropertySymbols(map));
|
123
|
+
}
|
124
|
+
foreach(props, function (name) {
|
125
|
+
defineProperty(object, name, map[name], predicates[name]);
|
126
|
+
});
|
127
|
+
};
|
128
|
+
|
129
|
+
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
130
|
+
|
131
|
+
module.exports = defineProperties;
|
132
|
+
|
133
|
+
},{"foreach":5,"object-keys":9}],5:[function(require,module,exports){
|
134
|
+
|
135
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
136
|
+
var toString = Object.prototype.toString;
|
137
|
+
|
138
|
+
module.exports = function forEach (obj, fn, ctx) {
|
139
|
+
if (toString.call(fn) !== '[object Function]') {
|
140
|
+
throw new TypeError('iterator must be a function');
|
141
|
+
}
|
142
|
+
var l = obj.length;
|
143
|
+
if (l === +l) {
|
144
|
+
for (var i = 0; i < l; i++) {
|
145
|
+
fn.call(ctx, obj[i], i, obj);
|
146
|
+
}
|
147
|
+
} else {
|
148
|
+
for (var k in obj) {
|
149
|
+
if (hasOwn.call(obj, k)) {
|
150
|
+
fn.call(ctx, obj[k], k, obj);
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
};
|
155
|
+
|
156
|
+
|
157
|
+
},{}],6:[function(require,module,exports){
|
158
|
+
'use strict';
|
159
|
+
|
160
|
+
/* eslint no-invalid-this: 1 */
|
161
|
+
|
162
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
163
|
+
var slice = Array.prototype.slice;
|
164
|
+
var toStr = Object.prototype.toString;
|
165
|
+
var funcType = '[object Function]';
|
166
|
+
|
167
|
+
module.exports = function bind(that) {
|
168
|
+
var target = this;
|
169
|
+
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
170
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
171
|
+
}
|
172
|
+
var args = slice.call(arguments, 1);
|
173
|
+
|
174
|
+
var bound;
|
175
|
+
var binder = function () {
|
176
|
+
if (this instanceof bound) {
|
177
|
+
var result = target.apply(
|
178
|
+
this,
|
179
|
+
args.concat(slice.call(arguments))
|
180
|
+
);
|
181
|
+
if (Object(result) === result) {
|
182
|
+
return result;
|
183
|
+
}
|
184
|
+
return this;
|
185
|
+
} else {
|
186
|
+
return target.apply(
|
187
|
+
that,
|
188
|
+
args.concat(slice.call(arguments))
|
189
|
+
);
|
190
|
+
}
|
191
|
+
};
|
192
|
+
|
193
|
+
var boundLength = Math.max(0, target.length - args.length);
|
194
|
+
var boundArgs = [];
|
195
|
+
for (var i = 0; i < boundLength; i++) {
|
196
|
+
boundArgs.push('$' + i);
|
197
|
+
}
|
198
|
+
|
199
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
200
|
+
|
201
|
+
if (target.prototype) {
|
202
|
+
var Empty = function Empty() {};
|
203
|
+
Empty.prototype = target.prototype;
|
204
|
+
bound.prototype = new Empty();
|
205
|
+
Empty.prototype = null;
|
206
|
+
}
|
207
|
+
|
208
|
+
return bound;
|
209
|
+
};
|
210
|
+
|
211
|
+
},{}],7:[function(require,module,exports){
|
212
|
+
'use strict';
|
213
|
+
|
214
|
+
var implementation = require('./implementation');
|
215
|
+
|
216
|
+
module.exports = Function.prototype.bind || implementation;
|
217
|
+
|
218
|
+
},{"./implementation":6}],8:[function(require,module,exports){
|
219
|
+
'use strict';
|
220
|
+
|
221
|
+
/* eslint complexity: [2, 17], max-statements: [2, 33] */
|
222
|
+
module.exports = function hasSymbols() {
|
223
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
224
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
225
|
+
|
226
|
+
var obj = {};
|
227
|
+
var sym = Symbol('test');
|
228
|
+
var symObj = Object(sym);
|
229
|
+
if (typeof sym === 'string') { return false; }
|
230
|
+
|
231
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
232
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
233
|
+
|
234
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
235
|
+
// if (sym instanceof Symbol) { return false; }
|
236
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
237
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
238
|
+
|
239
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
240
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
241
|
+
|
242
|
+
var symVal = 42;
|
243
|
+
obj[sym] = symVal;
|
244
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
|
245
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
246
|
+
|
247
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
248
|
+
|
249
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
250
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
251
|
+
|
252
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
253
|
+
|
254
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
255
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
256
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
257
|
+
}
|
258
|
+
|
259
|
+
return true;
|
260
|
+
};
|
261
|
+
|
262
|
+
},{}],9:[function(require,module,exports){
|
263
|
+
'use strict';
|
264
|
+
|
265
|
+
// modified from https://github.com/es-shims/es5-shim
|
266
|
+
var has = Object.prototype.hasOwnProperty;
|
267
|
+
var toStr = Object.prototype.toString;
|
268
|
+
var slice = Array.prototype.slice;
|
269
|
+
var isArgs = require('./isArguments');
|
270
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
271
|
+
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
|
272
|
+
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
|
273
|
+
var dontEnums = [
|
274
|
+
'toString',
|
275
|
+
'toLocaleString',
|
276
|
+
'valueOf',
|
277
|
+
'hasOwnProperty',
|
278
|
+
'isPrototypeOf',
|
279
|
+
'propertyIsEnumerable',
|
280
|
+
'constructor'
|
281
|
+
];
|
282
|
+
var equalsConstructorPrototype = function (o) {
|
283
|
+
var ctor = o.constructor;
|
284
|
+
return ctor && ctor.prototype === o;
|
285
|
+
};
|
286
|
+
var excludedKeys = {
|
287
|
+
$console: true,
|
288
|
+
$external: true,
|
289
|
+
$frame: true,
|
290
|
+
$frameElement: true,
|
291
|
+
$frames: true,
|
292
|
+
$innerHeight: true,
|
293
|
+
$innerWidth: true,
|
294
|
+
$outerHeight: true,
|
295
|
+
$outerWidth: true,
|
296
|
+
$pageXOffset: true,
|
297
|
+
$pageYOffset: true,
|
298
|
+
$parent: true,
|
299
|
+
$scrollLeft: true,
|
300
|
+
$scrollTop: true,
|
301
|
+
$scrollX: true,
|
302
|
+
$scrollY: true,
|
303
|
+
$self: true,
|
304
|
+
$webkitIndexedDB: true,
|
305
|
+
$webkitStorageInfo: true,
|
306
|
+
$window: true
|
307
|
+
};
|
308
|
+
var hasAutomationEqualityBug = (function () {
|
309
|
+
/* global window */
|
310
|
+
if (typeof window === 'undefined') { return false; }
|
311
|
+
for (var k in window) {
|
312
|
+
try {
|
313
|
+
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
|
314
|
+
try {
|
315
|
+
equalsConstructorPrototype(window[k]);
|
316
|
+
} catch (e) {
|
317
|
+
return true;
|
318
|
+
}
|
319
|
+
}
|
320
|
+
} catch (e) {
|
321
|
+
return true;
|
322
|
+
}
|
323
|
+
}
|
324
|
+
return false;
|
325
|
+
}());
|
326
|
+
var equalsConstructorPrototypeIfNotBuggy = function (o) {
|
327
|
+
/* global window */
|
328
|
+
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
|
329
|
+
return equalsConstructorPrototype(o);
|
330
|
+
}
|
331
|
+
try {
|
332
|
+
return equalsConstructorPrototype(o);
|
333
|
+
} catch (e) {
|
334
|
+
return false;
|
335
|
+
}
|
336
|
+
};
|
337
|
+
|
338
|
+
var keysShim = function keys(object) {
|
339
|
+
var isObject = object !== null && typeof object === 'object';
|
340
|
+
var isFunction = toStr.call(object) === '[object Function]';
|
341
|
+
var isArguments = isArgs(object);
|
342
|
+
var isString = isObject && toStr.call(object) === '[object String]';
|
343
|
+
var theKeys = [];
|
344
|
+
|
345
|
+
if (!isObject && !isFunction && !isArguments) {
|
346
|
+
throw new TypeError('Object.keys called on a non-object');
|
347
|
+
}
|
348
|
+
|
349
|
+
var skipProto = hasProtoEnumBug && isFunction;
|
350
|
+
if (isString && object.length > 0 && !has.call(object, 0)) {
|
351
|
+
for (var i = 0; i < object.length; ++i) {
|
352
|
+
theKeys.push(String(i));
|
353
|
+
}
|
354
|
+
}
|
355
|
+
|
356
|
+
if (isArguments && object.length > 0) {
|
357
|
+
for (var j = 0; j < object.length; ++j) {
|
358
|
+
theKeys.push(String(j));
|
359
|
+
}
|
360
|
+
} else {
|
361
|
+
for (var name in object) {
|
362
|
+
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
|
363
|
+
theKeys.push(String(name));
|
364
|
+
}
|
365
|
+
}
|
366
|
+
}
|
367
|
+
|
368
|
+
if (hasDontEnumBug) {
|
369
|
+
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
370
|
+
|
371
|
+
for (var k = 0; k < dontEnums.length; ++k) {
|
372
|
+
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
|
373
|
+
theKeys.push(dontEnums[k]);
|
374
|
+
}
|
375
|
+
}
|
376
|
+
}
|
377
|
+
return theKeys;
|
378
|
+
};
|
379
|
+
|
380
|
+
keysShim.shim = function shimObjectKeys() {
|
381
|
+
if (Object.keys) {
|
382
|
+
var keysWorksWithArguments = (function () {
|
383
|
+
// Safari 5.0 bug
|
384
|
+
return (Object.keys(arguments) || '').length === 2;
|
385
|
+
}(1, 2));
|
386
|
+
if (!keysWorksWithArguments) {
|
387
|
+
var originalKeys = Object.keys;
|
388
|
+
Object.keys = function keys(object) {
|
389
|
+
if (isArgs(object)) {
|
390
|
+
return originalKeys(slice.call(object));
|
391
|
+
} else {
|
392
|
+
return originalKeys(object);
|
393
|
+
}
|
394
|
+
};
|
395
|
+
}
|
396
|
+
} else {
|
397
|
+
Object.keys = keysShim;
|
398
|
+
}
|
399
|
+
return Object.keys || keysShim;
|
400
|
+
};
|
401
|
+
|
402
|
+
module.exports = keysShim;
|
403
|
+
|
404
|
+
},{"./isArguments":10}],10:[function(require,module,exports){
|
405
|
+
'use strict';
|
406
|
+
|
407
|
+
var toStr = Object.prototype.toString;
|
408
|
+
|
409
|
+
module.exports = function isArguments(value) {
|
410
|
+
var str = toStr.call(value);
|
411
|
+
var isArgs = str === '[object Arguments]';
|
412
|
+
if (!isArgs) {
|
413
|
+
isArgs = str !== '[object Array]' &&
|
414
|
+
value !== null &&
|
415
|
+
typeof value === 'object' &&
|
416
|
+
typeof value.length === 'number' &&
|
417
|
+
value.length >= 0 &&
|
418
|
+
toStr.call(value.callee) === '[object Function]';
|
419
|
+
}
|
420
|
+
return isArgs;
|
421
|
+
};
|
422
|
+
|
423
|
+
},{}],11:[function(require,module,exports){
|
424
|
+
'use strict';
|
425
|
+
|
426
|
+
var implementation = require('./implementation');
|
427
|
+
|
428
|
+
var lacksProperEnumerationOrder = function () {
|
429
|
+
if (!Object.assign) {
|
430
|
+
return false;
|
431
|
+
}
|
432
|
+
// v8, specifically in node 4.x, has a bug with incorrect property enumeration order
|
433
|
+
// note: this does not detect the bug unless there's 20 characters
|
434
|
+
var str = 'abcdefghijklmnopqrst';
|
435
|
+
var letters = str.split('');
|
436
|
+
var map = {};
|
437
|
+
for (var i = 0; i < letters.length; ++i) {
|
438
|
+
map[letters[i]] = letters[i];
|
439
|
+
}
|
440
|
+
var obj = Object.assign({}, map);
|
441
|
+
var actual = '';
|
442
|
+
for (var k in obj) {
|
443
|
+
actual += k;
|
444
|
+
}
|
445
|
+
return str !== actual;
|
446
|
+
};
|
447
|
+
|
448
|
+
var assignHasPendingExceptions = function () {
|
449
|
+
if (!Object.assign || !Object.preventExtensions) {
|
450
|
+
return false;
|
451
|
+
}
|
452
|
+
// Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
453
|
+
// which is 72% slower than our shim, and Firefox 40's native implementation.
|
454
|
+
var thrower = Object.preventExtensions({ 1: 2 });
|
455
|
+
try {
|
456
|
+
Object.assign(thrower, 'xy');
|
457
|
+
} catch (e) {
|
458
|
+
return thrower[1] === 'y';
|
459
|
+
}
|
460
|
+
return false;
|
461
|
+
};
|
462
|
+
|
463
|
+
module.exports = function getPolyfill() {
|
464
|
+
if (!Object.assign) {
|
465
|
+
return implementation;
|
466
|
+
}
|
467
|
+
if (lacksProperEnumerationOrder()) {
|
468
|
+
return implementation;
|
469
|
+
}
|
470
|
+
if (assignHasPendingExceptions()) {
|
471
|
+
return implementation;
|
472
|
+
}
|
473
|
+
return Object.assign;
|
474
|
+
};
|
475
|
+
|
476
|
+
},{"./implementation":2}],12:[function(require,module,exports){
|
477
|
+
'use strict';
|
478
|
+
|
479
|
+
var define = require('define-properties');
|
480
|
+
var getPolyfill = require('./polyfill');
|
481
|
+
|
482
|
+
module.exports = function shimAssign() {
|
483
|
+
var polyfill = getPolyfill();
|
484
|
+
define(
|
485
|
+
Object,
|
486
|
+
{ assign: polyfill },
|
487
|
+
{ assign: function () { return Object.assign !== polyfill; } }
|
488
|
+
);
|
489
|
+
return polyfill;
|
490
|
+
};
|
491
|
+
|
492
|
+
},{"./polyfill":11,"define-properties":4}]},{},[1]);
|