@stryke/prisma-trpc-generator 0.11.11 → 0.12.0
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/README.md +1 -1
- package/dist/generator.cjs +2045 -2139
- package/dist/generator.js +2015 -2109
- package/dist/index.cjs +2045 -2139
- package/dist/index.js +2015 -2109
- package/package.json +1 -1
package/dist/generator.js
CHANGED
|
@@ -35,9 +35,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
35
|
mod
|
|
36
36
|
));
|
|
37
37
|
|
|
38
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.
|
|
38
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js
|
|
39
39
|
var init_esm_shims = __esm({
|
|
40
|
-
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.
|
|
40
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js"() {
|
|
41
41
|
"use strict";
|
|
42
42
|
}
|
|
43
43
|
});
|
|
@@ -673,1794 +673,81 @@ var require_pluralize = __commonJS({
|
|
|
673
673
|
}
|
|
674
674
|
});
|
|
675
675
|
|
|
676
|
-
// ../../node_modules/.pnpm/
|
|
677
|
-
|
|
678
|
-
"
|
|
679
|
-
|
|
680
|
-
init_esm_shims();
|
|
681
|
-
exports.byteLength = byteLength;
|
|
682
|
-
exports.toByteArray = toByteArray;
|
|
683
|
-
exports.fromByteArray = fromByteArray;
|
|
684
|
-
var lookup = [];
|
|
685
|
-
var revLookup = [];
|
|
686
|
-
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
687
|
-
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
688
|
-
for (i = 0, len = code.length; i < len; ++i) {
|
|
689
|
-
lookup[i] = code[i];
|
|
690
|
-
revLookup[code.charCodeAt(i)] = i;
|
|
691
|
-
}
|
|
692
|
-
var i;
|
|
693
|
-
var len;
|
|
694
|
-
revLookup["-".charCodeAt(0)] = 62;
|
|
695
|
-
revLookup["_".charCodeAt(0)] = 63;
|
|
696
|
-
function getLens(b64) {
|
|
697
|
-
var len2 = b64.length;
|
|
698
|
-
if (len2 % 4 > 0) {
|
|
699
|
-
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
700
|
-
}
|
|
701
|
-
var validLen = b64.indexOf("=");
|
|
702
|
-
if (validLen === -1) validLen = len2;
|
|
703
|
-
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
704
|
-
return [
|
|
705
|
-
validLen,
|
|
706
|
-
placeHoldersLen
|
|
707
|
-
];
|
|
708
|
-
}
|
|
709
|
-
__name(getLens, "getLens");
|
|
710
|
-
function byteLength(b64) {
|
|
711
|
-
var lens = getLens(b64);
|
|
712
|
-
var validLen = lens[0];
|
|
713
|
-
var placeHoldersLen = lens[1];
|
|
714
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
715
|
-
}
|
|
716
|
-
__name(byteLength, "byteLength");
|
|
717
|
-
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
718
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
719
|
-
}
|
|
720
|
-
__name(_byteLength, "_byteLength");
|
|
721
|
-
function toByteArray(b64) {
|
|
722
|
-
var tmp;
|
|
723
|
-
var lens = getLens(b64);
|
|
724
|
-
var validLen = lens[0];
|
|
725
|
-
var placeHoldersLen = lens[1];
|
|
726
|
-
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
727
|
-
var curByte = 0;
|
|
728
|
-
var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
729
|
-
var i2;
|
|
730
|
-
for (i2 = 0; i2 < len2; i2 += 4) {
|
|
731
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
|
|
732
|
-
arr[curByte++] = tmp >> 16 & 255;
|
|
733
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
734
|
-
arr[curByte++] = tmp & 255;
|
|
735
|
-
}
|
|
736
|
-
if (placeHoldersLen === 2) {
|
|
737
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
|
|
738
|
-
arr[curByte++] = tmp & 255;
|
|
739
|
-
}
|
|
740
|
-
if (placeHoldersLen === 1) {
|
|
741
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
|
|
742
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
743
|
-
arr[curByte++] = tmp & 255;
|
|
744
|
-
}
|
|
745
|
-
return arr;
|
|
746
|
-
}
|
|
747
|
-
__name(toByteArray, "toByteArray");
|
|
748
|
-
function tripletToBase64(num) {
|
|
749
|
-
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
750
|
-
}
|
|
751
|
-
__name(tripletToBase64, "tripletToBase64");
|
|
752
|
-
function encodeChunk(uint8, start, end) {
|
|
753
|
-
var tmp;
|
|
754
|
-
var output = [];
|
|
755
|
-
for (var i2 = start; i2 < end; i2 += 3) {
|
|
756
|
-
tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
|
|
757
|
-
output.push(tripletToBase64(tmp));
|
|
758
|
-
}
|
|
759
|
-
return output.join("");
|
|
760
|
-
}
|
|
761
|
-
__name(encodeChunk, "encodeChunk");
|
|
762
|
-
function fromByteArray(uint8) {
|
|
763
|
-
var tmp;
|
|
764
|
-
var len2 = uint8.length;
|
|
765
|
-
var extraBytes = len2 % 3;
|
|
766
|
-
var parts = [];
|
|
767
|
-
var maxChunkLength = 16383;
|
|
768
|
-
for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
|
|
769
|
-
parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));
|
|
770
|
-
}
|
|
771
|
-
if (extraBytes === 1) {
|
|
772
|
-
tmp = uint8[len2 - 1];
|
|
773
|
-
parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
|
|
774
|
-
} else if (extraBytes === 2) {
|
|
775
|
-
tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
|
|
776
|
-
parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=");
|
|
777
|
-
}
|
|
778
|
-
return parts.join("");
|
|
779
|
-
}
|
|
780
|
-
__name(fromByteArray, "fromByteArray");
|
|
676
|
+
// ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
677
|
+
function isPlainObject(value) {
|
|
678
|
+
if (value === null || typeof value !== "object") {
|
|
679
|
+
return false;
|
|
781
680
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
var require_ieee754 = __commonJS({
|
|
786
|
-
"../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports) {
|
|
787
|
-
"use strict";
|
|
788
|
-
init_esm_shims();
|
|
789
|
-
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
|
|
790
|
-
var e, m;
|
|
791
|
-
var eLen = nBytes * 8 - mLen - 1;
|
|
792
|
-
var eMax = (1 << eLen) - 1;
|
|
793
|
-
var eBias = eMax >> 1;
|
|
794
|
-
var nBits = -7;
|
|
795
|
-
var i = isLE ? nBytes - 1 : 0;
|
|
796
|
-
var d = isLE ? -1 : 1;
|
|
797
|
-
var s = buffer[offset + i];
|
|
798
|
-
i += d;
|
|
799
|
-
e = s & (1 << -nBits) - 1;
|
|
800
|
-
s >>= -nBits;
|
|
801
|
-
nBits += eLen;
|
|
802
|
-
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
803
|
-
}
|
|
804
|
-
m = e & (1 << -nBits) - 1;
|
|
805
|
-
e >>= -nBits;
|
|
806
|
-
nBits += mLen;
|
|
807
|
-
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
808
|
-
}
|
|
809
|
-
if (e === 0) {
|
|
810
|
-
e = 1 - eBias;
|
|
811
|
-
} else if (e === eMax) {
|
|
812
|
-
return m ? NaN : (s ? -1 : 1) * Infinity;
|
|
813
|
-
} else {
|
|
814
|
-
m = m + Math.pow(2, mLen);
|
|
815
|
-
e = e - eBias;
|
|
816
|
-
}
|
|
817
|
-
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
|
818
|
-
};
|
|
819
|
-
exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
|
|
820
|
-
var e, m, c;
|
|
821
|
-
var eLen = nBytes * 8 - mLen - 1;
|
|
822
|
-
var eMax = (1 << eLen) - 1;
|
|
823
|
-
var eBias = eMax >> 1;
|
|
824
|
-
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
825
|
-
var i = isLE ? 0 : nBytes - 1;
|
|
826
|
-
var d = isLE ? 1 : -1;
|
|
827
|
-
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
828
|
-
value = Math.abs(value);
|
|
829
|
-
if (isNaN(value) || value === Infinity) {
|
|
830
|
-
m = isNaN(value) ? 1 : 0;
|
|
831
|
-
e = eMax;
|
|
832
|
-
} else {
|
|
833
|
-
e = Math.floor(Math.log(value) / Math.LN2);
|
|
834
|
-
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
835
|
-
e--;
|
|
836
|
-
c *= 2;
|
|
837
|
-
}
|
|
838
|
-
if (e + eBias >= 1) {
|
|
839
|
-
value += rt / c;
|
|
840
|
-
} else {
|
|
841
|
-
value += rt * Math.pow(2, 1 - eBias);
|
|
842
|
-
}
|
|
843
|
-
if (value * c >= 2) {
|
|
844
|
-
e++;
|
|
845
|
-
c /= 2;
|
|
846
|
-
}
|
|
847
|
-
if (e + eBias >= eMax) {
|
|
848
|
-
m = 0;
|
|
849
|
-
e = eMax;
|
|
850
|
-
} else if (e + eBias >= 1) {
|
|
851
|
-
m = (value * c - 1) * Math.pow(2, mLen);
|
|
852
|
-
e = e + eBias;
|
|
853
|
-
} else {
|
|
854
|
-
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
855
|
-
e = 0;
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
|
|
859
|
-
}
|
|
860
|
-
e = e << mLen | m;
|
|
861
|
-
eLen += mLen;
|
|
862
|
-
for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
863
|
-
}
|
|
864
|
-
buffer[offset + i - d] |= s * 128;
|
|
865
|
-
};
|
|
681
|
+
const prototype = Object.getPrototypeOf(value);
|
|
682
|
+
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
683
|
+
return false;
|
|
866
684
|
}
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
884
|
-
console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
885
|
-
}
|
|
886
|
-
function typedArraySupport() {
|
|
887
|
-
try {
|
|
888
|
-
const arr = new Uint8Array(1);
|
|
889
|
-
const proto = {
|
|
890
|
-
foo: /* @__PURE__ */ __name(function() {
|
|
891
|
-
return 42;
|
|
892
|
-
}, "foo")
|
|
893
|
-
};
|
|
894
|
-
Object.setPrototypeOf(proto, Uint8Array.prototype);
|
|
895
|
-
Object.setPrototypeOf(arr, proto);
|
|
896
|
-
return arr.foo() === 42;
|
|
897
|
-
} catch (e) {
|
|
898
|
-
return false;
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
__name(typedArraySupport, "typedArraySupport");
|
|
902
|
-
Object.defineProperty(Buffer3.prototype, "parent", {
|
|
903
|
-
enumerable: true,
|
|
904
|
-
get: /* @__PURE__ */ __name(function() {
|
|
905
|
-
if (!Buffer3.isBuffer(this)) return void 0;
|
|
906
|
-
return this.buffer;
|
|
907
|
-
}, "get")
|
|
908
|
-
});
|
|
909
|
-
Object.defineProperty(Buffer3.prototype, "offset", {
|
|
910
|
-
enumerable: true,
|
|
911
|
-
get: /* @__PURE__ */ __name(function() {
|
|
912
|
-
if (!Buffer3.isBuffer(this)) return void 0;
|
|
913
|
-
return this.byteOffset;
|
|
914
|
-
}, "get")
|
|
915
|
-
});
|
|
916
|
-
function createBuffer(length) {
|
|
917
|
-
if (length > K_MAX_LENGTH) {
|
|
918
|
-
throw new RangeError('The value "' + length + '" is invalid for option "size"');
|
|
919
|
-
}
|
|
920
|
-
const buf = new Uint8Array(length);
|
|
921
|
-
Object.setPrototypeOf(buf, Buffer3.prototype);
|
|
922
|
-
return buf;
|
|
923
|
-
}
|
|
924
|
-
__name(createBuffer, "createBuffer");
|
|
925
|
-
function Buffer3(arg, encodingOrOffset, length) {
|
|
926
|
-
if (typeof arg === "number") {
|
|
927
|
-
if (typeof encodingOrOffset === "string") {
|
|
928
|
-
throw new TypeError('The "string" argument must be of type string. Received type number');
|
|
929
|
-
}
|
|
930
|
-
return allocUnsafe(arg);
|
|
931
|
-
}
|
|
932
|
-
return from(arg, encodingOrOffset, length);
|
|
933
|
-
}
|
|
934
|
-
__name(Buffer3, "Buffer");
|
|
935
|
-
Buffer3.poolSize = 8192;
|
|
936
|
-
function from(value, encodingOrOffset, length) {
|
|
937
|
-
if (typeof value === "string") {
|
|
938
|
-
return fromString(value, encodingOrOffset);
|
|
939
|
-
}
|
|
940
|
-
if (ArrayBuffer.isView(value)) {
|
|
941
|
-
return fromArrayView(value);
|
|
942
|
-
}
|
|
943
|
-
if (value == null) {
|
|
944
|
-
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
945
|
-
}
|
|
946
|
-
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
947
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
948
|
-
}
|
|
949
|
-
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
950
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
951
|
-
}
|
|
952
|
-
if (typeof value === "number") {
|
|
953
|
-
throw new TypeError('The "value" argument must not be of type number. Received type number');
|
|
954
|
-
}
|
|
955
|
-
const valueOf = value.valueOf && value.valueOf();
|
|
956
|
-
if (valueOf != null && valueOf !== value) {
|
|
957
|
-
return Buffer3.from(valueOf, encodingOrOffset, length);
|
|
958
|
-
}
|
|
959
|
-
const b = fromObject(value);
|
|
960
|
-
if (b) return b;
|
|
961
|
-
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
962
|
-
return Buffer3.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
|
|
963
|
-
}
|
|
964
|
-
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
965
|
-
}
|
|
966
|
-
__name(from, "from");
|
|
967
|
-
Buffer3.from = function(value, encodingOrOffset, length) {
|
|
968
|
-
return from(value, encodingOrOffset, length);
|
|
969
|
-
};
|
|
970
|
-
Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);
|
|
971
|
-
Object.setPrototypeOf(Buffer3, Uint8Array);
|
|
972
|
-
function assertSize(size) {
|
|
973
|
-
if (typeof size !== "number") {
|
|
974
|
-
throw new TypeError('"size" argument must be of type number');
|
|
975
|
-
} else if (size < 0) {
|
|
976
|
-
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
__name(assertSize, "assertSize");
|
|
980
|
-
function alloc(size, fill, encoding) {
|
|
981
|
-
assertSize(size);
|
|
982
|
-
if (size <= 0) {
|
|
983
|
-
return createBuffer(size);
|
|
984
|
-
}
|
|
985
|
-
if (fill !== void 0) {
|
|
986
|
-
return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
|
|
987
|
-
}
|
|
988
|
-
return createBuffer(size);
|
|
989
|
-
}
|
|
990
|
-
__name(alloc, "alloc");
|
|
991
|
-
Buffer3.alloc = function(size, fill, encoding) {
|
|
992
|
-
return alloc(size, fill, encoding);
|
|
993
|
-
};
|
|
994
|
-
function allocUnsafe(size) {
|
|
995
|
-
assertSize(size);
|
|
996
|
-
return createBuffer(size < 0 ? 0 : checked(size) | 0);
|
|
685
|
+
if (Symbol.iterator in value) {
|
|
686
|
+
return false;
|
|
687
|
+
}
|
|
688
|
+
if (Symbol.toStringTag in value) {
|
|
689
|
+
return Object.prototype.toString.call(value) === "[object Module]";
|
|
690
|
+
}
|
|
691
|
+
return true;
|
|
692
|
+
}
|
|
693
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
694
|
+
if (!isPlainObject(defaults)) {
|
|
695
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
696
|
+
}
|
|
697
|
+
const object = Object.assign({}, defaults);
|
|
698
|
+
for (const key in baseObject) {
|
|
699
|
+
if (key === "__proto__" || key === "constructor") {
|
|
700
|
+
continue;
|
|
997
701
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
};
|
|
1002
|
-
Buffer3.allocUnsafeSlow = function(size) {
|
|
1003
|
-
return allocUnsafe(size);
|
|
1004
|
-
};
|
|
1005
|
-
function fromString(string, encoding) {
|
|
1006
|
-
if (typeof encoding !== "string" || encoding === "") {
|
|
1007
|
-
encoding = "utf8";
|
|
1008
|
-
}
|
|
1009
|
-
if (!Buffer3.isEncoding(encoding)) {
|
|
1010
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
1011
|
-
}
|
|
1012
|
-
const length = byteLength(string, encoding) | 0;
|
|
1013
|
-
let buf = createBuffer(length);
|
|
1014
|
-
const actual = buf.write(string, encoding);
|
|
1015
|
-
if (actual !== length) {
|
|
1016
|
-
buf = buf.slice(0, actual);
|
|
1017
|
-
}
|
|
1018
|
-
return buf;
|
|
1019
|
-
}
|
|
1020
|
-
__name(fromString, "fromString");
|
|
1021
|
-
function fromArrayLike(array) {
|
|
1022
|
-
const length = array.length < 0 ? 0 : checked(array.length) | 0;
|
|
1023
|
-
const buf = createBuffer(length);
|
|
1024
|
-
for (let i = 0; i < length; i += 1) {
|
|
1025
|
-
buf[i] = array[i] & 255;
|
|
1026
|
-
}
|
|
1027
|
-
return buf;
|
|
1028
|
-
}
|
|
1029
|
-
__name(fromArrayLike, "fromArrayLike");
|
|
1030
|
-
function fromArrayView(arrayView) {
|
|
1031
|
-
if (isInstance(arrayView, Uint8Array)) {
|
|
1032
|
-
const copy2 = new Uint8Array(arrayView);
|
|
1033
|
-
return fromArrayBuffer(copy2.buffer, copy2.byteOffset, copy2.byteLength);
|
|
1034
|
-
}
|
|
1035
|
-
return fromArrayLike(arrayView);
|
|
1036
|
-
}
|
|
1037
|
-
__name(fromArrayView, "fromArrayView");
|
|
1038
|
-
function fromArrayBuffer(array, byteOffset, length) {
|
|
1039
|
-
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
1040
|
-
throw new RangeError('"offset" is outside of buffer bounds');
|
|
1041
|
-
}
|
|
1042
|
-
if (array.byteLength < byteOffset + (length || 0)) {
|
|
1043
|
-
throw new RangeError('"length" is outside of buffer bounds');
|
|
1044
|
-
}
|
|
1045
|
-
let buf;
|
|
1046
|
-
if (byteOffset === void 0 && length === void 0) {
|
|
1047
|
-
buf = new Uint8Array(array);
|
|
1048
|
-
} else if (length === void 0) {
|
|
1049
|
-
buf = new Uint8Array(array, byteOffset);
|
|
1050
|
-
} else {
|
|
1051
|
-
buf = new Uint8Array(array, byteOffset, length);
|
|
1052
|
-
}
|
|
1053
|
-
Object.setPrototypeOf(buf, Buffer3.prototype);
|
|
1054
|
-
return buf;
|
|
1055
|
-
}
|
|
1056
|
-
__name(fromArrayBuffer, "fromArrayBuffer");
|
|
1057
|
-
function fromObject(obj) {
|
|
1058
|
-
if (Buffer3.isBuffer(obj)) {
|
|
1059
|
-
const len = checked(obj.length) | 0;
|
|
1060
|
-
const buf = createBuffer(len);
|
|
1061
|
-
if (buf.length === 0) {
|
|
1062
|
-
return buf;
|
|
1063
|
-
}
|
|
1064
|
-
obj.copy(buf, 0, 0, len);
|
|
1065
|
-
return buf;
|
|
1066
|
-
}
|
|
1067
|
-
if (obj.length !== void 0) {
|
|
1068
|
-
if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
|
|
1069
|
-
return createBuffer(0);
|
|
1070
|
-
}
|
|
1071
|
-
return fromArrayLike(obj);
|
|
1072
|
-
}
|
|
1073
|
-
if (obj.type === "Buffer" && Array.isArray(obj.data)) {
|
|
1074
|
-
return fromArrayLike(obj.data);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
__name(fromObject, "fromObject");
|
|
1078
|
-
function checked(length) {
|
|
1079
|
-
if (length >= K_MAX_LENGTH) {
|
|
1080
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
|
|
1081
|
-
}
|
|
1082
|
-
return length | 0;
|
|
1083
|
-
}
|
|
1084
|
-
__name(checked, "checked");
|
|
1085
|
-
function SlowBuffer(length) {
|
|
1086
|
-
if (+length != length) {
|
|
1087
|
-
length = 0;
|
|
1088
|
-
}
|
|
1089
|
-
return Buffer3.alloc(+length);
|
|
1090
|
-
}
|
|
1091
|
-
__name(SlowBuffer, "SlowBuffer");
|
|
1092
|
-
Buffer3.isBuffer = /* @__PURE__ */ __name(function isBuffer(b) {
|
|
1093
|
-
return b != null && b._isBuffer === true && b !== Buffer3.prototype;
|
|
1094
|
-
}, "isBuffer");
|
|
1095
|
-
Buffer3.compare = /* @__PURE__ */ __name(function compare(a, b) {
|
|
1096
|
-
if (isInstance(a, Uint8Array)) a = Buffer3.from(a, a.offset, a.byteLength);
|
|
1097
|
-
if (isInstance(b, Uint8Array)) b = Buffer3.from(b, b.offset, b.byteLength);
|
|
1098
|
-
if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {
|
|
1099
|
-
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
|
|
1100
|
-
}
|
|
1101
|
-
if (a === b) return 0;
|
|
1102
|
-
let x = a.length;
|
|
1103
|
-
let y = b.length;
|
|
1104
|
-
for (let i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
1105
|
-
if (a[i] !== b[i]) {
|
|
1106
|
-
x = a[i];
|
|
1107
|
-
y = b[i];
|
|
1108
|
-
break;
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
if (x < y) return -1;
|
|
1112
|
-
if (y < x) return 1;
|
|
1113
|
-
return 0;
|
|
1114
|
-
}, "compare");
|
|
1115
|
-
Buffer3.isEncoding = /* @__PURE__ */ __name(function isEncoding(encoding) {
|
|
1116
|
-
switch (String(encoding).toLowerCase()) {
|
|
1117
|
-
case "hex":
|
|
1118
|
-
case "utf8":
|
|
1119
|
-
case "utf-8":
|
|
1120
|
-
case "ascii":
|
|
1121
|
-
case "latin1":
|
|
1122
|
-
case "binary":
|
|
1123
|
-
case "base64":
|
|
1124
|
-
case "ucs2":
|
|
1125
|
-
case "ucs-2":
|
|
1126
|
-
case "utf16le":
|
|
1127
|
-
case "utf-16le":
|
|
1128
|
-
return true;
|
|
1129
|
-
default:
|
|
1130
|
-
return false;
|
|
1131
|
-
}
|
|
1132
|
-
}, "isEncoding");
|
|
1133
|
-
Buffer3.concat = /* @__PURE__ */ __name(function concat(list, length) {
|
|
1134
|
-
if (!Array.isArray(list)) {
|
|
1135
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
1136
|
-
}
|
|
1137
|
-
if (list.length === 0) {
|
|
1138
|
-
return Buffer3.alloc(0);
|
|
1139
|
-
}
|
|
1140
|
-
let i;
|
|
1141
|
-
if (length === void 0) {
|
|
1142
|
-
length = 0;
|
|
1143
|
-
for (i = 0; i < list.length; ++i) {
|
|
1144
|
-
length += list[i].length;
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
const buffer = Buffer3.allocUnsafe(length);
|
|
1148
|
-
let pos = 0;
|
|
1149
|
-
for (i = 0; i < list.length; ++i) {
|
|
1150
|
-
let buf = list[i];
|
|
1151
|
-
if (isInstance(buf, Uint8Array)) {
|
|
1152
|
-
if (pos + buf.length > buffer.length) {
|
|
1153
|
-
if (!Buffer3.isBuffer(buf)) buf = Buffer3.from(buf);
|
|
1154
|
-
buf.copy(buffer, pos);
|
|
1155
|
-
} else {
|
|
1156
|
-
Uint8Array.prototype.set.call(buffer, buf, pos);
|
|
1157
|
-
}
|
|
1158
|
-
} else if (!Buffer3.isBuffer(buf)) {
|
|
1159
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
1160
|
-
} else {
|
|
1161
|
-
buf.copy(buffer, pos);
|
|
1162
|
-
}
|
|
1163
|
-
pos += buf.length;
|
|
1164
|
-
}
|
|
1165
|
-
return buffer;
|
|
1166
|
-
}, "concat");
|
|
1167
|
-
function byteLength(string, encoding) {
|
|
1168
|
-
if (Buffer3.isBuffer(string)) {
|
|
1169
|
-
return string.length;
|
|
1170
|
-
}
|
|
1171
|
-
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
|
1172
|
-
return string.byteLength;
|
|
1173
|
-
}
|
|
1174
|
-
if (typeof string !== "string") {
|
|
1175
|
-
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);
|
|
1176
|
-
}
|
|
1177
|
-
const len = string.length;
|
|
1178
|
-
const mustMatch = arguments.length > 2 && arguments[2] === true;
|
|
1179
|
-
if (!mustMatch && len === 0) return 0;
|
|
1180
|
-
let loweredCase = false;
|
|
1181
|
-
for (; ; ) {
|
|
1182
|
-
switch (encoding) {
|
|
1183
|
-
case "ascii":
|
|
1184
|
-
case "latin1":
|
|
1185
|
-
case "binary":
|
|
1186
|
-
return len;
|
|
1187
|
-
case "utf8":
|
|
1188
|
-
case "utf-8":
|
|
1189
|
-
return utf8ToBytes(string).length;
|
|
1190
|
-
case "ucs2":
|
|
1191
|
-
case "ucs-2":
|
|
1192
|
-
case "utf16le":
|
|
1193
|
-
case "utf-16le":
|
|
1194
|
-
return len * 2;
|
|
1195
|
-
case "hex":
|
|
1196
|
-
return len >>> 1;
|
|
1197
|
-
case "base64":
|
|
1198
|
-
return base64ToBytes(string).length;
|
|
1199
|
-
default:
|
|
1200
|
-
if (loweredCase) {
|
|
1201
|
-
return mustMatch ? -1 : utf8ToBytes(string).length;
|
|
1202
|
-
}
|
|
1203
|
-
encoding = ("" + encoding).toLowerCase();
|
|
1204
|
-
loweredCase = true;
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
702
|
+
const value = baseObject[key];
|
|
703
|
+
if (value === null || value === void 0) {
|
|
704
|
+
continue;
|
|
1207
705
|
}
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
function slowToString(encoding, start, end) {
|
|
1211
|
-
let loweredCase = false;
|
|
1212
|
-
if (start === void 0 || start < 0) {
|
|
1213
|
-
start = 0;
|
|
1214
|
-
}
|
|
1215
|
-
if (start > this.length) {
|
|
1216
|
-
return "";
|
|
1217
|
-
}
|
|
1218
|
-
if (end === void 0 || end > this.length) {
|
|
1219
|
-
end = this.length;
|
|
1220
|
-
}
|
|
1221
|
-
if (end <= 0) {
|
|
1222
|
-
return "";
|
|
1223
|
-
}
|
|
1224
|
-
end >>>= 0;
|
|
1225
|
-
start >>>= 0;
|
|
1226
|
-
if (end <= start) {
|
|
1227
|
-
return "";
|
|
1228
|
-
}
|
|
1229
|
-
if (!encoding) encoding = "utf8";
|
|
1230
|
-
while (true) {
|
|
1231
|
-
switch (encoding) {
|
|
1232
|
-
case "hex":
|
|
1233
|
-
return hexSlice(this, start, end);
|
|
1234
|
-
case "utf8":
|
|
1235
|
-
case "utf-8":
|
|
1236
|
-
return utf8Slice(this, start, end);
|
|
1237
|
-
case "ascii":
|
|
1238
|
-
return asciiSlice(this, start, end);
|
|
1239
|
-
case "latin1":
|
|
1240
|
-
case "binary":
|
|
1241
|
-
return latin1Slice(this, start, end);
|
|
1242
|
-
case "base64":
|
|
1243
|
-
return base64Slice(this, start, end);
|
|
1244
|
-
case "ucs2":
|
|
1245
|
-
case "ucs-2":
|
|
1246
|
-
case "utf16le":
|
|
1247
|
-
case "utf-16le":
|
|
1248
|
-
return utf16leSlice(this, start, end);
|
|
1249
|
-
default:
|
|
1250
|
-
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
|
|
1251
|
-
encoding = (encoding + "").toLowerCase();
|
|
1252
|
-
loweredCase = true;
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
706
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
707
|
+
continue;
|
|
1255
708
|
}
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
1268
|
-
}
|
|
1269
|
-
for (let i = 0; i < len; i += 2) {
|
|
1270
|
-
swap(this, i, i + 1);
|
|
1271
|
-
}
|
|
1272
|
-
return this;
|
|
1273
|
-
}, "swap16");
|
|
1274
|
-
Buffer3.prototype.swap32 = /* @__PURE__ */ __name(function swap32() {
|
|
1275
|
-
const len = this.length;
|
|
1276
|
-
if (len % 4 !== 0) {
|
|
1277
|
-
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
1278
|
-
}
|
|
1279
|
-
for (let i = 0; i < len; i += 4) {
|
|
1280
|
-
swap(this, i, i + 3);
|
|
1281
|
-
swap(this, i + 1, i + 2);
|
|
1282
|
-
}
|
|
1283
|
-
return this;
|
|
1284
|
-
}, "swap32");
|
|
1285
|
-
Buffer3.prototype.swap64 = /* @__PURE__ */ __name(function swap64() {
|
|
1286
|
-
const len = this.length;
|
|
1287
|
-
if (len % 8 !== 0) {
|
|
1288
|
-
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
1289
|
-
}
|
|
1290
|
-
for (let i = 0; i < len; i += 8) {
|
|
1291
|
-
swap(this, i, i + 7);
|
|
1292
|
-
swap(this, i + 1, i + 6);
|
|
1293
|
-
swap(this, i + 2, i + 5);
|
|
1294
|
-
swap(this, i + 3, i + 4);
|
|
1295
|
-
}
|
|
1296
|
-
return this;
|
|
1297
|
-
}, "swap64");
|
|
1298
|
-
Buffer3.prototype.toString = /* @__PURE__ */ __name(function toString() {
|
|
1299
|
-
const length = this.length;
|
|
1300
|
-
if (length === 0) return "";
|
|
1301
|
-
if (arguments.length === 0) return utf8Slice(this, 0, length);
|
|
1302
|
-
return slowToString.apply(this, arguments);
|
|
1303
|
-
}, "toString");
|
|
1304
|
-
Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;
|
|
1305
|
-
Buffer3.prototype.equals = /* @__PURE__ */ __name(function equals(b) {
|
|
1306
|
-
if (!Buffer3.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
|
|
1307
|
-
if (this === b) return true;
|
|
1308
|
-
return Buffer3.compare(this, b) === 0;
|
|
1309
|
-
}, "equals");
|
|
1310
|
-
Buffer3.prototype.inspect = /* @__PURE__ */ __name(function inspect() {
|
|
1311
|
-
let str = "";
|
|
1312
|
-
const max = exports.INSPECT_MAX_BYTES;
|
|
1313
|
-
str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
|
|
1314
|
-
if (this.length > max) str += " ... ";
|
|
1315
|
-
return "<Buffer " + str + ">";
|
|
1316
|
-
}, "inspect");
|
|
1317
|
-
if (customInspectSymbol) {
|
|
1318
|
-
Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;
|
|
1319
|
-
}
|
|
1320
|
-
Buffer3.prototype.compare = /* @__PURE__ */ __name(function compare(target, start, end, thisStart, thisEnd) {
|
|
1321
|
-
if (isInstance(target, Uint8Array)) {
|
|
1322
|
-
target = Buffer3.from(target, target.offset, target.byteLength);
|
|
1323
|
-
}
|
|
1324
|
-
if (!Buffer3.isBuffer(target)) {
|
|
1325
|
-
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);
|
|
1326
|
-
}
|
|
1327
|
-
if (start === void 0) {
|
|
1328
|
-
start = 0;
|
|
1329
|
-
}
|
|
1330
|
-
if (end === void 0) {
|
|
1331
|
-
end = target ? target.length : 0;
|
|
1332
|
-
}
|
|
1333
|
-
if (thisStart === void 0) {
|
|
1334
|
-
thisStart = 0;
|
|
1335
|
-
}
|
|
1336
|
-
if (thisEnd === void 0) {
|
|
1337
|
-
thisEnd = this.length;
|
|
1338
|
-
}
|
|
1339
|
-
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
|
1340
|
-
throw new RangeError("out of range index");
|
|
1341
|
-
}
|
|
1342
|
-
if (thisStart >= thisEnd && start >= end) {
|
|
1343
|
-
return 0;
|
|
1344
|
-
}
|
|
1345
|
-
if (thisStart >= thisEnd) {
|
|
1346
|
-
return -1;
|
|
1347
|
-
}
|
|
1348
|
-
if (start >= end) {
|
|
1349
|
-
return 1;
|
|
1350
|
-
}
|
|
1351
|
-
start >>>= 0;
|
|
1352
|
-
end >>>= 0;
|
|
1353
|
-
thisStart >>>= 0;
|
|
1354
|
-
thisEnd >>>= 0;
|
|
1355
|
-
if (this === target) return 0;
|
|
1356
|
-
let x = thisEnd - thisStart;
|
|
1357
|
-
let y = end - start;
|
|
1358
|
-
const len = Math.min(x, y);
|
|
1359
|
-
const thisCopy = this.slice(thisStart, thisEnd);
|
|
1360
|
-
const targetCopy = target.slice(start, end);
|
|
1361
|
-
for (let i = 0; i < len; ++i) {
|
|
1362
|
-
if (thisCopy[i] !== targetCopy[i]) {
|
|
1363
|
-
x = thisCopy[i];
|
|
1364
|
-
y = targetCopy[i];
|
|
1365
|
-
break;
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
if (x < y) return -1;
|
|
1369
|
-
if (y < x) return 1;
|
|
1370
|
-
return 0;
|
|
1371
|
-
}, "compare");
|
|
1372
|
-
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
|
|
1373
|
-
if (buffer.length === 0) return -1;
|
|
1374
|
-
if (typeof byteOffset === "string") {
|
|
1375
|
-
encoding = byteOffset;
|
|
1376
|
-
byteOffset = 0;
|
|
1377
|
-
} else if (byteOffset > 2147483647) {
|
|
1378
|
-
byteOffset = 2147483647;
|
|
1379
|
-
} else if (byteOffset < -2147483648) {
|
|
1380
|
-
byteOffset = -2147483648;
|
|
1381
|
-
}
|
|
1382
|
-
byteOffset = +byteOffset;
|
|
1383
|
-
if (numberIsNaN(byteOffset)) {
|
|
1384
|
-
byteOffset = dir ? 0 : buffer.length - 1;
|
|
1385
|
-
}
|
|
1386
|
-
if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
|
|
1387
|
-
if (byteOffset >= buffer.length) {
|
|
1388
|
-
if (dir) return -1;
|
|
1389
|
-
else byteOffset = buffer.length - 1;
|
|
1390
|
-
} else if (byteOffset < 0) {
|
|
1391
|
-
if (dir) byteOffset = 0;
|
|
1392
|
-
else return -1;
|
|
1393
|
-
}
|
|
1394
|
-
if (typeof val === "string") {
|
|
1395
|
-
val = Buffer3.from(val, encoding);
|
|
1396
|
-
}
|
|
1397
|
-
if (Buffer3.isBuffer(val)) {
|
|
1398
|
-
if (val.length === 0) {
|
|
1399
|
-
return -1;
|
|
1400
|
-
}
|
|
1401
|
-
return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
|
|
1402
|
-
} else if (typeof val === "number") {
|
|
1403
|
-
val = val & 255;
|
|
1404
|
-
if (typeof Uint8Array.prototype.indexOf === "function") {
|
|
1405
|
-
if (dir) {
|
|
1406
|
-
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
|
|
1407
|
-
} else {
|
|
1408
|
-
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
return arrayIndexOf(buffer, [
|
|
1412
|
-
val
|
|
1413
|
-
], byteOffset, encoding, dir);
|
|
1414
|
-
}
|
|
1415
|
-
throw new TypeError("val must be string, number or Buffer");
|
|
1416
|
-
}
|
|
1417
|
-
__name(bidirectionalIndexOf, "bidirectionalIndexOf");
|
|
1418
|
-
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
|
|
1419
|
-
let indexSize = 1;
|
|
1420
|
-
let arrLength = arr.length;
|
|
1421
|
-
let valLength = val.length;
|
|
1422
|
-
if (encoding !== void 0) {
|
|
1423
|
-
encoding = String(encoding).toLowerCase();
|
|
1424
|
-
if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
|
|
1425
|
-
if (arr.length < 2 || val.length < 2) {
|
|
1426
|
-
return -1;
|
|
1427
|
-
}
|
|
1428
|
-
indexSize = 2;
|
|
1429
|
-
arrLength /= 2;
|
|
1430
|
-
valLength /= 2;
|
|
1431
|
-
byteOffset /= 2;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
function read(buf, i2) {
|
|
1435
|
-
if (indexSize === 1) {
|
|
1436
|
-
return buf[i2];
|
|
1437
|
-
} else {
|
|
1438
|
-
return buf.readUInt16BE(i2 * indexSize);
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
__name(read, "read");
|
|
1442
|
-
let i;
|
|
1443
|
-
if (dir) {
|
|
1444
|
-
let foundIndex = -1;
|
|
1445
|
-
for (i = byteOffset; i < arrLength; i++) {
|
|
1446
|
-
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
|
1447
|
-
if (foundIndex === -1) foundIndex = i;
|
|
1448
|
-
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
|
|
1449
|
-
} else {
|
|
1450
|
-
if (foundIndex !== -1) i -= i - foundIndex;
|
|
1451
|
-
foundIndex = -1;
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
} else {
|
|
1455
|
-
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
|
|
1456
|
-
for (i = byteOffset; i >= 0; i--) {
|
|
1457
|
-
let found = true;
|
|
1458
|
-
for (let j = 0; j < valLength; j++) {
|
|
1459
|
-
if (read(arr, i + j) !== read(val, j)) {
|
|
1460
|
-
found = false;
|
|
1461
|
-
break;
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
if (found) return i;
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
return -1;
|
|
1468
|
-
}
|
|
1469
|
-
__name(arrayIndexOf, "arrayIndexOf");
|
|
1470
|
-
Buffer3.prototype.includes = /* @__PURE__ */ __name(function includes2(val, byteOffset, encoding) {
|
|
1471
|
-
return this.indexOf(val, byteOffset, encoding) !== -1;
|
|
1472
|
-
}, "includes");
|
|
1473
|
-
Buffer3.prototype.indexOf = /* @__PURE__ */ __name(function indexOf(val, byteOffset, encoding) {
|
|
1474
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
|
|
1475
|
-
}, "indexOf");
|
|
1476
|
-
Buffer3.prototype.lastIndexOf = /* @__PURE__ */ __name(function lastIndexOf(val, byteOffset, encoding) {
|
|
1477
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
|
|
1478
|
-
}, "lastIndexOf");
|
|
1479
|
-
function hexWrite(buf, string, offset, length) {
|
|
1480
|
-
offset = Number(offset) || 0;
|
|
1481
|
-
const remaining = buf.length - offset;
|
|
1482
|
-
if (!length) {
|
|
1483
|
-
length = remaining;
|
|
1484
|
-
} else {
|
|
1485
|
-
length = Number(length);
|
|
1486
|
-
if (length > remaining) {
|
|
1487
|
-
length = remaining;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
const strLen = string.length;
|
|
1491
|
-
if (length > strLen / 2) {
|
|
1492
|
-
length = strLen / 2;
|
|
1493
|
-
}
|
|
1494
|
-
let i;
|
|
1495
|
-
for (i = 0; i < length; ++i) {
|
|
1496
|
-
const parsed = parseInt(string.substr(i * 2, 2), 16);
|
|
1497
|
-
if (numberIsNaN(parsed)) return i;
|
|
1498
|
-
buf[offset + i] = parsed;
|
|
1499
|
-
}
|
|
1500
|
-
return i;
|
|
1501
|
-
}
|
|
1502
|
-
__name(hexWrite, "hexWrite");
|
|
1503
|
-
function utf8Write(buf, string, offset, length) {
|
|
1504
|
-
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
|
|
1505
|
-
}
|
|
1506
|
-
__name(utf8Write, "utf8Write");
|
|
1507
|
-
function asciiWrite(buf, string, offset, length) {
|
|
1508
|
-
return blitBuffer(asciiToBytes(string), buf, offset, length);
|
|
1509
|
-
}
|
|
1510
|
-
__name(asciiWrite, "asciiWrite");
|
|
1511
|
-
function base64Write(buf, string, offset, length) {
|
|
1512
|
-
return blitBuffer(base64ToBytes(string), buf, offset, length);
|
|
1513
|
-
}
|
|
1514
|
-
__name(base64Write, "base64Write");
|
|
1515
|
-
function ucs2Write(buf, string, offset, length) {
|
|
1516
|
-
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
|
|
1517
|
-
}
|
|
1518
|
-
__name(ucs2Write, "ucs2Write");
|
|
1519
|
-
Buffer3.prototype.write = /* @__PURE__ */ __name(function write(string, offset, length, encoding) {
|
|
1520
|
-
if (offset === void 0) {
|
|
1521
|
-
encoding = "utf8";
|
|
1522
|
-
length = this.length;
|
|
1523
|
-
offset = 0;
|
|
1524
|
-
} else if (length === void 0 && typeof offset === "string") {
|
|
1525
|
-
encoding = offset;
|
|
1526
|
-
length = this.length;
|
|
1527
|
-
offset = 0;
|
|
1528
|
-
} else if (isFinite(offset)) {
|
|
1529
|
-
offset = offset >>> 0;
|
|
1530
|
-
if (isFinite(length)) {
|
|
1531
|
-
length = length >>> 0;
|
|
1532
|
-
if (encoding === void 0) encoding = "utf8";
|
|
1533
|
-
} else {
|
|
1534
|
-
encoding = length;
|
|
1535
|
-
length = void 0;
|
|
1536
|
-
}
|
|
1537
|
-
} else {
|
|
1538
|
-
throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
1539
|
-
}
|
|
1540
|
-
const remaining = this.length - offset;
|
|
1541
|
-
if (length === void 0 || length > remaining) length = remaining;
|
|
1542
|
-
if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
|
|
1543
|
-
throw new RangeError("Attempt to write outside buffer bounds");
|
|
1544
|
-
}
|
|
1545
|
-
if (!encoding) encoding = "utf8";
|
|
1546
|
-
let loweredCase = false;
|
|
1547
|
-
for (; ; ) {
|
|
1548
|
-
switch (encoding) {
|
|
1549
|
-
case "hex":
|
|
1550
|
-
return hexWrite(this, string, offset, length);
|
|
1551
|
-
case "utf8":
|
|
1552
|
-
case "utf-8":
|
|
1553
|
-
return utf8Write(this, string, offset, length);
|
|
1554
|
-
case "ascii":
|
|
1555
|
-
case "latin1":
|
|
1556
|
-
case "binary":
|
|
1557
|
-
return asciiWrite(this, string, offset, length);
|
|
1558
|
-
case "base64":
|
|
1559
|
-
return base64Write(this, string, offset, length);
|
|
1560
|
-
case "ucs2":
|
|
1561
|
-
case "ucs-2":
|
|
1562
|
-
case "utf16le":
|
|
1563
|
-
case "utf-16le":
|
|
1564
|
-
return ucs2Write(this, string, offset, length);
|
|
1565
|
-
default:
|
|
1566
|
-
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
|
|
1567
|
-
encoding = ("" + encoding).toLowerCase();
|
|
1568
|
-
loweredCase = true;
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
}, "write");
|
|
1572
|
-
Buffer3.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() {
|
|
1573
|
-
return {
|
|
1574
|
-
type: "Buffer",
|
|
1575
|
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1576
|
-
};
|
|
1577
|
-
}, "toJSON");
|
|
1578
|
-
function base64Slice(buf, start, end) {
|
|
1579
|
-
if (start === 0 && end === buf.length) {
|
|
1580
|
-
return base64.fromByteArray(buf);
|
|
1581
|
-
} else {
|
|
1582
|
-
return base64.fromByteArray(buf.slice(start, end));
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
__name(base64Slice, "base64Slice");
|
|
1586
|
-
function utf8Slice(buf, start, end) {
|
|
1587
|
-
end = Math.min(buf.length, end);
|
|
1588
|
-
const res = [];
|
|
1589
|
-
let i = start;
|
|
1590
|
-
while (i < end) {
|
|
1591
|
-
const firstByte = buf[i];
|
|
1592
|
-
let codePoint = null;
|
|
1593
|
-
let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
|
|
1594
|
-
if (i + bytesPerSequence <= end) {
|
|
1595
|
-
let secondByte, thirdByte, fourthByte, tempCodePoint;
|
|
1596
|
-
switch (bytesPerSequence) {
|
|
1597
|
-
case 1:
|
|
1598
|
-
if (firstByte < 128) {
|
|
1599
|
-
codePoint = firstByte;
|
|
1600
|
-
}
|
|
1601
|
-
break;
|
|
1602
|
-
case 2:
|
|
1603
|
-
secondByte = buf[i + 1];
|
|
1604
|
-
if ((secondByte & 192) === 128) {
|
|
1605
|
-
tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
|
|
1606
|
-
if (tempCodePoint > 127) {
|
|
1607
|
-
codePoint = tempCodePoint;
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
break;
|
|
1611
|
-
case 3:
|
|
1612
|
-
secondByte = buf[i + 1];
|
|
1613
|
-
thirdByte = buf[i + 2];
|
|
1614
|
-
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
|
|
1615
|
-
tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
|
|
1616
|
-
if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
|
|
1617
|
-
codePoint = tempCodePoint;
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
break;
|
|
1621
|
-
case 4:
|
|
1622
|
-
secondByte = buf[i + 1];
|
|
1623
|
-
thirdByte = buf[i + 2];
|
|
1624
|
-
fourthByte = buf[i + 3];
|
|
1625
|
-
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
|
|
1626
|
-
tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
|
|
1627
|
-
if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
|
|
1628
|
-
codePoint = tempCodePoint;
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
if (codePoint === null) {
|
|
1634
|
-
codePoint = 65533;
|
|
1635
|
-
bytesPerSequence = 1;
|
|
1636
|
-
} else if (codePoint > 65535) {
|
|
1637
|
-
codePoint -= 65536;
|
|
1638
|
-
res.push(codePoint >>> 10 & 1023 | 55296);
|
|
1639
|
-
codePoint = 56320 | codePoint & 1023;
|
|
1640
|
-
}
|
|
1641
|
-
res.push(codePoint);
|
|
1642
|
-
i += bytesPerSequence;
|
|
1643
|
-
}
|
|
1644
|
-
return decodeCodePointsArray(res);
|
|
1645
|
-
}
|
|
1646
|
-
__name(utf8Slice, "utf8Slice");
|
|
1647
|
-
var MAX_ARGUMENTS_LENGTH = 4096;
|
|
1648
|
-
function decodeCodePointsArray(codePoints) {
|
|
1649
|
-
const len = codePoints.length;
|
|
1650
|
-
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
1651
|
-
return String.fromCharCode.apply(String, codePoints);
|
|
1652
|
-
}
|
|
1653
|
-
let res = "";
|
|
1654
|
-
let i = 0;
|
|
1655
|
-
while (i < len) {
|
|
1656
|
-
res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
|
|
1657
|
-
}
|
|
1658
|
-
return res;
|
|
1659
|
-
}
|
|
1660
|
-
__name(decodeCodePointsArray, "decodeCodePointsArray");
|
|
1661
|
-
function asciiSlice(buf, start, end) {
|
|
1662
|
-
let ret = "";
|
|
1663
|
-
end = Math.min(buf.length, end);
|
|
1664
|
-
for (let i = start; i < end; ++i) {
|
|
1665
|
-
ret += String.fromCharCode(buf[i] & 127);
|
|
1666
|
-
}
|
|
1667
|
-
return ret;
|
|
1668
|
-
}
|
|
1669
|
-
__name(asciiSlice, "asciiSlice");
|
|
1670
|
-
function latin1Slice(buf, start, end) {
|
|
1671
|
-
let ret = "";
|
|
1672
|
-
end = Math.min(buf.length, end);
|
|
1673
|
-
for (let i = start; i < end; ++i) {
|
|
1674
|
-
ret += String.fromCharCode(buf[i]);
|
|
1675
|
-
}
|
|
1676
|
-
return ret;
|
|
1677
|
-
}
|
|
1678
|
-
__name(latin1Slice, "latin1Slice");
|
|
1679
|
-
function hexSlice(buf, start, end) {
|
|
1680
|
-
const len = buf.length;
|
|
1681
|
-
if (!start || start < 0) start = 0;
|
|
1682
|
-
if (!end || end < 0 || end > len) end = len;
|
|
1683
|
-
let out = "";
|
|
1684
|
-
for (let i = start; i < end; ++i) {
|
|
1685
|
-
out += hexSliceLookupTable[buf[i]];
|
|
1686
|
-
}
|
|
1687
|
-
return out;
|
|
1688
|
-
}
|
|
1689
|
-
__name(hexSlice, "hexSlice");
|
|
1690
|
-
function utf16leSlice(buf, start, end) {
|
|
1691
|
-
const bytes = buf.slice(start, end);
|
|
1692
|
-
let res = "";
|
|
1693
|
-
for (let i = 0; i < bytes.length - 1; i += 2) {
|
|
1694
|
-
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
|
|
1695
|
-
}
|
|
1696
|
-
return res;
|
|
1697
|
-
}
|
|
1698
|
-
__name(utf16leSlice, "utf16leSlice");
|
|
1699
|
-
Buffer3.prototype.slice = /* @__PURE__ */ __name(function slice(start, end) {
|
|
1700
|
-
const len = this.length;
|
|
1701
|
-
start = ~~start;
|
|
1702
|
-
end = end === void 0 ? len : ~~end;
|
|
1703
|
-
if (start < 0) {
|
|
1704
|
-
start += len;
|
|
1705
|
-
if (start < 0) start = 0;
|
|
1706
|
-
} else if (start > len) {
|
|
1707
|
-
start = len;
|
|
1708
|
-
}
|
|
1709
|
-
if (end < 0) {
|
|
1710
|
-
end += len;
|
|
1711
|
-
if (end < 0) end = 0;
|
|
1712
|
-
} else if (end > len) {
|
|
1713
|
-
end = len;
|
|
1714
|
-
}
|
|
1715
|
-
if (end < start) end = start;
|
|
1716
|
-
const newBuf = this.subarray(start, end);
|
|
1717
|
-
Object.setPrototypeOf(newBuf, Buffer3.prototype);
|
|
1718
|
-
return newBuf;
|
|
1719
|
-
}, "slice");
|
|
1720
|
-
function checkOffset(offset, ext, length) {
|
|
1721
|
-
if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
|
|
1722
|
-
if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
|
|
1723
|
-
}
|
|
1724
|
-
__name(checkOffset, "checkOffset");
|
|
1725
|
-
Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = /* @__PURE__ */ __name(function readUIntLE(offset, byteLength2, noAssert) {
|
|
1726
|
-
offset = offset >>> 0;
|
|
1727
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1728
|
-
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
1729
|
-
let val = this[offset];
|
|
1730
|
-
let mul = 1;
|
|
1731
|
-
let i = 0;
|
|
1732
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1733
|
-
val += this[offset + i] * mul;
|
|
1734
|
-
}
|
|
1735
|
-
return val;
|
|
1736
|
-
}, "readUIntLE");
|
|
1737
|
-
Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = /* @__PURE__ */ __name(function readUIntBE(offset, byteLength2, noAssert) {
|
|
1738
|
-
offset = offset >>> 0;
|
|
1739
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1740
|
-
if (!noAssert) {
|
|
1741
|
-
checkOffset(offset, byteLength2, this.length);
|
|
1742
|
-
}
|
|
1743
|
-
let val = this[offset + --byteLength2];
|
|
1744
|
-
let mul = 1;
|
|
1745
|
-
while (byteLength2 > 0 && (mul *= 256)) {
|
|
1746
|
-
val += this[offset + --byteLength2] * mul;
|
|
1747
|
-
}
|
|
1748
|
-
return val;
|
|
1749
|
-
}, "readUIntBE");
|
|
1750
|
-
Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = /* @__PURE__ */ __name(function readUInt8(offset, noAssert) {
|
|
1751
|
-
offset = offset >>> 0;
|
|
1752
|
-
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
1753
|
-
return this[offset];
|
|
1754
|
-
}, "readUInt8");
|
|
1755
|
-
Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = /* @__PURE__ */ __name(function readUInt16LE(offset, noAssert) {
|
|
1756
|
-
offset = offset >>> 0;
|
|
1757
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1758
|
-
return this[offset] | this[offset + 1] << 8;
|
|
1759
|
-
}, "readUInt16LE");
|
|
1760
|
-
Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = /* @__PURE__ */ __name(function readUInt16BE(offset, noAssert) {
|
|
1761
|
-
offset = offset >>> 0;
|
|
1762
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1763
|
-
return this[offset] << 8 | this[offset + 1];
|
|
1764
|
-
}, "readUInt16BE");
|
|
1765
|
-
Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = /* @__PURE__ */ __name(function readUInt32LE(offset, noAssert) {
|
|
1766
|
-
offset = offset >>> 0;
|
|
1767
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1768
|
-
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
|
|
1769
|
-
}, "readUInt32LE");
|
|
1770
|
-
Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = /* @__PURE__ */ __name(function readUInt32BE(offset, noAssert) {
|
|
1771
|
-
offset = offset >>> 0;
|
|
1772
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1773
|
-
return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
|
|
1774
|
-
}, "readUInt32BE");
|
|
1775
|
-
Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigUInt64LE(offset) {
|
|
1776
|
-
offset = offset >>> 0;
|
|
1777
|
-
validateNumber(offset, "offset");
|
|
1778
|
-
const first = this[offset];
|
|
1779
|
-
const last = this[offset + 7];
|
|
1780
|
-
if (first === void 0 || last === void 0) {
|
|
1781
|
-
boundsError(offset, this.length - 8);
|
|
1782
|
-
}
|
|
1783
|
-
const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
|
|
1784
|
-
const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
|
|
1785
|
-
return BigInt(lo) + (BigInt(hi) << BigInt(32));
|
|
1786
|
-
}, "readBigUInt64LE"));
|
|
1787
|
-
Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigUInt64BE(offset) {
|
|
1788
|
-
offset = offset >>> 0;
|
|
1789
|
-
validateNumber(offset, "offset");
|
|
1790
|
-
const first = this[offset];
|
|
1791
|
-
const last = this[offset + 7];
|
|
1792
|
-
if (first === void 0 || last === void 0) {
|
|
1793
|
-
boundsError(offset, this.length - 8);
|
|
1794
|
-
}
|
|
1795
|
-
const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1796
|
-
const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
|
|
1797
|
-
return (BigInt(hi) << BigInt(32)) + BigInt(lo);
|
|
1798
|
-
}, "readBigUInt64BE"));
|
|
1799
|
-
Buffer3.prototype.readIntLE = /* @__PURE__ */ __name(function readIntLE(offset, byteLength2, noAssert) {
|
|
1800
|
-
offset = offset >>> 0;
|
|
1801
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1802
|
-
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
1803
|
-
let val = this[offset];
|
|
1804
|
-
let mul = 1;
|
|
1805
|
-
let i = 0;
|
|
1806
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1807
|
-
val += this[offset + i] * mul;
|
|
1808
|
-
}
|
|
1809
|
-
mul *= 128;
|
|
1810
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
|
|
1811
|
-
return val;
|
|
1812
|
-
}, "readIntLE");
|
|
1813
|
-
Buffer3.prototype.readIntBE = /* @__PURE__ */ __name(function readIntBE(offset, byteLength2, noAssert) {
|
|
1814
|
-
offset = offset >>> 0;
|
|
1815
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1816
|
-
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
1817
|
-
let i = byteLength2;
|
|
1818
|
-
let mul = 1;
|
|
1819
|
-
let val = this[offset + --i];
|
|
1820
|
-
while (i > 0 && (mul *= 256)) {
|
|
1821
|
-
val += this[offset + --i] * mul;
|
|
1822
|
-
}
|
|
1823
|
-
mul *= 128;
|
|
1824
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
|
|
1825
|
-
return val;
|
|
1826
|
-
}, "readIntBE");
|
|
1827
|
-
Buffer3.prototype.readInt8 = /* @__PURE__ */ __name(function readInt8(offset, noAssert) {
|
|
1828
|
-
offset = offset >>> 0;
|
|
1829
|
-
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
1830
|
-
if (!(this[offset] & 128)) return this[offset];
|
|
1831
|
-
return (255 - this[offset] + 1) * -1;
|
|
1832
|
-
}, "readInt8");
|
|
1833
|
-
Buffer3.prototype.readInt16LE = /* @__PURE__ */ __name(function readInt16LE(offset, noAssert) {
|
|
1834
|
-
offset = offset >>> 0;
|
|
1835
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1836
|
-
const val = this[offset] | this[offset + 1] << 8;
|
|
1837
|
-
return val & 32768 ? val | 4294901760 : val;
|
|
1838
|
-
}, "readInt16LE");
|
|
1839
|
-
Buffer3.prototype.readInt16BE = /* @__PURE__ */ __name(function readInt16BE(offset, noAssert) {
|
|
1840
|
-
offset = offset >>> 0;
|
|
1841
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1842
|
-
const val = this[offset + 1] | this[offset] << 8;
|
|
1843
|
-
return val & 32768 ? val | 4294901760 : val;
|
|
1844
|
-
}, "readInt16BE");
|
|
1845
|
-
Buffer3.prototype.readInt32LE = /* @__PURE__ */ __name(function readInt32LE(offset, noAssert) {
|
|
1846
|
-
offset = offset >>> 0;
|
|
1847
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1848
|
-
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
|
|
1849
|
-
}, "readInt32LE");
|
|
1850
|
-
Buffer3.prototype.readInt32BE = /* @__PURE__ */ __name(function readInt32BE(offset, noAssert) {
|
|
1851
|
-
offset = offset >>> 0;
|
|
1852
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1853
|
-
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
|
|
1854
|
-
}, "readInt32BE");
|
|
1855
|
-
Buffer3.prototype.readBigInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigInt64LE(offset) {
|
|
1856
|
-
offset = offset >>> 0;
|
|
1857
|
-
validateNumber(offset, "offset");
|
|
1858
|
-
const first = this[offset];
|
|
1859
|
-
const last = this[offset + 7];
|
|
1860
|
-
if (first === void 0 || last === void 0) {
|
|
1861
|
-
boundsError(offset, this.length - 8);
|
|
1862
|
-
}
|
|
1863
|
-
const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
|
|
1864
|
-
return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
|
|
1865
|
-
}, "readBigInt64LE"));
|
|
1866
|
-
Buffer3.prototype.readBigInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigInt64BE(offset) {
|
|
1867
|
-
offset = offset >>> 0;
|
|
1868
|
-
validateNumber(offset, "offset");
|
|
1869
|
-
const first = this[offset];
|
|
1870
|
-
const last = this[offset + 7];
|
|
1871
|
-
if (first === void 0 || last === void 0) {
|
|
1872
|
-
boundsError(offset, this.length - 8);
|
|
1873
|
-
}
|
|
1874
|
-
const val = (first << 24) + // Overflow
|
|
1875
|
-
this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1876
|
-
return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
|
|
1877
|
-
}, "readBigInt64BE"));
|
|
1878
|
-
Buffer3.prototype.readFloatLE = /* @__PURE__ */ __name(function readFloatLE(offset, noAssert) {
|
|
1879
|
-
offset = offset >>> 0;
|
|
1880
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1881
|
-
return ieee754.read(this, offset, true, 23, 4);
|
|
1882
|
-
}, "readFloatLE");
|
|
1883
|
-
Buffer3.prototype.readFloatBE = /* @__PURE__ */ __name(function readFloatBE(offset, noAssert) {
|
|
1884
|
-
offset = offset >>> 0;
|
|
1885
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1886
|
-
return ieee754.read(this, offset, false, 23, 4);
|
|
1887
|
-
}, "readFloatBE");
|
|
1888
|
-
Buffer3.prototype.readDoubleLE = /* @__PURE__ */ __name(function readDoubleLE(offset, noAssert) {
|
|
1889
|
-
offset = offset >>> 0;
|
|
1890
|
-
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
1891
|
-
return ieee754.read(this, offset, true, 52, 8);
|
|
1892
|
-
}, "readDoubleLE");
|
|
1893
|
-
Buffer3.prototype.readDoubleBE = /* @__PURE__ */ __name(function readDoubleBE(offset, noAssert) {
|
|
1894
|
-
offset = offset >>> 0;
|
|
1895
|
-
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
1896
|
-
return ieee754.read(this, offset, false, 52, 8);
|
|
1897
|
-
}, "readDoubleBE");
|
|
1898
|
-
function checkInt(buf, value, offset, ext, max, min) {
|
|
1899
|
-
if (!Buffer3.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1900
|
-
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
|
|
1901
|
-
if (offset + ext > buf.length) throw new RangeError("Index out of range");
|
|
1902
|
-
}
|
|
1903
|
-
__name(checkInt, "checkInt");
|
|
1904
|
-
Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = /* @__PURE__ */ __name(function writeUIntLE(value, offset, byteLength2, noAssert) {
|
|
1905
|
-
value = +value;
|
|
1906
|
-
offset = offset >>> 0;
|
|
1907
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1908
|
-
if (!noAssert) {
|
|
1909
|
-
const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
|
|
1910
|
-
checkInt(this, value, offset, byteLength2, maxBytes, 0);
|
|
1911
|
-
}
|
|
1912
|
-
let mul = 1;
|
|
1913
|
-
let i = 0;
|
|
1914
|
-
this[offset] = value & 255;
|
|
1915
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1916
|
-
this[offset + i] = value / mul & 255;
|
|
1917
|
-
}
|
|
1918
|
-
return offset + byteLength2;
|
|
1919
|
-
}, "writeUIntLE");
|
|
1920
|
-
Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = /* @__PURE__ */ __name(function writeUIntBE(value, offset, byteLength2, noAssert) {
|
|
1921
|
-
value = +value;
|
|
1922
|
-
offset = offset >>> 0;
|
|
1923
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1924
|
-
if (!noAssert) {
|
|
1925
|
-
const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
|
|
1926
|
-
checkInt(this, value, offset, byteLength2, maxBytes, 0);
|
|
1927
|
-
}
|
|
1928
|
-
let i = byteLength2 - 1;
|
|
1929
|
-
let mul = 1;
|
|
1930
|
-
this[offset + i] = value & 255;
|
|
1931
|
-
while (--i >= 0 && (mul *= 256)) {
|
|
1932
|
-
this[offset + i] = value / mul & 255;
|
|
1933
|
-
}
|
|
1934
|
-
return offset + byteLength2;
|
|
1935
|
-
}, "writeUIntBE");
|
|
1936
|
-
Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = /* @__PURE__ */ __name(function writeUInt8(value, offset, noAssert) {
|
|
1937
|
-
value = +value;
|
|
1938
|
-
offset = offset >>> 0;
|
|
1939
|
-
if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
|
|
1940
|
-
this[offset] = value & 255;
|
|
1941
|
-
return offset + 1;
|
|
1942
|
-
}, "writeUInt8");
|
|
1943
|
-
Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = /* @__PURE__ */ __name(function writeUInt16LE(value, offset, noAssert) {
|
|
1944
|
-
value = +value;
|
|
1945
|
-
offset = offset >>> 0;
|
|
1946
|
-
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
1947
|
-
this[offset] = value & 255;
|
|
1948
|
-
this[offset + 1] = value >>> 8;
|
|
1949
|
-
return offset + 2;
|
|
1950
|
-
}, "writeUInt16LE");
|
|
1951
|
-
Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = /* @__PURE__ */ __name(function writeUInt16BE(value, offset, noAssert) {
|
|
1952
|
-
value = +value;
|
|
1953
|
-
offset = offset >>> 0;
|
|
1954
|
-
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
1955
|
-
this[offset] = value >>> 8;
|
|
1956
|
-
this[offset + 1] = value & 255;
|
|
1957
|
-
return offset + 2;
|
|
1958
|
-
}, "writeUInt16BE");
|
|
1959
|
-
Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = /* @__PURE__ */ __name(function writeUInt32LE(value, offset, noAssert) {
|
|
1960
|
-
value = +value;
|
|
1961
|
-
offset = offset >>> 0;
|
|
1962
|
-
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1963
|
-
this[offset + 3] = value >>> 24;
|
|
1964
|
-
this[offset + 2] = value >>> 16;
|
|
1965
|
-
this[offset + 1] = value >>> 8;
|
|
1966
|
-
this[offset] = value & 255;
|
|
1967
|
-
return offset + 4;
|
|
1968
|
-
}, "writeUInt32LE");
|
|
1969
|
-
Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = /* @__PURE__ */ __name(function writeUInt32BE(value, offset, noAssert) {
|
|
1970
|
-
value = +value;
|
|
1971
|
-
offset = offset >>> 0;
|
|
1972
|
-
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1973
|
-
this[offset] = value >>> 24;
|
|
1974
|
-
this[offset + 1] = value >>> 16;
|
|
1975
|
-
this[offset + 2] = value >>> 8;
|
|
1976
|
-
this[offset + 3] = value & 255;
|
|
1977
|
-
return offset + 4;
|
|
1978
|
-
}, "writeUInt32BE");
|
|
1979
|
-
function wrtBigUInt64LE(buf, value, offset, min, max) {
|
|
1980
|
-
checkIntBI(value, min, max, buf, offset, 7);
|
|
1981
|
-
let lo = Number(value & BigInt(4294967295));
|
|
1982
|
-
buf[offset++] = lo;
|
|
1983
|
-
lo = lo >> 8;
|
|
1984
|
-
buf[offset++] = lo;
|
|
1985
|
-
lo = lo >> 8;
|
|
1986
|
-
buf[offset++] = lo;
|
|
1987
|
-
lo = lo >> 8;
|
|
1988
|
-
buf[offset++] = lo;
|
|
1989
|
-
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
1990
|
-
buf[offset++] = hi;
|
|
1991
|
-
hi = hi >> 8;
|
|
1992
|
-
buf[offset++] = hi;
|
|
1993
|
-
hi = hi >> 8;
|
|
1994
|
-
buf[offset++] = hi;
|
|
1995
|
-
hi = hi >> 8;
|
|
1996
|
-
buf[offset++] = hi;
|
|
1997
|
-
return offset;
|
|
1998
|
-
}
|
|
1999
|
-
__name(wrtBigUInt64LE, "wrtBigUInt64LE");
|
|
2000
|
-
function wrtBigUInt64BE(buf, value, offset, min, max) {
|
|
2001
|
-
checkIntBI(value, min, max, buf, offset, 7);
|
|
2002
|
-
let lo = Number(value & BigInt(4294967295));
|
|
2003
|
-
buf[offset + 7] = lo;
|
|
2004
|
-
lo = lo >> 8;
|
|
2005
|
-
buf[offset + 6] = lo;
|
|
2006
|
-
lo = lo >> 8;
|
|
2007
|
-
buf[offset + 5] = lo;
|
|
2008
|
-
lo = lo >> 8;
|
|
2009
|
-
buf[offset + 4] = lo;
|
|
2010
|
-
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
2011
|
-
buf[offset + 3] = hi;
|
|
2012
|
-
hi = hi >> 8;
|
|
2013
|
-
buf[offset + 2] = hi;
|
|
2014
|
-
hi = hi >> 8;
|
|
2015
|
-
buf[offset + 1] = hi;
|
|
2016
|
-
hi = hi >> 8;
|
|
2017
|
-
buf[offset] = hi;
|
|
2018
|
-
return offset + 8;
|
|
2019
|
-
}
|
|
2020
|
-
__name(wrtBigUInt64BE, "wrtBigUInt64BE");
|
|
2021
|
-
Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigUInt64LE(value, offset = 0) {
|
|
2022
|
-
return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
2023
|
-
}, "writeBigUInt64LE"));
|
|
2024
|
-
Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigUInt64BE(value, offset = 0) {
|
|
2025
|
-
return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
2026
|
-
}, "writeBigUInt64BE"));
|
|
2027
|
-
Buffer3.prototype.writeIntLE = /* @__PURE__ */ __name(function writeIntLE(value, offset, byteLength2, noAssert) {
|
|
2028
|
-
value = +value;
|
|
2029
|
-
offset = offset >>> 0;
|
|
2030
|
-
if (!noAssert) {
|
|
2031
|
-
const limit = Math.pow(2, 8 * byteLength2 - 1);
|
|
2032
|
-
checkInt(this, value, offset, byteLength2, limit - 1, -limit);
|
|
2033
|
-
}
|
|
2034
|
-
let i = 0;
|
|
2035
|
-
let mul = 1;
|
|
2036
|
-
let sub = 0;
|
|
2037
|
-
this[offset] = value & 255;
|
|
2038
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
2039
|
-
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
|
2040
|
-
sub = 1;
|
|
2041
|
-
}
|
|
2042
|
-
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
2043
|
-
}
|
|
2044
|
-
return offset + byteLength2;
|
|
2045
|
-
}, "writeIntLE");
|
|
2046
|
-
Buffer3.prototype.writeIntBE = /* @__PURE__ */ __name(function writeIntBE(value, offset, byteLength2, noAssert) {
|
|
2047
|
-
value = +value;
|
|
2048
|
-
offset = offset >>> 0;
|
|
2049
|
-
if (!noAssert) {
|
|
2050
|
-
const limit = Math.pow(2, 8 * byteLength2 - 1);
|
|
2051
|
-
checkInt(this, value, offset, byteLength2, limit - 1, -limit);
|
|
2052
|
-
}
|
|
2053
|
-
let i = byteLength2 - 1;
|
|
2054
|
-
let mul = 1;
|
|
2055
|
-
let sub = 0;
|
|
2056
|
-
this[offset + i] = value & 255;
|
|
2057
|
-
while (--i >= 0 && (mul *= 256)) {
|
|
2058
|
-
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
|
2059
|
-
sub = 1;
|
|
2060
|
-
}
|
|
2061
|
-
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
2062
|
-
}
|
|
2063
|
-
return offset + byteLength2;
|
|
2064
|
-
}, "writeIntBE");
|
|
2065
|
-
Buffer3.prototype.writeInt8 = /* @__PURE__ */ __name(function writeInt8(value, offset, noAssert) {
|
|
2066
|
-
value = +value;
|
|
2067
|
-
offset = offset >>> 0;
|
|
2068
|
-
if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
|
|
2069
|
-
if (value < 0) value = 255 + value + 1;
|
|
2070
|
-
this[offset] = value & 255;
|
|
2071
|
-
return offset + 1;
|
|
2072
|
-
}, "writeInt8");
|
|
2073
|
-
Buffer3.prototype.writeInt16LE = /* @__PURE__ */ __name(function writeInt16LE(value, offset, noAssert) {
|
|
2074
|
-
value = +value;
|
|
2075
|
-
offset = offset >>> 0;
|
|
2076
|
-
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
2077
|
-
this[offset] = value & 255;
|
|
2078
|
-
this[offset + 1] = value >>> 8;
|
|
2079
|
-
return offset + 2;
|
|
2080
|
-
}, "writeInt16LE");
|
|
2081
|
-
Buffer3.prototype.writeInt16BE = /* @__PURE__ */ __name(function writeInt16BE(value, offset, noAssert) {
|
|
2082
|
-
value = +value;
|
|
2083
|
-
offset = offset >>> 0;
|
|
2084
|
-
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
2085
|
-
this[offset] = value >>> 8;
|
|
2086
|
-
this[offset + 1] = value & 255;
|
|
2087
|
-
return offset + 2;
|
|
2088
|
-
}, "writeInt16BE");
|
|
2089
|
-
Buffer3.prototype.writeInt32LE = /* @__PURE__ */ __name(function writeInt32LE(value, offset, noAssert) {
|
|
2090
|
-
value = +value;
|
|
2091
|
-
offset = offset >>> 0;
|
|
2092
|
-
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
2093
|
-
this[offset] = value & 255;
|
|
2094
|
-
this[offset + 1] = value >>> 8;
|
|
2095
|
-
this[offset + 2] = value >>> 16;
|
|
2096
|
-
this[offset + 3] = value >>> 24;
|
|
2097
|
-
return offset + 4;
|
|
2098
|
-
}, "writeInt32LE");
|
|
2099
|
-
Buffer3.prototype.writeInt32BE = /* @__PURE__ */ __name(function writeInt32BE(value, offset, noAssert) {
|
|
2100
|
-
value = +value;
|
|
2101
|
-
offset = offset >>> 0;
|
|
2102
|
-
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
2103
|
-
if (value < 0) value = 4294967295 + value + 1;
|
|
2104
|
-
this[offset] = value >>> 24;
|
|
2105
|
-
this[offset + 1] = value >>> 16;
|
|
2106
|
-
this[offset + 2] = value >>> 8;
|
|
2107
|
-
this[offset + 3] = value & 255;
|
|
2108
|
-
return offset + 4;
|
|
2109
|
-
}, "writeInt32BE");
|
|
2110
|
-
Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigInt64LE(value, offset = 0) {
|
|
2111
|
-
return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
2112
|
-
}, "writeBigInt64LE"));
|
|
2113
|
-
Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigInt64BE(value, offset = 0) {
|
|
2114
|
-
return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
2115
|
-
}, "writeBigInt64BE"));
|
|
2116
|
-
function checkIEEE754(buf, value, offset, ext, max, min) {
|
|
2117
|
-
if (offset + ext > buf.length) throw new RangeError("Index out of range");
|
|
2118
|
-
if (offset < 0) throw new RangeError("Index out of range");
|
|
2119
|
-
}
|
|
2120
|
-
__name(checkIEEE754, "checkIEEE754");
|
|
2121
|
-
function writeFloat(buf, value, offset, littleEndian, noAssert) {
|
|
2122
|
-
value = +value;
|
|
2123
|
-
offset = offset >>> 0;
|
|
2124
|
-
if (!noAssert) {
|
|
2125
|
-
checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22);
|
|
2126
|
-
}
|
|
2127
|
-
ieee754.write(buf, value, offset, littleEndian, 23, 4);
|
|
2128
|
-
return offset + 4;
|
|
2129
|
-
}
|
|
2130
|
-
__name(writeFloat, "writeFloat");
|
|
2131
|
-
Buffer3.prototype.writeFloatLE = /* @__PURE__ */ __name(function writeFloatLE(value, offset, noAssert) {
|
|
2132
|
-
return writeFloat(this, value, offset, true, noAssert);
|
|
2133
|
-
}, "writeFloatLE");
|
|
2134
|
-
Buffer3.prototype.writeFloatBE = /* @__PURE__ */ __name(function writeFloatBE(value, offset, noAssert) {
|
|
2135
|
-
return writeFloat(this, value, offset, false, noAssert);
|
|
2136
|
-
}, "writeFloatBE");
|
|
2137
|
-
function writeDouble(buf, value, offset, littleEndian, noAssert) {
|
|
2138
|
-
value = +value;
|
|
2139
|
-
offset = offset >>> 0;
|
|
2140
|
-
if (!noAssert) {
|
|
2141
|
-
checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292);
|
|
2142
|
-
}
|
|
2143
|
-
ieee754.write(buf, value, offset, littleEndian, 52, 8);
|
|
2144
|
-
return offset + 8;
|
|
2145
|
-
}
|
|
2146
|
-
__name(writeDouble, "writeDouble");
|
|
2147
|
-
Buffer3.prototype.writeDoubleLE = /* @__PURE__ */ __name(function writeDoubleLE(value, offset, noAssert) {
|
|
2148
|
-
return writeDouble(this, value, offset, true, noAssert);
|
|
2149
|
-
}, "writeDoubleLE");
|
|
2150
|
-
Buffer3.prototype.writeDoubleBE = /* @__PURE__ */ __name(function writeDoubleBE(value, offset, noAssert) {
|
|
2151
|
-
return writeDouble(this, value, offset, false, noAssert);
|
|
2152
|
-
}, "writeDoubleBE");
|
|
2153
|
-
Buffer3.prototype.copy = /* @__PURE__ */ __name(function copy2(target, targetStart, start, end) {
|
|
2154
|
-
if (!Buffer3.isBuffer(target)) throw new TypeError("argument should be a Buffer");
|
|
2155
|
-
if (!start) start = 0;
|
|
2156
|
-
if (!end && end !== 0) end = this.length;
|
|
2157
|
-
if (targetStart >= target.length) targetStart = target.length;
|
|
2158
|
-
if (!targetStart) targetStart = 0;
|
|
2159
|
-
if (end > 0 && end < start) end = start;
|
|
2160
|
-
if (end === start) return 0;
|
|
2161
|
-
if (target.length === 0 || this.length === 0) return 0;
|
|
2162
|
-
if (targetStart < 0) {
|
|
2163
|
-
throw new RangeError("targetStart out of bounds");
|
|
2164
|
-
}
|
|
2165
|
-
if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
|
|
2166
|
-
if (end < 0) throw new RangeError("sourceEnd out of bounds");
|
|
2167
|
-
if (end > this.length) end = this.length;
|
|
2168
|
-
if (target.length - targetStart < end - start) {
|
|
2169
|
-
end = target.length - targetStart + start;
|
|
2170
|
-
}
|
|
2171
|
-
const len = end - start;
|
|
2172
|
-
if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
|
|
2173
|
-
this.copyWithin(targetStart, start, end);
|
|
2174
|
-
} else {
|
|
2175
|
-
Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
|
|
2176
|
-
}
|
|
2177
|
-
return len;
|
|
2178
|
-
}, "copy");
|
|
2179
|
-
Buffer3.prototype.fill = /* @__PURE__ */ __name(function fill(val, start, end, encoding) {
|
|
2180
|
-
if (typeof val === "string") {
|
|
2181
|
-
if (typeof start === "string") {
|
|
2182
|
-
encoding = start;
|
|
2183
|
-
start = 0;
|
|
2184
|
-
end = this.length;
|
|
2185
|
-
} else if (typeof end === "string") {
|
|
2186
|
-
encoding = end;
|
|
2187
|
-
end = this.length;
|
|
2188
|
-
}
|
|
2189
|
-
if (encoding !== void 0 && typeof encoding !== "string") {
|
|
2190
|
-
throw new TypeError("encoding must be a string");
|
|
2191
|
-
}
|
|
2192
|
-
if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) {
|
|
2193
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
2194
|
-
}
|
|
2195
|
-
if (val.length === 1) {
|
|
2196
|
-
const code = val.charCodeAt(0);
|
|
2197
|
-
if (encoding === "utf8" && code < 128 || encoding === "latin1") {
|
|
2198
|
-
val = code;
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
} else if (typeof val === "number") {
|
|
2202
|
-
val = val & 255;
|
|
2203
|
-
} else if (typeof val === "boolean") {
|
|
2204
|
-
val = Number(val);
|
|
2205
|
-
}
|
|
2206
|
-
if (start < 0 || this.length < start || this.length < end) {
|
|
2207
|
-
throw new RangeError("Out of range index");
|
|
2208
|
-
}
|
|
2209
|
-
if (end <= start) {
|
|
2210
|
-
return this;
|
|
2211
|
-
}
|
|
2212
|
-
start = start >>> 0;
|
|
2213
|
-
end = end === void 0 ? this.length : end >>> 0;
|
|
2214
|
-
if (!val) val = 0;
|
|
2215
|
-
let i;
|
|
2216
|
-
if (typeof val === "number") {
|
|
2217
|
-
for (i = start; i < end; ++i) {
|
|
2218
|
-
this[i] = val;
|
|
2219
|
-
}
|
|
2220
|
-
} else {
|
|
2221
|
-
const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);
|
|
2222
|
-
const len = bytes.length;
|
|
2223
|
-
if (len === 0) {
|
|
2224
|
-
throw new TypeError('The value "' + val + '" is invalid for argument "value"');
|
|
2225
|
-
}
|
|
2226
|
-
for (i = 0; i < end - start; ++i) {
|
|
2227
|
-
this[i + start] = bytes[i % len];
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
return this;
|
|
2231
|
-
}, "fill");
|
|
2232
|
-
var errors = {};
|
|
2233
|
-
function E(sym, getMessage, Base) {
|
|
2234
|
-
errors[sym] = class NodeError extends Base {
|
|
2235
|
-
static {
|
|
2236
|
-
__name(this, "NodeError");
|
|
2237
|
-
}
|
|
2238
|
-
constructor() {
|
|
2239
|
-
super();
|
|
2240
|
-
Object.defineProperty(this, "message", {
|
|
2241
|
-
value: getMessage.apply(this, arguments),
|
|
2242
|
-
writable: true,
|
|
2243
|
-
configurable: true
|
|
2244
|
-
});
|
|
2245
|
-
this.name = `${this.name} [${sym}]`;
|
|
2246
|
-
this.stack;
|
|
2247
|
-
delete this.name;
|
|
2248
|
-
}
|
|
2249
|
-
get code() {
|
|
2250
|
-
return sym;
|
|
2251
|
-
}
|
|
2252
|
-
set code(value) {
|
|
2253
|
-
Object.defineProperty(this, "code", {
|
|
2254
|
-
configurable: true,
|
|
2255
|
-
enumerable: true,
|
|
2256
|
-
value,
|
|
2257
|
-
writable: true
|
|
2258
|
-
});
|
|
2259
|
-
}
|
|
2260
|
-
toString() {
|
|
2261
|
-
return `${this.name} [${sym}]: ${this.message}`;
|
|
2262
|
-
}
|
|
2263
|
-
};
|
|
709
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
710
|
+
object[key] = [...value, ...object[key]];
|
|
711
|
+
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
712
|
+
object[key] = _defu(
|
|
713
|
+
value,
|
|
714
|
+
object[key],
|
|
715
|
+
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
716
|
+
merger
|
|
717
|
+
);
|
|
718
|
+
} else {
|
|
719
|
+
object[key] = value;
|
|
2264
720
|
}
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
msg += ` It must be ${range}. Received ${received}`;
|
|
2288
|
-
return msg;
|
|
2289
|
-
}, RangeError);
|
|
2290
|
-
function addNumericalSeparator(val) {
|
|
2291
|
-
let res = "";
|
|
2292
|
-
let i = val.length;
|
|
2293
|
-
const start = val[0] === "-" ? 1 : 0;
|
|
2294
|
-
for (; i >= start + 4; i -= 3) {
|
|
2295
|
-
res = `_${val.slice(i - 3, i)}${res}`;
|
|
2296
|
-
}
|
|
2297
|
-
return `${val.slice(0, i)}${res}`;
|
|
2298
|
-
}
|
|
2299
|
-
__name(addNumericalSeparator, "addNumericalSeparator");
|
|
2300
|
-
function checkBounds(buf, offset, byteLength2) {
|
|
2301
|
-
validateNumber(offset, "offset");
|
|
2302
|
-
if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {
|
|
2303
|
-
boundsError(offset, buf.length - (byteLength2 + 1));
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
__name(checkBounds, "checkBounds");
|
|
2307
|
-
function checkIntBI(value, min, max, buf, offset, byteLength2) {
|
|
2308
|
-
if (value > max || value < min) {
|
|
2309
|
-
const n = typeof min === "bigint" ? "n" : "";
|
|
2310
|
-
let range;
|
|
2311
|
-
if (byteLength2 > 3) {
|
|
2312
|
-
if (min === 0 || min === BigInt(0)) {
|
|
2313
|
-
range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;
|
|
2314
|
-
} else {
|
|
2315
|
-
range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;
|
|
2316
|
-
}
|
|
2317
|
-
} else {
|
|
2318
|
-
range = `>= ${min}${n} and <= ${max}${n}`;
|
|
2319
|
-
}
|
|
2320
|
-
throw new errors.ERR_OUT_OF_RANGE("value", range, value);
|
|
2321
|
-
}
|
|
2322
|
-
checkBounds(buf, offset, byteLength2);
|
|
2323
|
-
}
|
|
2324
|
-
__name(checkIntBI, "checkIntBI");
|
|
2325
|
-
function validateNumber(value, name) {
|
|
2326
|
-
if (typeof value !== "number") {
|
|
2327
|
-
throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
__name(validateNumber, "validateNumber");
|
|
2331
|
-
function boundsError(value, length, type) {
|
|
2332
|
-
if (Math.floor(value) !== value) {
|
|
2333
|
-
validateNumber(value, type);
|
|
2334
|
-
throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
|
|
2335
|
-
}
|
|
2336
|
-
if (length < 0) {
|
|
2337
|
-
throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
|
|
2338
|
-
}
|
|
2339
|
-
throw new errors.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
|
|
2340
|
-
}
|
|
2341
|
-
__name(boundsError, "boundsError");
|
|
2342
|
-
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
|
|
2343
|
-
function base64clean(str) {
|
|
2344
|
-
str = str.split("=")[0];
|
|
2345
|
-
str = str.trim().replace(INVALID_BASE64_RE, "");
|
|
2346
|
-
if (str.length < 2) return "";
|
|
2347
|
-
while (str.length % 4 !== 0) {
|
|
2348
|
-
str = str + "=";
|
|
2349
|
-
}
|
|
2350
|
-
return str;
|
|
2351
|
-
}
|
|
2352
|
-
__name(base64clean, "base64clean");
|
|
2353
|
-
function utf8ToBytes(string, units) {
|
|
2354
|
-
units = units || Infinity;
|
|
2355
|
-
let codePoint;
|
|
2356
|
-
const length = string.length;
|
|
2357
|
-
let leadSurrogate = null;
|
|
2358
|
-
const bytes = [];
|
|
2359
|
-
for (let i = 0; i < length; ++i) {
|
|
2360
|
-
codePoint = string.charCodeAt(i);
|
|
2361
|
-
if (codePoint > 55295 && codePoint < 57344) {
|
|
2362
|
-
if (!leadSurrogate) {
|
|
2363
|
-
if (codePoint > 56319) {
|
|
2364
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2365
|
-
continue;
|
|
2366
|
-
} else if (i + 1 === length) {
|
|
2367
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2368
|
-
continue;
|
|
2369
|
-
}
|
|
2370
|
-
leadSurrogate = codePoint;
|
|
2371
|
-
continue;
|
|
2372
|
-
}
|
|
2373
|
-
if (codePoint < 56320) {
|
|
2374
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2375
|
-
leadSurrogate = codePoint;
|
|
2376
|
-
continue;
|
|
2377
|
-
}
|
|
2378
|
-
codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
|
|
2379
|
-
} else if (leadSurrogate) {
|
|
2380
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2381
|
-
}
|
|
2382
|
-
leadSurrogate = null;
|
|
2383
|
-
if (codePoint < 128) {
|
|
2384
|
-
if ((units -= 1) < 0) break;
|
|
2385
|
-
bytes.push(codePoint);
|
|
2386
|
-
} else if (codePoint < 2048) {
|
|
2387
|
-
if ((units -= 2) < 0) break;
|
|
2388
|
-
bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
|
|
2389
|
-
} else if (codePoint < 65536) {
|
|
2390
|
-
if ((units -= 3) < 0) break;
|
|
2391
|
-
bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
|
|
2392
|
-
} else if (codePoint < 1114112) {
|
|
2393
|
-
if ((units -= 4) < 0) break;
|
|
2394
|
-
bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
|
|
2395
|
-
} else {
|
|
2396
|
-
throw new Error("Invalid code point");
|
|
2397
|
-
}
|
|
721
|
+
}
|
|
722
|
+
return object;
|
|
723
|
+
}
|
|
724
|
+
function createDefu(merger) {
|
|
725
|
+
return (...arguments_) => (
|
|
726
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
727
|
+
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
var defu, defuFn, defuArrayFn;
|
|
731
|
+
var init_defu = __esm({
|
|
732
|
+
"../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs"() {
|
|
733
|
+
"use strict";
|
|
734
|
+
init_esm_shims();
|
|
735
|
+
__name(isPlainObject, "isPlainObject");
|
|
736
|
+
__name(_defu, "_defu");
|
|
737
|
+
__name(createDefu, "createDefu");
|
|
738
|
+
defu = createDefu();
|
|
739
|
+
defuFn = createDefu((object, key, currentValue) => {
|
|
740
|
+
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
741
|
+
object[key] = currentValue(object[key]);
|
|
742
|
+
return true;
|
|
2398
743
|
}
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
for (let i = 0; i < str.length; ++i) {
|
|
2405
|
-
byteArray.push(str.charCodeAt(i) & 255);
|
|
2406
|
-
}
|
|
2407
|
-
return byteArray;
|
|
2408
|
-
}
|
|
2409
|
-
__name(asciiToBytes, "asciiToBytes");
|
|
2410
|
-
function utf16leToBytes(str, units) {
|
|
2411
|
-
let c, hi, lo;
|
|
2412
|
-
const byteArray = [];
|
|
2413
|
-
for (let i = 0; i < str.length; ++i) {
|
|
2414
|
-
if ((units -= 2) < 0) break;
|
|
2415
|
-
c = str.charCodeAt(i);
|
|
2416
|
-
hi = c >> 8;
|
|
2417
|
-
lo = c % 256;
|
|
2418
|
-
byteArray.push(lo);
|
|
2419
|
-
byteArray.push(hi);
|
|
2420
|
-
}
|
|
2421
|
-
return byteArray;
|
|
2422
|
-
}
|
|
2423
|
-
__name(utf16leToBytes, "utf16leToBytes");
|
|
2424
|
-
function base64ToBytes(str) {
|
|
2425
|
-
return base64.toByteArray(base64clean(str));
|
|
2426
|
-
}
|
|
2427
|
-
__name(base64ToBytes, "base64ToBytes");
|
|
2428
|
-
function blitBuffer(src, dst, offset, length) {
|
|
2429
|
-
let i;
|
|
2430
|
-
for (i = 0; i < length; ++i) {
|
|
2431
|
-
if (i + offset >= dst.length || i >= src.length) break;
|
|
2432
|
-
dst[i + offset] = src[i];
|
|
2433
|
-
}
|
|
2434
|
-
return i;
|
|
2435
|
-
}
|
|
2436
|
-
__name(blitBuffer, "blitBuffer");
|
|
2437
|
-
function isInstance(obj, type) {
|
|
2438
|
-
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
2439
|
-
}
|
|
2440
|
-
__name(isInstance, "isInstance");
|
|
2441
|
-
function numberIsNaN(obj) {
|
|
2442
|
-
return obj !== obj;
|
|
2443
|
-
}
|
|
2444
|
-
__name(numberIsNaN, "numberIsNaN");
|
|
2445
|
-
var hexSliceLookupTable = function() {
|
|
2446
|
-
const alphabet = "0123456789abcdef";
|
|
2447
|
-
const table = new Array(256);
|
|
2448
|
-
for (let i = 0; i < 16; ++i) {
|
|
2449
|
-
const i16 = i * 16;
|
|
2450
|
-
for (let j = 0; j < 16; ++j) {
|
|
2451
|
-
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
2452
|
-
}
|
|
744
|
+
});
|
|
745
|
+
defuArrayFn = createDefu((object, key, currentValue) => {
|
|
746
|
+
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
747
|
+
object[key] = currentValue(object[key]);
|
|
748
|
+
return true;
|
|
2453
749
|
}
|
|
2454
|
-
|
|
2455
|
-
}();
|
|
2456
|
-
function defineBigIntMethod(fn) {
|
|
2457
|
-
return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
|
|
2458
|
-
}
|
|
2459
|
-
__name(defineBigIntMethod, "defineBigIntMethod");
|
|
2460
|
-
function BufferBigIntNotDefined() {
|
|
2461
|
-
throw new Error("BigInt not supported");
|
|
2462
|
-
}
|
|
2463
|
-
__name(BufferBigIntNotDefined, "BufferBigIntNotDefined");
|
|
750
|
+
});
|
|
2464
751
|
}
|
|
2465
752
|
});
|
|
2466
753
|
|
|
@@ -2685,13 +972,13 @@ var util;
|
|
|
2685
972
|
});
|
|
2686
973
|
};
|
|
2687
974
|
util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
|
|
2688
|
-
const
|
|
975
|
+
const keys2 = [];
|
|
2689
976
|
for (const key in object) {
|
|
2690
977
|
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
2691
|
-
|
|
978
|
+
keys2.push(key);
|
|
2692
979
|
}
|
|
2693
980
|
}
|
|
2694
|
-
return
|
|
981
|
+
return keys2;
|
|
2695
982
|
};
|
|
2696
983
|
util2.find = (arr, checker) => {
|
|
2697
984
|
for (const item of arr) {
|
|
@@ -3083,9 +1370,9 @@ var ParseStatus = class _ParseStatus {
|
|
|
3083
1370
|
}
|
|
3084
1371
|
return { status: status.value, value: arrayValue };
|
|
3085
1372
|
}
|
|
3086
|
-
static async mergeObjectAsync(status,
|
|
1373
|
+
static async mergeObjectAsync(status, pairs2) {
|
|
3087
1374
|
const syncPairs = [];
|
|
3088
|
-
for (const pair of
|
|
1375
|
+
for (const pair of pairs2) {
|
|
3089
1376
|
const key = await pair.key;
|
|
3090
1377
|
const value = await pair.value;
|
|
3091
1378
|
syncPairs.push({
|
|
@@ -3095,9 +1382,9 @@ var ParseStatus = class _ParseStatus {
|
|
|
3095
1382
|
}
|
|
3096
1383
|
return _ParseStatus.mergeObjectSync(status, syncPairs);
|
|
3097
1384
|
}
|
|
3098
|
-
static mergeObjectSync(status,
|
|
1385
|
+
static mergeObjectSync(status, pairs2) {
|
|
3099
1386
|
const finalObject = {};
|
|
3100
|
-
for (const pair of
|
|
1387
|
+
for (const pair of pairs2) {
|
|
3101
1388
|
const { key, value } = pair;
|
|
3102
1389
|
if (key.status === "aborted")
|
|
3103
1390
|
return INVALID;
|
|
@@ -4985,8 +3272,8 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
4985
3272
|
if (this._cached !== null)
|
|
4986
3273
|
return this._cached;
|
|
4987
3274
|
const shape = this._def.shape();
|
|
4988
|
-
const
|
|
4989
|
-
return this._cached = { shape, keys };
|
|
3275
|
+
const keys2 = util.objectKeys(shape);
|
|
3276
|
+
return this._cached = { shape, keys: keys2 };
|
|
4990
3277
|
}
|
|
4991
3278
|
_parse(input) {
|
|
4992
3279
|
const parsedType = this._getType(input);
|
|
@@ -5009,11 +3296,11 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5009
3296
|
}
|
|
5010
3297
|
}
|
|
5011
3298
|
}
|
|
5012
|
-
const
|
|
3299
|
+
const pairs2 = [];
|
|
5013
3300
|
for (const key of shapeKeys) {
|
|
5014
3301
|
const keyValidator = shape[key];
|
|
5015
3302
|
const value = ctx.data[key];
|
|
5016
|
-
|
|
3303
|
+
pairs2.push({
|
|
5017
3304
|
key: { status: "valid", value: key },
|
|
5018
3305
|
value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
|
|
5019
3306
|
alwaysSet: key in ctx.data
|
|
@@ -5023,7 +3310,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5023
3310
|
const unknownKeys = this._def.unknownKeys;
|
|
5024
3311
|
if (unknownKeys === "passthrough") {
|
|
5025
3312
|
for (const key of extraKeys) {
|
|
5026
|
-
|
|
3313
|
+
pairs2.push({
|
|
5027
3314
|
key: { status: "valid", value: key },
|
|
5028
3315
|
value: { status: "valid", value: ctx.data[key] }
|
|
5029
3316
|
});
|
|
@@ -5044,7 +3331,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5044
3331
|
const catchall = this._def.catchall;
|
|
5045
3332
|
for (const key of extraKeys) {
|
|
5046
3333
|
const value = ctx.data[key];
|
|
5047
|
-
|
|
3334
|
+
pairs2.push({
|
|
5048
3335
|
key: { status: "valid", value: key },
|
|
5049
3336
|
value: catchall._parse(
|
|
5050
3337
|
new ParseInputLazyPath(ctx, value, ctx.path, key)
|
|
@@ -5057,7 +3344,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5057
3344
|
if (ctx.common.async) {
|
|
5058
3345
|
return Promise.resolve().then(async () => {
|
|
5059
3346
|
const syncPairs = [];
|
|
5060
|
-
for (const pair of
|
|
3347
|
+
for (const pair of pairs2) {
|
|
5061
3348
|
const key = await pair.key;
|
|
5062
3349
|
const value = await pair.value;
|
|
5063
3350
|
syncPairs.push({
|
|
@@ -5071,7 +3358,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5071
3358
|
return ParseStatus.mergeObjectSync(status, syncPairs);
|
|
5072
3359
|
});
|
|
5073
3360
|
} else {
|
|
5074
|
-
return ParseStatus.mergeObjectSync(status,
|
|
3361
|
+
return ParseStatus.mergeObjectSync(status, pairs2);
|
|
5075
3362
|
}
|
|
5076
3363
|
}
|
|
5077
3364
|
get shape() {
|
|
@@ -5702,20 +3989,20 @@ var ZodRecord = class _ZodRecord extends ZodType {
|
|
|
5702
3989
|
});
|
|
5703
3990
|
return INVALID;
|
|
5704
3991
|
}
|
|
5705
|
-
const
|
|
3992
|
+
const pairs2 = [];
|
|
5706
3993
|
const keyType = this._def.keyType;
|
|
5707
3994
|
const valueType = this._def.valueType;
|
|
5708
3995
|
for (const key in ctx.data) {
|
|
5709
|
-
|
|
3996
|
+
pairs2.push({
|
|
5710
3997
|
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
|
|
5711
3998
|
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
|
|
5712
3999
|
alwaysSet: key in ctx.data
|
|
5713
4000
|
});
|
|
5714
4001
|
}
|
|
5715
4002
|
if (ctx.common.async) {
|
|
5716
|
-
return ParseStatus.mergeObjectAsync(status,
|
|
4003
|
+
return ParseStatus.mergeObjectAsync(status, pairs2);
|
|
5717
4004
|
} else {
|
|
5718
|
-
return ParseStatus.mergeObjectSync(status,
|
|
4005
|
+
return ParseStatus.mergeObjectSync(status, pairs2);
|
|
5719
4006
|
}
|
|
5720
4007
|
}
|
|
5721
4008
|
get element() {
|
|
@@ -5760,7 +4047,7 @@ var ZodMap = class extends ZodType {
|
|
|
5760
4047
|
}
|
|
5761
4048
|
const keyType = this._def.keyType;
|
|
5762
4049
|
const valueType = this._def.valueType;
|
|
5763
|
-
const
|
|
4050
|
+
const pairs2 = [...ctx.data.entries()].map(([key, value], index) => {
|
|
5764
4051
|
return {
|
|
5765
4052
|
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])),
|
|
5766
4053
|
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"]))
|
|
@@ -5769,7 +4056,7 @@ var ZodMap = class extends ZodType {
|
|
|
5769
4056
|
if (ctx.common.async) {
|
|
5770
4057
|
const finalMap = /* @__PURE__ */ new Map();
|
|
5771
4058
|
return Promise.resolve().then(async () => {
|
|
5772
|
-
for (const pair of
|
|
4059
|
+
for (const pair of pairs2) {
|
|
5773
4060
|
const key = await pair.key;
|
|
5774
4061
|
const value = await pair.value;
|
|
5775
4062
|
if (key.status === "aborted" || value.status === "aborted") {
|
|
@@ -5784,7 +4071,7 @@ var ZodMap = class extends ZodType {
|
|
|
5784
4071
|
});
|
|
5785
4072
|
} else {
|
|
5786
4073
|
const finalMap = /* @__PURE__ */ new Map();
|
|
5787
|
-
for (const pair of
|
|
4074
|
+
for (const pair of pairs2) {
|
|
5788
4075
|
const key = pair.key;
|
|
5789
4076
|
const value = pair.value;
|
|
5790
4077
|
if (key.status === "aborted" || value.status === "aborted") {
|
|
@@ -6596,13 +4883,13 @@ var ZodReadonly = class extends ZodType {
|
|
|
6596
4883
|
}
|
|
6597
4884
|
_parse(input) {
|
|
6598
4885
|
const result = this._def.innerType._parse(input);
|
|
6599
|
-
const
|
|
4886
|
+
const freeze2 = /* @__PURE__ */ __name((data) => {
|
|
6600
4887
|
if (isValid(data)) {
|
|
6601
4888
|
data.value = Object.freeze(data.value);
|
|
6602
4889
|
}
|
|
6603
4890
|
return data;
|
|
6604
4891
|
}, "freeze");
|
|
6605
|
-
return isAsync(result) ? result.then((data) =>
|
|
4892
|
+
return isAsync(result) ? result.then((data) => freeze2(data)) : freeze2(result);
|
|
6606
4893
|
}
|
|
6607
4894
|
unwrap() {
|
|
6608
4895
|
return this._def.innerType;
|
|
@@ -6916,12 +5203,34 @@ init_esm_shims();
|
|
|
6916
5203
|
var EMPTY_STRING = "";
|
|
6917
5204
|
var $NestedValue = Symbol("NestedValue");
|
|
6918
5205
|
|
|
5206
|
+
// ../path/src/file-path-fns.ts
|
|
5207
|
+
import { relative } from "node:path";
|
|
5208
|
+
|
|
6919
5209
|
// ../path/src/correct-path.ts
|
|
6920
5210
|
init_esm_shims();
|
|
6921
5211
|
|
|
6922
5212
|
// ../path/src/is-file.ts
|
|
6923
5213
|
init_esm_shims();
|
|
6924
5214
|
import { lstatSync, statSync } from "node:fs";
|
|
5215
|
+
|
|
5216
|
+
// ../path/src/regex.ts
|
|
5217
|
+
init_esm_shims();
|
|
5218
|
+
var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
5219
|
+
var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
5220
|
+
var UNC_REGEX = /^[/\\]{2}/;
|
|
5221
|
+
var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
5222
|
+
|
|
5223
|
+
// ../path/src/slash.ts
|
|
5224
|
+
init_esm_shims();
|
|
5225
|
+
function slash(path6) {
|
|
5226
|
+
if (path6.startsWith("\\\\?\\")) {
|
|
5227
|
+
return path6;
|
|
5228
|
+
}
|
|
5229
|
+
return path6.replace(/\\/g, "/");
|
|
5230
|
+
}
|
|
5231
|
+
__name(slash, "slash");
|
|
5232
|
+
|
|
5233
|
+
// ../path/src/is-file.ts
|
|
6925
5234
|
function isFile(path6, additionalPath) {
|
|
6926
5235
|
return Boolean(statSync(additionalPath ? joinPaths(additionalPath, path6) : path6, {
|
|
6927
5236
|
throwIfNoEntry: false
|
|
@@ -6935,29 +5244,26 @@ function isDirectory(path6, additionalPath) {
|
|
|
6935
5244
|
}
|
|
6936
5245
|
__name(isDirectory, "isDirectory");
|
|
6937
5246
|
function isAbsolutePath(path6) {
|
|
6938
|
-
return
|
|
5247
|
+
return ABSOLUTE_PATH_REGEX.test(slash(path6));
|
|
6939
5248
|
}
|
|
6940
5249
|
__name(isAbsolutePath, "isAbsolutePath");
|
|
6941
5250
|
|
|
6942
5251
|
// ../path/src/correct-path.ts
|
|
6943
|
-
var _DRIVE_LETTER_START_RE2 = /^[A-Z]:\//i;
|
|
6944
5252
|
function normalizeWindowsPath2(input = "") {
|
|
6945
5253
|
if (!input) {
|
|
6946
5254
|
return input;
|
|
6947
5255
|
}
|
|
6948
|
-
return input
|
|
5256
|
+
return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
6949
5257
|
}
|
|
6950
5258
|
__name(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
6951
|
-
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
6952
|
-
var _DRIVE_LETTER_RE2 = /^[A-Z]:$/i;
|
|
6953
5259
|
function correctPath(path6) {
|
|
6954
5260
|
if (!path6 || path6.length === 0) {
|
|
6955
5261
|
return ".";
|
|
6956
5262
|
}
|
|
6957
5263
|
path6 = normalizeWindowsPath2(path6);
|
|
6958
|
-
const isUNCPath = path6.match(
|
|
5264
|
+
const isUNCPath = path6.match(UNC_REGEX);
|
|
6959
5265
|
const isPathAbsolute = isAbsolutePath(path6);
|
|
6960
|
-
const trailingSeparator = path6
|
|
5266
|
+
const trailingSeparator = path6.endsWith("/");
|
|
6961
5267
|
path6 = normalizeString2(path6, !isPathAbsolute);
|
|
6962
5268
|
if (path6.length === 0) {
|
|
6963
5269
|
if (isPathAbsolute) {
|
|
@@ -6968,7 +5274,7 @@ function correctPath(path6) {
|
|
|
6968
5274
|
if (trailingSeparator) {
|
|
6969
5275
|
path6 += "/";
|
|
6970
5276
|
}
|
|
6971
|
-
if (
|
|
5277
|
+
if (DRIVE_LETTER_REGEX.test(path6)) {
|
|
6972
5278
|
path6 += "/";
|
|
6973
5279
|
}
|
|
6974
5280
|
if (isUNCPath) {
|
|
@@ -6977,7 +5283,7 @@ function correctPath(path6) {
|
|
|
6977
5283
|
}
|
|
6978
5284
|
return `//${path6}`;
|
|
6979
5285
|
}
|
|
6980
|
-
return isPathAbsolute && !
|
|
5286
|
+
return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
|
|
6981
5287
|
}
|
|
6982
5288
|
__name(correctPath, "correctPath");
|
|
6983
5289
|
function normalizeString2(path6, allowAboveRoot) {
|
|
@@ -7045,24 +5351,14 @@ __name(normalizeString2, "normalizeString");
|
|
|
7045
5351
|
// ../path/src/get-workspace-root.ts
|
|
7046
5352
|
init_esm_shims();
|
|
7047
5353
|
|
|
7048
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7049
|
-
init_esm_shims();
|
|
7050
|
-
|
|
7051
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-K6PUXRK3.js
|
|
5354
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/index.js
|
|
7052
5355
|
init_esm_shims();
|
|
7053
5356
|
|
|
7054
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5357
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
|
|
7055
5358
|
init_esm_shims();
|
|
7056
5359
|
|
|
7057
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5360
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
|
|
7058
5361
|
init_esm_shims();
|
|
7059
|
-
var __defProp2 = Object.defineProperty;
|
|
7060
|
-
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
|
|
7061
|
-
value,
|
|
7062
|
-
configurable: true
|
|
7063
|
-
}), "__name");
|
|
7064
|
-
|
|
7065
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
|
|
7066
5362
|
import { existsSync as existsSync2 } from "node:fs";
|
|
7067
5363
|
import { join } from "node:path";
|
|
7068
5364
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -7082,28 +5378,26 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
7082
5378
|
return void 0;
|
|
7083
5379
|
}
|
|
7084
5380
|
__name(findFolderUp, "findFolderUp");
|
|
7085
|
-
__name2(findFolderUp, "findFolderUp");
|
|
7086
5381
|
|
|
7087
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5382
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
|
|
7088
5383
|
init_esm_shims();
|
|
7089
|
-
var
|
|
5384
|
+
var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
|
|
7090
5385
|
function normalizeWindowsPath3(input = "") {
|
|
7091
5386
|
if (!input) {
|
|
7092
5387
|
return input;
|
|
7093
5388
|
}
|
|
7094
|
-
return input.replace(/\\/g, "/").replace(
|
|
5389
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
|
|
7095
5390
|
}
|
|
7096
5391
|
__name(normalizeWindowsPath3, "normalizeWindowsPath");
|
|
7097
|
-
|
|
7098
|
-
var _UNC_REGEX3 = /^[/\\]{2}/;
|
|
5392
|
+
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
7099
5393
|
var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
7100
|
-
var
|
|
7101
|
-
var correctPaths2 = /* @__PURE__ */
|
|
5394
|
+
var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
|
|
5395
|
+
var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
|
|
7102
5396
|
if (!path6 || path6.length === 0) {
|
|
7103
5397
|
return ".";
|
|
7104
5398
|
}
|
|
7105
5399
|
path6 = normalizeWindowsPath3(path6);
|
|
7106
|
-
const isUNCPath = path6.match(
|
|
5400
|
+
const isUNCPath = path6.match(_UNC_REGEX2);
|
|
7107
5401
|
const isPathAbsolute = isAbsolute2(path6);
|
|
7108
5402
|
const trailingSeparator = path6[path6.length - 1] === "/";
|
|
7109
5403
|
path6 = normalizeString3(path6, !isPathAbsolute);
|
|
@@ -7116,7 +5410,7 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7116
5410
|
if (trailingSeparator) {
|
|
7117
5411
|
path6 += "/";
|
|
7118
5412
|
}
|
|
7119
|
-
if (
|
|
5413
|
+
if (_DRIVE_LETTER_RE2.test(path6)) {
|
|
7120
5414
|
path6 += "/";
|
|
7121
5415
|
}
|
|
7122
5416
|
if (isUNCPath) {
|
|
@@ -7127,14 +5421,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7127
5421
|
}
|
|
7128
5422
|
return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
|
|
7129
5423
|
}, "correctPaths");
|
|
7130
|
-
function cwd() {
|
|
7131
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
7132
|
-
return process.cwd().replace(/\\/g, "/");
|
|
7133
|
-
}
|
|
7134
|
-
return "/";
|
|
7135
|
-
}
|
|
7136
|
-
__name(cwd, "cwd");
|
|
7137
|
-
__name2(cwd, "cwd");
|
|
7138
5424
|
function normalizeString3(path6, allowAboveRoot) {
|
|
7139
5425
|
let res = "";
|
|
7140
5426
|
let lastSegmentLength = 0;
|
|
@@ -7196,12 +5482,11 @@ function normalizeString3(path6, allowAboveRoot) {
|
|
|
7196
5482
|
return res;
|
|
7197
5483
|
}
|
|
7198
5484
|
__name(normalizeString3, "normalizeString");
|
|
7199
|
-
|
|
7200
|
-
var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
|
|
5485
|
+
var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
|
|
7201
5486
|
return _IS_ABSOLUTE_RE2.test(p);
|
|
7202
5487
|
}, "isAbsolute");
|
|
7203
5488
|
|
|
7204
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5489
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
|
|
7205
5490
|
var rootFiles = [
|
|
7206
5491
|
"storm-workspace.json",
|
|
7207
5492
|
"storm-workspace.json",
|
|
@@ -7251,70 +5536,1470 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
|
7251
5536
|
return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
7252
5537
|
}
|
|
7253
5538
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7254
|
-
__name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7255
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
7256
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
7257
|
-
if (!result) {
|
|
7258
|
-
throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
7259
|
-
${rootFiles.join("\n")}
|
|
7260
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
7261
|
-
}
|
|
7262
|
-
return result;
|
|
7263
|
-
}
|
|
7264
|
-
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7265
|
-
__name2(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7266
5539
|
|
|
7267
|
-
//
|
|
5540
|
+
// ../../node_modules/.pnpm/@ltd+j-toml@1.38.0/node_modules/@ltd/j-toml/index.mjs
|
|
7268
5541
|
init_esm_shims();
|
|
7269
|
-
var
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
var
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
5542
|
+
var SyntaxError$1 = SyntaxError;
|
|
5543
|
+
var RangeError$1 = RangeError;
|
|
5544
|
+
var TypeError$1 = TypeError;
|
|
5545
|
+
var Error$1 = { if: Error }.if;
|
|
5546
|
+
var undefined$1 = void 0;
|
|
5547
|
+
var BigInt$1 = typeof BigInt === "undefined" ? undefined$1 : BigInt;
|
|
5548
|
+
var RegExp$1 = RegExp;
|
|
5549
|
+
var WeakMap$1 = WeakMap;
|
|
5550
|
+
var get = WeakMap.prototype.get;
|
|
5551
|
+
var set = WeakMap.prototype.set;
|
|
5552
|
+
var create$1 = Object.create;
|
|
5553
|
+
var isSafeInteger = Number.isSafeInteger;
|
|
5554
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
5555
|
+
var freeze = Object.freeze;
|
|
5556
|
+
var isPrototypeOf = Object.prototype.isPrototypeOf;
|
|
5557
|
+
var NULL = (
|
|
5558
|
+
/* j-globals: null.prototype (internal) */
|
|
5559
|
+
Object.seal ? /* @__PURE__ */ Object.preventExtensions(/* @__PURE__ */ Object.create(null)) : null
|
|
5560
|
+
);
|
|
5561
|
+
var bind = Function.prototype.bind;
|
|
5562
|
+
var test = RegExp.prototype.test;
|
|
5563
|
+
var exec = RegExp.prototype.exec;
|
|
5564
|
+
var apply$1 = Reflect.apply;
|
|
5565
|
+
var Proxy$1 = Proxy;
|
|
5566
|
+
var assign$1 = Object.assign;
|
|
5567
|
+
var Object$1 = Object;
|
|
5568
|
+
var floor = Math.floor;
|
|
5569
|
+
var isArray$1 = Array.isArray;
|
|
5570
|
+
var Infinity2 = 1 / 0;
|
|
5571
|
+
var fromCharCode = String.fromCharCode;
|
|
5572
|
+
var Array$1 = Array;
|
|
5573
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5574
|
+
var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
5575
|
+
var apply = Function.prototype.apply;
|
|
5576
|
+
var isEnum = /* @__PURE__ */ propertyIsEnumerable.call.bind(propertyIsEnumerable);
|
|
5577
|
+
var hasOwn = (
|
|
5578
|
+
/* j-globals: Object.hasOwn (polyfill) */
|
|
5579
|
+
Object$1.hasOwn || /* @__PURE__ */ function() {
|
|
5580
|
+
return hasOwnProperty.bind ? hasOwnProperty.call.bind(hasOwnProperty) : /* @__PURE__ */ __name(function hasOwn2(object, key) {
|
|
5581
|
+
return hasOwnProperty.call(object, key);
|
|
5582
|
+
}, "hasOwn");
|
|
5583
|
+
}()
|
|
5584
|
+
);
|
|
5585
|
+
var create = Object$1.create;
|
|
5586
|
+
function Descriptor(source) {
|
|
5587
|
+
var target = create(NULL);
|
|
5588
|
+
if (hasOwn(source, "value")) {
|
|
5589
|
+
target.value = source.value;
|
|
7279
5590
|
}
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
];
|
|
7283
|
-
if (ignoreCase) {
|
|
7284
|
-
names = names.map((name2) => name2.toLowerCase());
|
|
5591
|
+
if (hasOwn(source, "writable")) {
|
|
5592
|
+
target.writable = source.writable;
|
|
7285
5593
|
}
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
if (target) {
|
|
7289
|
-
return joinPaths(dir, target);
|
|
7290
|
-
}
|
|
7291
|
-
const parentDir = resolveParentPath(dir);
|
|
7292
|
-
if (parentDir === dir) {
|
|
7293
|
-
return void 0;
|
|
7294
|
-
}
|
|
7295
|
-
dir = parentDir;
|
|
5594
|
+
if (hasOwn(source, "get")) {
|
|
5595
|
+
target.get = source.get;
|
|
7296
5596
|
}
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
// ../path/src/is-root-dir.ts
|
|
7300
|
-
init_esm_shims();
|
|
7301
|
-
var isSystemRoot = /* @__PURE__ */ __name((dir) => {
|
|
7302
|
-
return Boolean(dir === "/" || dir === "c:\\" || dir === "C:\\");
|
|
7303
|
-
}, "isSystemRoot");
|
|
7304
|
-
|
|
7305
|
-
// ../path/src/get-workspace-root.ts
|
|
7306
|
-
var getWorkspaceRoot = /* @__PURE__ */ __name((dir = process.cwd()) => {
|
|
7307
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
7308
|
-
return process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
5597
|
+
if (hasOwn(source, "set")) {
|
|
5598
|
+
target.set = source.set;
|
|
7309
5599
|
}
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
return root;
|
|
5600
|
+
if (hasOwn(source, "enumerable")) {
|
|
5601
|
+
target.enumerable = source.enumerable;
|
|
7313
5602
|
}
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
5603
|
+
if (hasOwn(source, "configurable")) {
|
|
5604
|
+
target.configurable = source.configurable;
|
|
5605
|
+
}
|
|
5606
|
+
return target;
|
|
5607
|
+
}
|
|
5608
|
+
__name(Descriptor, "Descriptor");
|
|
5609
|
+
var Test = bind ? /* @__PURE__ */ bind.bind(test) : function(re) {
|
|
5610
|
+
return function(string) {
|
|
5611
|
+
return test.call(re, string);
|
|
5612
|
+
};
|
|
5613
|
+
};
|
|
5614
|
+
var Exec = bind ? /* @__PURE__ */ bind.bind(exec) : function(re) {
|
|
5615
|
+
return function(string) {
|
|
5616
|
+
return exec.call(re, string);
|
|
5617
|
+
};
|
|
5618
|
+
};
|
|
5619
|
+
function __PURE__(re) {
|
|
5620
|
+
var test2 = re.test = Test(re);
|
|
5621
|
+
var exec2 = re.exec = Exec(re);
|
|
5622
|
+
var source = test2.source = exec2.source = re.source;
|
|
5623
|
+
test2.unicode = exec2.unicode = re.unicode;
|
|
5624
|
+
test2.ignoreCase = exec2.ignoreCase = re.ignoreCase;
|
|
5625
|
+
test2.multiline = exec2.multiline = source.indexOf("^") < 0 && source.indexOf("$") < 0 ? null : re.multiline;
|
|
5626
|
+
test2.dotAll = exec2.dotAll = source.indexOf(".") < 0 ? null : re.dotAll;
|
|
5627
|
+
return re;
|
|
5628
|
+
}
|
|
5629
|
+
__name(__PURE__, "__PURE__");
|
|
5630
|
+
function theRegExp(re) {
|
|
5631
|
+
return /* @__PURE__ */ __PURE__(re);
|
|
5632
|
+
}
|
|
5633
|
+
__name(theRegExp, "theRegExp");
|
|
5634
|
+
var NT = /[\n\t]+/g;
|
|
5635
|
+
var ESCAPE = /\\./g;
|
|
5636
|
+
function graveAccentReplacer($$) {
|
|
5637
|
+
return $$ === "\\`" ? "`" : $$;
|
|
5638
|
+
}
|
|
5639
|
+
__name(graveAccentReplacer, "graveAccentReplacer");
|
|
5640
|
+
var includes = "".includes ? function(that, searchString) {
|
|
5641
|
+
return that.includes(searchString);
|
|
5642
|
+
} : function(that, searchString) {
|
|
5643
|
+
return that.indexOf(searchString) > -1;
|
|
5644
|
+
};
|
|
5645
|
+
function RE(template) {
|
|
5646
|
+
var U = this.U;
|
|
5647
|
+
var I = this.I;
|
|
5648
|
+
var M = this.M;
|
|
5649
|
+
var S = this.S;
|
|
5650
|
+
var raw = template.raw;
|
|
5651
|
+
var source = raw[0].replace(NT, "");
|
|
5652
|
+
var index = 1;
|
|
5653
|
+
var length = arguments.length;
|
|
5654
|
+
while (index !== length) {
|
|
5655
|
+
var value = arguments[index];
|
|
5656
|
+
if (typeof value === "string") {
|
|
5657
|
+
source += value;
|
|
5658
|
+
} else {
|
|
5659
|
+
var value_source = value.source;
|
|
5660
|
+
if (typeof value_source !== "string") {
|
|
5661
|
+
throw TypeError$1("source");
|
|
5662
|
+
}
|
|
5663
|
+
if (value.unicode === U) {
|
|
5664
|
+
throw SyntaxError$1("unicode");
|
|
5665
|
+
}
|
|
5666
|
+
if (value.ignoreCase === I) {
|
|
5667
|
+
throw SyntaxError$1("ignoreCase");
|
|
5668
|
+
}
|
|
5669
|
+
if (value.multiline === M && (includes(value_source, "^") || includes(value_source, "$"))) {
|
|
5670
|
+
throw SyntaxError$1("multiline");
|
|
5671
|
+
}
|
|
5672
|
+
if (value.dotAll === S && includes(value_source, ".")) {
|
|
5673
|
+
throw SyntaxError$1("dotAll");
|
|
5674
|
+
}
|
|
5675
|
+
source += value_source;
|
|
5676
|
+
}
|
|
5677
|
+
source += raw[index++].replace(NT, "");
|
|
5678
|
+
}
|
|
5679
|
+
var re = RegExp$1(U ? source = source.replace(ESCAPE, graveAccentReplacer) : source, this.flags);
|
|
5680
|
+
var test2 = re.test = Test(re);
|
|
5681
|
+
var exec2 = re.exec = Exec(re);
|
|
5682
|
+
test2.source = exec2.source = source;
|
|
5683
|
+
test2.unicode = exec2.unicode = !U;
|
|
5684
|
+
test2.ignoreCase = exec2.ignoreCase = !I;
|
|
5685
|
+
test2.multiline = exec2.multiline = includes(source, "^") || includes(source, "$") ? !M : null;
|
|
5686
|
+
test2.dotAll = exec2.dotAll = includes(source, ".") ? !S : null;
|
|
5687
|
+
return re;
|
|
5688
|
+
}
|
|
5689
|
+
__name(RE, "RE");
|
|
5690
|
+
var RE_bind = bind && /* @__PURE__ */ bind.bind(RE);
|
|
5691
|
+
function Context(flags) {
|
|
5692
|
+
return {
|
|
5693
|
+
U: !includes(flags, "u"),
|
|
5694
|
+
I: !includes(flags, "i"),
|
|
5695
|
+
M: !includes(flags, "m"),
|
|
5696
|
+
S: !includes(flags, "s"),
|
|
5697
|
+
flags
|
|
5698
|
+
};
|
|
5699
|
+
}
|
|
5700
|
+
__name(Context, "Context");
|
|
5701
|
+
var CONTEXT = /* @__PURE__ */ Context("");
|
|
5702
|
+
var newRegExp = Proxy$1 ? /* @__PURE__ */ new Proxy$1(RE, {
|
|
5703
|
+
apply: /* @__PURE__ */ __name(function(RE2, thisArg, args) {
|
|
5704
|
+
return apply$1(RE2, CONTEXT, args);
|
|
5705
|
+
}, "apply"),
|
|
5706
|
+
get: /* @__PURE__ */ __name(function(RE2, flags) {
|
|
5707
|
+
return RE_bind(Context(flags));
|
|
5708
|
+
}, "get"),
|
|
5709
|
+
defineProperty: /* @__PURE__ */ __name(function() {
|
|
5710
|
+
return false;
|
|
5711
|
+
}, "defineProperty"),
|
|
5712
|
+
preventExtensions: /* @__PURE__ */ __name(function() {
|
|
5713
|
+
return false;
|
|
5714
|
+
}, "preventExtensions")
|
|
5715
|
+
}) : /* @__PURE__ */ function() {
|
|
5716
|
+
RE.apply = RE.apply;
|
|
5717
|
+
var newRegExp2 = /* @__PURE__ */ __name(function() {
|
|
5718
|
+
return RE.apply(CONTEXT, arguments);
|
|
5719
|
+
}, "newRegExp");
|
|
5720
|
+
var d2 = 1;
|
|
5721
|
+
var g = d2 * 2;
|
|
5722
|
+
var i = g * 2;
|
|
5723
|
+
var m = i * 2;
|
|
5724
|
+
var s = i * 2;
|
|
5725
|
+
var u = s * 2;
|
|
5726
|
+
var y = u * 2;
|
|
5727
|
+
var flags = y * 2 - 1;
|
|
5728
|
+
while (flags--) {
|
|
5729
|
+
(function(context) {
|
|
5730
|
+
newRegExp2[context.flags] = function() {
|
|
5731
|
+
return RE.apply(context, arguments);
|
|
5732
|
+
};
|
|
5733
|
+
})(Context(
|
|
5734
|
+
(flags & d2 ? "" : "d") + (flags & g ? "" : "g") + (flags & i ? "" : "i") + (flags & m ? "" : "m") + (flags & s ? "" : "s") + (flags & u ? "" : "u") + (flags & y ? "" : "y")
|
|
5735
|
+
));
|
|
5736
|
+
}
|
|
5737
|
+
return freeze ? freeze(newRegExp2) : newRegExp2;
|
|
5738
|
+
}();
|
|
5739
|
+
var clearRegExp = "$_" in RegExp$1 ? /* @__PURE__ */ function() {
|
|
5740
|
+
var REGEXP = /^/;
|
|
5741
|
+
REGEXP.test = REGEXP.test;
|
|
5742
|
+
return /* @__PURE__ */ __name(function clearRegExp3(value) {
|
|
5743
|
+
REGEXP.test("");
|
|
5744
|
+
return value;
|
|
5745
|
+
}, "clearRegExp");
|
|
5746
|
+
}() : /* @__PURE__ */ __name(function clearRegExp2(value) {
|
|
5747
|
+
return value;
|
|
5748
|
+
}, "clearRegExp");
|
|
5749
|
+
var NEED_TO_ESCAPE_IN_REGEXP = /^[$()*+\-.?[\\\]^{|]/;
|
|
5750
|
+
var SURROGATE_PAIR = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/;
|
|
5751
|
+
var GROUP = /* @__PURE__ */ create$1(NULL);
|
|
5752
|
+
function groupify(branches, uFlag, noEscape) {
|
|
5753
|
+
var group = create$1(NULL);
|
|
5754
|
+
var appendBranch = uFlag ? appendPointBranch : appendCodeBranch;
|
|
5755
|
+
for (var length = branches.length, index = 0; index < length; ++index) {
|
|
5756
|
+
appendBranch(group, branches[index]);
|
|
5757
|
+
}
|
|
5758
|
+
return sourcify(group, !noEscape);
|
|
5759
|
+
}
|
|
5760
|
+
__name(groupify, "groupify");
|
|
5761
|
+
function appendPointBranch(group, branch) {
|
|
5762
|
+
if (branch) {
|
|
5763
|
+
var character = SURROGATE_PAIR.test(branch) ? branch.slice(0, 2) : branch.charAt(0);
|
|
5764
|
+
appendPointBranch(group[character] || (group[character] = create$1(NULL)), branch.slice(character.length));
|
|
5765
|
+
} else {
|
|
5766
|
+
group[""] = GROUP;
|
|
5767
|
+
}
|
|
5768
|
+
}
|
|
5769
|
+
__name(appendPointBranch, "appendPointBranch");
|
|
5770
|
+
function appendCodeBranch(group, branch) {
|
|
5771
|
+
if (branch) {
|
|
5772
|
+
var character = branch.charAt(0);
|
|
5773
|
+
appendCodeBranch(group[character] || (group[character] = create$1(NULL)), branch.slice(1));
|
|
5774
|
+
} else {
|
|
5775
|
+
group[""] = GROUP;
|
|
5776
|
+
}
|
|
5777
|
+
}
|
|
5778
|
+
__name(appendCodeBranch, "appendCodeBranch");
|
|
5779
|
+
function sourcify(group, needEscape) {
|
|
5780
|
+
var branches = [];
|
|
5781
|
+
var singleCharactersBranch = [];
|
|
5782
|
+
var noEmptyBranch = true;
|
|
5783
|
+
for (var character in group) {
|
|
5784
|
+
if (character) {
|
|
5785
|
+
var sub_branches = sourcify(group[character], needEscape);
|
|
5786
|
+
if (needEscape && NEED_TO_ESCAPE_IN_REGEXP.test(character)) {
|
|
5787
|
+
character = "\\" + character;
|
|
5788
|
+
}
|
|
5789
|
+
sub_branches ? branches.push(character + sub_branches) : singleCharactersBranch.push(character);
|
|
5790
|
+
} else {
|
|
5791
|
+
noEmptyBranch = false;
|
|
5792
|
+
}
|
|
5793
|
+
}
|
|
5794
|
+
singleCharactersBranch.length && branches.unshift(singleCharactersBranch.length === 1 ? singleCharactersBranch[0] : "[" + singleCharactersBranch.join("") + "]");
|
|
5795
|
+
return branches.length === 0 ? "" : (branches.length === 1 && (singleCharactersBranch.length || noEmptyBranch) ? branches[0] : "(?:" + branches.join("|") + ")") + (noEmptyBranch ? "" : "?");
|
|
5796
|
+
}
|
|
5797
|
+
__name(sourcify, "sourcify");
|
|
5798
|
+
var WeakSet$1 = WeakSet;
|
|
5799
|
+
var has = WeakSet.prototype.has;
|
|
5800
|
+
var add = WeakSet.prototype.add;
|
|
5801
|
+
var del = WeakSet.prototype["delete"];
|
|
5802
|
+
var keys = Object.keys;
|
|
5803
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
5804
|
+
var Null$1 = (
|
|
5805
|
+
/* j-globals: null (internal) */
|
|
5806
|
+
/* @__PURE__ */ function() {
|
|
5807
|
+
var assign = Object.assign || /* @__PURE__ */ __name(function assign2(target, source) {
|
|
5808
|
+
var keys$1, index, key;
|
|
5809
|
+
for (keys$1 = keys(source), index = 0; index < keys$1.length; ++index) {
|
|
5810
|
+
key = keys$1[index];
|
|
5811
|
+
target[key] = source[key];
|
|
5812
|
+
}
|
|
5813
|
+
if (getOwnPropertySymbols) {
|
|
5814
|
+
for (keys$1 = getOwnPropertySymbols(source), index = 0; index < keys$1.length; ++index) {
|
|
5815
|
+
key = keys$1[index];
|
|
5816
|
+
if (isEnum(source, key)) {
|
|
5817
|
+
target[key] = source[key];
|
|
5818
|
+
}
|
|
5819
|
+
}
|
|
5820
|
+
}
|
|
5821
|
+
return target;
|
|
5822
|
+
}, "assign");
|
|
5823
|
+
function Nullify(constructor) {
|
|
5824
|
+
delete constructor.prototype.constructor;
|
|
5825
|
+
freeze(constructor.prototype);
|
|
5826
|
+
return constructor;
|
|
5827
|
+
}
|
|
5828
|
+
__name(Nullify, "Nullify");
|
|
5829
|
+
function Null(origin) {
|
|
5830
|
+
return origin === undefined$1 ? this : typeof origin === "function" ? /* @__PURE__ */ Nullify(origin) : /* @__PURE__ */ assign(/* @__PURE__ */ create(NULL), origin);
|
|
5831
|
+
}
|
|
5832
|
+
__name(Null, "Null");
|
|
5833
|
+
delete Null.name;
|
|
5834
|
+
Null.prototype = null;
|
|
5835
|
+
freeze(Null);
|
|
5836
|
+
return Null;
|
|
5837
|
+
}()
|
|
5838
|
+
);
|
|
5839
|
+
var is = Object.is;
|
|
5840
|
+
var Object_defineProperties = Object.defineProperties;
|
|
5841
|
+
var fromEntries = Object.fromEntries;
|
|
5842
|
+
var Reflect_construct = Reflect.construct;
|
|
5843
|
+
var Reflect_defineProperty = Reflect.defineProperty;
|
|
5844
|
+
var Reflect_deleteProperty = Reflect.deleteProperty;
|
|
5845
|
+
var ownKeys = Reflect.ownKeys;
|
|
5846
|
+
var Keeper = /* @__PURE__ */ __name(() => [], "Keeper");
|
|
5847
|
+
var newWeakMap = /* @__PURE__ */ __name(() => {
|
|
5848
|
+
const weakMap = new WeakMap$1();
|
|
5849
|
+
weakMap.has = weakMap.has;
|
|
5850
|
+
weakMap.get = weakMap.get;
|
|
5851
|
+
weakMap.set = weakMap.set;
|
|
5852
|
+
return weakMap;
|
|
5853
|
+
}, "newWeakMap");
|
|
5854
|
+
var target2keeper = /* @__PURE__ */ newWeakMap();
|
|
5855
|
+
var proxy2target = /* @__PURE__ */ newWeakMap();
|
|
5856
|
+
var target2proxy = /* @__PURE__ */ newWeakMap();
|
|
5857
|
+
var handlers = /* @__PURE__ */ assign$1(create$1(NULL), {
|
|
5858
|
+
defineProperty: /* @__PURE__ */ __name((target, key, descriptor) => {
|
|
5859
|
+
if (hasOwn(target, key)) {
|
|
5860
|
+
return Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor));
|
|
5861
|
+
}
|
|
5862
|
+
if (Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor))) {
|
|
5863
|
+
const keeper = target2keeper.get(target);
|
|
5864
|
+
keeper[keeper.length] = key;
|
|
5865
|
+
return true;
|
|
5866
|
+
}
|
|
5867
|
+
return false;
|
|
5868
|
+
}, "defineProperty"),
|
|
5869
|
+
deleteProperty: /* @__PURE__ */ __name((target, key) => {
|
|
5870
|
+
if (Reflect_deleteProperty(target, key)) {
|
|
5871
|
+
const keeper = target2keeper.get(target);
|
|
5872
|
+
const index = keeper.indexOf(key);
|
|
5873
|
+
index < 0 || --keeper.copyWithin(index, index + 1).length;
|
|
5874
|
+
return true;
|
|
5875
|
+
}
|
|
5876
|
+
return false;
|
|
5877
|
+
}, "deleteProperty"),
|
|
5878
|
+
ownKeys: /* @__PURE__ */ __name((target) => target2keeper.get(target), "ownKeys"),
|
|
5879
|
+
construct: /* @__PURE__ */ __name((target, args, newTarget) => orderify(Reflect_construct(target, args, newTarget)), "construct"),
|
|
5880
|
+
apply: /* @__PURE__ */ __name((target, thisArg, args) => orderify(apply$1(target, thisArg, args)), "apply")
|
|
5881
|
+
});
|
|
5882
|
+
var newProxy = /* @__PURE__ */ __name((target, keeper) => {
|
|
5883
|
+
target2keeper.set(target, keeper);
|
|
5884
|
+
const proxy = new Proxy$1(target, handlers);
|
|
5885
|
+
proxy2target.set(proxy, target);
|
|
5886
|
+
return proxy;
|
|
5887
|
+
}, "newProxy");
|
|
5888
|
+
var orderify = /* @__PURE__ */ __name((object) => {
|
|
5889
|
+
if (proxy2target.has(object)) {
|
|
5890
|
+
return object;
|
|
5891
|
+
}
|
|
5892
|
+
let proxy = target2proxy.get(object);
|
|
5893
|
+
if (proxy) {
|
|
5894
|
+
return proxy;
|
|
5895
|
+
}
|
|
5896
|
+
proxy = newProxy(object, assign$1(Keeper(), ownKeys(object)));
|
|
5897
|
+
target2proxy.set(object, proxy);
|
|
5898
|
+
return proxy;
|
|
5899
|
+
}, "orderify");
|
|
5900
|
+
var map_has = WeakMap.prototype.has;
|
|
5901
|
+
var map_del = WeakMap.prototype["delete"];
|
|
5902
|
+
var INLINES = new WeakMap$1();
|
|
5903
|
+
var SECTIONS = new WeakSet$1();
|
|
5904
|
+
var ofInline = /* @__PURE__ */ get.bind(INLINES);
|
|
5905
|
+
var isSection = /* @__PURE__ */ has.bind(SECTIONS);
|
|
5906
|
+
var tables = new WeakSet$1();
|
|
5907
|
+
var implicitTables = new WeakSet$1();
|
|
5908
|
+
var pairs = new WeakSet$1();
|
|
5909
|
+
var NONE = [];
|
|
5910
|
+
var sourcePath = "";
|
|
5911
|
+
var sourceLines = NONE;
|
|
5912
|
+
var lineIndex = -1;
|
|
5913
|
+
var throws = /* @__PURE__ */ __name((error) => {
|
|
5914
|
+
throw error;
|
|
5915
|
+
}, "throws");
|
|
5916
|
+
var where = /* @__PURE__ */ __name((pre, rowIndex = lineIndex, columnNumber = 0) => sourceLines === NONE ? "" : sourcePath ? `
|
|
5917
|
+
at (${sourcePath}:${rowIndex + 1}:${columnNumber})` : `${pre}line ${rowIndex + 1}: ${sourceLines[rowIndex]}`, "where");
|
|
5918
|
+
var Whitespace = /[ \t]/;
|
|
5919
|
+
var { exec: VALUE_REST_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5920
|
+
^
|
|
5921
|
+
(
|
|
5922
|
+
(?:\d\d\d\d-\d\d-\d\d \d)?
|
|
5923
|
+
[\w\-+.:]+
|
|
5924
|
+
)
|
|
5925
|
+
${Whitespace}*
|
|
5926
|
+
(.*)
|
|
5927
|
+
$`.valueOf();
|
|
5928
|
+
var { exec: LITERAL_STRING_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5929
|
+
^
|
|
5930
|
+
'([^']*)'
|
|
5931
|
+
${Whitespace}*
|
|
5932
|
+
(.*)`.valueOf();
|
|
5933
|
+
var { exec: MULTI_LINE_LITERAL_STRING_0_1_2 } = /* @__PURE__ */ newRegExp.s`
|
|
5934
|
+
^
|
|
5935
|
+
(.*?)
|
|
5936
|
+
'''('{0,2})
|
|
5937
|
+
${Whitespace}*
|
|
5938
|
+
(.*)`.valueOf();
|
|
5939
|
+
var { exec: MULTI_LINE_LITERAL_STRING_0 } = /* @__PURE__ */ newRegExp.s`
|
|
5940
|
+
^
|
|
5941
|
+
(.*?)
|
|
5942
|
+
'''()
|
|
5943
|
+
${Whitespace}*
|
|
5944
|
+
(.*)`.valueOf();
|
|
5945
|
+
var Tag = /[^\x00-\x1F"#'()<>[\\\]`{}\x7F]+/;
|
|
5946
|
+
var { exec: KEY_VALUE_PAIR_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5947
|
+
^
|
|
5948
|
+
${Whitespace}*
|
|
5949
|
+
=
|
|
5950
|
+
${Whitespace}*
|
|
5951
|
+
(?:
|
|
5952
|
+
<(${Tag})>
|
|
5953
|
+
${Whitespace}*
|
|
5954
|
+
)?
|
|
5955
|
+
(.*)
|
|
5956
|
+
$`.valueOf();
|
|
5957
|
+
var { exec: _VALUE_PAIR_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5958
|
+
^
|
|
5959
|
+
<(${Tag})>
|
|
5960
|
+
${Whitespace}*
|
|
5961
|
+
(.*)
|
|
5962
|
+
$`.valueOf();
|
|
5963
|
+
var { exec: TAG_REST_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5964
|
+
^
|
|
5965
|
+
<(${Tag})>
|
|
5966
|
+
${Whitespace}*
|
|
5967
|
+
(.*)
|
|
5968
|
+
$`.valueOf();
|
|
5969
|
+
var MULTI_LINE_BASIC_STRING = theRegExp(/[^\\"]+|\\.?|"(?!"")"?/sy);
|
|
5970
|
+
var BASIC_STRING_TAB______ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5971
|
+
var BASIC_STRING__________ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5972
|
+
var BASIC_STRING_DEL______ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5973
|
+
var BASIC_STRING_DEL_SLASH = theRegExp(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\/]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5974
|
+
var { test: IS_DOT_KEY } = theRegExp(/^[ \t]*\./);
|
|
5975
|
+
var { exec: BARE_KEY_STRICT } = theRegExp(/^[\w-]+/);
|
|
5976
|
+
var { exec: BARE_KEY_FREE } = theRegExp(/^[^ \t#=[\]'".]+(?:[ \t]+[^ \t#=[\]'".]+)*/);
|
|
5977
|
+
var { exec: LITERAL_KEY____ } = theRegExp(/^'[^'\x00-\x08\x0B-\x1F\x7F]*'/);
|
|
5978
|
+
var { exec: LITERAL_KEY_DEL } = theRegExp(/^'[^'\x00-\x08\x0B-\x1F]*'/);
|
|
5979
|
+
var { test: CONTROL_CHARACTER_EXCLUDE_TAB____ } = theRegExp(/[\x00-\x08\x0B-\x1F\x7F]/);
|
|
5980
|
+
var { test: CONTROL_CHARACTER_EXCLUDE_TAB_DEL } = theRegExp(/[\x00-\x08\x0B-\x1F]/);
|
|
5981
|
+
var NUM = /* @__PURE__ */ newRegExp`
|
|
5982
|
+
(?:
|
|
5983
|
+
0
|
|
5984
|
+
(?:
|
|
5985
|
+
b[01][_01]*
|
|
5986
|
+
|
|
|
5987
|
+
o[0-7][_0-7]*
|
|
5988
|
+
|
|
|
5989
|
+
x[\dA-Fa-f][_\dA-Fa-f]*
|
|
5990
|
+
|
|
|
5991
|
+
(?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
|
|
5992
|
+
)
|
|
5993
|
+
|
|
|
5994
|
+
[1-9][_\d]*
|
|
5995
|
+
(?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
|
|
5996
|
+
|
|
|
5997
|
+
inf
|
|
5998
|
+
|
|
|
5999
|
+
nan
|
|
6000
|
+
)
|
|
6001
|
+
`.valueOf();
|
|
6002
|
+
var { test: IS_AMAZING } = /* @__PURE__ */ newRegExp`
|
|
6003
|
+
^(?:
|
|
6004
|
+
-?${NUM}
|
|
6005
|
+
(?:-${NUM})*
|
|
6006
|
+
|
|
|
6007
|
+
true
|
|
6008
|
+
|
|
|
6009
|
+
false
|
|
6010
|
+
)$
|
|
6011
|
+
`.valueOf();
|
|
6012
|
+
var { test: BAD_DXOB } = /* @__PURE__ */ newRegExp`_(?![\dA-Fa-f])`.valueOf();
|
|
6013
|
+
var isAmazing = /* @__PURE__ */ __name((keys2) => IS_AMAZING(keys2) && !BAD_DXOB(keys2), "isAmazing");
|
|
6014
|
+
var Keys = class KeysRegExp extends RegExp$1 {
|
|
6015
|
+
static {
|
|
6016
|
+
__name(this, "KeysRegExp");
|
|
6017
|
+
}
|
|
6018
|
+
constructor(keys2) {
|
|
6019
|
+
super(`^${groupify(keys2)}$`);
|
|
6020
|
+
let maxLength = -1;
|
|
6021
|
+
for (let index = keys2.length; index; ) {
|
|
6022
|
+
const { length } = keys2[--index];
|
|
6023
|
+
if (length > maxLength) {
|
|
6024
|
+
maxLength = length;
|
|
6025
|
+
}
|
|
6026
|
+
}
|
|
6027
|
+
this.lastIndex = maxLength + 1;
|
|
6028
|
+
return this;
|
|
6029
|
+
}
|
|
6030
|
+
test(key) {
|
|
6031
|
+
return key.length < this.lastIndex && super.test(key);
|
|
6032
|
+
}
|
|
6033
|
+
};
|
|
6034
|
+
var isKeys = /* @__PURE__ */ isPrototypeOf.bind(/* @__PURE__ */ freeze(Keys.prototype));
|
|
6035
|
+
var zeroDatetime;
|
|
6036
|
+
var arrayTypes = new WeakMap$1();
|
|
6037
|
+
var arrayTypes_get = /* @__PURE__ */ get.bind(arrayTypes);
|
|
6038
|
+
var arrayTypes_set = /* @__PURE__ */ set.bind(arrayTypes);
|
|
6039
|
+
var As = /* @__PURE__ */ __name(() => {
|
|
6040
|
+
const as = /* @__PURE__ */ __name((array) => {
|
|
6041
|
+
const got = arrayTypes_get(array);
|
|
6042
|
+
got ? got === as || throws(TypeError$1(`Types in Array must be same` + where(". Check "))) : arrayTypes_set(array, as);
|
|
6043
|
+
return array;
|
|
6044
|
+
}, "as");
|
|
6045
|
+
return as;
|
|
6046
|
+
}, "As");
|
|
6047
|
+
var AS_TYPED = {
|
|
6048
|
+
asNulls: As(),
|
|
6049
|
+
asStrings: As(),
|
|
6050
|
+
asTables: As(),
|
|
6051
|
+
asArrays: As(),
|
|
6052
|
+
asBooleans: As(),
|
|
6053
|
+
asFloats: As(),
|
|
6054
|
+
asIntegers: As(),
|
|
6055
|
+
asOffsetDateTimes: As(),
|
|
6056
|
+
asLocalDateTimes: As(),
|
|
6057
|
+
asLocalDates: As(),
|
|
6058
|
+
asLocalTimes: As()
|
|
6059
|
+
};
|
|
6060
|
+
var isView = ArrayBuffer.isView;
|
|
6061
|
+
var TextDecoder$1 = TextDecoder;
|
|
6062
|
+
var Symbol$1 = Symbol;
|
|
6063
|
+
var previous = Symbol$1("previous");
|
|
6064
|
+
var _literal = Symbol$1("_literal");
|
|
6065
|
+
var arrays = new WeakSet$1();
|
|
6066
|
+
var staticalArrays = new WeakSet$1();
|
|
6067
|
+
var NativeDate = Date;
|
|
6068
|
+
var parse$2 = Date.parse;
|
|
6069
|
+
var preventExtensions = Object.preventExtensions;
|
|
6070
|
+
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
|
|
6071
|
+
var defineProperties = (
|
|
6072
|
+
/* j-globals: null.defineProperties (internal) */
|
|
6073
|
+
/* @__PURE__ */ __name(function defineProperties2(object, descriptorMap) {
|
|
6074
|
+
var created = create$1(NULL);
|
|
6075
|
+
var names = keys(descriptorMap);
|
|
6076
|
+
for (var length = names.length, index = 0; index < length; ++index) {
|
|
6077
|
+
var name = names[index];
|
|
6078
|
+
created[name] = Descriptor(descriptorMap[name]);
|
|
6079
|
+
}
|
|
6080
|
+
if (getOwnPropertySymbols) {
|
|
6081
|
+
var symbols = getOwnPropertySymbols(descriptorMap);
|
|
6082
|
+
for (length = symbols.length, index = 0; index < length; ++index) {
|
|
6083
|
+
var symbol = symbols[index];
|
|
6084
|
+
if (isEnum(descriptorMap, symbol)) {
|
|
6085
|
+
created[symbol] = Descriptor(descriptorMap[symbol]);
|
|
6086
|
+
}
|
|
6087
|
+
}
|
|
6088
|
+
}
|
|
6089
|
+
return Object_defineProperties(object, created);
|
|
6090
|
+
}, "defineProperties")
|
|
6091
|
+
);
|
|
6092
|
+
var fpc = /* @__PURE__ */ __name((c) => {
|
|
6093
|
+
freeze(freeze(c).prototype);
|
|
6094
|
+
return c;
|
|
6095
|
+
}, "fpc");
|
|
6096
|
+
var _29_ = /(?:0[1-9]|1\d|2\d)/;
|
|
6097
|
+
var _30_ = /(?:0[1-9]|[12]\d|30)/;
|
|
6098
|
+
var _31_ = /(?:0[1-9]|[12]\d|3[01])/;
|
|
6099
|
+
var _23_ = /(?:[01]\d|2[0-3])/;
|
|
6100
|
+
var _59_ = /[0-5]\d/;
|
|
6101
|
+
var YMD = /* @__PURE__ */ newRegExp`
|
|
6102
|
+
\d\d\d\d-
|
|
6103
|
+
(?:
|
|
6104
|
+
0
|
|
6105
|
+
(?:
|
|
6106
|
+
[13578]-${_31_}
|
|
6107
|
+
|
|
|
6108
|
+
[469]-${_30_}
|
|
6109
|
+
|
|
|
6110
|
+
2-${_29_}
|
|
6111
|
+
)
|
|
6112
|
+
|
|
|
6113
|
+
1
|
|
6114
|
+
(?:
|
|
6115
|
+
[02]-${_31_}
|
|
6116
|
+
|
|
|
6117
|
+
1-${_30_}
|
|
6118
|
+
)
|
|
6119
|
+
)
|
|
6120
|
+
`.valueOf();
|
|
6121
|
+
var HMS = /* @__PURE__ */ newRegExp`
|
|
6122
|
+
${_23_}:${_59_}:${_59_}
|
|
6123
|
+
`.valueOf();
|
|
6124
|
+
var OFFSET$ = /(?:[Zz]|[+-]\d\d:\d\d)$/;
|
|
6125
|
+
var { exec: Z_exec } = theRegExp(/(([+-])\d\d):(\d\d)$/);
|
|
6126
|
+
var { exec: OFFSET_DATETIME_exec } = /* @__PURE__ */ newRegExp`
|
|
6127
|
+
^
|
|
6128
|
+
${YMD}
|
|
6129
|
+
[Tt ]
|
|
6130
|
+
${HMS}
|
|
6131
|
+
(?:\.\d{1,3}(\d*?)0*)?
|
|
6132
|
+
(?:[Zz]|[+-]${_23_}:${_59_})
|
|
6133
|
+
$`.valueOf();
|
|
6134
|
+
var { exec: OFFSET_DATETIME_ZERO_exec } = /* @__PURE__ */ newRegExp`
|
|
6135
|
+
^
|
|
6136
|
+
${YMD}
|
|
6137
|
+
[Tt ]
|
|
6138
|
+
${HMS}
|
|
6139
|
+
()
|
|
6140
|
+
[Zz]
|
|
6141
|
+
$`.valueOf();
|
|
6142
|
+
var { test: IS_LOCAL_DATETIME } = /* @__PURE__ */ newRegExp`
|
|
6143
|
+
^
|
|
6144
|
+
${YMD}
|
|
6145
|
+
[Tt ]
|
|
6146
|
+
${HMS}
|
|
6147
|
+
(?:\.\d+)?
|
|
6148
|
+
$`.valueOf();
|
|
6149
|
+
var { test: IS_LOCAL_DATE } = /* @__PURE__ */ newRegExp`
|
|
6150
|
+
^
|
|
6151
|
+
${YMD}
|
|
6152
|
+
$`.valueOf();
|
|
6153
|
+
var { test: IS_LOCAL_TIME } = /* @__PURE__ */ newRegExp`
|
|
6154
|
+
^
|
|
6155
|
+
${HMS}
|
|
6156
|
+
(?:\.\d+)?
|
|
6157
|
+
$`.valueOf();
|
|
6158
|
+
var T = /[ t]/;
|
|
6159
|
+
var DELIMITER_DOT = /[-T:.]/g;
|
|
6160
|
+
var DOT_ZERO = /\.?0+$/;
|
|
6161
|
+
var ZERO = /\.(\d*?)0+$/;
|
|
6162
|
+
var zeroReplacer = /* @__PURE__ */ __name((match, p1) => p1, "zeroReplacer");
|
|
6163
|
+
var Datetime = /* @__PURE__ */ (() => {
|
|
6164
|
+
const Datetime2 = /* @__PURE__ */ __name(function() {
|
|
6165
|
+
return this;
|
|
6166
|
+
}, "Datetime");
|
|
6167
|
+
const descriptors = Null$1(null);
|
|
6168
|
+
{
|
|
6169
|
+
const descriptor = Null$1(null);
|
|
6170
|
+
for (const key of ownKeys(NativeDate.prototype)) {
|
|
6171
|
+
key === "constructor" || key === "toJSON" || (descriptors[key] = descriptor);
|
|
6172
|
+
}
|
|
6173
|
+
}
|
|
6174
|
+
Datetime2.prototype = preventExtensions(create$1(NativeDate.prototype, descriptors));
|
|
6175
|
+
return freeze(Datetime2);
|
|
6176
|
+
})();
|
|
6177
|
+
var Value = /* @__PURE__ */ __name((ISOString) => ISOString.replace(ZERO, zeroReplacer).replace(DELIMITER_DOT, ""), "Value");
|
|
6178
|
+
var d = /./gs;
|
|
6179
|
+
var d2u = /* @__PURE__ */ __name((d2) => "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009"[d2], "d2u");
|
|
6180
|
+
var ValueOFFSET = /* @__PURE__ */ __name((time, more) => time < 0 ? ("" + (time + 6216730554e4)).replace(d, d2u).padStart(14, "\u2000") + more.replace(d, d2u) + time : more ? (time + ".").padStart(16, "0") + more : ("" + time).padStart(15, "0"), "ValueOFFSET");
|
|
6181
|
+
var validateLeap = /* @__PURE__ */ __name((literal) => {
|
|
6182
|
+
if (literal.startsWith("02-29", 5)) {
|
|
6183
|
+
const year = +literal.slice(0, 4);
|
|
6184
|
+
return year & 3 ? false : year % 100 ? true : year % 400 ? false : year % 3200 ? true : false;
|
|
6185
|
+
}
|
|
6186
|
+
return true;
|
|
6187
|
+
}, "validateLeap");
|
|
6188
|
+
var { test: VALIDATE_LEAP } = /* @__PURE__ */ newRegExp.s`^.....(?:06.30|12.31).23:59:59`.valueOf();
|
|
6189
|
+
var DATE$1 = /* @__PURE__ */ defineProperties(new NativeDate(0), /* @__PURE__ */ getOwnPropertyDescriptors(NativeDate.prototype));
|
|
6190
|
+
var OffsetDateTime_ISOString = Symbol$1("OffsetDateTime_ISOString");
|
|
6191
|
+
var OffsetDateTime_value = Symbol$1("OffsetDateTime_value");
|
|
6192
|
+
var OffsetDateTime_use = /* @__PURE__ */ __name((that, $ = 0) => {
|
|
6193
|
+
DATE$1.setTime(+that[OffsetDateTime_value] + $);
|
|
6194
|
+
return DATE$1;
|
|
6195
|
+
}, "OffsetDateTime_use");
|
|
6196
|
+
var OffsetDateTime = /* @__PURE__ */ fpc(class OffsetDateTime2 extends Datetime {
|
|
6197
|
+
static {
|
|
6198
|
+
__name(this, "OffsetDateTime");
|
|
6199
|
+
}
|
|
6200
|
+
[OffsetDateTime_ISOString];
|
|
6201
|
+
[OffsetDateTime_value];
|
|
6202
|
+
get [Symbol$1.toStringTag]() {
|
|
6203
|
+
return "OffsetDateTime";
|
|
6204
|
+
}
|
|
6205
|
+
valueOf() {
|
|
6206
|
+
return this[OffsetDateTime_value];
|
|
6207
|
+
}
|
|
6208
|
+
toISOString() {
|
|
6209
|
+
return this[OffsetDateTime_ISOString];
|
|
6210
|
+
}
|
|
6211
|
+
constructor(literal) {
|
|
6212
|
+
validateLeap(literal) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
|
|
6213
|
+
const with60 = literal.startsWith("60", 17);
|
|
6214
|
+
let without60 = with60 ? literal.slice(0, 17) + "59" + literal.slice(19) : literal;
|
|
6215
|
+
const { 1: more = "" } = (zeroDatetime ? OFFSET_DATETIME_ZERO_exec(without60) : OFFSET_DATETIME_exec(without60)) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
|
|
6216
|
+
const time = parse$2(without60 = without60.replace(T, "T").replace("z", "Z"));
|
|
6217
|
+
if (with60) {
|
|
6218
|
+
DATE$1.setTime(time);
|
|
6219
|
+
VALIDATE_LEAP(DATE$1.toISOString()) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
|
|
6220
|
+
}
|
|
6221
|
+
super();
|
|
6222
|
+
this[OffsetDateTime_ISOString] = without60;
|
|
6223
|
+
this[OffsetDateTime_value] = ValueOFFSET(time, more);
|
|
6224
|
+
return this;
|
|
6225
|
+
}
|
|
6226
|
+
getUTCFullYear() {
|
|
6227
|
+
return OffsetDateTime_use(this).getUTCFullYear();
|
|
6228
|
+
}
|
|
6229
|
+
///get year () :FullYear { return OffsetDateTime_get(this, 0, 4); }
|
|
6230
|
+
///set year (value :FullYear) { OffsetDateTime_set(this, 0, 4, value, true); }
|
|
6231
|
+
getUTCMonth() {
|
|
6232
|
+
return OffsetDateTime_use(this).getUTCMonth();
|
|
6233
|
+
}
|
|
6234
|
+
///get month () { return OffsetDateTime_get(this, 5, 7); }
|
|
6235
|
+
///set month (value) { OffsetDateTime_set(this, 5, 7, value, true); }
|
|
6236
|
+
getUTCDate() {
|
|
6237
|
+
return OffsetDateTime_use(this).getUTCDate();
|
|
6238
|
+
}
|
|
6239
|
+
///get day () :Date { return OffsetDateTime_get(this, 8, 10); }
|
|
6240
|
+
///set day (value :Date) { OffsetDateTime_set(this, 8, 10, value, true); }
|
|
6241
|
+
getUTCHours() {
|
|
6242
|
+
return OffsetDateTime_use(this).getUTCHours();
|
|
6243
|
+
}
|
|
6244
|
+
///get hour () :Hours { return OffsetDateTime_get(this, 11, 13); }
|
|
6245
|
+
///set hour (value :Hours) { OffsetDateTime_set(this, 11, 13, value, true); }
|
|
6246
|
+
getUTCMinutes() {
|
|
6247
|
+
return OffsetDateTime_use(this).getUTCMinutes();
|
|
6248
|
+
}
|
|
6249
|
+
///get minute () :Minutes { return OffsetDateTime_get(this, 14, 16); }
|
|
6250
|
+
///set minute (value :Minutes) { OffsetDateTime_set(this, 14, 16, value, true); }
|
|
6251
|
+
getUTCSeconds() {
|
|
6252
|
+
return OffsetDateTime_use(this).getUTCSeconds();
|
|
6253
|
+
}
|
|
6254
|
+
///get second () :Seconds { return OffsetDateTime_get(this, 17, 19); }
|
|
6255
|
+
///set second (value :Seconds) { OffsetDateTime_set(this, 17, 19, value, true); }
|
|
6256
|
+
getUTCMilliseconds() {
|
|
6257
|
+
return OffsetDateTime_use(this).getUTCMilliseconds();
|
|
6258
|
+
}
|
|
6259
|
+
///
|
|
6260
|
+
///get millisecond () :Milliseconds { return this[OffsetDateTime_value]%1000; }///
|
|
6261
|
+
/*set millisecond (value :Milliseconds) {
|
|
6262
|
+
this[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, 19) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' ) + this[OffsetDateTime_ISOString].slice(this[OffsetDateTime_ISOString].search(OFFSET$));
|
|
6263
|
+
OffsetDateTime_set(this, 0, 0, 0, false);
|
|
6264
|
+
}*/
|
|
6265
|
+
//
|
|
6266
|
+
///get microsecond () :Milliseconds
|
|
6267
|
+
///set microsecond (value :Milliseconds)
|
|
6268
|
+
///get nanosecond () :Milliseconds
|
|
6269
|
+
///set nanosecond (value :Milliseconds)
|
|
6270
|
+
getUTCDay() {
|
|
6271
|
+
return OffsetDateTime_use(this).getUTCDay();
|
|
6272
|
+
}
|
|
6273
|
+
///get dayOfWeek () { return OffsetDateTime_use(this, this.getTimezoneOffset()*60000).getUTCDay() || 7; }
|
|
6274
|
+
getTimezoneOffset() {
|
|
6275
|
+
const z2 = Z_exec(this[OffsetDateTime_ISOString]);
|
|
6276
|
+
return z2 ? +z2[1] * 60 + +(z2[2] + z2[3]) : 0;
|
|
6277
|
+
}
|
|
6278
|
+
///get offset () { return this[OffsetDateTime_ISOString].endsWith('Z') ? 'Z' : this[OffsetDateTime_ISOString].slice(-6); }
|
|
6279
|
+
/*set offset (value) {
|
|
6280
|
+
this[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, this[OffsetDateTime_ISOString].endsWith('Z') ? -1 : -6) + value;
|
|
6281
|
+
OffsetDateTime_set(this, 0, 0, 0, true);
|
|
6282
|
+
}*/
|
|
6283
|
+
//
|
|
6284
|
+
getTime() {
|
|
6285
|
+
return floor(+this[OffsetDateTime_value]);
|
|
6286
|
+
}
|
|
6287
|
+
///
|
|
6288
|
+
/*setTime (this :OffsetDateTime, value :Time) :void {
|
|
6289
|
+
value = DATE.setTime(value);
|
|
6290
|
+
const z = Z_exec(this[OffsetDateTime_ISOString]);
|
|
6291
|
+
DATE.setTime(value + ( z ? +z[1]*60 + +( z[2] + z[3] ) : 0 )*60000);
|
|
6292
|
+
this[OffsetDateTime_ISOString] = z ? DATE.toISOString().slice(0, -1) + z[0] : DATE.toISOString();
|
|
6293
|
+
this[OffsetDateTime_value] = ValueOFFSET(value, '');
|
|
6294
|
+
///return value;
|
|
6295
|
+
}*/
|
|
6296
|
+
});
|
|
6297
|
+
var LocalDateTime_ISOString = Symbol$1("LocalDateTime_ISOString");
|
|
6298
|
+
var LocalDateTime_value = Symbol$1("LocalDateTime_value");
|
|
6299
|
+
var LocalDateTime_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalDateTime_ISOString].slice(start, end), "LocalDateTime_get");
|
|
6300
|
+
var LocalDateTime_set = /* @__PURE__ */ __name((that, start, end, value) => {
|
|
6301
|
+
const string = "" + value;
|
|
6302
|
+
const size = end - start;
|
|
6303
|
+
if (string.length > size) {
|
|
6304
|
+
throw RangeError$1();
|
|
6305
|
+
}
|
|
6306
|
+
that[LocalDateTime_value] = Value(
|
|
6307
|
+
that[LocalDateTime_ISOString] = that[LocalDateTime_ISOString].slice(0, start) + string.padStart(size, "0") + that[LocalDateTime_ISOString].slice(end)
|
|
6308
|
+
);
|
|
6309
|
+
}, "LocalDateTime_set");
|
|
6310
|
+
var LocalDateTime = /* @__PURE__ */ fpc(class LocalDateTime2 extends Datetime {
|
|
6311
|
+
static {
|
|
6312
|
+
__name(this, "LocalDateTime");
|
|
6313
|
+
}
|
|
6314
|
+
[LocalDateTime_ISOString];
|
|
6315
|
+
[LocalDateTime_value];
|
|
6316
|
+
get [Symbol$1.toStringTag]() {
|
|
6317
|
+
return "LocalDateTime";
|
|
6318
|
+
}
|
|
6319
|
+
valueOf() {
|
|
6320
|
+
return this[LocalDateTime_value];
|
|
6321
|
+
}
|
|
6322
|
+
toISOString() {
|
|
6323
|
+
return this[LocalDateTime_ISOString];
|
|
6324
|
+
}
|
|
6325
|
+
constructor(literal) {
|
|
6326
|
+
IS_LOCAL_DATETIME(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date-Time ${literal}` + where(" at ")));
|
|
6327
|
+
super();
|
|
6328
|
+
this[LocalDateTime_value] = Value(
|
|
6329
|
+
this[LocalDateTime_ISOString] = literal.replace(T, "T")
|
|
6330
|
+
);
|
|
6331
|
+
return this;
|
|
6332
|
+
}
|
|
6333
|
+
getFullYear() {
|
|
6334
|
+
return LocalDateTime_get(this, 0, 4);
|
|
6335
|
+
}
|
|
6336
|
+
setFullYear(value) {
|
|
6337
|
+
LocalDateTime_set(this, 0, 4, value);
|
|
6338
|
+
}
|
|
6339
|
+
getMonth() {
|
|
6340
|
+
return LocalDateTime_get(this, 5, 7) - 1;
|
|
6341
|
+
}
|
|
6342
|
+
setMonth(value) {
|
|
6343
|
+
LocalDateTime_set(this, 5, 7, value + 1);
|
|
6344
|
+
}
|
|
6345
|
+
getDate() {
|
|
6346
|
+
return LocalDateTime_get(this, 8, 10);
|
|
6347
|
+
}
|
|
6348
|
+
setDate(value) {
|
|
6349
|
+
LocalDateTime_set(this, 8, 10, value);
|
|
6350
|
+
}
|
|
6351
|
+
getHours() {
|
|
6352
|
+
return LocalDateTime_get(this, 11, 13);
|
|
6353
|
+
}
|
|
6354
|
+
setHours(value) {
|
|
6355
|
+
LocalDateTime_set(this, 11, 13, value);
|
|
6356
|
+
}
|
|
6357
|
+
getMinutes() {
|
|
6358
|
+
return LocalDateTime_get(this, 14, 16);
|
|
6359
|
+
}
|
|
6360
|
+
setMinutes(value) {
|
|
6361
|
+
LocalDateTime_set(this, 14, 16, value);
|
|
6362
|
+
}
|
|
6363
|
+
getSeconds() {
|
|
6364
|
+
return LocalDateTime_get(this, 17, 19);
|
|
6365
|
+
}
|
|
6366
|
+
setSeconds(value) {
|
|
6367
|
+
LocalDateTime_set(this, 17, 19, value);
|
|
6368
|
+
}
|
|
6369
|
+
getMilliseconds() {
|
|
6370
|
+
return +this[LocalDateTime_value].slice(14, 17).padEnd(3, "0");
|
|
6371
|
+
}
|
|
6372
|
+
///
|
|
6373
|
+
setMilliseconds(value) {
|
|
6374
|
+
this[LocalDateTime_value] = Value(
|
|
6375
|
+
this[LocalDateTime_ISOString] = this[LocalDateTime_ISOString].slice(0, 19) + (value ? ("." + ("" + value).padStart(3, "0")).replace(DOT_ZERO, "") : "")
|
|
6376
|
+
);
|
|
6377
|
+
}
|
|
6378
|
+
});
|
|
6379
|
+
var LocalDate_ISOString = Symbol$1("LocalDate_ISOString");
|
|
6380
|
+
var LocalDate_value = Symbol$1("LocalDate_value");
|
|
6381
|
+
var LocalDate_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalDate_ISOString].slice(start, end), "LocalDate_get");
|
|
6382
|
+
var LocalDate_set = /* @__PURE__ */ __name((that, start, end, value) => {
|
|
6383
|
+
const string = "" + value;
|
|
6384
|
+
const size = end - start;
|
|
6385
|
+
if (string.length > size) {
|
|
6386
|
+
throw RangeError$1();
|
|
6387
|
+
}
|
|
6388
|
+
that[LocalDate_value] = Value(
|
|
6389
|
+
that[LocalDate_ISOString] = that[LocalDate_ISOString].slice(0, start) + string.padStart(size, "0") + that[LocalDate_ISOString].slice(end)
|
|
6390
|
+
);
|
|
6391
|
+
}, "LocalDate_set");
|
|
6392
|
+
var LocalDate = /* @__PURE__ */ fpc(class LocalDate2 extends Datetime {
|
|
6393
|
+
static {
|
|
6394
|
+
__name(this, "LocalDate");
|
|
6395
|
+
}
|
|
6396
|
+
[LocalDate_ISOString];
|
|
6397
|
+
[LocalDate_value];
|
|
6398
|
+
get [Symbol$1.toStringTag]() {
|
|
6399
|
+
return "LocalDate";
|
|
6400
|
+
}
|
|
6401
|
+
valueOf() {
|
|
6402
|
+
return this[LocalDate_value];
|
|
6403
|
+
}
|
|
6404
|
+
toISOString() {
|
|
6405
|
+
return this[LocalDate_ISOString];
|
|
6406
|
+
}
|
|
6407
|
+
constructor(literal) {
|
|
6408
|
+
IS_LOCAL_DATE(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date ${literal}` + where(" at ")));
|
|
6409
|
+
super();
|
|
6410
|
+
this[LocalDate_value] = Value(
|
|
6411
|
+
this[LocalDate_ISOString] = literal
|
|
6412
|
+
);
|
|
6413
|
+
return this;
|
|
6414
|
+
}
|
|
6415
|
+
getFullYear() {
|
|
6416
|
+
return LocalDate_get(this, 0, 4);
|
|
6417
|
+
}
|
|
6418
|
+
setFullYear(value) {
|
|
6419
|
+
LocalDate_set(this, 0, 4, value);
|
|
6420
|
+
}
|
|
6421
|
+
getMonth() {
|
|
6422
|
+
return LocalDate_get(this, 5, 7) - 1;
|
|
6423
|
+
}
|
|
6424
|
+
setMonth(value) {
|
|
6425
|
+
LocalDate_set(this, 5, 7, value + 1);
|
|
6426
|
+
}
|
|
6427
|
+
getDate() {
|
|
6428
|
+
return LocalDate_get(this, 8, 10);
|
|
6429
|
+
}
|
|
6430
|
+
setDate(value) {
|
|
6431
|
+
LocalDate_set(this, 8, 10, value);
|
|
6432
|
+
}
|
|
6433
|
+
});
|
|
6434
|
+
var LocalTime_ISOString = Symbol$1("LocalTime_ISOString");
|
|
6435
|
+
var LocalTime_value = Symbol$1("LocalTime_value");
|
|
6436
|
+
var LocalTime_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalTime_ISOString].slice(start, end), "LocalTime_get");
|
|
6437
|
+
var LocalTime_set = /* @__PURE__ */ __name((that, start, end, value) => {
|
|
6438
|
+
const string = "" + value;
|
|
6439
|
+
const size = end - start;
|
|
6440
|
+
if (string.length > size) {
|
|
6441
|
+
throw RangeError$1();
|
|
6442
|
+
}
|
|
6443
|
+
that[LocalTime_value] = Value(
|
|
6444
|
+
that[LocalTime_ISOString] = that[LocalTime_ISOString].slice(0, start) + string.padStart(2, "0") + that[LocalTime_ISOString].slice(end)
|
|
6445
|
+
);
|
|
6446
|
+
}, "LocalTime_set");
|
|
6447
|
+
var LocalTime = /* @__PURE__ */ fpc(class LocalTime2 extends Datetime {
|
|
6448
|
+
static {
|
|
6449
|
+
__name(this, "LocalTime");
|
|
6450
|
+
}
|
|
6451
|
+
[LocalTime_ISOString];
|
|
6452
|
+
[LocalTime_value];
|
|
6453
|
+
get [Symbol$1.toStringTag]() {
|
|
6454
|
+
return "LocalTime";
|
|
6455
|
+
}
|
|
6456
|
+
valueOf() {
|
|
6457
|
+
return this[LocalTime_value];
|
|
6458
|
+
}
|
|
6459
|
+
toISOString() {
|
|
6460
|
+
return this[LocalTime_ISOString];
|
|
6461
|
+
}
|
|
6462
|
+
constructor(literal) {
|
|
6463
|
+
IS_LOCAL_TIME(literal) || throws(SyntaxError$1(`Invalid Local Time ${literal}` + where(" at ")));
|
|
6464
|
+
super();
|
|
6465
|
+
this[LocalTime_value] = Value(
|
|
6466
|
+
this[LocalTime_ISOString] = literal
|
|
6467
|
+
);
|
|
6468
|
+
return this;
|
|
6469
|
+
}
|
|
6470
|
+
getHours() {
|
|
6471
|
+
return LocalTime_get(this, 0, 2);
|
|
6472
|
+
}
|
|
6473
|
+
setHours(value) {
|
|
6474
|
+
LocalTime_set(this, 0, 2, value);
|
|
6475
|
+
}
|
|
6476
|
+
getMinutes() {
|
|
6477
|
+
return LocalTime_get(this, 3, 5);
|
|
6478
|
+
}
|
|
6479
|
+
setMinutes(value) {
|
|
6480
|
+
LocalTime_set(this, 3, 5, value);
|
|
6481
|
+
}
|
|
6482
|
+
getSeconds() {
|
|
6483
|
+
return LocalTime_get(this, 6, 8);
|
|
6484
|
+
}
|
|
6485
|
+
setSeconds(value) {
|
|
6486
|
+
LocalTime_set(this, 6, 8, value);
|
|
6487
|
+
}
|
|
6488
|
+
getMilliseconds() {
|
|
6489
|
+
return +this[LocalTime_value].slice(6, 9).padEnd(3, "0");
|
|
6490
|
+
}
|
|
6491
|
+
///
|
|
6492
|
+
setMilliseconds(value) {
|
|
6493
|
+
this[LocalTime_value] = Value(
|
|
6494
|
+
this[LocalTime_ISOString] = this[LocalTime_ISOString].slice(0, 8) + (value ? ("." + ("" + value).padStart(3, "0")).replace(DOT_ZERO, "") : "")
|
|
6495
|
+
);
|
|
6496
|
+
}
|
|
6497
|
+
});
|
|
6498
|
+
var fromCodePoint = String.fromCodePoint;
|
|
6499
|
+
var INTEGER_D = /[-+]?(?:0|[1-9][_\d]*)/;
|
|
6500
|
+
var { test: BAD_D } = /* @__PURE__ */ newRegExp`_(?!\d)`.valueOf();
|
|
6501
|
+
var { test: IS_D_INTEGER } = /* @__PURE__ */ newRegExp`^${INTEGER_D}$`.valueOf();
|
|
6502
|
+
var { test: IS_XOB_INTEGER } = theRegExp(/^0(?:x[\dA-Fa-f][_\dA-Fa-f]*|o[0-7][_0-7]*|b[01][_01]*)$/);
|
|
6503
|
+
var { test: BAD_XOB } = /* @__PURE__ */ newRegExp`_(?![\dA-Fa-f])`.valueOf();
|
|
6504
|
+
var MIN = BigInt$1 && -/* @__PURE__ */ BigInt$1("0x8000000000000000");
|
|
6505
|
+
var NaN$1 = 0 / 0;
|
|
6506
|
+
var _NaN = -NaN$1;
|
|
6507
|
+
var _Infinity$1 = -Infinity2;
|
|
6508
|
+
var { test: IS_FLOAT } = /* @__PURE__ */ newRegExp`
|
|
6509
|
+
^
|
|
6510
|
+
${INTEGER_D}
|
|
6511
|
+
(?:
|
|
6512
|
+
\.\d[_\d]*
|
|
6513
|
+
(?:[eE][-+]?\d[_\d]*)?
|
|
6514
|
+
|
|
|
6515
|
+
[eE][-+]?\d[_\d]*
|
|
6516
|
+
)
|
|
6517
|
+
$`.valueOf();
|
|
6518
|
+
var { test: IS_ZERO } = theRegExp(/^[-+]?0(?:\.0+)?(?:[eE][-+]?0+)?$/);
|
|
6519
|
+
var { exec: NORMALIZED } = theRegExp(/^[-0]?(\d*)(?:\.(\d+))?(?:e\+?(-?\d+))?$/);
|
|
6520
|
+
var { exec: ORIGINAL } = theRegExp(/^[-+]?0?(\d*)(?:\.(\d*?)0*)?(?:[eE]\+?(-?\d+))?$/);
|
|
6521
|
+
var KEYS = /* @__PURE__ */ Null$1(null);
|
|
6522
|
+
var commentForThis = Symbol$1("this");
|
|
6523
|
+
var { test: includesNewline } = theRegExp(/\r?\n/g);
|
|
6524
|
+
var getCOMMENT = /* @__PURE__ */ __name((table, keyComment) => {
|
|
6525
|
+
if (keyComment in table) {
|
|
6526
|
+
const comment = table[keyComment];
|
|
6527
|
+
if (typeof comment !== "string") {
|
|
6528
|
+
throw TypeError$1(`the value of comment must be a string, while "${comment === null ? "null" : typeof comment}" type is found`);
|
|
6529
|
+
}
|
|
6530
|
+
if (includesNewline(comment)) {
|
|
6531
|
+
throw SyntaxError$1(`the value of comment must be a string and can not include newline`);
|
|
6532
|
+
}
|
|
6533
|
+
return ` #${comment}`;
|
|
6534
|
+
}
|
|
6535
|
+
return "";
|
|
6536
|
+
}, "getCOMMENT");
|
|
6537
|
+
var getComment = /* @__PURE__ */ __name((table, key) => key in KEYS ? getCOMMENT(table, KEYS[key]) : "", "getComment");
|
|
6538
|
+
var { test: IS_OFFSET$ } = theRegExp(OFFSET$);
|
|
6539
|
+
var { test: IS_EMPTY } = theRegExp(/^\[[\t ]*]/);
|
|
6540
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
|
|
6541
|
+
var DATE = Date.prototype;
|
|
6542
|
+
var valueOf$2 = String.prototype.valueOf;
|
|
6543
|
+
var isString = (
|
|
6544
|
+
/* j-globals: class.isString (internal) */
|
|
6545
|
+
/* @__PURE__ */ function() {
|
|
6546
|
+
if (apply.bind) {
|
|
6547
|
+
var valueOf_apply = apply.bind(valueOf$2);
|
|
6548
|
+
return /* @__PURE__ */ __name(function isString4(value) {
|
|
6549
|
+
try {
|
|
6550
|
+
valueOf_apply(value);
|
|
6551
|
+
} catch (error) {
|
|
6552
|
+
return false;
|
|
6553
|
+
}
|
|
6554
|
+
return true;
|
|
6555
|
+
}, "isString");
|
|
6556
|
+
}
|
|
6557
|
+
return /* @__PURE__ */ __name(function isString4(value) {
|
|
6558
|
+
try {
|
|
6559
|
+
valueOf$2.apply(value);
|
|
6560
|
+
} catch (error) {
|
|
6561
|
+
return false;
|
|
6562
|
+
}
|
|
6563
|
+
return true;
|
|
6564
|
+
}, "isString");
|
|
6565
|
+
}()
|
|
6566
|
+
);
|
|
6567
|
+
var valueOf$1 = Number.prototype.valueOf;
|
|
6568
|
+
var isNumber = (
|
|
6569
|
+
/* j-globals: class.isNumber (internal) */
|
|
6570
|
+
/* @__PURE__ */ function() {
|
|
6571
|
+
if (apply.bind) {
|
|
6572
|
+
var valueOf_apply = apply.bind(valueOf$1);
|
|
6573
|
+
return /* @__PURE__ */ __name(function isNumber4(value) {
|
|
6574
|
+
try {
|
|
6575
|
+
valueOf_apply(value);
|
|
6576
|
+
} catch (error) {
|
|
6577
|
+
return false;
|
|
6578
|
+
}
|
|
6579
|
+
return true;
|
|
6580
|
+
}, "isNumber");
|
|
6581
|
+
}
|
|
6582
|
+
return /* @__PURE__ */ __name(function isNumber4(value) {
|
|
6583
|
+
try {
|
|
6584
|
+
valueOf$1.apply(value);
|
|
6585
|
+
} catch (error) {
|
|
6586
|
+
return false;
|
|
6587
|
+
}
|
|
6588
|
+
return true;
|
|
6589
|
+
}, "isNumber");
|
|
6590
|
+
}()
|
|
6591
|
+
);
|
|
6592
|
+
var isBigInt = (
|
|
6593
|
+
/* j-globals: class.isBigInt (internal) */
|
|
6594
|
+
/* @__PURE__ */ function() {
|
|
6595
|
+
if (typeof BigInt === "function") {
|
|
6596
|
+
var valueOf_apply = apply.bind(BigInt.prototype.valueOf);
|
|
6597
|
+
return /* @__PURE__ */ __name(function isBigInt2(value) {
|
|
6598
|
+
try {
|
|
6599
|
+
valueOf_apply(value);
|
|
6600
|
+
} catch (error) {
|
|
6601
|
+
return false;
|
|
6602
|
+
}
|
|
6603
|
+
return true;
|
|
6604
|
+
}, "isBigInt");
|
|
6605
|
+
}
|
|
6606
|
+
return /* @__PURE__ */ __name(function isBigInt2() {
|
|
6607
|
+
return false;
|
|
6608
|
+
}, "isBigInt");
|
|
6609
|
+
}()
|
|
6610
|
+
);
|
|
6611
|
+
var valueOf = BigInt.prototype.valueOf;
|
|
6612
|
+
var isBoolean = (
|
|
6613
|
+
/* j-globals: class.isBoolean (internal) */
|
|
6614
|
+
/* @__PURE__ */ function() {
|
|
6615
|
+
if (apply.bind) {
|
|
6616
|
+
var valueOf_apply = apply.bind(valueOf);
|
|
6617
|
+
return /* @__PURE__ */ __name(function isBoolean3(value) {
|
|
6618
|
+
try {
|
|
6619
|
+
valueOf_apply(value);
|
|
6620
|
+
} catch (error) {
|
|
6621
|
+
return false;
|
|
6622
|
+
}
|
|
6623
|
+
return true;
|
|
6624
|
+
}, "isBoolean");
|
|
6625
|
+
}
|
|
6626
|
+
return /* @__PURE__ */ __name(function isBoolean3(value) {
|
|
6627
|
+
try {
|
|
6628
|
+
valueOf.apply(value);
|
|
6629
|
+
} catch (error) {
|
|
6630
|
+
return false;
|
|
6631
|
+
}
|
|
6632
|
+
return true;
|
|
6633
|
+
}, "isBoolean");
|
|
6634
|
+
}()
|
|
6635
|
+
);
|
|
6636
|
+
var ESCAPED = /* @__PURE__ */ Null$1({
|
|
6637
|
+
.../* @__PURE__ */ fromEntries(/* @__PURE__ */ [...Array$1(32)].map((_, charCode) => [fromCharCode(charCode), "\\u" + charCode.toString(16).toUpperCase().padStart(4, "0")])),
|
|
6638
|
+
"\b": "\\b",
|
|
6639
|
+
" ": "\\t",
|
|
6640
|
+
"\n": "\\n",
|
|
6641
|
+
"\f": "\\f",
|
|
6642
|
+
"\r": "\\r",
|
|
6643
|
+
'"': '\\"',
|
|
6644
|
+
'"""': '""\\"',
|
|
6645
|
+
"\\": "\\\\",
|
|
6646
|
+
"\x7F": "\\u007F"
|
|
6647
|
+
});
|
|
6648
|
+
var { test: NEED_BASIC } = theRegExp(/[\x00-\x08\x0A-\x1F'\x7F]/);
|
|
6649
|
+
var BY_ESCAPE = /[^\x00-\x08\x0A-\x1F"\\\x7F]+|./gs;
|
|
6650
|
+
var { test: NEED_ESCAPE } = theRegExp(/^[\x00-\x08\x0A-\x1F"\\\x7F]/);
|
|
6651
|
+
var singlelineString = /* @__PURE__ */ __name((value) => {
|
|
6652
|
+
if (NEED_BASIC(value)) {
|
|
6653
|
+
const parts = value.match(BY_ESCAPE);
|
|
6654
|
+
let index = parts.length;
|
|
6655
|
+
do {
|
|
6656
|
+
if (NEED_ESCAPE(parts[--index])) {
|
|
6657
|
+
parts[index] = ESCAPED[parts[index]];
|
|
6658
|
+
}
|
|
6659
|
+
} while (index);
|
|
6660
|
+
return `"${parts.join("")}"`;
|
|
6661
|
+
}
|
|
6662
|
+
return `'${value}'`;
|
|
6663
|
+
}, "singlelineString");
|
|
6664
|
+
var { test: NEED_MULTILINE_BASIC } = theRegExp(/[\x00-\x08\x0A-\x1F\x7F]|'''/);
|
|
6665
|
+
var { test: multilineNeedBasic } = theRegExp(/[\x00-\x08\x0B-\x1F\x7F]|'''/);
|
|
6666
|
+
var { test: REAL_MULTILINE_ESCAPE } = theRegExp(/[\x00-\x08\x0A-\x1F\\\x7F]|"""/);
|
|
6667
|
+
var { test: NEED_MULTILINE_ESCAPE } = theRegExp(/^(?:[\x00-\x08\x0A-\x1F\\\x7F]|""")/);
|
|
6668
|
+
var Float64Array$1 = Float64Array;
|
|
6669
|
+
var Uint8Array$1 = Uint8Array;
|
|
6670
|
+
var _Infinity = -Infinity2;
|
|
6671
|
+
var { test: INTEGER_LIKE } = theRegExp(/^-?\d+$/);
|
|
6672
|
+
var ensureFloat = /* @__PURE__ */ __name((literal) => INTEGER_LIKE(literal) ? literal + ".0" : literal, "ensureFloat");
|
|
6673
|
+
var float64Array = new Float64Array$1([NaN$1]);
|
|
6674
|
+
var uint8Array = new Uint8Array$1(float64Array.buffer);
|
|
6675
|
+
var NaN_7 = uint8Array[7];
|
|
6676
|
+
var float = NaN_7 === new Uint8Array$1(new Float64Array$1([-NaN$1]).buffer)[7] ? (value) => value ? value === Infinity2 ? "inf" : value === _Infinity ? "-inf" : ensureFloat("" + value) : value === value ? is(value, 0) ? "0.0" : "-0.0" : "nan" : (value) => value ? value === Infinity2 ? "inf" : value === _Infinity ? "-inf" : ensureFloat("" + value) : value === value ? is(value, 0) ? "0.0" : "-0.0" : (float64Array[0] = value, uint8Array[7]) === NaN_7 ? "nan" : "-nan";
|
|
6677
|
+
var isDate = /* @__PURE__ */ isPrototypeOf.bind(DATE);
|
|
6678
|
+
var { test: BARE } = theRegExp(/^[\w-]+$/);
|
|
6679
|
+
var $Key$ = /* @__PURE__ */ __name((key) => BARE(key) ? key : singlelineString(key), "$Key$");
|
|
6680
|
+
var FIRST = /[^.]+/;
|
|
6681
|
+
var literalString = /* @__PURE__ */ __name((value) => `'${value}'`, "literalString");
|
|
6682
|
+
var $Keys = /* @__PURE__ */ __name((keys2) => isAmazing(keys2) ? keys2.replace(FIRST, literalString) : keys2 === "null" ? `'null'` : keys2, "$Keys");
|
|
6683
|
+
var TOMLSection = class extends Array$1 {
|
|
6684
|
+
static {
|
|
6685
|
+
__name(this, "TOMLSection");
|
|
6686
|
+
}
|
|
6687
|
+
document;
|
|
6688
|
+
constructor(document) {
|
|
6689
|
+
super();
|
|
6690
|
+
this.document = document;
|
|
6691
|
+
return this;
|
|
6692
|
+
}
|
|
6693
|
+
[Symbol$1.toPrimitive]() {
|
|
6694
|
+
return this.join(this.document.newline);
|
|
6695
|
+
}
|
|
6696
|
+
appendNewline() {
|
|
6697
|
+
this[this.length] = "";
|
|
6698
|
+
}
|
|
6699
|
+
set appendLine(source) {
|
|
6700
|
+
this[this.length] = source;
|
|
6701
|
+
}
|
|
6702
|
+
set appendInline(source) {
|
|
6703
|
+
this[this.length - 1] += source;
|
|
6704
|
+
}
|
|
6705
|
+
set appendInlineIf(source) {
|
|
6706
|
+
source && (this[this.length - 1] += source);
|
|
6707
|
+
}
|
|
6708
|
+
///
|
|
6709
|
+
*assignBlock(documentKeys_, sectionKeys_, table, tableKeys) {
|
|
6710
|
+
const { document } = this;
|
|
6711
|
+
const { newlineUnderHeader, newlineUnderSectionButPair } = document;
|
|
6712
|
+
const newlineAfterDotted = sectionKeys_ ? document.newlineUnderPairButDotted : false;
|
|
6713
|
+
const newlineAfterPair = sectionKeys_ ? document.newlineUnderDotted : document.newlineUnderPair;
|
|
6714
|
+
for (const tableKey of tableKeys) {
|
|
6715
|
+
const value = table[tableKey];
|
|
6716
|
+
const $key$ = $Key$(tableKey);
|
|
6717
|
+
const documentKeys = documentKeys_ + $key$;
|
|
6718
|
+
if (isArray$1(value)) {
|
|
6719
|
+
const { length } = value;
|
|
6720
|
+
if (length) {
|
|
6721
|
+
let firstItem = value[0];
|
|
6722
|
+
if (isSection(firstItem)) {
|
|
6723
|
+
const tableHeader = `[[${documentKeys}]]`;
|
|
6724
|
+
const documentKeys_2 = documentKeys + ".";
|
|
6725
|
+
let index = 0;
|
|
6726
|
+
let table2 = firstItem;
|
|
6727
|
+
for (; ; ) {
|
|
6728
|
+
const section = document.appendSection();
|
|
6729
|
+
section[0] = tableHeader + getCOMMENT(table2, commentForThis);
|
|
6730
|
+
if (newlineUnderHeader) {
|
|
6731
|
+
section[1] = "";
|
|
6732
|
+
yield section.assignBlock(documentKeys_2, ``, table2, getOwnPropertyNames(table2));
|
|
6733
|
+
newlineUnderSectionButPair && section.length !== 2 && section.appendNewline();
|
|
6734
|
+
} else {
|
|
6735
|
+
yield section.assignBlock(documentKeys_2, ``, table2, getOwnPropertyNames(table2));
|
|
6736
|
+
newlineUnderSectionButPair && section.appendNewline();
|
|
6737
|
+
}
|
|
6738
|
+
if (++index === length) {
|
|
6739
|
+
break;
|
|
6740
|
+
}
|
|
6741
|
+
table2 = value[index];
|
|
6742
|
+
if (!isSection(table2)) {
|
|
6743
|
+
throw TypeError$1(`the first table item marked by Section() means the parent array is an array of tables, which can not include other types or table not marked by Section() any more in the rest items`);
|
|
6744
|
+
}
|
|
6745
|
+
}
|
|
6746
|
+
continue;
|
|
6747
|
+
} else {
|
|
6748
|
+
let index = 1;
|
|
6749
|
+
while (index !== length) {
|
|
6750
|
+
if (isSection(value[index++])) {
|
|
6751
|
+
throw TypeError$1(`if an array is not array of tables, it can not include any table that marked by Section()`);
|
|
6752
|
+
}
|
|
6753
|
+
}
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6756
|
+
} else {
|
|
6757
|
+
if (isSection(value)) {
|
|
6758
|
+
const section = document.appendSection();
|
|
6759
|
+
section[0] = `[${documentKeys}]${document.preferCommentForThis ? getCOMMENT(value, commentForThis) || getComment(table, tableKey) : getComment(table, tableKey) || getCOMMENT(value, commentForThis)}`;
|
|
6760
|
+
if (newlineUnderHeader) {
|
|
6761
|
+
section[1] = "";
|
|
6762
|
+
yield section.assignBlock(documentKeys + ".", ``, value, getOwnPropertyNames(value));
|
|
6763
|
+
newlineUnderSectionButPair && section.length !== 2 && section.appendNewline();
|
|
6764
|
+
} else {
|
|
6765
|
+
yield section.assignBlock(documentKeys + ".", ``, value, getOwnPropertyNames(value));
|
|
6766
|
+
newlineUnderSectionButPair && section.appendNewline();
|
|
6767
|
+
}
|
|
6768
|
+
continue;
|
|
6769
|
+
}
|
|
6770
|
+
}
|
|
6771
|
+
const sectionKeys = sectionKeys_ + $key$;
|
|
6772
|
+
this.appendLine = $Keys(sectionKeys) + " = ";
|
|
6773
|
+
const valueKeysIfValueIsDottedTable = this.value("", value, true);
|
|
6774
|
+
if (valueKeysIfValueIsDottedTable) {
|
|
6775
|
+
--this.length;
|
|
6776
|
+
yield this.assignBlock(documentKeys + ".", sectionKeys + ".", value, valueKeysIfValueIsDottedTable);
|
|
6777
|
+
newlineAfterDotted && this.appendNewline();
|
|
6778
|
+
} else {
|
|
6779
|
+
this.appendInlineIf = getComment(table, tableKey);
|
|
6780
|
+
newlineAfterPair && this.appendNewline();
|
|
6781
|
+
}
|
|
6782
|
+
}
|
|
6783
|
+
}
|
|
6784
|
+
value(indent, value, returnValueKeysIfValueIsDottedTable) {
|
|
6785
|
+
switch (typeof value) {
|
|
6786
|
+
case "object":
|
|
6787
|
+
if (value === null) {
|
|
6788
|
+
if (this.document.nullDisabled) {
|
|
6789
|
+
throw TypeError$1(`toml can not stringify "null" type value without truthy options.xNull`);
|
|
6790
|
+
}
|
|
6791
|
+
this.appendInline = "null";
|
|
6792
|
+
break;
|
|
6793
|
+
}
|
|
6794
|
+
const inlineMode = ofInline(value);
|
|
6795
|
+
if (isArray$1(value)) {
|
|
6796
|
+
if (inlineMode === undefined$1) {
|
|
6797
|
+
this.staticArray(indent, value);
|
|
6798
|
+
} else {
|
|
6799
|
+
const { $singlelineArray = inlineMode } = this.document;
|
|
6800
|
+
this.singlelineArray(indent, value, $singlelineArray);
|
|
6801
|
+
}
|
|
6802
|
+
break;
|
|
6803
|
+
}
|
|
6804
|
+
if (inlineMode !== undefined$1) {
|
|
6805
|
+
inlineMode || this.document.multilineTableDisabled ? this.inlineTable(indent, value) : this.multilineTable(indent, value, this.document.multilineTableComma);
|
|
6806
|
+
break;
|
|
6807
|
+
}
|
|
6808
|
+
if (isDate(value)) {
|
|
6809
|
+
this.appendInline = value.toISOString().replace("T", this.document.T).replace("Z", this.document.Z);
|
|
6810
|
+
break;
|
|
6811
|
+
}
|
|
6812
|
+
if (_literal in value) {
|
|
6813
|
+
const literal = value[_literal];
|
|
6814
|
+
if (typeof literal === "string") {
|
|
6815
|
+
this.appendInline = literal;
|
|
6816
|
+
} else if (isArray$1(literal)) {
|
|
6817
|
+
const { length } = literal;
|
|
6818
|
+
if (length) {
|
|
6819
|
+
this.appendInline = literal[0];
|
|
6820
|
+
let index = 1;
|
|
6821
|
+
while (index !== length) {
|
|
6822
|
+
this.appendLine = literal[index++];
|
|
6823
|
+
}
|
|
6824
|
+
} else {
|
|
6825
|
+
throw TypeError$1(`literal value is broken`);
|
|
6826
|
+
}
|
|
6827
|
+
} else {
|
|
6828
|
+
throw TypeError$1(`literal value is broken`);
|
|
6829
|
+
}
|
|
6830
|
+
break;
|
|
6831
|
+
}
|
|
6832
|
+
if (isString(value)) {
|
|
6833
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object String]`);
|
|
6834
|
+
}
|
|
6835
|
+
if (isNumber(value)) {
|
|
6836
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object Number]`);
|
|
6837
|
+
}
|
|
6838
|
+
if (isBigInt(value)) {
|
|
6839
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object BigInt]`);
|
|
6840
|
+
}
|
|
6841
|
+
if (isBoolean(value)) {
|
|
6842
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object Boolean]`);
|
|
6843
|
+
}
|
|
6844
|
+
if (returnValueKeysIfValueIsDottedTable) {
|
|
6845
|
+
const keys2 = getOwnPropertyNames(value);
|
|
6846
|
+
if (keys2.length) {
|
|
6847
|
+
return keys2;
|
|
6848
|
+
}
|
|
6849
|
+
this.appendInline = "{ }";
|
|
6850
|
+
} else {
|
|
6851
|
+
this.inlineTable(indent, value);
|
|
6852
|
+
}
|
|
6853
|
+
break;
|
|
6854
|
+
case "bigint":
|
|
6855
|
+
this.appendInline = "" + value;
|
|
6856
|
+
break;
|
|
6857
|
+
case "number":
|
|
6858
|
+
this.appendInline = this.document.asInteger(value) ? is(value, -0) ? "-0" : "" + value : float(value);
|
|
6859
|
+
break;
|
|
6860
|
+
case "string":
|
|
6861
|
+
this.appendInline = singlelineString(value);
|
|
6862
|
+
break;
|
|
6863
|
+
case "boolean":
|
|
6864
|
+
this.appendInline = value ? "true" : "false";
|
|
6865
|
+
break;
|
|
6866
|
+
default:
|
|
6867
|
+
throw TypeError$1(`toml can not stringify "${typeof value}" type value`);
|
|
6868
|
+
}
|
|
6869
|
+
return null;
|
|
6870
|
+
}
|
|
6871
|
+
singlelineArray(indent, staticArray, inlineMode) {
|
|
6872
|
+
const { length } = staticArray;
|
|
6873
|
+
if (length) {
|
|
6874
|
+
this.appendInline = inlineMode & 2 ? "[ " : "[";
|
|
6875
|
+
this.value(indent, staticArray[0], false);
|
|
6876
|
+
let index = 1;
|
|
6877
|
+
while (index !== length) {
|
|
6878
|
+
this.appendInline = ", ";
|
|
6879
|
+
this.value(indent, staticArray[index++], false);
|
|
6880
|
+
}
|
|
6881
|
+
this.appendInline = inlineMode & 2 ? " ]" : "]";
|
|
6882
|
+
} else {
|
|
6883
|
+
this.appendInline = inlineMode & 1 ? "[ ]" : "[]";
|
|
6884
|
+
}
|
|
6885
|
+
}
|
|
6886
|
+
staticArray(indent, staticArray) {
|
|
6887
|
+
this.appendInline = "[";
|
|
6888
|
+
const indent_ = indent + this.document.indent;
|
|
6889
|
+
const { length } = staticArray;
|
|
6890
|
+
let index = 0;
|
|
6891
|
+
while (index !== length) {
|
|
6892
|
+
this.appendLine = indent_;
|
|
6893
|
+
this.value(indent_, staticArray[index++], false);
|
|
6894
|
+
this.appendInline = ",";
|
|
6895
|
+
}
|
|
6896
|
+
this.appendLine = indent + "]";
|
|
6897
|
+
}
|
|
6898
|
+
inlineTable(indent, inlineTable) {
|
|
6899
|
+
const keys2 = getOwnPropertyNames(inlineTable);
|
|
6900
|
+
if (keys2.length) {
|
|
6901
|
+
this.appendInline = "{ ";
|
|
6902
|
+
this.assignInline(indent, inlineTable, ``, keys2);
|
|
6903
|
+
this[this.length - 1] = this[this.length - 1].slice(0, -2) + " }";
|
|
6904
|
+
} else {
|
|
6905
|
+
this.appendInline = "{ }";
|
|
6906
|
+
}
|
|
6907
|
+
}
|
|
6908
|
+
multilineTable(indent, inlineTable, comma) {
|
|
6909
|
+
this.appendInline = "{";
|
|
6910
|
+
this.assignMultiline(indent, inlineTable, ``, getOwnPropertyNames(inlineTable), comma);
|
|
6911
|
+
this.appendLine = indent + "}";
|
|
6912
|
+
}
|
|
6913
|
+
assignInline(indent, inlineTable, keys_, keys2) {
|
|
6914
|
+
for (const key of keys2) {
|
|
6915
|
+
const value = inlineTable[key];
|
|
6916
|
+
const keys3 = keys_ + $Key$(key);
|
|
6917
|
+
const before_value = this.appendInline = $Keys(keys3) + " = ";
|
|
6918
|
+
const valueKeysIfValueIsDottedTable = this.value(indent, value, true);
|
|
6919
|
+
if (valueKeysIfValueIsDottedTable) {
|
|
6920
|
+
this[this.length - 1] = this[this.length - 1].slice(0, -before_value.length);
|
|
6921
|
+
this.assignInline(indent, value, keys3 + ".", valueKeysIfValueIsDottedTable);
|
|
6922
|
+
} else {
|
|
6923
|
+
this.appendInline = ", ";
|
|
6924
|
+
}
|
|
6925
|
+
}
|
|
6926
|
+
}
|
|
6927
|
+
assignMultiline(indent, inlineTable, keys_, keys2, comma) {
|
|
6928
|
+
const indent_ = indent + this.document.indent;
|
|
6929
|
+
for (const key of keys2) {
|
|
6930
|
+
const value = inlineTable[key];
|
|
6931
|
+
const keys3 = keys_ + $Key$(key);
|
|
6932
|
+
this.appendLine = indent_ + $Keys(keys3) + " = ";
|
|
6933
|
+
const valueKeysIfValueIsDottedTable = this.value(indent_, value, true);
|
|
6934
|
+
if (valueKeysIfValueIsDottedTable) {
|
|
6935
|
+
--this.length;
|
|
6936
|
+
this.assignMultiline(indent, value, keys3 + ".", valueKeysIfValueIsDottedTable, comma);
|
|
6937
|
+
} else {
|
|
6938
|
+
comma ? this.appendInline = "," + getComment(inlineTable, key) : this.appendInlineIf = getComment(inlineTable, key);
|
|
6939
|
+
}
|
|
6940
|
+
}
|
|
6941
|
+
}
|
|
6942
|
+
};
|
|
6943
|
+
var { test: IS_INDENT } = theRegExp(/^[\t ]*$/);
|
|
6944
|
+
var linesFromStringify = new WeakSet$1();
|
|
6945
|
+
var textDecoder = /* @__PURE__ */ new TextDecoder$1("utf-8", Null$1({ fatal: true, ignoreBOM: false }));
|
|
6946
|
+
var { test: includesNonScalar } = theRegExp(/[\uD800-\uDFFF]/u);
|
|
6947
|
+
|
|
6948
|
+
// ../path/src/get-parent-path.ts
|
|
6949
|
+
init_esm_shims();
|
|
6950
|
+
var resolveParentPath = /* @__PURE__ */ __name((path6, count = 1) => {
|
|
6951
|
+
let parentPath = path6.replaceAll(/\/+$/g, "");
|
|
6952
|
+
for (let i = 0; i < count; i++) {
|
|
6953
|
+
parentPath = joinPaths(parentPath, "..");
|
|
6954
|
+
}
|
|
6955
|
+
return parentPath;
|
|
6956
|
+
}, "resolveParentPath");
|
|
6957
|
+
var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
|
|
6958
|
+
const ignoreCase = options?.ignoreCase ?? true;
|
|
6959
|
+
const skipCwd = options?.skipCwd ?? false;
|
|
6960
|
+
const targetType = options?.targetType ?? "both";
|
|
6961
|
+
let dir = cwd;
|
|
6962
|
+
if (skipCwd) {
|
|
6963
|
+
dir = resolveParentPath(cwd);
|
|
6964
|
+
}
|
|
6965
|
+
let names = Array.isArray(name) ? name : [
|
|
6966
|
+
name
|
|
6967
|
+
];
|
|
6968
|
+
if (ignoreCase) {
|
|
6969
|
+
names = names.map((name2) => name2.toLowerCase());
|
|
6970
|
+
}
|
|
6971
|
+
while (true) {
|
|
6972
|
+
const target = names.find((name2) => isFile(joinPaths(dir, name2)) && (targetType === "file" || targetType === "both") || isDirectory(joinPaths(dir, name2)) && (targetType === "directory" || targetType === "both"));
|
|
6973
|
+
if (target) {
|
|
6974
|
+
return joinPaths(dir, target);
|
|
6975
|
+
}
|
|
6976
|
+
const parentDir = resolveParentPath(dir);
|
|
6977
|
+
if (parentDir === dir) {
|
|
6978
|
+
return void 0;
|
|
6979
|
+
}
|
|
6980
|
+
dir = parentDir;
|
|
6981
|
+
}
|
|
6982
|
+
}, "getParentPath");
|
|
6983
|
+
|
|
6984
|
+
// ../path/src/is-root-dir.ts
|
|
6985
|
+
init_esm_shims();
|
|
6986
|
+
var isSystemRoot = /* @__PURE__ */ __name((dir) => {
|
|
6987
|
+
return Boolean(dir === "/" || dir === "c:\\" || dir === "C:\\");
|
|
6988
|
+
}, "isSystemRoot");
|
|
6989
|
+
|
|
6990
|
+
// ../path/src/get-workspace-root.ts
|
|
6991
|
+
var getWorkspaceRoot = /* @__PURE__ */ __name((dir = process.cwd()) => {
|
|
6992
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
6993
|
+
return process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
6994
|
+
}
|
|
6995
|
+
const root = findWorkspaceRootSafe(dir);
|
|
6996
|
+
if (root) {
|
|
6997
|
+
return root;
|
|
6998
|
+
}
|
|
6999
|
+
let result = getParentPath([
|
|
7000
|
+
"package-lock.json",
|
|
7001
|
+
"yarn.lock",
|
|
7002
|
+
"pnpm-lock.yaml",
|
|
7318
7003
|
"bun.lock",
|
|
7319
7004
|
"nx.json",
|
|
7320
7005
|
"knip.json",
|
|
@@ -7354,67 +7039,28 @@ var getWorkspaceRoot = /* @__PURE__ */ __name((dir = process.cwd()) => {
|
|
|
7354
7039
|
}, "getWorkspaceRoot");
|
|
7355
7040
|
|
|
7356
7041
|
// ../path/src/file-path-fns.ts
|
|
7357
|
-
function findFileName(filePath,
|
|
7042
|
+
function findFileName(filePath, options = {}) {
|
|
7043
|
+
const { requireExtension = false, withExtension = true } = options;
|
|
7358
7044
|
const result = normalizeWindowsPath2(filePath)?.split(filePath?.includes("\\") ? "\\" : "/")?.pop() ?? "";
|
|
7359
7045
|
if (requireExtension === true && !result.includes(".")) {
|
|
7360
7046
|
return EMPTY_STRING;
|
|
7361
7047
|
}
|
|
7362
7048
|
if (withExtension === false && result.includes(".")) {
|
|
7363
|
-
return result.
|
|
7049
|
+
return result.substring(0, result.lastIndexOf(".")) || EMPTY_STRING;
|
|
7364
7050
|
}
|
|
7365
7051
|
return result;
|
|
7366
7052
|
}
|
|
7367
7053
|
__name(findFileName, "findFileName");
|
|
7368
7054
|
function findFilePath(filePath) {
|
|
7369
7055
|
const normalizedPath = normalizeWindowsPath2(filePath);
|
|
7370
|
-
|
|
7056
|
+
const result = normalizedPath.replace(findFileName(normalizedPath, {
|
|
7371
7057
|
requireExtension: true
|
|
7372
7058
|
}), "");
|
|
7059
|
+
return result === "/" ? result : result.replace(/\/$/, "");
|
|
7373
7060
|
}
|
|
7374
7061
|
__name(findFilePath, "findFilePath");
|
|
7375
|
-
function
|
|
7376
|
-
|
|
7377
|
-
let resolvedPath = "";
|
|
7378
|
-
let resolvedAbsolute = false;
|
|
7379
|
-
for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
7380
|
-
const path7 = index >= 0 ? paths[index] : cwd2;
|
|
7381
|
-
if (!path7 || path7.length === 0) {
|
|
7382
|
-
continue;
|
|
7383
|
-
}
|
|
7384
|
-
resolvedPath = joinPaths(path7, resolvedPath);
|
|
7385
|
-
resolvedAbsolute = isAbsolutePath(path7);
|
|
7386
|
-
}
|
|
7387
|
-
resolvedPath = normalizeString2(resolvedPath, !resolvedAbsolute);
|
|
7388
|
-
if (resolvedAbsolute && !isAbsolutePath(resolvedPath)) {
|
|
7389
|
-
return `/${resolvedPath}`;
|
|
7390
|
-
}
|
|
7391
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
7392
|
-
}
|
|
7393
|
-
__name(resolvePath, "resolvePath");
|
|
7394
|
-
function resolvePaths(...paths) {
|
|
7395
|
-
return resolvePath(joinPaths(...paths.map((path6) => normalizeWindowsPath2(path6))));
|
|
7396
|
-
}
|
|
7397
|
-
__name(resolvePaths, "resolvePaths");
|
|
7398
|
-
function relativePath(from, to) {
|
|
7399
|
-
const _from = resolvePath(from).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
|
|
7400
|
-
const _to = resolvePath(to).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
|
|
7401
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7402
|
-
return _to.join("/");
|
|
7403
|
-
}
|
|
7404
|
-
const _fromCopy = [
|
|
7405
|
-
..._from
|
|
7406
|
-
];
|
|
7407
|
-
for (const segment of _fromCopy) {
|
|
7408
|
-
if (_to[0] !== segment) {
|
|
7409
|
-
break;
|
|
7410
|
-
}
|
|
7411
|
-
_from.shift();
|
|
7412
|
-
_to.shift();
|
|
7413
|
-
}
|
|
7414
|
-
return [
|
|
7415
|
-
..._from.map(() => ".."),
|
|
7416
|
-
..._to
|
|
7417
|
-
].join("/");
|
|
7062
|
+
function relativePath(from, to, withEndSlash = false) {
|
|
7063
|
+
return relative(withEndSlash !== true ? from.replace(/\/$/, "") : from, withEndSlash !== true ? to.replace(/\/$/, "") : to);
|
|
7418
7064
|
}
|
|
7419
7065
|
__name(relativePath, "relativePath");
|
|
7420
7066
|
|
|
@@ -7449,46 +7095,200 @@ init_esm_shims();
|
|
|
7449
7095
|
// ../string-format/src/acronyms.ts
|
|
7450
7096
|
init_esm_shims();
|
|
7451
7097
|
var ACRONYMS = [
|
|
7098
|
+
"3D",
|
|
7099
|
+
"4D",
|
|
7100
|
+
"5G",
|
|
7101
|
+
"6G",
|
|
7102
|
+
"7G",
|
|
7103
|
+
"8G",
|
|
7104
|
+
"ACID",
|
|
7105
|
+
"AES",
|
|
7106
|
+
"AI",
|
|
7107
|
+
"AJAX",
|
|
7452
7108
|
"API",
|
|
7109
|
+
"AR",
|
|
7110
|
+
"ASCII",
|
|
7111
|
+
"B2B",
|
|
7112
|
+
"B2C",
|
|
7113
|
+
"BFF",
|
|
7114
|
+
"BI",
|
|
7115
|
+
"BIOS",
|
|
7116
|
+
"BGP",
|
|
7117
|
+
"BOM",
|
|
7118
|
+
"BYOD",
|
|
7119
|
+
"C2C",
|
|
7120
|
+
"CAGR",
|
|
7121
|
+
"CAPTCHA",
|
|
7122
|
+
"CD",
|
|
7123
|
+
"CDN",
|
|
7124
|
+
"CDP",
|
|
7125
|
+
"CI",
|
|
7126
|
+
"CI/CD",
|
|
7127
|
+
"CIAM",
|
|
7128
|
+
"CICD",
|
|
7129
|
+
"CLI",
|
|
7130
|
+
"CMDB",
|
|
7131
|
+
"CORS",
|
|
7453
7132
|
"CPU",
|
|
7133
|
+
"CRUD",
|
|
7134
|
+
"CSR",
|
|
7454
7135
|
"CSS",
|
|
7136
|
+
"CX",
|
|
7137
|
+
"DAG",
|
|
7138
|
+
"DBMS",
|
|
7139
|
+
"DDoS",
|
|
7455
7140
|
"DNS",
|
|
7141
|
+
"DNSSEC",
|
|
7142
|
+
"DOM",
|
|
7143
|
+
"DR",
|
|
7144
|
+
"DRM",
|
|
7145
|
+
"DWH",
|
|
7146
|
+
"E2E",
|
|
7147
|
+
"EAI",
|
|
7148
|
+
"EKS",
|
|
7456
7149
|
"EOF",
|
|
7150
|
+
"EOD",
|
|
7151
|
+
"ETC",
|
|
7152
|
+
"ETL",
|
|
7153
|
+
"EULA",
|
|
7154
|
+
"FIDO",
|
|
7155
|
+
"FQDN",
|
|
7156
|
+
"FTP",
|
|
7157
|
+
"FaaS",
|
|
7158
|
+
"GDPR",
|
|
7159
|
+
"GCP",
|
|
7160
|
+
"GPU",
|
|
7457
7161
|
"GUID",
|
|
7162
|
+
"GUI",
|
|
7163
|
+
"GZIP",
|
|
7164
|
+
"HCI",
|
|
7165
|
+
"HDD",
|
|
7166
|
+
"HDFS",
|
|
7167
|
+
"HIPAA",
|
|
7168
|
+
"HMAC",
|
|
7169
|
+
"HOTP",
|
|
7170
|
+
"HSM",
|
|
7458
7171
|
"HTML",
|
|
7459
7172
|
"HTTP",
|
|
7173
|
+
"HTTP/2",
|
|
7174
|
+
"HTTP/2.0",
|
|
7175
|
+
"HTTP/3",
|
|
7176
|
+
"HTTP/3.0",
|
|
7177
|
+
"HTTP2",
|
|
7460
7178
|
"HTTPS",
|
|
7179
|
+
"HTTPS/2",
|
|
7180
|
+
"HTTPS/3",
|
|
7181
|
+
"HTTPS3",
|
|
7182
|
+
"IAM",
|
|
7183
|
+
"IAMM",
|
|
7184
|
+
"IAMT",
|
|
7185
|
+
"IaaS",
|
|
7461
7186
|
"ID",
|
|
7187
|
+
"IMAP",
|
|
7462
7188
|
"IP",
|
|
7189
|
+
"IPFS",
|
|
7190
|
+
"IoT",
|
|
7463
7191
|
"JSON",
|
|
7192
|
+
"JSONP",
|
|
7193
|
+
"JWT",
|
|
7194
|
+
"K8s",
|
|
7195
|
+
"KMS",
|
|
7196
|
+
"KPI",
|
|
7197
|
+
"LAN",
|
|
7464
7198
|
"LHS",
|
|
7199
|
+
"LXC",
|
|
7200
|
+
"MFA",
|
|
7201
|
+
"ML",
|
|
7202
|
+
"MLOps",
|
|
7203
|
+
"MVC",
|
|
7204
|
+
"MVP",
|
|
7205
|
+
"NAS",
|
|
7206
|
+
"NAT",
|
|
7207
|
+
"NDA",
|
|
7208
|
+
"NFS",
|
|
7209
|
+
"NIST",
|
|
7210
|
+
"NLP",
|
|
7211
|
+
"NPS",
|
|
7212
|
+
"OCR",
|
|
7465
7213
|
"OEM",
|
|
7214
|
+
"OKR",
|
|
7215
|
+
"OLAP",
|
|
7216
|
+
"OLTP",
|
|
7217
|
+
"OOP",
|
|
7218
|
+
"ORM",
|
|
7219
|
+
"OS",
|
|
7220
|
+
"OTP",
|
|
7221
|
+
"P2P",
|
|
7222
|
+
"PDP",
|
|
7223
|
+
"PaaS",
|
|
7224
|
+
"PCI",
|
|
7225
|
+
"PKI",
|
|
7466
7226
|
"PP",
|
|
7227
|
+
"PWA",
|
|
7228
|
+
"PX",
|
|
7467
7229
|
"QA",
|
|
7230
|
+
"RAID",
|
|
7468
7231
|
"RAM",
|
|
7232
|
+
"RDS",
|
|
7233
|
+
"REST",
|
|
7469
7234
|
"RHS",
|
|
7470
7235
|
"RPC",
|
|
7236
|
+
"RPA",
|
|
7237
|
+
"RUM",
|
|
7471
7238
|
"RSS",
|
|
7239
|
+
"SAN",
|
|
7240
|
+
"SASE",
|
|
7241
|
+
"SDLC",
|
|
7242
|
+
"SDK",
|
|
7243
|
+
"SEO",
|
|
7244
|
+
"SFTP",
|
|
7245
|
+
"SIEM",
|
|
7472
7246
|
"SLA",
|
|
7247
|
+
"SMB",
|
|
7473
7248
|
"SMTP",
|
|
7249
|
+
"SOAP",
|
|
7250
|
+
"SOC",
|
|
7251
|
+
"SOA",
|
|
7252
|
+
"SPDY",
|
|
7253
|
+
"SPF",
|
|
7474
7254
|
"SQL",
|
|
7255
|
+
"SRV",
|
|
7256
|
+
"SRE",
|
|
7475
7257
|
"SSH",
|
|
7258
|
+
"SSDL",
|
|
7259
|
+
"SSO",
|
|
7476
7260
|
"SSL",
|
|
7477
|
-
"
|
|
7261
|
+
"SSR",
|
|
7262
|
+
"TDD",
|
|
7263
|
+
"TLD",
|
|
7478
7264
|
"TLS",
|
|
7265
|
+
"TLS1.3",
|
|
7266
|
+
"TOTP",
|
|
7479
7267
|
"TRPC",
|
|
7480
7268
|
"TTL",
|
|
7481
7269
|
"UDP",
|
|
7482
7270
|
"UI",
|
|
7483
7271
|
"UID",
|
|
7484
|
-
"UUID",
|
|
7485
7272
|
"URI",
|
|
7486
7273
|
"URL",
|
|
7487
7274
|
"UTF",
|
|
7275
|
+
"UUID",
|
|
7276
|
+
"UX",
|
|
7488
7277
|
"VM",
|
|
7278
|
+
"VLAN",
|
|
7279
|
+
"VPN",
|
|
7280
|
+
"VR",
|
|
7281
|
+
"WAF",
|
|
7282
|
+
"WAN",
|
|
7283
|
+
"WLAN",
|
|
7284
|
+
"WPA",
|
|
7285
|
+
"XACML",
|
|
7489
7286
|
"XML",
|
|
7287
|
+
"XSRF",
|
|
7490
7288
|
"XSS",
|
|
7491
|
-
"
|
|
7289
|
+
"XR",
|
|
7290
|
+
"YAML",
|
|
7291
|
+
"ZTA"
|
|
7492
7292
|
];
|
|
7493
7293
|
|
|
7494
7294
|
// ../string-format/src/upper-case-first.ts
|
|
@@ -7503,20 +7303,16 @@ function titleCase(input) {
|
|
|
7503
7303
|
if (!input) {
|
|
7504
7304
|
return input;
|
|
7505
7305
|
}
|
|
7506
|
-
|
|
7306
|
+
const formatSegment = /* @__PURE__ */ __name((segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word) => {
|
|
7307
|
+
if (ACRONYMS.includes(word.toUpperCase())) {
|
|
7308
|
+
return word.toUpperCase();
|
|
7309
|
+
}
|
|
7310
|
+
return `${upperCaseFirst(word.toLowerCase())}`;
|
|
7311
|
+
}).join(" "), "formatSegment");
|
|
7312
|
+
return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
|
|
7507
7313
|
}
|
|
7508
7314
|
__name(titleCase, "titleCase");
|
|
7509
7315
|
|
|
7510
|
-
// ../type-checks/src/is-string.ts
|
|
7511
|
-
init_esm_shims();
|
|
7512
|
-
var isString = /* @__PURE__ */ __name((value) => {
|
|
7513
|
-
try {
|
|
7514
|
-
return typeof value === "string";
|
|
7515
|
-
} catch {
|
|
7516
|
-
return false;
|
|
7517
|
-
}
|
|
7518
|
-
}, "isString");
|
|
7519
|
-
|
|
7520
7316
|
// ../env/src/get-env-paths.ts
|
|
7521
7317
|
import os from "node:os";
|
|
7522
7318
|
import path from "node:path";
|
|
@@ -7553,7 +7349,8 @@ var linux = /* @__PURE__ */ __name((orgId) => {
|
|
|
7553
7349
|
cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
|
|
7554
7350
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
7555
7351
|
log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
|
|
7556
|
-
|
|
7352
|
+
// https://devenv.sh/files-and-variables/#devenv_root
|
|
7353
|
+
temp: process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR ? joinPaths(process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR, orgId) : joinPaths(tmpdir, username, orgId)
|
|
7557
7354
|
};
|
|
7558
7355
|
}, "linux");
|
|
7559
7356
|
function getEnvPaths(options = {}) {
|
|
@@ -7562,7 +7359,7 @@ function getEnvPaths(options = {}) {
|
|
|
7562
7359
|
throw new Error("You need to provide an orgId to the `getEnvPaths` function");
|
|
7563
7360
|
}
|
|
7564
7361
|
if (options.suffix) {
|
|
7565
|
-
orgId += `-${
|
|
7362
|
+
orgId += `-${typeof options.suffix === "string" ? options.suffix : "nodejs"}`;
|
|
7566
7363
|
}
|
|
7567
7364
|
let result = {};
|
|
7568
7365
|
if (process.platform === "darwin") {
|
|
@@ -7572,16 +7369,16 @@ function getEnvPaths(options = {}) {
|
|
|
7572
7369
|
} else {
|
|
7573
7370
|
result = linux(orgId);
|
|
7574
7371
|
}
|
|
7575
|
-
if (process.env.
|
|
7576
|
-
result.data = process.env.
|
|
7577
|
-
} else if (process.env.
|
|
7578
|
-
result.config = process.env.
|
|
7579
|
-
} else if (process.env.
|
|
7580
|
-
result.cache = process.env.
|
|
7581
|
-
} else if (process.env.
|
|
7582
|
-
result.log = process.env.
|
|
7583
|
-
} else if (process.env.
|
|
7584
|
-
result.temp = process.env.
|
|
7372
|
+
if (process.env.STORM_DATA_DIR) {
|
|
7373
|
+
result.data = process.env.STORM_DATA_DIR;
|
|
7374
|
+
} else if (process.env.STORM_CONFIG_DIR) {
|
|
7375
|
+
result.config = process.env.STORM_CONFIG_DIR;
|
|
7376
|
+
} else if (process.env.STORM_CACHE_DIR) {
|
|
7377
|
+
result.cache = process.env.STORM_CACHE_DIR;
|
|
7378
|
+
} else if (process.env.STORM_LOG_DIR) {
|
|
7379
|
+
result.log = process.env.STORM_LOG_DIR;
|
|
7380
|
+
} else if (process.env.STORM_TEMP_DIR) {
|
|
7381
|
+
result.temp = process.env.STORM_TEMP_DIR;
|
|
7585
7382
|
}
|
|
7586
7383
|
if (options.workspaceRoot) {
|
|
7587
7384
|
result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
@@ -8407,7 +8204,7 @@ var getObjectTag = /* @__PURE__ */ __name((value) => {
|
|
|
8407
8204
|
var isObjectLike = /* @__PURE__ */ __name((obj) => {
|
|
8408
8205
|
return typeof obj === "object" && obj !== null;
|
|
8409
8206
|
}, "isObjectLike");
|
|
8410
|
-
var
|
|
8207
|
+
var isPlainObject2 = /* @__PURE__ */ __name((obj) => {
|
|
8411
8208
|
if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") {
|
|
8412
8209
|
return false;
|
|
8413
8210
|
}
|
|
@@ -8424,22 +8221,29 @@ var isPlainObject = /* @__PURE__ */ __name((obj) => {
|
|
|
8424
8221
|
// ../type-checks/src/is-object.ts
|
|
8425
8222
|
var isObject = /* @__PURE__ */ __name((value) => {
|
|
8426
8223
|
try {
|
|
8427
|
-
return typeof value === "object" || Boolean(value) && value?.constructor === Object ||
|
|
8224
|
+
return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject2(value);
|
|
8428
8225
|
} catch {
|
|
8429
8226
|
return false;
|
|
8430
8227
|
}
|
|
8431
8228
|
}, "isObject");
|
|
8432
8229
|
|
|
8433
|
-
// ../
|
|
8434
|
-
|
|
8230
|
+
// ../type-checks/src/is-string.ts
|
|
8231
|
+
init_esm_shims();
|
|
8232
|
+
var isString2 = /* @__PURE__ */ __name((value) => {
|
|
8233
|
+
try {
|
|
8234
|
+
return typeof value === "string";
|
|
8235
|
+
} catch {
|
|
8236
|
+
return false;
|
|
8237
|
+
}
|
|
8238
|
+
}, "isString");
|
|
8435
8239
|
|
|
8436
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8240
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/main.js
|
|
8437
8241
|
init_esm_shims();
|
|
8438
8242
|
|
|
8439
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8243
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/format.js
|
|
8440
8244
|
init_esm_shims();
|
|
8441
8245
|
|
|
8442
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8246
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
8443
8247
|
init_esm_shims();
|
|
8444
8248
|
function createScanner(text, ignoreTrivia = false) {
|
|
8445
8249
|
const len = text.length;
|
|
@@ -8872,41 +8676,10 @@ var CharacterCodes;
|
|
|
8872
8676
|
CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab";
|
|
8873
8677
|
})(CharacterCodes || (CharacterCodes = {}));
|
|
8874
8678
|
|
|
8875
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8876
|
-
init_esm_shims();
|
|
8877
|
-
var cachedSpaces = new Array(20).fill(0).map((_, index) => {
|
|
8878
|
-
return " ".repeat(index);
|
|
8879
|
-
});
|
|
8880
|
-
var maxCachedValues = 200;
|
|
8881
|
-
var cachedBreakLinesWithSpaces = {
|
|
8882
|
-
" ": {
|
|
8883
|
-
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8884
|
-
return "\n" + " ".repeat(index);
|
|
8885
|
-
}),
|
|
8886
|
-
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8887
|
-
return "\r" + " ".repeat(index);
|
|
8888
|
-
}),
|
|
8889
|
-
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8890
|
-
return "\r\n" + " ".repeat(index);
|
|
8891
|
-
})
|
|
8892
|
-
},
|
|
8893
|
-
" ": {
|
|
8894
|
-
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8895
|
-
return "\n" + " ".repeat(index);
|
|
8896
|
-
}),
|
|
8897
|
-
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8898
|
-
return "\r" + " ".repeat(index);
|
|
8899
|
-
}),
|
|
8900
|
-
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8901
|
-
return "\r\n" + " ".repeat(index);
|
|
8902
|
-
})
|
|
8903
|
-
}
|
|
8904
|
-
};
|
|
8905
|
-
|
|
8906
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
8679
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
8907
8680
|
init_esm_shims();
|
|
8908
8681
|
|
|
8909
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8682
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/parser.js
|
|
8910
8683
|
init_esm_shims();
|
|
8911
8684
|
var ParseOptions;
|
|
8912
8685
|
(function(ParseOptions2) {
|
|
@@ -8966,44 +8739,23 @@ __name(parse, "parse");
|
|
|
8966
8739
|
function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
8967
8740
|
const _scanner = createScanner(text, false);
|
|
8968
8741
|
const _jsonPath = [];
|
|
8969
|
-
let suppressedCallbacks = 0;
|
|
8970
8742
|
function toNoArgVisit(visitFunction) {
|
|
8971
|
-
return visitFunction ? () =>
|
|
8743
|
+
return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
|
|
8972
8744
|
}
|
|
8973
8745
|
__name(toNoArgVisit, "toNoArgVisit");
|
|
8746
|
+
function toNoArgVisitWithPath(visitFunction) {
|
|
8747
|
+
return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
|
|
8748
|
+
}
|
|
8749
|
+
__name(toNoArgVisitWithPath, "toNoArgVisitWithPath");
|
|
8974
8750
|
function toOneArgVisit(visitFunction) {
|
|
8975
|
-
return visitFunction ? (arg) =>
|
|
8751
|
+
return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
|
|
8976
8752
|
}
|
|
8977
8753
|
__name(toOneArgVisit, "toOneArgVisit");
|
|
8978
8754
|
function toOneArgVisitWithPath(visitFunction) {
|
|
8979
|
-
return visitFunction ? (arg) =>
|
|
8755
|
+
return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
|
|
8980
8756
|
}
|
|
8981
8757
|
__name(toOneArgVisitWithPath, "toOneArgVisitWithPath");
|
|
8982
|
-
|
|
8983
|
-
return visitFunction ? () => {
|
|
8984
|
-
if (suppressedCallbacks > 0) {
|
|
8985
|
-
suppressedCallbacks++;
|
|
8986
|
-
} else {
|
|
8987
|
-
let cbReturn = visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice());
|
|
8988
|
-
if (cbReturn === false) {
|
|
8989
|
-
suppressedCallbacks = 1;
|
|
8990
|
-
}
|
|
8991
|
-
}
|
|
8992
|
-
} : () => true;
|
|
8993
|
-
}
|
|
8994
|
-
__name(toBeginVisit, "toBeginVisit");
|
|
8995
|
-
function toEndVisit(visitFunction) {
|
|
8996
|
-
return visitFunction ? () => {
|
|
8997
|
-
if (suppressedCallbacks > 0) {
|
|
8998
|
-
suppressedCallbacks--;
|
|
8999
|
-
}
|
|
9000
|
-
if (suppressedCallbacks === 0) {
|
|
9001
|
-
visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter());
|
|
9002
|
-
}
|
|
9003
|
-
} : () => true;
|
|
9004
|
-
}
|
|
9005
|
-
__name(toEndVisit, "toEndVisit");
|
|
9006
|
-
const onObjectBegin = toBeginVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toEndVisit(visitor.onObjectEnd), onArrayBegin = toBeginVisit(visitor.onArrayBegin), onArrayEnd = toEndVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
|
|
8758
|
+
const onObjectBegin = toNoArgVisitWithPath(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisitWithPath(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
|
|
9007
8759
|
const disallowComments = options && options.disallowComments;
|
|
9008
8760
|
const allowTrailingComma = options && options.allowTrailingComma;
|
|
9009
8761
|
function scanNext() {
|
|
@@ -9283,7 +9035,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
9283
9035
|
}
|
|
9284
9036
|
__name(visit, "visit");
|
|
9285
9037
|
|
|
9286
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
9038
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/main.js
|
|
9287
9039
|
var ScanError;
|
|
9288
9040
|
(function(ScanError2) {
|
|
9289
9041
|
ScanError2[ScanError2["None"] = 0] = "None";
|
|
@@ -9373,6 +9125,9 @@ function printParseErrorCode(code) {
|
|
|
9373
9125
|
}
|
|
9374
9126
|
__name(printParseErrorCode, "printParseErrorCode");
|
|
9375
9127
|
|
|
9128
|
+
// ../json/src/storm-json.ts
|
|
9129
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
9130
|
+
|
|
9376
9131
|
// ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.js
|
|
9377
9132
|
init_esm_shims();
|
|
9378
9133
|
|
|
@@ -9498,10 +9253,10 @@ function forEach(record, run) {
|
|
|
9498
9253
|
Object.entries(record).forEach(([key, value]) => run(value, key));
|
|
9499
9254
|
}
|
|
9500
9255
|
__name(forEach, "forEach");
|
|
9501
|
-
function
|
|
9256
|
+
function includes2(arr, value) {
|
|
9502
9257
|
return arr.indexOf(value) !== -1;
|
|
9503
9258
|
}
|
|
9504
|
-
__name(
|
|
9259
|
+
__name(includes2, "includes");
|
|
9505
9260
|
function findArr(record, predicate) {
|
|
9506
9261
|
for (let i = 0; i < record.length; i++) {
|
|
9507
9262
|
const value = record[i];
|
|
@@ -9540,25 +9295,25 @@ init_esm_shims();
|
|
|
9540
9295
|
var getType = /* @__PURE__ */ __name((payload) => Object.prototype.toString.call(payload).slice(8, -1), "getType");
|
|
9541
9296
|
var isUndefined = /* @__PURE__ */ __name((payload) => typeof payload === "undefined", "isUndefined");
|
|
9542
9297
|
var isNull = /* @__PURE__ */ __name((payload) => payload === null, "isNull");
|
|
9543
|
-
var
|
|
9298
|
+
var isPlainObject3 = /* @__PURE__ */ __name((payload) => {
|
|
9544
9299
|
if (typeof payload !== "object" || payload === null) return false;
|
|
9545
9300
|
if (payload === Object.prototype) return false;
|
|
9546
9301
|
if (Object.getPrototypeOf(payload) === null) return true;
|
|
9547
9302
|
return Object.getPrototypeOf(payload) === Object.prototype;
|
|
9548
9303
|
}, "isPlainObject");
|
|
9549
|
-
var isEmptyObject = /* @__PURE__ */ __name((payload) =>
|
|
9304
|
+
var isEmptyObject = /* @__PURE__ */ __name((payload) => isPlainObject3(payload) && Object.keys(payload).length === 0, "isEmptyObject");
|
|
9550
9305
|
var isArray = /* @__PURE__ */ __name((payload) => Array.isArray(payload), "isArray");
|
|
9551
|
-
var
|
|
9552
|
-
var
|
|
9553
|
-
var
|
|
9306
|
+
var isString3 = /* @__PURE__ */ __name((payload) => typeof payload === "string", "isString");
|
|
9307
|
+
var isNumber2 = /* @__PURE__ */ __name((payload) => typeof payload === "number" && !isNaN(payload), "isNumber");
|
|
9308
|
+
var isBoolean2 = /* @__PURE__ */ __name((payload) => typeof payload === "boolean", "isBoolean");
|
|
9554
9309
|
var isRegExp = /* @__PURE__ */ __name((payload) => payload instanceof RegExp, "isRegExp");
|
|
9555
9310
|
var isMap = /* @__PURE__ */ __name((payload) => payload instanceof Map, "isMap");
|
|
9556
9311
|
var isSet = /* @__PURE__ */ __name((payload) => payload instanceof Set, "isSet");
|
|
9557
9312
|
var isSymbol = /* @__PURE__ */ __name((payload) => getType(payload) === "Symbol", "isSymbol");
|
|
9558
|
-
var
|
|
9313
|
+
var isDate2 = /* @__PURE__ */ __name((payload) => payload instanceof Date && !isNaN(payload.valueOf()), "isDate");
|
|
9559
9314
|
var isError = /* @__PURE__ */ __name((payload) => payload instanceof Error, "isError");
|
|
9560
9315
|
var isNaNValue = /* @__PURE__ */ __name((payload) => typeof payload === "number" && isNaN(payload), "isNaNValue");
|
|
9561
|
-
var isPrimitive = /* @__PURE__ */ __name((payload) =>
|
|
9316
|
+
var isPrimitive = /* @__PURE__ */ __name((payload) => isBoolean2(payload) || isNull(payload) || isUndefined(payload) || isNumber2(payload) || isString3(payload) || isSymbol(payload), "isPrimitive");
|
|
9562
9317
|
var isBigint = /* @__PURE__ */ __name((payload) => typeof payload === "bigint", "isBigint");
|
|
9563
9318
|
var isInfinite = /* @__PURE__ */ __name((payload) => payload === Infinity || payload === -Infinity, "isInfinite");
|
|
9564
9319
|
var isTypedArray = /* @__PURE__ */ __name((payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView), "isTypedArray");
|
|
@@ -9612,7 +9367,7 @@ var simpleRules = [
|
|
|
9612
9367
|
console.error("Please add a BigInt polyfill.");
|
|
9613
9368
|
return v;
|
|
9614
9369
|
}),
|
|
9615
|
-
simpleTransformation(
|
|
9370
|
+
simpleTransformation(isDate2, "Date", (v) => v.toISOString(), (v) => new Date(v)),
|
|
9616
9371
|
simpleTransformation(isError, "Error", (v, superJson) => {
|
|
9617
9372
|
const baseError = {
|
|
9618
9373
|
name: v.name,
|
|
@@ -9823,21 +9578,21 @@ var untransformValue = /* @__PURE__ */ __name((json, type, superJson) => {
|
|
|
9823
9578
|
init_esm_shims();
|
|
9824
9579
|
var getNthKey = /* @__PURE__ */ __name((value, n) => {
|
|
9825
9580
|
if (n > value.size) throw new Error("index out of bounds");
|
|
9826
|
-
const
|
|
9581
|
+
const keys2 = value.keys();
|
|
9827
9582
|
while (n > 0) {
|
|
9828
|
-
|
|
9583
|
+
keys2.next();
|
|
9829
9584
|
n--;
|
|
9830
9585
|
}
|
|
9831
|
-
return
|
|
9586
|
+
return keys2.next().value;
|
|
9832
9587
|
}, "getNthKey");
|
|
9833
9588
|
function validatePath(path6) {
|
|
9834
|
-
if (
|
|
9589
|
+
if (includes2(path6, "__proto__")) {
|
|
9835
9590
|
throw new Error("__proto__ is not allowed as a property");
|
|
9836
9591
|
}
|
|
9837
|
-
if (
|
|
9592
|
+
if (includes2(path6, "prototype")) {
|
|
9838
9593
|
throw new Error("prototype is not allowed as a property");
|
|
9839
9594
|
}
|
|
9840
|
-
if (
|
|
9595
|
+
if (includes2(path6, "constructor")) {
|
|
9841
9596
|
throw new Error("constructor is not allowed as a property");
|
|
9842
9597
|
}
|
|
9843
9598
|
}
|
|
@@ -9877,7 +9632,7 @@ var setDeep = /* @__PURE__ */ __name((object, path6, mapper) => {
|
|
|
9877
9632
|
if (isArray(parent)) {
|
|
9878
9633
|
const index = +key;
|
|
9879
9634
|
parent = parent[index];
|
|
9880
|
-
} else if (
|
|
9635
|
+
} else if (isPlainObject3(parent)) {
|
|
9881
9636
|
parent = parent[key];
|
|
9882
9637
|
} else if (isSet(parent)) {
|
|
9883
9638
|
const row = +key;
|
|
@@ -9903,7 +9658,7 @@ var setDeep = /* @__PURE__ */ __name((object, path6, mapper) => {
|
|
|
9903
9658
|
const lastKey = path6[path6.length - 1];
|
|
9904
9659
|
if (isArray(parent)) {
|
|
9905
9660
|
parent[+lastKey] = mapper(parent[+lastKey]);
|
|
9906
|
-
} else if (
|
|
9661
|
+
} else if (isPlainObject3(parent)) {
|
|
9907
9662
|
parent[lastKey] = mapper(parent[lastKey]);
|
|
9908
9663
|
}
|
|
9909
9664
|
if (isSet(parent)) {
|
|
@@ -9968,28 +9723,28 @@ function applyValueAnnotations(plain, annotations, superJson) {
|
|
|
9968
9723
|
}
|
|
9969
9724
|
__name(applyValueAnnotations, "applyValueAnnotations");
|
|
9970
9725
|
function applyReferentialEqualityAnnotations(plain, annotations) {
|
|
9971
|
-
function
|
|
9726
|
+
function apply2(identicalPaths, path6) {
|
|
9972
9727
|
const object = getDeep(plain, parsePath(path6));
|
|
9973
9728
|
identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
|
|
9974
9729
|
plain = setDeep(plain, identicalObjectPath, () => object);
|
|
9975
9730
|
});
|
|
9976
9731
|
}
|
|
9977
|
-
__name(
|
|
9732
|
+
__name(apply2, "apply");
|
|
9978
9733
|
if (isArray(annotations)) {
|
|
9979
9734
|
const [root, other] = annotations;
|
|
9980
9735
|
root.forEach((identicalPath) => {
|
|
9981
9736
|
plain = setDeep(plain, parsePath(identicalPath), () => plain);
|
|
9982
9737
|
});
|
|
9983
9738
|
if (other) {
|
|
9984
|
-
forEach(other,
|
|
9739
|
+
forEach(other, apply2);
|
|
9985
9740
|
}
|
|
9986
9741
|
} else {
|
|
9987
|
-
forEach(annotations,
|
|
9742
|
+
forEach(annotations, apply2);
|
|
9988
9743
|
}
|
|
9989
9744
|
return plain;
|
|
9990
9745
|
}
|
|
9991
9746
|
__name(applyReferentialEqualityAnnotations, "applyReferentialEqualityAnnotations");
|
|
9992
|
-
var isDeep = /* @__PURE__ */ __name((object, superJson) =>
|
|
9747
|
+
var isDeep = /* @__PURE__ */ __name((object, superJson) => isPlainObject3(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson), "isDeep");
|
|
9993
9748
|
function addIdentity(object, path6, identities) {
|
|
9994
9749
|
const existingSet = identities.get(object);
|
|
9995
9750
|
if (existingSet) {
|
|
@@ -10060,7 +9815,7 @@ var walker = /* @__PURE__ */ __name((object, identities, superJson, dedupe, path
|
|
|
10060
9815
|
}
|
|
10061
9816
|
return result2;
|
|
10062
9817
|
}
|
|
10063
|
-
if (
|
|
9818
|
+
if (includes2(objectsInThisPath, object)) {
|
|
10064
9819
|
return {
|
|
10065
9820
|
transformedValue: null
|
|
10066
9821
|
};
|
|
@@ -10083,7 +9838,7 @@ var walker = /* @__PURE__ */ __name((object, identities, superJson, dedupe, path
|
|
|
10083
9838
|
transformedValue[index] = recursiveResult.transformedValue;
|
|
10084
9839
|
if (isArray(recursiveResult.annotations)) {
|
|
10085
9840
|
innerAnnotations[index] = recursiveResult.annotations;
|
|
10086
|
-
} else if (
|
|
9841
|
+
} else if (isPlainObject3(recursiveResult.annotations)) {
|
|
10087
9842
|
forEach(recursiveResult.annotations, (tree, key) => {
|
|
10088
9843
|
innerAnnotations[escapeKey(index) + "." + key] = tree;
|
|
10089
9844
|
});
|
|
@@ -10120,18 +9875,18 @@ function isArray2(payload) {
|
|
|
10120
9875
|
return getType2(payload) === "Array";
|
|
10121
9876
|
}
|
|
10122
9877
|
__name(isArray2, "isArray");
|
|
10123
|
-
function
|
|
9878
|
+
function isPlainObject4(payload) {
|
|
10124
9879
|
if (getType2(payload) !== "Object") return false;
|
|
10125
9880
|
const prototype = Object.getPrototypeOf(payload);
|
|
10126
9881
|
return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
|
|
10127
9882
|
}
|
|
10128
|
-
__name(
|
|
9883
|
+
__name(isPlainObject4, "isPlainObject");
|
|
10129
9884
|
function isNull2(payload) {
|
|
10130
9885
|
return getType2(payload) === "Null";
|
|
10131
9886
|
}
|
|
10132
9887
|
__name(isNull2, "isNull");
|
|
10133
|
-
function isOneOf(a, b, c,
|
|
10134
|
-
return (value) => a(value) || b(value) || !!c && c(value) || !!
|
|
9888
|
+
function isOneOf(a, b, c, d2, e) {
|
|
9889
|
+
return (value) => a(value) || b(value) || !!c && c(value) || !!d2 && d2(value) || !!e && e(value);
|
|
10135
9890
|
}
|
|
10136
9891
|
__name(isOneOf, "isOneOf");
|
|
10137
9892
|
function isUndefined2(payload) {
|
|
@@ -10158,7 +9913,7 @@ function copy(target, options = {}) {
|
|
|
10158
9913
|
if (isArray2(target)) {
|
|
10159
9914
|
return target.map((item) => copy(item, options));
|
|
10160
9915
|
}
|
|
10161
|
-
if (!
|
|
9916
|
+
if (!isPlainObject4(target)) {
|
|
10162
9917
|
return target;
|
|
10163
9918
|
}
|
|
10164
9919
|
const props = Object.getOwnPropertyNames(target);
|
|
@@ -10267,6 +10022,102 @@ var allowErrorProps = SuperJSON.allowErrorProps;
|
|
|
10267
10022
|
|
|
10268
10023
|
// ../json/src/utils/parse.ts
|
|
10269
10024
|
init_esm_shims();
|
|
10025
|
+
|
|
10026
|
+
// ../json/src/utils/strip-comments.ts
|
|
10027
|
+
init_esm_shims();
|
|
10028
|
+
var singleComment = Symbol("singleComment");
|
|
10029
|
+
var multiComment = Symbol("multiComment");
|
|
10030
|
+
function stripWithoutWhitespace() {
|
|
10031
|
+
return "";
|
|
10032
|
+
}
|
|
10033
|
+
__name(stripWithoutWhitespace, "stripWithoutWhitespace");
|
|
10034
|
+
function stripWithWhitespace(value, start, end) {
|
|
10035
|
+
return value.slice(start, end).replace(/\S/g, " ");
|
|
10036
|
+
}
|
|
10037
|
+
__name(stripWithWhitespace, "stripWithWhitespace");
|
|
10038
|
+
function isEscaped(value, quotePosition) {
|
|
10039
|
+
let index = quotePosition - 1;
|
|
10040
|
+
let backslashCount = 0;
|
|
10041
|
+
while (value[index] === "\\") {
|
|
10042
|
+
index -= 1;
|
|
10043
|
+
backslashCount += 1;
|
|
10044
|
+
}
|
|
10045
|
+
return Boolean(backslashCount % 2);
|
|
10046
|
+
}
|
|
10047
|
+
__name(isEscaped, "isEscaped");
|
|
10048
|
+
function stripComments2(value, { whitespace = true, trailingCommas = false } = {}) {
|
|
10049
|
+
if (typeof value !== "string") {
|
|
10050
|
+
throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof value}\``);
|
|
10051
|
+
}
|
|
10052
|
+
const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
|
|
10053
|
+
let isInsideString = false;
|
|
10054
|
+
let isInsideComment = false;
|
|
10055
|
+
let offset = 0;
|
|
10056
|
+
let buffer = "";
|
|
10057
|
+
let result = "";
|
|
10058
|
+
let commaIndex = -1;
|
|
10059
|
+
for (let index = 0; index < value.length; index++) {
|
|
10060
|
+
const currentCharacter = value[index];
|
|
10061
|
+
const nextCharacter = value[index + 1];
|
|
10062
|
+
if (!isInsideComment && currentCharacter === '"') {
|
|
10063
|
+
const escaped = isEscaped(value, index);
|
|
10064
|
+
if (!escaped) {
|
|
10065
|
+
isInsideString = !isInsideString;
|
|
10066
|
+
}
|
|
10067
|
+
}
|
|
10068
|
+
if (isInsideString) {
|
|
10069
|
+
continue;
|
|
10070
|
+
}
|
|
10071
|
+
if (!isInsideComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "//") {
|
|
10072
|
+
buffer += value.slice(offset, index);
|
|
10073
|
+
offset = index;
|
|
10074
|
+
isInsideComment = singleComment;
|
|
10075
|
+
index++;
|
|
10076
|
+
} else if (isInsideComment === singleComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "\r\n") {
|
|
10077
|
+
index++;
|
|
10078
|
+
isInsideComment = false;
|
|
10079
|
+
buffer += strip(value, offset, index);
|
|
10080
|
+
offset = index;
|
|
10081
|
+
} else if (isInsideComment === singleComment && currentCharacter === "\n") {
|
|
10082
|
+
isInsideComment = false;
|
|
10083
|
+
buffer += strip(value, offset, index);
|
|
10084
|
+
offset = index;
|
|
10085
|
+
} else if (!isInsideComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "/*") {
|
|
10086
|
+
buffer += value.slice(offset, index);
|
|
10087
|
+
offset = index;
|
|
10088
|
+
isInsideComment = multiComment;
|
|
10089
|
+
index++;
|
|
10090
|
+
} else if (isInsideComment === multiComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "*/") {
|
|
10091
|
+
index++;
|
|
10092
|
+
isInsideComment = false;
|
|
10093
|
+
buffer += strip(value, offset, index + 1);
|
|
10094
|
+
offset = index + 1;
|
|
10095
|
+
} else if (trailingCommas && !isInsideComment) {
|
|
10096
|
+
if (commaIndex !== -1) {
|
|
10097
|
+
if (currentCharacter === "}" || currentCharacter === "]") {
|
|
10098
|
+
buffer += value.slice(offset, index);
|
|
10099
|
+
result += strip(buffer, 0, 1) + buffer.slice(1);
|
|
10100
|
+
buffer = "";
|
|
10101
|
+
offset = index;
|
|
10102
|
+
commaIndex = -1;
|
|
10103
|
+
} else if (currentCharacter !== " " && currentCharacter !== " " && currentCharacter !== "\r" && currentCharacter !== "\n") {
|
|
10104
|
+
buffer += value.slice(offset, index);
|
|
10105
|
+
offset = index;
|
|
10106
|
+
commaIndex = -1;
|
|
10107
|
+
}
|
|
10108
|
+
} else if (currentCharacter === ",") {
|
|
10109
|
+
result += buffer + value.slice(offset, index);
|
|
10110
|
+
buffer = "";
|
|
10111
|
+
offset = index;
|
|
10112
|
+
commaIndex = index;
|
|
10113
|
+
}
|
|
10114
|
+
}
|
|
10115
|
+
}
|
|
10116
|
+
return result + buffer + (isInsideComment ? strip(value.slice(offset)) : value.slice(offset));
|
|
10117
|
+
}
|
|
10118
|
+
__name(stripComments2, "stripComments");
|
|
10119
|
+
|
|
10120
|
+
// ../json/src/utils/parse.ts
|
|
10270
10121
|
var suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
10271
10122
|
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
10272
10123
|
var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
|
|
@@ -10282,12 +10133,13 @@ function parse4(value, options = {}) {
|
|
|
10282
10133
|
if (typeof value !== "string") {
|
|
10283
10134
|
return value;
|
|
10284
10135
|
}
|
|
10285
|
-
|
|
10286
|
-
|
|
10136
|
+
let stripped = stripComments2(value);
|
|
10137
|
+
if (stripped[0] === '"' && stripped[stripped.length - 1] === '"' && !stripped.includes("\\")) {
|
|
10138
|
+
return stripped.slice(1, -1);
|
|
10287
10139
|
}
|
|
10288
|
-
|
|
10289
|
-
if (
|
|
10290
|
-
switch (
|
|
10140
|
+
stripped = stripped.trim();
|
|
10141
|
+
if (stripped.length <= 9) {
|
|
10142
|
+
switch (stripped.toLowerCase()) {
|
|
10291
10143
|
case "true": {
|
|
10292
10144
|
return true;
|
|
10293
10145
|
}
|
|
@@ -10311,20 +10163,20 @@ function parse4(value, options = {}) {
|
|
|
10311
10163
|
}
|
|
10312
10164
|
}
|
|
10313
10165
|
}
|
|
10314
|
-
if (!JsonSigRx.test(
|
|
10166
|
+
if (!JsonSigRx.test(stripped)) {
|
|
10315
10167
|
if (options.strict) {
|
|
10316
10168
|
throw new Error("Invalid JSON");
|
|
10317
10169
|
}
|
|
10318
|
-
return
|
|
10170
|
+
return stripped;
|
|
10319
10171
|
}
|
|
10320
10172
|
try {
|
|
10321
|
-
if (suspectProtoRx.test(
|
|
10173
|
+
if (suspectProtoRx.test(stripped) || suspectConstructorRx.test(stripped)) {
|
|
10322
10174
|
if (options.strict) {
|
|
10323
10175
|
throw new Error("Possible prototype pollution");
|
|
10324
10176
|
}
|
|
10325
|
-
return JSON.parse(
|
|
10177
|
+
return JSON.parse(stripped, jsonParseTransform);
|
|
10326
10178
|
}
|
|
10327
|
-
return JSON.parse(
|
|
10179
|
+
return JSON.parse(stripped);
|
|
10328
10180
|
} catch (error) {
|
|
10329
10181
|
if (options.strict) {
|
|
10330
10182
|
throw error;
|
|
@@ -10532,7 +10384,7 @@ init_esm_shims();
|
|
|
10532
10384
|
|
|
10533
10385
|
// ../type-checks/src/is-number.ts
|
|
10534
10386
|
init_esm_shims();
|
|
10535
|
-
var
|
|
10387
|
+
var isNumber3 = /* @__PURE__ */ __name((value) => {
|
|
10536
10388
|
try {
|
|
10537
10389
|
return value instanceof Number || typeof value === "number" || Number(value) === value;
|
|
10538
10390
|
} catch {
|
|
@@ -10540,9 +10392,49 @@ var isNumber2 = /* @__PURE__ */ __name((value) => {
|
|
|
10540
10392
|
}
|
|
10541
10393
|
}, "isNumber");
|
|
10542
10394
|
|
|
10395
|
+
// ../type-checks/src/is-undefined.ts
|
|
10396
|
+
init_esm_shims();
|
|
10397
|
+
var isUndefined3 = /* @__PURE__ */ __name((value) => {
|
|
10398
|
+
return value === void 0;
|
|
10399
|
+
}, "isUndefined");
|
|
10400
|
+
|
|
10543
10401
|
// ../json/src/utils/stringify.ts
|
|
10402
|
+
var invalidKeyChars = [
|
|
10403
|
+
"@",
|
|
10404
|
+
"/",
|
|
10405
|
+
"#",
|
|
10406
|
+
"$",
|
|
10407
|
+
" ",
|
|
10408
|
+
":",
|
|
10409
|
+
";",
|
|
10410
|
+
",",
|
|
10411
|
+
".",
|
|
10412
|
+
"!",
|
|
10413
|
+
"?",
|
|
10414
|
+
"&",
|
|
10415
|
+
"=",
|
|
10416
|
+
"+",
|
|
10417
|
+
"-",
|
|
10418
|
+
"*",
|
|
10419
|
+
"%",
|
|
10420
|
+
"^",
|
|
10421
|
+
"~",
|
|
10422
|
+
"|",
|
|
10423
|
+
"\\",
|
|
10424
|
+
'"',
|
|
10425
|
+
"'",
|
|
10426
|
+
"`",
|
|
10427
|
+
"{",
|
|
10428
|
+
"}",
|
|
10429
|
+
"[",
|
|
10430
|
+
"]",
|
|
10431
|
+
"(",
|
|
10432
|
+
")",
|
|
10433
|
+
"<",
|
|
10434
|
+
">"
|
|
10435
|
+
];
|
|
10544
10436
|
var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
10545
|
-
const space =
|
|
10437
|
+
const space = isNumber3(spacing) ? " ".repeat(spacing) : spacing;
|
|
10546
10438
|
switch (value) {
|
|
10547
10439
|
case null: {
|
|
10548
10440
|
return "null";
|
|
@@ -10577,8 +10469,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10577
10469
|
return JSON.stringify(value);
|
|
10578
10470
|
}
|
|
10579
10471
|
case "object": {
|
|
10580
|
-
const
|
|
10581
|
-
return `{${space}${
|
|
10472
|
+
const keys2 = Object.keys(value).filter((key) => !isUndefined3(value[key]));
|
|
10473
|
+
return `{${space}${keys2.map((key) => `${invalidKeyChars.some((invalidKeyChar) => key.includes(invalidKeyChar)) ? `"${key}"` : key}: ${space}${stringify2(value[key], space)}`).join(`,${space}`)}${space}}`;
|
|
10582
10474
|
}
|
|
10583
10475
|
default:
|
|
10584
10476
|
return "null";
|
|
@@ -10682,7 +10574,7 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10682
10574
|
*/
|
|
10683
10575
|
static registerClass(classConstructor, options) {
|
|
10684
10576
|
_StormJSON.instance.registerClass(classConstructor, {
|
|
10685
|
-
identifier:
|
|
10577
|
+
identifier: isString2(options) ? options : options?.identifier || classConstructor.name,
|
|
10686
10578
|
allowProps: options && isObject(options) && options?.allowProps && Array.isArray(options.allowProps) ? options.allowProps : [
|
|
10687
10579
|
"__typename"
|
|
10688
10580
|
]
|
|
@@ -10695,12 +10587,13 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10695
10587
|
}
|
|
10696
10588
|
};
|
|
10697
10589
|
StormJSON.instance.registerCustom({
|
|
10698
|
-
isApplicable: /* @__PURE__ */ __name((v) =>
|
|
10590
|
+
isApplicable: /* @__PURE__ */ __name((v) => Buffer2.isBuffer(v), "isApplicable"),
|
|
10699
10591
|
serialize: /* @__PURE__ */ __name((v) => v.toString("base64"), "serialize"),
|
|
10700
|
-
deserialize: /* @__PURE__ */ __name((v) =>
|
|
10592
|
+
deserialize: /* @__PURE__ */ __name((v) => Buffer2.from(v, "base64"), "deserialize")
|
|
10701
10593
|
}, "Bytes");
|
|
10702
10594
|
|
|
10703
10595
|
// ../fs/src/write-file.ts
|
|
10596
|
+
init_defu();
|
|
10704
10597
|
import { writeFile as writeFileFs } from "node:fs/promises";
|
|
10705
10598
|
var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options = {}) => {
|
|
10706
10599
|
if (!filePath) {
|
|
@@ -10957,8 +10850,8 @@ function resolveMongoDbRawOperations(modelOperations) {
|
|
|
10957
10850
|
const rawOpsMap = {};
|
|
10958
10851
|
const rawOpsNames = [
|
|
10959
10852
|
...new Set(modelOperations.reduce((result, current) => {
|
|
10960
|
-
const
|
|
10961
|
-
|
|
10853
|
+
const keys2 = Object.keys(current);
|
|
10854
|
+
keys2?.forEach((key) => {
|
|
10962
10855
|
if (key.includes("Raw")) {
|
|
10963
10856
|
result.push(key);
|
|
10964
10857
|
}
|
|
@@ -11104,8 +10997,8 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11104
10997
|
} else if (inputType.type === "Bytes") {
|
|
11105
10998
|
result.push(this.wrapWithZodValidators("z.instanceof(Buffer)", field));
|
|
11106
10999
|
} else if (!inputType.type.endsWith("FieldRefInput")) {
|
|
11107
|
-
const
|
|
11108
|
-
if (inputType.namespace === "prisma" ||
|
|
11000
|
+
const isEnum2 = inputType.location === "enumTypes";
|
|
11001
|
+
if (inputType.namespace === "prisma" || isEnum2) {
|
|
11109
11002
|
if (inputType.type !== this.name && typeof inputType.type === "string") {
|
|
11110
11003
|
this.addSchemaImport(inputType.type);
|
|
11111
11004
|
}
|
|
@@ -11149,12 +11042,12 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11149
11042
|
this.schemaImports.add(name);
|
|
11150
11043
|
}
|
|
11151
11044
|
generatePrismaStringLine(field, inputType, inputsLength) {
|
|
11152
|
-
const
|
|
11045
|
+
const isEnum2 = inputType.location === "enumTypes";
|
|
11153
11046
|
const inputTypeString = inputType.type;
|
|
11154
11047
|
const { isModelQueryType, modelName, queryName } = this.checkIsModelQueryType(inputTypeString);
|
|
11155
11048
|
const objectSchemaLine = isModelQueryType ? this.resolveModelQuerySchemaName(modelName, queryName) : `${inputTypeString}ObjectSchema`;
|
|
11156
11049
|
const enumSchemaLine = `${inputTypeString}Schema`;
|
|
11157
|
-
const schema = inputType.type === this.name ? objectSchemaLine :
|
|
11050
|
+
const schema = inputType.type === this.name ? objectSchemaLine : isEnum2 ? enumSchemaLine : objectSchemaLine;
|
|
11158
11051
|
const arr = inputType.isList ? ".array()" : "";
|
|
11159
11052
|
const opt = !field.isRequired ? ".optional()" : "";
|
|
11160
11053
|
return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}` : `z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}`;
|
|
@@ -12132,14 +12025,27 @@ getPrismaGeneratorHelper().then((helpers) => {
|
|
|
12132
12025
|
});
|
|
12133
12026
|
/*! Bundled license information:
|
|
12134
12027
|
|
|
12135
|
-
|
|
12136
|
-
(
|
|
12028
|
+
@ltd/j-toml/index.mjs:
|
|
12029
|
+
(*!@preserve@license
|
|
12030
|
+
* 模块名称:j-regexp
|
|
12031
|
+
* 模块功能:可读性更好的正则表达式创建方式。从属于“简计划”。
|
|
12032
|
+
More readable way for creating RegExp. Belong to "Plan J".
|
|
12033
|
+
* 模块版本:8.2.0
|
|
12034
|
+
* 许可条款:LGPL-3.0
|
|
12035
|
+
* 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)
|
|
12036
|
+
* 问题反馈:https://GitHub.com/LongTengDao/j-regexp/issues
|
|
12037
|
+
* 项目主页:https://GitHub.com/LongTengDao/j-regexp/
|
|
12038
|
+
*)
|
|
12137
12039
|
|
|
12138
|
-
|
|
12139
|
-
(
|
|
12140
|
-
*
|
|
12141
|
-
*
|
|
12142
|
-
|
|
12143
|
-
*
|
|
12040
|
+
@ltd/j-toml/index.mjs:
|
|
12041
|
+
(*!@preserve@license
|
|
12042
|
+
* 模块名称:j-orderify
|
|
12043
|
+
* 模块功能:返回一个能保证给定对象的属性按此后添加顺序排列的 proxy,即使键名是 symbol,或整数 string。从属于“简计划”。
|
|
12044
|
+
Return a proxy for given object, which can guarantee own keys are in setting order, even if the key name is symbol or int string. Belong to "Plan J".
|
|
12045
|
+
* 模块版本:7.0.1
|
|
12046
|
+
* 许可条款:LGPL-3.0
|
|
12047
|
+
* 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)
|
|
12048
|
+
* 问题反馈:https://GitHub.com/LongTengDao/j-orderify/issues
|
|
12049
|
+
* 项目主页:https://GitHub.com/LongTengDao/j-orderify/
|
|
12144
12050
|
*)
|
|
12145
12051
|
*/
|