@blueking/ai-ui-sdk 0.0.15-beta.23 → 0.0.15-beta.24
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/dist/component/render-input/index.vue.css +17 -17
- package/dist/component/render-input/index.vue.js +1 -1
- package/dist/component/render-input/render-drag.vue.css +5 -5
- package/dist/component/render-input/render-drag.vue.js +1 -1
- package/dist/component/render-input/render-quill.script.vue.js +2 -2
- package/dist/component/render-knowledge-icon/index.vue.css +1 -1
- package/dist/component/render-knowledge-icon/index.vue.js +1 -1
- package/dist/component/render-markdown/mark-down.js +1 -1
- package/dist/component/render-message/openai-message.vue.css +15 -15
- package/dist/component/render-message/openai-message.vue.js +1 -1
- package/dist/component/render-message/skeleton-message.vue.css +1 -1
- package/dist/component/render-message/skeleton-message.vue.js +1 -1
- package/dist/component/render-message/system-message.vue.css +2 -2
- package/dist/component/render-message/system-message.vue.js +1 -1
- package/dist/component/render-message/time-message.vue.css +1 -1
- package/dist/component/render-message/time-message.vue.js +1 -1
- package/dist/component/render-message/token-expired-message.vue.css +9 -9
- package/dist/component/render-message/token-expired-message.vue.js +1 -1
- package/dist/component/render-message/user-message.vue.css +15 -15
- package/dist/component/render-message/user-message.vue.js +1 -1
- package/dist/component/render-stop/index.vue.css +2 -2
- package/dist/component/render-stop/index.vue.js +1 -1
- package/package.json +11 -11
- package/dist/node_modules/call-bind/index.js +0 -24
- package/dist/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/dist/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/dist/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/dist/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/dist/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/dist/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/dist/node_modules/call-bound/index.js +0 -19
- package/dist/node_modules/deep-equal/index.js +0 -112
- package/dist/node_modules/define-data-property/index.js +0 -56
- package/dist/node_modules/define-properties/index.js +0 -47
- package/dist/node_modules/dunder-proto/get.js +0 -30
- package/dist/node_modules/es-define-property/index.js +0 -14
- package/dist/node_modules/es-errors/eval.js +0 -4
- package/dist/node_modules/es-errors/index.js +0 -4
- package/dist/node_modules/es-errors/range.js +0 -4
- package/dist/node_modules/es-errors/ref.js +0 -4
- package/dist/node_modules/es-errors/syntax.js +0 -4
- package/dist/node_modules/es-errors/type.js +0 -4
- package/dist/node_modules/es-errors/uri.js +0 -4
- package/dist/node_modules/es-object-atoms/index.js +0 -4
- package/dist/node_modules/extend/index.js +0 -117
- package/dist/node_modules/fast-diff/diff.js +0 -738
- package/dist/node_modules/function-bind/implementation.js +0 -84
- package/dist/node_modules/function-bind/index.js +0 -5
- package/dist/node_modules/functions-have-names/index.js +0 -31
- package/dist/node_modules/get-intrinsic/index.js +0 -378
- package/dist/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/dist/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/dist/node_modules/get-proto/index.js +0 -27
- package/dist/node_modules/gopd/gOPD.js +0 -4
- package/dist/node_modules/gopd/index.js +0 -15
- package/dist/node_modules/has-property-descriptors/index.js +0 -22
- package/dist/node_modules/has-symbols/index.js +0 -14
- package/dist/node_modules/has-symbols/shams.js +0 -45
- package/dist/node_modules/has-tostringtag/shams.js +0 -8
- package/dist/node_modules/hasown/index.js +0 -8
- package/dist/node_modules/is-arguments/index.js +0 -44
- package/dist/node_modules/is-date-object/index.js +0 -27
- package/dist/node_modules/is-regex/index.js +0 -69
- package/dist/node_modules/math-intrinsics/abs.js +0 -4
- package/dist/node_modules/math-intrinsics/floor.js +0 -4
- package/dist/node_modules/math-intrinsics/isNaN.js +0 -6
- package/dist/node_modules/math-intrinsics/max.js +0 -4
- package/dist/node_modules/math-intrinsics/min.js +0 -4
- package/dist/node_modules/math-intrinsics/pow.js +0 -4
- package/dist/node_modules/math-intrinsics/round.js +0 -4
- package/dist/node_modules/math-intrinsics/sign.js +0 -11
- package/dist/node_modules/object-is/implementation.js +0 -19
- package/dist/node_modules/object-is/index.js +0 -18
- package/dist/node_modules/object-is/polyfill.js +0 -7
- package/dist/node_modules/object-is/shim.js +0 -14
- package/dist/node_modules/object-keys/implementation.js +0 -122
- package/dist/node_modules/object-keys/index.js +0 -32
- package/dist/node_modules/object-keys/isArguments.js +0 -17
- package/dist/node_modules/quill/dist/quill.js +0 -11562
- package/dist/node_modules/quill-delta/lib/delta.js +0 -344
- package/dist/node_modules/quill-delta/lib/op.js +0 -155
- package/dist/node_modules/regexp.prototype.flags/implementation.js +0 -39
- package/dist/node_modules/regexp.prototype.flags/index.js +0 -18
- package/dist/node_modules/regexp.prototype.flags/polyfill.js +0 -39
- package/dist/node_modules/regexp.prototype.flags/shim.js +0 -26
- package/dist/node_modules/set-function-length/index.js +0 -42
- package/dist/node_modules/set-function-name/index.js +0 -23
- package/dist/node_modules/x-mavon-editor/dist/mavon-editor.js +0 -31
@@ -1,84 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
/* eslint no-invalid-this: 1 */
|
4
|
-
|
5
|
-
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
6
|
-
var toStr = Object.prototype.toString;
|
7
|
-
var max = Math.max;
|
8
|
-
var funcType = '[object Function]';
|
9
|
-
|
10
|
-
var concatty = function concatty(a, b) {
|
11
|
-
var arr = [];
|
12
|
-
|
13
|
-
for (var i = 0; i < a.length; i += 1) {
|
14
|
-
arr[i] = a[i];
|
15
|
-
}
|
16
|
-
for (var j = 0; j < b.length; j += 1) {
|
17
|
-
arr[j + a.length] = b[j];
|
18
|
-
}
|
19
|
-
|
20
|
-
return arr;
|
21
|
-
};
|
22
|
-
|
23
|
-
var slicy = function slicy(arrLike, offset) {
|
24
|
-
var arr = [];
|
25
|
-
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
26
|
-
arr[j] = arrLike[i];
|
27
|
-
}
|
28
|
-
return arr;
|
29
|
-
};
|
30
|
-
|
31
|
-
var joiny = function (arr, joiner) {
|
32
|
-
var str = '';
|
33
|
-
for (var i = 0; i < arr.length; i += 1) {
|
34
|
-
str += arr[i];
|
35
|
-
if (i + 1 < arr.length) {
|
36
|
-
str += joiner;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
return str;
|
40
|
-
};
|
41
|
-
|
42
|
-
module.exports = function bind(that) {
|
43
|
-
var target = this;
|
44
|
-
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
45
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
46
|
-
}
|
47
|
-
var args = slicy(arguments, 1);
|
48
|
-
|
49
|
-
var bound;
|
50
|
-
var binder = function () {
|
51
|
-
if (this instanceof bound) {
|
52
|
-
var result = target.apply(
|
53
|
-
this,
|
54
|
-
concatty(args, arguments)
|
55
|
-
);
|
56
|
-
if (Object(result) === result) {
|
57
|
-
return result;
|
58
|
-
}
|
59
|
-
return this;
|
60
|
-
}
|
61
|
-
return target.apply(
|
62
|
-
that,
|
63
|
-
concatty(args, arguments)
|
64
|
-
);
|
65
|
-
|
66
|
-
};
|
67
|
-
|
68
|
-
var boundLength = max(0, target.length - args.length);
|
69
|
-
var boundArgs = [];
|
70
|
-
for (var i = 0; i < boundLength; i++) {
|
71
|
-
boundArgs[i] = '$' + i;
|
72
|
-
}
|
73
|
-
|
74
|
-
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
75
|
-
|
76
|
-
if (target.prototype) {
|
77
|
-
var Empty = function Empty() {};
|
78
|
-
Empty.prototype = target.prototype;
|
79
|
-
bound.prototype = new Empty();
|
80
|
-
Empty.prototype = null;
|
81
|
-
}
|
82
|
-
|
83
|
-
return bound;
|
84
|
-
};
|
@@ -1,31 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var functionsHaveNames = function functionsHaveNames() {
|
4
|
-
return typeof function f() {}.name === 'string';
|
5
|
-
};
|
6
|
-
|
7
|
-
var gOPD = Object.getOwnPropertyDescriptor;
|
8
|
-
if (gOPD) {
|
9
|
-
try {
|
10
|
-
gOPD([], 'length');
|
11
|
-
} catch (e) {
|
12
|
-
// IE 8 has a broken gOPD
|
13
|
-
gOPD = null;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
|
18
|
-
if (!functionsHaveNames() || !gOPD) {
|
19
|
-
return false;
|
20
|
-
}
|
21
|
-
var desc = gOPD(function () {}, 'name');
|
22
|
-
return !!desc && !!desc.configurable;
|
23
|
-
};
|
24
|
-
|
25
|
-
var $bind = Function.prototype.bind;
|
26
|
-
|
27
|
-
functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {
|
28
|
-
return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';
|
29
|
-
};
|
30
|
-
|
31
|
-
module.exports = functionsHaveNames;
|
@@ -1,378 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var undefined;
|
4
|
-
|
5
|
-
var $Object = require('../es-object-atoms/index.js');
|
6
|
-
|
7
|
-
var $Error = require('../es-errors/index.js');
|
8
|
-
var $EvalError = require('../es-errors/eval.js');
|
9
|
-
var $RangeError = require('../es-errors/range.js');
|
10
|
-
var $ReferenceError = require('../es-errors/ref.js');
|
11
|
-
var $SyntaxError = require('../es-errors/syntax.js');
|
12
|
-
var $TypeError = require('../es-errors/type.js');
|
13
|
-
var $URIError = require('../es-errors/uri.js');
|
14
|
-
|
15
|
-
var abs = require('../math-intrinsics/abs.js');
|
16
|
-
var floor = require('../math-intrinsics/floor.js');
|
17
|
-
var max = require('../math-intrinsics/max.js');
|
18
|
-
var min = require('../math-intrinsics/min.js');
|
19
|
-
var pow = require('../math-intrinsics/pow.js');
|
20
|
-
var round = require('../math-intrinsics/round.js');
|
21
|
-
var sign = require('../math-intrinsics/sign.js');
|
22
|
-
|
23
|
-
var $Function = Function;
|
24
|
-
|
25
|
-
// eslint-disable-next-line consistent-return
|
26
|
-
var getEvalledConstructor = function (expressionSyntax) {
|
27
|
-
try {
|
28
|
-
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
29
|
-
} catch (e) {}
|
30
|
-
};
|
31
|
-
|
32
|
-
var $gOPD = require('../gopd/index.js');
|
33
|
-
var $defineProperty = require('../es-define-property/index.js');
|
34
|
-
|
35
|
-
var throwTypeError = function () {
|
36
|
-
throw new $TypeError();
|
37
|
-
};
|
38
|
-
var ThrowTypeError = $gOPD
|
39
|
-
? (function () {
|
40
|
-
try {
|
41
|
-
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
42
|
-
arguments.callee; // IE 8 does not throw here
|
43
|
-
return throwTypeError;
|
44
|
-
} catch (calleeThrows) {
|
45
|
-
try {
|
46
|
-
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
47
|
-
return $gOPD(arguments, 'callee').get;
|
48
|
-
} catch (gOPDthrows) {
|
49
|
-
return throwTypeError;
|
50
|
-
}
|
51
|
-
}
|
52
|
-
}())
|
53
|
-
: throwTypeError;
|
54
|
-
|
55
|
-
var hasSymbols = require('../has-symbols/index.js')();
|
56
|
-
|
57
|
-
var getProto = require('../get-proto/index.js');
|
58
|
-
var $ObjectGPO = require('../get-proto/Object.getPrototypeOf.js');
|
59
|
-
var $ReflectGPO = require('../get-proto/Reflect.getPrototypeOf.js');
|
60
|
-
|
61
|
-
var $apply = require('../call-bind-apply-helpers/functionApply.js');
|
62
|
-
var $call = require('../call-bind-apply-helpers/functionCall.js');
|
63
|
-
|
64
|
-
var needsEval = {};
|
65
|
-
|
66
|
-
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
|
67
|
-
|
68
|
-
var INTRINSICS = {
|
69
|
-
__proto__: null,
|
70
|
-
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
71
|
-
'%Array%': Array,
|
72
|
-
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
73
|
-
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
|
74
|
-
'%AsyncFromSyncIteratorPrototype%': undefined,
|
75
|
-
'%AsyncFunction%': needsEval,
|
76
|
-
'%AsyncGenerator%': needsEval,
|
77
|
-
'%AsyncGeneratorFunction%': needsEval,
|
78
|
-
'%AsyncIteratorPrototype%': needsEval,
|
79
|
-
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
80
|
-
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
81
|
-
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
|
82
|
-
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
|
83
|
-
'%Boolean%': Boolean,
|
84
|
-
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
85
|
-
'%Date%': Date,
|
86
|
-
'%decodeURI%': decodeURI,
|
87
|
-
'%decodeURIComponent%': decodeURIComponent,
|
88
|
-
'%encodeURI%': encodeURI,
|
89
|
-
'%encodeURIComponent%': encodeURIComponent,
|
90
|
-
'%Error%': $Error,
|
91
|
-
'%eval%': eval, // eslint-disable-line no-eval
|
92
|
-
'%EvalError%': $EvalError,
|
93
|
-
'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,
|
94
|
-
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
95
|
-
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
96
|
-
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
97
|
-
'%Function%': $Function,
|
98
|
-
'%GeneratorFunction%': needsEval,
|
99
|
-
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
100
|
-
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
101
|
-
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
102
|
-
'%isFinite%': isFinite,
|
103
|
-
'%isNaN%': isNaN,
|
104
|
-
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
105
|
-
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
106
|
-
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
107
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
|
108
|
-
'%Math%': Math,
|
109
|
-
'%Number%': Number,
|
110
|
-
'%Object%': $Object,
|
111
|
-
'%Object.getOwnPropertyDescriptor%': $gOPD,
|
112
|
-
'%parseFloat%': parseFloat,
|
113
|
-
'%parseInt%': parseInt,
|
114
|
-
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
115
|
-
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
116
|
-
'%RangeError%': $RangeError,
|
117
|
-
'%ReferenceError%': $ReferenceError,
|
118
|
-
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
119
|
-
'%RegExp%': RegExp,
|
120
|
-
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
121
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
|
122
|
-
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
123
|
-
'%String%': String,
|
124
|
-
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
|
125
|
-
'%Symbol%': hasSymbols ? Symbol : undefined,
|
126
|
-
'%SyntaxError%': $SyntaxError,
|
127
|
-
'%ThrowTypeError%': ThrowTypeError,
|
128
|
-
'%TypedArray%': TypedArray,
|
129
|
-
'%TypeError%': $TypeError,
|
130
|
-
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
131
|
-
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
132
|
-
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
133
|
-
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
134
|
-
'%URIError%': $URIError,
|
135
|
-
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
136
|
-
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
137
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
|
138
|
-
|
139
|
-
'%Function.prototype.call%': $call,
|
140
|
-
'%Function.prototype.apply%': $apply,
|
141
|
-
'%Object.defineProperty%': $defineProperty,
|
142
|
-
'%Object.getPrototypeOf%': $ObjectGPO,
|
143
|
-
'%Math.abs%': abs,
|
144
|
-
'%Math.floor%': floor,
|
145
|
-
'%Math.max%': max,
|
146
|
-
'%Math.min%': min,
|
147
|
-
'%Math.pow%': pow,
|
148
|
-
'%Math.round%': round,
|
149
|
-
'%Math.sign%': sign,
|
150
|
-
'%Reflect.getPrototypeOf%': $ReflectGPO
|
151
|
-
};
|
152
|
-
|
153
|
-
if (getProto) {
|
154
|
-
try {
|
155
|
-
null.error; // eslint-disable-line no-unused-expressions
|
156
|
-
} catch (e) {
|
157
|
-
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
158
|
-
var errorProto = getProto(getProto(e));
|
159
|
-
INTRINSICS['%Error.prototype%'] = errorProto;
|
160
|
-
}
|
161
|
-
}
|
162
|
-
|
163
|
-
var doEval = function doEval(name) {
|
164
|
-
var value;
|
165
|
-
if (name === '%AsyncFunction%') {
|
166
|
-
value = getEvalledConstructor('async function () {}');
|
167
|
-
} else if (name === '%GeneratorFunction%') {
|
168
|
-
value = getEvalledConstructor('function* () {}');
|
169
|
-
} else if (name === '%AsyncGeneratorFunction%') {
|
170
|
-
value = getEvalledConstructor('async function* () {}');
|
171
|
-
} else if (name === '%AsyncGenerator%') {
|
172
|
-
var fn = doEval('%AsyncGeneratorFunction%');
|
173
|
-
if (fn) {
|
174
|
-
value = fn.prototype;
|
175
|
-
}
|
176
|
-
} else if (name === '%AsyncIteratorPrototype%') {
|
177
|
-
var gen = doEval('%AsyncGenerator%');
|
178
|
-
if (gen && getProto) {
|
179
|
-
value = getProto(gen.prototype);
|
180
|
-
}
|
181
|
-
}
|
182
|
-
|
183
|
-
INTRINSICS[name] = value;
|
184
|
-
|
185
|
-
return value;
|
186
|
-
};
|
187
|
-
|
188
|
-
var LEGACY_ALIASES = {
|
189
|
-
__proto__: null,
|
190
|
-
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
191
|
-
'%ArrayPrototype%': ['Array', 'prototype'],
|
192
|
-
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
193
|
-
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
194
|
-
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
195
|
-
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
196
|
-
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
197
|
-
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
198
|
-
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
199
|
-
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
200
|
-
'%DataViewPrototype%': ['DataView', 'prototype'],
|
201
|
-
'%DatePrototype%': ['Date', 'prototype'],
|
202
|
-
'%ErrorPrototype%': ['Error', 'prototype'],
|
203
|
-
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
204
|
-
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
205
|
-
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
206
|
-
'%FunctionPrototype%': ['Function', 'prototype'],
|
207
|
-
'%Generator%': ['GeneratorFunction', 'prototype'],
|
208
|
-
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
209
|
-
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
210
|
-
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
211
|
-
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
212
|
-
'%JSONParse%': ['JSON', 'parse'],
|
213
|
-
'%JSONStringify%': ['JSON', 'stringify'],
|
214
|
-
'%MapPrototype%': ['Map', 'prototype'],
|
215
|
-
'%NumberPrototype%': ['Number', 'prototype'],
|
216
|
-
'%ObjectPrototype%': ['Object', 'prototype'],
|
217
|
-
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
218
|
-
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
219
|
-
'%PromisePrototype%': ['Promise', 'prototype'],
|
220
|
-
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
221
|
-
'%Promise_all%': ['Promise', 'all'],
|
222
|
-
'%Promise_reject%': ['Promise', 'reject'],
|
223
|
-
'%Promise_resolve%': ['Promise', 'resolve'],
|
224
|
-
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
225
|
-
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
226
|
-
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
227
|
-
'%SetPrototype%': ['Set', 'prototype'],
|
228
|
-
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
229
|
-
'%StringPrototype%': ['String', 'prototype'],
|
230
|
-
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
231
|
-
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
232
|
-
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
233
|
-
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
234
|
-
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
235
|
-
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
236
|
-
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
237
|
-
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
238
|
-
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
239
|
-
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
240
|
-
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
241
|
-
};
|
242
|
-
|
243
|
-
var bind = require('../function-bind/index.js');
|
244
|
-
var hasOwn = require('../hasown/index.js');
|
245
|
-
var $concat = bind.call($call, Array.prototype.concat);
|
246
|
-
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
247
|
-
var $replace = bind.call($call, String.prototype.replace);
|
248
|
-
var $strSlice = bind.call($call, String.prototype.slice);
|
249
|
-
var $exec = bind.call($call, RegExp.prototype.exec);
|
250
|
-
|
251
|
-
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
252
|
-
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
253
|
-
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
254
|
-
var stringToPath = function stringToPath(string) {
|
255
|
-
var first = $strSlice(string, 0, 1);
|
256
|
-
var last = $strSlice(string, -1);
|
257
|
-
if (first === '%' && last !== '%') {
|
258
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
259
|
-
} else if (last === '%' && first !== '%') {
|
260
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
261
|
-
}
|
262
|
-
var result = [];
|
263
|
-
$replace(string, rePropName, function (match, number, quote, subString) {
|
264
|
-
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
265
|
-
});
|
266
|
-
return result;
|
267
|
-
};
|
268
|
-
/* end adaptation */
|
269
|
-
|
270
|
-
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
271
|
-
var intrinsicName = name;
|
272
|
-
var alias;
|
273
|
-
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
274
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
275
|
-
intrinsicName = '%' + alias[0] + '%';
|
276
|
-
}
|
277
|
-
|
278
|
-
if (hasOwn(INTRINSICS, intrinsicName)) {
|
279
|
-
var value = INTRINSICS[intrinsicName];
|
280
|
-
if (value === needsEval) {
|
281
|
-
value = doEval(intrinsicName);
|
282
|
-
}
|
283
|
-
if (typeof value === 'undefined' && !allowMissing) {
|
284
|
-
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
285
|
-
}
|
286
|
-
|
287
|
-
return {
|
288
|
-
alias: alias,
|
289
|
-
name: intrinsicName,
|
290
|
-
value: value
|
291
|
-
};
|
292
|
-
}
|
293
|
-
|
294
|
-
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
295
|
-
};
|
296
|
-
|
297
|
-
module.exports = function GetIntrinsic(name, allowMissing) {
|
298
|
-
if (typeof name !== 'string' || name.length === 0) {
|
299
|
-
throw new $TypeError('intrinsic name must be a non-empty string');
|
300
|
-
}
|
301
|
-
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
302
|
-
throw new $TypeError('"allowMissing" argument must be a boolean');
|
303
|
-
}
|
304
|
-
|
305
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
306
|
-
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
307
|
-
}
|
308
|
-
var parts = stringToPath(name);
|
309
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
310
|
-
|
311
|
-
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
312
|
-
var intrinsicRealName = intrinsic.name;
|
313
|
-
var value = intrinsic.value;
|
314
|
-
var skipFurtherCaching = false;
|
315
|
-
|
316
|
-
var alias = intrinsic.alias;
|
317
|
-
if (alias) {
|
318
|
-
intrinsicBaseName = alias[0];
|
319
|
-
$spliceApply(parts, $concat([0, 1], alias));
|
320
|
-
}
|
321
|
-
|
322
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
323
|
-
var part = parts[i];
|
324
|
-
var first = $strSlice(part, 0, 1);
|
325
|
-
var last = $strSlice(part, -1);
|
326
|
-
if (
|
327
|
-
(
|
328
|
-
(first === '"' || first === "'" || first === '`')
|
329
|
-
|| (last === '"' || last === "'" || last === '`')
|
330
|
-
)
|
331
|
-
&& first !== last
|
332
|
-
) {
|
333
|
-
throw new $SyntaxError('property names with quotes must have matching quotes');
|
334
|
-
}
|
335
|
-
if (part === 'constructor' || !isOwn) {
|
336
|
-
skipFurtherCaching = true;
|
337
|
-
}
|
338
|
-
|
339
|
-
intrinsicBaseName += '.' + part;
|
340
|
-
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
341
|
-
|
342
|
-
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
343
|
-
value = INTRINSICS[intrinsicRealName];
|
344
|
-
} else if (value != null) {
|
345
|
-
if (!(part in value)) {
|
346
|
-
if (!allowMissing) {
|
347
|
-
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
348
|
-
}
|
349
|
-
return void undefined;
|
350
|
-
}
|
351
|
-
if ($gOPD && (i + 1) >= parts.length) {
|
352
|
-
var desc = $gOPD(value, part);
|
353
|
-
isOwn = !!desc;
|
354
|
-
|
355
|
-
// By convention, when a data property is converted to an accessor
|
356
|
-
// property to emulate a data property that does not suffer from
|
357
|
-
// the override mistake, that accessor's getter is marked with
|
358
|
-
// an `originalValue` property. Here, when we detect this, we
|
359
|
-
// uphold the illusion by pretending to see that original data
|
360
|
-
// property, i.e., returning the value rather than the getter
|
361
|
-
// itself.
|
362
|
-
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
363
|
-
value = desc.get;
|
364
|
-
} else {
|
365
|
-
value = value[part];
|
366
|
-
}
|
367
|
-
} else {
|
368
|
-
isOwn = hasOwn(value, part);
|
369
|
-
value = value[part];
|
370
|
-
}
|
371
|
-
|
372
|
-
if (isOwn && !skipFurtherCaching) {
|
373
|
-
INTRINSICS[intrinsicRealName] = value;
|
374
|
-
}
|
375
|
-
}
|
376
|
-
}
|
377
|
-
return value;
|
378
|
-
};
|
@@ -1,27 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var reflectGetProto = require('./Reflect.getPrototypeOf.js');
|
4
|
-
var originalGetProto = require('./Object.getPrototypeOf.js');
|
5
|
-
|
6
|
-
var getDunderProto = require('../dunder-proto/get.js');
|
7
|
-
|
8
|
-
/** @type {import('.')} */
|
9
|
-
module.exports = reflectGetProto
|
10
|
-
? function getProto(O) {
|
11
|
-
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
12
|
-
return reflectGetProto(O);
|
13
|
-
}
|
14
|
-
: originalGetProto
|
15
|
-
? function getProto(O) {
|
16
|
-
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
17
|
-
throw new TypeError('getProto: not an object');
|
18
|
-
}
|
19
|
-
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
20
|
-
return originalGetProto(O);
|
21
|
-
}
|
22
|
-
: getDunderProto
|
23
|
-
? function getProto(O) {
|
24
|
-
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
25
|
-
return getDunderProto(O);
|
26
|
-
}
|
27
|
-
: null;
|
@@ -1,22 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var $defineProperty = require('../es-define-property/index.js');
|
4
|
-
|
5
|
-
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
6
|
-
return !!$defineProperty;
|
7
|
-
};
|
8
|
-
|
9
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
10
|
-
// node v0.6 has a bug where array lengths can be Set but not Defined
|
11
|
-
if (!$defineProperty) {
|
12
|
-
return null;
|
13
|
-
}
|
14
|
-
try {
|
15
|
-
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
16
|
-
} catch (e) {
|
17
|
-
// In Firefox 4-22, defining length on an array throws an exception.
|
18
|
-
return true;
|
19
|
-
}
|
20
|
-
};
|
21
|
-
|
22
|
-
module.exports = hasPropertyDescriptors;
|
@@ -1,14 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
4
|
-
var hasSymbolSham = require('./shams.js');
|
5
|
-
|
6
|
-
/** @type {import('.')} */
|
7
|
-
module.exports = function hasNativeSymbols() {
|
8
|
-
if (typeof origSymbol !== 'function') { return false; }
|
9
|
-
if (typeof Symbol !== 'function') { return false; }
|
10
|
-
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
11
|
-
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
12
|
-
|
13
|
-
return hasSymbolSham();
|
14
|
-
};
|
@@ -1,45 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
/** @type {import('./shams')} */
|
4
|
-
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
5
|
-
module.exports = function hasSymbols() {
|
6
|
-
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
7
|
-
if (typeof Symbol.iterator === 'symbol') { return true; }
|
8
|
-
|
9
|
-
/** @type {{ [k in symbol]?: unknown }} */
|
10
|
-
var obj = {};
|
11
|
-
var sym = Symbol('test');
|
12
|
-
var symObj = Object(sym);
|
13
|
-
if (typeof sym === 'string') { return false; }
|
14
|
-
|
15
|
-
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
16
|
-
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
17
|
-
|
18
|
-
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
19
|
-
// if (sym instanceof Symbol) { return false; }
|
20
|
-
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
21
|
-
// if (!(symObj instanceof Symbol)) { return false; }
|
22
|
-
|
23
|
-
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
24
|
-
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
25
|
-
|
26
|
-
var symVal = 42;
|
27
|
-
obj[sym] = symVal;
|
28
|
-
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
29
|
-
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
30
|
-
|
31
|
-
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
32
|
-
|
33
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
34
|
-
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
35
|
-
|
36
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
37
|
-
|
38
|
-
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
39
|
-
// eslint-disable-next-line no-extra-parens
|
40
|
-
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
41
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
42
|
-
}
|
43
|
-
|
44
|
-
return true;
|
45
|
-
};
|