From fb6606ddf19e7592f3ec868a92f26ee3ac743283 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Wed, 26 Jun 2019 16:21:11 +0200 Subject: [PATCH] fix(ie11): remove unnecessary polyfills fixes #1668 --- package.json | 1 + readme.md | 56 ++++++++++++++++++++------------- scripts/build-polyfills.js | 24 +++++++++++++- src/client/polyfills/core-js.js | 12 ++----- 4 files changed, 62 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 35e176f4320..ede6ea93166 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "ansi-colors": "4.0.1", "autoprefixer": "9.6.0", "conventional-changelog-cli": "^2.0.12", + "core-js-builder": "^3.1.4", "css-what": "2.1.3", "cssnano": "4.1.10", "execa": "^1.0.0", diff --git a/readme.md b/readme.md index 223d471fe88..1918d354f92 100644 --- a/readme.md +++ b/readme.md @@ -148,30 +148,44 @@ Web Components, specifically Custom Elements, are natively supported in Chrome a ## Polyfills -For the small minority of browsers that do not support modern browser features and APIs, Stencil will automatically polyfill them on-demand. What this means is that for browsers that already support the feature natively, they will not have to download and parse any unnecessary JavaScript. The great news is that in today's web landscape, most modern APIs are already shipping for what Stencil requires. Polyfills which are loaded on-demand include: +Stencil includes a subset of the `core-js` polyfills for old browsers like IE11, `fetch` and conditionally downloads the [Custom Elements v1](https://github.com/webcomponents/polyfills/tree/master/packages/custom-elements) only when it's needed for modern browsers (EDGE and old versions of Firefox.) + + +### Internet Explorer 11 + +Browser that does not support native ESM (at the moment, only IE11 and older) will download a subset of [`core-js`](https://github.com/zloirock/core-js). + +This subset is generated using the [`core-js-builder` tool](https://github.com/zloirock/core-js/tree/master/packages/core-js-builder) with the following configuration: + +```js +require('core-js-builder')({ + modules: [ + 'es', + 'web.url', + 'web.url.to-json', + 'web.url-search-params' + ], + blacklist: [ + 'es.math', + 'es.date', + 'es.symbol', + 'es.array-buffer', + 'es.data-view', + 'es.typed-array', + 'es.reflect' + ] +}); +``` + +In addition, the following set of polyfills are also included: - - [Custom Element](https://github.com/WebReflection/document-register-element) - - [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) - - [CSS Variables](https://github.com/webcomponents/shadycss) - [Promise](https://github.com/stefanpenner/es6-promise) - - [async/await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) *(transpiled to promises)* - [fetch()](https://github.com/github/fetch) - - [URL](https://github.com/lifaon74/url-polyfill) - - [Array.fill](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) - - [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) - - [Array.findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) - - [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) - - [Array.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes) - - [Element.closest](https://github.com/jonathantneal/closest) - - [Element.matches](https://github.com/jonathantneal/closest) - - [Element.remove](https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove) - - [Map/Set/WeakMap/WeakSet](https://github.com/WebReflection/es6-collections) - - [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) - - [Object.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) - - [Object.values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) - - [String.startsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) - - [String.endsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith) - - [String.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) + - [CSS variables](https://github.com/ionic-team/stencil/tree/master/src/client/polyfills/css-shim): We implemented out own CSS variables polyfill that integrates into the Stencil¡s run + +### All browsers + +Some modern browsers today like Edge does not include native support for web components, in that case we conditionally load the [Custom Elements v1](https://github.com/webcomponents/polyfills/tree/master/packages/custom-elements) polyfill. ## Related diff --git a/scripts/build-polyfills.js b/scripts/build-polyfills.js index 138a62d64cb..a61bb44a082 100644 --- a/scripts/build-polyfills.js +++ b/scripts/build-polyfills.js @@ -2,13 +2,35 @@ const fs = require('fs-extra'); const path = require('path'); const rollup = require('rollup'); const ts = require('typescript'); -const terser = require('terser'); const ROOT_DIR = path.join(__dirname, '..'); const SRC_DIR = path.join(ROOT_DIR, 'src', 'client', 'polyfills'); +function buildCoreJs() { + return require('core-js-builder')({ + modules: [ + 'es', + 'web.url', + 'web.url.to-json', + 'web.url-search-params' + ], + blacklist: [ + 'es.math', + 'es.date', + 'es.symbol', + 'es.array-buffer', + 'es.data-view', + 'es.typed-array', + 'es.reflect' + ], + filename: path.join(SRC_DIR, 'core-js.js'), + }); +} module.exports = async function buildPolyfills(transpiledPolyfillsDir, outputPolyfillsDir) { + // Only run when regenerating core-js polyfill + // await buildCoreJs(); + await fs.emptyDir(outputPolyfillsDir); const filesSrc = (await fs.readdir(SRC_DIR)).filter(f => f.endsWith('.js')); diff --git a/src/client/polyfills/core-js.js b/src/client/polyfills/core-js.js index ae46b26926b..e891d9b8874 100644 --- a/src/client/polyfills/core-js.js +++ b/src/client/polyfills/core-js.js @@ -1,15 +1,9 @@ /** - * core-js 3.0.1 + * core-js 3.1.4 * https://github.com/zloirock/core-js * License: http://rock.mit-license.org * © 2019 Denis Pushkarev (zloirock.ru) */ -!function(Ut){"use strict";!function(e){var n={};function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(t,r,e){__webpack_require__.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(r,t){if(1&t&&(r=__webpack_require__(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(__webpack_require__.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var n in r)__webpack_require__.d(e,n,function(t){return r[t]}.bind(null,n));return e},__webpack_require__.n=function(t){var r=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,r,e){e(1),e(55),e(56),e(57),e(58),e(59),e(60),e(61),e(62),e(63),e(64),e(65),e(66),e(67),e(68),e(73),e(76),e(81),e(83),e(84),e(85),e(86),e(88),e(89),e(91),e(99),e(100),e(101),e(102),e(110),e(111),e(113),e(114),e(115),e(117),e(118),e(119),e(120),e(121),e(122),e(125),e(126),e(127),e(128),e(134),e(135),e(137),e(138),e(139),e(141),e(142),e(144),e(145),e(147),e(148),e(149),e(150),e(157),e(159),e(160),e(161),e(163),e(164),e(166),e(167),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(178),e(179),e(182),e(183),e(185),e(187),e(188),e(189),e(190),e(191),e(193),e(195),e(198),e(199),e(201),e(202),e(204),e(205),e(206),e(207),e(209),e(210),e(211),e(212),e(213),e(214),e(215),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(224),e(225),e(226),e(228),e(229),e(230),e(231),e(239),e(240),e(241),e(242),e(243),e(244),e(245),e(246),e(247),e(248),e(249),e(250),e(251),e(252),e(253),e(256),e(258),e(259),e(260),e(261),e(263),e(266),e(267),e(268),e(269),e(273),e(276),e(277),e(278),e(279),e(280),e(281),e(282),e(283),e(285),e(286),e(287),e(290),e(291),e(292),e(293),e(294),e(295),e(296),e(297),e(298),e(299),e(300),e(301),e(302),e(307),e(308),e(309),e(310),e(311),e(312),e(313),e(314),e(315),e(316),e(317),e(318),e(319),e(320),e(321),e(322),e(323),e(324),e(325),e(326),e(327),e(328),e(329),e(330),e(331),e(332),e(333),e(334),e(335),e(336),e(337),e(338),e(339),e(340),e(342),e(343),e(344),e(345),e(346),e(348),e(349),e(350),e(352),e(355),e(356),e(357),e(358),e(360),e(361),e(363),e(364),e(365),e(366),e(367),e(368),e(370),e(371),e(372),e(373),e(374),e(375),e(376),e(378),e(379),e(380),e(381),e(382),e(383),e(384),e(385),e(386),e(387),e(388),e(389),e(390),e(391),e(392),e(394),e(395),e(396),e(397),e(398),e(399),e(400),e(401),e(402),e(404),e(405),e(406),e(408),e(409),e(410),e(411),e(412),e(413),e(414),e(415),e(416),e(417),e(418),e(419),e(420),e(421),e(422),e(423),e(424),e(425),e(426),e(427),e(428),e(429),e(430),e(431),e(432),e(433),e(434),e(435),e(436),e(438),e(439),e(440),e(441),e(442),e(446),t.exports=e(445)},function(t,r,e){var n=e(2),a=e(3),o=e(4),i=e(6),u=e(7),c=e(22),f=e(30),s=e(5),l=e(25),h=e(42),p=e(29),g=e(43),v=e(45),d=e(46),y=e(48),b=e(50),m=e(21),x=e(16),w=e(11),S=e(15),A=e(10),E=e(51),O=e(54),I=e(8),M=e(20),R=e(9),_=e(19),P=e(49),j=e(28)("hidden"),k=e(26),T="Symbol",F=k.set,L=k.getterFor(T),N=I.f,U=M.f,D=O.f,C=n.Symbol,B=n.JSON,q=B&&B.stringify,z="prototype",W=g("toPrimitive"),V=R.f,G=l("symbol-registry"),K=l("symbols"),Y=l("op-symbols"),$=l("wks"),J=Object[z],X=n.QObject,H=e(44),Q=!X||!X[z]||!X[z].findChild,Z=o&&s(function(){return 7!=E(U({},"a",{get:function(){return U(this,"a",{value:7}).a}})).a})?function(t,r,e){var n=N(J,r);n&&delete J[r],U(t,r,e),n&&t!==J&&U(J,r,n)}:U,tt=function(t,r){var e=K[t]=E(C[z]);return F(e,{type:T,tag:t,description:r}),o||(e.description=r),e},rt=H&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof C},et=function defineProperty(t,r,e){return t===J&&et(Y,r,e),m(t),r=S(r,!0),m(e),a(K,r)?(e.enumerable?(a(t,j)&&t[j][r]&&(t[j][r]=!1),e=E(e,{enumerable:A(0,!1)})):(a(t,j)||U(t,j,A(1,{})),t[j][r]=!0),Z(t,r,e)):U(t,r,e)},nt=function defineProperties(t,r){m(t);for(var e,n=y(r=w(r)),o=0,i=n.length;odocument.F=Object"),t.close(),l=t.F;e--;)delete l[f][i[e]];return l()};t.exports=Object.create||function create(t,r){var e;return null!==t?(s[f]=n(t),e=new s,s[f]=null,e[c]=t):e=l(),r===Ut?e:o(e,r)},e(30)[c]=!0},function(t,r,e){var n=e(4),a=e(20),u=e(21),c=e(49);t.exports=n?Object.defineProperties:function defineProperties(t,r){u(t);for(var e,n=c(r),o=n.length,i=0;i>1,s=23===r?P(2,-24)-P(2,-77):0,l=t<0||0===t&&1/t<0?1:0,h=0;for((t=_(t))!=t||t===1/0?(o=t!=t?1:0,n=c):(n=j(k(t)/T),t*(i=P(2,-n))<1&&(n--,i*=2),2<=(t+=1<=n+f?s/i:s*P(2,1-f))*i&&(n++,i/=2),c<=n+f?(o=0,n=c):1<=n+f?(o=(t*i-1)*P(2,r),n+=f):(o=t*P(2,f-1)*P(2,r),n=0));8<=r;a[h++]=255&o,o/=256,r-=8);for(n=n<>1,u=o-7,c=n-1,f=t[c--],s=127&f;for(f>>=7;0>=-u,u+=r;0>8&255]},C=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},B=function(t){return F(t,23,4)},q=function(t){return F(t,52,8)},z=function(t,r){g(t[S],r,{get:function(){return b(this)[r]}})},W=function(t,r,e,n){var o=h(+e),i=b(t);if(i.byteLength>24)},setUint8:function setUint8(t,r){X.call(this,t,r<<24>>24)}},{unsafe:!0})}else O=function ArrayBuffer(t){f(this,O,x);var r=h(t);m(this,{bytes:v.call(new Array(r),0),byteLength:r}),i||(this.byteLength=r)},I=function DataView(t,r,e){f(this,I,w),f(t,O,w);var n=b(t).byteLength,o=s(r);if(o<0||n>24},getUint8:function getUint8(t){return W(this,1,t)[0]},getInt16:function getInt16(t){var r=W(this,2,t,arguments[1]);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(t){var r=W(this,2,t,arguments[1]);return r[1]<<8|r[0]},getInt32:function getInt32(t){return N(W(this,4,t,arguments[1]))},getUint32:function getUint32(t){return N(W(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return L(W(this,4,t,arguments[1]),23)},getFloat64:function getFloat64(t){return L(W(this,8,t,arguments[1]),52)},setInt8:function setInt8(t,r){V(this,1,t,U,r)},setUint8:function setUint8(t,r){V(this,1,t,U,r)},setInt16:function setInt16(t,r){V(this,2,t,D,r,arguments[2])},setUint16:function setUint16(t,r){V(this,2,t,D,r,arguments[2])},setInt32:function setInt32(t,r){V(this,4,t,C,r,arguments[2])},setUint32:function setUint32(t,r){V(this,4,t,C,r,arguments[2])},setFloat32:function setFloat32(t,r){V(this,4,t,B,r,arguments[2])},setFloat64:function setFloat64(t,r){V(this,8,t,q,r,arguments[2])}});d(O,x),d(I,w),r[x]=O,r[w]=I},function(t,r,e){var n,a=e(4),u=e(2),o=e(16),c=e(3),i=e(98),f=e(19),s=e(22),l=e(20).f,h=e(106),p=e(108),g=e(43)("toStringTag"),v=e(29)("TYPED_ARRAY_TAG"),d=u.DataView,y=d&&d.prototype,b=u.Int8Array,m=b&&b.prototype,x=u.Uint8ClampedArray,w=x&&x.prototype,S=b&&h(b),A=m&&h(m),E=Object.prototype,O=E.isPrototypeOf,I=!(!u.ArrayBuffer||!u.DataView),M=I&&!!p,R=!1,_={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},P=function P(t){var r=i(t);return"DataView"===r||c(_,r)},j=function(t){return o(t)&&c(_,i(t))};for(n in _)u[n]||(M=!1);if((!M||"function"!=typeof S||S===Function.prototype)&&(S=function S(){throw TypeError("Incorrect invocation")},M))for(n in _)u[n]&&p(u[n],S);if((!M||!A||A===E)&&(A=S.prototype,M))for(n in _)u[n]&&p(u[n].prototype,A);if(M&&h(w)!==A&&p(w,A),a&&!c(A,g))for(n in R=!0,l(A,g,{get:function(){return o(this)?this[v]:Ut}}),_)u[n]&&f(u[n],v,n);I&&p&&h(y)!==E&&p(y,E),t.exports={NATIVE_ARRAY_BUFFER:I,NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:R&&v,aTypedArray:function(t){if(j(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(p){if(O.call(S,t))return t}else for(var r in _)if(c(_,n)){var e=u[r];if(e&&(t===e||O.call(e,t)))return t}throw TypeError("Target is not a typed array constructor")},exportProto:function(t,r,e){if(a){if(e)for(var n in _){var o=u[n];o&&c(o.prototype,t)&&delete o.prototype[t]}A[t]&&!e||s(A,t,e?r:M&&m[t]||r)}},exportStatic:function(t,r,e){var n,o;if(a){if(p){if(e)for(n in _)(o=u[n])&&c(o,t)&&delete o[t];if(S[t]&&!e)return;try{return s(S,t,e?r:M&&b[t]||r)}catch(i){}}for(n in _)!(o=u[n])||o[t]&&!e||s(o,t,r)}},isView:P,isTypedArray:j,TypedArray:S,TypedArrayPrototype:A}},function(t,r,e){var o=e(22);t.exports=function(t,r,e){for(var n in r)o(t,n,r[n],e);return t}},function(t,r){t.exports=function(t,r,e){if(!(t instanceof r))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t}},function(t,r,e){var n=e(37),o=e(36);t.exports=function(t){if(t===Ut)return 0;var r=n(t),e=o(r);if(r!==e)throw RangeError("Wrong length or index");return e}},function(t,r,e){var n=e(130),o=n.NATIVE_ARRAY_BUFFER_VIEWS;e(7)({target:"ArrayBuffer",stat:!0,forced:!o},{isView:n.isView})},function(t,r,e){var n=e(129),f=e(21),s=e(38),l=e(36),h=e(136),p=n.ArrayBuffer,g=n.DataView,v=p.prototype.slice,o=e(5)(function(){return!new p(2).slice(1,Ut).byteLength});e(7)({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o},{slice:function slice(t,r){if(v!==Ut&&r===Ut)return v.call(f(this),t);for(var e=f(this).byteLength,n=s(t,e),o=s(r===Ut?e:r,e),i=new(h(this,p))(l(o-n)),a=new g(this),u=new g(i),c=0;n>>=0)?31-n(o(t+.5)*i):32}})},function(t,r,e){var n=e(165),o=Math.cosh,i=Math.abs,a=Math.E;e(7)({target:"Math",stat:!0,forced:!o||o(710)===Infinity},{cosh:function cosh(t){var r=n(i(t)-1)+1;return(r+1/(r*a*a))*(a/2)}})},function(t,r){var e=Math.expm1;t.exports=!e||22025.465794806718>>16)*a+i*(e&o>>>16)<<16>>>0)}})},function(t,r,e){var n=Math.log,o=Math.LOG10E;e(7)({target:"Math",stat:!0},{log10:function log10(t){return n(t)*o}})},function(t,r,e){e(7)({target:"Math",stat:!0},{log1p:e(158)})},function(t,r,e){var n=Math.log,o=Math.LN2;e(7)({target:"Math",stat:!0},{log2:function log2(t){return n(t)/o}})},function(t,r,e){e(7)({target:"Math",stat:!0},{sign:e(162)})},function(t,r,e){var n=e(165),o=Math.abs,i=Math.exp,a=Math.E,u=e(5)(function(){return-2e-17!=Math.sinh(-2e-17)});e(7)({target:"Math",stat:!0,forced:u},{sinh:function sinh(t){return o(t=+t)<1?(n(t)-n(-t))/2:(i(t-1)-i(-t-1))*(a/2)}})},function(t,r,e){var n=e(165),o=Math.exp;e(7)({target:"Math",stat:!0},{tanh:function tanh(t){var r=n(t=+t),e=n(-t);return r==Infinity?1:e==Infinity?-1:(r-e)/(o(t)+o(-t))}})},function(t,r,e){e(42)(Math,"Math",!0)},function(t,r,e){var n=Math.ceil,o=Math.floor;e(7)({target:"Math",stat:!0},{trunc:function trunc(t){return(0>>0||(a.test(e)?16:10))}:n},function(t,r,e){var f=e(37),s=e(196),l=e(197),n=1..toFixed,o=Math.floor,i=[0,0,0,0,0,0],h=function(t,r){for(var e=-1,n=r;++e<6;)i[e]=(n+=t*i[e])%1e7,n=o(n/1e7)},p=function(t){for(var r=6,e=0;0<=--r;)i[r]=o((e+=i[r])/t),e=e%t*1e7},g=function(){for(var t=6,r="";0<=--t;)if(""!==r||0===t||0!==i[t]){var e=String(i[t]);r=""===r?e:r+l.call("0",7-e.length)+e}return r},v=function(t,r,e){return 0===r?e:r%2==1?v(t,r-1,e*t):v(t*t,r/2,e)};e(7)({target:"Number",proto:!0,forced:n&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(5)(function(){n.call({})})},{toFixed:function toFixed(t){var r,e,n,o,i=s(this),a=f(t),u="",c="0";if(a<0||20>>=1)&&(r+=r))1&n&&(e+=r);return e}},function(t,r,e){var n=e(5),o=e(196),i=1..toPrecision;e(7)({target:"Number",proto:!0,forced:n(function(){return"1"!==i.call(1,Ut)})||!n(function(){i.call({})})},{toPrecision:function toPrecision(t){return t===Ut?i.call(o(this)):i.call(o(this),t)}})},function(t,r,e){var n=e(200);e(7)({target:"Object",stat:!0,forced:Object.assign!==n},{assign:n})},function(t,r,e){var h=e(49),p=e(40),g=e(9),v=e(69),d=e(12),o=Object.assign;t.exports=!o||e(5)(function(){var t={},r={},e=Symbol(),n="abcdefghijklmnopqrst";return t[e]=7,n.split("").forEach(function(t){r[t]=t}),7!=o({},t)[e]||h(o({},r)).join("")!=n})?function assign(t,r){for(var e=v(t),n=arguments.length,o=1,i=p.f,a=g.f;o>10),r%1024+56320))}return e.join("")}})},function(t,r,e){var n=e(264),o="includes",i=e(265)(o);e(7)({target:"String",proto:!0,forced:!i},{includes:function includes(t){return!!~n(this,t,o).indexOf(t,1")}),y=!h(function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var e="ab".split(t);return 2!==e.length||"a"!==e[0]||"b"!==e[1]});t.exports=function(e,t,r,n){var o=p(e),i=!h(function(){var t={};return t[o]=function(){return 7},7!=""[e](t)}),a=i&&!h(function(){var t=!1,r=/a/;return r.exec=function(){return t=!0,null},"split"===e&&(r.constructor={},r.constructor[v]=function(){return r}),r[o](""),!t});if(!i||!a||"replace"===e&&!d||"split"===e&&!y){var u=/./[o],c=r(o,""[e],function(t,r,e,n,o){return r.exec===g?i&&!o?{done:!0,value:u.call(r,e,n)}:{done:!0,value:t.call(e,r,n)}:{done:!1}}),f=c[1];l(String.prototype,e,c[0]),l(RegExp.prototype,o,2==t?function(t,r){return f.call(t,this,r)}:function(t){return f.call(t,this)}),n&&s(RegExp.prototype[o],"sham",!0)}}},function(t,r,e){var n=e(274),o=e(275);e(7)({target:"String",proto:!0,forced:o},{padEnd:function padEnd(t){return n(this,t,1]*>)/g,g=/\$([$&`']|\d\d?)/g;e(272)("replace",2,function(o,w,S){return[function replace(t,r){var e=i(this),n=t==Ut?Ut:t[o];return n!==Ut?n.call(t,e,r):w.call(String(e),t,r)},function(t,r){var e=S(w,t,this,r);if(e.done)return e.value;var n=A(t),o=String(this),i="function"==typeof r;i||(r=String(r));var a=n.global;if(a){var u=n.unicode;n.lastIndex=0}for(var c=[];;){var f=M(n,o);if(null===f)break;if(c.push(f),!a)break;""===String(f[0])&&(n.lastIndex=I(o,E(n.lastIndex),u))}for(var s,l="",h=0,p=0;p>>0;if(0==n)return[];if(t===Ut)return[e];if(!s(t))return v.call(e,t,n);for(var o,i,a,u=[],c=0,f=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(o=h.call(f,e))&&!(c<(i=f.lastIndex)&&(u.push(e.slice(c,o.index)),1>>0;if(0==c)return[];if(0===o.length)return null===S(u,o)?[o]:[];for(var f=0,s=0,l=[];s"+o+""}},function(t,r,e){var n=e(5);t.exports=function(r){return n(function(){var t=""[r]('"');return t!==t.toLowerCase()||3>>0,i=e>>>0;return(r>>>0)+(n>>>0)+((o&i|(o|i)&~(o+i>>>0))>>>31)|0}})},function(t,r,e){e(7)({target:"Math",stat:!0},{imulh:function imulh(t,r){var e=+t,n=+r,o=65535&e,i=65535&n,a=e>>16,u=n>>16,c=(a*i>>>0)+(o*i>>>16);return a*u+(c>>16)+((o*u>>>0)+(65535&c)>>16)}})},function(t,r,e){e(7)({target:"Math",stat:!0},{isubh:function isubh(t,r,e,n){var o=t>>>0,i=e>>>0;return(r>>>0)-(n>>>0)-((~o&i|~(o^i)&o-i>>>0)>>>31)|0}})},function(t,r,e){e(7)({target:"Math",stat:!0},{RAD_PER_DEG:180/Math.PI})},function(t,r,e){var n=Math.PI/180;e(7)({target:"Math",stat:!0},{radians:function radians(t){return t*n}})},function(t,r,e){e(7)({target:"Math",stat:!0},{scale:e(377)})},function(t,r,e){var n=e(21),o=e(184),i=e(104),a="Seeded Random",u=a+" Generator",c=e(26),f=c.set,s=c.getterFor(u),l=i(function SeededRandomGenerator(t){f(this,{type:u,seed:t%2147483647})},a,function next(){var t=s(this);return{value:(1073741823&(t.seed=(1103515245*t.seed+12345)%2147483647))/1073741823,done:!1}});e(7)({target:"Math",stat:!0,forced:!0},{seededPRNG:function seededPRNG(t){var r=n(t).seed;if(!o(r))throw TypeError('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new l(r)}})},function(t,r,e){e(7)({target:"Math",stat:!0},{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0>>16,u=n>>>16,c=(a*i>>>0)+(o*i>>>16);return a*u+(c>>>16)+((o*u>>>0)+(65535&c)>>>16)}})},function(t,r,e){var i=e(37),a=e(194),u="Invalid number representation",c=/^[0-9a-z]+$/;e(7)({target:"Number",stat:!0},{fromString:function fromString(t,r){var e,n,o=1;if("string"!=typeof t)throw TypeError(u);if(!t.length)throw SyntaxError(u);if("-"==t.charAt(0)&&(o=-1,!(t=t.slice(1)).length))throw SyntaxError(u);if((e=r===Ut?10:i(r))<2||36=b(256,5-r))return null}else if(255":1,"`":1}),z=u({},q,{"#":1,"?":1,"{":1,"}":1}),W=u({},z,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),V=function(t,r){var e=c(t,0);return 32>1,t+=m(t/r);455m((y-a)/l))throw RangeError(b);for(a+=(s-i)*l,i=s,r=0;ry)throw RangeError(b);if(e==i){for(var h=a,p=36;;p+=36){var g=p<=u?1:u+26<=p?26:p-u;if(h0?o(n(t),9007199254740991):0}},function(t,r,e){var n=e(2);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,r,e){var n=e(10);t.exports=function(t){return Object(n(t))}},function(t,r,e){var n=e(5),o=e(83),i=e(7),u=e(30),a=Object.defineProperty;r.f=n?a:function(t,r,e){if(i(t),r=u(r,!0),i(e),o)try{return a(t,r,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},function(t,r){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,r){var e={}.hasOwnProperty;t.exports=function(t,r){return e.call(t,r)}},function(t,r,e){var n=e(10),o=/"/g;t.exports=function(t,r,e,i){var u=String(n(t)),a="<"+r;return""!==e&&(a+=" "+e+'="'+String(i).replace(o,""")+'"'),a+">"+u+""}},function(t,r,e){var n=e(1);t.exports=function(t){return n(function(){var r=""[t]('"');return r!==r.toLowerCase()||r.split('"').length>3})}},function(t,r,e){var n=e(36),o=e(10);t.exports=function(t){return n(o(t))}},function(t,r,e){var n=e(3),o=e(47),i=e(19),u=e(11),a=e(65),c=e(84),s=e(18),f=s.get,l=s.enforce,h=String(c).split("toString");o("inspectSource",function(t){return c.call(t)}),(t.exports=function(t,r,e,o){var c=!!o&&!!o.unsafe,s=!!o&&!!o.enumerable,f=!!o&&!!o.noTargetGet;"function"==typeof e&&("string"!=typeof r||u(e,"name")||i(e,"name",r),l(e).source=h.join("string"==typeof r?r:"")),t!==n?(c?!f&&t[r]&&(s=!0):delete t[r],s?t[r]=e:i(t,r,e)):s?t[r]=e:a(r,e)})(Function.prototype,"toString",function(){return"function"==typeof this&&f(this).source||c.call(this)})},function(t,r){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,r){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,r,e){var n,o,i,u=e(85),a=e(3),c=e(2),s=e(19),f=e(11),l=e(66),h=e(48),p=a.WeakMap;if(u){var v=new p,g=v.get,d=v.has,y=v.set;n=function(t,r){return y.call(v,t,r),r},o=function(t){return g.call(v,t)||{}},i=function(t){return d.call(v,t)}}else{var x=l("state");h[x]=!0,n=function(t,r){return s(t,x,r),r},o=function(t){return f(t,x)?t[x]:{}},i=function(t){return f(t,x)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(r){var e;if(!c(r)||(e=o(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}}},function(t,r,e){var n=e(5),o=e(9),i=e(46);t.exports=n?function(t,r,e){return o.f(t,r,i(1,e))}:function(t,r,e){return t[r]=e,t}},function(t,r){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},function(t,r,e){"use strict";var n=e(1);t.exports=function(t,r){var e=[][t];return!e||!n(function(){e.call(null,r||function(){throw 1},1)})}},function(t,r,e){var n=e(5),o=e(63),i=e(46),u=e(14),a=e(30),c=e(11),s=e(83),f=Object.getOwnPropertyDescriptor;r.f=n?f:function(t,r){if(t=u(t),r=a(r,!0),s)try{return f(t,r)}catch(t){}if(c(t,r))return i(!o.f.call(t,r),t[r])}},function(t,r,e){var n=e(4),o=e(41),i=e(19),u=n("unscopables"),a=Array.prototype;null==a[u]&&i(a,u,o(null)),t.exports=function(t){a[u][t]=!0}},function(t,r,e){var n=e(27),o=e(36),i=e(8),u=e(6),a=e(39),c=[].push,s=function(t){var r=1==t,e=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l;return function(p,v,g,d){for(var y,x,m=i(p),b=o(m),S=n(v,g,3),w=u(b.length),O=0,E=d||a,j=r?E(p,w):e?E(p,0):void 0;w>O;O++)if((h||O in b)&&(x=S(y=b[O],O,m),t))if(r)j[O]=x;else if(x)switch(t){case 3:return!0;case 5:return y;case 6:return O;case 2:c.call(j,y)}else if(f)return!1;return l?-1:s||f?f:j}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(t,r){t.exports=!1},function(t,r,e){"use strict";var n=e(30),o=e(9),i=e(46);t.exports=function(t,r,e){var u=n(r);u in t?o.f(t,u,i(0,e)):t[u]=e}},function(t,r,e){var n=e(16);t.exports=function(t,r,e){if(n(t),void 0===r)return t;switch(e){case 0:return function(){return t.call(r)};case 1:return function(e){return t.call(r,e)};case 2:return function(e,n){return t.call(r,e,n)};case 3:return function(e,n,o){return t.call(r,e,n,o)}}return function(){return t.apply(r,arguments)}}},function(t,r,e){var n=e(9).f,o=e(11),i=e(4)("toStringTag");t.exports=function(t,r,e){t&&!o(t=e?t:t.prototype,i)&&n(t,i,{configurable:!0,value:r})}},function(t,r,e){var n=e(48),o=e(2),i=e(11),u=e(9).f,a=e(67),c=e(54),s=a("meta"),f=0,l=Object.isExtensible||function(){return!0},h=function(t){u(t,s,{value:{objectID:"O"+ ++f,weakData:{}}})},p=t.exports={REQUIRED:!1,fastKey:function(t,r){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,s)){if(!l(t))return"F";if(!r)return"E";h(t)}return t[s].objectID},getWeakData:function(t,r){if(!i(t,s)){if(!l(t))return!0;if(!r)return!1;h(t)}return t[s].weakData},onFreeze:function(t){return c&&p.REQUIRED&&l(t)&&!i(t,s)&&h(t),t}};n[s]=!0},function(t,r,e){var n=e(2);t.exports=function(t,r){if(!n(t))return t;var e,o;if(r&&"function"==typeof(e=t.toString)&&!n(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!n(o=e.call(t)))return o;if(!r&&"function"==typeof(e=t.toString)&&!n(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,r,e){var n=e(20),o=Math.max,i=Math.min;t.exports=function(t,r){var e=n(t);return e<0?o(e+r,0):i(e,r)}},function(t,r,e){var n=e(17);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,r,e){var n=e(11),o=e(8),i=e(66),u=e(97),a=i("IE_PROTO"),c=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,r){t.exports=function(t,r,e){if(!(t instanceof r))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t}},function(t,r,e){var n=e(10),o="["+e(55)+"]",i=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),a=function(t){return function(r){var e=String(n(r));return 1&t&&(e=e.replace(i,"")),2&t&&(e=e.replace(u,"")),e}};t.exports={start:a(1),end:a(2),trim:a(3)}},function(t,r,e){var n=e(1),o=e(17),i="".split;t.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,r,e){var n=e(87),o=e(3),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,r){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][r]||o[t]&&o[t][r]}},function(t,r,e){var n=e(1),o=/#|\.prototype\./,i=function(t,r){var e=a[u(t)];return e==s||e!=c&&("function"==typeof r?n(r):!!r)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=i.data={},c=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},function(t,r,e){var n=e(2),o=e(32),i=e(4)("species");t.exports=function(t,r){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)?n(e)&&null===(e=e[i])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===r?0:r)}},function(t,r,e){var n=e(1),o=e(4)("species");t.exports=function(t){return!n(function(){var r=[];return(r.constructor={})[o]=function(){return{foo:1}},1!==r[t](Boolean).foo})}},function(t,r,e){var n=e(7),o=e(70),i=e(69),u=e(48),a=e(90),c=e(64),s=e(66)("IE_PROTO"),f=function(){},l=function(){var t,r=c("iframe"),e=i.length;for(r.style.display="none",a.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write("