@kitware/vtk.js 25.9.1 → 26.0.0-beta.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 (183) hide show
  1. package/Common/Core/CellArray.d.ts +0 -6
  2. package/Common/Core/CellArray.js +21 -12
  3. package/Common/Core/ClassHierarchy.js +11 -6
  4. package/Common/Core/DataArray.d.ts +20 -0
  5. package/Common/Core/DataArray.js +21 -4
  6. package/Proxy/Core/ViewProxy.js +17 -9
  7. package/Rendering/Core/Prop3D.js +1 -6
  8. package/Rendering/Core/RenderWindow.js +9 -6
  9. package/Rendering/Core/VolumeProperty.js +2 -3
  10. package/Rendering/Misc/CanvasView.js +6 -5
  11. package/Rendering/Misc/GenericRenderWindow.js +12 -7
  12. package/Rendering/OpenGL/Actor.js +4 -4
  13. package/Rendering/OpenGL/Actor2D.js +4 -4
  14. package/Rendering/OpenGL/Camera.js +7 -4
  15. package/Rendering/OpenGL/CubeAxesActor.js +7 -5
  16. package/Rendering/OpenGL/ForwardPass.js +1 -1
  17. package/Rendering/OpenGL/Glyph3DMapper.js +4 -4
  18. package/Rendering/OpenGL/ImageMapper.js +9 -5
  19. package/Rendering/OpenGL/ImageSlice.js +3 -3
  20. package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +9 -5
  21. package/Rendering/OpenGL/PolyDataMapper.js +22 -14
  22. package/Rendering/OpenGL/PolyDataMapper2D.js +17 -10
  23. package/Rendering/OpenGL/ScalarBarActor.js +6 -4
  24. package/Rendering/OpenGL/Skybox.js +10 -6
  25. package/Rendering/OpenGL/Texture.js +6 -5
  26. package/Rendering/OpenGL/Volume.js +2 -2
  27. package/Rendering/OpenGL/VolumeMapper.js +11 -11
  28. package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
  29. package/Rendering/SceneGraph/RenderPass.js +3 -2
  30. package/Rendering/WebGPU/ForwardPass.js +1 -1
  31. package/Rendering/WebGPU/HardwareSelectionPass.js +1 -1
  32. package/Rendering/WebGPU/HardwareSelector.js +14 -13
  33. package/Rendering/WebGPU/OpaquePass.js +1 -1
  34. package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -1
  35. package/Rendering/WebGPU/VolumePass.js +1 -1
  36. package/Utilities/config/rules-tests.js +28 -0
  37. package/Widgets/Core/AbstractWidgetFactory.js +1 -0
  38. package/Widgets/Core/StateBuilder/color3Mixin.js +22 -0
  39. package/Widgets/Core/StateBuilder/colorMixin.js +7 -0
  40. package/Widgets/Core/StateBuilder.js +2 -0
  41. package/Widgets/Representations/ArrowHandleRepresentation.js +28 -110
  42. package/Widgets/Representations/CircleContextRepresentation.js +43 -165
  43. package/Widgets/Representations/ContextRepresentation.js +0 -3
  44. package/Widgets/Representations/ConvexFaceContextRepresentation.js +11 -11
  45. package/Widgets/Representations/CroppingOutlineRepresentation.js +5 -12
  46. package/Widgets/Representations/CubeHandleRepresentation.js +15 -104
  47. package/Widgets/Representations/GlyphRepresentation.js +320 -0
  48. package/Widgets/Representations/HandleRepresentation.js +0 -5
  49. package/Widgets/Representations/ImplicitPlaneRepresentation.js +68 -49
  50. package/Widgets/Representations/LineHandleRepresentation.js +116 -0
  51. package/Widgets/Representations/PolyLineRepresentation.js +52 -49
  52. package/Widgets/Representations/RectangleContextRepresentation.js +16 -21
  53. package/Widgets/Representations/SphereContextRepresentation.js +30 -109
  54. package/Widgets/Representations/SphereHandleRepresentation.js +13 -110
  55. package/Widgets/Representations/SplineContextRepresentation.js +53 -36
  56. package/Widgets/Representations/WidgetRepresentation.d.ts +52 -1
  57. package/Widgets/Representations/WidgetRepresentation.js +140 -78
  58. package/Widgets/Representations.js +6 -0
  59. package/Widgets/SVG/SVGLandmarkRepresentation.js +1 -13
  60. package/Widgets/Widgets3D/AngleWidget.js +1 -4
  61. package/Widgets/Widgets3D/EllipseWidget/state.js +1 -1
  62. package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +15 -3
  63. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +93 -36
  64. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +75 -82
  65. package/Widgets/Widgets3D/ResliceCursorWidget/state.js +49 -170
  66. package/Widgets/Widgets3D/ResliceCursorWidget.js +61 -23
  67. package/index.d.ts +0 -1
  68. package/macros.d.ts +3 -5
  69. package/macros.js +4 -35
  70. package/package.json +2 -2
  71. package/Widgets/Representations/ResliceCursorContextRepresentation/Constants.js +0 -12
  72. package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +0 -54
  73. package/Widgets/Representations/ResliceCursorContextRepresentation.js +0 -357
  74. package/_vendor/available-typed-arrays/index.js_commonjs-proxy.js +0 -1
  75. package/_vendor/call-bind/callBound.js_commonjs-proxy.js +0 -1
  76. package/_vendor/call-bind/index.js_commonjs-module.js +0 -3
  77. package/_vendor/call-bind/index.js_commonjs-proxy.js +0 -1
  78. package/_vendor/deep-equal/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
  79. package/_vendor/define-properties/index.js_commonjs-proxy.js +0 -1
  80. package/_vendor/es-abstract/helpers/getOwnPropertyDescriptor.js_commonjs-proxy.js +0 -1
  81. package/_vendor/es-get-iterator/index.js_commonjs-module.js +0 -3
  82. package/_vendor/es-get-iterator/index.js_commonjs-proxy.js +0 -1
  83. package/_vendor/es-get-iterator/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
  84. package/_vendor/foreach/index.js_commonjs-proxy.js +0 -1
  85. package/_vendor/function-bind/implementation.js_commonjs-proxy.js +0 -1
  86. package/_vendor/function-bind/index.js_commonjs-proxy.js +0 -1
  87. package/_vendor/get-intrinsic/index.js_commonjs-proxy.js +0 -1
  88. package/_vendor/has/src/index.js_commonjs-proxy.js +0 -1
  89. package/_vendor/has-bigints/index.js_commonjs-proxy.js +0 -1
  90. package/_vendor/has-symbols/index.js_commonjs-proxy.js +0 -1
  91. package/_vendor/has-symbols/shams.js_commonjs-proxy.js +0 -1
  92. package/_vendor/has-tostringtag/shams.js_commonjs-proxy.js +0 -1
  93. package/_vendor/is-arguments/index.js_commonjs-proxy.js +0 -1
  94. package/_vendor/is-bigint/index.js_commonjs-module.js +0 -3
  95. package/_vendor/is-bigint/index.js_commonjs-proxy.js +0 -1
  96. package/_vendor/is-boolean-object/index.js_commonjs-proxy.js +0 -1
  97. package/_vendor/is-date-object/index.js_commonjs-proxy.js +0 -1
  98. package/_vendor/is-map/index.js_commonjs-proxy.js +0 -1
  99. package/_vendor/is-number-object/index.js_commonjs-proxy.js +0 -1
  100. package/_vendor/is-regex/index.js_commonjs-proxy.js +0 -1
  101. package/_vendor/is-set/index.js_commonjs-proxy.js +0 -1
  102. package/_vendor/is-string/index.js_commonjs-proxy.js +0 -1
  103. package/_vendor/is-symbol/index.js_commonjs-module.js +0 -3
  104. package/_vendor/is-symbol/index.js_commonjs-proxy.js +0 -1
  105. package/_vendor/is-typed-array/index.js_commonjs-proxy.js +0 -1
  106. package/_vendor/is-weakmap/index.js_commonjs-proxy.js +0 -1
  107. package/_vendor/is-weakset/index.js_commonjs-proxy.js +0 -1
  108. package/_vendor/object-inspect/index.js_commonjs-proxy.js +0 -1
  109. package/_vendor/object-is/implementation.js_commonjs-proxy.js +0 -1
  110. package/_vendor/object-is/index.js_commonjs-proxy.js +0 -1
  111. package/_vendor/object-is/polyfill.js_commonjs-proxy.js +0 -1
  112. package/_vendor/object-is/shim.js_commonjs-proxy.js +0 -1
  113. package/_vendor/object-keys/implementation.js_commonjs-proxy.js +0 -1
  114. package/_vendor/object-keys/index.js_commonjs-proxy.js +0 -1
  115. package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +0 -1
  116. package/_vendor/object.assign/implementation.js_commonjs-proxy.js +0 -1
  117. package/_vendor/object.assign/index.js_commonjs-proxy.js +0 -1
  118. package/_vendor/object.assign/polyfill.js_commonjs-proxy.js +0 -1
  119. package/_vendor/object.assign/shim.js_commonjs-proxy.js +0 -2
  120. package/_vendor/regexp.prototype.flags/implementation.js_commonjs-proxy.js +0 -1
  121. package/_vendor/regexp.prototype.flags/index.js_commonjs-proxy.js +0 -1
  122. package/_vendor/regexp.prototype.flags/polyfill.js_commonjs-proxy.js +0 -1
  123. package/_vendor/regexp.prototype.flags/shim.js_commonjs-proxy.js +0 -1
  124. package/_vendor/side-channel/index.js_commonjs-proxy.js +0 -1
  125. package/_vendor/which-boxed-primitive/index.js_commonjs-proxy.js +0 -5
  126. package/_vendor/which-collection/index.js_commonjs-proxy.js +0 -4
  127. package/_vendor/which-typed-array/index.js_commonjs-proxy.js +0 -1
  128. package/_virtual/_node-resolve_empty.js_commonjs-proxy.js +0 -6
  129. package/_virtual/commonjsHelpers.js +0 -18
  130. package/_virtual/node-resolve_empty.js +0 -8
  131. package/_virtual/polyfill-node.global.js +0 -5
  132. package/_virtual/polyfill-node.process.js +0 -225
  133. package/vendor/available-typed-arrays/index.js +0 -29
  134. package/vendor/call-bind/callBound.js +0 -19
  135. package/vendor/call-bind/index.js +0 -52
  136. package/vendor/deep-equal/index.js +0 -379
  137. package/vendor/deep-equal/node_modules/isarray/index.js +0 -7
  138. package/vendor/define-properties/index.js +0 -60
  139. package/vendor/es-abstract/helpers/getOwnPropertyDescriptor.js +0 -17
  140. package/vendor/es-get-iterator/index.js +0 -217
  141. package/vendor/es-get-iterator/node_modules/isarray/index.js +0 -7
  142. package/vendor/foreach/index.js +0 -22
  143. package/vendor/function-bind/implementation.js +0 -52
  144. package/vendor/function-bind/index.js +0 -7
  145. package/vendor/get-intrinsic/index.js +0 -334
  146. package/vendor/has/src/index.js +0 -7
  147. package/vendor/has-bigints/index.js +0 -12
  148. package/vendor/has-symbols/index.js +0 -15
  149. package/vendor/has-symbols/shams.js +0 -42
  150. package/vendor/has-tostringtag/shams.js +0 -9
  151. package/vendor/is-arguments/index.js +0 -36
  152. package/vendor/is-bigint/index.js +0 -39
  153. package/vendor/is-boolean-object/index.js +0 -29
  154. package/vendor/is-date-object/index.js +0 -22
  155. package/vendor/is-map/index.js +0 -42
  156. package/vendor/is-number-object/index.js +0 -26
  157. package/vendor/is-regex/index.js +0 -61
  158. package/vendor/is-set/index.js +0 -42
  159. package/vendor/is-string/index.js +0 -26
  160. package/vendor/is-symbol/index.js +0 -36
  161. package/vendor/is-typed-array/index.js +0 -67
  162. package/vendor/is-weakmap/index.js +0 -42
  163. package/vendor/is-weakset/index.js +0 -42
  164. package/vendor/object-inspect/index.js +0 -515
  165. package/vendor/object-is/implementation.js +0 -18
  166. package/vendor/object-is/index.js +0 -25
  167. package/vendor/object-is/polyfill.js +0 -9
  168. package/vendor/object-is/shim.js +0 -17
  169. package/vendor/object-keys/implementation.js +0 -124
  170. package/vendor/object-keys/index.js +0 -35
  171. package/vendor/object-keys/isArguments.js +0 -17
  172. package/vendor/object.assign/implementation.js +0 -46
  173. package/vendor/object.assign/index.js +0 -29
  174. package/vendor/object.assign/polyfill.js +0 -57
  175. package/vendor/object.assign/shim.js +0 -17
  176. package/vendor/regexp.prototype.flags/implementation.js +0 -30
  177. package/vendor/regexp.prototype.flags/index.js +0 -25
  178. package/vendor/regexp.prototype.flags/polyfill.js +0 -23
  179. package/vendor/regexp.prototype.flags/shim.js +0 -29
  180. package/vendor/side-channel/index.js +0 -128
  181. package/vendor/which-boxed-primitive/index.js +0 -38
  182. package/vendor/which-collection/index.js +0 -29
  183. package/vendor/which-typed-array/index.js +0 -63
@@ -1,124 +0,0 @@
1
- import { i as isArguments } from './isArguments.js';
2
-
3
- var keysShim;
4
- if (!Object.keys) {
5
- // modified from https://github.com/es-shims/es5-shim
6
- var has = Object.prototype.hasOwnProperty;
7
- var toStr = Object.prototype.toString;
8
- var isArgs = isArguments; // eslint-disable-line global-require
9
- var isEnumerable = Object.prototype.propertyIsEnumerable;
10
- var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
11
- var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
12
- var dontEnums = [
13
- 'toString',
14
- 'toLocaleString',
15
- 'valueOf',
16
- 'hasOwnProperty',
17
- 'isPrototypeOf',
18
- 'propertyIsEnumerable',
19
- 'constructor'
20
- ];
21
- var equalsConstructorPrototype = function (o) {
22
- var ctor = o.constructor;
23
- return ctor && ctor.prototype === o;
24
- };
25
- var excludedKeys = {
26
- $applicationCache: true,
27
- $console: true,
28
- $external: true,
29
- $frame: true,
30
- $frameElement: true,
31
- $frames: true,
32
- $innerHeight: true,
33
- $innerWidth: true,
34
- $onmozfullscreenchange: true,
35
- $onmozfullscreenerror: true,
36
- $outerHeight: true,
37
- $outerWidth: true,
38
- $pageXOffset: true,
39
- $pageYOffset: true,
40
- $parent: true,
41
- $scrollLeft: true,
42
- $scrollTop: true,
43
- $scrollX: true,
44
- $scrollY: true,
45
- $self: true,
46
- $webkitIndexedDB: true,
47
- $webkitStorageInfo: true,
48
- $window: true
49
- };
50
- var hasAutomationEqualityBug = (function () {
51
- /* global window */
52
- if (typeof window === 'undefined') { return false; }
53
- for (var k in window) {
54
- try {
55
- if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
56
- try {
57
- equalsConstructorPrototype(window[k]);
58
- } catch (e) {
59
- return true;
60
- }
61
- }
62
- } catch (e) {
63
- return true;
64
- }
65
- }
66
- return false;
67
- }());
68
- var equalsConstructorPrototypeIfNotBuggy = function (o) {
69
- /* global window */
70
- if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
71
- return equalsConstructorPrototype(o);
72
- }
73
- try {
74
- return equalsConstructorPrototype(o);
75
- } catch (e) {
76
- return false;
77
- }
78
- };
79
-
80
- keysShim = function keys(object) {
81
- var isObject = object !== null && typeof object === 'object';
82
- var isFunction = toStr.call(object) === '[object Function]';
83
- var isArguments = isArgs(object);
84
- var isString = isObject && toStr.call(object) === '[object String]';
85
- var theKeys = [];
86
-
87
- if (!isObject && !isFunction && !isArguments) {
88
- throw new TypeError('Object.keys called on a non-object');
89
- }
90
-
91
- var skipProto = hasProtoEnumBug && isFunction;
92
- if (isString && object.length > 0 && !has.call(object, 0)) {
93
- for (var i = 0; i < object.length; ++i) {
94
- theKeys.push(String(i));
95
- }
96
- }
97
-
98
- if (isArguments && object.length > 0) {
99
- for (var j = 0; j < object.length; ++j) {
100
- theKeys.push(String(j));
101
- }
102
- } else {
103
- for (var name in object) {
104
- if (!(skipProto && name === 'prototype') && has.call(object, name)) {
105
- theKeys.push(String(name));
106
- }
107
- }
108
- }
109
-
110
- if (hasDontEnumBug) {
111
- var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
112
-
113
- for (var k = 0; k < dontEnums.length; ++k) {
114
- if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
115
- theKeys.push(dontEnums[k]);
116
- }
117
- }
118
- }
119
- return theKeys;
120
- };
121
- }
122
- var implementation = keysShim;
123
-
124
- export { implementation as i };
@@ -1,35 +0,0 @@
1
- import { i as isArguments } from './isArguments.js';
2
- import { i as implementation } from './implementation.js';
3
-
4
- var slice = Array.prototype.slice;
5
- var isArgs = isArguments;
6
-
7
- var origKeys = Object.keys;
8
- var keysShim = origKeys ? function keys(o) { return origKeys(o); } : implementation;
9
-
10
- var originalKeys = Object.keys;
11
-
12
- keysShim.shim = function shimObjectKeys() {
13
- if (Object.keys) {
14
- var keysWorksWithArguments = (function () {
15
- // Safari 5.0 bug
16
- var args = Object.keys(arguments);
17
- return args && args.length === arguments.length;
18
- }(1, 2));
19
- if (!keysWorksWithArguments) {
20
- Object.keys = function keys(object) { // eslint-disable-line func-name-matching
21
- if (isArgs(object)) {
22
- return originalKeys(slice.call(object));
23
- }
24
- return originalKeys(object);
25
- };
26
- }
27
- } else {
28
- Object.keys = keysShim;
29
- }
30
- return Object.keys || keysShim;
31
- };
32
-
33
- var objectKeys = keysShim;
34
-
35
- export { objectKeys as o };
@@ -1,17 +0,0 @@
1
- var toStr = Object.prototype.toString;
2
-
3
- var isArguments = function isArguments(value) {
4
- var str = toStr.call(value);
5
- var isArgs = str === '[object Arguments]';
6
- if (!isArgs) {
7
- isArgs = str !== '[object Array]' &&
8
- value !== null &&
9
- typeof value === 'object' &&
10
- typeof value.length === 'number' &&
11
- value.length >= 0 &&
12
- toStr.call(value.callee) === '[object Function]';
13
- }
14
- return isArgs;
15
- };
16
-
17
- export { isArguments as i };
@@ -1,46 +0,0 @@
1
- import { o as objectKeys } from '../object-keys/index.js';
2
- import { s as shams } from '../has-symbols/shams.js';
3
- import { c as callBound$1 } from '../call-bind/callBound.js';
4
-
5
- // modified from https://github.com/es-shims/es6-shim
6
- var keys = objectKeys;
7
- var canBeObject = function (obj) {
8
- return typeof obj !== 'undefined' && obj !== null;
9
- };
10
- var hasSymbols = shams();
11
- var callBound = callBound$1;
12
- var toObject = Object;
13
- var $push = callBound('Array.prototype.push');
14
- var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
15
- var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
16
-
17
- // eslint-disable-next-line no-unused-vars
18
- var implementation = function assign(target, source1) {
19
- if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
20
- var objTarget = toObject(target);
21
- var s, source, i, props, syms, value, key;
22
- for (s = 1; s < arguments.length; ++s) {
23
- source = toObject(arguments[s]);
24
- props = keys(source);
25
- var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
26
- if (getSymbols) {
27
- syms = getSymbols(source);
28
- for (i = 0; i < syms.length; ++i) {
29
- key = syms[i];
30
- if ($propIsEnumerable(source, key)) {
31
- $push(props, key);
32
- }
33
- }
34
- }
35
- for (i = 0; i < props.length; ++i) {
36
- key = props[i];
37
- value = source[key];
38
- if ($propIsEnumerable(source, key)) {
39
- objTarget[key] = value;
40
- }
41
- }
42
- }
43
- return objTarget;
44
- };
45
-
46
- export { implementation as i };
@@ -1,29 +0,0 @@
1
- import { d as defineProperties_1 } from '../define-properties/index.js';
2
- import '../call-bind/index.js';
3
- import { i as implementation$1 } from './implementation.js';
4
- import { p as polyfill$1 } from './polyfill.js';
5
- import { s as shim$1 } from './shim.js';
6
- import { c as callBind$1 } from '../../_vendor/call-bind/index.js_commonjs-module.js';
7
-
8
- var defineProperties = defineProperties_1;
9
- var callBind = callBind$1.exports;
10
-
11
- var implementation = implementation$1;
12
- var getPolyfill = polyfill$1;
13
- var shim = shim$1;
14
-
15
- var polyfill = callBind.apply(getPolyfill());
16
- // eslint-disable-next-line no-unused-vars
17
- var bound = function assign(target, source1) {
18
- return polyfill(Object, arguments);
19
- };
20
-
21
- defineProperties(bound, {
22
- getPolyfill: getPolyfill,
23
- implementation: implementation,
24
- shim: shim
25
- });
26
-
27
- var object_assign = bound;
28
-
29
- export { object_assign as o };
@@ -1,57 +0,0 @@
1
- import { i as implementation$1 } from './implementation.js';
2
-
3
- var implementation = implementation$1;
4
-
5
- var lacksProperEnumerationOrder = function () {
6
- if (!Object.assign) {
7
- return false;
8
- }
9
- /*
10
- * v8, specifically in node 4.x, has a bug with incorrect property enumeration order
11
- * note: this does not detect the bug unless there's 20 characters
12
- */
13
- var str = 'abcdefghijklmnopqrst';
14
- var letters = str.split('');
15
- var map = {};
16
- for (var i = 0; i < letters.length; ++i) {
17
- map[letters[i]] = letters[i];
18
- }
19
- var obj = Object.assign({}, map);
20
- var actual = '';
21
- for (var k in obj) {
22
- actual += k;
23
- }
24
- return str !== actual;
25
- };
26
-
27
- var assignHasPendingExceptions = function () {
28
- if (!Object.assign || !Object.preventExtensions) {
29
- return false;
30
- }
31
- /*
32
- * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
33
- * which is 72% slower than our shim, and Firefox 40's native implementation.
34
- */
35
- var thrower = Object.preventExtensions({ 1: 2 });
36
- try {
37
- Object.assign(thrower, 'xy');
38
- } catch (e) {
39
- return thrower[1] === 'y';
40
- }
41
- return false;
42
- };
43
-
44
- var polyfill = function getPolyfill() {
45
- if (!Object.assign) {
46
- return implementation;
47
- }
48
- if (lacksProperEnumerationOrder()) {
49
- return implementation;
50
- }
51
- if (assignHasPendingExceptions()) {
52
- return implementation;
53
- }
54
- return Object.assign;
55
- };
56
-
57
- export { polyfill as p };
@@ -1,17 +0,0 @@
1
- import { d as defineProperties_1 } from '../define-properties/index.js';
2
- import { p as polyfill } from './polyfill.js';
3
-
4
- var define = defineProperties_1;
5
- var getPolyfill = polyfill;
6
-
7
- var shim = function shimAssign() {
8
- var polyfill = getPolyfill();
9
- define(
10
- Object,
11
- { assign: polyfill },
12
- { assign: function () { return Object.assign !== polyfill; } }
13
- );
14
- return polyfill;
15
- };
16
-
17
- export { shim as s };
@@ -1,30 +0,0 @@
1
- var $Object = Object;
2
- var $TypeError = TypeError;
3
-
4
- var implementation = function flags() {
5
- if (this != null && this !== $Object(this)) {
6
- throw new $TypeError('RegExp.prototype.flags getter called on non-object');
7
- }
8
- var result = '';
9
- if (this.global) {
10
- result += 'g';
11
- }
12
- if (this.ignoreCase) {
13
- result += 'i';
14
- }
15
- if (this.multiline) {
16
- result += 'm';
17
- }
18
- if (this.dotAll) {
19
- result += 's';
20
- }
21
- if (this.unicode) {
22
- result += 'u';
23
- }
24
- if (this.sticky) {
25
- result += 'y';
26
- }
27
- return result;
28
- };
29
-
30
- export { implementation as i };
@@ -1,25 +0,0 @@
1
- import { d as defineProperties_1 } from '../define-properties/index.js';
2
- import '../call-bind/index.js';
3
- import { i as implementation$1 } from './implementation.js';
4
- import { p as polyfill } from './polyfill.js';
5
- import { s as shim$1 } from './shim.js';
6
- import { c as callBind$1 } from '../../_vendor/call-bind/index.js_commonjs-module.js';
7
-
8
- var define = defineProperties_1;
9
- var callBind = callBind$1.exports;
10
-
11
- var implementation = implementation$1;
12
- var getPolyfill = polyfill;
13
- var shim = shim$1;
14
-
15
- var flagsBound = callBind(implementation);
16
-
17
- define(flagsBound, {
18
- getPolyfill: getPolyfill,
19
- implementation: implementation,
20
- shim: shim
21
- });
22
-
23
- var regexp_prototype_flags = flagsBound;
24
-
25
- export { regexp_prototype_flags as r };
@@ -1,23 +0,0 @@
1
- import { i as implementation$1 } from './implementation.js';
2
- import { d as defineProperties_1 } from '../define-properties/index.js';
3
-
4
- var implementation = implementation$1;
5
-
6
- var supportsDescriptors = defineProperties_1.supportsDescriptors;
7
- var $gOPD = Object.getOwnPropertyDescriptor;
8
- var $TypeError = TypeError;
9
-
10
- var polyfill = function getPolyfill() {
11
- if (!supportsDescriptors) {
12
- throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
13
- }
14
- if ((/a/mig).flags === 'gim') {
15
- var descriptor = $gOPD(RegExp.prototype, 'flags');
16
- if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') {
17
- return descriptor.get;
18
- }
19
- }
20
- return implementation;
21
- };
22
-
23
- export { polyfill as p };
@@ -1,29 +0,0 @@
1
- import { d as defineProperties_1 } from '../define-properties/index.js';
2
- import { p as polyfill } from './polyfill.js';
3
-
4
- var supportsDescriptors = defineProperties_1.supportsDescriptors;
5
- var getPolyfill = polyfill;
6
- var gOPD = Object.getOwnPropertyDescriptor;
7
- var defineProperty = Object.defineProperty;
8
- var TypeErr = TypeError;
9
- var getProto = Object.getPrototypeOf;
10
- var regex = /a/;
11
-
12
- var shim = function shimFlags() {
13
- if (!supportsDescriptors || !getProto) {
14
- throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
15
- }
16
- var polyfill = getPolyfill();
17
- var proto = getProto(regex);
18
- var descriptor = gOPD(proto, 'flags');
19
- if (!descriptor || descriptor.get !== polyfill) {
20
- defineProperty(proto, 'flags', {
21
- configurable: true,
22
- enumerable: false,
23
- get: polyfill
24
- });
25
- }
26
- return polyfill;
27
- };
28
-
29
- export { shim as s };
@@ -1,128 +0,0 @@
1
- import { g as getIntrinsic } from '../get-intrinsic/index.js';
2
- import { c as callBound$1 } from '../call-bind/callBound.js';
3
- import { o as objectInspect } from '../object-inspect/index.js';
4
-
5
- var GetIntrinsic = getIntrinsic;
6
- var callBound = callBound$1;
7
- var inspect = objectInspect;
8
-
9
- var $TypeError = GetIntrinsic('%TypeError%');
10
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
11
- var $Map = GetIntrinsic('%Map%', true);
12
-
13
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
14
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
15
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
16
- var $mapGet = callBound('Map.prototype.get', true);
17
- var $mapSet = callBound('Map.prototype.set', true);
18
- var $mapHas = callBound('Map.prototype.has', true);
19
-
20
- /*
21
- * This function traverses the list returning the node corresponding to the
22
- * given key.
23
- *
24
- * That node is also moved to the head of the list, so that if it's accessed
25
- * again we don't need to traverse the whole list. By doing so, all the recently
26
- * used nodes can be accessed relatively quickly.
27
- */
28
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
29
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
30
- if (curr.key === key) {
31
- prev.next = curr.next;
32
- curr.next = list.next;
33
- list.next = curr; // eslint-disable-line no-param-reassign
34
- return curr;
35
- }
36
- }
37
- };
38
-
39
- var listGet = function (objects, key) {
40
- var node = listGetNode(objects, key);
41
- return node && node.value;
42
- };
43
- var listSet = function (objects, key, value) {
44
- var node = listGetNode(objects, key);
45
- if (node) {
46
- node.value = value;
47
- } else {
48
- // Prepend the new node to the beginning of the list
49
- objects.next = { // eslint-disable-line no-param-reassign
50
- key: key,
51
- next: objects.next,
52
- value: value
53
- };
54
- }
55
- };
56
- var listHas = function (objects, key) {
57
- return !!listGetNode(objects, key);
58
- };
59
-
60
- var sideChannel = function getSideChannel() {
61
- var $wm;
62
- var $m;
63
- var $o;
64
- var channel = {
65
- assert: function (key) {
66
- if (!channel.has(key)) {
67
- throw new $TypeError('Side channel does not contain ' + inspect(key));
68
- }
69
- },
70
- get: function (key) { // eslint-disable-line consistent-return
71
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
72
- if ($wm) {
73
- return $weakMapGet($wm, key);
74
- }
75
- } else if ($Map) {
76
- if ($m) {
77
- return $mapGet($m, key);
78
- }
79
- } else {
80
- if ($o) { // eslint-disable-line no-lonely-if
81
- return listGet($o, key);
82
- }
83
- }
84
- },
85
- has: function (key) {
86
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
87
- if ($wm) {
88
- return $weakMapHas($wm, key);
89
- }
90
- } else if ($Map) {
91
- if ($m) {
92
- return $mapHas($m, key);
93
- }
94
- } else {
95
- if ($o) { // eslint-disable-line no-lonely-if
96
- return listHas($o, key);
97
- }
98
- }
99
- return false;
100
- },
101
- set: function (key, value) {
102
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
103
- if (!$wm) {
104
- $wm = new $WeakMap();
105
- }
106
- $weakMapSet($wm, key, value);
107
- } else if ($Map) {
108
- if (!$m) {
109
- $m = new $Map();
110
- }
111
- $mapSet($m, key, value);
112
- } else {
113
- if (!$o) {
114
- /*
115
- * Initialize the linked list as an empty node, so that we don't have
116
- * to special-case handling of the first node: we can always refer to
117
- * it as (previous node).next, instead of something like (list).head
118
- */
119
- $o = { key: {}, next: null };
120
- }
121
- listSet($o, key, value);
122
- }
123
- }
124
- };
125
- return channel;
126
- };
127
-
128
- export { sideChannel as s };
@@ -1,38 +0,0 @@
1
- import { i as isString$1 } from '../is-string/index.js';
2
- import { i as isNumberObject } from '../is-number-object/index.js';
3
- import { i as isBooleanObject } from '../is-boolean-object/index.js';
4
- import '../is-symbol/index.js';
5
- import '../is-bigint/index.js';
6
- import { i as isSymbol$1 } from '../../_vendor/is-symbol/index.js_commonjs-module.js';
7
- import { i as isBigint } from '../../_vendor/is-bigint/index.js_commonjs-module.js';
8
-
9
- var isString = isString$1;
10
- var isNumber = isNumberObject;
11
- var isBoolean = isBooleanObject;
12
- var isSymbol = isSymbol$1.exports;
13
- var isBigInt = isBigint.exports;
14
-
15
- // eslint-disable-next-line consistent-return
16
- var whichBoxedPrimitive = function whichBoxedPrimitive(value) {
17
- // eslint-disable-next-line eqeqeq
18
- if (value == null || (typeof value !== 'object' && typeof value !== 'function')) {
19
- return null;
20
- }
21
- if (isString(value)) {
22
- return 'String';
23
- }
24
- if (isNumber(value)) {
25
- return 'Number';
26
- }
27
- if (isBoolean(value)) {
28
- return 'Boolean';
29
- }
30
- if (isSymbol(value)) {
31
- return 'Symbol';
32
- }
33
- if (isBigInt(value)) {
34
- return 'BigInt';
35
- }
36
- };
37
-
38
- export { whichBoxedPrimitive as w };
@@ -1,29 +0,0 @@
1
- import { i as isMap$1 } from '../is-map/index.js';
2
- import { i as isSet$1 } from '../is-set/index.js';
3
- import { i as isWeakmap } from '../is-weakmap/index.js';
4
- import { i as isWeakset } from '../is-weakset/index.js';
5
-
6
- var isMap = isMap$1;
7
- var isSet = isSet$1;
8
- var isWeakMap = isWeakmap;
9
- var isWeakSet = isWeakset;
10
-
11
- var whichCollection = function whichCollection(value) {
12
- if (value && typeof value === 'object') {
13
- if (isMap(value)) {
14
- return 'Map';
15
- }
16
- if (isSet(value)) {
17
- return 'Set';
18
- }
19
- if (isWeakMap(value)) {
20
- return 'WeakMap';
21
- }
22
- if (isWeakSet(value)) {
23
- return 'WeakSet';
24
- }
25
- }
26
- return false;
27
- };
28
-
29
- export { whichCollection as w };