@kitware/vtk.js 25.10.0 → 26.0.0-beta.2
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.
- package/Common/Core/CellArray.d.ts +0 -6
- package/Common/Core/CellArray.js +21 -12
- package/Common/Core/ClassHierarchy.js +11 -6
- package/Common/Core/DataArray.d.ts +20 -0
- package/Common/Core/DataArray.js +21 -4
- package/Proxy/Core/ViewProxy.js +17 -9
- package/Rendering/Core/ColorTransferFunction.d.ts +0 -20
- package/Rendering/Core/ColorTransferFunction.js +0 -63
- package/Rendering/Core/Prop3D.js +1 -6
- package/Rendering/Core/RenderWindow.js +9 -6
- package/Rendering/Core/VolumeProperty.js +2 -3
- package/Rendering/Misc/CanvasView.js +6 -5
- package/Rendering/Misc/GenericRenderWindow.js +12 -7
- package/Rendering/OpenGL/Actor.js +4 -4
- package/Rendering/OpenGL/Actor2D.js +4 -4
- package/Rendering/OpenGL/Camera.js +7 -4
- package/Rendering/OpenGL/CubeAxesActor.js +7 -5
- package/Rendering/OpenGL/ForwardPass.js +1 -1
- package/Rendering/OpenGL/Glyph3DMapper.js +4 -4
- package/Rendering/OpenGL/ImageMapper.js +9 -5
- package/Rendering/OpenGL/ImageSlice.js +3 -3
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +9 -5
- package/Rendering/OpenGL/PolyDataMapper.js +27 -21
- package/Rendering/OpenGL/PolyDataMapper2D.js +17 -10
- package/Rendering/OpenGL/ScalarBarActor.js +6 -4
- package/Rendering/OpenGL/Skybox.js +10 -6
- package/Rendering/OpenGL/Texture.js +6 -5
- package/Rendering/OpenGL/Volume.js +2 -2
- package/Rendering/OpenGL/VolumeMapper.js +11 -11
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/SceneGraph/RenderPass.js +3 -2
- package/Rendering/WebGPU/ForwardPass.js +1 -1
- package/Rendering/WebGPU/HardwareSelectionPass.js +1 -1
- package/Rendering/WebGPU/HardwareSelector.js +14 -13
- package/Rendering/WebGPU/OpaquePass.js +1 -1
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -1
- package/Rendering/WebGPU/VolumePass.js +1 -1
- package/Utilities/config/rules-tests.js +28 -0
- package/Widgets/Core/AbstractWidgetFactory.js +1 -0
- package/Widgets/Core/StateBuilder/color3Mixin.js +22 -0
- package/Widgets/Core/StateBuilder/colorMixin.js +7 -0
- package/Widgets/Core/StateBuilder.js +2 -0
- package/Widgets/Core/WidgetManager.js +21 -256
- package/Widgets/Representations/ArrowHandleRepresentation.js +28 -110
- package/Widgets/Representations/CircleContextRepresentation.js +43 -165
- package/Widgets/Representations/ContextRepresentation.js +0 -3
- package/Widgets/Representations/ConvexFaceContextRepresentation.js +11 -11
- package/Widgets/Representations/CroppingOutlineRepresentation.js +5 -12
- package/Widgets/Representations/CubeHandleRepresentation.js +15 -104
- package/Widgets/Representations/GlyphRepresentation.js +320 -0
- package/Widgets/Representations/HandleRepresentation.js +0 -5
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +68 -49
- package/Widgets/Representations/LineHandleRepresentation.js +116 -0
- package/Widgets/Representations/PolyLineRepresentation.js +52 -49
- package/Widgets/Representations/RectangleContextRepresentation.js +16 -21
- package/Widgets/Representations/SphereContextRepresentation.js +30 -109
- package/Widgets/Representations/SphereHandleRepresentation.js +13 -110
- package/Widgets/Representations/SplineContextRepresentation.js +53 -36
- package/Widgets/Representations/WidgetRepresentation.d.ts +52 -1
- package/Widgets/Representations/WidgetRepresentation.js +140 -78
- package/Widgets/Representations.js +6 -0
- package/Widgets/Widgets3D/AngleWidget.js +1 -4
- package/Widgets/Widgets3D/EllipseWidget/state.js +1 -1
- package/Widgets/Widgets3D/EllipseWidget.js +0 -7
- package/Widgets/Widgets3D/LabelWidget/behavior.js +0 -7
- package/Widgets/Widgets3D/LabelWidget.js +1 -18
- package/Widgets/Widgets3D/LineWidget/behavior.js +0 -44
- package/Widgets/Widgets3D/LineWidget.js +0 -11
- package/Widgets/Widgets3D/PolyLineWidget.js +0 -10
- package/Widgets/Widgets3D/RectangleWidget.js +0 -7
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +15 -3
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +93 -36
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +75 -82
- package/Widgets/Widgets3D/ResliceCursorWidget/state.js +49 -170
- package/Widgets/Widgets3D/ResliceCursorWidget.js +61 -23
- package/Widgets/Widgets3D/ShapeWidget.js +1 -1
- package/index.d.ts +0 -1
- package/macros.d.ts +3 -5
- package/macros.js +4 -35
- package/package.json +3 -2
- package/Widgets/Core/WidgetManager/vdom.js +0 -172
- package/Widgets/Representations/ResliceCursorContextRepresentation/Constants.js +0 -12
- package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +0 -54
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +0 -357
- package/Widgets/SVG/SVGLandmarkRepresentation/Constants.js +0 -28
- package/Widgets/SVG/SVGLandmarkRepresentation.js +0 -179
- package/Widgets/SVG/SVGRepresentation.js +0 -163
- package/_vendor/available-typed-arrays/index.js_commonjs-proxy.js +0 -1
- package/_vendor/call-bind/callBound.js_commonjs-proxy.js +0 -1
- package/_vendor/call-bind/index.js_commonjs-module.js +0 -3
- package/_vendor/call-bind/index.js_commonjs-proxy.js +0 -1
- package/_vendor/deep-equal/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
- package/_vendor/define-properties/index.js_commonjs-proxy.js +0 -1
- package/_vendor/es-abstract/helpers/getOwnPropertyDescriptor.js_commonjs-proxy.js +0 -1
- package/_vendor/es-get-iterator/index.js_commonjs-module.js +0 -3
- package/_vendor/es-get-iterator/index.js_commonjs-proxy.js +0 -1
- package/_vendor/es-get-iterator/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
- package/_vendor/foreach/index.js_commonjs-proxy.js +0 -1
- package/_vendor/function-bind/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/function-bind/index.js_commonjs-proxy.js +0 -1
- package/_vendor/get-intrinsic/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has/src/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-bigints/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-symbols/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-symbols/shams.js_commonjs-proxy.js +0 -1
- package/_vendor/has-tostringtag/shams.js_commonjs-proxy.js +0 -1
- package/_vendor/is-arguments/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-bigint/index.js_commonjs-module.js +0 -3
- package/_vendor/is-bigint/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-boolean-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-date-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-map/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-number-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-regex/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-set/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-string/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-symbol/index.js_commonjs-module.js +0 -3
- package/_vendor/is-symbol/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-typed-array/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-weakmap/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-weakset/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-inspect/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/shim.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/shim.js_commonjs-proxy.js +0 -2
- package/_vendor/regexp.prototype.flags/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/index.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/shim.js_commonjs-proxy.js +0 -1
- package/_vendor/side-channel/index.js_commonjs-proxy.js +0 -1
- package/_vendor/which-boxed-primitive/index.js_commonjs-proxy.js +0 -5
- package/_vendor/which-collection/index.js_commonjs-proxy.js +0 -4
- package/_vendor/which-typed-array/index.js_commonjs-proxy.js +0 -1
- package/_virtual/_node-resolve_empty.js_commonjs-proxy.js +0 -6
- package/_virtual/commonjsHelpers.js +0 -18
- package/_virtual/node-resolve_empty.js +0 -8
- package/_virtual/polyfill-node.global.js +0 -5
- package/_virtual/polyfill-node.process.js +0 -225
- package/vendor/available-typed-arrays/index.js +0 -29
- package/vendor/call-bind/callBound.js +0 -19
- package/vendor/call-bind/index.js +0 -52
- package/vendor/deep-equal/index.js +0 -379
- package/vendor/deep-equal/node_modules/isarray/index.js +0 -7
- package/vendor/define-properties/index.js +0 -60
- package/vendor/es-abstract/helpers/getOwnPropertyDescriptor.js +0 -17
- package/vendor/es-get-iterator/index.js +0 -217
- package/vendor/es-get-iterator/node_modules/isarray/index.js +0 -7
- package/vendor/foreach/index.js +0 -22
- package/vendor/function-bind/implementation.js +0 -52
- package/vendor/function-bind/index.js +0 -7
- package/vendor/get-intrinsic/index.js +0 -334
- package/vendor/has/src/index.js +0 -7
- package/vendor/has-bigints/index.js +0 -12
- package/vendor/has-symbols/index.js +0 -15
- package/vendor/has-symbols/shams.js +0 -42
- package/vendor/has-tostringtag/shams.js +0 -9
- package/vendor/is-arguments/index.js +0 -36
- package/vendor/is-bigint/index.js +0 -39
- package/vendor/is-boolean-object/index.js +0 -29
- package/vendor/is-date-object/index.js +0 -22
- package/vendor/is-map/index.js +0 -42
- package/vendor/is-number-object/index.js +0 -26
- package/vendor/is-regex/index.js +0 -61
- package/vendor/is-set/index.js +0 -42
- package/vendor/is-string/index.js +0 -26
- package/vendor/is-symbol/index.js +0 -36
- package/vendor/is-typed-array/index.js +0 -67
- package/vendor/is-weakmap/index.js +0 -42
- package/vendor/is-weakset/index.js +0 -42
- package/vendor/object-inspect/index.js +0 -515
- package/vendor/object-is/implementation.js +0 -18
- package/vendor/object-is/index.js +0 -25
- package/vendor/object-is/polyfill.js +0 -9
- package/vendor/object-is/shim.js +0 -17
- package/vendor/object-keys/implementation.js +0 -124
- package/vendor/object-keys/index.js +0 -35
- package/vendor/object-keys/isArguments.js +0 -17
- package/vendor/object.assign/implementation.js +0 -46
- package/vendor/object.assign/index.js +0 -29
- package/vendor/object.assign/polyfill.js +0 -57
- package/vendor/object.assign/shim.js +0 -17
- package/vendor/regexp.prototype.flags/implementation.js +0 -30
- package/vendor/regexp.prototype.flags/index.js +0 -25
- package/vendor/regexp.prototype.flags/polyfill.js +0 -23
- package/vendor/regexp.prototype.flags/shim.js +0 -29
- package/vendor/side-channel/index.js +0 -128
- package/vendor/which-boxed-primitive/index.js +0 -38
- package/vendor/which-collection/index.js +0 -29
- package/vendor/which-typed-array/index.js +0 -63
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { g as global } from './polyfill-node.global.js';
|
|
2
|
-
|
|
3
|
-
// shim for using process in browser
|
|
4
|
-
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
5
|
-
|
|
6
|
-
function defaultSetTimout() {
|
|
7
|
-
throw new Error('setTimeout has not been defined');
|
|
8
|
-
}
|
|
9
|
-
function defaultClearTimeout () {
|
|
10
|
-
throw new Error('clearTimeout has not been defined');
|
|
11
|
-
}
|
|
12
|
-
var cachedSetTimeout = defaultSetTimout;
|
|
13
|
-
var cachedClearTimeout = defaultClearTimeout;
|
|
14
|
-
if (typeof global.setTimeout === 'function') {
|
|
15
|
-
cachedSetTimeout = setTimeout;
|
|
16
|
-
}
|
|
17
|
-
if (typeof global.clearTimeout === 'function') {
|
|
18
|
-
cachedClearTimeout = clearTimeout;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function runTimeout(fun) {
|
|
22
|
-
if (cachedSetTimeout === setTimeout) {
|
|
23
|
-
//normal enviroments in sane situations
|
|
24
|
-
return setTimeout(fun, 0);
|
|
25
|
-
}
|
|
26
|
-
// if setTimeout wasn't available but was latter defined
|
|
27
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
28
|
-
cachedSetTimeout = setTimeout;
|
|
29
|
-
return setTimeout(fun, 0);
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
33
|
-
return cachedSetTimeout(fun, 0);
|
|
34
|
-
} catch(e){
|
|
35
|
-
try {
|
|
36
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
37
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
38
|
-
} catch(e){
|
|
39
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
40
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
function runClearTimeout(marker) {
|
|
47
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
48
|
-
//normal enviroments in sane situations
|
|
49
|
-
return clearTimeout(marker);
|
|
50
|
-
}
|
|
51
|
-
// if clearTimeout wasn't available but was latter defined
|
|
52
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
53
|
-
cachedClearTimeout = clearTimeout;
|
|
54
|
-
return clearTimeout(marker);
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
58
|
-
return cachedClearTimeout(marker);
|
|
59
|
-
} catch (e){
|
|
60
|
-
try {
|
|
61
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
62
|
-
return cachedClearTimeout.call(null, marker);
|
|
63
|
-
} catch (e){
|
|
64
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
65
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
66
|
-
return cachedClearTimeout.call(this, marker);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
var queue = [];
|
|
74
|
-
var draining = false;
|
|
75
|
-
var currentQueue;
|
|
76
|
-
var queueIndex = -1;
|
|
77
|
-
|
|
78
|
-
function cleanUpNextTick() {
|
|
79
|
-
if (!draining || !currentQueue) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
draining = false;
|
|
83
|
-
if (currentQueue.length) {
|
|
84
|
-
queue = currentQueue.concat(queue);
|
|
85
|
-
} else {
|
|
86
|
-
queueIndex = -1;
|
|
87
|
-
}
|
|
88
|
-
if (queue.length) {
|
|
89
|
-
drainQueue();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function drainQueue() {
|
|
94
|
-
if (draining) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
98
|
-
draining = true;
|
|
99
|
-
|
|
100
|
-
var len = queue.length;
|
|
101
|
-
while(len) {
|
|
102
|
-
currentQueue = queue;
|
|
103
|
-
queue = [];
|
|
104
|
-
while (++queueIndex < len) {
|
|
105
|
-
if (currentQueue) {
|
|
106
|
-
currentQueue[queueIndex].run();
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
queueIndex = -1;
|
|
110
|
-
len = queue.length;
|
|
111
|
-
}
|
|
112
|
-
currentQueue = null;
|
|
113
|
-
draining = false;
|
|
114
|
-
runClearTimeout(timeout);
|
|
115
|
-
}
|
|
116
|
-
function nextTick(fun) {
|
|
117
|
-
var args = new Array(arguments.length - 1);
|
|
118
|
-
if (arguments.length > 1) {
|
|
119
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
120
|
-
args[i - 1] = arguments[i];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
queue.push(new Item(fun, args));
|
|
124
|
-
if (queue.length === 1 && !draining) {
|
|
125
|
-
runTimeout(drainQueue);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
// v8 likes predictible objects
|
|
129
|
-
function Item(fun, array) {
|
|
130
|
-
this.fun = fun;
|
|
131
|
-
this.array = array;
|
|
132
|
-
}
|
|
133
|
-
Item.prototype.run = function () {
|
|
134
|
-
this.fun.apply(null, this.array);
|
|
135
|
-
};
|
|
136
|
-
var title = 'browser';
|
|
137
|
-
var platform = 'browser';
|
|
138
|
-
var browser = true;
|
|
139
|
-
var env = {};
|
|
140
|
-
var argv = [];
|
|
141
|
-
var version = ''; // empty string to avoid regexp issues
|
|
142
|
-
var versions = {};
|
|
143
|
-
var release = {};
|
|
144
|
-
var config = {};
|
|
145
|
-
|
|
146
|
-
function noop() {}
|
|
147
|
-
|
|
148
|
-
var on = noop;
|
|
149
|
-
var addListener = noop;
|
|
150
|
-
var once = noop;
|
|
151
|
-
var off = noop;
|
|
152
|
-
var removeListener = noop;
|
|
153
|
-
var removeAllListeners = noop;
|
|
154
|
-
var emit = noop;
|
|
155
|
-
|
|
156
|
-
function binding(name) {
|
|
157
|
-
throw new Error('process.binding is not supported');
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function cwd () { return '/' }
|
|
161
|
-
function chdir (dir) {
|
|
162
|
-
throw new Error('process.chdir is not supported');
|
|
163
|
-
}function umask() { return 0; }
|
|
164
|
-
|
|
165
|
-
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
|
166
|
-
var performance = global.performance || {};
|
|
167
|
-
var performanceNow =
|
|
168
|
-
performance.now ||
|
|
169
|
-
performance.mozNow ||
|
|
170
|
-
performance.msNow ||
|
|
171
|
-
performance.oNow ||
|
|
172
|
-
performance.webkitNow ||
|
|
173
|
-
function(){ return (new Date()).getTime() };
|
|
174
|
-
|
|
175
|
-
// generate timestamp or delta
|
|
176
|
-
// see http://nodejs.org/api/process.html#process_process_hrtime
|
|
177
|
-
function hrtime(previousTimestamp){
|
|
178
|
-
var clocktime = performanceNow.call(performance)*1e-3;
|
|
179
|
-
var seconds = Math.floor(clocktime);
|
|
180
|
-
var nanoseconds = Math.floor((clocktime%1)*1e9);
|
|
181
|
-
if (previousTimestamp) {
|
|
182
|
-
seconds = seconds - previousTimestamp[0];
|
|
183
|
-
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
184
|
-
if (nanoseconds<0) {
|
|
185
|
-
seconds--;
|
|
186
|
-
nanoseconds += 1e9;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return [seconds,nanoseconds]
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
var startTime = new Date();
|
|
193
|
-
function uptime() {
|
|
194
|
-
var currentTime = new Date();
|
|
195
|
-
var dif = currentTime - startTime;
|
|
196
|
-
return dif / 1000;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
var browser$1 = {
|
|
200
|
-
nextTick: nextTick,
|
|
201
|
-
title: title,
|
|
202
|
-
browser: browser,
|
|
203
|
-
env: env,
|
|
204
|
-
argv: argv,
|
|
205
|
-
version: version,
|
|
206
|
-
versions: versions,
|
|
207
|
-
on: on,
|
|
208
|
-
addListener: addListener,
|
|
209
|
-
once: once,
|
|
210
|
-
off: off,
|
|
211
|
-
removeListener: removeListener,
|
|
212
|
-
removeAllListeners: removeAllListeners,
|
|
213
|
-
emit: emit,
|
|
214
|
-
binding: binding,
|
|
215
|
-
cwd: cwd,
|
|
216
|
-
chdir: chdir,
|
|
217
|
-
umask: umask,
|
|
218
|
-
hrtime: hrtime,
|
|
219
|
-
platform: platform,
|
|
220
|
-
release: release,
|
|
221
|
-
config: config,
|
|
222
|
-
uptime: uptime
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
export { browser$1 as b };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { c as commonjsGlobal } from '../../_virtual/commonjsHelpers.js';
|
|
2
|
-
|
|
3
|
-
var possibleNames = [
|
|
4
|
-
'BigInt64Array',
|
|
5
|
-
'BigUint64Array',
|
|
6
|
-
'Float32Array',
|
|
7
|
-
'Float64Array',
|
|
8
|
-
'Int16Array',
|
|
9
|
-
'Int32Array',
|
|
10
|
-
'Int8Array',
|
|
11
|
-
'Uint16Array',
|
|
12
|
-
'Uint32Array',
|
|
13
|
-
'Uint8Array',
|
|
14
|
-
'Uint8ClampedArray'
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
18
|
-
|
|
19
|
-
var availableTypedArrays = function availableTypedArrays() {
|
|
20
|
-
var out = [];
|
|
21
|
-
for (var i = 0; i < possibleNames.length; i++) {
|
|
22
|
-
if (typeof g[possibleNames[i]] === 'function') {
|
|
23
|
-
out[out.length] = possibleNames[i];
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return out;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { availableTypedArrays as a };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
2
|
-
import './index.js';
|
|
3
|
-
import { c as callBind$1 } from '../../_vendor/call-bind/index.js_commonjs-module.js';
|
|
4
|
-
|
|
5
|
-
var GetIntrinsic = getIntrinsic;
|
|
6
|
-
|
|
7
|
-
var callBind = callBind$1.exports;
|
|
8
|
-
|
|
9
|
-
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
10
|
-
|
|
11
|
-
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
12
|
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
13
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
14
|
-
return callBind(intrinsic);
|
|
15
|
-
}
|
|
16
|
-
return intrinsic;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { callBound as c };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { c as callBind } from '../../_vendor/call-bind/index.js_commonjs-module.js';
|
|
2
|
-
import { f as functionBind } from '../function-bind/index.js';
|
|
3
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
4
|
-
|
|
5
|
-
(function (module) {
|
|
6
|
-
|
|
7
|
-
var bind = functionBind;
|
|
8
|
-
var GetIntrinsic = getIntrinsic;
|
|
9
|
-
|
|
10
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
11
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
12
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
13
|
-
|
|
14
|
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
15
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
16
|
-
var $max = GetIntrinsic('%Math.max%');
|
|
17
|
-
|
|
18
|
-
if ($defineProperty) {
|
|
19
|
-
try {
|
|
20
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
21
|
-
} catch (e) {
|
|
22
|
-
// IE 8 has a broken defineProperty
|
|
23
|
-
$defineProperty = null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
module.exports = function callBind(originalFunction) {
|
|
28
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
29
|
-
if ($gOPD && $defineProperty) {
|
|
30
|
-
var desc = $gOPD(func, 'length');
|
|
31
|
-
if (desc.configurable) {
|
|
32
|
-
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
33
|
-
$defineProperty(
|
|
34
|
-
func,
|
|
35
|
-
'length',
|
|
36
|
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return func;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
var applyBind = function applyBind() {
|
|
44
|
-
return $reflectApply(bind, $apply, arguments);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
if ($defineProperty) {
|
|
48
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
49
|
-
} else {
|
|
50
|
-
module.exports.apply = applyBind;
|
|
51
|
-
}
|
|
52
|
-
}(callBind));
|
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import { o as objectKeys$1 } from '../object-keys/index.js';
|
|
2
|
-
import { i as isArguments$1 } from '../is-arguments/index.js';
|
|
3
|
-
import { o as objectIs } from '../object-is/index.js';
|
|
4
|
-
import { i as isRegex$1 } from '../is-regex/index.js';
|
|
5
|
-
import { r as regexp_prototype_flags } from '../regexp.prototype.flags/index.js';
|
|
6
|
-
import { i as isarray } from './node_modules/isarray/index.js';
|
|
7
|
-
import { i as isDateObject } from '../is-date-object/index.js';
|
|
8
|
-
import { w as whichBoxedPrimitive$1 } from '../which-boxed-primitive/index.js';
|
|
9
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
10
|
-
import { c as callBound$1 } from '../call-bind/callBound.js';
|
|
11
|
-
import { w as whichCollection$1 } from '../which-collection/index.js';
|
|
12
|
-
import '../es-get-iterator/index.js';
|
|
13
|
-
import { s as sideChannel } from '../side-channel/index.js';
|
|
14
|
-
import { w as whichTypedArray$1 } from '../which-typed-array/index.js';
|
|
15
|
-
import { o as object_assign } from '../object.assign/index.js';
|
|
16
|
-
import { e as esGetIterator } from '../../_vendor/es-get-iterator/index.js_commonjs-module.js';
|
|
17
|
-
|
|
18
|
-
var objectKeys = objectKeys$1;
|
|
19
|
-
var isArguments = isArguments$1;
|
|
20
|
-
var is = objectIs;
|
|
21
|
-
var isRegex = isRegex$1;
|
|
22
|
-
var flags = regexp_prototype_flags;
|
|
23
|
-
var isArray = isarray;
|
|
24
|
-
var isDate = isDateObject;
|
|
25
|
-
var whichBoxedPrimitive = whichBoxedPrimitive$1;
|
|
26
|
-
var GetIntrinsic = getIntrinsic;
|
|
27
|
-
var callBound = callBound$1;
|
|
28
|
-
var whichCollection = whichCollection$1;
|
|
29
|
-
var getIterator = esGetIterator.exports;
|
|
30
|
-
var getSideChannel = sideChannel;
|
|
31
|
-
var whichTypedArray = whichTypedArray$1;
|
|
32
|
-
var assign = object_assign;
|
|
33
|
-
|
|
34
|
-
var $getTime = callBound('Date.prototype.getTime');
|
|
35
|
-
var gPO = Object.getPrototypeOf;
|
|
36
|
-
var $objToString = callBound('Object.prototype.toString');
|
|
37
|
-
|
|
38
|
-
var $Set = GetIntrinsic('%Set%', true);
|
|
39
|
-
var $mapHas = callBound('Map.prototype.has', true);
|
|
40
|
-
var $mapGet = callBound('Map.prototype.get', true);
|
|
41
|
-
var $mapSize = callBound('Map.prototype.size', true);
|
|
42
|
-
var $setAdd = callBound('Set.prototype.add', true);
|
|
43
|
-
var $setDelete = callBound('Set.prototype.delete', true);
|
|
44
|
-
var $setHas = callBound('Set.prototype.has', true);
|
|
45
|
-
var $setSize = callBound('Set.prototype.size', true);
|
|
46
|
-
|
|
47
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
|
|
48
|
-
function setHasEqualElement(set, val1, opts, channel) {
|
|
49
|
-
var i = getIterator(set);
|
|
50
|
-
var result;
|
|
51
|
-
while ((result = i.next()) && !result.done) {
|
|
52
|
-
if (internalDeepEqual(val1, result.value, opts, channel)) { // eslint-disable-line no-use-before-define
|
|
53
|
-
// Remove the matching element to make sure we do not check that again.
|
|
54
|
-
$setDelete(set, result.value);
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
|
|
63
|
-
function findLooseMatchingPrimitives(prim) {
|
|
64
|
-
if (typeof prim === 'undefined') {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
if (typeof prim === 'object') { // Only pass in null as object!
|
|
68
|
-
return void 0;
|
|
69
|
-
}
|
|
70
|
-
if (typeof prim === 'symbol') {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
if (typeof prim === 'string' || typeof prim === 'number') {
|
|
74
|
-
// Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
|
|
75
|
-
return +prim === +prim; // eslint-disable-line no-implicit-coercion
|
|
76
|
-
}
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
|
|
81
|
-
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
|
|
82
|
-
var altValue = findLooseMatchingPrimitives(prim);
|
|
83
|
-
if (altValue != null) {
|
|
84
|
-
return altValue;
|
|
85
|
-
}
|
|
86
|
-
var curB = $mapGet(b, altValue);
|
|
87
|
-
var looseOpts = assign({}, opts, { strict: false });
|
|
88
|
-
if (
|
|
89
|
-
(typeof curB === 'undefined' && !$mapHas(b, altValue))
|
|
90
|
-
// eslint-disable-next-line no-use-before-define
|
|
91
|
-
|| !internalDeepEqual(item, curB, looseOpts, channel)
|
|
92
|
-
) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
// eslint-disable-next-line no-use-before-define
|
|
96
|
-
return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
|
|
100
|
-
function setMightHaveLoosePrim(a, b, prim) {
|
|
101
|
-
var altValue = findLooseMatchingPrimitives(prim);
|
|
102
|
-
if (altValue != null) {
|
|
103
|
-
return altValue;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return $setHas(b, altValue) && !$setHas(a, altValue);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
|
|
110
|
-
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
|
|
111
|
-
var i = getIterator(set);
|
|
112
|
-
var result;
|
|
113
|
-
var key2;
|
|
114
|
-
while ((result = i.next()) && !result.done) {
|
|
115
|
-
key2 = result.value;
|
|
116
|
-
if (
|
|
117
|
-
// eslint-disable-next-line no-use-before-define
|
|
118
|
-
internalDeepEqual(key1, key2, opts, channel)
|
|
119
|
-
// eslint-disable-next-line no-use-before-define
|
|
120
|
-
&& internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
|
|
121
|
-
) {
|
|
122
|
-
$setDelete(set, key2);
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function internalDeepEqual(actual, expected, options, channel) {
|
|
131
|
-
var opts = options || {};
|
|
132
|
-
|
|
133
|
-
// 7.1. All identical values are equivalent, as determined by ===.
|
|
134
|
-
if (opts.strict ? is(actual, expected) : actual === expected) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
var actualBoxed = whichBoxedPrimitive(actual);
|
|
139
|
-
var expectedBoxed = whichBoxedPrimitive(expected);
|
|
140
|
-
if (actualBoxed !== expectedBoxed) {
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
|
|
145
|
-
if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
|
|
146
|
-
return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/*
|
|
150
|
-
* 7.4. For all other Object pairs, including Array objects, equivalence is
|
|
151
|
-
* determined by having the same number of owned properties (as verified
|
|
152
|
-
* with Object.prototype.hasOwnProperty.call), the same set of keys
|
|
153
|
-
* (although not necessarily the same order), equivalent values for every
|
|
154
|
-
* corresponding key, and an identical 'prototype' property. Note: this
|
|
155
|
-
* accounts for both named and indexed properties on Arrays.
|
|
156
|
-
*/
|
|
157
|
-
// see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration
|
|
158
|
-
|
|
159
|
-
var hasActual = channel.has(actual);
|
|
160
|
-
var hasExpected = channel.has(expected);
|
|
161
|
-
var sentinel;
|
|
162
|
-
if (hasActual && hasExpected) {
|
|
163
|
-
if (channel.get(actual) === channel.get(expected)) {
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
} else {
|
|
167
|
-
sentinel = {};
|
|
168
|
-
}
|
|
169
|
-
if (!hasActual) { channel.set(actual, sentinel); }
|
|
170
|
-
if (!hasExpected) { channel.set(expected, sentinel); }
|
|
171
|
-
|
|
172
|
-
// eslint-disable-next-line no-use-before-define
|
|
173
|
-
return objEquiv(actual, expected, opts, channel);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function isBuffer(x) {
|
|
177
|
-
if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
if (x.length > 0 && typeof x[0] !== 'number') {
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function setEquiv(a, b, opts, channel) {
|
|
191
|
-
if ($setSize(a) !== $setSize(b)) {
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
var iA = getIterator(a);
|
|
195
|
-
var iB = getIterator(b);
|
|
196
|
-
var resultA;
|
|
197
|
-
var resultB;
|
|
198
|
-
var set;
|
|
199
|
-
while ((resultA = iA.next()) && !resultA.done) {
|
|
200
|
-
if (resultA.value && typeof resultA.value === 'object') {
|
|
201
|
-
if (!set) { set = new $Set(); }
|
|
202
|
-
$setAdd(set, resultA.value);
|
|
203
|
-
} else if (!$setHas(b, resultA.value)) {
|
|
204
|
-
if (opts.strict) { return false; }
|
|
205
|
-
if (!setMightHaveLoosePrim(a, b, resultA.value)) {
|
|
206
|
-
return false;
|
|
207
|
-
}
|
|
208
|
-
if (!set) { set = new $Set(); }
|
|
209
|
-
$setAdd(set, resultA.value);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (set) {
|
|
213
|
-
while ((resultB = iB.next()) && !resultB.done) {
|
|
214
|
-
// We have to check if a primitive value is already matching and only if it's not, go hunting for it.
|
|
215
|
-
if (resultB.value && typeof resultB.value === 'object') {
|
|
216
|
-
if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
} else if (
|
|
220
|
-
!opts.strict
|
|
221
|
-
&& !$setHas(a, resultB.value)
|
|
222
|
-
&& !setHasEqualElement(set, resultB.value, opts.strict, channel)
|
|
223
|
-
) {
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return $setSize(set) === 0;
|
|
228
|
-
}
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
function mapEquiv(a, b, opts, channel) {
|
|
233
|
-
if ($mapSize(a) !== $mapSize(b)) {
|
|
234
|
-
return false;
|
|
235
|
-
}
|
|
236
|
-
var iA = getIterator(a);
|
|
237
|
-
var iB = getIterator(b);
|
|
238
|
-
var resultA;
|
|
239
|
-
var resultB;
|
|
240
|
-
var set;
|
|
241
|
-
var key;
|
|
242
|
-
var item1;
|
|
243
|
-
var item2;
|
|
244
|
-
while ((resultA = iA.next()) && !resultA.done) {
|
|
245
|
-
key = resultA.value[0];
|
|
246
|
-
item1 = resultA.value[1];
|
|
247
|
-
if (key && typeof key === 'object') {
|
|
248
|
-
if (!set) { set = new $Set(); }
|
|
249
|
-
$setAdd(set, key);
|
|
250
|
-
} else {
|
|
251
|
-
item2 = $mapGet(b, key);
|
|
252
|
-
if ((typeof item2 === 'undefined' && !$mapHas(b, key)) || !internalDeepEqual(item1, item2, opts, channel)) {
|
|
253
|
-
if (opts.strict) {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
if (!set) { set = new $Set(); }
|
|
260
|
-
$setAdd(set, key);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (set) {
|
|
266
|
-
while ((resultB = iB.next()) && !resultB.done) {
|
|
267
|
-
key = resultB.value[0];
|
|
268
|
-
item2 = resultB.value[1];
|
|
269
|
-
if (key && typeof key === 'object') {
|
|
270
|
-
if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
|
|
271
|
-
return false;
|
|
272
|
-
}
|
|
273
|
-
} else if (
|
|
274
|
-
!opts.strict
|
|
275
|
-
&& (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel))
|
|
276
|
-
&& !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)
|
|
277
|
-
) {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return $setSize(set) === 0;
|
|
282
|
-
}
|
|
283
|
-
return true;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function objEquiv(a, b, opts, channel) {
|
|
287
|
-
/* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
|
|
288
|
-
var i, key;
|
|
289
|
-
|
|
290
|
-
if (typeof a !== typeof b) { return false; }
|
|
291
|
-
if (a == null || b == null) { return false; }
|
|
292
|
-
|
|
293
|
-
if ($objToString(a) !== $objToString(b)) { return false; }
|
|
294
|
-
|
|
295
|
-
if (isArguments(a) !== isArguments(b)) { return false; }
|
|
296
|
-
|
|
297
|
-
var aIsArray = isArray(a);
|
|
298
|
-
var bIsArray = isArray(b);
|
|
299
|
-
if (aIsArray !== bIsArray) { return false; }
|
|
300
|
-
|
|
301
|
-
// TODO: replace when a cross-realm brand check is available
|
|
302
|
-
var aIsError = a instanceof Error;
|
|
303
|
-
var bIsError = b instanceof Error;
|
|
304
|
-
if (aIsError !== bIsError) { return false; }
|
|
305
|
-
if (aIsError || bIsError) {
|
|
306
|
-
if (a.name !== b.name || a.message !== b.message) { return false; }
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
var aIsRegex = isRegex(a);
|
|
310
|
-
var bIsRegex = isRegex(b);
|
|
311
|
-
if (aIsRegex !== bIsRegex) { return false; }
|
|
312
|
-
if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
var aIsDate = isDate(a);
|
|
317
|
-
var bIsDate = isDate(b);
|
|
318
|
-
if (aIsDate !== bIsDate) { return false; }
|
|
319
|
-
if (aIsDate || bIsDate) { // && would work too, because both are true or both false here
|
|
320
|
-
if ($getTime(a) !== $getTime(b)) { return false; }
|
|
321
|
-
}
|
|
322
|
-
if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }
|
|
323
|
-
|
|
324
|
-
if (whichTypedArray(a) !== whichTypedArray(b)) {
|
|
325
|
-
return false;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
var aIsBuffer = isBuffer(a);
|
|
329
|
-
var bIsBuffer = isBuffer(b);
|
|
330
|
-
if (aIsBuffer !== bIsBuffer) { return false; }
|
|
331
|
-
if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
|
|
332
|
-
if (a.length !== b.length) { return false; }
|
|
333
|
-
for (i = 0; i < a.length; i++) {
|
|
334
|
-
if (a[i] !== b[i]) { return false; }
|
|
335
|
-
}
|
|
336
|
-
return true;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
if (typeof a !== typeof b) { return false; }
|
|
340
|
-
|
|
341
|
-
var ka = objectKeys(a);
|
|
342
|
-
var kb = objectKeys(b);
|
|
343
|
-
// having the same number of owned properties (keys incorporates hasOwnProperty)
|
|
344
|
-
if (ka.length !== kb.length) { return false; }
|
|
345
|
-
|
|
346
|
-
// the same set of keys (although not necessarily the same order),
|
|
347
|
-
ka.sort();
|
|
348
|
-
kb.sort();
|
|
349
|
-
// ~~~cheap key test
|
|
350
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
351
|
-
if (ka[i] != kb[i]) { return false; } // eslint-disable-line eqeqeq
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// equivalent values for every corresponding key, and ~~~possibly expensive deep test
|
|
355
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
356
|
-
key = ka[i];
|
|
357
|
-
if (!internalDeepEqual(a[key], b[key], opts, channel)) { return false; }
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
var aCollection = whichCollection(a);
|
|
361
|
-
var bCollection = whichCollection(b);
|
|
362
|
-
if (aCollection !== bCollection) {
|
|
363
|
-
return false;
|
|
364
|
-
}
|
|
365
|
-
if (aCollection === 'Set' || bCollection === 'Set') { // aCollection === bCollection
|
|
366
|
-
return setEquiv(a, b, opts, channel);
|
|
367
|
-
}
|
|
368
|
-
if (aCollection === 'Map') { // aCollection === bCollection
|
|
369
|
-
return mapEquiv(a, b, opts, channel);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
return true;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
var deepEqual = function deepEqual(a, b, opts) {
|
|
376
|
-
return internalDeepEqual(a, b, opts, getSideChannel());
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
export { deepEqual as d };
|