source: trip-planner-front/node_modules/object.assign/dist/browser.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 27.5 KB
Line 
1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2'use strict';
3
4var keys = require('object-keys').shim();
5delete keys.shim;
6
7var assign = require('./');
8
9module.exports = assign.shim();
10
11delete assign.shim;
12
13},{"./":3,"object-keys":14}],2:[function(require,module,exports){
14'use strict';
15
16// modified from https://github.com/es-shims/es6-shim
17var keys = require('object-keys');
18var canBeObject = function (obj) {
19 return typeof obj !== 'undefined' && obj !== null;
20};
21var hasSymbols = require('has-symbols/shams')();
22var callBound = require('call-bind/callBound');
23var toObject = Object;
24var $push = callBound('Array.prototype.push');
25var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
26var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
27
28// eslint-disable-next-line no-unused-vars
29module.exports = function assign(target, source1) {
30 if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
31 var objTarget = toObject(target);
32 var s, source, i, props, syms, value, key;
33 for (s = 1; s < arguments.length; ++s) {
34 source = toObject(arguments[s]);
35 props = keys(source);
36 var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
37 if (getSymbols) {
38 syms = getSymbols(source);
39 for (i = 0; i < syms.length; ++i) {
40 key = syms[i];
41 if ($propIsEnumerable(source, key)) {
42 $push(props, key);
43 }
44 }
45 }
46 for (i = 0; i < props.length; ++i) {
47 key = props[i];
48 value = source[key];
49 if ($propIsEnumerable(source, key)) {
50 objTarget[key] = value;
51 }
52 }
53 }
54 return objTarget;
55};
56
57},{"call-bind/callBound":4,"has-symbols/shams":11,"object-keys":14}],3:[function(require,module,exports){
58'use strict';
59
60var defineProperties = require('define-properties');
61var callBind = require('call-bind');
62
63var implementation = require('./implementation');
64var getPolyfill = require('./polyfill');
65var shim = require('./shim');
66
67var polyfill = callBind.apply(getPolyfill());
68// eslint-disable-next-line no-unused-vars
69var bound = function assign(target, source1) {
70 return polyfill(Object, arguments);
71};
72
73defineProperties(bound, {
74 getPolyfill: getPolyfill,
75 implementation: implementation,
76 shim: shim
77});
78
79module.exports = bound;
80
81},{"./implementation":2,"./polyfill":16,"./shim":17,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){
82'use strict';
83
84var GetIntrinsic = require('get-intrinsic');
85
86var callBind = require('./');
87
88var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
89
90module.exports = function callBoundIntrinsic(name, allowMissing) {
91 var intrinsic = GetIntrinsic(name, !!allowMissing);
92 if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
93 return callBind(intrinsic);
94 }
95 return intrinsic;
96};
97
98},{"./":5,"get-intrinsic":9}],5:[function(require,module,exports){
99'use strict';
100
101var bind = require('function-bind');
102var GetIntrinsic = require('get-intrinsic');
103
104var $apply = GetIntrinsic('%Function.prototype.apply%');
105var $call = GetIntrinsic('%Function.prototype.call%');
106var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
107
108var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
109
110if ($defineProperty) {
111 try {
112 $defineProperty({}, 'a', { value: 1 });
113 } catch (e) {
114 // IE 8 has a broken defineProperty
115 $defineProperty = null;
116 }
117}
118
119module.exports = function callBind() {
120 return $reflectApply(bind, $call, arguments);
121};
122
123var applyBind = function applyBind() {
124 return $reflectApply(bind, $apply, arguments);
125};
126
127if ($defineProperty) {
128 $defineProperty(module.exports, 'apply', { value: applyBind });
129} else {
130 module.exports.apply = applyBind;
131}
132
133},{"function-bind":8,"get-intrinsic":9}],6:[function(require,module,exports){
134'use strict';
135
136var keys = require('object-keys');
137var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
138
139var toStr = Object.prototype.toString;
140var concat = Array.prototype.concat;
141var origDefineProperty = Object.defineProperty;
142
143var isFunction = function (fn) {
144 return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
145};
146
147var arePropertyDescriptorsSupported = function () {
148 var obj = {};
149 try {
150 origDefineProperty(obj, 'x', { enumerable: false, value: obj });
151 // eslint-disable-next-line no-unused-vars, no-restricted-syntax
152 for (var _ in obj) { // jscs:ignore disallowUnusedVariables
153 return false;
154 }
155 return obj.x === obj;
156 } catch (e) { /* this is IE 8. */
157 return false;
158 }
159};
160var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
161
162var defineProperty = function (object, name, value, predicate) {
163 if (name in object && (!isFunction(predicate) || !predicate())) {
164 return;
165 }
166 if (supportsDescriptors) {
167 origDefineProperty(object, name, {
168 configurable: true,
169 enumerable: false,
170 value: value,
171 writable: true
172 });
173 } else {
174 object[name] = value;
175 }
176};
177
178var defineProperties = function (object, map) {
179 var predicates = arguments.length > 2 ? arguments[2] : {};
180 var props = keys(map);
181 if (hasSymbols) {
182 props = concat.call(props, Object.getOwnPropertySymbols(map));
183 }
184 for (var i = 0; i < props.length; i += 1) {
185 defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
186 }
187};
188
189defineProperties.supportsDescriptors = !!supportsDescriptors;
190
191module.exports = defineProperties;
192
193},{"object-keys":14}],7:[function(require,module,exports){
194'use strict';
195
196/* eslint no-invalid-this: 1 */
197
198var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
199var slice = Array.prototype.slice;
200var toStr = Object.prototype.toString;
201var funcType = '[object Function]';
202
203module.exports = function bind(that) {
204 var target = this;
205 if (typeof target !== 'function' || toStr.call(target) !== funcType) {
206 throw new TypeError(ERROR_MESSAGE + target);
207 }
208 var args = slice.call(arguments, 1);
209
210 var bound;
211 var binder = function () {
212 if (this instanceof bound) {
213 var result = target.apply(
214 this,
215 args.concat(slice.call(arguments))
216 );
217 if (Object(result) === result) {
218 return result;
219 }
220 return this;
221 } else {
222 return target.apply(
223 that,
224 args.concat(slice.call(arguments))
225 );
226 }
227 };
228
229 var boundLength = Math.max(0, target.length - args.length);
230 var boundArgs = [];
231 for (var i = 0; i < boundLength; i++) {
232 boundArgs.push('$' + i);
233 }
234
235 bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
236
237 if (target.prototype) {
238 var Empty = function Empty() {};
239 Empty.prototype = target.prototype;
240 bound.prototype = new Empty();
241 Empty.prototype = null;
242 }
243
244 return bound;
245};
246
247},{}],8:[function(require,module,exports){
248'use strict';
249
250var implementation = require('./implementation');
251
252module.exports = Function.prototype.bind || implementation;
253
254},{"./implementation":7}],9:[function(require,module,exports){
255'use strict';
256
257/* globals
258 AggregateError,
259 Atomics,
260 FinalizationRegistry,
261 SharedArrayBuffer,
262 WeakRef,
263*/
264
265var undefined;
266
267var $SyntaxError = SyntaxError;
268var $Function = Function;
269var $TypeError = TypeError;
270
271// eslint-disable-next-line consistent-return
272var getEvalledConstructor = function (expressionSyntax) {
273 try {
274 // eslint-disable-next-line no-new-func
275 return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
276 } catch (e) {}
277};
278
279var $gOPD = Object.getOwnPropertyDescriptor;
280if ($gOPD) {
281 try {
282 $gOPD({}, '');
283 } catch (e) {
284 $gOPD = null; // this is IE 8, which has a broken gOPD
285 }
286}
287
288var throwTypeError = function () {
289 throw new $TypeError();
290};
291var ThrowTypeError = $gOPD
292 ? (function () {
293 try {
294 // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
295 arguments.callee; // IE 8 does not throw here
296 return throwTypeError;
297 } catch (calleeThrows) {
298 try {
299 // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
300 return $gOPD(arguments, 'callee').get;
301 } catch (gOPDthrows) {
302 return throwTypeError;
303 }
304 }
305 }())
306 : throwTypeError;
307
308var hasSymbols = require('has-symbols')();
309
310var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
311
312var asyncGenFunction = getEvalledConstructor('async function* () {}');
313var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
314var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;
315
316var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
317
318var INTRINSICS = {
319 '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
320 '%Array%': Array,
321 '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
322 '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
323 '%AsyncFromSyncIteratorPrototype%': undefined,
324 '%AsyncFunction%': getEvalledConstructor('async function () {}'),
325 '%AsyncGenerator%': asyncGenFunctionPrototype,
326 '%AsyncGeneratorFunction%': asyncGenFunction,
327 '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
328 '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
329 '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
330 '%Boolean%': Boolean,
331 '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
332 '%Date%': Date,
333 '%decodeURI%': decodeURI,
334 '%decodeURIComponent%': decodeURIComponent,
335 '%encodeURI%': encodeURI,
336 '%encodeURIComponent%': encodeURIComponent,
337 '%Error%': Error,
338 '%eval%': eval, // eslint-disable-line no-eval
339 '%EvalError%': EvalError,
340 '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
341 '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
342 '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
343 '%Function%': $Function,
344 '%GeneratorFunction%': getEvalledConstructor('function* () {}'),
345 '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
346 '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
347 '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
348 '%isFinite%': isFinite,
349 '%isNaN%': isNaN,
350 '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
351 '%JSON%': typeof JSON === 'object' ? JSON : undefined,
352 '%Map%': typeof Map === 'undefined' ? undefined : Map,
353 '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
354 '%Math%': Math,
355 '%Number%': Number,
356 '%Object%': Object,
357 '%parseFloat%': parseFloat,
358 '%parseInt%': parseInt,
359 '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
360 '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
361 '%RangeError%': RangeError,
362 '%ReferenceError%': ReferenceError,
363 '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
364 '%RegExp%': RegExp,
365 '%Set%': typeof Set === 'undefined' ? undefined : Set,
366 '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
367 '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
368 '%String%': String,
369 '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
370 '%Symbol%': hasSymbols ? Symbol : undefined,
371 '%SyntaxError%': $SyntaxError,
372 '%ThrowTypeError%': ThrowTypeError,
373 '%TypedArray%': TypedArray,
374 '%TypeError%': $TypeError,
375 '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
376 '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
377 '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
378 '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
379 '%URIError%': URIError,
380 '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
381 '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
382 '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
383};
384
385var LEGACY_ALIASES = {
386 '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
387 '%ArrayPrototype%': ['Array', 'prototype'],
388 '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
389 '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
390 '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
391 '%ArrayProto_values%': ['Array', 'prototype', 'values'],
392 '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
393 '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
394 '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
395 '%BooleanPrototype%': ['Boolean', 'prototype'],
396 '%DataViewPrototype%': ['DataView', 'prototype'],
397 '%DatePrototype%': ['Date', 'prototype'],
398 '%ErrorPrototype%': ['Error', 'prototype'],
399 '%EvalErrorPrototype%': ['EvalError', 'prototype'],
400 '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
401 '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
402 '%FunctionPrototype%': ['Function', 'prototype'],
403 '%Generator%': ['GeneratorFunction', 'prototype'],
404 '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
405 '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
406 '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
407 '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
408 '%JSONParse%': ['JSON', 'parse'],
409 '%JSONStringify%': ['JSON', 'stringify'],
410 '%MapPrototype%': ['Map', 'prototype'],
411 '%NumberPrototype%': ['Number', 'prototype'],
412 '%ObjectPrototype%': ['Object', 'prototype'],
413 '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
414 '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
415 '%PromisePrototype%': ['Promise', 'prototype'],
416 '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
417 '%Promise_all%': ['Promise', 'all'],
418 '%Promise_reject%': ['Promise', 'reject'],
419 '%Promise_resolve%': ['Promise', 'resolve'],
420 '%RangeErrorPrototype%': ['RangeError', 'prototype'],
421 '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
422 '%RegExpPrototype%': ['RegExp', 'prototype'],
423 '%SetPrototype%': ['Set', 'prototype'],
424 '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
425 '%StringPrototype%': ['String', 'prototype'],
426 '%SymbolPrototype%': ['Symbol', 'prototype'],
427 '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
428 '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
429 '%TypeErrorPrototype%': ['TypeError', 'prototype'],
430 '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
431 '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
432 '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
433 '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
434 '%URIErrorPrototype%': ['URIError', 'prototype'],
435 '%WeakMapPrototype%': ['WeakMap', 'prototype'],
436 '%WeakSetPrototype%': ['WeakSet', 'prototype']
437};
438
439var bind = require('function-bind');
440var hasOwn = require('has');
441var $concat = bind.call(Function.call, Array.prototype.concat);
442var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
443var $replace = bind.call(Function.call, String.prototype.replace);
444
445/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
446var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
447var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
448var stringToPath = function stringToPath(string) {
449 var result = [];
450 $replace(string, rePropName, function (match, number, quote, subString) {
451 result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
452 });
453 return result;
454};
455/* end adaptation */
456
457var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
458 var intrinsicName = name;
459 var alias;
460 if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
461 alias = LEGACY_ALIASES[intrinsicName];
462 intrinsicName = '%' + alias[0] + '%';
463 }
464
465 if (hasOwn(INTRINSICS, intrinsicName)) {
466 var value = INTRINSICS[intrinsicName];
467 if (typeof value === 'undefined' && !allowMissing) {
468 throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
469 }
470
471 return {
472 alias: alias,
473 name: intrinsicName,
474 value: value
475 };
476 }
477
478 throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
479};
480
481module.exports = function GetIntrinsic(name, allowMissing) {
482 if (typeof name !== 'string' || name.length === 0) {
483 throw new $TypeError('intrinsic name must be a non-empty string');
484 }
485 if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
486 throw new $TypeError('"allowMissing" argument must be a boolean');
487 }
488
489 var parts = stringToPath(name);
490 var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
491
492 var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
493 var intrinsicRealName = intrinsic.name;
494 var value = intrinsic.value;
495 var skipFurtherCaching = false;
496
497 var alias = intrinsic.alias;
498 if (alias) {
499 intrinsicBaseName = alias[0];
500 $spliceApply(parts, $concat([0, 1], alias));
501 }
502
503 for (var i = 1, isOwn = true; i < parts.length; i += 1) {
504 var part = parts[i];
505 if (part === 'constructor' || !isOwn) {
506 skipFurtherCaching = true;
507 }
508
509 intrinsicBaseName += '.' + part;
510 intrinsicRealName = '%' + intrinsicBaseName + '%';
511
512 if (hasOwn(INTRINSICS, intrinsicRealName)) {
513 value = INTRINSICS[intrinsicRealName];
514 } else if (value != null) {
515 if ($gOPD && (i + 1) >= parts.length) {
516 var desc = $gOPD(value, part);
517 isOwn = !!desc;
518
519 if (!allowMissing && !(part in value)) {
520 throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
521 }
522 // By convention, when a data property is converted to an accessor
523 // property to emulate a data property that does not suffer from
524 // the override mistake, that accessor's getter is marked with
525 // an `originalValue` property. Here, when we detect this, we
526 // uphold the illusion by pretending to see that original data
527 // property, i.e., returning the value rather than the getter
528 // itself.
529 if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
530 value = desc.get;
531 } else {
532 value = value[part];
533 }
534 } else {
535 isOwn = hasOwn(value, part);
536 value = value[part];
537 }
538
539 if (isOwn && !skipFurtherCaching) {
540 INTRINSICS[intrinsicRealName] = value;
541 }
542 }
543 }
544 return value;
545};
546
547},{"function-bind":8,"has":12,"has-symbols":10}],10:[function(require,module,exports){
548(function (global){(function (){
549'use strict';
550
551var origSymbol = global.Symbol;
552var hasSymbolSham = require('./shams');
553
554module.exports = function hasNativeSymbols() {
555 if (typeof origSymbol !== 'function') { return false; }
556 if (typeof Symbol !== 'function') { return false; }
557 if (typeof origSymbol('foo') !== 'symbol') { return false; }
558 if (typeof Symbol('bar') !== 'symbol') { return false; }
559
560 return hasSymbolSham();
561};
562
563}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
564},{"./shams":11}],11:[function(require,module,exports){
565'use strict';
566
567/* eslint complexity: [2, 18], max-statements: [2, 33] */
568module.exports = function hasSymbols() {
569 if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
570 if (typeof Symbol.iterator === 'symbol') { return true; }
571
572 var obj = {};
573 var sym = Symbol('test');
574 var symObj = Object(sym);
575 if (typeof sym === 'string') { return false; }
576
577 if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
578 if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
579
580 // temp disabled per https://github.com/ljharb/object.assign/issues/17
581 // if (sym instanceof Symbol) { return false; }
582 // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
583 // if (!(symObj instanceof Symbol)) { return false; }
584
585 // if (typeof Symbol.prototype.toString !== 'function') { return false; }
586 // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
587
588 var symVal = 42;
589 obj[sym] = symVal;
590 for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
591 if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
592
593 if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
594
595 var syms = Object.getOwnPropertySymbols(obj);
596 if (syms.length !== 1 || syms[0] !== sym) { return false; }
597
598 if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
599
600 if (typeof Object.getOwnPropertyDescriptor === 'function') {
601 var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
602 if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
603 }
604
605 return true;
606};
607
608},{}],12:[function(require,module,exports){
609'use strict';
610
611var bind = require('function-bind');
612
613module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
614
615},{"function-bind":8}],13:[function(require,module,exports){
616'use strict';
617
618var keysShim;
619if (!Object.keys) {
620 // modified from https://github.com/es-shims/es5-shim
621 var has = Object.prototype.hasOwnProperty;
622 var toStr = Object.prototype.toString;
623 var isArgs = require('./isArguments'); // eslint-disable-line global-require
624 var isEnumerable = Object.prototype.propertyIsEnumerable;
625 var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
626 var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
627 var dontEnums = [
628 'toString',
629 'toLocaleString',
630 'valueOf',
631 'hasOwnProperty',
632 'isPrototypeOf',
633 'propertyIsEnumerable',
634 'constructor'
635 ];
636 var equalsConstructorPrototype = function (o) {
637 var ctor = o.constructor;
638 return ctor && ctor.prototype === o;
639 };
640 var excludedKeys = {
641 $applicationCache: true,
642 $console: true,
643 $external: true,
644 $frame: true,
645 $frameElement: true,
646 $frames: true,
647 $innerHeight: true,
648 $innerWidth: true,
649 $onmozfullscreenchange: true,
650 $onmozfullscreenerror: true,
651 $outerHeight: true,
652 $outerWidth: true,
653 $pageXOffset: true,
654 $pageYOffset: true,
655 $parent: true,
656 $scrollLeft: true,
657 $scrollTop: true,
658 $scrollX: true,
659 $scrollY: true,
660 $self: true,
661 $webkitIndexedDB: true,
662 $webkitStorageInfo: true,
663 $window: true
664 };
665 var hasAutomationEqualityBug = (function () {
666 /* global window */
667 if (typeof window === 'undefined') { return false; }
668 for (var k in window) {
669 try {
670 if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
671 try {
672 equalsConstructorPrototype(window[k]);
673 } catch (e) {
674 return true;
675 }
676 }
677 } catch (e) {
678 return true;
679 }
680 }
681 return false;
682 }());
683 var equalsConstructorPrototypeIfNotBuggy = function (o) {
684 /* global window */
685 if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
686 return equalsConstructorPrototype(o);
687 }
688 try {
689 return equalsConstructorPrototype(o);
690 } catch (e) {
691 return false;
692 }
693 };
694
695 keysShim = function keys(object) {
696 var isObject = object !== null && typeof object === 'object';
697 var isFunction = toStr.call(object) === '[object Function]';
698 var isArguments = isArgs(object);
699 var isString = isObject && toStr.call(object) === '[object String]';
700 var theKeys = [];
701
702 if (!isObject && !isFunction && !isArguments) {
703 throw new TypeError('Object.keys called on a non-object');
704 }
705
706 var skipProto = hasProtoEnumBug && isFunction;
707 if (isString && object.length > 0 && !has.call(object, 0)) {
708 for (var i = 0; i < object.length; ++i) {
709 theKeys.push(String(i));
710 }
711 }
712
713 if (isArguments && object.length > 0) {
714 for (var j = 0; j < object.length; ++j) {
715 theKeys.push(String(j));
716 }
717 } else {
718 for (var name in object) {
719 if (!(skipProto && name === 'prototype') && has.call(object, name)) {
720 theKeys.push(String(name));
721 }
722 }
723 }
724
725 if (hasDontEnumBug) {
726 var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
727
728 for (var k = 0; k < dontEnums.length; ++k) {
729 if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
730 theKeys.push(dontEnums[k]);
731 }
732 }
733 }
734 return theKeys;
735 };
736}
737module.exports = keysShim;
738
739},{"./isArguments":15}],14:[function(require,module,exports){
740'use strict';
741
742var slice = Array.prototype.slice;
743var isArgs = require('./isArguments');
744
745var origKeys = Object.keys;
746var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');
747
748var originalKeys = Object.keys;
749
750keysShim.shim = function shimObjectKeys() {
751 if (Object.keys) {
752 var keysWorksWithArguments = (function () {
753 // Safari 5.0 bug
754 var args = Object.keys(arguments);
755 return args && args.length === arguments.length;
756 }(1, 2));
757 if (!keysWorksWithArguments) {
758 Object.keys = function keys(object) { // eslint-disable-line func-name-matching
759 if (isArgs(object)) {
760 return originalKeys(slice.call(object));
761 }
762 return originalKeys(object);
763 };
764 }
765 } else {
766 Object.keys = keysShim;
767 }
768 return Object.keys || keysShim;
769};
770
771module.exports = keysShim;
772
773},{"./implementation":13,"./isArguments":15}],15:[function(require,module,exports){
774'use strict';
775
776var toStr = Object.prototype.toString;
777
778module.exports = function isArguments(value) {
779 var str = toStr.call(value);
780 var isArgs = str === '[object Arguments]';
781 if (!isArgs) {
782 isArgs = str !== '[object Array]' &&
783 value !== null &&
784 typeof value === 'object' &&
785 typeof value.length === 'number' &&
786 value.length >= 0 &&
787 toStr.call(value.callee) === '[object Function]';
788 }
789 return isArgs;
790};
791
792},{}],16:[function(require,module,exports){
793'use strict';
794
795var implementation = require('./implementation');
796
797var lacksProperEnumerationOrder = function () {
798 if (!Object.assign) {
799 return false;
800 }
801 /*
802 * v8, specifically in node 4.x, has a bug with incorrect property enumeration order
803 * note: this does not detect the bug unless there's 20 characters
804 */
805 var str = 'abcdefghijklmnopqrst';
806 var letters = str.split('');
807 var map = {};
808 for (var i = 0; i < letters.length; ++i) {
809 map[letters[i]] = letters[i];
810 }
811 var obj = Object.assign({}, map);
812 var actual = '';
813 for (var k in obj) {
814 actual += k;
815 }
816 return str !== actual;
817};
818
819var assignHasPendingExceptions = function () {
820 if (!Object.assign || !Object.preventExtensions) {
821 return false;
822 }
823 /*
824 * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
825 * which is 72% slower than our shim, and Firefox 40's native implementation.
826 */
827 var thrower = Object.preventExtensions({ 1: 2 });
828 try {
829 Object.assign(thrower, 'xy');
830 } catch (e) {
831 return thrower[1] === 'y';
832 }
833 return false;
834};
835
836module.exports = function getPolyfill() {
837 if (!Object.assign) {
838 return implementation;
839 }
840 if (lacksProperEnumerationOrder()) {
841 return implementation;
842 }
843 if (assignHasPendingExceptions()) {
844 return implementation;
845 }
846 return Object.assign;
847};
848
849},{"./implementation":2}],17:[function(require,module,exports){
850'use strict';
851
852var define = require('define-properties');
853var getPolyfill = require('./polyfill');
854
855module.exports = function shimAssign() {
856 var polyfill = getPolyfill();
857 define(
858 Object,
859 { assign: polyfill },
860 { assign: function () { return Object.assign !== polyfill; } }
861 );
862 return polyfill;
863};
864
865},{"./polyfill":16,"define-properties":6}]},{},[1]);
Note: See TracBrowser for help on using the repository browser.