polyfill-library 4.5.0 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/CHANGELOG.md +4 -4
  2. package/package.json +2 -2
  3. package/polyfills/__dist/AbortController/meta.json +1 -1
  4. package/polyfills/__dist/AggregateError/meta.json +1 -1
  5. package/polyfills/__dist/AggregateError/min.js +1 -1
  6. package/polyfills/__dist/AggregateError/raw.js +17 -2
  7. package/polyfills/__dist/DocumentFragment.prototype.replaceChildren/meta.json +1 -0
  8. package/polyfills/__dist/DocumentFragment.prototype.replaceChildren/min.js +1 -0
  9. package/polyfills/__dist/DocumentFragment.prototype.replaceChildren/raw.js +15 -0
  10. package/polyfills/__dist/Element.prototype.replaceChildren/meta.json +1 -0
  11. package/polyfills/__dist/Element.prototype.replaceChildren/min.js +1 -0
  12. package/polyfills/__dist/Element.prototype.replaceChildren/raw.js +8 -0
  13. package/polyfills/__dist/Error.cause/meta.json +1 -0
  14. package/polyfills/__dist/Error.cause/min.js +1 -0
  15. package/polyfills/__dist/Error.cause/raw.js +24 -0
  16. package/polyfills/__dist/HTMLElement.prototype.inert/meta.json +1 -1
  17. package/polyfills/__dist/IntersectionObserver/meta.json +1 -1
  18. package/polyfills/__dist/Map/meta.json +1 -1
  19. package/polyfills/__dist/Map/min.js +1 -1
  20. package/polyfills/__dist/Map/raw.js +5 -2
  21. package/polyfills/__dist/_ESAbstract.CreateNonEnumerableDataPropertyOrThrow/meta.json +1 -0
  22. package/polyfills/__dist/_ESAbstract.CreateNonEnumerableDataPropertyOrThrow/min.js +1 -0
  23. package/polyfills/__dist/_ESAbstract.CreateNonEnumerableDataPropertyOrThrow/raw.js +17 -0
  24. package/polyfills/__dist/_ESAbstract.DefinePropertyOrThrow/meta.json +1 -0
  25. package/polyfills/__dist/_ESAbstract.DefinePropertyOrThrow/min.js +1 -0
  26. package/polyfills/__dist/_ESAbstract.DefinePropertyOrThrow/raw.js +18 -0
  27. package/polyfills/__dist/_ErrorConstructor/meta.json +1 -0
  28. package/polyfills/__dist/_ErrorConstructor/min.js +1 -0
  29. package/polyfills/__dist/_ErrorConstructor/raw.js +69 -0
  30. package/polyfills/__dist/aliases.json +1 -1
  31. package/polyfills/__dist/location.origin/meta.json +1 -1
  32. package/polyfills/__dist/matchMedia/meta.json +1 -1
  33. package/polyfills/__dist/structuredClone/meta.json +1 -0
  34. package/polyfills/__dist/structuredClone/min.js +1 -0
  35. package/polyfills/__dist/structuredClone/raw.js +279 -0
package/CHANGELOG.md CHANGED
@@ -4,10 +4,10 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [v4.5.0](https://github.com/Financial-Times/polyfill-library/compare/v4.5.0...v4.5.0)
7
+ #### [v4.7.0](https://github.com/Financial-Times/polyfill-library/compare/v4.7.0...v4.7.0)
8
8
 
9
- #### v4.5.0
9
+ #### v4.7.0
10
10
 
11
- > 3 October 2022
11
+ > 6 February 2023
12
12
 
13
- - prepare v4.5.0 [`#1232`](https://github.com/Financial-Times/polyfill-library/pull/1232)
13
+ - prepare v4.7.0 [`#1277`](https://github.com/Financial-Times/polyfill-library/pull/1277)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polyfill-library",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "description": "A polyfill combinator",
5
5
  "main": "lib/index.js",
6
6
  "contributors": [
@@ -98,7 +98,7 @@
98
98
  "eslint-plugin-uncalled-iife": "^1.0.2",
99
99
  "eslint-plugin-unicorn": "^27.0.0",
100
100
  "execa": "^5.0.0",
101
- "express": "^4.17.1",
101
+ "express": "^4.17.3",
102
102
  "fastestsmallesttextencoderdecoder": "1.0.22",
103
103
  "fs-extra": "^9.0.1",
104
104
  "glob": "^7.1.1",
@@ -1 +1 @@
1
- {"dependencies":["fetch","Object.getOwnPropertyDescriptor","Object.setPrototypeOf","Event","Map","Symbol","Symbol.toStringTag","WeakMap"],"license":"MIT","spec":"https://dom.spec.whatwg.org/#interface-abortcontroller","repo":"https://github.com/mysticatea/abort-controller","docs":"https://developer.mozilla.org/en-US/docs/Web/API/AbortController","browsers":{"android":"*","chrome":"4 - 65","edge":"<16","edge_mob":"*","firefox":"2 - 56","firefox_mob":"<64","ie":">=10","ie_mob":">=10","opera":"10 - 52","op_mob":"<47","safari":"3.1 - 12.0","ios_saf":"3.2 - 12.0","samsung_mob":"<9.0"},"install":{"module":"abort-controller","paths":["dist/abort-controller.umd.js"]},"detectSource":"\"AbortController\"in self&&\"function\"==typeof self.AbortController\n","baseDir":"AbortController","hasTests":true,"isTestable":true,"isPublic":true,"size":9029}
1
+ {"dependencies":["fetch","Object.getOwnPropertyDescriptor","Object.setPrototypeOf","Event","Map","Symbol","Symbol.toStringTag","WeakMap"],"license":"MIT","spec":"https://dom.spec.whatwg.org/#interface-abortcontroller","repo":"https://github.com/mysticatea/abort-controller","docs":"https://developer.mozilla.org/en-US/docs/Web/API/AbortController","browsers":{"android":"*","chrome":"4 - 65","edge":"<16","edge_mob":"<16","firefox":"2 - 56","firefox_mob":"<64","ie":">=10","ie_mob":">=10","opera":"10 - 52","op_mob":"<47","safari":"3.1 - 12.0","ios_saf":"3.2 - 12.0","samsung_mob":"<9.0"},"install":{"module":"abort-controller","paths":["dist/abort-controller.umd.js"]},"detectSource":"\"AbortController\"in self&&\"function\"==typeof self.AbortController\n","baseDir":"AbortController","hasTests":true,"isTestable":true,"isPublic":true,"size":9029}
@@ -1 +1 @@
1
- {"aliases":["es2021"],"dependencies":["_ESAbstract.CreateDataPropertyOrThrow","_ESAbstract.IterableToList"],"license":"MIT","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError","browsers":{"android":"*","bb":"*","chrome":"<85","edge":"*","edge_mob":"*","firefox":"<79","firefox_mob":"<79","ie":"*","ie_mob":"*","opera":"<71","op_mob":"<60","op_mini":"*","safari":"<14.0","ios_saf":"<14.0","samsung_mob":"<14.0"},"detectSource":"\"AggregateError\"in self\n","baseDir":"AggregateError","hasTests":true,"isTestable":true,"isPublic":true,"size":485}
1
+ {"aliases":["es2021"],"dependencies":["_ESAbstract.CreateDataPropertyOrThrow","_ESAbstract.CreateMethodProperty","_ESAbstract.IterableToList","_ErrorConstructor"],"license":"MIT","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError","browsers":{"android":"*","bb":"*","chrome":"<85","edge":"*","edge_mob":"*","firefox":"<79","firefox_mob":"<79","ie":"*","ie_mob":"*","opera":"<71","op_mob":"<60","op_mini":"*","safari":"<14.0","ios_saf":"<14.0","samsung_mob":"<14.0"},"detectSource":"\"AggregateError\"in self\n","baseDir":"AggregateError","hasTests":true,"isTestable":true,"isPublic":true,"size":722}
@@ -1 +1 @@
1
- !function(){function r(r,e){var t=void 0===e?new Error:new Error(e);CreateDataPropertyOrThrow(this,"name","AggregateError"),CreateDataPropertyOrThrow(this,"message",t.message),CreateDataPropertyOrThrow(this,"stack",t.stack);var o;if(Array.isArray(r))o=r.slice();else try{o=IterableToList(r)}catch(r){throw new TypeError("Argument is not iterable")}CreateDataPropertyOrThrow(this,"errors",o)}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,self.AggregateError=r}();
1
+ !function(){function r(e,t){if(!(this instanceof r))return new r(e,t);var o=void 0===t?new Error:new Error(t);CreateDataPropertyOrThrow(this,"name","AggregateError"),CreateDataPropertyOrThrow(this,"message",o.message),CreateDataPropertyOrThrow(this,"stack",o.stack);var a;if(Array.isArray(e))a=e.slice();else try{a=IterableToList(e)}catch(r){throw new TypeError("Argument is not iterable")}CreateDataPropertyOrThrow(this,"errors",a)}var e=function(){try{return"c"===new Error("m",{cause:"c"}).cause}catch(r){return!1}}();r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,CreateMethodProperty(self,"AggregateError",r),e&&CreateMethodProperty(self,"AggregateError",_ErrorConstructor("AggregateError"))}();
@@ -1,8 +1,18 @@
1
1
 
2
2
  // AggregateError
3
- /* global CreateDataPropertyOrThrow, IterableToList */
3
+ /* global _ErrorConstructor, CreateDataPropertyOrThrow, CreateMethodProperty, IterableToList */
4
4
  (function () {
5
+ var hasErrorCause = (function () {
6
+ try {
7
+ return new Error('m', { cause: 'c' }).cause === 'c';
8
+ } catch (e) {
9
+ return false;
10
+ }
11
+ })();
12
+
5
13
  function AggregateError (errors, message) {
14
+ if (!(this instanceof AggregateError)) return new AggregateError(errors, message);
15
+
6
16
  var temp = typeof message === 'undefined' ? new Error() : new Error(message);
7
17
 
8
18
  CreateDataPropertyOrThrow(this, 'name', 'AggregateError');
@@ -26,5 +36,10 @@
26
36
  AggregateError.prototype = Object.create(Error.prototype);
27
37
  AggregateError.prototype.constructor = AggregateError;
28
38
 
29
- self.AggregateError = AggregateError;
39
+ CreateMethodProperty(self, 'AggregateError', AggregateError);
40
+
41
+ // If `Error.cause` is available, add it to `AggregateError`
42
+ if (hasErrorCause) {
43
+ CreateMethodProperty(self, 'AggregateError', _ErrorConstructor('AggregateError'));
44
+ }
30
45
  })();
@@ -0,0 +1 @@
1
+ {"aliases":["default-3.4","default-3.5","default-3.6","default"],"dependencies":["DocumentFragment.prototype.append"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment/replaceChildren","spec":"http://dom.spec.whatwg.org/#dom-parentnode-replacechildren","browsers":{"android":"*","bb":"*","chrome":"<86","edge":"*","edge_mob":"*","firefox":"<78","firefox_mob":"<79","ie":"*","ie_mob":"*","opera":"<72","op_mob":"<61","op_mini":"*","safari":"<14.0","ios_saf":"<14.0","samsung_mob":"<14.0"},"detectSource":"\"DocumentFragment\"in self&&\"replaceChildren\"in DocumentFragment.prototype\n","baseDir":"DocumentFragment/prototype/replaceChildren","hasTests":true,"isTestable":true,"isPublic":true,"size":244}
@@ -0,0 +1 @@
1
+ !function(t){function e(){for(;this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}document.createDocumentFragment().constructor.prototype.replaceChildren=e,t.DocumentFragment.prototype.replaceChildren=e}(self);
@@ -0,0 +1,15 @@
1
+
2
+ // DocumentFragment.prototype.replaceChildren
3
+ (function (global) {
4
+ function replaceChildren() {
5
+ while (this.firstChild) {
6
+ this.removeChild(this.firstChild);
7
+ }
8
+ this.append.apply(this, arguments);
9
+ }
10
+
11
+ var fragmentProto = document.createDocumentFragment().constructor.prototype;
12
+ fragmentProto.replaceChildren = replaceChildren;
13
+
14
+ global.DocumentFragment.prototype.replaceChildren = replaceChildren;
15
+ }(self));
@@ -0,0 +1 @@
1
+ {"aliases":["default-3.4","default-3.5","default-3.6","default"],"dependencies":["Element.prototype.append"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/Element/replaceChildren","spec":"http://dom.spec.whatwg.org/#dom-parentnode-replacechildren","browsers":{"android":"*","bb":"*","chrome":"<86","edge":"*","edge_mob":"*","firefox":"<78","firefox_mob":"<79","ie":"*","ie_mob":"*","opera":"<72","op_mob":"<61","op_mini":"*","safari":"<14.0","ios_saf":"<14.0","samsung_mob":"<14.0"},"detectSource":"\"Element\"in self&&\"replaceChildren\"in Element.prototype\n","baseDir":"Element/prototype/replaceChildren","hasTests":true,"isTestable":true,"isPublic":true,"size":173}
@@ -0,0 +1 @@
1
+ Document.prototype.replaceChildren=Element.prototype.replaceChildren=function e(){for(;this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)};
@@ -0,0 +1,8 @@
1
+
2
+ // Element.prototype.replaceChildren
3
+ Document.prototype.replaceChildren = Element.prototype.replaceChildren = function replaceChildren() {
4
+ while (this.firstChild) {
5
+ this.removeChild(this.firstChild);
6
+ }
7
+ this.append.apply(this, arguments);
8
+ };
@@ -0,0 +1 @@
1
+ {"aliases":["es2022"],"dependencies":["_ESAbstract.CreateMethodProperty","_ErrorConstructor"],"spec":"https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-installerrorcause","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause","browsers":{"android":"*","bb":"*","chrome":"<93","edge":"*","edge_mob":"*","firefox":"<91","firefox_mob":"<91","ie":"*","ie_mob":"*","opera":"<79","op_mob":"<66","op_mini":"*","safari":"<15.0","ios_saf":"<15.0","samsung_mob":"<17.0"},"detectSource":"(function(){try{return\"c\"===new Error(\"m\",{cause:\"c\"}).cause}catch(r){return!1}})()\n","baseDir":"Error/cause","hasTests":true,"isTestable":true,"isPublic":true,"size":250}
@@ -0,0 +1 @@
1
+ !function(){var r=["Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"];"AggregateError"in self&&r.push("AggregateError");for(var e=0;e<r.length;e++){var o=r[e];CreateMethodProperty(self,o,_ErrorConstructor(o))}}();
@@ -0,0 +1,24 @@
1
+
2
+ // Error.cause
3
+ /* global _ErrorConstructor, CreateMethodProperty */
4
+
5
+ (function () {
6
+ var _errorNames = [
7
+ 'Error',
8
+ 'EvalError',
9
+ 'RangeError',
10
+ 'ReferenceError',
11
+ 'SyntaxError',
12
+ 'TypeError',
13
+ 'URIError'
14
+ ];
15
+
16
+ if ('AggregateError' in self) {
17
+ _errorNames.push('AggregateError');
18
+ }
19
+
20
+ for (var i = 0; i < _errorNames.length; i++) {
21
+ var name = _errorNames[i];
22
+ CreateMethodProperty(self, name, _ErrorConstructor(name));
23
+ }
24
+ })();
@@ -1 +1 @@
1
- {"dependencies":["Element.prototype.matches","Map","MutationObserver","Node.prototype.contains","Set","WeakMap"],"aliases":["Element.prototype.inert"],"license":"W3C","spec":"https://html.spec.whatwg.org/multipage/interaction.html#dom-inert","repo":"https://github.com/WICG/inert","docs":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert","browsers":{"android":"*","bb":"*","chrome":"<102","edge":"*","edge_mob":"*","firefox":"<104","firefox_mob":"<104","ie":">=9","ie_mob":">=9","opera":"<88","op_mob":"<70","op_mini":"*","safari":"<15.5","ios_saf":"<15.5","samsung_mob":"*"},"detectSource":"\"HTMLElement\"in self&&\"inert\"in HTMLElement.prototype\n","baseDir":"HTMLElement/prototype/inert","hasTests":true,"isTestable":true,"isPublic":true,"size":8386}
1
+ {"dependencies":["Element.prototype.matches","Map","MutationObserver","Node.prototype.contains","Set","WeakMap"],"aliases":["Element.prototype.inert"],"license":"W3C","spec":"https://html.spec.whatwg.org/multipage/interaction.html#dom-inert","repo":"https://github.com/WICG/inert","docs":"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert","browsers":{"android":"*","bb":"*","chrome":"<102","edge":"*","edge_mob":"*","firefox":"<104","firefox_mob":"<104","ie":">=9","ie_mob":">=9","opera":"<88","op_mob":"<70","op_mini":"*","safari":"<15.5","ios_saf":"<15.5","samsung_mob":"<19.0"},"detectSource":"\"HTMLElement\"in self&&\"inert\"in HTMLElement.prototype\n","baseDir":"HTMLElement/prototype/inert","hasTests":true,"isTestable":true,"isPublic":true,"size":8386}
@@ -1 +1 @@
1
- {"aliases":[],"dependencies":["Event","performance.now"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver","spec":"http://rawgit.com/w3c/IntersectionObserver/master/index.html","notes":[],"repo":"https://github.com/w3c/IntersectionObserver","browsers":{"android":"*","bb":"*","chrome":"<51","edge":"<16","edge_mob":"<16","firefox":"<55","firefox_mob":"<55","ie":"*","ie_mob":"*","opera":"<45","op_mob":"<46","op_mini":"*","safari":"<16.1","ios_saf":"<16.1","samsung_mob":"<7.0"},"detectSource":"\"IntersectionObserver\"in window&&\"IntersectionObserverEntry\"in window&&\"intersectionRatio\"in window.IntersectionObserverEntry.prototype\n","baseDir":"IntersectionObserver","hasTests":false,"isTestable":true,"isPublic":true,"size":6733}
1
+ {"aliases":[],"dependencies":["Event","performance.now"],"docs":"https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver","spec":"http://rawgit.com/w3c/IntersectionObserver/master/index.html","notes":[],"repo":"https://github.com/w3c/IntersectionObserver","browsers":{"android":"*","bb":"*","chrome":"<51","edge":"<16","edge_mob":"<16","firefox":"<55","firefox_mob":"<55","ie":"*","ie_mob":"*","opera":"<45","op_mob":"<46","op_mini":"*","safari":"<17.0","ios_saf":"<17.0","samsung_mob":"<7.0"},"detectSource":"\"IntersectionObserver\"in window&&\"IntersectionObserverEntry\"in window&&\"intersectionRatio\"in window.IntersectionObserverEntry.prototype\n","baseDir":"IntersectionObserver","hasTests":false,"isTestable":true,"isPublic":true,"size":6733}
@@ -1 +1 @@
1
- {"aliases":["es6","es2015","default-3.6","default"],"dependencies":["_ESAbstract.CreateMethodProperty","_ESAbstract.CreateIterResultObject","_ESAbstract.GetMethod","_ESAbstract.GetIterator","_ESAbstract.IsCallable","_ESAbstract.IteratorClose","_ESAbstract.IteratorComplete","_ESAbstract.IteratorNext","_ESAbstract.IteratorStep","_ESAbstract.IteratorValue","_ESAbstract.OrdinaryCreateFromConstructor","_ESAbstract.SameValueZero","_ESAbstract.Type","Symbol","Symbol.iterator","Symbol.species","Symbol.toStringTag","Object.isExtensible"],"notes":["The test suite for this polyfill is derived from work of Andrea Giammarchi which is [published under an MIT licence](https://github.com/WebReflection/es6-collections)"],"docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map","browsers":{"android":"<5.1","bb":"10 - *","chrome":"<49","edge":"<15","firefox":"<51","firefox_mob":"<51","ie":"*","ie_mob":"*","opera":"<36","op_mob":"<36","op_mini":"*","safari":"<10.0","ios_saf":"<10.0","samsung_mob":"<5.0"},"detectSource":"\"Map\"in self&&function(t){try{var n=new t.Map([[1,1],[2,2]])\nreturn 0===t.Map.length&&2===n.size&&\"Symbol\"in t&&\"iterator\"in t.Symbol&&\"function\"==typeof n[t.Symbol.iterator]&&\"toStringTag\"in t.Symbol&&void 0!==n[t.Symbol.toStringTag]}catch(t){return!1}}(self)\n","baseDir":"Map","hasTests":true,"isTestable":true,"isPublic":true,"size":7438}
1
+ {"aliases":["es6","es2015","default-3.6","default"],"dependencies":["_ESAbstract.CreateMethodProperty","_ESAbstract.CreateIterResultObject","_ESAbstract.GetMethod","_ESAbstract.GetIterator","_ESAbstract.IsCallable","_ESAbstract.IteratorClose","_ESAbstract.IteratorComplete","_ESAbstract.IteratorNext","_ESAbstract.IteratorStep","_ESAbstract.IteratorValue","_ESAbstract.OrdinaryCreateFromConstructor","_ESAbstract.SameValueZero","_ESAbstract.Type","Symbol","Symbol.iterator","Symbol.species","Symbol.toStringTag","Object.isExtensible"],"notes":["The test suite for this polyfill is derived from work of Andrea Giammarchi which is [published under an MIT licence](https://github.com/WebReflection/es6-collections)"],"docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map","browsers":{"android":"<5.1","bb":"10 - *","chrome":"<49","edge":"<15","firefox":"<51","firefox_mob":"<51","ie":"*","ie_mob":"*","opera":"<36","op_mob":"<36","op_mini":"*","safari":"<10.0","ios_saf":"<10.0","samsung_mob":"<5.0"},"detectSource":"\"Map\"in self&&function(t){try{var n=new t.Map([[1,1],[2,2]])\nreturn 0===t.Map.length&&2===n.size&&\"Symbol\"in t&&\"iterator\"in t.Symbol&&\"function\"==typeof n[t.Symbol.iterator]&&\"toStringTag\"in t.Symbol&&void 0!==n[t.Symbol.toStringTag]}catch(t){return!1}}(self)\n","baseDir":"Map","hasTests":true,"isTestable":true,"isPublic":true,"size":7486}
@@ -1 +1 @@
1
- !function(e){function t(e,t){if("object"!==Type(e))throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));if(!0!==e._es6Map)throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));var r=Object.create(y);return Object.defineProperty(r,"[[Map]]",{configurable:!0,enumerable:!1,writable:!0,value:e}),Object.defineProperty(r,"[[MapNextIndex]]",{configurable:!0,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"[[MapIterationKind]]",{configurable:!0,enumerable:!1,writable:!0,value:t}),r}var r=0,o=Symbol("meta_"+(1e8*Math.random()+"").replace(".","")),a=function(e){if("object"==typeof e?null!==e:"function"==typeof e){if(!Object.isExtensible(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,o)){var t=typeof e+"-"+ ++r;Object.defineProperty(e,o,{configurable:!1,enumerable:!1,writable:!1,value:t})}return e[o]}return""+e},i=function(e,t){var r=a(t);if(!1===r)return p(e,t);var o=e._table[r];return void 0!==o&&o},p=function(e,t){for(var r=0;r<e._keys.length;r++){var o=e._keys[r];if(o!==l&&SameValueZero(o,t))return r}return!1},n=function(e,t,r){var o=a(t);return!1!==o&&(!1===r?delete e._table[o]:e._table[o]=r,!0)},l=Symbol("undef"),c=function e(){if(!(this instanceof e))throw new TypeError('Constructor Map requires "new"');var t=OrdinaryCreateFromConstructor(this,e.prototype,{_table:{},_keys:[],_values:[],_size:0,_es6Map:!0}),r=arguments.length>0?arguments[0]:void 0;if(null===r||void 0===r)return t;var o=t.set;if(!IsCallable(o))throw new TypeError("Map.prototype.set is not a function");try{for(var a=GetIterator(r);;){var i=IteratorStep(a);if(!1===i)return t;var p=IteratorValue(i);if("object"!==Type(p))try{throw new TypeError("Iterator value "+p+" is not an entry object")}catch(e){return IteratorClose(a,e)}try{var n=p[0],l=p[1];o.call(t,n,l)}catch(e){return IteratorClose(a,e)}}}catch(e){if(Array.isArray(r)||"[object Arguments]"===Object.prototype.toString.call(r)){var c,y=r.length;for(c=0;c<y;c++)o.call(t,r[c][0],r[c][1])}}return t};Object.defineProperty(c,"prototype",{configurable:!1,enumerable:!1,writable:!1,value:{}}),Object.defineProperty(c,Symbol.species,{configurable:!0,enumerable:!1,get:function(){return this},set:void 0}),CreateMethodProperty(c.prototype,"clear",function e(){var t=this;if("object"!==Type(t))throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));if(!0!==t._es6Map)throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));for(var r=t._keys,o=0;o<r.length;o++)t._keys[o]=l,t._values[o]=l;this._size=0,this._table={}}),CreateMethodProperty(c.prototype,"constructor",c),CreateMethodProperty(c.prototype,"delete",function(e){var t=this;if("object"!==Type(t))throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));if(!0!==t._es6Map)throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));var r=i(t,e);if(!1!==r){var o=t._keys[r];if(o!==l&&SameValueZero(o,e))return this._keys[r]=l,this._values[r]=l,this._size=--this._size,n(this,e,!1),!0}return!1}),CreateMethodProperty(c.prototype,"entries",function e(){return t(this,"key+value")}),CreateMethodProperty(c.prototype,"forEach",function(e){var t=this;if("object"!==Type(t))throw new TypeError("Method Map.prototype.forEach called on incompatible receiver "+Object.prototype.toString.call(t));if(!0!==t._es6Map)throw new TypeError("Method Map.prototype.forEach called on incompatible receiver "+Object.prototype.toString.call(t));if(!IsCallable(e))throw new TypeError(Object.prototype.toString.call(e)+" is not a function.");if(arguments[1])var r=arguments[1];for(var o=t._keys,a=0;a<o.length;a++)t._keys[a]!==l&&t._values[a]!==l&&e.call(r,t._values[a],t._keys[a],t)}),CreateMethodProperty(c.prototype,"get",function e(t){var r=this;if("object"!==Type(r))throw new TypeError("Method Map.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6Map)throw new TypeError("Method Map.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));var o=i(r,t);if(!1!==o){var a=r._keys[o];if(a!==l&&SameValueZero(a,t))return r._values[o]}}),CreateMethodProperty(c.prototype,"has",function e(t){var r=this;if("object"!=typeof r)throw new TypeError("Method Map.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6Map)throw new TypeError("Method Map.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));var o=i(r,t);if(!1!==o){var a=r._keys[o];if(a!==l&&SameValueZero(a,t))return!0}return!1}),CreateMethodProperty(c.prototype,"keys",function e(){return t(this,"key")}),CreateMethodProperty(c.prototype,"set",function e(t,r){var o=this;if("object"!==Type(o))throw new TypeError("Method Map.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));if(!0!==o._es6Map)throw new TypeError("Method Map.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));var a=i(o,t);if(!1!==a)o._values[a]=r;else{-0===t&&(t=0);var p={"[[Key]]":t,"[[Value]]":r};o._keys.push(p["[[Key]]"]),o._values.push(p["[[Value]]"]),n(o,t,o._keys.length-1),++o._size}return o}),Object.defineProperty(c.prototype,"size",{configurable:!0,enumerable:!1,get:function(){var e=this;if("object"!==Type(e))throw new TypeError("Method Map.prototype.size called on incompatible receiver "+Object.prototype.toString.call(e));if(!0!==e._es6Map)throw new TypeError("Method Map.prototype.size called on incompatible receiver "+Object.prototype.toString.call(e));return this._size},set:void 0}),CreateMethodProperty(c.prototype,"values",function e(){return t(this,"value")}),CreateMethodProperty(c.prototype,Symbol.iterator,c.prototype.entries),Object.defineProperty(c.prototype,Symbol.toStringTag,{value:"Map",writable:!1,enumerable:!1,configurable:!0}),"name"in c||Object.defineProperty(c,"name",{configurable:!0,enumerable:!1,writable:!1,value:"Map"});var y={};Object.defineProperty(y,"isMapIterator",{configurable:!1,enumerable:!1,writable:!1,value:!0}),CreateMethodProperty(y,"next",function e(){var t=this;if("object"!==Type(t))throw new TypeError("Method %MapIteratorPrototype%.next called on incompatible receiver "+Object.prototype.toString.call(t));if(!t.isMapIterator)throw new TypeError("Method %MapIteratorPrototype%.next called on incompatible receiver "+Object.prototype.toString.call(t));var r=t["[[Map]]"],o=t["[[MapNextIndex]]"],a=t["[[MapIterationKind]]"];if(void 0===r)return CreateIterResultObject(void 0,!0);if(!r._es6Map)throw new Error(Object.prototype.toString.call(r)+" has a [[MapData]] internal slot.");for(var i=r._keys,p=i.length;o<p;){var n=Object.create(null);if(n["[[Key]]"]=r._keys[o],n["[[Value]]"]=r._values[o],o+=1,t["[[MapNextIndex]]"]=o,n["[[Key]]"]!==l){if("key"===a)var c=n["[[Key]]"];else if("value"===a)c=n["[[Value]]"];else{if("key+value"!==a)throw new Error;c=[n["[[Key]]"],n["[[Value]]"]]}return CreateIterResultObject(c,!1)}}return t["[[Map]]"]=void 0,CreateIterResultObject(void 0,!0)}),Object.defineProperty(y,Symbol.toStringTag,{value:"Map Iterator",writable:!1,enumerable:!1,configurable:!0}),CreateMethodProperty(y,Symbol.iterator,function e(){return this}),CreateMethodProperty(e,"Map",c)}(self);
1
+ !function(e){function t(e,t){if("object"!==Type(e))throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));if(!0!==e._es6Map)throw new TypeError("createMapIterator called on incompatible receiver "+Object.prototype.toString.call(e));var r=Object.create(y);return Object.defineProperty(r,"[[Map]]",{configurable:!0,enumerable:!1,writable:!0,value:e}),Object.defineProperty(r,"[[MapNextIndex]]",{configurable:!0,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"[[MapIterationKind]]",{configurable:!0,enumerable:!1,writable:!0,value:t}),r}var r=0,o=Symbol("meta_"+(1e8*Math.random()+"").replace(".","")),a=function(e){if("object"==typeof e?null!==e:"function"==typeof e){if(!Object.isExtensible(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,o)){var t=typeof e+"-"+ ++r;Object.defineProperty(e,o,{configurable:!1,enumerable:!1,writable:!1,value:t})}return e[o]}return typeof e+"_f1cc2551-7df7-4319-ba53-5b263a78a257_"+e},i=function(e,t){var r=a(t);if(!1===r)return p(e,t);var o=e._table[r];return void 0!==o&&o},p=function(e,t){for(var r=0;r<e._keys.length;r++){var o=e._keys[r];if(o!==l&&SameValueZero(o,t))return r}return!1},n=function(e,t,r){var o=a(t);return!1!==o&&(!1===r?delete e._table[o]:e._table[o]=r,!0)},l=Symbol("undef"),c=function e(){if(!(this instanceof e))throw new TypeError('Constructor Map requires "new"');var t=OrdinaryCreateFromConstructor(this,e.prototype,{_table:{},_keys:[],_values:[],_size:0,_es6Map:!0}),r=arguments.length>0?arguments[0]:void 0;if(null===r||void 0===r)return t;var o=t.set;if(!IsCallable(o))throw new TypeError("Map.prototype.set is not a function");try{for(var a=GetIterator(r);;){var i=IteratorStep(a);if(!1===i)return t;var p=IteratorValue(i);if("object"!==Type(p))try{throw new TypeError("Iterator value "+p+" is not an entry object")}catch(e){return IteratorClose(a,e)}try{var n=p[0],l=p[1];o.call(t,n,l)}catch(e){return IteratorClose(a,e)}}}catch(e){if(Array.isArray(r)||"[object Arguments]"===Object.prototype.toString.call(r)){var c,y=r.length;for(c=0;c<y;c++)o.call(t,r[c][0],r[c][1])}}return t};Object.defineProperty(c,"prototype",{configurable:!1,enumerable:!1,writable:!1,value:{}}),Object.defineProperty(c,Symbol.species,{configurable:!0,enumerable:!1,get:function(){return this},set:void 0}),CreateMethodProperty(c.prototype,"clear",function e(){var t=this;if("object"!==Type(t))throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));if(!0!==t._es6Map)throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));for(var r=t._keys,o=0;o<r.length;o++)t._keys[o]=l,t._values[o]=l;this._size=0,this._table={}}),CreateMethodProperty(c.prototype,"constructor",c),CreateMethodProperty(c.prototype,"delete",function(e){var t=this;if("object"!==Type(t))throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));if(!0!==t._es6Map)throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(t));var r=i(t,e);if(!1!==r){var o=t._keys[r];if(o!==l&&SameValueZero(o,e))return this._keys[r]=l,this._values[r]=l,this._size=--this._size,n(this,e,!1),!0}return!1}),CreateMethodProperty(c.prototype,"entries",function e(){return t(this,"key+value")}),CreateMethodProperty(c.prototype,"forEach",function(e){var t=this;if("object"!==Type(t))throw new TypeError("Method Map.prototype.forEach called on incompatible receiver "+Object.prototype.toString.call(t));if(!0!==t._es6Map)throw new TypeError("Method Map.prototype.forEach called on incompatible receiver "+Object.prototype.toString.call(t));if(!IsCallable(e))throw new TypeError(Object.prototype.toString.call(e)+" is not a function.");if(arguments[1])var r=arguments[1];for(var o=t._keys,a=0;a<o.length;a++)t._keys[a]!==l&&t._values[a]!==l&&e.call(r,t._values[a],t._keys[a],t)}),CreateMethodProperty(c.prototype,"get",function e(t){var r=this;if("object"!==Type(r))throw new TypeError("Method Map.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6Map)throw new TypeError("Method Map.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));var o=i(r,t);if(!1!==o){var a=r._keys[o];if(a!==l&&SameValueZero(a,t))return r._values[o]}}),CreateMethodProperty(c.prototype,"has",function e(t){var r=this;if("object"!=typeof r)throw new TypeError("Method Map.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6Map)throw new TypeError("Method Map.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));var o=i(r,t);if(!1!==o){var a=r._keys[o];if(a!==l&&SameValueZero(a,t))return!0}return!1}),CreateMethodProperty(c.prototype,"keys",function e(){return t(this,"key")}),CreateMethodProperty(c.prototype,"set",function e(t,r){var o=this;if("object"!==Type(o))throw new TypeError("Method Map.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));if(!0!==o._es6Map)throw new TypeError("Method Map.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));var a=i(o,t);if(!1!==a)o._values[a]=r;else{-0===t&&(t=0);var p={"[[Key]]":t,"[[Value]]":r};o._keys.push(p["[[Key]]"]),o._values.push(p["[[Value]]"]),n(o,t,o._keys.length-1),++o._size}return o}),Object.defineProperty(c.prototype,"size",{configurable:!0,enumerable:!1,get:function(){var e=this;if("object"!==Type(e))throw new TypeError("Method Map.prototype.size called on incompatible receiver "+Object.prototype.toString.call(e));if(!0!==e._es6Map)throw new TypeError("Method Map.prototype.size called on incompatible receiver "+Object.prototype.toString.call(e));return this._size},set:void 0}),CreateMethodProperty(c.prototype,"values",function e(){return t(this,"value")}),CreateMethodProperty(c.prototype,Symbol.iterator,c.prototype.entries),Object.defineProperty(c.prototype,Symbol.toStringTag,{value:"Map",writable:!1,enumerable:!1,configurable:!0}),"name"in c||Object.defineProperty(c,"name",{configurable:!0,enumerable:!1,writable:!1,value:"Map"});var y={};Object.defineProperty(y,"isMapIterator",{configurable:!1,enumerable:!1,writable:!1,value:!0}),CreateMethodProperty(y,"next",function e(){var t=this;if("object"!==Type(t))throw new TypeError("Method %MapIteratorPrototype%.next called on incompatible receiver "+Object.prototype.toString.call(t));if(!t.isMapIterator)throw new TypeError("Method %MapIteratorPrototype%.next called on incompatible receiver "+Object.prototype.toString.call(t));var r=t["[[Map]]"],o=t["[[MapNextIndex]]"],a=t["[[MapIterationKind]]"];if(void 0===r)return CreateIterResultObject(void 0,!0);if(!r._es6Map)throw new Error(Object.prototype.toString.call(r)+" has a [[MapData]] internal slot.");for(var i=r._keys,p=i.length;o<p;){var n=Object.create(null);if(n["[[Key]]"]=r._keys[o],n["[[Value]]"]=r._values[o],o+=1,t["[[MapNextIndex]]"]=o,n["[[Key]]"]!==l){if("key"===a)var c=n["[[Key]]"];else if("value"===a)c=n["[[Value]]"];else{if("key+value"!==a)throw new Error;c=[n["[[Key]]"],n["[[Value]]"]]}return CreateIterResultObject(c,!1)}}return t["[[Map]]"]=void 0,CreateIterResultObject(void 0,!0)}),Object.defineProperty(y,Symbol.toStringTag,{value:"Map Iterator",writable:!1,enumerable:!1,configurable:!0}),CreateMethodProperty(y,Symbol.iterator,function e(){return this}),CreateMethodProperty(e,"Map",c)}(self);
@@ -33,8 +33,11 @@
33
33
  // Return previously defined hashed key
34
34
  return recordKey[_metaKey];
35
35
  }
36
- // If this is just a primitive, we can cast it to a string and return it
37
- return ''+recordKey;
36
+ // If this is just a primitive:
37
+ // - prepend the type
38
+ // - add a unique marker
39
+ // - cast to a string
40
+ return (typeof recordKey) + '_f1cc2551-7df7-4319-ba53-5b263a78a257_' + recordKey;
38
41
  };
39
42
 
40
43
  /**
@@ -0,0 +1 @@
1
+ {"dependencies":["_ESAbstract.DefinePropertyOrThrow"],"spec":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createnonenumerabledatapropertyorthrow","browsers":{"android":"*","bb":"*","chrome":"*","edge":"*","edge_mob":"*","firefox":"*","firefox_mob":"*","ie":"*","ie_mob":"*","opera":"*","op_mob":"*","op_mini":"*","safari":"*","ios_saf":"*","samsung_mob":"*"},"detectSource":"","baseDir":"_ESAbstract/CreateNonEnumerableDataPropertyOrThrow","hasTests":false,"isTestable":true,"isPublic":false,"size":142}
@@ -0,0 +1 @@
1
+ function CreateNonEnumerableDataPropertyOrThrow(e,r,a){var n={value:a,writable:!0,enumerable:!1,configurable:!0};DefinePropertyOrThrow(e,r,n)}
@@ -0,0 +1,17 @@
1
+
2
+ // _ESAbstract.CreateNonEnumerableDataPropertyOrThrow
3
+ /* global DefinePropertyOrThrow */
4
+ // 7.3.8 CreateNonEnumerableDataPropertyOrThrow ( O, P, V )
5
+ function CreateNonEnumerableDataPropertyOrThrow (O, P, V) { // eslint-disable-line no-unused-vars
6
+ // 1. Assert: O is an ordinary, extensible object with no non-configurable properties.
7
+ // 2. Let newDesc be the PropertyDescriptor { [[Value]]: V, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.
8
+ var newDesc = {
9
+ value: V,
10
+ writable: true,
11
+ enumerable: false,
12
+ configurable: true
13
+ };
14
+ // 3. Perform ! DefinePropertyOrThrow(O, P, newDesc).
15
+ DefinePropertyOrThrow(O, P, newDesc);
16
+ // 4. Return unused.
17
+ }
@@ -0,0 +1 @@
1
+ {"dependencies":[],"spec":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-definepropertyorthrow","browsers":{"android":"*","bb":"*","chrome":"*","edge":"*","edge_mob":"*","firefox":"*","firefox_mob":"*","ie":"*","ie_mob":"*","opera":"*","op_mob":"*","op_mini":"*","safari":"*","ios_saf":"*","samsung_mob":"*"},"detectSource":"","baseDir":"_ESAbstract/DefinePropertyOrThrow","hasTests":false,"isTestable":true,"isPublic":false,"size":238}
@@ -0,0 +1 @@
1
+ function DefinePropertyOrThrow(t,r,e){var o;try{Object.defineProperty(t,r,e),o=!0}catch(t){o=!1}if(!o)throw new TypeError("Cannot define property `"+Object.prototype.toString.call(r)+"` on object `"+Object.prototype.toString.call(t)+"`")}
@@ -0,0 +1,18 @@
1
+
2
+ // _ESAbstract.DefinePropertyOrThrow
3
+ // 7.3.9 DefinePropertyOrThrow ( O, P, desc )
4
+ function DefinePropertyOrThrow (O, P, desc) { // eslint-disable-line no-unused-vars
5
+ // 1. Let success be ? O.[[DefineOwnProperty]](P, desc).
6
+ var success;
7
+ try {
8
+ Object.defineProperty(O, P, desc);
9
+ success = true;
10
+ } catch (e) {
11
+ success = false;
12
+ }
13
+ // 2. If success is false, throw a TypeError exception.
14
+ if (!success) {
15
+ throw new TypeError('Cannot define property `' + Object.prototype.toString.call(P) + '` on object `' + Object.prototype.toString.call(O) + '`');
16
+ }
17
+ // 3. Return unused.
18
+ }
@@ -0,0 +1 @@
1
+ {"dependencies":["_ESAbstract.CreateMethodProperty","_ESAbstract.CreateNonEnumerableDataPropertyOrThrow","_ESAbstract.Get","_ESAbstract.HasProperty","_ESAbstract.Type","Object.setPrototypeOf"],"spec":"https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-installerrorcause","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause","browsers":{"android":"*","bb":"*","chrome":"*","edge":"*","edge_mob":"*","firefox":"*","firefox_mob":"*","ie":"*","ie_mob":"*","opera":"*","op_mob":"*","op_mini":"*","safari":"*","ios_saf":"*","samsung_mob":"*"},"detectSource":"","baseDir":"_ErrorConstructor","hasTests":false,"isTestable":true,"isPublic":false,"size":1261}
@@ -0,0 +1 @@
1
+ var _ErrorConstructor;!function(){function r(r,n){if("object"===Type(n)&&HasProperty(n,"cause")){var e=Get(n,"cause");CreateNonEnumerableDataPropertyOrThrow(r,"cause",e)}}function n(n,e){var t=o[n],u=e.length;return function(){var n=2===u?t.call(null,arguments[0],arguments[1]):t.call(null,arguments[0]);return r(n,arguments.length>u&&arguments[u]),CreateMethodProperty(n,"constructor",e),n}}function e(r,n){return"Error"!==r&&Object.setPrototypeOf(n,self.Error),n.prototype=o[r].prototype,Object.defineProperty(n,"prototype",{writable:!1}),n.name!==r&&Object.defineProperty(n,"name",{value:r,configurable:!0}),n}var t={Error:function r(n){return u.Error.apply(null,arguments)},EvalError:function r(n){return u.EvalError.apply(null,arguments)},RangeError:function r(n){return u.RangeError.apply(null,arguments)},ReferenceError:function r(n){return u.ReferenceError.apply(null,arguments)},SyntaxError:function r(n){return u.SyntaxError.apply(null,arguments)},TypeError:function r(n){return u.TypeError.apply(null,arguments)},URIError:function r(n){return u.URIError.apply(null,arguments)},AggregateError:function r(n,e){return u.AggregateError.apply(null,arguments)}},o={},u={};_ErrorConstructor=function(r){return o[r]=self[r],u[r]=n(r,t[r]),e(r,t[r]),t[r]}}();
@@ -0,0 +1,69 @@
1
+
2
+ // _ErrorConstructor
3
+ /* global CreateMethodProperty, CreateNonEnumerableDataPropertyOrThrow, Get, HasProperty, Type */
4
+
5
+ // eslint-disable-next-line no-unused-vars
6
+ var _ErrorConstructor;
7
+
8
+ (function () {
9
+ // 20.5.8.1 InstallErrorCause ( O, options )
10
+ function InstallErrorCause(O, options) {
11
+ // 1. If options is an Object and ? HasProperty(options, "cause") is true, then
12
+ if (Type(options) === 'object' && HasProperty(options, 'cause')) {
13
+ // a. Let cause be ? Get(options, "cause").
14
+ var cause = Get(options, 'cause');
15
+ // b. Perform CreateNonEnumerableDataPropertyOrThrow(O, "cause", cause).
16
+ CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause);
17
+ }
18
+ // 2. Return unused.
19
+ }
20
+
21
+ // based on https://github.com/es-shims/error-cause/blob/de17ea05/Error/implementation.js#L12-L20
22
+ function _makeErrorConstructor (name, _Error) {
23
+ var _NativeError = _nativeErrors[name];
24
+ var arity = _Error.length;
25
+ return function () {
26
+ var O = arity === 2
27
+ ? _NativeError.call(null, arguments[0], arguments[1])
28
+ : _NativeError.call(null, arguments[0]);
29
+ InstallErrorCause(O, arguments.length > arity && arguments[arity]);
30
+ CreateMethodProperty(O, 'constructor', _Error);
31
+ return O;
32
+ }
33
+ }
34
+
35
+ // based on https://github.com/es-shims/error-cause/blob/de17ea05/Error/implementation.js#L22-L29
36
+ function _inheritErrorPrototype (name, _Error) {
37
+ if (name !== 'Error') {
38
+ Object.setPrototypeOf(_Error, self.Error);
39
+ }
40
+ _Error.prototype = _nativeErrors[name].prototype;
41
+ Object.defineProperty(_Error, 'prototype', { writable: false });
42
+ // in IE11, the constructor name needs to be corrected
43
+ if (_Error.name !== name) {
44
+ Object.defineProperty(_Error, 'name', { value: name, configurable: true });
45
+ }
46
+ return _Error;
47
+ }
48
+
49
+ var _newErrors = {
50
+ Error: function Error (_message) { return _errorConstructors.Error.apply(null, arguments); },
51
+ EvalError: function EvalError (_message) { return _errorConstructors.EvalError.apply(null, arguments); },
52
+ RangeError: function RangeError (_message) { return _errorConstructors.RangeError.apply(null, arguments); },
53
+ ReferenceError: function ReferenceError (_message) { return _errorConstructors.ReferenceError.apply(null, arguments); },
54
+ SyntaxError: function SyntaxError (_message) { return _errorConstructors.SyntaxError.apply(null, arguments); },
55
+ TypeError: function TypeError (_message) { return _errorConstructors.TypeError.apply(null, arguments); },
56
+ URIError: function URIError (_message) { return _errorConstructors.URIError.apply(null, arguments); },
57
+ AggregateError: function AggregateError (_errors, _message) { return _errorConstructors.AggregateError.apply(null, arguments); }
58
+ };
59
+
60
+ var _nativeErrors = {};
61
+ var _errorConstructors = {};
62
+
63
+ _ErrorConstructor = function (name) {
64
+ _nativeErrors[name] = self[name];
65
+ _errorConstructors[name] = _makeErrorConstructor(name, _newErrors[name]);
66
+ _inheritErrorPrototype(name, _newErrors[name]);
67
+ return _newErrors[name];
68
+ }
69
+ })();