Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/StringCreate.js +38 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/SymbolDescriptiveString.js +16 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TestIntegrityLevel.js +40 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TimeClip.js +20 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TimeFromYear.js +11 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TimeWithinDay.js +12 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToBoolean.js +5 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToDateString.js +21 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInt16.js +10 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInt32.js +9 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInt8.js +10 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInteger.js +12 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToLength.js +14 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToNumber.js +48 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToObject.js +5 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToPrimitive.js +12 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToPropertyDescriptor.js +50 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToPropertyKey.js +15 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToString.js +15 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint16.js +19 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint32.js +9 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint8.js +19 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint8Clamp.js +19 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/Type.js +12 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TypedArrayCreate.js +47 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TypedArraySpeciesCreate.js +37 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/UTF16Decode.js +21 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/UTF16Encoding.js +25 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ValidateAndApplyPropertyDescriptor.js +159 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ValidateTypedArray.js +28 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/WeekDay.js +10 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/YearFromTime.js +16 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisBooleanValue.js +13 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisNumberValue.js +16 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisStringValue.js +13 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisTimeValue.js +9 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/AbstractEqualityComparison.js +38 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/AbstractRelationalComparison.js +62 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/AdvanceStringIndex.js +44 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/ArrayCreate.js +42 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/ArraySetLength.js +77 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/ArraySpeciesCreate.js +46 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/Call.js +20 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CanonicalNumericIndexString.js +19 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/Canonicalize.js +51 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CharacterRange.js +53 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CompletePropertyDescriptor.js +43 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CompletionRecord.js +48 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CreateDataProperty.js +25 -0
- novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CreateDataPropertyOrThrow.js +24 -0
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/StringCreate.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $Object = require('es-object-atoms');
|
| 6 |
+
var $StringPrototype = GetIntrinsic('%String.prototype%');
|
| 7 |
+
var $SyntaxError = require('es-errors/syntax');
|
| 8 |
+
var $TypeError = require('es-errors/type');
|
| 9 |
+
var setProto = require('set-proto');
|
| 10 |
+
|
| 11 |
+
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
|
| 12 |
+
|
| 13 |
+
// https://262.ecma-international.org/6.0/#sec-stringcreate
|
| 14 |
+
|
| 15 |
+
module.exports = function StringCreate(value, prototype) {
|
| 16 |
+
if (typeof value !== 'string') {
|
| 17 |
+
throw new $TypeError('Assertion failed: `S` must be a String');
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
var S = $Object(value);
|
| 21 |
+
if (prototype !== $StringPrototype) {
|
| 22 |
+
if (setProto) {
|
| 23 |
+
setProto(S, prototype);
|
| 24 |
+
} else {
|
| 25 |
+
throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
var length = value.length;
|
| 30 |
+
DefinePropertyOrThrow(S, 'length', {
|
| 31 |
+
'[[Configurable]]': false,
|
| 32 |
+
'[[Enumerable]]': false,
|
| 33 |
+
'[[Value]]': length,
|
| 34 |
+
'[[Writable]]': false
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
return S;
|
| 38 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/SymbolDescriptiveString.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
|
| 5 |
+
var callBound = require('call-bound');
|
| 6 |
+
|
| 7 |
+
var $SymbolToString = callBound('Symbol.prototype.toString', true);
|
| 8 |
+
|
| 9 |
+
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
|
| 10 |
+
|
| 11 |
+
module.exports = function SymbolDescriptiveString(sym) {
|
| 12 |
+
if (typeof sym !== 'symbol') {
|
| 13 |
+
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
|
| 14 |
+
}
|
| 15 |
+
return $SymbolToString(sym);
|
| 16 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TestIntegrityLevel.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $gOPD = require('gopd');
|
| 4 |
+
var $TypeError = require('es-errors/type');
|
| 5 |
+
|
| 6 |
+
var every = require('../helpers/every');
|
| 7 |
+
var OwnPropertyKeys = require('own-keys');
|
| 8 |
+
var isObject = require('es-object-atoms/isObject');
|
| 9 |
+
|
| 10 |
+
var IsDataDescriptor = require('./IsDataDescriptor');
|
| 11 |
+
var IsExtensible = require('./IsExtensible');
|
| 12 |
+
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
|
| 13 |
+
|
| 14 |
+
// https://262.ecma-international.org/6.0/#sec-testintegritylevel
|
| 15 |
+
|
| 16 |
+
module.exports = function TestIntegrityLevel(O, level) {
|
| 17 |
+
if (!isObject(O)) {
|
| 18 |
+
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
| 19 |
+
}
|
| 20 |
+
if (level !== 'sealed' && level !== 'frozen') {
|
| 21 |
+
throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
|
| 22 |
+
}
|
| 23 |
+
var status = IsExtensible(O);
|
| 24 |
+
if (status || !$gOPD) {
|
| 25 |
+
return false;
|
| 26 |
+
}
|
| 27 |
+
var theKeys = OwnPropertyKeys(O);
|
| 28 |
+
return theKeys.length === 0 || every(theKeys, function (k) {
|
| 29 |
+
var currentDesc = $gOPD(O, k);
|
| 30 |
+
if (typeof currentDesc !== 'undefined') {
|
| 31 |
+
if (currentDesc.configurable) {
|
| 32 |
+
return false;
|
| 33 |
+
}
|
| 34 |
+
if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) {
|
| 35 |
+
return false;
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
return true;
|
| 39 |
+
});
|
| 40 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TimeClip.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $Date = GetIntrinsic('%Date%');
|
| 6 |
+
|
| 7 |
+
var $isFinite = require('math-intrinsics/isFinite');
|
| 8 |
+
var abs = require('math-intrinsics/abs');
|
| 9 |
+
|
| 10 |
+
var ToNumber = require('./ToNumber');
|
| 11 |
+
|
| 12 |
+
// https://262.ecma-international.org/5.1/#sec-15.9.1.14
|
| 13 |
+
|
| 14 |
+
module.exports = function TimeClip(time) {
|
| 15 |
+
if (!$isFinite(time) || abs(time) > 8.64e15) {
|
| 16 |
+
return NaN;
|
| 17 |
+
}
|
| 18 |
+
return +new $Date(ToNumber(time));
|
| 19 |
+
};
|
| 20 |
+
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TimeFromYear.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var msPerDay = require('../helpers/timeConstants').msPerDay;
|
| 4 |
+
|
| 5 |
+
var DayFromYear = require('./DayFromYear');
|
| 6 |
+
|
| 7 |
+
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
|
| 8 |
+
|
| 9 |
+
module.exports = function TimeFromYear(y) {
|
| 10 |
+
return msPerDay * DayFromYear(y);
|
| 11 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TimeWithinDay.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var modulo = require('./modulo');
|
| 4 |
+
|
| 5 |
+
var msPerDay = require('../helpers/timeConstants').msPerDay;
|
| 6 |
+
|
| 7 |
+
// https://262.ecma-international.org/5.1/#sec-15.9.1.2
|
| 8 |
+
|
| 9 |
+
module.exports = function TimeWithinDay(t) {
|
| 10 |
+
return modulo(t, msPerDay);
|
| 11 |
+
};
|
| 12 |
+
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToBoolean.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
// http://262.ecma-international.org/5.1/#sec-9.2
|
| 4 |
+
|
| 5 |
+
module.exports = function ToBoolean(value) { return !!value; };
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToDateString.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $TypeError = require('es-errors/type');
|
| 6 |
+
var $Date = GetIntrinsic('%Date%');
|
| 7 |
+
var $String = GetIntrinsic('%String%');
|
| 8 |
+
|
| 9 |
+
var $isNaN = require('math-intrinsics/isNaN');
|
| 10 |
+
|
| 11 |
+
// https://262.ecma-international.org/6.0/#sec-todatestring
|
| 12 |
+
|
| 13 |
+
module.exports = function ToDateString(tv) {
|
| 14 |
+
if (typeof tv !== 'number') {
|
| 15 |
+
throw new $TypeError('Assertion failed: `tv` must be a Number');
|
| 16 |
+
}
|
| 17 |
+
if ($isNaN(tv)) {
|
| 18 |
+
return 'Invalid Date';
|
| 19 |
+
}
|
| 20 |
+
return $String(new $Date(tv));
|
| 21 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInt16.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ToUint16 = require('./ToUint16');
|
| 4 |
+
|
| 5 |
+
// https://262.ecma-international.org/6.0/#sec-toint16
|
| 6 |
+
|
| 7 |
+
module.exports = function ToInt16(argument) {
|
| 8 |
+
var int16bit = ToUint16(argument);
|
| 9 |
+
return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit;
|
| 10 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInt32.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ToNumber = require('./ToNumber');
|
| 4 |
+
|
| 5 |
+
// http://262.ecma-international.org/5.1/#sec-9.5
|
| 6 |
+
|
| 7 |
+
module.exports = function ToInt32(x) {
|
| 8 |
+
return ToNumber(x) >> 0;
|
| 9 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInt8.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ToUint8 = require('./ToUint8');
|
| 4 |
+
|
| 5 |
+
// https://262.ecma-international.org/6.0/#sec-toint8
|
| 6 |
+
|
| 7 |
+
module.exports = function ToInt8(argument) {
|
| 8 |
+
var int8bit = ToUint8(argument);
|
| 9 |
+
return int8bit >= 0x80 ? int8bit - 0x100 : int8bit;
|
| 10 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToInteger.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ES5ToInteger = require('../5/ToInteger');
|
| 4 |
+
|
| 5 |
+
var ToNumber = require('./ToNumber');
|
| 6 |
+
|
| 7 |
+
// https://262.ecma-international.org/6.0/#sec-tointeger
|
| 8 |
+
|
| 9 |
+
module.exports = function ToInteger(value) {
|
| 10 |
+
var number = ToNumber(value);
|
| 11 |
+
return ES5ToInteger(number);
|
| 12 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToLength.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
|
| 4 |
+
|
| 5 |
+
var ToInteger = require('./ToInteger');
|
| 6 |
+
|
| 7 |
+
// https://262.ecma-international.org/6.0/#sec-tolength
|
| 8 |
+
|
| 9 |
+
module.exports = function ToLength(argument) {
|
| 10 |
+
var len = ToInteger(argument);
|
| 11 |
+
if (len <= 0) { return 0; } // includes converting -0 to +0
|
| 12 |
+
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
|
| 13 |
+
return len;
|
| 14 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToNumber.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $TypeError = require('es-errors/type');
|
| 6 |
+
var $Number = GetIntrinsic('%Number%');
|
| 7 |
+
var $RegExp = GetIntrinsic('%RegExp%');
|
| 8 |
+
var $parseInteger = GetIntrinsic('%parseInt%');
|
| 9 |
+
|
| 10 |
+
var callBound = require('call-bound');
|
| 11 |
+
var regexTester = require('safe-regex-test');
|
| 12 |
+
var isPrimitive = require('../helpers/isPrimitive');
|
| 13 |
+
|
| 14 |
+
var $strSlice = callBound('String.prototype.slice');
|
| 15 |
+
var isBinary = regexTester(/^0b[01]+$/i);
|
| 16 |
+
var isOctal = regexTester(/^0o[0-7]+$/i);
|
| 17 |
+
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
|
| 18 |
+
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
|
| 19 |
+
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
|
| 20 |
+
var hasNonWS = regexTester(nonWSregex);
|
| 21 |
+
|
| 22 |
+
var $trim = require('string.prototype.trim');
|
| 23 |
+
|
| 24 |
+
var ToPrimitive = require('./ToPrimitive');
|
| 25 |
+
|
| 26 |
+
// https://262.ecma-international.org/6.0/#sec-tonumber
|
| 27 |
+
|
| 28 |
+
module.exports = function ToNumber(argument) {
|
| 29 |
+
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
|
| 30 |
+
if (typeof value === 'symbol') {
|
| 31 |
+
throw new $TypeError('Cannot convert a Symbol value to a number');
|
| 32 |
+
}
|
| 33 |
+
if (typeof value === 'string') {
|
| 34 |
+
if (isBinary(value)) {
|
| 35 |
+
return ToNumber($parseInteger($strSlice(value, 2), 2));
|
| 36 |
+
} else if (isOctal(value)) {
|
| 37 |
+
return ToNumber($parseInteger($strSlice(value, 2), 8));
|
| 38 |
+
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
|
| 39 |
+
return NaN;
|
| 40 |
+
}
|
| 41 |
+
var trimmed = $trim(value);
|
| 42 |
+
if (trimmed !== value) {
|
| 43 |
+
return ToNumber(trimmed);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
}
|
| 47 |
+
return +value;
|
| 48 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToObject.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
// https://262.ecma-international.org/6.0/#sec-toobject
|
| 4 |
+
|
| 5 |
+
module.exports = require('es-object-atoms/ToObject');
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToPrimitive.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var toPrimitive = require('es-to-primitive/es2015');
|
| 4 |
+
|
| 5 |
+
// https://262.ecma-international.org/6.0/#sec-toprimitive
|
| 6 |
+
|
| 7 |
+
module.exports = function ToPrimitive(input) {
|
| 8 |
+
if (arguments.length > 1) {
|
| 9 |
+
return toPrimitive(input, arguments[1]);
|
| 10 |
+
}
|
| 11 |
+
return toPrimitive(input);
|
| 12 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToPropertyDescriptor.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var hasOwn = require('hasown');
|
| 4 |
+
|
| 5 |
+
var $TypeError = require('es-errors/type');
|
| 6 |
+
var isObject = require('es-object-atoms/isObject');
|
| 7 |
+
|
| 8 |
+
var IsCallable = require('./IsCallable');
|
| 9 |
+
var ToBoolean = require('./ToBoolean');
|
| 10 |
+
|
| 11 |
+
// https://262.ecma-international.org/5.1/#sec-8.10.5
|
| 12 |
+
|
| 13 |
+
module.exports = function ToPropertyDescriptor(Obj) {
|
| 14 |
+
if (!isObject(Obj)) {
|
| 15 |
+
throw new $TypeError('ToPropertyDescriptor requires an object');
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
var desc = {};
|
| 19 |
+
if (hasOwn(Obj, 'enumerable')) {
|
| 20 |
+
desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
|
| 21 |
+
}
|
| 22 |
+
if (hasOwn(Obj, 'configurable')) {
|
| 23 |
+
desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
|
| 24 |
+
}
|
| 25 |
+
if (hasOwn(Obj, 'value')) {
|
| 26 |
+
desc['[[Value]]'] = Obj.value;
|
| 27 |
+
}
|
| 28 |
+
if (hasOwn(Obj, 'writable')) {
|
| 29 |
+
desc['[[Writable]]'] = ToBoolean(Obj.writable);
|
| 30 |
+
}
|
| 31 |
+
if (hasOwn(Obj, 'get')) {
|
| 32 |
+
var getter = Obj.get;
|
| 33 |
+
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
|
| 34 |
+
throw new $TypeError('getter must be a function');
|
| 35 |
+
}
|
| 36 |
+
desc['[[Get]]'] = getter;
|
| 37 |
+
}
|
| 38 |
+
if (hasOwn(Obj, 'set')) {
|
| 39 |
+
var setter = Obj.set;
|
| 40 |
+
if (typeof setter !== 'undefined' && !IsCallable(setter)) {
|
| 41 |
+
throw new $TypeError('setter must be a function');
|
| 42 |
+
}
|
| 43 |
+
desc['[[Set]]'] = setter;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) {
|
| 47 |
+
throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
|
| 48 |
+
}
|
| 49 |
+
return desc;
|
| 50 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToPropertyKey.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $String = GetIntrinsic('%String%');
|
| 6 |
+
|
| 7 |
+
var ToPrimitive = require('./ToPrimitive');
|
| 8 |
+
var ToString = require('./ToString');
|
| 9 |
+
|
| 10 |
+
// https://262.ecma-international.org/6.0/#sec-topropertykey
|
| 11 |
+
|
| 12 |
+
module.exports = function ToPropertyKey(argument) {
|
| 13 |
+
var key = ToPrimitive(argument, $String);
|
| 14 |
+
return typeof key === 'symbol' ? key : ToString(key);
|
| 15 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToString.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $String = GetIntrinsic('%String%');
|
| 6 |
+
var $TypeError = require('es-errors/type');
|
| 7 |
+
|
| 8 |
+
// https://262.ecma-international.org/6.0/#sec-tostring
|
| 9 |
+
|
| 10 |
+
module.exports = function ToString(argument) {
|
| 11 |
+
if (typeof argument === 'symbol') {
|
| 12 |
+
throw new $TypeError('Cannot convert a Symbol value to a string');
|
| 13 |
+
}
|
| 14 |
+
return $String(argument);
|
| 15 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint16.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var modulo = require('./modulo');
|
| 4 |
+
var ToNumber = require('./ToNumber');
|
| 5 |
+
|
| 6 |
+
var abs = require('math-intrinsics/abs');
|
| 7 |
+
var floor = require('math-intrinsics/floor');
|
| 8 |
+
var $isNaN = require('math-intrinsics/isNaN');
|
| 9 |
+
var $isFinite = require('math-intrinsics/isFinite');
|
| 10 |
+
var $sign = require('math-intrinsics/sign');
|
| 11 |
+
|
| 12 |
+
// http://262.ecma-international.org/5.1/#sec-9.7
|
| 13 |
+
|
| 14 |
+
module.exports = function ToUint16(value) {
|
| 15 |
+
var number = ToNumber(value);
|
| 16 |
+
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
|
| 17 |
+
var posInt = $sign(number) * floor(abs(number));
|
| 18 |
+
return modulo(posInt, 0x10000);
|
| 19 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint32.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ToNumber = require('./ToNumber');
|
| 4 |
+
|
| 5 |
+
// http://262.ecma-international.org/5.1/#sec-9.6
|
| 6 |
+
|
| 7 |
+
module.exports = function ToUint32(x) {
|
| 8 |
+
return ToNumber(x) >>> 0;
|
| 9 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint8.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ToNumber = require('./ToNumber');
|
| 4 |
+
|
| 5 |
+
var $isNaN = require('math-intrinsics/isNaN');
|
| 6 |
+
var $isFinite = require('math-intrinsics/isFinite');
|
| 7 |
+
var $sign = require('math-intrinsics/sign');
|
| 8 |
+
var abs = require('math-intrinsics/abs');
|
| 9 |
+
var floor = require('math-intrinsics/floor');
|
| 10 |
+
var modulo = require('math-intrinsics/mod');
|
| 11 |
+
|
| 12 |
+
// https://262.ecma-international.org/6.0/#sec-touint8
|
| 13 |
+
|
| 14 |
+
module.exports = function ToUint8(argument) {
|
| 15 |
+
var number = ToNumber(argument);
|
| 16 |
+
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
|
| 17 |
+
var posInt = $sign(number) * floor(abs(number));
|
| 18 |
+
return modulo(posInt, 0x100);
|
| 19 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ToUint8Clamp.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ToNumber = require('./ToNumber');
|
| 4 |
+
var floor = require('./floor');
|
| 5 |
+
|
| 6 |
+
var $isNaN = require('math-intrinsics/isNaN');
|
| 7 |
+
|
| 8 |
+
// https://262.ecma-international.org/6.0/#sec-touint8clamp
|
| 9 |
+
|
| 10 |
+
module.exports = function ToUint8Clamp(argument) {
|
| 11 |
+
var number = ToNumber(argument);
|
| 12 |
+
if ($isNaN(number) || number <= 0) { return 0; }
|
| 13 |
+
if (number >= 0xFF) { return 0xFF; }
|
| 14 |
+
var f = floor(number);
|
| 15 |
+
if (f + 0.5 < number) { return f + 1; }
|
| 16 |
+
if (number < f + 0.5) { return f; }
|
| 17 |
+
if (f % 2 !== 0) { return f + 1; }
|
| 18 |
+
return f;
|
| 19 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/Type.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ES5Type = require('../5/Type');
|
| 4 |
+
|
| 5 |
+
// https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values
|
| 6 |
+
|
| 7 |
+
module.exports = function Type(x) {
|
| 8 |
+
if (typeof x === 'symbol') {
|
| 9 |
+
return 'Symbol';
|
| 10 |
+
}
|
| 11 |
+
return ES5Type(x);
|
| 12 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TypedArrayCreate.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $SyntaxError = require('es-errors/syntax');
|
| 4 |
+
var $TypeError = require('es-errors/type');
|
| 5 |
+
|
| 6 |
+
var IsArray = require('./IsArray');
|
| 7 |
+
var IsConstructor = require('./IsConstructor');
|
| 8 |
+
var ValidateTypedArray = require('./ValidateTypedArray');
|
| 9 |
+
|
| 10 |
+
var availableTypedArrays = require('available-typed-arrays')();
|
| 11 |
+
var typedArrayLength = require('typed-array-length');
|
| 12 |
+
|
| 13 |
+
// https://262.ecma-international.org/7.0/#typedarray-create
|
| 14 |
+
|
| 15 |
+
module.exports = function TypedArrayCreate(constructor, argumentList) {
|
| 16 |
+
if (!IsConstructor(constructor)) {
|
| 17 |
+
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
|
| 18 |
+
}
|
| 19 |
+
if (!IsArray(argumentList)) {
|
| 20 |
+
throw new $TypeError('Assertion failed: `argumentList` must be a List');
|
| 21 |
+
}
|
| 22 |
+
if (availableTypedArrays.length === 0) {
|
| 23 |
+
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
// var newTypedArray = Construct(constructor, argumentList); // step 1
|
| 27 |
+
var newTypedArray;
|
| 28 |
+
if (argumentList.length === 0) {
|
| 29 |
+
newTypedArray = new constructor();
|
| 30 |
+
} else if (argumentList.length === 1) {
|
| 31 |
+
newTypedArray = new constructor(argumentList[0]);
|
| 32 |
+
} else if (argumentList.length === 2) {
|
| 33 |
+
newTypedArray = new constructor(argumentList[0], argumentList[1]);
|
| 34 |
+
} else {
|
| 35 |
+
newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
ValidateTypedArray(newTypedArray); // step 2
|
| 39 |
+
|
| 40 |
+
if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3
|
| 41 |
+
if (typedArrayLength(newTypedArray) < argumentList[0]) {
|
| 42 |
+
throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
return newTypedArray; // step 4
|
| 47 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/TypedArraySpeciesCreate.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $SyntaxError = require('es-errors/syntax');
|
| 4 |
+
var $TypeError = require('es-errors/type');
|
| 5 |
+
|
| 6 |
+
var whichTypedArray = require('which-typed-array');
|
| 7 |
+
var availableTypedArrays = require('available-typed-arrays')();
|
| 8 |
+
|
| 9 |
+
var IsArray = require('./IsArray');
|
| 10 |
+
var SpeciesConstructor = require('./SpeciesConstructor');
|
| 11 |
+
var TypedArrayCreate = require('./TypedArrayCreate');
|
| 12 |
+
|
| 13 |
+
var getConstructor = require('../helpers/typedArrayConstructors');
|
| 14 |
+
|
| 15 |
+
// https://262.ecma-international.org/7.0/#typedarray-species-create
|
| 16 |
+
|
| 17 |
+
module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) {
|
| 18 |
+
if (availableTypedArrays.length === 0) {
|
| 19 |
+
throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment');
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
var kind = whichTypedArray(exemplar);
|
| 23 |
+
if (!kind) {
|
| 24 |
+
throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1
|
| 25 |
+
}
|
| 26 |
+
if (!IsArray(argumentList)) {
|
| 27 |
+
throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
var defaultConstructor = getConstructor(kind); // step 2
|
| 31 |
+
if (typeof defaultConstructor !== 'function') {
|
| 32 |
+
throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!');
|
| 33 |
+
}
|
| 34 |
+
var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3
|
| 35 |
+
|
| 36 |
+
return TypedArrayCreate(constructor, argumentList); // step 4
|
| 37 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/UTF16Decode.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $TypeError = require('es-errors/type');
|
| 6 |
+
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
|
| 7 |
+
|
| 8 |
+
// https://262.ecma-international.org/7.0/#sec-utf16decode
|
| 9 |
+
|
| 10 |
+
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
|
| 11 |
+
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
|
| 12 |
+
|
| 13 |
+
// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair
|
| 14 |
+
|
| 15 |
+
module.exports = function UTF16Decode(lead, trail) {
|
| 16 |
+
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
|
| 17 |
+
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
|
| 18 |
+
}
|
| 19 |
+
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
|
| 20 |
+
return $fromCharCode(lead) + $fromCharCode(trail);
|
| 21 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/UTF16Encoding.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $TypeError = require('es-errors/type');
|
| 6 |
+
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
|
| 7 |
+
|
| 8 |
+
var floor = require('./floor');
|
| 9 |
+
var modulo = require('./modulo');
|
| 10 |
+
|
| 11 |
+
var isCodePoint = require('../helpers/isCodePoint');
|
| 12 |
+
|
| 13 |
+
// https://262.ecma-international.org/7.0/#sec-utf16encoding
|
| 14 |
+
|
| 15 |
+
module.exports = function UTF16Encoding(cp) {
|
| 16 |
+
if (!isCodePoint(cp)) {
|
| 17 |
+
throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF');
|
| 18 |
+
}
|
| 19 |
+
if (cp <= 65535) {
|
| 20 |
+
return $fromCharCode(cp);
|
| 21 |
+
}
|
| 22 |
+
var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800);
|
| 23 |
+
var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00);
|
| 24 |
+
return cu1 + cu2;
|
| 25 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ValidateAndApplyPropertyDescriptor.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
var isObject = require('es-object-atoms/isObject');
|
| 5 |
+
|
| 6 |
+
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
|
| 7 |
+
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
|
| 8 |
+
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
|
| 9 |
+
|
| 10 |
+
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
|
| 11 |
+
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
|
| 12 |
+
var IsDataDescriptor = require('./IsDataDescriptor');
|
| 13 |
+
var IsGenericDescriptor = require('./IsGenericDescriptor');
|
| 14 |
+
var isPropertyKey = require('../helpers/isPropertyKey');
|
| 15 |
+
var SameValue = require('./SameValue');
|
| 16 |
+
|
| 17 |
+
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
|
| 18 |
+
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
|
| 19 |
+
|
| 20 |
+
// eslint-disable-next-line max-lines-per-function, max-statements
|
| 21 |
+
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
|
| 22 |
+
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
|
| 23 |
+
if (typeof O !== 'undefined' && !isObject(O)) {
|
| 24 |
+
throw new $TypeError('Assertion failed: O must be undefined or an Object');
|
| 25 |
+
}
|
| 26 |
+
if (typeof extensible !== 'boolean') {
|
| 27 |
+
throw new $TypeError('Assertion failed: extensible must be a Boolean');
|
| 28 |
+
}
|
| 29 |
+
if (!isPropertyDescriptor(Desc)) {
|
| 30 |
+
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
|
| 31 |
+
}
|
| 32 |
+
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
|
| 33 |
+
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
|
| 34 |
+
}
|
| 35 |
+
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
|
| 36 |
+
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
|
| 37 |
+
}
|
| 38 |
+
if (typeof current === 'undefined') {
|
| 39 |
+
if (!extensible) {
|
| 40 |
+
return false;
|
| 41 |
+
}
|
| 42 |
+
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
|
| 43 |
+
if (typeof O !== 'undefined') {
|
| 44 |
+
DefineOwnProperty(
|
| 45 |
+
IsDataDescriptor,
|
| 46 |
+
SameValue,
|
| 47 |
+
FromPropertyDescriptor,
|
| 48 |
+
O,
|
| 49 |
+
P,
|
| 50 |
+
{
|
| 51 |
+
'[[Configurable]]': Desc['[[Configurable]]'],
|
| 52 |
+
'[[Enumerable]]': Desc['[[Enumerable]]'],
|
| 53 |
+
'[[Value]]': Desc['[[Value]]'],
|
| 54 |
+
'[[Writable]]': Desc['[[Writable]]']
|
| 55 |
+
}
|
| 56 |
+
);
|
| 57 |
+
}
|
| 58 |
+
} else {
|
| 59 |
+
if (!IsAccessorDescriptor(Desc)) {
|
| 60 |
+
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
|
| 61 |
+
}
|
| 62 |
+
if (typeof O !== 'undefined') {
|
| 63 |
+
return DefineOwnProperty(
|
| 64 |
+
IsDataDescriptor,
|
| 65 |
+
SameValue,
|
| 66 |
+
FromPropertyDescriptor,
|
| 67 |
+
O,
|
| 68 |
+
P,
|
| 69 |
+
Desc
|
| 70 |
+
);
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
return true;
|
| 74 |
+
}
|
| 75 |
+
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
|
| 76 |
+
return true;
|
| 77 |
+
}
|
| 78 |
+
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
|
| 79 |
+
return true; // removed by ES2017, but should still be correct
|
| 80 |
+
}
|
| 81 |
+
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
|
| 82 |
+
if (!current['[[Configurable]]']) {
|
| 83 |
+
if (Desc['[[Configurable]]']) {
|
| 84 |
+
return false;
|
| 85 |
+
}
|
| 86 |
+
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
|
| 87 |
+
return false;
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
if (IsGenericDescriptor(Desc)) {
|
| 91 |
+
// no further validation is required.
|
| 92 |
+
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
|
| 93 |
+
if (!current['[[Configurable]]']) {
|
| 94 |
+
return false;
|
| 95 |
+
}
|
| 96 |
+
if (IsDataDescriptor(current)) {
|
| 97 |
+
if (typeof O !== 'undefined') {
|
| 98 |
+
DefineOwnProperty(
|
| 99 |
+
IsDataDescriptor,
|
| 100 |
+
SameValue,
|
| 101 |
+
FromPropertyDescriptor,
|
| 102 |
+
O,
|
| 103 |
+
P,
|
| 104 |
+
{
|
| 105 |
+
'[[Configurable]]': current['[[Configurable]]'],
|
| 106 |
+
'[[Enumerable]]': current['[[Enumerable]]'],
|
| 107 |
+
'[[Get]]': undefined
|
| 108 |
+
}
|
| 109 |
+
);
|
| 110 |
+
}
|
| 111 |
+
} else if (typeof O !== 'undefined') {
|
| 112 |
+
DefineOwnProperty(
|
| 113 |
+
IsDataDescriptor,
|
| 114 |
+
SameValue,
|
| 115 |
+
FromPropertyDescriptor,
|
| 116 |
+
O,
|
| 117 |
+
P,
|
| 118 |
+
{
|
| 119 |
+
'[[Configurable]]': current['[[Configurable]]'],
|
| 120 |
+
'[[Enumerable]]': current['[[Enumerable]]'],
|
| 121 |
+
'[[Value]]': undefined
|
| 122 |
+
}
|
| 123 |
+
);
|
| 124 |
+
}
|
| 125 |
+
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
|
| 126 |
+
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
|
| 127 |
+
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
|
| 128 |
+
return false;
|
| 129 |
+
}
|
| 130 |
+
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
|
| 131 |
+
return false;
|
| 132 |
+
}
|
| 133 |
+
return true;
|
| 134 |
+
}
|
| 135 |
+
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
|
| 136 |
+
if (!current['[[Configurable]]']) {
|
| 137 |
+
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
|
| 138 |
+
return false;
|
| 139 |
+
}
|
| 140 |
+
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
|
| 141 |
+
return false;
|
| 142 |
+
}
|
| 143 |
+
return true;
|
| 144 |
+
}
|
| 145 |
+
} else {
|
| 146 |
+
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
|
| 147 |
+
}
|
| 148 |
+
if (typeof O !== 'undefined') {
|
| 149 |
+
return DefineOwnProperty(
|
| 150 |
+
IsDataDescriptor,
|
| 151 |
+
SameValue,
|
| 152 |
+
FromPropertyDescriptor,
|
| 153 |
+
O,
|
| 154 |
+
P,
|
| 155 |
+
Desc
|
| 156 |
+
);
|
| 157 |
+
}
|
| 158 |
+
return true;
|
| 159 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/ValidateTypedArray.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
var isObject = require('es-object-atoms/isObject');
|
| 5 |
+
|
| 6 |
+
var IsDetachedBuffer = require('./IsDetachedBuffer');
|
| 7 |
+
|
| 8 |
+
var isTypedArray = require('is-typed-array');
|
| 9 |
+
var typedArrayBuffer = require('typed-array-buffer');
|
| 10 |
+
|
| 11 |
+
// https://262.ecma-international.org/6.0/#sec-validatetypedarray
|
| 12 |
+
|
| 13 |
+
module.exports = function ValidateTypedArray(O) {
|
| 14 |
+
if (!isObject(O)) {
|
| 15 |
+
throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1
|
| 16 |
+
}
|
| 17 |
+
if (!isTypedArray(O)) {
|
| 18 |
+
throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 2 - 3
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
var buffer = typedArrayBuffer(O); // step 4
|
| 22 |
+
|
| 23 |
+
if (IsDetachedBuffer(buffer)) {
|
| 24 |
+
throw new $TypeError('`O` must be backed by a non-detached buffer'); // step 5
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
return buffer; // step 6
|
| 28 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/WeekDay.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Day = require('./Day');
|
| 4 |
+
var modulo = require('./modulo');
|
| 5 |
+
|
| 6 |
+
// https://262.ecma-international.org/5.1/#sec-15.9.1.6
|
| 7 |
+
|
| 8 |
+
module.exports = function WeekDay(t) {
|
| 9 |
+
return modulo(Day(t) + 4, 7);
|
| 10 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/YearFromTime.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $Date = GetIntrinsic('%Date%');
|
| 6 |
+
|
| 7 |
+
var callBound = require('call-bound');
|
| 8 |
+
|
| 9 |
+
var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
|
| 10 |
+
|
| 11 |
+
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
|
| 12 |
+
|
| 13 |
+
module.exports = function YearFromTime(t) {
|
| 14 |
+
// largest y such that this.TimeFromYear(y) <= t
|
| 15 |
+
return $getUTCFullYear(new $Date(t));
|
| 16 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisBooleanValue.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $BooleanValueOf = require('call-bound')('Boolean.prototype.valueOf');
|
| 4 |
+
|
| 5 |
+
// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object
|
| 6 |
+
|
| 7 |
+
module.exports = function thisBooleanValue(value) {
|
| 8 |
+
if (typeof value === 'boolean') {
|
| 9 |
+
return value;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
return $BooleanValueOf(value);
|
| 13 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisNumberValue.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var callBound = require('call-bound');
|
| 4 |
+
|
| 5 |
+
var $NumberValueOf = callBound('Number.prototype.valueOf');
|
| 6 |
+
|
| 7 |
+
// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object
|
| 8 |
+
|
| 9 |
+
module.exports = function thisNumberValue(value) {
|
| 10 |
+
if (typeof value === 'number') {
|
| 11 |
+
return value;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
return $NumberValueOf(value);
|
| 15 |
+
};
|
| 16 |
+
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisStringValue.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $StringValueOf = require('call-bound')('String.prototype.valueOf');
|
| 4 |
+
|
| 5 |
+
// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object
|
| 6 |
+
|
| 7 |
+
module.exports = function thisStringValue(value) {
|
| 8 |
+
if (typeof value === 'string') {
|
| 9 |
+
return value;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
return $StringValueOf(value);
|
| 13 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2016/thisTimeValue.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var timeValue = require('../helpers/timeValue');
|
| 4 |
+
|
| 5 |
+
// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object
|
| 6 |
+
|
| 7 |
+
module.exports = function thisTimeValue(value) {
|
| 8 |
+
return timeValue(value);
|
| 9 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/AbstractEqualityComparison.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var ToNumber = require('./ToNumber');
|
| 4 |
+
var ToPrimitive = require('./ToPrimitive');
|
| 5 |
+
|
| 6 |
+
var isSameType = require('../helpers/isSameType');
|
| 7 |
+
|
| 8 |
+
var isObject = require('es-object-atoms/isObject');
|
| 9 |
+
|
| 10 |
+
// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison
|
| 11 |
+
|
| 12 |
+
module.exports = function AbstractEqualityComparison(x, y) {
|
| 13 |
+
if (isSameType(x, y)) {
|
| 14 |
+
return x === y; // ES6+ specified this shortcut anyways.
|
| 15 |
+
}
|
| 16 |
+
if (x == null && y == null) {
|
| 17 |
+
return true;
|
| 18 |
+
}
|
| 19 |
+
if (typeof x === 'number' && typeof y === 'string') {
|
| 20 |
+
return AbstractEqualityComparison(x, ToNumber(y));
|
| 21 |
+
}
|
| 22 |
+
if (typeof x === 'string' && typeof y === 'number') {
|
| 23 |
+
return AbstractEqualityComparison(ToNumber(x), y);
|
| 24 |
+
}
|
| 25 |
+
if (typeof x === 'boolean') {
|
| 26 |
+
return AbstractEqualityComparison(ToNumber(x), y);
|
| 27 |
+
}
|
| 28 |
+
if (typeof y === 'boolean') {
|
| 29 |
+
return AbstractEqualityComparison(x, ToNumber(y));
|
| 30 |
+
}
|
| 31 |
+
if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'symbol') && isObject(y)) {
|
| 32 |
+
return AbstractEqualityComparison(x, ToPrimitive(y));
|
| 33 |
+
}
|
| 34 |
+
if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'symbol')) {
|
| 35 |
+
return AbstractEqualityComparison(ToPrimitive(x), y);
|
| 36 |
+
}
|
| 37 |
+
return false;
|
| 38 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/AbstractRelationalComparison.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $Number = GetIntrinsic('%Number%');
|
| 6 |
+
var $TypeError = require('es-errors/type');
|
| 7 |
+
var $isNaN = require('math-intrinsics/isNaN');
|
| 8 |
+
var $isFinite = require('math-intrinsics/isFinite');
|
| 9 |
+
|
| 10 |
+
var isPrefixOf = require('../helpers/isPrefixOf');
|
| 11 |
+
|
| 12 |
+
var ToNumber = require('./ToNumber');
|
| 13 |
+
var ToPrimitive = require('./ToPrimitive');
|
| 14 |
+
|
| 15 |
+
// https://262.ecma-international.org/5.1/#sec-11.8.5
|
| 16 |
+
|
| 17 |
+
// eslint-disable-next-line max-statements
|
| 18 |
+
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
|
| 19 |
+
if (typeof LeftFirst !== 'boolean') {
|
| 20 |
+
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
|
| 21 |
+
}
|
| 22 |
+
var px;
|
| 23 |
+
var py;
|
| 24 |
+
if (LeftFirst) {
|
| 25 |
+
px = ToPrimitive(x, $Number);
|
| 26 |
+
py = ToPrimitive(y, $Number);
|
| 27 |
+
} else {
|
| 28 |
+
py = ToPrimitive(y, $Number);
|
| 29 |
+
px = ToPrimitive(x, $Number);
|
| 30 |
+
}
|
| 31 |
+
var bothStrings = typeof px === 'string' && typeof py === 'string';
|
| 32 |
+
if (!bothStrings) {
|
| 33 |
+
var nx = ToNumber(px);
|
| 34 |
+
var ny = ToNumber(py);
|
| 35 |
+
if ($isNaN(nx) || $isNaN(ny)) {
|
| 36 |
+
return undefined;
|
| 37 |
+
}
|
| 38 |
+
if ($isFinite(nx) && $isFinite(ny) && nx === ny) {
|
| 39 |
+
return false;
|
| 40 |
+
}
|
| 41 |
+
if (nx === Infinity) {
|
| 42 |
+
return false;
|
| 43 |
+
}
|
| 44 |
+
if (ny === Infinity) {
|
| 45 |
+
return true;
|
| 46 |
+
}
|
| 47 |
+
if (ny === -Infinity) {
|
| 48 |
+
return false;
|
| 49 |
+
}
|
| 50 |
+
if (nx === -Infinity) {
|
| 51 |
+
return true;
|
| 52 |
+
}
|
| 53 |
+
return nx < ny; // by now, these are both nonzero, finite, and not equal
|
| 54 |
+
}
|
| 55 |
+
if (isPrefixOf(py, px)) {
|
| 56 |
+
return false;
|
| 57 |
+
}
|
| 58 |
+
if (isPrefixOf(px, py)) {
|
| 59 |
+
return true;
|
| 60 |
+
}
|
| 61 |
+
return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f
|
| 62 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/AdvanceStringIndex.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var isInteger = require('math-intrinsics/isInteger');
|
| 4 |
+
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
|
| 5 |
+
|
| 6 |
+
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
|
| 7 |
+
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
|
| 8 |
+
|
| 9 |
+
var $TypeError = require('es-errors/type');
|
| 10 |
+
|
| 11 |
+
var $charCodeAt = require('call-bound')('String.prototype.charCodeAt');
|
| 12 |
+
|
| 13 |
+
// https://262.ecma-international.org/6.0/#sec-advancestringindex
|
| 14 |
+
|
| 15 |
+
module.exports = function AdvanceStringIndex(S, index, unicode) {
|
| 16 |
+
if (typeof S !== 'string') {
|
| 17 |
+
throw new $TypeError('Assertion failed: `S` must be a String');
|
| 18 |
+
}
|
| 19 |
+
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
|
| 20 |
+
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
|
| 21 |
+
}
|
| 22 |
+
if (typeof unicode !== 'boolean') {
|
| 23 |
+
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
|
| 24 |
+
}
|
| 25 |
+
if (!unicode) {
|
| 26 |
+
return index + 1;
|
| 27 |
+
}
|
| 28 |
+
var length = S.length;
|
| 29 |
+
if ((index + 1) >= length) {
|
| 30 |
+
return index + 1;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
var first = $charCodeAt(S, index);
|
| 34 |
+
if (!isLeadingSurrogate(first)) {
|
| 35 |
+
return index + 1;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
var second = $charCodeAt(S, index + 1);
|
| 39 |
+
if (!isTrailingSurrogate(second)) {
|
| 40 |
+
return index + 1;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
return index + 2;
|
| 44 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/ArrayCreate.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
|
| 6 |
+
var $RangeError = require('es-errors/range');
|
| 7 |
+
var $SyntaxError = require('es-errors/syntax');
|
| 8 |
+
var $TypeError = require('es-errors/type');
|
| 9 |
+
var isInteger = require('math-intrinsics/isInteger');
|
| 10 |
+
var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
|
| 11 |
+
var $setProto = require('set-proto');
|
| 12 |
+
|
| 13 |
+
// https://262.ecma-international.org/6.0/#sec-arraycreate
|
| 14 |
+
|
| 15 |
+
module.exports = function ArrayCreate(length) {
|
| 16 |
+
if (!isInteger(length) || length < 0) {
|
| 17 |
+
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
|
| 18 |
+
}
|
| 19 |
+
if (length > MAX_ARRAY_LENGTH) {
|
| 20 |
+
throw new $RangeError('length is greater than (2**32 - 1)');
|
| 21 |
+
}
|
| 22 |
+
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
|
| 23 |
+
var A = []; // steps 5 - 7, and 9
|
| 24 |
+
if (proto !== $ArrayPrototype) { // step 8
|
| 25 |
+
if (!$setProto) {
|
| 26 |
+
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
|
| 27 |
+
}
|
| 28 |
+
$setProto(A, proto);
|
| 29 |
+
}
|
| 30 |
+
if (length !== 0) { // bypasses the need for step 2
|
| 31 |
+
A.length = length;
|
| 32 |
+
}
|
| 33 |
+
/* step 10, the above as a shortcut for the below
|
| 34 |
+
OrdinaryDefineOwnProperty(A, 'length', {
|
| 35 |
+
'[[Configurable]]': false,
|
| 36 |
+
'[[Enumerable]]': false,
|
| 37 |
+
'[[Value]]': length,
|
| 38 |
+
'[[Writable]]': true
|
| 39 |
+
});
|
| 40 |
+
*/
|
| 41 |
+
return A;
|
| 42 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/ArraySetLength.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $RangeError = require('es-errors/range');
|
| 4 |
+
var $TypeError = require('es-errors/type');
|
| 5 |
+
|
| 6 |
+
var assign = require('object.assign');
|
| 7 |
+
|
| 8 |
+
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
|
| 9 |
+
|
| 10 |
+
var IsArray = require('./IsArray');
|
| 11 |
+
var IsDataDescriptor = require('./IsDataDescriptor');
|
| 12 |
+
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
|
| 13 |
+
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
|
| 14 |
+
var ToNumber = require('./ToNumber');
|
| 15 |
+
var ToString = require('./ToString');
|
| 16 |
+
var ToUint32 = require('./ToUint32');
|
| 17 |
+
|
| 18 |
+
// https://262.ecma-international.org/6.0/#sec-arraysetlength
|
| 19 |
+
|
| 20 |
+
// eslint-disable-next-line max-statements, max-lines-per-function
|
| 21 |
+
module.exports = function ArraySetLength(A, Desc) {
|
| 22 |
+
if (!IsArray(A)) {
|
| 23 |
+
throw new $TypeError('Assertion failed: A must be an Array');
|
| 24 |
+
}
|
| 25 |
+
if (!isPropertyDescriptor(Desc)) {
|
| 26 |
+
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
|
| 27 |
+
}
|
| 28 |
+
if (!('[[Value]]' in Desc)) {
|
| 29 |
+
return OrdinaryDefineOwnProperty(A, 'length', Desc);
|
| 30 |
+
}
|
| 31 |
+
var newLenDesc = assign({}, Desc);
|
| 32 |
+
var newLen = ToUint32(Desc['[[Value]]']);
|
| 33 |
+
var numberLen = ToNumber(Desc['[[Value]]']);
|
| 34 |
+
if (newLen !== numberLen) {
|
| 35 |
+
throw new $RangeError('Invalid array length');
|
| 36 |
+
}
|
| 37 |
+
newLenDesc['[[Value]]'] = newLen;
|
| 38 |
+
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
|
| 39 |
+
if (!IsDataDescriptor(oldLenDesc)) {
|
| 40 |
+
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
|
| 41 |
+
}
|
| 42 |
+
var oldLen = oldLenDesc['[[Value]]'];
|
| 43 |
+
if (newLen >= oldLen) {
|
| 44 |
+
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
|
| 45 |
+
}
|
| 46 |
+
if (!oldLenDesc['[[Writable]]']) {
|
| 47 |
+
return false;
|
| 48 |
+
}
|
| 49 |
+
var newWritable;
|
| 50 |
+
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
|
| 51 |
+
newWritable = true;
|
| 52 |
+
} else {
|
| 53 |
+
newWritable = false;
|
| 54 |
+
newLenDesc['[[Writable]]'] = true;
|
| 55 |
+
}
|
| 56 |
+
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
|
| 57 |
+
if (!succeeded) {
|
| 58 |
+
return false;
|
| 59 |
+
}
|
| 60 |
+
while (newLen < oldLen) {
|
| 61 |
+
oldLen -= 1;
|
| 62 |
+
// eslint-disable-next-line no-param-reassign
|
| 63 |
+
var deleteSucceeded = delete A[ToString(oldLen)];
|
| 64 |
+
if (!deleteSucceeded) {
|
| 65 |
+
newLenDesc['[[Value]]'] = oldLen + 1;
|
| 66 |
+
if (!newWritable) {
|
| 67 |
+
newLenDesc['[[Writable]]'] = false;
|
| 68 |
+
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
|
| 69 |
+
return false;
|
| 70 |
+
}
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
if (!newWritable) {
|
| 74 |
+
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
|
| 75 |
+
}
|
| 76 |
+
return true;
|
| 77 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/ArraySpeciesCreate.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
|
| 5 |
+
var $Array = GetIntrinsic('%Array%');
|
| 6 |
+
var $species = GetIntrinsic('%Symbol.species%', true);
|
| 7 |
+
var $TypeError = require('es-errors/type');
|
| 8 |
+
var isInteger = require('math-intrinsics/isInteger');
|
| 9 |
+
var isObject = require('es-object-atoms/isObject');
|
| 10 |
+
|
| 11 |
+
var Get = require('./Get');
|
| 12 |
+
var IsArray = require('./IsArray');
|
| 13 |
+
var IsConstructor = require('./IsConstructor');
|
| 14 |
+
|
| 15 |
+
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
|
| 16 |
+
|
| 17 |
+
module.exports = function ArraySpeciesCreate(originalArray, length) {
|
| 18 |
+
if (!isInteger(length) || length < 0) {
|
| 19 |
+
throw new $TypeError('Assertion failed: length must be an integer >= 0');
|
| 20 |
+
}
|
| 21 |
+
var len = length === 0 ? 0 : length;
|
| 22 |
+
var C;
|
| 23 |
+
var isArray = IsArray(originalArray);
|
| 24 |
+
if (isArray) {
|
| 25 |
+
C = Get(originalArray, 'constructor');
|
| 26 |
+
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
|
| 27 |
+
// if (IsConstructor(C)) {
|
| 28 |
+
// if C is another realm's Array, C = undefined
|
| 29 |
+
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
|
| 30 |
+
// }
|
| 31 |
+
if ($species && isObject(C)) {
|
| 32 |
+
C = Get(C, $species);
|
| 33 |
+
if (C === null) {
|
| 34 |
+
C = void 0;
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
if (typeof C === 'undefined') {
|
| 39 |
+
return $Array(len);
|
| 40 |
+
}
|
| 41 |
+
if (!IsConstructor(C)) {
|
| 42 |
+
throw new $TypeError('C must be a constructor');
|
| 43 |
+
}
|
| 44 |
+
return new C(len); // Construct(C, len);
|
| 45 |
+
};
|
| 46 |
+
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/Call.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
var callBound = require('call-bound');
|
| 5 |
+
|
| 6 |
+
var $TypeError = require('es-errors/type');
|
| 7 |
+
|
| 8 |
+
var IsArray = require('./IsArray');
|
| 9 |
+
|
| 10 |
+
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
|
| 11 |
+
|
| 12 |
+
// https://262.ecma-international.org/6.0/#sec-call
|
| 13 |
+
|
| 14 |
+
module.exports = function Call(F, V) {
|
| 15 |
+
var argumentsList = arguments.length > 2 ? arguments[2] : [];
|
| 16 |
+
if (!IsArray(argumentsList)) {
|
| 17 |
+
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
|
| 18 |
+
}
|
| 19 |
+
return $apply(F, V, argumentsList);
|
| 20 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CanonicalNumericIndexString.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
|
| 5 |
+
var SameValue = require('./SameValue');
|
| 6 |
+
var ToNumber = require('./ToNumber');
|
| 7 |
+
var ToString = require('./ToString');
|
| 8 |
+
|
| 9 |
+
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
|
| 10 |
+
|
| 11 |
+
module.exports = function CanonicalNumericIndexString(argument) {
|
| 12 |
+
if (typeof argument !== 'string') {
|
| 13 |
+
throw new $TypeError('Assertion failed: `argument` must be a String');
|
| 14 |
+
}
|
| 15 |
+
if (argument === '-0') { return -0; }
|
| 16 |
+
var n = ToNumber(argument);
|
| 17 |
+
if (SameValue(ToString(n), argument)) { return n; }
|
| 18 |
+
return void 0;
|
| 19 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/Canonicalize.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
|
| 5 |
+
var callBound = require('call-bound');
|
| 6 |
+
var hasOwn = require('hasown');
|
| 7 |
+
|
| 8 |
+
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
| 9 |
+
var $toUpperCase = callBound('String.prototype.toUpperCase');
|
| 10 |
+
|
| 11 |
+
var caseFolding = require('../helpers/caseFolding.json');
|
| 12 |
+
|
| 13 |
+
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
|
| 14 |
+
|
| 15 |
+
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
|
| 16 |
+
if (typeof ch !== 'string') {
|
| 17 |
+
throw new $TypeError('Assertion failed: `ch` must be a character');
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
|
| 21 |
+
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
if (!IgnoreCase) {
|
| 25 |
+
return ch; // step 1
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
if (Unicode) { // step 2
|
| 29 |
+
if (hasOwn(caseFolding.C, ch)) {
|
| 30 |
+
return caseFolding.C[ch];
|
| 31 |
+
}
|
| 32 |
+
if (hasOwn(caseFolding.S, ch)) {
|
| 33 |
+
return caseFolding.S[ch];
|
| 34 |
+
}
|
| 35 |
+
return ch; // step 2.b
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
var u = $toUpperCase(ch); // step 2
|
| 39 |
+
|
| 40 |
+
if (u.length !== 1) {
|
| 41 |
+
return ch; // step 3
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
var cu = u; // step 4
|
| 45 |
+
|
| 46 |
+
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
|
| 47 |
+
return ch; // step 5
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
return cu;
|
| 51 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CharacterRange.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var GetIntrinsic = require('get-intrinsic');
|
| 4 |
+
var callBound = require('call-bound');
|
| 5 |
+
|
| 6 |
+
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
|
| 7 |
+
var $TypeError = require('es-errors/type');
|
| 8 |
+
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
| 9 |
+
|
| 10 |
+
var CharSet = require('../helpers/CharSet').CharSet;
|
| 11 |
+
|
| 12 |
+
module.exports = function CharacterRange(A, B) {
|
| 13 |
+
var a;
|
| 14 |
+
var b;
|
| 15 |
+
|
| 16 |
+
if (A instanceof CharSet || B instanceof CharSet) {
|
| 17 |
+
if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
|
| 18 |
+
throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
A.yield(function (c) {
|
| 22 |
+
if (typeof a !== 'undefined') {
|
| 23 |
+
throw new $TypeError('Assertion failed: CharSet A has more than one character');
|
| 24 |
+
}
|
| 25 |
+
a = c;
|
| 26 |
+
});
|
| 27 |
+
B.yield(function (c) {
|
| 28 |
+
if (typeof b !== 'undefined') {
|
| 29 |
+
throw new $TypeError('Assertion failed: CharSet B has more than one character');
|
| 30 |
+
}
|
| 31 |
+
b = c;
|
| 32 |
+
});
|
| 33 |
+
} else {
|
| 34 |
+
if (A.length !== 1 || B.length !== 1) {
|
| 35 |
+
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
|
| 36 |
+
}
|
| 37 |
+
a = A[0];
|
| 38 |
+
b = B[0];
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
var i = $charCodeAt(a, 0);
|
| 42 |
+
var j = $charCodeAt(b, 0);
|
| 43 |
+
|
| 44 |
+
if (!(i <= j)) {
|
| 45 |
+
throw new $TypeError('Assertion failed: i is not <= j');
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
var arr = [];
|
| 49 |
+
for (var k = i; k <= j; k += 1) {
|
| 50 |
+
arr[arr.length] = $fromCharCode(k);
|
| 51 |
+
}
|
| 52 |
+
return arr;
|
| 53 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CompletePropertyDescriptor.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
|
| 5 |
+
var hasOwn = require('hasown');
|
| 6 |
+
|
| 7 |
+
var IsDataDescriptor = require('./IsDataDescriptor');
|
| 8 |
+
var IsGenericDescriptor = require('./IsGenericDescriptor');
|
| 9 |
+
|
| 10 |
+
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
|
| 11 |
+
|
| 12 |
+
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
|
| 13 |
+
|
| 14 |
+
module.exports = function CompletePropertyDescriptor(Desc) {
|
| 15 |
+
if (!isPropertyDescriptor(Desc)) {
|
| 16 |
+
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
/* eslint no-param-reassign: 0 */
|
| 20 |
+
|
| 21 |
+
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
|
| 22 |
+
if (!hasOwn(Desc, '[[Value]]')) {
|
| 23 |
+
Desc['[[Value]]'] = void 0;
|
| 24 |
+
}
|
| 25 |
+
if (!hasOwn(Desc, '[[Writable]]')) {
|
| 26 |
+
Desc['[[Writable]]'] = false;
|
| 27 |
+
}
|
| 28 |
+
} else {
|
| 29 |
+
if (!hasOwn(Desc, '[[Get]]')) {
|
| 30 |
+
Desc['[[Get]]'] = void 0;
|
| 31 |
+
}
|
| 32 |
+
if (!hasOwn(Desc, '[[Set]]')) {
|
| 33 |
+
Desc['[[Set]]'] = void 0;
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
if (!hasOwn(Desc, '[[Enumerable]]')) {
|
| 37 |
+
Desc['[[Enumerable]]'] = false;
|
| 38 |
+
}
|
| 39 |
+
if (!hasOwn(Desc, '[[Configurable]]')) {
|
| 40 |
+
Desc['[[Configurable]]'] = false;
|
| 41 |
+
}
|
| 42 |
+
return Desc;
|
| 43 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CompletionRecord.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $SyntaxError = require('es-errors/syntax');
|
| 4 |
+
|
| 5 |
+
var SLOT = require('internal-slot');
|
| 6 |
+
|
| 7 |
+
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
|
| 8 |
+
|
| 9 |
+
var CompletionRecord = function CompletionRecord(type, value) {
|
| 10 |
+
if (!(this instanceof CompletionRecord)) {
|
| 11 |
+
return new CompletionRecord(type, value);
|
| 12 |
+
}
|
| 13 |
+
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
|
| 14 |
+
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
|
| 15 |
+
}
|
| 16 |
+
SLOT.set(this, '[[Type]]', type);
|
| 17 |
+
SLOT.set(this, '[[Value]]', value);
|
| 18 |
+
// [[Target]] slot?
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
CompletionRecord.prototype.type = function Type() {
|
| 22 |
+
return SLOT.get(this, '[[Type]]');
|
| 23 |
+
};
|
| 24 |
+
|
| 25 |
+
CompletionRecord.prototype.value = function Value() {
|
| 26 |
+
return SLOT.get(this, '[[Value]]');
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
|
| 30 |
+
var type = SLOT.get(this, '[[Type]]');
|
| 31 |
+
var value = SLOT.get(this, '[[Value]]');
|
| 32 |
+
|
| 33 |
+
if (type === 'throw') {
|
| 34 |
+
throw value;
|
| 35 |
+
}
|
| 36 |
+
return value;
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
CompletionRecord.prototype['!'] = function assert() {
|
| 40 |
+
var type = SLOT.get(this, '[[Type]]');
|
| 41 |
+
|
| 42 |
+
if (type !== 'normal') {
|
| 43 |
+
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
|
| 44 |
+
}
|
| 45 |
+
return SLOT.get(this, '[[Value]]');
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
module.exports = CompletionRecord;
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CreateDataProperty.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
var isObject = require('es-object-atoms/isObject');
|
| 5 |
+
|
| 6 |
+
var isPropertyKey = require('../helpers/isPropertyKey');
|
| 7 |
+
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
|
| 8 |
+
|
| 9 |
+
// https://262.ecma-international.org/6.0/#sec-createdataproperty
|
| 10 |
+
|
| 11 |
+
module.exports = function CreateDataProperty(O, P, V) {
|
| 12 |
+
if (!isObject(O)) {
|
| 13 |
+
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
| 14 |
+
}
|
| 15 |
+
if (!isPropertyKey(P)) {
|
| 16 |
+
throw new $TypeError('Assertion failed: P is not a Property Key');
|
| 17 |
+
}
|
| 18 |
+
var newDesc = {
|
| 19 |
+
'[[Configurable]]': true,
|
| 20 |
+
'[[Enumerable]]': true,
|
| 21 |
+
'[[Value]]': V,
|
| 22 |
+
'[[Writable]]': true
|
| 23 |
+
};
|
| 24 |
+
return OrdinaryDefineOwnProperty(O, P, newDesc);
|
| 25 |
+
};
|
novas/novacore-zephyr/groq-code-cli/node_modules/es-abstract/2017/CreateDataPropertyOrThrow.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var $TypeError = require('es-errors/type');
|
| 4 |
+
var isObject = require('es-object-atoms/isObject');
|
| 5 |
+
|
| 6 |
+
var CreateDataProperty = require('./CreateDataProperty');
|
| 7 |
+
|
| 8 |
+
var isPropertyKey = require('../helpers/isPropertyKey');
|
| 9 |
+
|
| 10 |
+
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
|
| 11 |
+
|
| 12 |
+
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
|
| 13 |
+
if (!isObject(O)) {
|
| 14 |
+
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
| 15 |
+
}
|
| 16 |
+
if (!isPropertyKey(P)) {
|
| 17 |
+
throw new $TypeError('Assertion failed: P is not a Property Key');
|
| 18 |
+
}
|
| 19 |
+
var success = CreateDataProperty(O, P, V);
|
| 20 |
+
if (!success) {
|
| 21 |
+
throw new $TypeError('unable to create data property');
|
| 22 |
+
}
|
| 23 |
+
return success;
|
| 24 |
+
};
|