@ai-matrx/vault 0.1.32 → 0.1.34
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/CHANGELOG.md +5 -0
- package/dist/{chunk-IJVSAR5M.js → chunk-B5TOAIY6.js} +1 -2
- package/dist/identity.js +1 -1
- package/dist/index.cjs +123 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +128 -84
- package/dist/index.js.map +1 -1
- package/dist/io/bitwarden-json.worker.js +62 -24
- package/dist/io/bitwarden-json.worker.js.map +1 -1
- package/dist/io/onepux.worker.js +62 -24
- package/dist/io/onepux.worker.js.map +1 -1
- package/dist/io/proton-pass.worker.js +62 -24
- package/dist/io/proton-pass.worker.js.map +1 -1
- package/knob-declaration.json +31 -0
- package/package.json +7 -6
- /package/dist/{chunk-IJVSAR5M.js.map → chunk-B5TOAIY6.js.map} +0 -0
package/dist/io/onepux.worker.js
CHANGED
|
@@ -4436,7 +4436,7 @@ var init_zip_reader = __esm({
|
|
|
4436
4436
|
}
|
|
4437
4437
|
});
|
|
4438
4438
|
|
|
4439
|
-
// ../../node_modules/.pnpm/lossless-json@4.3.
|
|
4439
|
+
// ../../node_modules/.pnpm/lossless-json@4.3.3/node_modules/lossless-json/lib/esm/utils.js
|
|
4440
4440
|
function isInteger(value) {
|
|
4441
4441
|
return INTEGER_REGEX.test(value);
|
|
4442
4442
|
}
|
|
@@ -4450,6 +4450,9 @@ function isSafeNumber(value, config3) {
|
|
|
4450
4450
|
return Number.isSafeInteger(Number.parseInt(value, 10));
|
|
4451
4451
|
}
|
|
4452
4452
|
const num = Number.parseFloat(value);
|
|
4453
|
+
if (Number.isInteger(num) && !Number.isSafeInteger(num)) {
|
|
4454
|
+
return false;
|
|
4455
|
+
}
|
|
4453
4456
|
const parsed = String(num);
|
|
4454
4457
|
if (value === parsed) {
|
|
4455
4458
|
return true;
|
|
@@ -4461,7 +4464,7 @@ function isSafeNumber(value, config3) {
|
|
|
4461
4464
|
}
|
|
4462
4465
|
if (config3?.approx === true) {
|
|
4463
4466
|
const requiredDigits = 14;
|
|
4464
|
-
if (
|
|
4467
|
+
if (parsedDigits.length >= requiredDigits && valueDigits.startsWith(parsedDigits.substring(0, requiredDigits))) {
|
|
4465
4468
|
return true;
|
|
4466
4469
|
}
|
|
4467
4470
|
}
|
|
@@ -4528,11 +4531,21 @@ function getSignificantDigitRange(value) {
|
|
|
4528
4531
|
};
|
|
4529
4532
|
}
|
|
4530
4533
|
|
|
4531
|
-
// ../../node_modules/.pnpm/lossless-json@4.3.
|
|
4534
|
+
// ../../node_modules/.pnpm/lossless-json@4.3.3/node_modules/lossless-json/lib/esm/LosslessNumber.js
|
|
4535
|
+
var losslessNumberMarker = /* @__PURE__ */ Symbol.for("lossless-json.LosslessNumber");
|
|
4532
4536
|
var LosslessNumber = class {
|
|
4533
4537
|
// numeric value as string
|
|
4534
|
-
|
|
4538
|
+
value;
|
|
4539
|
+
/**
|
|
4540
|
+
* @deprecated Use the isLosslessNumber(value) function instead.
|
|
4541
|
+
*
|
|
4542
|
+
* Ordinary objects may also have an isLosslessNumber property, so this
|
|
4543
|
+
* field cannot reliably identify lossless numbers.
|
|
4544
|
+
*/
|
|
4535
4545
|
isLosslessNumber = true;
|
|
4546
|
+
get [losslessNumberMarker]() {
|
|
4547
|
+
return true;
|
|
4548
|
+
}
|
|
4536
4549
|
constructor(value) {
|
|
4537
4550
|
if (!isNumber(value)) {
|
|
4538
4551
|
throw new Error(`Invalid number (value: "${value}")`);
|
|
@@ -4571,15 +4584,15 @@ var LosslessNumber = class {
|
|
|
4571
4584
|
// stringified JSON since it has to be parsed into a number first.
|
|
4572
4585
|
};
|
|
4573
4586
|
function isLosslessNumber(value) {
|
|
4574
|
-
return value && typeof value === "object" && value
|
|
4587
|
+
return value !== null && typeof value === "object" && value[losslessNumberMarker] === true;
|
|
4575
4588
|
}
|
|
4576
4589
|
|
|
4577
|
-
// ../../node_modules/.pnpm/lossless-json@4.3.
|
|
4590
|
+
// ../../node_modules/.pnpm/lossless-json@4.3.3/node_modules/lossless-json/lib/esm/numberParsers.js
|
|
4578
4591
|
function parseLosslessNumber(value) {
|
|
4579
4592
|
return new LosslessNumber(value);
|
|
4580
4593
|
}
|
|
4581
4594
|
|
|
4582
|
-
// ../../node_modules/.pnpm/lossless-json@4.3.
|
|
4595
|
+
// ../../node_modules/.pnpm/lossless-json@4.3.3/node_modules/lossless-json/lib/esm/revive.js
|
|
4583
4596
|
function revive(json, reviver) {
|
|
4584
4597
|
return reviveValue({
|
|
4585
4598
|
"": json
|
|
@@ -4607,12 +4620,17 @@ function reviveObject(object3, reviver) {
|
|
|
4607
4620
|
}
|
|
4608
4621
|
function reviveArray(array, reviver) {
|
|
4609
4622
|
for (let i = 0; i < array.length; i++) {
|
|
4610
|
-
|
|
4623
|
+
const value = reviveValue(array, String(i), array[i], reviver);
|
|
4624
|
+
if (value === void 0) {
|
|
4625
|
+
delete array[i];
|
|
4626
|
+
} else {
|
|
4627
|
+
array[i] = value;
|
|
4628
|
+
}
|
|
4611
4629
|
}
|
|
4612
4630
|
return array;
|
|
4613
4631
|
}
|
|
4614
4632
|
|
|
4615
|
-
// ../../node_modules/.pnpm/lossless-json@4.3.
|
|
4633
|
+
// ../../node_modules/.pnpm/lossless-json@4.3.3/node_modules/lossless-json/lib/esm/parse.js
|
|
4616
4634
|
function parse(text, reviver, options) {
|
|
4617
4635
|
const optionsObj = typeof options === "function" ? {
|
|
4618
4636
|
parseNumber: options
|
|
@@ -4658,10 +4676,10 @@ function parse(text, reviver, options) {
|
|
|
4658
4676
|
newValue: value2
|
|
4659
4677
|
});
|
|
4660
4678
|
if (returnedValue !== void 0) {
|
|
4661
|
-
object3
|
|
4679
|
+
setObjectKey(object3, key, returnedValue);
|
|
4662
4680
|
}
|
|
4663
4681
|
} else {
|
|
4664
|
-
object3
|
|
4682
|
+
setObjectKey(object3, key, value2);
|
|
4665
4683
|
}
|
|
4666
4684
|
}
|
|
4667
4685
|
if (text.charCodeAt(i) !== codeClosingBrace) {
|
|
@@ -4759,6 +4777,8 @@ function parse(text, reviver, options) {
|
|
|
4759
4777
|
while (isDigit(text.charCodeAt(i))) {
|
|
4760
4778
|
i++;
|
|
4761
4779
|
}
|
|
4780
|
+
} else {
|
|
4781
|
+
return void 0;
|
|
4762
4782
|
}
|
|
4763
4783
|
if (text.charCodeAt(i) === codeDot) {
|
|
4764
4784
|
i++;
|
|
@@ -4822,11 +4842,10 @@ function parse(text, reviver, options) {
|
|
|
4822
4842
|
function throwObjectKeyExpected() {
|
|
4823
4843
|
throw new SyntaxError(`Quoted object key expected ${gotAt()}`);
|
|
4824
4844
|
}
|
|
4825
|
-
function throwDuplicateKey(
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
} = _ref;
|
|
4845
|
+
function throwDuplicateKey({
|
|
4846
|
+
key,
|
|
4847
|
+
position
|
|
4848
|
+
}) {
|
|
4830
4849
|
throw new SyntaxError(`Duplicate key '${key}' encountered at position ${position}`);
|
|
4831
4850
|
}
|
|
4832
4851
|
function throwObjectKeyOrEndExpected() {
|
|
@@ -4859,6 +4878,18 @@ function parse(text, reviver, options) {
|
|
|
4859
4878
|
return `${got()} ${pos()}`;
|
|
4860
4879
|
}
|
|
4861
4880
|
}
|
|
4881
|
+
function setObjectKey(object3, key, value) {
|
|
4882
|
+
if (key === "__proto__") {
|
|
4883
|
+
Object.defineProperty(object3, key, {
|
|
4884
|
+
value,
|
|
4885
|
+
writable: true,
|
|
4886
|
+
enumerable: true,
|
|
4887
|
+
configurable: true
|
|
4888
|
+
});
|
|
4889
|
+
} else {
|
|
4890
|
+
object3[key] = value;
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4862
4893
|
function isWhitespace(code) {
|
|
4863
4894
|
return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn;
|
|
4864
4895
|
}
|
|
@@ -4926,7 +4957,7 @@ var codeLowercaseE = 101;
|
|
|
4926
4957
|
var codeUppercaseF = 70;
|
|
4927
4958
|
var codeLowercaseF = 102;
|
|
4928
4959
|
|
|
4929
|
-
// ../../node_modules/.pnpm/lossless-json@4.3.
|
|
4960
|
+
// ../../node_modules/.pnpm/lossless-json@4.3.3/node_modules/lossless-json/lib/esm/stringify.js
|
|
4930
4961
|
function stringify(value, replacer, space, numberStringifiers) {
|
|
4931
4962
|
const resolvedSpace = resolveSpace(space);
|
|
4932
4963
|
const replacedValue = typeof replacer === "function" ? replacer.call({
|
|
@@ -4947,7 +4978,7 @@ function stringify(value, replacer, space, numberStringifiers) {
|
|
|
4947
4978
|
if (typeof value2 === "boolean" || typeof value2 === "number" || typeof value2 === "string" || value2 === null || value2 instanceof Date || value2 instanceof Boolean || value2 instanceof Number || value2 instanceof String) {
|
|
4948
4979
|
return JSON.stringify(value2);
|
|
4949
4980
|
}
|
|
4950
|
-
if (value2
|
|
4981
|
+
if (isLosslessNumber(value2)) {
|
|
4951
4982
|
return value2.toString();
|
|
4952
4983
|
}
|
|
4953
4984
|
if (typeof value2 === "bigint") {
|
|
@@ -4973,7 +5004,8 @@ function stringify(value, replacer, space, numberStringifiers) {
|
|
|
4973
5004
|
str += childIndent;
|
|
4974
5005
|
}
|
|
4975
5006
|
if (typeof item !== "undefined" && typeof item !== "function") {
|
|
4976
|
-
|
|
5007
|
+
const serialized = stringifyValue(item, childIndent);
|
|
5008
|
+
str += serialized === void 0 ? "null" : serialized;
|
|
4977
5009
|
} else {
|
|
4978
5010
|
str += "null";
|
|
4979
5011
|
}
|
|
@@ -4987,9 +5019,9 @@ ${indent}]` : "]";
|
|
|
4987
5019
|
}
|
|
4988
5020
|
function stringifyObject(object3, indent) {
|
|
4989
5021
|
if (typeof object3.toJSON === "function") {
|
|
4990
|
-
return
|
|
5022
|
+
return stringifyValue(object3.toJSON(), indent);
|
|
4991
5023
|
}
|
|
4992
|
-
const keys = Array.isArray(replacer) ? replacer.map(String) : Object.keys(object3);
|
|
5024
|
+
const keys = Array.isArray(replacer) ? [...new Set(replacer.map(String))] : Object.keys(object3);
|
|
4993
5025
|
if (keys.length === 0) {
|
|
4994
5026
|
return "{}";
|
|
4995
5027
|
}
|
|
@@ -4999,6 +5031,10 @@ ${indent}]` : "]";
|
|
|
4999
5031
|
for (const key of keys) {
|
|
5000
5032
|
const value2 = typeof replacer === "function" ? replacer.call(object3, key, object3[key]) : object3[key];
|
|
5001
5033
|
if (includeProperty(key, value2)) {
|
|
5034
|
+
const serialized = stringifyValue(value2, childIndent);
|
|
5035
|
+
if (serialized === void 0) {
|
|
5036
|
+
continue;
|
|
5037
|
+
}
|
|
5002
5038
|
if (first) {
|
|
5003
5039
|
first = false;
|
|
5004
5040
|
} else {
|
|
@@ -5006,7 +5042,7 @@ ${indent}]` : "]";
|
|
|
5006
5042
|
}
|
|
5007
5043
|
const keyStr = JSON.stringify(key);
|
|
5008
5044
|
str += resolvedSpace ? `${childIndent + keyStr}: ` : `${keyStr}:`;
|
|
5009
|
-
str +=
|
|
5045
|
+
str += serialized;
|
|
5010
5046
|
}
|
|
5011
5047
|
}
|
|
5012
5048
|
str += resolvedSpace ? `
|
|
@@ -5017,12 +5053,14 @@ ${indent}}` : "}";
|
|
|
5017
5053
|
return typeof value2 !== "undefined" && typeof value2 !== "function" && typeof value2 !== "symbol";
|
|
5018
5054
|
}
|
|
5019
5055
|
}
|
|
5056
|
+
var MAX_SPACE_LENGTH = 10;
|
|
5020
5057
|
function resolveSpace(space) {
|
|
5021
5058
|
if (typeof space === "number") {
|
|
5022
|
-
|
|
5059
|
+
const count = Math.min(Math.trunc(space), MAX_SPACE_LENGTH);
|
|
5060
|
+
return count >= 1 ? " ".repeat(count) : void 0;
|
|
5023
5061
|
}
|
|
5024
5062
|
if (typeof space === "string" && space !== "") {
|
|
5025
|
-
return space;
|
|
5063
|
+
return space.slice(0, MAX_SPACE_LENGTH);
|
|
5026
5064
|
}
|
|
5027
5065
|
return void 0;
|
|
5028
5066
|
}
|