vitest 0.9.3 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/LICENSE.md +7 -0
  2. package/dist/{chunk-api-setup.d764f144.js → chunk-api-setup.b55307fb.js} +41 -18
  3. package/dist/{chunk-constants.a6ce1057.js → chunk-constants.90075174.js} +1 -1
  4. package/dist/{chunk-defaults.aecec9d4.js → chunk-defaults.fd5b939d.js} +1 -1
  5. package/dist/{chunk-install-pkg.7dd40977.js → chunk-install-pkg.73b84ae1.js} +113 -115
  6. package/dist/chunk-integrations-globals.a759742a.js +29 -0
  7. package/dist/chunk-integrations-spy.f036df6f.js +102 -0
  8. package/dist/{chunk-runtime-chain.e17b859e.js → chunk-runtime-chain.6292a3de.js} +944 -901
  9. package/dist/{chunk-runtime-mocker.d325f149.js → chunk-runtime-mocker.ca5ecf98.js} +5 -21
  10. package/dist/{chunk-runtime-rpc.9e81f15b.js → chunk-runtime-rpc.8e14ae4f.js} +1 -1
  11. package/dist/{chunk-utils-global.46331799.js → chunk-utils-global.9b434e81.js} +42 -10
  12. package/dist/{chunk-utils-timers.6cfeb494.js → chunk-utils-timers.c50fec92.js} +1406 -1057
  13. package/dist/{chunk-vite-node-externalize.9aaddc2d.js → chunk-vite-node-externalize.4dd7260b.js} +1852 -4425
  14. package/dist/{chunk-vite-node-utils.3400d522.js → chunk-vite-node-utils.c160b239.js} +73 -71
  15. package/dist/cli.js +12 -12
  16. package/dist/entry.js +15 -919
  17. package/dist/index.d.ts +107 -31
  18. package/dist/index.js +8 -8
  19. package/dist/node.d.ts +34 -12
  20. package/dist/node.js +11 -11
  21. package/dist/spy.js +2 -102
  22. package/dist/vendor-_commonjsHelpers.addc3445.js +3 -0
  23. package/dist/vendor-entry.9dd6e6e6.js +986 -0
  24. package/dist/vendor-index.405e58ef.js +6291 -0
  25. package/dist/{vendor-index.87b2fc14.js → vendor-index.40be925a.js} +167 -152
  26. package/dist/worker.js +9 -6
  27. package/package.json +15 -16
  28. package/vitest.mjs +1 -1
  29. package/dist/chunk-integrations-globals.5686bfb8.js +0 -23
  30. package/dist/vendor-_commonjsHelpers.34b404ce.js +0 -7
  31. package/dist/vendor-index.13468339.js +0 -5707
@@ -1,4 +1,4 @@
1
- import { s as slash, f as notNullish, e as c$1 } from './chunk-utils-global.46331799.js';
1
+ import { s as slash, e as notNullish, p as picocolors } from './chunk-utils-global.9b434e81.js';
2
2
 
3
3
  const setTimeout$1 = globalThis.setTimeout;
4
4
  const setInterval = globalThis.setInterval;
@@ -11,169 +11,169 @@ var ansiStyles$1 = {exports: {}};
11
11
 
12
12
  (function (module) {
13
13
 
14
- const ANSI_BACKGROUND_OFFSET = 10;
14
+ const ANSI_BACKGROUND_OFFSET = 10;
15
+
16
+ const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
17
+
18
+ const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
19
+
20
+ function assembleStyles() {
21
+ const codes = new Map();
22
+ const styles = {
23
+ modifier: {
24
+ reset: [0, 0],
25
+ // 21 isn't widely supported and 22 does the same thing
26
+ bold: [1, 22],
27
+ dim: [2, 22],
28
+ italic: [3, 23],
29
+ underline: [4, 24],
30
+ overline: [53, 55],
31
+ inverse: [7, 27],
32
+ hidden: [8, 28],
33
+ strikethrough: [9, 29]
34
+ },
35
+ color: {
36
+ black: [30, 39],
37
+ red: [31, 39],
38
+ green: [32, 39],
39
+ yellow: [33, 39],
40
+ blue: [34, 39],
41
+ magenta: [35, 39],
42
+ cyan: [36, 39],
43
+ white: [37, 39],
44
+
45
+ // Bright color
46
+ blackBright: [90, 39],
47
+ redBright: [91, 39],
48
+ greenBright: [92, 39],
49
+ yellowBright: [93, 39],
50
+ blueBright: [94, 39],
51
+ magentaBright: [95, 39],
52
+ cyanBright: [96, 39],
53
+ whiteBright: [97, 39]
54
+ },
55
+ bgColor: {
56
+ bgBlack: [40, 49],
57
+ bgRed: [41, 49],
58
+ bgGreen: [42, 49],
59
+ bgYellow: [43, 49],
60
+ bgBlue: [44, 49],
61
+ bgMagenta: [45, 49],
62
+ bgCyan: [46, 49],
63
+ bgWhite: [47, 49],
64
+
65
+ // Bright color
66
+ bgBlackBright: [100, 49],
67
+ bgRedBright: [101, 49],
68
+ bgGreenBright: [102, 49],
69
+ bgYellowBright: [103, 49],
70
+ bgBlueBright: [104, 49],
71
+ bgMagentaBright: [105, 49],
72
+ bgCyanBright: [106, 49],
73
+ bgWhiteBright: [107, 49]
74
+ }
75
+ };
15
76
 
16
- const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
77
+ // Alias bright black as gray (and grey)
78
+ styles.color.gray = styles.color.blackBright;
79
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
80
+ styles.color.grey = styles.color.blackBright;
81
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
17
82
 
18
- const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
83
+ for (const [groupName, group] of Object.entries(styles)) {
84
+ for (const [styleName, style] of Object.entries(group)) {
85
+ styles[styleName] = {
86
+ open: `\u001B[${style[0]}m`,
87
+ close: `\u001B[${style[1]}m`
88
+ };
19
89
 
20
- function assembleStyles() {
21
- const codes = new Map();
22
- const styles = {
23
- modifier: {
24
- reset: [0, 0],
25
- // 21 isn't widely supported and 22 does the same thing
26
- bold: [1, 22],
27
- dim: [2, 22],
28
- italic: [3, 23],
29
- underline: [4, 24],
30
- overline: [53, 55],
31
- inverse: [7, 27],
32
- hidden: [8, 28],
33
- strikethrough: [9, 29]
34
- },
35
- color: {
36
- black: [30, 39],
37
- red: [31, 39],
38
- green: [32, 39],
39
- yellow: [33, 39],
40
- blue: [34, 39],
41
- magenta: [35, 39],
42
- cyan: [36, 39],
43
- white: [37, 39],
90
+ group[styleName] = styles[styleName];
44
91
 
45
- // Bright color
46
- blackBright: [90, 39],
47
- redBright: [91, 39],
48
- greenBright: [92, 39],
49
- yellowBright: [93, 39],
50
- blueBright: [94, 39],
51
- magentaBright: [95, 39],
52
- cyanBright: [96, 39],
53
- whiteBright: [97, 39]
54
- },
55
- bgColor: {
56
- bgBlack: [40, 49],
57
- bgRed: [41, 49],
58
- bgGreen: [42, 49],
59
- bgYellow: [43, 49],
60
- bgBlue: [44, 49],
61
- bgMagenta: [45, 49],
62
- bgCyan: [46, 49],
63
- bgWhite: [47, 49],
64
-
65
- // Bright color
66
- bgBlackBright: [100, 49],
67
- bgRedBright: [101, 49],
68
- bgGreenBright: [102, 49],
69
- bgYellowBright: [103, 49],
70
- bgBlueBright: [104, 49],
71
- bgMagentaBright: [105, 49],
72
- bgCyanBright: [106, 49],
73
- bgWhiteBright: [107, 49]
74
- }
75
- };
76
-
77
- // Alias bright black as gray (and grey)
78
- styles.color.gray = styles.color.blackBright;
79
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
80
- styles.color.grey = styles.color.blackBright;
81
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
82
-
83
- for (const [groupName, group] of Object.entries(styles)) {
84
- for (const [styleName, style] of Object.entries(group)) {
85
- styles[styleName] = {
86
- open: `\u001B[${style[0]}m`,
87
- close: `\u001B[${style[1]}m`
88
- };
89
-
90
- group[styleName] = styles[styleName];
92
+ codes.set(style[0], style[1]);
93
+ }
91
94
 
92
- codes.set(style[0], style[1]);
95
+ Object.defineProperty(styles, groupName, {
96
+ value: group,
97
+ enumerable: false
98
+ });
93
99
  }
94
100
 
95
- Object.defineProperty(styles, groupName, {
96
- value: group,
101
+ Object.defineProperty(styles, 'codes', {
102
+ value: codes,
97
103
  enumerable: false
98
104
  });
99
- }
100
-
101
- Object.defineProperty(styles, 'codes', {
102
- value: codes,
103
- enumerable: false
104
- });
105
-
106
- styles.color.close = '\u001B[39m';
107
- styles.bgColor.close = '\u001B[49m';
108
-
109
- styles.color.ansi256 = wrapAnsi256();
110
- styles.color.ansi16m = wrapAnsi16m();
111
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
112
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
113
105
 
114
- // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
115
- Object.defineProperties(styles, {
116
- rgbToAnsi256: {
117
- value: (red, green, blue) => {
118
- // We use the extended greyscale palette here, with the exception of
119
- // black and white. normal palette only has 4 greyscale shades.
120
- if (red === green && green === blue) {
121
- if (red < 8) {
122
- return 16;
123
- }
124
-
125
- if (red > 248) {
126
- return 231;
106
+ styles.color.close = '\u001B[39m';
107
+ styles.bgColor.close = '\u001B[49m';
108
+
109
+ styles.color.ansi256 = wrapAnsi256();
110
+ styles.color.ansi16m = wrapAnsi16m();
111
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
112
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
113
+
114
+ // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
115
+ Object.defineProperties(styles, {
116
+ rgbToAnsi256: {
117
+ value: (red, green, blue) => {
118
+ // We use the extended greyscale palette here, with the exception of
119
+ // black and white. normal palette only has 4 greyscale shades.
120
+ if (red === green && green === blue) {
121
+ if (red < 8) {
122
+ return 16;
123
+ }
124
+
125
+ if (red > 248) {
126
+ return 231;
127
+ }
128
+
129
+ return Math.round(((red - 8) / 247) * 24) + 232;
127
130
  }
128
131
 
129
- return Math.round(((red - 8) / 247) * 24) + 232;
130
- }
131
-
132
- return 16 +
133
- (36 * Math.round(red / 255 * 5)) +
134
- (6 * Math.round(green / 255 * 5)) +
135
- Math.round(blue / 255 * 5);
132
+ return 16 +
133
+ (36 * Math.round(red / 255 * 5)) +
134
+ (6 * Math.round(green / 255 * 5)) +
135
+ Math.round(blue / 255 * 5);
136
+ },
137
+ enumerable: false
136
138
  },
137
- enumerable: false
138
- },
139
- hexToRgb: {
140
- value: hex => {
141
- const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
142
- if (!matches) {
143
- return [0, 0, 0];
144
- }
139
+ hexToRgb: {
140
+ value: hex => {
141
+ const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
142
+ if (!matches) {
143
+ return [0, 0, 0];
144
+ }
145
145
 
146
- let {colorString} = matches.groups;
146
+ let {colorString} = matches.groups;
147
147
 
148
- if (colorString.length === 3) {
149
- colorString = colorString.split('').map(character => character + character).join('');
150
- }
148
+ if (colorString.length === 3) {
149
+ colorString = colorString.split('').map(character => character + character).join('');
150
+ }
151
151
 
152
- const integer = Number.parseInt(colorString, 16);
152
+ const integer = Number.parseInt(colorString, 16);
153
153
 
154
- return [
155
- (integer >> 16) & 0xFF,
156
- (integer >> 8) & 0xFF,
157
- integer & 0xFF
158
- ];
154
+ return [
155
+ (integer >> 16) & 0xFF,
156
+ (integer >> 8) & 0xFF,
157
+ integer & 0xFF
158
+ ];
159
+ },
160
+ enumerable: false
159
161
  },
160
- enumerable: false
161
- },
162
- hexToAnsi256: {
163
- value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
164
- enumerable: false
165
- }
166
- });
162
+ hexToAnsi256: {
163
+ value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
164
+ enumerable: false
165
+ }
166
+ });
167
167
 
168
- return styles;
169
- }
168
+ return styles;
169
+ }
170
170
 
171
- // Make the export immutable
172
- Object.defineProperty(module, 'exports', {
173
- enumerable: true,
174
- get: assembleStyles
175
- });
176
- }(ansiStyles$1));
171
+ // Make the export immutable
172
+ Object.defineProperty(module, 'exports', {
173
+ enumerable: true,
174
+ get: assembleStyles
175
+ });
176
+ } (ansiStyles$1));
177
177
 
178
178
  var collections = {};
179
179
 
@@ -1230,12 +1230,20 @@ var reactIs_production_min = {};
1230
1230
  * This source code is licensed under the MIT license found in the
1231
1231
  * LICENSE file in the root directory of this source tree.
1232
1232
  */
1233
+
1234
+ var hasRequiredReactIs_production_min;
1235
+
1236
+ function requireReactIs_production_min () {
1237
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
1238
+ hasRequiredReactIs_production_min = 1;
1233
1239
  var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
1234
- if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
1235
- function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
1236
- reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
1237
- reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
1238
- reactIs_production_min.typeOf=y;
1240
+ if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
1241
+ function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
1242
+ reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
1243
+ reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
1244
+ reactIs_production_min.typeOf=y;
1245
+ return reactIs_production_min;
1246
+ }
1239
1247
 
1240
1248
  var reactIs_development = {};
1241
1249
 
@@ -1248,223 +1256,234 @@ var reactIs_development = {};
1248
1256
  * LICENSE file in the root directory of this source tree.
1249
1257
  */
1250
1258
 
1251
- if (process.env.NODE_ENV !== "production") {
1252
- (function() {
1253
-
1254
- // ATTENTION
1255
- // When adding new symbols to this file,
1256
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
1257
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1258
- // nor polyfill, then a plain number is used for performance.
1259
- var REACT_ELEMENT_TYPE = 0xeac7;
1260
- var REACT_PORTAL_TYPE = 0xeaca;
1261
- var REACT_FRAGMENT_TYPE = 0xeacb;
1262
- var REACT_STRICT_MODE_TYPE = 0xeacc;
1263
- var REACT_PROFILER_TYPE = 0xead2;
1264
- var REACT_PROVIDER_TYPE = 0xeacd;
1265
- var REACT_CONTEXT_TYPE = 0xeace;
1266
- var REACT_FORWARD_REF_TYPE = 0xead0;
1267
- var REACT_SUSPENSE_TYPE = 0xead1;
1268
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
1269
- var REACT_MEMO_TYPE = 0xead3;
1270
- var REACT_LAZY_TYPE = 0xead4;
1271
- var REACT_BLOCK_TYPE = 0xead9;
1272
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
1273
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
1274
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
1275
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
1276
-
1277
- if (typeof Symbol === 'function' && Symbol.for) {
1278
- var symbolFor = Symbol.for;
1279
- REACT_ELEMENT_TYPE = symbolFor('react.element');
1280
- REACT_PORTAL_TYPE = symbolFor('react.portal');
1281
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
1282
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
1283
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
1284
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
1285
- REACT_CONTEXT_TYPE = symbolFor('react.context');
1286
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
1287
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
1288
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
1289
- REACT_MEMO_TYPE = symbolFor('react.memo');
1290
- REACT_LAZY_TYPE = symbolFor('react.lazy');
1291
- REACT_BLOCK_TYPE = symbolFor('react.block');
1292
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
1293
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
1294
- symbolFor('react.scope');
1295
- symbolFor('react.opaque.id');
1296
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
1297
- symbolFor('react.offscreen');
1298
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
1299
- }
1300
-
1301
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
1259
+ var hasRequiredReactIs_development;
1260
+
1261
+ function requireReactIs_development () {
1262
+ if (hasRequiredReactIs_development) return reactIs_development;
1263
+ hasRequiredReactIs_development = 1;
1264
+
1265
+ if (process.env.NODE_ENV !== "production") {
1266
+ (function() {
1267
+
1268
+ // ATTENTION
1269
+ // When adding new symbols to this file,
1270
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
1271
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1272
+ // nor polyfill, then a plain number is used for performance.
1273
+ var REACT_ELEMENT_TYPE = 0xeac7;
1274
+ var REACT_PORTAL_TYPE = 0xeaca;
1275
+ var REACT_FRAGMENT_TYPE = 0xeacb;
1276
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
1277
+ var REACT_PROFILER_TYPE = 0xead2;
1278
+ var REACT_PROVIDER_TYPE = 0xeacd;
1279
+ var REACT_CONTEXT_TYPE = 0xeace;
1280
+ var REACT_FORWARD_REF_TYPE = 0xead0;
1281
+ var REACT_SUSPENSE_TYPE = 0xead1;
1282
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
1283
+ var REACT_MEMO_TYPE = 0xead3;
1284
+ var REACT_LAZY_TYPE = 0xead4;
1285
+ var REACT_BLOCK_TYPE = 0xead9;
1286
+ var REACT_SERVER_BLOCK_TYPE = 0xeada;
1287
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
1288
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
1289
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
1290
+
1291
+ if (typeof Symbol === 'function' && Symbol.for) {
1292
+ var symbolFor = Symbol.for;
1293
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
1294
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
1295
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
1296
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
1297
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
1298
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
1299
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
1300
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
1301
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
1302
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
1303
+ REACT_MEMO_TYPE = symbolFor('react.memo');
1304
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
1305
+ REACT_BLOCK_TYPE = symbolFor('react.block');
1306
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
1307
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
1308
+ symbolFor('react.scope');
1309
+ symbolFor('react.opaque.id');
1310
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
1311
+ symbolFor('react.offscreen');
1312
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
1313
+ }
1302
1314
 
1303
- var enableScopeAPI = false; // Experimental Create Event Handle API.
1315
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
1304
1316
 
1305
- function isValidElementType(type) {
1306
- if (typeof type === 'string' || typeof type === 'function') {
1307
- return true;
1308
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1317
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
1309
1318
 
1319
+ function isValidElementType(type) {
1320
+ if (typeof type === 'string' || typeof type === 'function') {
1321
+ return true;
1322
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1310
1323
 
1311
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
1312
- return true;
1313
- }
1314
1324
 
1315
- if (typeof type === 'object' && type !== null) {
1316
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
1317
- return true;
1318
- }
1319
- }
1325
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
1326
+ return true;
1327
+ }
1320
1328
 
1321
- return false;
1322
- }
1329
+ if (typeof type === 'object' && type !== null) {
1330
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
1331
+ return true;
1332
+ }
1333
+ }
1323
1334
 
1324
- function typeOf(object) {
1325
- if (typeof object === 'object' && object !== null) {
1326
- var $$typeof = object.$$typeof;
1327
-
1328
- switch ($$typeof) {
1329
- case REACT_ELEMENT_TYPE:
1330
- var type = object.type;
1331
-
1332
- switch (type) {
1333
- case REACT_FRAGMENT_TYPE:
1334
- case REACT_PROFILER_TYPE:
1335
- case REACT_STRICT_MODE_TYPE:
1336
- case REACT_SUSPENSE_TYPE:
1337
- case REACT_SUSPENSE_LIST_TYPE:
1338
- return type;
1339
-
1340
- default:
1341
- var $$typeofType = type && type.$$typeof;
1342
-
1343
- switch ($$typeofType) {
1344
- case REACT_CONTEXT_TYPE:
1345
- case REACT_FORWARD_REF_TYPE:
1346
- case REACT_LAZY_TYPE:
1347
- case REACT_MEMO_TYPE:
1348
- case REACT_PROVIDER_TYPE:
1349
- return $$typeofType;
1350
-
1351
- default:
1352
- return $$typeof;
1353
- }
1354
-
1355
- }
1356
-
1357
- case REACT_PORTAL_TYPE:
1358
- return $$typeof;
1359
- }
1360
- }
1335
+ return false;
1336
+ }
1361
1337
 
1362
- return undefined;
1363
- }
1364
- var ContextConsumer = REACT_CONTEXT_TYPE;
1365
- var ContextProvider = REACT_PROVIDER_TYPE;
1366
- var Element = REACT_ELEMENT_TYPE;
1367
- var ForwardRef = REACT_FORWARD_REF_TYPE;
1368
- var Fragment = REACT_FRAGMENT_TYPE;
1369
- var Lazy = REACT_LAZY_TYPE;
1370
- var Memo = REACT_MEMO_TYPE;
1371
- var Portal = REACT_PORTAL_TYPE;
1372
- var Profiler = REACT_PROFILER_TYPE;
1373
- var StrictMode = REACT_STRICT_MODE_TYPE;
1374
- var Suspense = REACT_SUSPENSE_TYPE;
1375
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
1376
- var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
1377
-
1378
- function isAsyncMode(object) {
1379
- {
1380
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1381
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1382
-
1383
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
1384
- }
1385
- }
1338
+ function typeOf(object) {
1339
+ if (typeof object === 'object' && object !== null) {
1340
+ var $$typeof = object.$$typeof;
1341
+
1342
+ switch ($$typeof) {
1343
+ case REACT_ELEMENT_TYPE:
1344
+ var type = object.type;
1345
+
1346
+ switch (type) {
1347
+ case REACT_FRAGMENT_TYPE:
1348
+ case REACT_PROFILER_TYPE:
1349
+ case REACT_STRICT_MODE_TYPE:
1350
+ case REACT_SUSPENSE_TYPE:
1351
+ case REACT_SUSPENSE_LIST_TYPE:
1352
+ return type;
1353
+
1354
+ default:
1355
+ var $$typeofType = type && type.$$typeof;
1356
+
1357
+ switch ($$typeofType) {
1358
+ case REACT_CONTEXT_TYPE:
1359
+ case REACT_FORWARD_REF_TYPE:
1360
+ case REACT_LAZY_TYPE:
1361
+ case REACT_MEMO_TYPE:
1362
+ case REACT_PROVIDER_TYPE:
1363
+ return $$typeofType;
1364
+
1365
+ default:
1366
+ return $$typeof;
1367
+ }
1368
+
1369
+ }
1370
+
1371
+ case REACT_PORTAL_TYPE:
1372
+ return $$typeof;
1373
+ }
1374
+ }
1375
+
1376
+ return undefined;
1377
+ }
1378
+ var ContextConsumer = REACT_CONTEXT_TYPE;
1379
+ var ContextProvider = REACT_PROVIDER_TYPE;
1380
+ var Element = REACT_ELEMENT_TYPE;
1381
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
1382
+ var Fragment = REACT_FRAGMENT_TYPE;
1383
+ var Lazy = REACT_LAZY_TYPE;
1384
+ var Memo = REACT_MEMO_TYPE;
1385
+ var Portal = REACT_PORTAL_TYPE;
1386
+ var Profiler = REACT_PROFILER_TYPE;
1387
+ var StrictMode = REACT_STRICT_MODE_TYPE;
1388
+ var Suspense = REACT_SUSPENSE_TYPE;
1389
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
1390
+ var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
1391
+
1392
+ function isAsyncMode(object) {
1393
+ {
1394
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1395
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1396
+
1397
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
1398
+ }
1399
+ }
1400
+
1401
+ return false;
1402
+ }
1403
+ function isConcurrentMode(object) {
1404
+ {
1405
+ if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
1406
+ hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
1386
1407
 
1387
- return false;
1388
- }
1389
- function isConcurrentMode(object) {
1390
- {
1391
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
1392
- hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
1408
+ console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
1409
+ }
1410
+ }
1393
1411
 
1394
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
1395
- }
1396
- }
1412
+ return false;
1413
+ }
1414
+ function isContextConsumer(object) {
1415
+ return typeOf(object) === REACT_CONTEXT_TYPE;
1416
+ }
1417
+ function isContextProvider(object) {
1418
+ return typeOf(object) === REACT_PROVIDER_TYPE;
1419
+ }
1420
+ function isElement(object) {
1421
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1422
+ }
1423
+ function isForwardRef(object) {
1424
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
1425
+ }
1426
+ function isFragment(object) {
1427
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
1428
+ }
1429
+ function isLazy(object) {
1430
+ return typeOf(object) === REACT_LAZY_TYPE;
1431
+ }
1432
+ function isMemo(object) {
1433
+ return typeOf(object) === REACT_MEMO_TYPE;
1434
+ }
1435
+ function isPortal(object) {
1436
+ return typeOf(object) === REACT_PORTAL_TYPE;
1437
+ }
1438
+ function isProfiler(object) {
1439
+ return typeOf(object) === REACT_PROFILER_TYPE;
1440
+ }
1441
+ function isStrictMode(object) {
1442
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
1443
+ }
1444
+ function isSuspense(object) {
1445
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
1446
+ }
1397
1447
 
1398
- return false;
1399
- }
1400
- function isContextConsumer(object) {
1401
- return typeOf(object) === REACT_CONTEXT_TYPE;
1402
- }
1403
- function isContextProvider(object) {
1404
- return typeOf(object) === REACT_PROVIDER_TYPE;
1405
- }
1406
- function isElement(object) {
1407
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1408
- }
1409
- function isForwardRef(object) {
1410
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
1411
- }
1412
- function isFragment(object) {
1413
- return typeOf(object) === REACT_FRAGMENT_TYPE;
1414
- }
1415
- function isLazy(object) {
1416
- return typeOf(object) === REACT_LAZY_TYPE;
1417
- }
1418
- function isMemo(object) {
1419
- return typeOf(object) === REACT_MEMO_TYPE;
1420
- }
1421
- function isPortal(object) {
1422
- return typeOf(object) === REACT_PORTAL_TYPE;
1423
- }
1424
- function isProfiler(object) {
1425
- return typeOf(object) === REACT_PROFILER_TYPE;
1426
- }
1427
- function isStrictMode(object) {
1428
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
1429
- }
1430
- function isSuspense(object) {
1431
- return typeOf(object) === REACT_SUSPENSE_TYPE;
1448
+ reactIs_development.ContextConsumer = ContextConsumer;
1449
+ reactIs_development.ContextProvider = ContextProvider;
1450
+ reactIs_development.Element = Element;
1451
+ reactIs_development.ForwardRef = ForwardRef;
1452
+ reactIs_development.Fragment = Fragment;
1453
+ reactIs_development.Lazy = Lazy;
1454
+ reactIs_development.Memo = Memo;
1455
+ reactIs_development.Portal = Portal;
1456
+ reactIs_development.Profiler = Profiler;
1457
+ reactIs_development.StrictMode = StrictMode;
1458
+ reactIs_development.Suspense = Suspense;
1459
+ reactIs_development.isAsyncMode = isAsyncMode;
1460
+ reactIs_development.isConcurrentMode = isConcurrentMode;
1461
+ reactIs_development.isContextConsumer = isContextConsumer;
1462
+ reactIs_development.isContextProvider = isContextProvider;
1463
+ reactIs_development.isElement = isElement;
1464
+ reactIs_development.isForwardRef = isForwardRef;
1465
+ reactIs_development.isFragment = isFragment;
1466
+ reactIs_development.isLazy = isLazy;
1467
+ reactIs_development.isMemo = isMemo;
1468
+ reactIs_development.isPortal = isPortal;
1469
+ reactIs_development.isProfiler = isProfiler;
1470
+ reactIs_development.isStrictMode = isStrictMode;
1471
+ reactIs_development.isSuspense = isSuspense;
1472
+ reactIs_development.isValidElementType = isValidElementType;
1473
+ reactIs_development.typeOf = typeOf;
1474
+ })();
1475
+ }
1476
+ return reactIs_development;
1432
1477
  }
1433
1478
 
1434
- reactIs_development.ContextConsumer = ContextConsumer;
1435
- reactIs_development.ContextProvider = ContextProvider;
1436
- reactIs_development.Element = Element;
1437
- reactIs_development.ForwardRef = ForwardRef;
1438
- reactIs_development.Fragment = Fragment;
1439
- reactIs_development.Lazy = Lazy;
1440
- reactIs_development.Memo = Memo;
1441
- reactIs_development.Portal = Portal;
1442
- reactIs_development.Profiler = Profiler;
1443
- reactIs_development.StrictMode = StrictMode;
1444
- reactIs_development.Suspense = Suspense;
1445
- reactIs_development.isAsyncMode = isAsyncMode;
1446
- reactIs_development.isConcurrentMode = isConcurrentMode;
1447
- reactIs_development.isContextConsumer = isContextConsumer;
1448
- reactIs_development.isContextProvider = isContextProvider;
1449
- reactIs_development.isElement = isElement;
1450
- reactIs_development.isForwardRef = isForwardRef;
1451
- reactIs_development.isFragment = isFragment;
1452
- reactIs_development.isLazy = isLazy;
1453
- reactIs_development.isMemo = isMemo;
1454
- reactIs_development.isPortal = isPortal;
1455
- reactIs_development.isProfiler = isProfiler;
1456
- reactIs_development.isStrictMode = isStrictMode;
1457
- reactIs_development.isSuspense = isSuspense;
1458
- reactIs_development.isValidElementType = isValidElementType;
1459
- reactIs_development.typeOf = typeOf;
1460
- })();
1461
- }
1479
+ (function (module) {
1462
1480
 
1463
- if (process.env.NODE_ENV === 'production') {
1464
- reactIs.exports = reactIs_production_min;
1465
- } else {
1466
- reactIs.exports = reactIs_development;
1467
- }
1481
+ if (process.env.NODE_ENV === 'production') {
1482
+ module.exports = requireReactIs_production_min();
1483
+ } else {
1484
+ module.exports = requireReactIs_development();
1485
+ }
1486
+ } (reactIs));
1468
1487
 
1469
1488
  Object.defineProperty(ReactElement$1, '__esModule', {
1470
1489
  value: true
@@ -2529,600 +2548,600 @@ var util$5 = {};
2529
2548
  /* -*- Mode: js; js-indent-level: 2; -*- */
2530
2549
 
2531
2550
  (function (exports) {
2532
- /*
2533
- * Copyright 2011 Mozilla Foundation and contributors
2534
- * Licensed under the New BSD license. See LICENSE or:
2535
- * http://opensource.org/licenses/BSD-3-Clause
2536
- */
2537
-
2538
- /**
2539
- * This is a helper function for getting values from parameter/options
2540
- * objects.
2541
- *
2542
- * @param args The object we are extracting values from
2543
- * @param name The name of the property we are getting.
2544
- * @param defaultValue An optional value to return if the property is missing
2545
- * from the object. If this is not specified and the property is missing, an
2546
- * error will be thrown.
2547
- */
2548
- function getArg(aArgs, aName, aDefaultValue) {
2549
- if (aName in aArgs) {
2550
- return aArgs[aName];
2551
- } else if (arguments.length === 3) {
2552
- return aDefaultValue;
2553
- } else {
2554
- throw new Error('"' + aName + '" is a required argument.');
2555
- }
2556
- }
2557
- exports.getArg = getArg;
2558
-
2559
- var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
2560
- var dataUrlRegexp = /^data:.+\,.+$/;
2561
-
2562
- function urlParse(aUrl) {
2563
- var match = aUrl.match(urlRegexp);
2564
- if (!match) {
2565
- return null;
2566
- }
2567
- return {
2568
- scheme: match[1],
2569
- auth: match[2],
2570
- host: match[3],
2571
- port: match[4],
2572
- path: match[5]
2573
- };
2574
- }
2575
- exports.urlParse = urlParse;
2576
-
2577
- function urlGenerate(aParsedUrl) {
2578
- var url = '';
2579
- if (aParsedUrl.scheme) {
2580
- url += aParsedUrl.scheme + ':';
2581
- }
2582
- url += '//';
2583
- if (aParsedUrl.auth) {
2584
- url += aParsedUrl.auth + '@';
2585
- }
2586
- if (aParsedUrl.host) {
2587
- url += aParsedUrl.host;
2588
- }
2589
- if (aParsedUrl.port) {
2590
- url += ":" + aParsedUrl.port;
2591
- }
2592
- if (aParsedUrl.path) {
2593
- url += aParsedUrl.path;
2594
- }
2595
- return url;
2596
- }
2597
- exports.urlGenerate = urlGenerate;
2598
-
2599
- var MAX_CACHED_INPUTS = 32;
2600
-
2601
- /**
2602
- * Takes some function `f(input) -> result` and returns a memoized version of
2603
- * `f`.
2604
- *
2605
- * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The
2606
- * memoization is a dumb-simple, linear least-recently-used cache.
2607
- */
2608
- function lruMemoize(f) {
2609
- var cache = [];
2610
-
2611
- return function(input) {
2612
- for (var i = 0; i < cache.length; i++) {
2613
- if (cache[i].input === input) {
2614
- var temp = cache[0];
2615
- cache[0] = cache[i];
2616
- cache[i] = temp;
2617
- return cache[0].result;
2618
- }
2619
- }
2620
-
2621
- var result = f(input);
2622
-
2623
- cache.unshift({
2624
- input,
2625
- result,
2626
- });
2627
-
2628
- if (cache.length > MAX_CACHED_INPUTS) {
2629
- cache.pop();
2630
- }
2631
-
2632
- return result;
2633
- };
2634
- }
2635
-
2636
- /**
2637
- * Normalizes a path, or the path portion of a URL:
2638
- *
2639
- * - Replaces consecutive slashes with one slash.
2640
- * - Removes unnecessary '.' parts.
2641
- * - Removes unnecessary '<dir>/..' parts.
2642
- *
2643
- * Based on code in the Node.js 'path' core module.
2644
- *
2645
- * @param aPath The path or url to normalize.
2646
- */
2647
- var normalize = lruMemoize(function normalize(aPath) {
2648
- var path = aPath;
2649
- var url = urlParse(aPath);
2650
- if (url) {
2651
- if (!url.path) {
2652
- return aPath;
2653
- }
2654
- path = url.path;
2655
- }
2656
- var isAbsolute = exports.isAbsolute(path);
2657
- // Split the path into parts between `/` characters. This is much faster than
2658
- // using `.split(/\/+/g)`.
2659
- var parts = [];
2660
- var start = 0;
2661
- var i = 0;
2662
- while (true) {
2663
- start = i;
2664
- i = path.indexOf("/", start);
2665
- if (i === -1) {
2666
- parts.push(path.slice(start));
2667
- break;
2668
- } else {
2669
- parts.push(path.slice(start, i));
2670
- while (i < path.length && path[i] === "/") {
2671
- i++;
2672
- }
2673
- }
2674
- }
2675
-
2676
- for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
2677
- part = parts[i];
2678
- if (part === '.') {
2679
- parts.splice(i, 1);
2680
- } else if (part === '..') {
2681
- up++;
2682
- } else if (up > 0) {
2683
- if (part === '') {
2684
- // The first part is blank if the path is absolute. Trying to go
2685
- // above the root is a no-op. Therefore we can remove all '..' parts
2686
- // directly after the root.
2687
- parts.splice(i + 1, up);
2688
- up = 0;
2689
- } else {
2690
- parts.splice(i, 2);
2691
- up--;
2692
- }
2693
- }
2694
- }
2695
- path = parts.join('/');
2696
-
2697
- if (path === '') {
2698
- path = isAbsolute ? '/' : '.';
2699
- }
2700
-
2701
- if (url) {
2702
- url.path = path;
2703
- return urlGenerate(url);
2704
- }
2705
- return path;
2706
- });
2707
- exports.normalize = normalize;
2708
-
2709
- /**
2710
- * Joins two paths/URLs.
2711
- *
2712
- * @param aRoot The root path or URL.
2713
- * @param aPath The path or URL to be joined with the root.
2714
- *
2715
- * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
2716
- * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
2717
- * first.
2718
- * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
2719
- * is updated with the result and aRoot is returned. Otherwise the result
2720
- * is returned.
2721
- * - If aPath is absolute, the result is aPath.
2722
- * - Otherwise the two paths are joined with a slash.
2723
- * - Joining for example 'http://' and 'www.example.com' is also supported.
2724
- */
2725
- function join(aRoot, aPath) {
2726
- if (aRoot === "") {
2727
- aRoot = ".";
2728
- }
2729
- if (aPath === "") {
2730
- aPath = ".";
2731
- }
2732
- var aPathUrl = urlParse(aPath);
2733
- var aRootUrl = urlParse(aRoot);
2734
- if (aRootUrl) {
2735
- aRoot = aRootUrl.path || '/';
2736
- }
2737
-
2738
- // `join(foo, '//www.example.org')`
2739
- if (aPathUrl && !aPathUrl.scheme) {
2740
- if (aRootUrl) {
2741
- aPathUrl.scheme = aRootUrl.scheme;
2742
- }
2743
- return urlGenerate(aPathUrl);
2744
- }
2745
-
2746
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
2747
- return aPath;
2748
- }
2749
-
2750
- // `join('http://', 'www.example.com')`
2751
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
2752
- aRootUrl.host = aPath;
2753
- return urlGenerate(aRootUrl);
2754
- }
2755
-
2756
- var joined = aPath.charAt(0) === '/'
2757
- ? aPath
2758
- : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
2759
-
2760
- if (aRootUrl) {
2761
- aRootUrl.path = joined;
2762
- return urlGenerate(aRootUrl);
2763
- }
2764
- return joined;
2765
- }
2766
- exports.join = join;
2767
-
2768
- exports.isAbsolute = function (aPath) {
2769
- return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
2770
- };
2771
-
2772
- /**
2773
- * Make a path relative to a URL or another path.
2774
- *
2775
- * @param aRoot The root path or URL.
2776
- * @param aPath The path or URL to be made relative to aRoot.
2777
- */
2778
- function relative(aRoot, aPath) {
2779
- if (aRoot === "") {
2780
- aRoot = ".";
2781
- }
2782
-
2783
- aRoot = aRoot.replace(/\/$/, '');
2784
-
2785
- // It is possible for the path to be above the root. In this case, simply
2786
- // checking whether the root is a prefix of the path won't work. Instead, we
2787
- // need to remove components from the root one by one, until either we find
2788
- // a prefix that fits, or we run out of components to remove.
2789
- var level = 0;
2790
- while (aPath.indexOf(aRoot + '/') !== 0) {
2791
- var index = aRoot.lastIndexOf("/");
2792
- if (index < 0) {
2793
- return aPath;
2794
- }
2795
-
2796
- // If the only part of the root that is left is the scheme (i.e. http://,
2797
- // file:///, etc.), one or more slashes (/), or simply nothing at all, we
2798
- // have exhausted all components, so the path is not relative to the root.
2799
- aRoot = aRoot.slice(0, index);
2800
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
2801
- return aPath;
2802
- }
2803
-
2804
- ++level;
2805
- }
2806
-
2807
- // Make sure we add a "../" for each component we removed from the root.
2808
- return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
2809
- }
2810
- exports.relative = relative;
2811
-
2812
- var supportsNullProto = (function () {
2813
- var obj = Object.create(null);
2814
- return !('__proto__' in obj);
2815
- }());
2816
-
2817
- function identity (s) {
2818
- return s;
2819
- }
2820
-
2821
- /**
2822
- * Because behavior goes wacky when you set `__proto__` on objects, we
2823
- * have to prefix all the strings in our set with an arbitrary character.
2824
- *
2825
- * See https://github.com/mozilla/source-map/pull/31 and
2826
- * https://github.com/mozilla/source-map/issues/30
2827
- *
2828
- * @param String aStr
2829
- */
2830
- function toSetString(aStr) {
2831
- if (isProtoString(aStr)) {
2832
- return '$' + aStr;
2833
- }
2834
-
2835
- return aStr;
2836
- }
2837
- exports.toSetString = supportsNullProto ? identity : toSetString;
2838
-
2839
- function fromSetString(aStr) {
2840
- if (isProtoString(aStr)) {
2841
- return aStr.slice(1);
2842
- }
2843
-
2844
- return aStr;
2845
- }
2846
- exports.fromSetString = supportsNullProto ? identity : fromSetString;
2847
-
2848
- function isProtoString(s) {
2849
- if (!s) {
2850
- return false;
2851
- }
2852
-
2853
- var length = s.length;
2854
-
2855
- if (length < 9 /* "__proto__".length */) {
2856
- return false;
2857
- }
2858
-
2859
- if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
2860
- s.charCodeAt(length - 2) !== 95 /* '_' */ ||
2861
- s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
2862
- s.charCodeAt(length - 4) !== 116 /* 't' */ ||
2863
- s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
2864
- s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
2865
- s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
2866
- s.charCodeAt(length - 8) !== 95 /* '_' */ ||
2867
- s.charCodeAt(length - 9) !== 95 /* '_' */) {
2868
- return false;
2869
- }
2870
-
2871
- for (var i = length - 10; i >= 0; i--) {
2872
- if (s.charCodeAt(i) !== 36 /* '$' */) {
2873
- return false;
2874
- }
2875
- }
2876
-
2877
- return true;
2878
- }
2879
-
2880
- /**
2881
- * Comparator between two mappings where the original positions are compared.
2882
- *
2883
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
2884
- * mappings with the same original source/line/column, but different generated
2885
- * line and column the same. Useful when searching for a mapping with a
2886
- * stubbed out mapping.
2887
- */
2888
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
2889
- var cmp = strcmp(mappingA.source, mappingB.source);
2890
- if (cmp !== 0) {
2891
- return cmp;
2892
- }
2893
-
2894
- cmp = mappingA.originalLine - mappingB.originalLine;
2895
- if (cmp !== 0) {
2896
- return cmp;
2897
- }
2898
-
2899
- cmp = mappingA.originalColumn - mappingB.originalColumn;
2900
- if (cmp !== 0 || onlyCompareOriginal) {
2901
- return cmp;
2902
- }
2903
-
2904
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
2905
- if (cmp !== 0) {
2906
- return cmp;
2907
- }
2908
-
2909
- cmp = mappingA.generatedLine - mappingB.generatedLine;
2910
- if (cmp !== 0) {
2911
- return cmp;
2912
- }
2913
-
2914
- return strcmp(mappingA.name, mappingB.name);
2915
- }
2916
- exports.compareByOriginalPositions = compareByOriginalPositions;
2917
-
2918
- function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
2919
- var cmp;
2920
-
2921
- cmp = mappingA.originalLine - mappingB.originalLine;
2922
- if (cmp !== 0) {
2923
- return cmp;
2924
- }
2925
-
2926
- cmp = mappingA.originalColumn - mappingB.originalColumn;
2927
- if (cmp !== 0 || onlyCompareOriginal) {
2928
- return cmp;
2929
- }
2930
-
2931
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
2932
- if (cmp !== 0) {
2933
- return cmp;
2934
- }
2935
-
2936
- cmp = mappingA.generatedLine - mappingB.generatedLine;
2937
- if (cmp !== 0) {
2938
- return cmp;
2939
- }
2940
-
2941
- return strcmp(mappingA.name, mappingB.name);
2942
- }
2943
- exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
2944
-
2945
- /**
2946
- * Comparator between two mappings with deflated source and name indices where
2947
- * the generated positions are compared.
2948
- *
2949
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
2950
- * mappings with the same generated line and column, but different
2951
- * source/name/original line and column the same. Useful when searching for a
2952
- * mapping with a stubbed out mapping.
2953
- */
2954
- function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
2955
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
2956
- if (cmp !== 0) {
2957
- return cmp;
2958
- }
2959
-
2960
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
2961
- if (cmp !== 0 || onlyCompareGenerated) {
2962
- return cmp;
2963
- }
2964
-
2965
- cmp = strcmp(mappingA.source, mappingB.source);
2966
- if (cmp !== 0) {
2967
- return cmp;
2968
- }
2969
-
2970
- cmp = mappingA.originalLine - mappingB.originalLine;
2971
- if (cmp !== 0) {
2972
- return cmp;
2973
- }
2974
-
2975
- cmp = mappingA.originalColumn - mappingB.originalColumn;
2976
- if (cmp !== 0) {
2977
- return cmp;
2978
- }
2551
+ /*
2552
+ * Copyright 2011 Mozilla Foundation and contributors
2553
+ * Licensed under the New BSD license. See LICENSE or:
2554
+ * http://opensource.org/licenses/BSD-3-Clause
2555
+ */
2556
+
2557
+ /**
2558
+ * This is a helper function for getting values from parameter/options
2559
+ * objects.
2560
+ *
2561
+ * @param args The object we are extracting values from
2562
+ * @param name The name of the property we are getting.
2563
+ * @param defaultValue An optional value to return if the property is missing
2564
+ * from the object. If this is not specified and the property is missing, an
2565
+ * error will be thrown.
2566
+ */
2567
+ function getArg(aArgs, aName, aDefaultValue) {
2568
+ if (aName in aArgs) {
2569
+ return aArgs[aName];
2570
+ } else if (arguments.length === 3) {
2571
+ return aDefaultValue;
2572
+ } else {
2573
+ throw new Error('"' + aName + '" is a required argument.');
2574
+ }
2575
+ }
2576
+ exports.getArg = getArg;
2577
+
2578
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
2579
+ var dataUrlRegexp = /^data:.+\,.+$/;
2580
+
2581
+ function urlParse(aUrl) {
2582
+ var match = aUrl.match(urlRegexp);
2583
+ if (!match) {
2584
+ return null;
2585
+ }
2586
+ return {
2587
+ scheme: match[1],
2588
+ auth: match[2],
2589
+ host: match[3],
2590
+ port: match[4],
2591
+ path: match[5]
2592
+ };
2593
+ }
2594
+ exports.urlParse = urlParse;
2595
+
2596
+ function urlGenerate(aParsedUrl) {
2597
+ var url = '';
2598
+ if (aParsedUrl.scheme) {
2599
+ url += aParsedUrl.scheme + ':';
2600
+ }
2601
+ url += '//';
2602
+ if (aParsedUrl.auth) {
2603
+ url += aParsedUrl.auth + '@';
2604
+ }
2605
+ if (aParsedUrl.host) {
2606
+ url += aParsedUrl.host;
2607
+ }
2608
+ if (aParsedUrl.port) {
2609
+ url += ":" + aParsedUrl.port;
2610
+ }
2611
+ if (aParsedUrl.path) {
2612
+ url += aParsedUrl.path;
2613
+ }
2614
+ return url;
2615
+ }
2616
+ exports.urlGenerate = urlGenerate;
2617
+
2618
+ var MAX_CACHED_INPUTS = 32;
2619
+
2620
+ /**
2621
+ * Takes some function `f(input) -> result` and returns a memoized version of
2622
+ * `f`.
2623
+ *
2624
+ * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The
2625
+ * memoization is a dumb-simple, linear least-recently-used cache.
2626
+ */
2627
+ function lruMemoize(f) {
2628
+ var cache = [];
2629
+
2630
+ return function(input) {
2631
+ for (var i = 0; i < cache.length; i++) {
2632
+ if (cache[i].input === input) {
2633
+ var temp = cache[0];
2634
+ cache[0] = cache[i];
2635
+ cache[i] = temp;
2636
+ return cache[0].result;
2637
+ }
2638
+ }
2639
+
2640
+ var result = f(input);
2641
+
2642
+ cache.unshift({
2643
+ input,
2644
+ result,
2645
+ });
2646
+
2647
+ if (cache.length > MAX_CACHED_INPUTS) {
2648
+ cache.pop();
2649
+ }
2650
+
2651
+ return result;
2652
+ };
2653
+ }
2979
2654
 
2980
- return strcmp(mappingA.name, mappingB.name);
2981
- }
2982
- exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
2655
+ /**
2656
+ * Normalizes a path, or the path portion of a URL:
2657
+ *
2658
+ * - Replaces consecutive slashes with one slash.
2659
+ * - Removes unnecessary '.' parts.
2660
+ * - Removes unnecessary '<dir>/..' parts.
2661
+ *
2662
+ * Based on code in the Node.js 'path' core module.
2663
+ *
2664
+ * @param aPath The path or url to normalize.
2665
+ */
2666
+ var normalize = lruMemoize(function normalize(aPath) {
2667
+ var path = aPath;
2668
+ var url = urlParse(aPath);
2669
+ if (url) {
2670
+ if (!url.path) {
2671
+ return aPath;
2672
+ }
2673
+ path = url.path;
2674
+ }
2675
+ var isAbsolute = exports.isAbsolute(path);
2676
+ // Split the path into parts between `/` characters. This is much faster than
2677
+ // using `.split(/\/+/g)`.
2678
+ var parts = [];
2679
+ var start = 0;
2680
+ var i = 0;
2681
+ while (true) {
2682
+ start = i;
2683
+ i = path.indexOf("/", start);
2684
+ if (i === -1) {
2685
+ parts.push(path.slice(start));
2686
+ break;
2687
+ } else {
2688
+ parts.push(path.slice(start, i));
2689
+ while (i < path.length && path[i] === "/") {
2690
+ i++;
2691
+ }
2692
+ }
2693
+ }
2694
+
2695
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
2696
+ part = parts[i];
2697
+ if (part === '.') {
2698
+ parts.splice(i, 1);
2699
+ } else if (part === '..') {
2700
+ up++;
2701
+ } else if (up > 0) {
2702
+ if (part === '') {
2703
+ // The first part is blank if the path is absolute. Trying to go
2704
+ // above the root is a no-op. Therefore we can remove all '..' parts
2705
+ // directly after the root.
2706
+ parts.splice(i + 1, up);
2707
+ up = 0;
2708
+ } else {
2709
+ parts.splice(i, 2);
2710
+ up--;
2711
+ }
2712
+ }
2713
+ }
2714
+ path = parts.join('/');
2715
+
2716
+ if (path === '') {
2717
+ path = isAbsolute ? '/' : '.';
2718
+ }
2719
+
2720
+ if (url) {
2721
+ url.path = path;
2722
+ return urlGenerate(url);
2723
+ }
2724
+ return path;
2725
+ });
2726
+ exports.normalize = normalize;
2727
+
2728
+ /**
2729
+ * Joins two paths/URLs.
2730
+ *
2731
+ * @param aRoot The root path or URL.
2732
+ * @param aPath The path or URL to be joined with the root.
2733
+ *
2734
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
2735
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
2736
+ * first.
2737
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
2738
+ * is updated with the result and aRoot is returned. Otherwise the result
2739
+ * is returned.
2740
+ * - If aPath is absolute, the result is aPath.
2741
+ * - Otherwise the two paths are joined with a slash.
2742
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
2743
+ */
2744
+ function join(aRoot, aPath) {
2745
+ if (aRoot === "") {
2746
+ aRoot = ".";
2747
+ }
2748
+ if (aPath === "") {
2749
+ aPath = ".";
2750
+ }
2751
+ var aPathUrl = urlParse(aPath);
2752
+ var aRootUrl = urlParse(aRoot);
2753
+ if (aRootUrl) {
2754
+ aRoot = aRootUrl.path || '/';
2755
+ }
2756
+
2757
+ // `join(foo, '//www.example.org')`
2758
+ if (aPathUrl && !aPathUrl.scheme) {
2759
+ if (aRootUrl) {
2760
+ aPathUrl.scheme = aRootUrl.scheme;
2761
+ }
2762
+ return urlGenerate(aPathUrl);
2763
+ }
2764
+
2765
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
2766
+ return aPath;
2767
+ }
2768
+
2769
+ // `join('http://', 'www.example.com')`
2770
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
2771
+ aRootUrl.host = aPath;
2772
+ return urlGenerate(aRootUrl);
2773
+ }
2774
+
2775
+ var joined = aPath.charAt(0) === '/'
2776
+ ? aPath
2777
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
2778
+
2779
+ if (aRootUrl) {
2780
+ aRootUrl.path = joined;
2781
+ return urlGenerate(aRootUrl);
2782
+ }
2783
+ return joined;
2784
+ }
2785
+ exports.join = join;
2983
2786
 
2984
- function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
2985
- var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
2986
- if (cmp !== 0 || onlyCompareGenerated) {
2987
- return cmp;
2988
- }
2787
+ exports.isAbsolute = function (aPath) {
2788
+ return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
2789
+ };
2989
2790
 
2990
- cmp = strcmp(mappingA.source, mappingB.source);
2991
- if (cmp !== 0) {
2992
- return cmp;
2993
- }
2791
+ /**
2792
+ * Make a path relative to a URL or another path.
2793
+ *
2794
+ * @param aRoot The root path or URL.
2795
+ * @param aPath The path or URL to be made relative to aRoot.
2796
+ */
2797
+ function relative(aRoot, aPath) {
2798
+ if (aRoot === "") {
2799
+ aRoot = ".";
2800
+ }
2801
+
2802
+ aRoot = aRoot.replace(/\/$/, '');
2803
+
2804
+ // It is possible for the path to be above the root. In this case, simply
2805
+ // checking whether the root is a prefix of the path won't work. Instead, we
2806
+ // need to remove components from the root one by one, until either we find
2807
+ // a prefix that fits, or we run out of components to remove.
2808
+ var level = 0;
2809
+ while (aPath.indexOf(aRoot + '/') !== 0) {
2810
+ var index = aRoot.lastIndexOf("/");
2811
+ if (index < 0) {
2812
+ return aPath;
2813
+ }
2814
+
2815
+ // If the only part of the root that is left is the scheme (i.e. http://,
2816
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
2817
+ // have exhausted all components, so the path is not relative to the root.
2818
+ aRoot = aRoot.slice(0, index);
2819
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
2820
+ return aPath;
2821
+ }
2822
+
2823
+ ++level;
2824
+ }
2825
+
2826
+ // Make sure we add a "../" for each component we removed from the root.
2827
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
2828
+ }
2829
+ exports.relative = relative;
2994
2830
 
2995
- cmp = mappingA.originalLine - mappingB.originalLine;
2996
- if (cmp !== 0) {
2997
- return cmp;
2998
- }
2831
+ var supportsNullProto = (function () {
2832
+ var obj = Object.create(null);
2833
+ return !('__proto__' in obj);
2834
+ }());
2999
2835
 
3000
- cmp = mappingA.originalColumn - mappingB.originalColumn;
3001
- if (cmp !== 0) {
3002
- return cmp;
3003
- }
2836
+ function identity (s) {
2837
+ return s;
2838
+ }
3004
2839
 
3005
- return strcmp(mappingA.name, mappingB.name);
3006
- }
3007
- exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
2840
+ /**
2841
+ * Because behavior goes wacky when you set `__proto__` on objects, we
2842
+ * have to prefix all the strings in our set with an arbitrary character.
2843
+ *
2844
+ * See https://github.com/mozilla/source-map/pull/31 and
2845
+ * https://github.com/mozilla/source-map/issues/30
2846
+ *
2847
+ * @param String aStr
2848
+ */
2849
+ function toSetString(aStr) {
2850
+ if (isProtoString(aStr)) {
2851
+ return '$' + aStr;
2852
+ }
2853
+
2854
+ return aStr;
2855
+ }
2856
+ exports.toSetString = supportsNullProto ? identity : toSetString;
3008
2857
 
3009
- function strcmp(aStr1, aStr2) {
3010
- if (aStr1 === aStr2) {
3011
- return 0;
3012
- }
2858
+ function fromSetString(aStr) {
2859
+ if (isProtoString(aStr)) {
2860
+ return aStr.slice(1);
2861
+ }
3013
2862
 
3014
- if (aStr1 === null) {
3015
- return 1; // aStr2 !== null
3016
- }
2863
+ return aStr;
2864
+ }
2865
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
2866
+
2867
+ function isProtoString(s) {
2868
+ if (!s) {
2869
+ return false;
2870
+ }
2871
+
2872
+ var length = s.length;
2873
+
2874
+ if (length < 9 /* "__proto__".length */) {
2875
+ return false;
2876
+ }
2877
+
2878
+ if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
2879
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
2880
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
2881
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
2882
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
2883
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
2884
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
2885
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
2886
+ s.charCodeAt(length - 9) !== 95 /* '_' */) {
2887
+ return false;
2888
+ }
2889
+
2890
+ for (var i = length - 10; i >= 0; i--) {
2891
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
2892
+ return false;
2893
+ }
2894
+ }
2895
+
2896
+ return true;
2897
+ }
3017
2898
 
3018
- if (aStr2 === null) {
3019
- return -1; // aStr1 !== null
3020
- }
2899
+ /**
2900
+ * Comparator between two mappings where the original positions are compared.
2901
+ *
2902
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
2903
+ * mappings with the same original source/line/column, but different generated
2904
+ * line and column the same. Useful when searching for a mapping with a
2905
+ * stubbed out mapping.
2906
+ */
2907
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
2908
+ var cmp = strcmp(mappingA.source, mappingB.source);
2909
+ if (cmp !== 0) {
2910
+ return cmp;
2911
+ }
2912
+
2913
+ cmp = mappingA.originalLine - mappingB.originalLine;
2914
+ if (cmp !== 0) {
2915
+ return cmp;
2916
+ }
2917
+
2918
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
2919
+ if (cmp !== 0 || onlyCompareOriginal) {
2920
+ return cmp;
2921
+ }
2922
+
2923
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
2924
+ if (cmp !== 0) {
2925
+ return cmp;
2926
+ }
2927
+
2928
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
2929
+ if (cmp !== 0) {
2930
+ return cmp;
2931
+ }
2932
+
2933
+ return strcmp(mappingA.name, mappingB.name);
2934
+ }
2935
+ exports.compareByOriginalPositions = compareByOriginalPositions;
3021
2936
 
3022
- if (aStr1 > aStr2) {
3023
- return 1;
3024
- }
2937
+ function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
2938
+ var cmp;
3025
2939
 
3026
- return -1;
3027
- }
2940
+ cmp = mappingA.originalLine - mappingB.originalLine;
2941
+ if (cmp !== 0) {
2942
+ return cmp;
2943
+ }
3028
2944
 
3029
- /**
3030
- * Comparator between two mappings with inflated source and name strings where
3031
- * the generated positions are compared.
3032
- */
3033
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
3034
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
3035
- if (cmp !== 0) {
3036
- return cmp;
3037
- }
2945
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
2946
+ if (cmp !== 0 || onlyCompareOriginal) {
2947
+ return cmp;
2948
+ }
3038
2949
 
3039
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
3040
- if (cmp !== 0) {
3041
- return cmp;
3042
- }
2950
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
2951
+ if (cmp !== 0) {
2952
+ return cmp;
2953
+ }
3043
2954
 
3044
- cmp = strcmp(mappingA.source, mappingB.source);
3045
- if (cmp !== 0) {
3046
- return cmp;
3047
- }
2955
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
2956
+ if (cmp !== 0) {
2957
+ return cmp;
2958
+ }
3048
2959
 
3049
- cmp = mappingA.originalLine - mappingB.originalLine;
3050
- if (cmp !== 0) {
3051
- return cmp;
3052
- }
2960
+ return strcmp(mappingA.name, mappingB.name);
2961
+ }
2962
+ exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
2963
+
2964
+ /**
2965
+ * Comparator between two mappings with deflated source and name indices where
2966
+ * the generated positions are compared.
2967
+ *
2968
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
2969
+ * mappings with the same generated line and column, but different
2970
+ * source/name/original line and column the same. Useful when searching for a
2971
+ * mapping with a stubbed out mapping.
2972
+ */
2973
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
2974
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
2975
+ if (cmp !== 0) {
2976
+ return cmp;
2977
+ }
2978
+
2979
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
2980
+ if (cmp !== 0 || onlyCompareGenerated) {
2981
+ return cmp;
2982
+ }
2983
+
2984
+ cmp = strcmp(mappingA.source, mappingB.source);
2985
+ if (cmp !== 0) {
2986
+ return cmp;
2987
+ }
2988
+
2989
+ cmp = mappingA.originalLine - mappingB.originalLine;
2990
+ if (cmp !== 0) {
2991
+ return cmp;
2992
+ }
2993
+
2994
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
2995
+ if (cmp !== 0) {
2996
+ return cmp;
2997
+ }
2998
+
2999
+ return strcmp(mappingA.name, mappingB.name);
3000
+ }
3001
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
3002
+
3003
+ function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
3004
+ var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
3005
+ if (cmp !== 0 || onlyCompareGenerated) {
3006
+ return cmp;
3007
+ }
3008
+
3009
+ cmp = strcmp(mappingA.source, mappingB.source);
3010
+ if (cmp !== 0) {
3011
+ return cmp;
3012
+ }
3013
+
3014
+ cmp = mappingA.originalLine - mappingB.originalLine;
3015
+ if (cmp !== 0) {
3016
+ return cmp;
3017
+ }
3018
+
3019
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
3020
+ if (cmp !== 0) {
3021
+ return cmp;
3022
+ }
3023
+
3024
+ return strcmp(mappingA.name, mappingB.name);
3025
+ }
3026
+ exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
3053
3027
 
3054
- cmp = mappingA.originalColumn - mappingB.originalColumn;
3055
- if (cmp !== 0) {
3056
- return cmp;
3057
- }
3028
+ function strcmp(aStr1, aStr2) {
3029
+ if (aStr1 === aStr2) {
3030
+ return 0;
3031
+ }
3058
3032
 
3059
- return strcmp(mappingA.name, mappingB.name);
3060
- }
3061
- exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
3033
+ if (aStr1 === null) {
3034
+ return 1; // aStr2 !== null
3035
+ }
3062
3036
 
3063
- /**
3064
- * Strip any JSON XSSI avoidance prefix from the string (as documented
3065
- * in the source maps specification), and then parse the string as
3066
- * JSON.
3067
- */
3068
- function parseSourceMapInput(str) {
3069
- return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
3070
- }
3071
- exports.parseSourceMapInput = parseSourceMapInput;
3037
+ if (aStr2 === null) {
3038
+ return -1; // aStr1 !== null
3039
+ }
3072
3040
 
3073
- /**
3074
- * Compute the URL of a source given the the source root, the source's
3075
- * URL, and the source map's URL.
3076
- */
3077
- function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
3078
- sourceURL = sourceURL || '';
3041
+ if (aStr1 > aStr2) {
3042
+ return 1;
3043
+ }
3079
3044
 
3080
- if (sourceRoot) {
3081
- // This follows what Chrome does.
3082
- if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
3083
- sourceRoot += '/';
3084
- }
3085
- // The spec says:
3086
- // Line 4: An optional source root, useful for relocating source
3087
- // files on a server or removing repeated values in the
3088
- // “sources” entry. This value is prepended to the individual
3089
- // entries in the “source” field.
3090
- sourceURL = sourceRoot + sourceURL;
3091
- }
3092
-
3093
- // Historically, SourceMapConsumer did not take the sourceMapURL as
3094
- // a parameter. This mode is still somewhat supported, which is why
3095
- // this code block is conditional. However, it's preferable to pass
3096
- // the source map URL to SourceMapConsumer, so that this function
3097
- // can implement the source URL resolution algorithm as outlined in
3098
- // the spec. This block is basically the equivalent of:
3099
- // new URL(sourceURL, sourceMapURL).toString()
3100
- // ... except it avoids using URL, which wasn't available in the
3101
- // older releases of node still supported by this library.
3102
- //
3103
- // The spec says:
3104
- // If the sources are not absolute URLs after prepending of the
3105
- // “sourceRoot”, the sources are resolved relative to the
3106
- // SourceMap (like resolving script src in a html document).
3107
- if (sourceMapURL) {
3108
- var parsed = urlParse(sourceMapURL);
3109
- if (!parsed) {
3110
- throw new Error("sourceMapURL could not be parsed");
3111
- }
3112
- if (parsed.path) {
3113
- // Strip the last path component, but keep the "/".
3114
- var index = parsed.path.lastIndexOf('/');
3115
- if (index >= 0) {
3116
- parsed.path = parsed.path.substring(0, index + 1);
3117
- }
3118
- }
3119
- sourceURL = join(urlGenerate(parsed), sourceURL);
3120
- }
3045
+ return -1;
3046
+ }
3121
3047
 
3122
- return normalize(sourceURL);
3123
- }
3124
- exports.computeSourceURL = computeSourceURL;
3125
- }(util$5));
3048
+ /**
3049
+ * Comparator between two mappings with inflated source and name strings where
3050
+ * the generated positions are compared.
3051
+ */
3052
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
3053
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
3054
+ if (cmp !== 0) {
3055
+ return cmp;
3056
+ }
3057
+
3058
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
3059
+ if (cmp !== 0) {
3060
+ return cmp;
3061
+ }
3062
+
3063
+ cmp = strcmp(mappingA.source, mappingB.source);
3064
+ if (cmp !== 0) {
3065
+ return cmp;
3066
+ }
3067
+
3068
+ cmp = mappingA.originalLine - mappingB.originalLine;
3069
+ if (cmp !== 0) {
3070
+ return cmp;
3071
+ }
3072
+
3073
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
3074
+ if (cmp !== 0) {
3075
+ return cmp;
3076
+ }
3077
+
3078
+ return strcmp(mappingA.name, mappingB.name);
3079
+ }
3080
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
3081
+
3082
+ /**
3083
+ * Strip any JSON XSSI avoidance prefix from the string (as documented
3084
+ * in the source maps specification), and then parse the string as
3085
+ * JSON.
3086
+ */
3087
+ function parseSourceMapInput(str) {
3088
+ return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
3089
+ }
3090
+ exports.parseSourceMapInput = parseSourceMapInput;
3091
+
3092
+ /**
3093
+ * Compute the URL of a source given the the source root, the source's
3094
+ * URL, and the source map's URL.
3095
+ */
3096
+ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
3097
+ sourceURL = sourceURL || '';
3098
+
3099
+ if (sourceRoot) {
3100
+ // This follows what Chrome does.
3101
+ if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
3102
+ sourceRoot += '/';
3103
+ }
3104
+ // The spec says:
3105
+ // Line 4: An optional source root, useful for relocating source
3106
+ // files on a server or removing repeated values in the
3107
+ // “sources” entry. This value is prepended to the individual
3108
+ // entries in the “source” field.
3109
+ sourceURL = sourceRoot + sourceURL;
3110
+ }
3111
+
3112
+ // Historically, SourceMapConsumer did not take the sourceMapURL as
3113
+ // a parameter. This mode is still somewhat supported, which is why
3114
+ // this code block is conditional. However, it's preferable to pass
3115
+ // the source map URL to SourceMapConsumer, so that this function
3116
+ // can implement the source URL resolution algorithm as outlined in
3117
+ // the spec. This block is basically the equivalent of:
3118
+ // new URL(sourceURL, sourceMapURL).toString()
3119
+ // ... except it avoids using URL, which wasn't available in the
3120
+ // older releases of node still supported by this library.
3121
+ //
3122
+ // The spec says:
3123
+ // If the sources are not absolute URLs after prepending of the
3124
+ // “sourceRoot”, the sources are resolved relative to the
3125
+ // SourceMap (like resolving script src in a html document).
3126
+ if (sourceMapURL) {
3127
+ var parsed = urlParse(sourceMapURL);
3128
+ if (!parsed) {
3129
+ throw new Error("sourceMapURL could not be parsed");
3130
+ }
3131
+ if (parsed.path) {
3132
+ // Strip the last path component, but keep the "/".
3133
+ var index = parsed.path.lastIndexOf('/');
3134
+ if (index >= 0) {
3135
+ parsed.path = parsed.path.substring(0, index + 1);
3136
+ }
3137
+ }
3138
+ sourceURL = join(urlGenerate(parsed), sourceURL);
3139
+ }
3140
+
3141
+ return normalize(sourceURL);
3142
+ }
3143
+ exports.computeSourceURL = computeSourceURL;
3144
+ } (util$5));
3126
3145
 
3127
3146
  var arraySet = {};
3128
3147
 
@@ -3766,117 +3785,117 @@ var binarySearch$1 = {};
3766
3785
  /* -*- Mode: js; js-indent-level: 2; -*- */
3767
3786
 
3768
3787
  (function (exports) {
3769
- /*
3770
- * Copyright 2011 Mozilla Foundation and contributors
3771
- * Licensed under the New BSD license. See LICENSE or:
3772
- * http://opensource.org/licenses/BSD-3-Clause
3773
- */
3774
-
3775
- exports.GREATEST_LOWER_BOUND = 1;
3776
- exports.LEAST_UPPER_BOUND = 2;
3777
-
3778
- /**
3779
- * Recursive implementation of binary search.
3780
- *
3781
- * @param aLow Indices here and lower do not contain the needle.
3782
- * @param aHigh Indices here and higher do not contain the needle.
3783
- * @param aNeedle The element being searched for.
3784
- * @param aHaystack The non-empty array being searched.
3785
- * @param aCompare Function which takes two elements and returns -1, 0, or 1.
3786
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
3787
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
3788
- * closest element that is smaller than or greater than the one we are
3789
- * searching for, respectively, if the exact element cannot be found.
3790
- */
3791
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
3792
- // This function terminates when one of the following is true:
3793
- //
3794
- // 1. We find the exact element we are looking for.
3795
- //
3796
- // 2. We did not find the exact element, but we can return the index of
3797
- // the next-closest element.
3798
- //
3799
- // 3. We did not find the exact element, and there is no next-closest
3800
- // element than the one we are searching for, so we return -1.
3801
- var mid = Math.floor((aHigh - aLow) / 2) + aLow;
3802
- var cmp = aCompare(aNeedle, aHaystack[mid], true);
3803
- if (cmp === 0) {
3804
- // Found the element we are looking for.
3805
- return mid;
3806
- }
3807
- else if (cmp > 0) {
3808
- // Our needle is greater than aHaystack[mid].
3809
- if (aHigh - mid > 1) {
3810
- // The element is in the upper half.
3811
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
3812
- }
3813
-
3814
- // The exact needle element was not found in this haystack. Determine if
3815
- // we are in termination case (3) or (2) and return the appropriate thing.
3816
- if (aBias == exports.LEAST_UPPER_BOUND) {
3817
- return aHigh < aHaystack.length ? aHigh : -1;
3818
- } else {
3819
- return mid;
3820
- }
3821
- }
3822
- else {
3823
- // Our needle is less than aHaystack[mid].
3824
- if (mid - aLow > 1) {
3825
- // The element is in the lower half.
3826
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
3827
- }
3828
-
3829
- // we are in termination case (3) or (2) and return the appropriate thing.
3830
- if (aBias == exports.LEAST_UPPER_BOUND) {
3831
- return mid;
3832
- } else {
3833
- return aLow < 0 ? -1 : aLow;
3834
- }
3835
- }
3836
- }
3837
-
3838
- /**
3839
- * This is an implementation of binary search which will always try and return
3840
- * the index of the closest element if there is no exact hit. This is because
3841
- * mappings between original and generated line/col pairs are single points,
3842
- * and there is an implicit region between each of them, so a miss just means
3843
- * that you aren't on the very start of a region.
3844
- *
3845
- * @param aNeedle The element you are looking for.
3846
- * @param aHaystack The array that is being searched.
3847
- * @param aCompare A function which takes the needle and an element in the
3848
- * array and returns -1, 0, or 1 depending on whether the needle is less
3849
- * than, equal to, or greater than the element, respectively.
3850
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
3851
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
3852
- * closest element that is smaller than or greater than the one we are
3853
- * searching for, respectively, if the exact element cannot be found.
3854
- * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
3855
- */
3856
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
3857
- if (aHaystack.length === 0) {
3858
- return -1;
3859
- }
3860
-
3861
- var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
3862
- aCompare, aBias || exports.GREATEST_LOWER_BOUND);
3863
- if (index < 0) {
3864
- return -1;
3865
- }
3866
-
3867
- // We have found either the exact element, or the next-closest element than
3868
- // the one we are searching for. However, there may be more than one such
3869
- // element. Make sure we always return the smallest of these.
3870
- while (index - 1 >= 0) {
3871
- if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
3872
- break;
3873
- }
3874
- --index;
3875
- }
3788
+ /*
3789
+ * Copyright 2011 Mozilla Foundation and contributors
3790
+ * Licensed under the New BSD license. See LICENSE or:
3791
+ * http://opensource.org/licenses/BSD-3-Clause
3792
+ */
3793
+
3794
+ exports.GREATEST_LOWER_BOUND = 1;
3795
+ exports.LEAST_UPPER_BOUND = 2;
3796
+
3797
+ /**
3798
+ * Recursive implementation of binary search.
3799
+ *
3800
+ * @param aLow Indices here and lower do not contain the needle.
3801
+ * @param aHigh Indices here and higher do not contain the needle.
3802
+ * @param aNeedle The element being searched for.
3803
+ * @param aHaystack The non-empty array being searched.
3804
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
3805
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
3806
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
3807
+ * closest element that is smaller than or greater than the one we are
3808
+ * searching for, respectively, if the exact element cannot be found.
3809
+ */
3810
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
3811
+ // This function terminates when one of the following is true:
3812
+ //
3813
+ // 1. We find the exact element we are looking for.
3814
+ //
3815
+ // 2. We did not find the exact element, but we can return the index of
3816
+ // the next-closest element.
3817
+ //
3818
+ // 3. We did not find the exact element, and there is no next-closest
3819
+ // element than the one we are searching for, so we return -1.
3820
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
3821
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
3822
+ if (cmp === 0) {
3823
+ // Found the element we are looking for.
3824
+ return mid;
3825
+ }
3826
+ else if (cmp > 0) {
3827
+ // Our needle is greater than aHaystack[mid].
3828
+ if (aHigh - mid > 1) {
3829
+ // The element is in the upper half.
3830
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
3831
+ }
3832
+
3833
+ // The exact needle element was not found in this haystack. Determine if
3834
+ // we are in termination case (3) or (2) and return the appropriate thing.
3835
+ if (aBias == exports.LEAST_UPPER_BOUND) {
3836
+ return aHigh < aHaystack.length ? aHigh : -1;
3837
+ } else {
3838
+ return mid;
3839
+ }
3840
+ }
3841
+ else {
3842
+ // Our needle is less than aHaystack[mid].
3843
+ if (mid - aLow > 1) {
3844
+ // The element is in the lower half.
3845
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
3846
+ }
3847
+
3848
+ // we are in termination case (3) or (2) and return the appropriate thing.
3849
+ if (aBias == exports.LEAST_UPPER_BOUND) {
3850
+ return mid;
3851
+ } else {
3852
+ return aLow < 0 ? -1 : aLow;
3853
+ }
3854
+ }
3855
+ }
3876
3856
 
3877
- return index;
3878
- };
3879
- }(binarySearch$1));
3857
+ /**
3858
+ * This is an implementation of binary search which will always try and return
3859
+ * the index of the closest element if there is no exact hit. This is because
3860
+ * mappings between original and generated line/col pairs are single points,
3861
+ * and there is an implicit region between each of them, so a miss just means
3862
+ * that you aren't on the very start of a region.
3863
+ *
3864
+ * @param aNeedle The element you are looking for.
3865
+ * @param aHaystack The array that is being searched.
3866
+ * @param aCompare A function which takes the needle and an element in the
3867
+ * array and returns -1, 0, or 1 depending on whether the needle is less
3868
+ * than, equal to, or greater than the element, respectively.
3869
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
3870
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
3871
+ * closest element that is smaller than or greater than the one we are
3872
+ * searching for, respectively, if the exact element cannot be found.
3873
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
3874
+ */
3875
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
3876
+ if (aHaystack.length === 0) {
3877
+ return -1;
3878
+ }
3879
+
3880
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
3881
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
3882
+ if (index < 0) {
3883
+ return -1;
3884
+ }
3885
+
3886
+ // We have found either the exact element, or the next-closest element than
3887
+ // the one we are searching for. However, there may be more than one such
3888
+ // element. Make sure we always return the smallest of these.
3889
+ while (index - 1 >= 0) {
3890
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
3891
+ break;
3892
+ }
3893
+ --index;
3894
+ }
3895
+
3896
+ return index;
3897
+ };
3898
+ } (binarySearch$1));
3880
3899
 
3881
3900
  var quickSort$1 = {};
3882
3901
 
@@ -5637,6 +5656,8 @@ const stackBarePathRE = /at ?(.*) (.+):(\d+):(\d+)$/;
5637
5656
  async function interpretSourcePos(stackFrames, ctx) {
5638
5657
  var _a;
5639
5658
  for (const frame of stackFrames) {
5659
+ if ("sourcePos" in frame)
5660
+ continue;
5640
5661
  const transformResult = (_a = ctx.server.moduleGraph.getModuleById(frame.file)) == null ? void 0 : _a.ssrTransformResult;
5641
5662
  if (!transformResult)
5642
5663
  continue;
@@ -6744,16 +6765,337 @@ function stripAnsi(string) {
6744
6765
  return string.replace(ansiRegex(), '');
6745
6766
  }
6746
6767
 
6768
+ var eastasianwidth = {exports: {}};
6769
+
6770
+ (function (module) {
6771
+ var eaw = {};
6772
+
6773
+ {
6774
+ module.exports = eaw;
6775
+ }
6776
+
6777
+ eaw.eastAsianWidth = function(character) {
6778
+ var x = character.charCodeAt(0);
6779
+ var y = (character.length == 2) ? character.charCodeAt(1) : 0;
6780
+ var codePoint = x;
6781
+ if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) {
6782
+ x &= 0x3FF;
6783
+ y &= 0x3FF;
6784
+ codePoint = (x << 10) | y;
6785
+ codePoint += 0x10000;
6786
+ }
6787
+
6788
+ if ((0x3000 == codePoint) ||
6789
+ (0xFF01 <= codePoint && codePoint <= 0xFF60) ||
6790
+ (0xFFE0 <= codePoint && codePoint <= 0xFFE6)) {
6791
+ return 'F';
6792
+ }
6793
+ if ((0x20A9 == codePoint) ||
6794
+ (0xFF61 <= codePoint && codePoint <= 0xFFBE) ||
6795
+ (0xFFC2 <= codePoint && codePoint <= 0xFFC7) ||
6796
+ (0xFFCA <= codePoint && codePoint <= 0xFFCF) ||
6797
+ (0xFFD2 <= codePoint && codePoint <= 0xFFD7) ||
6798
+ (0xFFDA <= codePoint && codePoint <= 0xFFDC) ||
6799
+ (0xFFE8 <= codePoint && codePoint <= 0xFFEE)) {
6800
+ return 'H';
6801
+ }
6802
+ if ((0x1100 <= codePoint && codePoint <= 0x115F) ||
6803
+ (0x11A3 <= codePoint && codePoint <= 0x11A7) ||
6804
+ (0x11FA <= codePoint && codePoint <= 0x11FF) ||
6805
+ (0x2329 <= codePoint && codePoint <= 0x232A) ||
6806
+ (0x2E80 <= codePoint && codePoint <= 0x2E99) ||
6807
+ (0x2E9B <= codePoint && codePoint <= 0x2EF3) ||
6808
+ (0x2F00 <= codePoint && codePoint <= 0x2FD5) ||
6809
+ (0x2FF0 <= codePoint && codePoint <= 0x2FFB) ||
6810
+ (0x3001 <= codePoint && codePoint <= 0x303E) ||
6811
+ (0x3041 <= codePoint && codePoint <= 0x3096) ||
6812
+ (0x3099 <= codePoint && codePoint <= 0x30FF) ||
6813
+ (0x3105 <= codePoint && codePoint <= 0x312D) ||
6814
+ (0x3131 <= codePoint && codePoint <= 0x318E) ||
6815
+ (0x3190 <= codePoint && codePoint <= 0x31BA) ||
6816
+ (0x31C0 <= codePoint && codePoint <= 0x31E3) ||
6817
+ (0x31F0 <= codePoint && codePoint <= 0x321E) ||
6818
+ (0x3220 <= codePoint && codePoint <= 0x3247) ||
6819
+ (0x3250 <= codePoint && codePoint <= 0x32FE) ||
6820
+ (0x3300 <= codePoint && codePoint <= 0x4DBF) ||
6821
+ (0x4E00 <= codePoint && codePoint <= 0xA48C) ||
6822
+ (0xA490 <= codePoint && codePoint <= 0xA4C6) ||
6823
+ (0xA960 <= codePoint && codePoint <= 0xA97C) ||
6824
+ (0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
6825
+ (0xD7B0 <= codePoint && codePoint <= 0xD7C6) ||
6826
+ (0xD7CB <= codePoint && codePoint <= 0xD7FB) ||
6827
+ (0xF900 <= codePoint && codePoint <= 0xFAFF) ||
6828
+ (0xFE10 <= codePoint && codePoint <= 0xFE19) ||
6829
+ (0xFE30 <= codePoint && codePoint <= 0xFE52) ||
6830
+ (0xFE54 <= codePoint && codePoint <= 0xFE66) ||
6831
+ (0xFE68 <= codePoint && codePoint <= 0xFE6B) ||
6832
+ (0x1B000 <= codePoint && codePoint <= 0x1B001) ||
6833
+ (0x1F200 <= codePoint && codePoint <= 0x1F202) ||
6834
+ (0x1F210 <= codePoint && codePoint <= 0x1F23A) ||
6835
+ (0x1F240 <= codePoint && codePoint <= 0x1F248) ||
6836
+ (0x1F250 <= codePoint && codePoint <= 0x1F251) ||
6837
+ (0x20000 <= codePoint && codePoint <= 0x2F73F) ||
6838
+ (0x2B740 <= codePoint && codePoint <= 0x2FFFD) ||
6839
+ (0x30000 <= codePoint && codePoint <= 0x3FFFD)) {
6840
+ return 'W';
6841
+ }
6842
+ if ((0x0020 <= codePoint && codePoint <= 0x007E) ||
6843
+ (0x00A2 <= codePoint && codePoint <= 0x00A3) ||
6844
+ (0x00A5 <= codePoint && codePoint <= 0x00A6) ||
6845
+ (0x00AC == codePoint) ||
6846
+ (0x00AF == codePoint) ||
6847
+ (0x27E6 <= codePoint && codePoint <= 0x27ED) ||
6848
+ (0x2985 <= codePoint && codePoint <= 0x2986)) {
6849
+ return 'Na';
6850
+ }
6851
+ if ((0x00A1 == codePoint) ||
6852
+ (0x00A4 == codePoint) ||
6853
+ (0x00A7 <= codePoint && codePoint <= 0x00A8) ||
6854
+ (0x00AA == codePoint) ||
6855
+ (0x00AD <= codePoint && codePoint <= 0x00AE) ||
6856
+ (0x00B0 <= codePoint && codePoint <= 0x00B4) ||
6857
+ (0x00B6 <= codePoint && codePoint <= 0x00BA) ||
6858
+ (0x00BC <= codePoint && codePoint <= 0x00BF) ||
6859
+ (0x00C6 == codePoint) ||
6860
+ (0x00D0 == codePoint) ||
6861
+ (0x00D7 <= codePoint && codePoint <= 0x00D8) ||
6862
+ (0x00DE <= codePoint && codePoint <= 0x00E1) ||
6863
+ (0x00E6 == codePoint) ||
6864
+ (0x00E8 <= codePoint && codePoint <= 0x00EA) ||
6865
+ (0x00EC <= codePoint && codePoint <= 0x00ED) ||
6866
+ (0x00F0 == codePoint) ||
6867
+ (0x00F2 <= codePoint && codePoint <= 0x00F3) ||
6868
+ (0x00F7 <= codePoint && codePoint <= 0x00FA) ||
6869
+ (0x00FC == codePoint) ||
6870
+ (0x00FE == codePoint) ||
6871
+ (0x0101 == codePoint) ||
6872
+ (0x0111 == codePoint) ||
6873
+ (0x0113 == codePoint) ||
6874
+ (0x011B == codePoint) ||
6875
+ (0x0126 <= codePoint && codePoint <= 0x0127) ||
6876
+ (0x012B == codePoint) ||
6877
+ (0x0131 <= codePoint && codePoint <= 0x0133) ||
6878
+ (0x0138 == codePoint) ||
6879
+ (0x013F <= codePoint && codePoint <= 0x0142) ||
6880
+ (0x0144 == codePoint) ||
6881
+ (0x0148 <= codePoint && codePoint <= 0x014B) ||
6882
+ (0x014D == codePoint) ||
6883
+ (0x0152 <= codePoint && codePoint <= 0x0153) ||
6884
+ (0x0166 <= codePoint && codePoint <= 0x0167) ||
6885
+ (0x016B == codePoint) ||
6886
+ (0x01CE == codePoint) ||
6887
+ (0x01D0 == codePoint) ||
6888
+ (0x01D2 == codePoint) ||
6889
+ (0x01D4 == codePoint) ||
6890
+ (0x01D6 == codePoint) ||
6891
+ (0x01D8 == codePoint) ||
6892
+ (0x01DA == codePoint) ||
6893
+ (0x01DC == codePoint) ||
6894
+ (0x0251 == codePoint) ||
6895
+ (0x0261 == codePoint) ||
6896
+ (0x02C4 == codePoint) ||
6897
+ (0x02C7 == codePoint) ||
6898
+ (0x02C9 <= codePoint && codePoint <= 0x02CB) ||
6899
+ (0x02CD == codePoint) ||
6900
+ (0x02D0 == codePoint) ||
6901
+ (0x02D8 <= codePoint && codePoint <= 0x02DB) ||
6902
+ (0x02DD == codePoint) ||
6903
+ (0x02DF == codePoint) ||
6904
+ (0x0300 <= codePoint && codePoint <= 0x036F) ||
6905
+ (0x0391 <= codePoint && codePoint <= 0x03A1) ||
6906
+ (0x03A3 <= codePoint && codePoint <= 0x03A9) ||
6907
+ (0x03B1 <= codePoint && codePoint <= 0x03C1) ||
6908
+ (0x03C3 <= codePoint && codePoint <= 0x03C9) ||
6909
+ (0x0401 == codePoint) ||
6910
+ (0x0410 <= codePoint && codePoint <= 0x044F) ||
6911
+ (0x0451 == codePoint) ||
6912
+ (0x2010 == codePoint) ||
6913
+ (0x2013 <= codePoint && codePoint <= 0x2016) ||
6914
+ (0x2018 <= codePoint && codePoint <= 0x2019) ||
6915
+ (0x201C <= codePoint && codePoint <= 0x201D) ||
6916
+ (0x2020 <= codePoint && codePoint <= 0x2022) ||
6917
+ (0x2024 <= codePoint && codePoint <= 0x2027) ||
6918
+ (0x2030 == codePoint) ||
6919
+ (0x2032 <= codePoint && codePoint <= 0x2033) ||
6920
+ (0x2035 == codePoint) ||
6921
+ (0x203B == codePoint) ||
6922
+ (0x203E == codePoint) ||
6923
+ (0x2074 == codePoint) ||
6924
+ (0x207F == codePoint) ||
6925
+ (0x2081 <= codePoint && codePoint <= 0x2084) ||
6926
+ (0x20AC == codePoint) ||
6927
+ (0x2103 == codePoint) ||
6928
+ (0x2105 == codePoint) ||
6929
+ (0x2109 == codePoint) ||
6930
+ (0x2113 == codePoint) ||
6931
+ (0x2116 == codePoint) ||
6932
+ (0x2121 <= codePoint && codePoint <= 0x2122) ||
6933
+ (0x2126 == codePoint) ||
6934
+ (0x212B == codePoint) ||
6935
+ (0x2153 <= codePoint && codePoint <= 0x2154) ||
6936
+ (0x215B <= codePoint && codePoint <= 0x215E) ||
6937
+ (0x2160 <= codePoint && codePoint <= 0x216B) ||
6938
+ (0x2170 <= codePoint && codePoint <= 0x2179) ||
6939
+ (0x2189 == codePoint) ||
6940
+ (0x2190 <= codePoint && codePoint <= 0x2199) ||
6941
+ (0x21B8 <= codePoint && codePoint <= 0x21B9) ||
6942
+ (0x21D2 == codePoint) ||
6943
+ (0x21D4 == codePoint) ||
6944
+ (0x21E7 == codePoint) ||
6945
+ (0x2200 == codePoint) ||
6946
+ (0x2202 <= codePoint && codePoint <= 0x2203) ||
6947
+ (0x2207 <= codePoint && codePoint <= 0x2208) ||
6948
+ (0x220B == codePoint) ||
6949
+ (0x220F == codePoint) ||
6950
+ (0x2211 == codePoint) ||
6951
+ (0x2215 == codePoint) ||
6952
+ (0x221A == codePoint) ||
6953
+ (0x221D <= codePoint && codePoint <= 0x2220) ||
6954
+ (0x2223 == codePoint) ||
6955
+ (0x2225 == codePoint) ||
6956
+ (0x2227 <= codePoint && codePoint <= 0x222C) ||
6957
+ (0x222E == codePoint) ||
6958
+ (0x2234 <= codePoint && codePoint <= 0x2237) ||
6959
+ (0x223C <= codePoint && codePoint <= 0x223D) ||
6960
+ (0x2248 == codePoint) ||
6961
+ (0x224C == codePoint) ||
6962
+ (0x2252 == codePoint) ||
6963
+ (0x2260 <= codePoint && codePoint <= 0x2261) ||
6964
+ (0x2264 <= codePoint && codePoint <= 0x2267) ||
6965
+ (0x226A <= codePoint && codePoint <= 0x226B) ||
6966
+ (0x226E <= codePoint && codePoint <= 0x226F) ||
6967
+ (0x2282 <= codePoint && codePoint <= 0x2283) ||
6968
+ (0x2286 <= codePoint && codePoint <= 0x2287) ||
6969
+ (0x2295 == codePoint) ||
6970
+ (0x2299 == codePoint) ||
6971
+ (0x22A5 == codePoint) ||
6972
+ (0x22BF == codePoint) ||
6973
+ (0x2312 == codePoint) ||
6974
+ (0x2460 <= codePoint && codePoint <= 0x24E9) ||
6975
+ (0x24EB <= codePoint && codePoint <= 0x254B) ||
6976
+ (0x2550 <= codePoint && codePoint <= 0x2573) ||
6977
+ (0x2580 <= codePoint && codePoint <= 0x258F) ||
6978
+ (0x2592 <= codePoint && codePoint <= 0x2595) ||
6979
+ (0x25A0 <= codePoint && codePoint <= 0x25A1) ||
6980
+ (0x25A3 <= codePoint && codePoint <= 0x25A9) ||
6981
+ (0x25B2 <= codePoint && codePoint <= 0x25B3) ||
6982
+ (0x25B6 <= codePoint && codePoint <= 0x25B7) ||
6983
+ (0x25BC <= codePoint && codePoint <= 0x25BD) ||
6984
+ (0x25C0 <= codePoint && codePoint <= 0x25C1) ||
6985
+ (0x25C6 <= codePoint && codePoint <= 0x25C8) ||
6986
+ (0x25CB == codePoint) ||
6987
+ (0x25CE <= codePoint && codePoint <= 0x25D1) ||
6988
+ (0x25E2 <= codePoint && codePoint <= 0x25E5) ||
6989
+ (0x25EF == codePoint) ||
6990
+ (0x2605 <= codePoint && codePoint <= 0x2606) ||
6991
+ (0x2609 == codePoint) ||
6992
+ (0x260E <= codePoint && codePoint <= 0x260F) ||
6993
+ (0x2614 <= codePoint && codePoint <= 0x2615) ||
6994
+ (0x261C == codePoint) ||
6995
+ (0x261E == codePoint) ||
6996
+ (0x2640 == codePoint) ||
6997
+ (0x2642 == codePoint) ||
6998
+ (0x2660 <= codePoint && codePoint <= 0x2661) ||
6999
+ (0x2663 <= codePoint && codePoint <= 0x2665) ||
7000
+ (0x2667 <= codePoint && codePoint <= 0x266A) ||
7001
+ (0x266C <= codePoint && codePoint <= 0x266D) ||
7002
+ (0x266F == codePoint) ||
7003
+ (0x269E <= codePoint && codePoint <= 0x269F) ||
7004
+ (0x26BE <= codePoint && codePoint <= 0x26BF) ||
7005
+ (0x26C4 <= codePoint && codePoint <= 0x26CD) ||
7006
+ (0x26CF <= codePoint && codePoint <= 0x26E1) ||
7007
+ (0x26E3 == codePoint) ||
7008
+ (0x26E8 <= codePoint && codePoint <= 0x26FF) ||
7009
+ (0x273D == codePoint) ||
7010
+ (0x2757 == codePoint) ||
7011
+ (0x2776 <= codePoint && codePoint <= 0x277F) ||
7012
+ (0x2B55 <= codePoint && codePoint <= 0x2B59) ||
7013
+ (0x3248 <= codePoint && codePoint <= 0x324F) ||
7014
+ (0xE000 <= codePoint && codePoint <= 0xF8FF) ||
7015
+ (0xFE00 <= codePoint && codePoint <= 0xFE0F) ||
7016
+ (0xFFFD == codePoint) ||
7017
+ (0x1F100 <= codePoint && codePoint <= 0x1F10A) ||
7018
+ (0x1F110 <= codePoint && codePoint <= 0x1F12D) ||
7019
+ (0x1F130 <= codePoint && codePoint <= 0x1F169) ||
7020
+ (0x1F170 <= codePoint && codePoint <= 0x1F19A) ||
7021
+ (0xE0100 <= codePoint && codePoint <= 0xE01EF) ||
7022
+ (0xF0000 <= codePoint && codePoint <= 0xFFFFD) ||
7023
+ (0x100000 <= codePoint && codePoint <= 0x10FFFD)) {
7024
+ return 'A';
7025
+ }
7026
+
7027
+ return 'N';
7028
+ };
7029
+
7030
+ eaw.characterLength = function(character) {
7031
+ var code = this.eastAsianWidth(character);
7032
+ if (code == 'F' || code == 'W' || code == 'A') {
7033
+ return 2;
7034
+ } else {
7035
+ return 1;
7036
+ }
7037
+ };
7038
+
7039
+ // Split a string considering surrogate-pairs.
7040
+ function stringToArray(string) {
7041
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
7042
+ }
7043
+
7044
+ eaw.length = function(string) {
7045
+ var characters = stringToArray(string);
7046
+ var len = 0;
7047
+ for (var i = 0; i < characters.length; i++) {
7048
+ len = len + this.characterLength(characters[i]);
7049
+ }
7050
+ return len;
7051
+ };
7052
+
7053
+ eaw.slice = function(text, start, end) {
7054
+ textLen = eaw.length(text);
7055
+ start = start ? start : 0;
7056
+ end = end ? end : 1;
7057
+ if (start < 0) {
7058
+ start = textLen + start;
7059
+ }
7060
+ if (end < 0) {
7061
+ end = textLen + end;
7062
+ }
7063
+ var result = '';
7064
+ var eawLen = 0;
7065
+ var chars = stringToArray(text);
7066
+ for (var i = 0; i < chars.length; i++) {
7067
+ var char = chars[i];
7068
+ var charLen = eaw.length(char);
7069
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
7070
+ if (eawLen + charLen <= end) {
7071
+ result += char;
7072
+ } else {
7073
+ break;
7074
+ }
7075
+ }
7076
+ eawLen += charLen;
7077
+ }
7078
+ return result;
7079
+ };
7080
+ } (eastasianwidth));
7081
+
7082
+ var eastAsianWidth = eastasianwidth.exports;
7083
+
6747
7084
  var emojiRegex = function () {
6748
7085
  // https://mths.be/emoji
6749
7086
  return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
6750
7087
  };
6751
7088
 
6752
- function stringWidth(string) {
7089
+ function stringWidth(string, options = {}) {
6753
7090
  if (typeof string !== 'string' || string.length === 0) {
6754
7091
  return 0;
6755
7092
  }
6756
7093
 
7094
+ options = {
7095
+ ambiguousIsNarrow: true,
7096
+ ...options
7097
+ };
7098
+
6757
7099
  string = stripAnsi(string);
6758
7100
 
6759
7101
  if (string.length === 0) {
@@ -6762,10 +7104,11 @@ function stringWidth(string) {
6762
7104
 
6763
7105
  string = string.replace(emojiRegex(), ' ');
6764
7106
 
7107
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
6765
7108
  let width = 0;
6766
7109
 
6767
- for (let index = 0; index < string.length; index++) {
6768
- const codePoint = string.codePointAt(index);
7110
+ for (const character of string) {
7111
+ const codePoint = character.codePointAt(0);
6769
7112
 
6770
7113
  // Ignore control characters
6771
7114
  if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {
@@ -6777,12 +7120,18 @@ function stringWidth(string) {
6777
7120
  continue;
6778
7121
  }
6779
7122
 
6780
- // Surrogates
6781
- if (codePoint > 0xFFFF) {
6782
- index++;
7123
+ const code = eastAsianWidth.eastAsianWidth(character);
7124
+ switch (code) {
7125
+ case 'F':
7126
+ case 'W':
7127
+ width += 2;
7128
+ break;
7129
+ case 'A':
7130
+ width += ambiguousCharacterWidth;
7131
+ break;
7132
+ default:
7133
+ width += 1;
6783
7134
  }
6784
-
6785
- width += isFullwidthCodePoint(codePoint) ? 2 : 1;
6786
7135
  }
6787
7136
 
6788
7137
  return width;
@@ -6915,7 +7264,7 @@ function unifiedDiff(actual, expected, options = {}) {
6915
7264
  previousCount++;
6916
7265
  counts[char]++;
6917
7266
  if (previousCount === diffLimit)
6918
- return c$1.dim(`${char} ...`);
7267
+ return picocolors.exports.dim(`${char} ...`);
6919
7268
  else if (previousCount > diffLimit)
6920
7269
  return;
6921
7270
  }
@@ -6928,14 +7277,14 @@ function unifiedDiff(actual, expected, options = {}) {
6928
7277
  if (line[0] === "-") {
6929
7278
  line = formatLine(line.slice(1), outputTruncateLength);
6930
7279
  if (isCompact)
6931
- return c$1.green(line);
6932
- return c$1.green(`- ${formatLine(line, outputTruncateLength)}`);
7280
+ return picocolors.exports.green(line);
7281
+ return picocolors.exports.green(`- ${formatLine(line, outputTruncateLength)}`);
6933
7282
  }
6934
7283
  if (line[0] === "+") {
6935
7284
  line = formatLine(line.slice(1), outputTruncateLength);
6936
7285
  if (isCompact)
6937
- return c$1.red(line);
6938
- return c$1.red(`+ ${formatLine(line, outputTruncateLength)}`);
7286
+ return picocolors.exports.red(line);
7287
+ return picocolors.exports.red(`+ ${formatLine(line, outputTruncateLength)}`);
6939
7288
  }
6940
7289
  if (line.match(/@@/))
6941
7290
  return "--";
@@ -6944,11 +7293,11 @@ function unifiedDiff(actual, expected, options = {}) {
6944
7293
  if (showLegend) {
6945
7294
  if (isCompact) {
6946
7295
  formatted = [
6947
- `${c$1.green("- Expected")} ${formatted[0]}`,
6948
- `${c$1.red("+ Received")} ${formatted[1]}`
7296
+ `${picocolors.exports.green("- Expected")} ${formatted[0]}`,
7297
+ `${picocolors.exports.red("+ Received")} ${formatted[1]}`
6949
7298
  ];
6950
7299
  } else {
6951
- formatted.unshift(c$1.green(`- Expected - ${counts["-"]}`), c$1.red(`+ Received + ${counts["+"]}`), "");
7300
+ formatted.unshift(picocolors.exports.green(`- Expected - ${counts["-"]}`), picocolors.exports.red(`+ Received + ${counts["+"]}`), "");
6952
7301
  }
6953
7302
  }
6954
7303
  return formatted.map((i) => indent + i).join("\n");
@@ -6970,11 +7319,11 @@ var __spreadValues = (a, b) => {
6970
7319
  }
6971
7320
  return a;
6972
7321
  };
6973
- const EXPECTED_COLOR = c$1.green;
6974
- const RECEIVED_COLOR = c$1.red;
6975
- const INVERTED_COLOR = c$1.inverse;
6976
- const BOLD_WEIGHT = c$1.bold;
6977
- const DIM_COLOR = c$1.dim;
7322
+ const EXPECTED_COLOR = picocolors.exports.green;
7323
+ const RECEIVED_COLOR = picocolors.exports.red;
7324
+ const INVERTED_COLOR = picocolors.exports.inverse;
7325
+ const BOLD_WEIGHT = picocolors.exports.bold;
7326
+ const DIM_COLOR = picocolors.exports.dim;
6978
7327
  const {
6979
7328
  AsymmetricMatcher,
6980
7329
  DOMCollection,
@@ -7075,4 +7424,4 @@ var matcherUtils = /*#__PURE__*/Object.freeze({
7075
7424
  diff: diff
7076
7425
  });
7077
7426
 
7078
- export { posToNumber as a, parseStacktrace as b, clearTimeout as c, stringify as d, stripAnsi as e, format_1 as f, getOriginalPos as g, stringWidth as h, ansiStyles as i, sliceAnsi as j, setInterval as k, lineSplitRE as l, matcherUtils as m, numberToPos as n, clearInterval as o, plugins_1 as p, cliTruncate as q, interpretSourcePos as r, setTimeout$1 as s, unifiedDiff as u };
7427
+ export { posToNumber as a, parseStacktrace as b, setTimeout$1 as c, clearTimeout as d, stripAnsi as e, format_1 as f, getOriginalPos as g, stringWidth as h, ansiStyles as i, sliceAnsi as j, setInterval as k, lineSplitRE as l, matcherUtils as m, numberToPos as n, clearInterval as o, plugins_1 as p, cliTruncate as q, interpretSourcePos as r, stringify as s, unifiedDiff as u };