luigi12345 commited on
Commit
76b1578
1 Parent(s): 2a84e62

80c189b019596429c08dbb82f0e2785d6ff41edc94a22477a6bd54f2b7cb7bd6

Browse files
Files changed (50) hide show
  1. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/constants.ts +121 -0
  2. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.d.ts +51 -0
  3. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.js +86 -0
  4. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.js.map +1 -0
  5. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.ts +115 -0
  6. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.d.ts +5 -0
  7. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.js +53 -0
  8. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.js.map +1 -0
  9. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.ts +52 -0
  10. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.d.ts +3 -0
  11. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.js +3 -0
  12. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.js.map +1 -0
  13. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.ts +4 -0
  14. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.d.ts +18 -0
  15. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.js +19 -0
  16. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.js.map +1 -0
  17. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.ts +33 -0
  18. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.d.ts +4 -0
  19. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.js +9 -0
  20. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.js.map +1 -0
  21. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.ts +4 -0
  22. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.d.ts +14 -0
  23. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.js +54 -0
  24. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.js.map +1 -0
  25. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.ts +60 -0
  26. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.d.ts +8 -0
  27. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.js +15 -0
  28. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.js.map +1 -0
  29. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.ts +9 -0
  30. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.d.ts +17 -0
  31. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.js +47 -0
  32. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.js.map +1 -0
  33. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.ts +51 -0
  34. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.d.ts +18 -0
  35. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.js +59 -0
  36. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.js.map +1 -0
  37. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.ts +67 -0
  38. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.d.ts +8 -0
  39. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.js +17 -0
  40. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.js.map +1 -0
  41. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.ts +9 -0
  42. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.d.ts +14 -0
  43. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.js +28 -0
  44. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.js.map +1 -0
  45. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.ts +25 -0
  46. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.d.ts +16 -0
  47. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.js +45 -0
  48. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.js.map +1 -0
  49. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.ts +48 -0
  50. workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/message.d.ts +158 -0
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/constants.ts ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ // Perform some bit gymnastics to determine the native endian format.
6
+
7
+ const tmpWord = new DataView(new ArrayBuffer(8));
8
+ new Uint16Array(tmpWord.buffer)[0] = 0x0102;
9
+
10
+ /** Default size (in bytes) for newly allocated segments. */
11
+
12
+ export const DEFAULT_BUFFER_SIZE = 4096;
13
+
14
+ export const DEFAULT_DECODE_LIMIT = 64 << 20; // 64 MiB
15
+
16
+ /**
17
+ * Limit to how deeply nested pointers are allowed to be. The root struct of a message will start at this value, and it
18
+ * is decremented as pointers are dereferenced.
19
+ */
20
+
21
+ export const DEFAULT_DEPTH_LIMIT = 64;
22
+
23
+ /**
24
+ * Limit to the number of **bytes** that can be traversed in a single message. This is necessary to prevent certain
25
+ * classes of DoS attacks where maliciously crafted data can be self-referencing in a way that wouldn't trigger the
26
+ * depth limit.
27
+ *
28
+ * For this reason, it is advised to cache pointers into variables and not constantly dereference them since the
29
+ * message's traversal limit gets decremented each time.
30
+ */
31
+
32
+ export const DEFAULT_TRAVERSE_LIMIT = 64 << 20; // 64 MiB
33
+
34
+ /**
35
+ * When allocating array buffers dynamically (while packing or in certain Arena implementations) the previous buffer's
36
+ * size is multiplied by this number to determine the next buffer's size. This is chosen to keep both time spent
37
+ * reallocating and wasted memory to a minimum.
38
+ *
39
+ * Smaller numbers would save memory at the expense of CPU time.
40
+ */
41
+
42
+ export const GROWTH_FACTOR = 1.5;
43
+
44
+ /** A bitmask applied to obtain the size of a list pointer. */
45
+
46
+ export const LIST_SIZE_MASK = 0x00000007;
47
+
48
+ /** Maximum number of bytes to dump at once when dumping array buffers to string. */
49
+
50
+ export const MAX_BUFFER_DUMP_BYTES = 8192;
51
+
52
+ /** The maximum value for a 32-bit integer. */
53
+
54
+ export const MAX_INT32 = 0x7fffffff;
55
+
56
+ /** The maximum value for a 32-bit unsigned integer. */
57
+
58
+ export const MAX_UINT32 = 0xffffffff;
59
+
60
+ /** The largest integer that can be precisely represented in JavaScript. */
61
+
62
+ export const MAX_SAFE_INTEGER = 9007199254740991;
63
+
64
+ /** Maximum limit on the number of segments in a message stream. */
65
+
66
+ export const MAX_STREAM_SEGMENTS = 512;
67
+
68
+ /** The smallest integer that can be precisely represented in JavaScript. */
69
+
70
+ export const MIN_SAFE_INTEGER = -9007199254740991;
71
+
72
+ /** Minimum growth increment for a SingleSegmentArena. */
73
+
74
+ export const MIN_SINGLE_SEGMENT_GROWTH = 4096;
75
+
76
+ /**
77
+ * This will be `true` if the machine running this code stores numbers natively in little-endian format. This is useful
78
+ * for some numeric type conversions when the endianness does not affect the output. Using the native endianness for
79
+ * these operations is _slightly_ faster.
80
+ */
81
+
82
+ export const NATIVE_LITTLE_ENDIAN = tmpWord.getUint8(0) === 0x02;
83
+
84
+ /**
85
+ * When packing a message, this is the number of zero bytes required after a SPAN (0xff) tag is written to the packed
86
+ * message before the span is terminated.
87
+ *
88
+ * This little detail is left up to the implementation because it can be tuned for performance. Setting this to a higher
89
+ * value may help with messages that contain a ton of text/data.
90
+ *
91
+ * It is imperative to never set this below 1 or else BAD THINGS. You have been warned.
92
+ */
93
+
94
+ export const PACK_SPAN_THRESHOLD = 2;
95
+
96
+ /**
97
+ * How far to travel into a nested pointer structure during a deep copy; when this limit is exhausted the copy
98
+ * operation will throw an error.
99
+ */
100
+
101
+ export const POINTER_COPY_LIMIT = 32;
102
+
103
+ /** A bitmask for looking up the double-far flag on a far pointer. */
104
+
105
+ export const POINTER_DOUBLE_FAR_MASK = 0x00000004;
106
+
107
+ /** A bitmask for looking up the pointer type. */
108
+
109
+ export const POINTER_TYPE_MASK = 0x00000003;
110
+
111
+ /** Used for some 64-bit conversions, equal to Math.pow(2, 32). */
112
+
113
+ export const VAL32 = 0x100000000;
114
+
115
+ /** The maximum value allowed for depth traversal limits. */
116
+
117
+ export const MAX_DEPTH = MAX_INT32;
118
+
119
+ /** The maximum byte length for a single segment. */
120
+
121
+ export const MAX_SEGMENT_LENGTH = MAX_UINT32;
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.d.ts ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This file contains all the error strings used in the library. Also contains silliness.
3
+ *
4
+ * @author jdiaz5513
5
+ */
6
+ export declare const INVARIANT_UNREACHABLE_CODE = "CAPNP-TS000 Unreachable code detected.";
7
+ export declare function assertNever(n: never): never;
8
+ export declare const MSG_INVALID_FRAME_HEADER = "CAPNP-TS001 Attempted to parse an invalid message frame header; are you sure this is a Cap'n Proto message?";
9
+ export declare const MSG_NO_SEGMENTS_IN_ARENA = "CAPNP-TS002 Attempted to preallocate a message with no segments in the arena.";
10
+ export declare const MSG_PACK_NOT_WORD_ALIGNED = "CAPNP-TS003 Attempted to pack a message that was not word-aligned.";
11
+ export declare const MSG_SEGMENT_OUT_OF_BOUNDS = "CAPNP-TS004 Segment ID %X is out of bounds for message %s.";
12
+ export declare const MSG_SEGMENT_TOO_SMALL = "CAPNP-TS005 First segment must have at least enough room to hold the root pointer (8 bytes).";
13
+ export declare const NOT_IMPLEMENTED = "CAPNP-TS006 %s is not implemented.";
14
+ export declare const PTR_ADOPT_COMPOSITE_STRUCT = "CAPNP-TS007 Attempted to adopt a struct into a composite list (%s).";
15
+ export declare const PTR_ADOPT_WRONG_MESSAGE = "CAPNP-TS008 Attempted to adopt %s into a pointer in a different message %s.";
16
+ export declare const PTR_ALREADY_ADOPTED = "CAPNP-TS009 Attempted to adopt %s more than once.";
17
+ export declare const PTR_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS010 Attempted to set a composite list without providing a composite element size.";
18
+ export declare const PTR_DEPTH_LIMIT_EXCEEDED = "CAPNP-TS011 Nesting depth limit exceeded for %s.";
19
+ export declare const PTR_DISOWN_COMPOSITE_STRUCT = "CAPNP-TS012 Attempted to disown a struct member from a composite list (%s).";
20
+ export declare const PTR_INIT_COMPOSITE_STRUCT = "CAPNP-TS013 Attempted to initialize a struct member from a composite list (%s).";
21
+ export declare const PTR_INIT_NON_GROUP = "CAPNP-TS014 Attempted to initialize a group field with a non-group struct class.";
22
+ export declare const PTR_INVALID_FAR_TARGET = "CAPNP-TS015 Target of a far pointer (%s) is another far pointer.";
23
+ export declare const PTR_INVALID_LIST_SIZE = "CAPNP-TS016 Invalid list element size: %x.";
24
+ export declare const PTR_INVALID_POINTER_TYPE = "CAPNP-TS017 Invalid pointer type: %x.";
25
+ export declare const PTR_INVALID_UNION_ACCESS = "CAPNP-TS018 Attempted to access getter on %s for union field %s that is not currently set (wanted: %d, found: %d).";
26
+ export declare const PTR_OFFSET_OUT_OF_BOUNDS = "CAPNP-TS019 Pointer offset %a is out of bounds for underlying buffer.";
27
+ export declare const PTR_STRUCT_DATA_OUT_OF_BOUNDS = "CAPNP-TS020 Attempted to access out-of-bounds struct data (struct: %s, %d bytes at %a, data words: %d).";
28
+ export declare const PTR_STRUCT_POINTER_OUT_OF_BOUNDS = "CAPNP-TS021 Attempted to access out-of-bounds struct pointer (%s, index: %d, length: %d).";
29
+ export declare const PTR_TRAVERSAL_LIMIT_EXCEEDED = "CAPNP-TS022 Traversal limit exceeded! Slow down! %s";
30
+ export declare const PTR_WRONG_LIST_TYPE = "CAPNP-TS023 Cannot convert %s to a %s list.";
31
+ export declare const PTR_WRONG_POINTER_TYPE = "CAPNP-TS024 Attempted to convert pointer %s to a %s type.";
32
+ export declare const PTR_WRONG_COMPOSITE_DATA_SIZE = "CAPNP-TS025 Attempted to convert %s to a composite list with the wrong data size (found: %d).";
33
+ export declare const PTR_WRONG_COMPOSITE_PTR_SIZE = "CAPNP-TS026 Attempted to convert %s to a composite list with the wrong pointer size (found: %d).";
34
+ export declare const PTR_WRONG_STRUCT_DATA_SIZE = "CAPNP-TS027 Attempted to convert %s to a struct with the wrong data size (found: %d).";
35
+ export declare const PTR_WRONG_STRUCT_PTR_SIZE = "CAPNP-TS028 Attempted to convert %s to a struct with the wrong pointer size (found: %d).";
36
+ export declare const RANGE_INT32_OVERFLOW = "CAPNP-TS029 32-bit signed integer overflow detected.";
37
+ export declare const RANGE_INT64_UNDERFLOW = "CAPNP-TS030 Buffer is not large enough to hold a word.";
38
+ export declare const RANGE_INVALID_UTF8 = "CAPNP-TS031 Invalid UTF-8 code sequence detected.";
39
+ export declare const RANGE_SIZE_OVERFLOW: string;
40
+ export declare const RANGE_UINT32_OVERFLOW = "CAPNP-TS033 32-bit unsigned integer overflow detected.";
41
+ export declare const SEG_BUFFER_NOT_ALLOCATED = "CAPNP-TS034 allocate() needs to be called at least once before getting a buffer.";
42
+ export declare const SEG_GET_NON_ZERO_SINGLE = "CAPNP-TS035 Attempted to get a segment other than 0 (%d) from a single segment arena.";
43
+ export declare const SEG_ID_OUT_OF_BOUNDS = "CAPNP-TS036 Attempted to get an out-of-bounds segment (%d).";
44
+ export declare const SEG_NOT_WORD_ALIGNED = "CAPNP-TS037 Segment buffer length %d is not a multiple of 8.";
45
+ export declare const SEG_REPLACEMENT_BUFFER_TOO_SMALL = "CAPNP-TS038 Attempted to replace a segment buffer with one that is smaller than the allocated space.";
46
+ export declare const SEG_SIZE_OVERFLOW: string;
47
+ export declare const TYPE_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS040 Must provide a composite element size for composite list pointers.";
48
+ export declare const TYPE_GET_GENERIC_LIST = "CAPNP-TS041 Attempted to call get() on a generic list.";
49
+ export declare const TYPE_SET_GENERIC_LIST = "CAPNP-TS042 Attempted to call set() on a generic list.";
50
+ export declare const PTR_WRITE_CONST_LIST = "CAPNP-TS043 Attempted to write to a const list.";
51
+ export declare const PTR_WRITE_CONST_STRUCT = "CAPNP-TS044 Attempted to write to a const struct.";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.js ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * This file contains all the error strings used in the library. Also contains silliness.
4
+ *
5
+ * @author jdiaz5513
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PTR_WRITE_CONST_STRUCT = exports.PTR_WRITE_CONST_LIST = exports.TYPE_SET_GENERIC_LIST = exports.TYPE_GET_GENERIC_LIST = exports.TYPE_COMPOSITE_SIZE_UNDEFINED = exports.SEG_SIZE_OVERFLOW = exports.SEG_REPLACEMENT_BUFFER_TOO_SMALL = exports.SEG_NOT_WORD_ALIGNED = exports.SEG_ID_OUT_OF_BOUNDS = exports.SEG_GET_NON_ZERO_SINGLE = exports.SEG_BUFFER_NOT_ALLOCATED = exports.RANGE_UINT32_OVERFLOW = exports.RANGE_SIZE_OVERFLOW = exports.RANGE_INVALID_UTF8 = exports.RANGE_INT64_UNDERFLOW = exports.RANGE_INT32_OVERFLOW = exports.PTR_WRONG_STRUCT_PTR_SIZE = exports.PTR_WRONG_STRUCT_DATA_SIZE = exports.PTR_WRONG_COMPOSITE_PTR_SIZE = exports.PTR_WRONG_COMPOSITE_DATA_SIZE = exports.PTR_WRONG_POINTER_TYPE = exports.PTR_WRONG_LIST_TYPE = exports.PTR_TRAVERSAL_LIMIT_EXCEEDED = exports.PTR_STRUCT_POINTER_OUT_OF_BOUNDS = exports.PTR_STRUCT_DATA_OUT_OF_BOUNDS = exports.PTR_OFFSET_OUT_OF_BOUNDS = exports.PTR_INVALID_UNION_ACCESS = exports.PTR_INVALID_POINTER_TYPE = exports.PTR_INVALID_LIST_SIZE = exports.PTR_INVALID_FAR_TARGET = exports.PTR_INIT_NON_GROUP = exports.PTR_INIT_COMPOSITE_STRUCT = exports.PTR_DISOWN_COMPOSITE_STRUCT = exports.PTR_DEPTH_LIMIT_EXCEEDED = exports.PTR_COMPOSITE_SIZE_UNDEFINED = exports.PTR_ALREADY_ADOPTED = exports.PTR_ADOPT_WRONG_MESSAGE = exports.PTR_ADOPT_COMPOSITE_STRUCT = exports.NOT_IMPLEMENTED = exports.MSG_SEGMENT_TOO_SMALL = exports.MSG_SEGMENT_OUT_OF_BOUNDS = exports.MSG_PACK_NOT_WORD_ALIGNED = exports.MSG_NO_SEGMENTS_IN_ARENA = exports.MSG_INVALID_FRAME_HEADER = exports.assertNever = exports.INVARIANT_UNREACHABLE_CODE = void 0;
9
+ const tslib_1 = require("tslib");
10
+ const debug_1 = tslib_1.__importDefault(require("debug"));
11
+ const constants_1 = require("./constants");
12
+ const trace = debug_1.default("capnp:errors");
13
+ trace("load");
14
+ // Invariant violations (sometimes known as "precondition failed").
15
+ //
16
+ // All right, hold up the brakes. This is a serious 1 === 0 WHAT THE FAILURE moment here. Tell the SO's you won't be
17
+ // home for dinner.
18
+ exports.INVARIANT_UNREACHABLE_CODE = "CAPNP-TS000 Unreachable code detected.";
19
+ function assertNever(n) {
20
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
21
+ throw new Error(exports.INVARIANT_UNREACHABLE_CODE + ` (never block hit with: ${n})`);
22
+ }
23
+ exports.assertNever = assertNever;
24
+ // Message errors.
25
+ //
26
+ // Now who told you it would be a good idea to fuzz the inputs? You just made the program sad.
27
+ exports.MSG_INVALID_FRAME_HEADER = "CAPNP-TS001 Attempted to parse an invalid message frame header; are you sure this is a Cap'n Proto message?";
28
+ exports.MSG_NO_SEGMENTS_IN_ARENA = "CAPNP-TS002 Attempted to preallocate a message with no segments in the arena.";
29
+ exports.MSG_PACK_NOT_WORD_ALIGNED = "CAPNP-TS003 Attempted to pack a message that was not word-aligned.";
30
+ exports.MSG_SEGMENT_OUT_OF_BOUNDS = "CAPNP-TS004 Segment ID %X is out of bounds for message %s.";
31
+ exports.MSG_SEGMENT_TOO_SMALL = "CAPNP-TS005 First segment must have at least enough room to hold the root pointer (8 bytes).";
32
+ // Used for methods that are not yet implemented.
33
+ //
34
+ // My bad. I'll get to it. Eventually.
35
+ exports.NOT_IMPLEMENTED = "CAPNP-TS006 %s is not implemented.";
36
+ // Pointer-related errors.
37
+ //
38
+ // Look, this is probably the hardest part of the code. Cut some slack here! You probably found a bug.
39
+ exports.PTR_ADOPT_COMPOSITE_STRUCT = "CAPNP-TS007 Attempted to adopt a struct into a composite list (%s).";
40
+ exports.PTR_ADOPT_WRONG_MESSAGE = "CAPNP-TS008 Attempted to adopt %s into a pointer in a different message %s.";
41
+ exports.PTR_ALREADY_ADOPTED = "CAPNP-TS009 Attempted to adopt %s more than once.";
42
+ exports.PTR_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS010 Attempted to set a composite list without providing a composite element size.";
43
+ exports.PTR_DEPTH_LIMIT_EXCEEDED = "CAPNP-TS011 Nesting depth limit exceeded for %s.";
44
+ exports.PTR_DISOWN_COMPOSITE_STRUCT = "CAPNP-TS012 Attempted to disown a struct member from a composite list (%s).";
45
+ exports.PTR_INIT_COMPOSITE_STRUCT = "CAPNP-TS013 Attempted to initialize a struct member from a composite list (%s).";
46
+ exports.PTR_INIT_NON_GROUP = "CAPNP-TS014 Attempted to initialize a group field with a non-group struct class.";
47
+ exports.PTR_INVALID_FAR_TARGET = "CAPNP-TS015 Target of a far pointer (%s) is another far pointer.";
48
+ exports.PTR_INVALID_LIST_SIZE = "CAPNP-TS016 Invalid list element size: %x.";
49
+ exports.PTR_INVALID_POINTER_TYPE = "CAPNP-TS017 Invalid pointer type: %x.";
50
+ exports.PTR_INVALID_UNION_ACCESS = "CAPNP-TS018 Attempted to access getter on %s for union field %s that is not currently set (wanted: %d, found: %d).";
51
+ exports.PTR_OFFSET_OUT_OF_BOUNDS = "CAPNP-TS019 Pointer offset %a is out of bounds for underlying buffer.";
52
+ exports.PTR_STRUCT_DATA_OUT_OF_BOUNDS = "CAPNP-TS020 Attempted to access out-of-bounds struct data (struct: %s, %d bytes at %a, data words: %d).";
53
+ exports.PTR_STRUCT_POINTER_OUT_OF_BOUNDS = "CAPNP-TS021 Attempted to access out-of-bounds struct pointer (%s, index: %d, length: %d).";
54
+ exports.PTR_TRAVERSAL_LIMIT_EXCEEDED = "CAPNP-TS022 Traversal limit exceeded! Slow down! %s";
55
+ exports.PTR_WRONG_LIST_TYPE = "CAPNP-TS023 Cannot convert %s to a %s list.";
56
+ exports.PTR_WRONG_POINTER_TYPE = "CAPNP-TS024 Attempted to convert pointer %s to a %s type.";
57
+ exports.PTR_WRONG_COMPOSITE_DATA_SIZE = "CAPNP-TS025 Attempted to convert %s to a composite list with the wrong data size (found: %d).";
58
+ exports.PTR_WRONG_COMPOSITE_PTR_SIZE = "CAPNP-TS026 Attempted to convert %s to a composite list with the wrong pointer size (found: %d).";
59
+ exports.PTR_WRONG_STRUCT_DATA_SIZE = "CAPNP-TS027 Attempted to convert %s to a struct with the wrong data size (found: %d).";
60
+ exports.PTR_WRONG_STRUCT_PTR_SIZE = "CAPNP-TS028 Attempted to convert %s to a struct with the wrong pointer size (found: %d).";
61
+ // Custom error messages for the built-in `RangeError` class.
62
+ //
63
+ // You don't get a witty comment with these.
64
+ exports.RANGE_INT32_OVERFLOW = "CAPNP-TS029 32-bit signed integer overflow detected.";
65
+ exports.RANGE_INT64_UNDERFLOW = "CAPNP-TS030 Buffer is not large enough to hold a word.";
66
+ exports.RANGE_INVALID_UTF8 = "CAPNP-TS031 Invalid UTF-8 code sequence detected.";
67
+ exports.RANGE_SIZE_OVERFLOW = `CAPNP-TS032 Size %x exceeds maximum ${constants_1.MAX_SEGMENT_LENGTH.toString(16)}.`;
68
+ exports.RANGE_UINT32_OVERFLOW = "CAPNP-TS033 32-bit unsigned integer overflow detected.";
69
+ // Segment-related errors.
70
+ //
71
+ // These suck. Deal with it.
72
+ exports.SEG_BUFFER_NOT_ALLOCATED = "CAPNP-TS034 allocate() needs to be called at least once before getting a buffer.";
73
+ exports.SEG_GET_NON_ZERO_SINGLE = "CAPNP-TS035 Attempted to get a segment other than 0 (%d) from a single segment arena.";
74
+ exports.SEG_ID_OUT_OF_BOUNDS = "CAPNP-TS036 Attempted to get an out-of-bounds segment (%d).";
75
+ exports.SEG_NOT_WORD_ALIGNED = "CAPNP-TS037 Segment buffer length %d is not a multiple of 8.";
76
+ exports.SEG_REPLACEMENT_BUFFER_TOO_SMALL = "CAPNP-TS038 Attempted to replace a segment buffer with one that is smaller than the allocated space.";
77
+ exports.SEG_SIZE_OVERFLOW = `CAPNP-TS039 Requested size %x exceeds maximum value (${constants_1.MAX_SEGMENT_LENGTH}).`;
78
+ // Custom error messages for the built-in `TypeError` class.
79
+ //
80
+ // If it looks like a duck, quacks like an elephant, and has hooves for feet, it's probably JavaScript.
81
+ exports.TYPE_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS040 Must provide a composite element size for composite list pointers.";
82
+ exports.TYPE_GET_GENERIC_LIST = "CAPNP-TS041 Attempted to call get() on a generic list.";
83
+ exports.TYPE_SET_GENERIC_LIST = "CAPNP-TS042 Attempted to call set() on a generic list.";
84
+ exports.PTR_WRITE_CONST_LIST = "CAPNP-TS043 Attempted to write to a const list.";
85
+ exports.PTR_WRITE_CONST_STRUCT = "CAPNP-TS044 Attempted to write to a const struct.";
86
+ //# sourceMappingURL=errors.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["errors.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;AAEH,0DAA8B;AAE9B,2CAAiD;AAEjD,MAAM,KAAK,GAAG,eAAS,CAAC,cAAc,CAAC,CAAC;AACxC,KAAK,CAAC,MAAM,CAAC,CAAC;AAEd,mEAAmE;AACnE,EAAE;AACF,oHAAoH;AACpH,mBAAmB;AAEN,QAAA,0BAA0B,GAAG,wCAAwC,CAAC;AAEnF,SAAgB,WAAW,CAAC,CAAQ;IAClC,4EAA4E;IAC5E,MAAM,IAAI,KAAK,CAAC,kCAA0B,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAC;AAChF,CAAC;AAHD,kCAGC;AAED,kBAAkB;AAClB,EAAE;AACF,8FAA8F;AAEjF,QAAA,wBAAwB,GACnC,6GAA6G,CAAC;AACnG,QAAA,wBAAwB,GAAG,+EAA+E,CAAC;AAC3G,QAAA,yBAAyB,GAAG,oEAAoE,CAAC;AACjG,QAAA,yBAAyB,GAAG,4DAA4D,CAAC;AACzF,QAAA,qBAAqB,GAChC,8FAA8F,CAAC;AAEjG,iDAAiD;AACjD,EAAE;AACF,sCAAsC;AAEzB,QAAA,eAAe,GAAG,oCAAoC,CAAC;AAEpE,0BAA0B;AAC1B,EAAE;AACF,sGAAsG;AAEzF,QAAA,0BAA0B,GAAG,qEAAqE,CAAC;AACnG,QAAA,uBAAuB,GAAG,6EAA6E,CAAC;AACxG,QAAA,mBAAmB,GAAG,mDAAmD,CAAC;AAC1E,QAAA,4BAA4B,GACvC,2FAA2F,CAAC;AACjF,QAAA,wBAAwB,GAAG,kDAAkD,CAAC;AAC9E,QAAA,2BAA2B,GACtC,6EAA6E,CAAC;AACnE,QAAA,yBAAyB,GACpC,iFAAiF,CAAC;AACvE,QAAA,kBAAkB,GAAG,kFAAkF,CAAC;AACxG,QAAA,sBAAsB,GAAG,kEAAkE,CAAC;AAC5F,QAAA,qBAAqB,GAAG,4CAA4C,CAAC;AACrE,QAAA,wBAAwB,GAAG,uCAAuC,CAAC;AACnE,QAAA,wBAAwB,GACnC,oHAAoH,CAAC;AAC1G,QAAA,wBAAwB,GAAG,uEAAuE,CAAC;AACnG,QAAA,6BAA6B,GACxC,yGAAyG,CAAC;AAC/F,QAAA,gCAAgC,GAC3C,2FAA2F,CAAC;AACjF,QAAA,4BAA4B,GAAG,qDAAqD,CAAC;AACrF,QAAA,mBAAmB,GAAG,6CAA6C,CAAC;AACpE,QAAA,sBAAsB,GAAG,2DAA2D,CAAC;AACrF,QAAA,6BAA6B,GACxC,+FAA+F,CAAC;AACrF,QAAA,4BAA4B,GACvC,kGAAkG,CAAC;AACxF,QAAA,0BAA0B,GACrC,uFAAuF,CAAC;AAC7E,QAAA,yBAAyB,GACpC,0FAA0F,CAAC;AAE7F,6DAA6D;AAC7D,EAAE;AACF,4CAA4C;AAE/B,QAAA,oBAAoB,GAAG,sDAAsD,CAAC;AAC9E,QAAA,qBAAqB,GAAG,wDAAwD,CAAC;AACjF,QAAA,kBAAkB,GAAG,mDAAmD,CAAC;AACzE,QAAA,mBAAmB,GAAG,uCAAuC,8BAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;AAChG,QAAA,qBAAqB,GAAG,wDAAwD,CAAC;AAE9F,0BAA0B;AAC1B,EAAE;AACF,4BAA4B;AAEf,QAAA,wBAAwB,GACnC,kFAAkF,CAAC;AACxE,QAAA,uBAAuB,GAClC,uFAAuF,CAAC;AAC7E,QAAA,oBAAoB,GAAG,6DAA6D,CAAC;AACrF,QAAA,oBAAoB,GAAG,8DAA8D,CAAC;AACtF,QAAA,gCAAgC,GAC3C,sGAAsG,CAAC;AAC5F,QAAA,iBAAiB,GAAG,wDAAwD,8BAAkB,IAAI,CAAC;AAEhH,4DAA4D;AAC5D,EAAE;AACF,uGAAuG;AAE1F,QAAA,6BAA6B,GACxC,gFAAgF,CAAC;AACtE,QAAA,qBAAqB,GAAG,wDAAwD,CAAC;AACjF,QAAA,qBAAqB,GAAG,wDAAwD,CAAC;AAEjF,QAAA,oBAAoB,GAAG,iDAAiD,CAAC;AACzE,QAAA,sBAAsB,GAAG,mDAAmD,CAAC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/errors.ts ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This file contains all the error strings used in the library. Also contains silliness.
3
+ *
4
+ * @author jdiaz5513
5
+ */
6
+
7
+ import initTrace from "debug";
8
+
9
+ import { MAX_SEGMENT_LENGTH } from "./constants";
10
+
11
+ const trace = initTrace("capnp:errors");
12
+ trace("load");
13
+
14
+ // Invariant violations (sometimes known as "precondition failed").
15
+ //
16
+ // All right, hold up the brakes. This is a serious 1 === 0 WHAT THE FAILURE moment here. Tell the SO's you won't be
17
+ // home for dinner.
18
+
19
+ export const INVARIANT_UNREACHABLE_CODE = "CAPNP-TS000 Unreachable code detected.";
20
+
21
+ export function assertNever(n: never): never {
22
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
23
+ throw new Error(INVARIANT_UNREACHABLE_CODE + ` (never block hit with: ${n})`);
24
+ }
25
+
26
+ // Message errors.
27
+ //
28
+ // Now who told you it would be a good idea to fuzz the inputs? You just made the program sad.
29
+
30
+ export const MSG_INVALID_FRAME_HEADER =
31
+ "CAPNP-TS001 Attempted to parse an invalid message frame header; are you sure this is a Cap'n Proto message?";
32
+ export const MSG_NO_SEGMENTS_IN_ARENA = "CAPNP-TS002 Attempted to preallocate a message with no segments in the arena.";
33
+ export const MSG_PACK_NOT_WORD_ALIGNED = "CAPNP-TS003 Attempted to pack a message that was not word-aligned.";
34
+ export const MSG_SEGMENT_OUT_OF_BOUNDS = "CAPNP-TS004 Segment ID %X is out of bounds for message %s.";
35
+ export const MSG_SEGMENT_TOO_SMALL =
36
+ "CAPNP-TS005 First segment must have at least enough room to hold the root pointer (8 bytes).";
37
+
38
+ // Used for methods that are not yet implemented.
39
+ //
40
+ // My bad. I'll get to it. Eventually.
41
+
42
+ export const NOT_IMPLEMENTED = "CAPNP-TS006 %s is not implemented.";
43
+
44
+ // Pointer-related errors.
45
+ //
46
+ // Look, this is probably the hardest part of the code. Cut some slack here! You probably found a bug.
47
+
48
+ export const PTR_ADOPT_COMPOSITE_STRUCT = "CAPNP-TS007 Attempted to adopt a struct into a composite list (%s).";
49
+ export const PTR_ADOPT_WRONG_MESSAGE = "CAPNP-TS008 Attempted to adopt %s into a pointer in a different message %s.";
50
+ export const PTR_ALREADY_ADOPTED = "CAPNP-TS009 Attempted to adopt %s more than once.";
51
+ export const PTR_COMPOSITE_SIZE_UNDEFINED =
52
+ "CAPNP-TS010 Attempted to set a composite list without providing a composite element size.";
53
+ export const PTR_DEPTH_LIMIT_EXCEEDED = "CAPNP-TS011 Nesting depth limit exceeded for %s.";
54
+ export const PTR_DISOWN_COMPOSITE_STRUCT =
55
+ "CAPNP-TS012 Attempted to disown a struct member from a composite list (%s).";
56
+ export const PTR_INIT_COMPOSITE_STRUCT =
57
+ "CAPNP-TS013 Attempted to initialize a struct member from a composite list (%s).";
58
+ export const PTR_INIT_NON_GROUP = "CAPNP-TS014 Attempted to initialize a group field with a non-group struct class.";
59
+ export const PTR_INVALID_FAR_TARGET = "CAPNP-TS015 Target of a far pointer (%s) is another far pointer.";
60
+ export const PTR_INVALID_LIST_SIZE = "CAPNP-TS016 Invalid list element size: %x.";
61
+ export const PTR_INVALID_POINTER_TYPE = "CAPNP-TS017 Invalid pointer type: %x.";
62
+ export const PTR_INVALID_UNION_ACCESS =
63
+ "CAPNP-TS018 Attempted to access getter on %s for union field %s that is not currently set (wanted: %d, found: %d).";
64
+ export const PTR_OFFSET_OUT_OF_BOUNDS = "CAPNP-TS019 Pointer offset %a is out of bounds for underlying buffer.";
65
+ export const PTR_STRUCT_DATA_OUT_OF_BOUNDS =
66
+ "CAPNP-TS020 Attempted to access out-of-bounds struct data (struct: %s, %d bytes at %a, data words: %d).";
67
+ export const PTR_STRUCT_POINTER_OUT_OF_BOUNDS =
68
+ "CAPNP-TS021 Attempted to access out-of-bounds struct pointer (%s, index: %d, length: %d).";
69
+ export const PTR_TRAVERSAL_LIMIT_EXCEEDED = "CAPNP-TS022 Traversal limit exceeded! Slow down! %s";
70
+ export const PTR_WRONG_LIST_TYPE = "CAPNP-TS023 Cannot convert %s to a %s list.";
71
+ export const PTR_WRONG_POINTER_TYPE = "CAPNP-TS024 Attempted to convert pointer %s to a %s type.";
72
+ export const PTR_WRONG_COMPOSITE_DATA_SIZE =
73
+ "CAPNP-TS025 Attempted to convert %s to a composite list with the wrong data size (found: %d).";
74
+ export const PTR_WRONG_COMPOSITE_PTR_SIZE =
75
+ "CAPNP-TS026 Attempted to convert %s to a composite list with the wrong pointer size (found: %d).";
76
+ export const PTR_WRONG_STRUCT_DATA_SIZE =
77
+ "CAPNP-TS027 Attempted to convert %s to a struct with the wrong data size (found: %d).";
78
+ export const PTR_WRONG_STRUCT_PTR_SIZE =
79
+ "CAPNP-TS028 Attempted to convert %s to a struct with the wrong pointer size (found: %d).";
80
+
81
+ // Custom error messages for the built-in `RangeError` class.
82
+ //
83
+ // You don't get a witty comment with these.
84
+
85
+ export const RANGE_INT32_OVERFLOW = "CAPNP-TS029 32-bit signed integer overflow detected.";
86
+ export const RANGE_INT64_UNDERFLOW = "CAPNP-TS030 Buffer is not large enough to hold a word.";
87
+ export const RANGE_INVALID_UTF8 = "CAPNP-TS031 Invalid UTF-8 code sequence detected.";
88
+ export const RANGE_SIZE_OVERFLOW = `CAPNP-TS032 Size %x exceeds maximum ${MAX_SEGMENT_LENGTH.toString(16)}.`;
89
+ export const RANGE_UINT32_OVERFLOW = "CAPNP-TS033 32-bit unsigned integer overflow detected.";
90
+
91
+ // Segment-related errors.
92
+ //
93
+ // These suck. Deal with it.
94
+
95
+ export const SEG_BUFFER_NOT_ALLOCATED =
96
+ "CAPNP-TS034 allocate() needs to be called at least once before getting a buffer.";
97
+ export const SEG_GET_NON_ZERO_SINGLE =
98
+ "CAPNP-TS035 Attempted to get a segment other than 0 (%d) from a single segment arena.";
99
+ export const SEG_ID_OUT_OF_BOUNDS = "CAPNP-TS036 Attempted to get an out-of-bounds segment (%d).";
100
+ export const SEG_NOT_WORD_ALIGNED = "CAPNP-TS037 Segment buffer length %d is not a multiple of 8.";
101
+ export const SEG_REPLACEMENT_BUFFER_TOO_SMALL =
102
+ "CAPNP-TS038 Attempted to replace a segment buffer with one that is smaller than the allocated space.";
103
+ export const SEG_SIZE_OVERFLOW = `CAPNP-TS039 Requested size %x exceeds maximum value (${MAX_SEGMENT_LENGTH}).`;
104
+
105
+ // Custom error messages for the built-in `TypeError` class.
106
+ //
107
+ // If it looks like a duck, quacks like an elephant, and has hooves for feet, it's probably JavaScript.
108
+
109
+ export const TYPE_COMPOSITE_SIZE_UNDEFINED =
110
+ "CAPNP-TS040 Must provide a composite element size for composite list pointers.";
111
+ export const TYPE_GET_GENERIC_LIST = "CAPNP-TS041 Attempted to call get() on a generic list.";
112
+ export const TYPE_SET_GENERIC_LIST = "CAPNP-TS042 Attempted to call set() on a generic list.";
113
+
114
+ export const PTR_WRITE_CONST_LIST = "CAPNP-TS043 Attempted to write to a const list.";
115
+ export const PTR_WRITE_CONST_STRUCT = "CAPNP-TS044 Attempted to write to a const struct.";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.d.ts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ export { ListElementSize, Message, ObjectSize, readRawPointer, AnyPointerList, BoolList, CompositeList, Data, DataList, Float32List, Float64List, Int16List, Int32List, Int64List, Int8List, Interface, InterfaceList, List, ListCtor, Orphan, PointerList, PointerType, Pointer, Struct, StructCtor, Text, TextList, Uint16List, Uint32List, Uint64List, Uint8List, VoidList, Void, getBitMask, getFloat32Mask, getFloat64Mask, getInt16Mask, getInt32Mask, getInt64Mask, getInt8Mask, getUint16Mask, getUint32Mask, getUint64Mask, getUint8Mask, } from "./serialization";
5
+ export { Int64, Uint64 } from "./types";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Uint64 = exports.Int64 = exports.getUint8Mask = exports.getUint64Mask = exports.getUint32Mask = exports.getUint16Mask = exports.getInt8Mask = exports.getInt64Mask = exports.getInt32Mask = exports.getInt16Mask = exports.getFloat64Mask = exports.getFloat32Mask = exports.getBitMask = exports.Void = exports.VoidList = exports.Uint8List = exports.Uint64List = exports.Uint32List = exports.Uint16List = exports.TextList = exports.Text = exports.Struct = exports.Pointer = exports.PointerType = exports.PointerList = exports.Orphan = exports.List = exports.InterfaceList = exports.Interface = exports.Int8List = exports.Int64List = exports.Int32List = exports.Int16List = exports.Float64List = exports.Float32List = exports.DataList = exports.Data = exports.CompositeList = exports.BoolList = exports.AnyPointerList = exports.readRawPointer = exports.ObjectSize = exports.Message = exports.ListElementSize = void 0;
7
+ var serialization_1 = require("./serialization");
8
+ Object.defineProperty(exports, "ListElementSize", { enumerable: true, get: function () { return serialization_1.ListElementSize; } });
9
+ Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return serialization_1.Message; } });
10
+ Object.defineProperty(exports, "ObjectSize", { enumerable: true, get: function () { return serialization_1.ObjectSize; } });
11
+ Object.defineProperty(exports, "readRawPointer", { enumerable: true, get: function () { return serialization_1.readRawPointer; } });
12
+ Object.defineProperty(exports, "AnyPointerList", { enumerable: true, get: function () { return serialization_1.AnyPointerList; } });
13
+ Object.defineProperty(exports, "BoolList", { enumerable: true, get: function () { return serialization_1.BoolList; } });
14
+ Object.defineProperty(exports, "CompositeList", { enumerable: true, get: function () { return serialization_1.CompositeList; } });
15
+ Object.defineProperty(exports, "Data", { enumerable: true, get: function () { return serialization_1.Data; } });
16
+ Object.defineProperty(exports, "DataList", { enumerable: true, get: function () { return serialization_1.DataList; } });
17
+ Object.defineProperty(exports, "Float32List", { enumerable: true, get: function () { return serialization_1.Float32List; } });
18
+ Object.defineProperty(exports, "Float64List", { enumerable: true, get: function () { return serialization_1.Float64List; } });
19
+ Object.defineProperty(exports, "Int16List", { enumerable: true, get: function () { return serialization_1.Int16List; } });
20
+ Object.defineProperty(exports, "Int32List", { enumerable: true, get: function () { return serialization_1.Int32List; } });
21
+ Object.defineProperty(exports, "Int64List", { enumerable: true, get: function () { return serialization_1.Int64List; } });
22
+ Object.defineProperty(exports, "Int8List", { enumerable: true, get: function () { return serialization_1.Int8List; } });
23
+ Object.defineProperty(exports, "Interface", { enumerable: true, get: function () { return serialization_1.Interface; } });
24
+ Object.defineProperty(exports, "InterfaceList", { enumerable: true, get: function () { return serialization_1.InterfaceList; } });
25
+ Object.defineProperty(exports, "List", { enumerable: true, get: function () { return serialization_1.List; } });
26
+ Object.defineProperty(exports, "Orphan", { enumerable: true, get: function () { return serialization_1.Orphan; } });
27
+ Object.defineProperty(exports, "PointerList", { enumerable: true, get: function () { return serialization_1.PointerList; } });
28
+ Object.defineProperty(exports, "PointerType", { enumerable: true, get: function () { return serialization_1.PointerType; } });
29
+ Object.defineProperty(exports, "Pointer", { enumerable: true, get: function () { return serialization_1.Pointer; } });
30
+ Object.defineProperty(exports, "Struct", { enumerable: true, get: function () { return serialization_1.Struct; } });
31
+ Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return serialization_1.Text; } });
32
+ Object.defineProperty(exports, "TextList", { enumerable: true, get: function () { return serialization_1.TextList; } });
33
+ Object.defineProperty(exports, "Uint16List", { enumerable: true, get: function () { return serialization_1.Uint16List; } });
34
+ Object.defineProperty(exports, "Uint32List", { enumerable: true, get: function () { return serialization_1.Uint32List; } });
35
+ Object.defineProperty(exports, "Uint64List", { enumerable: true, get: function () { return serialization_1.Uint64List; } });
36
+ Object.defineProperty(exports, "Uint8List", { enumerable: true, get: function () { return serialization_1.Uint8List; } });
37
+ Object.defineProperty(exports, "VoidList", { enumerable: true, get: function () { return serialization_1.VoidList; } });
38
+ Object.defineProperty(exports, "Void", { enumerable: true, get: function () { return serialization_1.Void; } });
39
+ Object.defineProperty(exports, "getBitMask", { enumerable: true, get: function () { return serialization_1.getBitMask; } });
40
+ Object.defineProperty(exports, "getFloat32Mask", { enumerable: true, get: function () { return serialization_1.getFloat32Mask; } });
41
+ Object.defineProperty(exports, "getFloat64Mask", { enumerable: true, get: function () { return serialization_1.getFloat64Mask; } });
42
+ Object.defineProperty(exports, "getInt16Mask", { enumerable: true, get: function () { return serialization_1.getInt16Mask; } });
43
+ Object.defineProperty(exports, "getInt32Mask", { enumerable: true, get: function () { return serialization_1.getInt32Mask; } });
44
+ Object.defineProperty(exports, "getInt64Mask", { enumerable: true, get: function () { return serialization_1.getInt64Mask; } });
45
+ Object.defineProperty(exports, "getInt8Mask", { enumerable: true, get: function () { return serialization_1.getInt8Mask; } });
46
+ Object.defineProperty(exports, "getUint16Mask", { enumerable: true, get: function () { return serialization_1.getUint16Mask; } });
47
+ Object.defineProperty(exports, "getUint32Mask", { enumerable: true, get: function () { return serialization_1.getUint32Mask; } });
48
+ Object.defineProperty(exports, "getUint64Mask", { enumerable: true, get: function () { return serialization_1.getUint64Mask; } });
49
+ Object.defineProperty(exports, "getUint8Mask", { enumerable: true, get: function () { return serialization_1.getUint8Mask; } });
50
+ var types_1 = require("./types");
51
+ Object.defineProperty(exports, "Int64", { enumerable: true, get: function () { return types_1.Int64; } });
52
+ Object.defineProperty(exports, "Uint64", { enumerable: true, get: function () { return types_1.Uint64; } });
53
+ //# sourceMappingURL=index.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iDA6CyB;AA5CvB,gHAAA,eAAe,OAAA;AACf,wGAAA,OAAO,OAAA;AACP,2GAAA,UAAU,OAAA;AACV,+GAAA,cAAc,OAAA;AACd,+GAAA,cAAc,OAAA;AACd,yGAAA,QAAQ,OAAA;AACR,8GAAA,aAAa,OAAA;AACb,qGAAA,IAAI,OAAA;AACJ,yGAAA,QAAQ,OAAA;AACR,4GAAA,WAAW,OAAA;AACX,4GAAA,WAAW,OAAA;AACX,0GAAA,SAAS,OAAA;AACT,0GAAA,SAAS,OAAA;AACT,0GAAA,SAAS,OAAA;AACT,yGAAA,QAAQ,OAAA;AACR,0GAAA,SAAS,OAAA;AACT,8GAAA,aAAa,OAAA;AACb,qGAAA,IAAI,OAAA;AAEJ,uGAAA,MAAM,OAAA;AACN,4GAAA,WAAW,OAAA;AACX,4GAAA,WAAW,OAAA;AACX,wGAAA,OAAO,OAAA;AACP,uGAAA,MAAM,OAAA;AAEN,qGAAA,IAAI,OAAA;AACJ,yGAAA,QAAQ,OAAA;AACR,2GAAA,UAAU,OAAA;AACV,2GAAA,UAAU,OAAA;AACV,2GAAA,UAAU,OAAA;AACV,0GAAA,SAAS,OAAA;AACT,yGAAA,QAAQ,OAAA;AACR,qGAAA,IAAI,OAAA;AACJ,2GAAA,UAAU,OAAA;AACV,+GAAA,cAAc,OAAA;AACd,+GAAA,cAAc,OAAA;AACd,6GAAA,YAAY,OAAA;AACZ,6GAAA,YAAY,OAAA;AACZ,6GAAA,YAAY,OAAA;AACZ,4GAAA,WAAW,OAAA;AACX,8GAAA,aAAa,OAAA;AACb,8GAAA,aAAa,OAAA;AACb,8GAAA,aAAa,OAAA;AACb,6GAAA,YAAY,OAAA;AAGd,iCAAwC;AAA/B,8FAAA,KAAK,OAAA;AAAE,+FAAA,MAAM,OAAA"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/index.ts ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ export {
6
+ ListElementSize,
7
+ Message,
8
+ ObjectSize,
9
+ readRawPointer,
10
+ AnyPointerList,
11
+ BoolList,
12
+ CompositeList,
13
+ Data,
14
+ DataList,
15
+ Float32List,
16
+ Float64List,
17
+ Int16List,
18
+ Int32List,
19
+ Int64List,
20
+ Int8List,
21
+ Interface,
22
+ InterfaceList,
23
+ List,
24
+ ListCtor,
25
+ Orphan,
26
+ PointerList,
27
+ PointerType,
28
+ Pointer,
29
+ Struct,
30
+ StructCtor,
31
+ Text,
32
+ TextList,
33
+ Uint16List,
34
+ Uint32List,
35
+ Uint64List,
36
+ Uint8List,
37
+ VoidList,
38
+ Void,
39
+ getBitMask,
40
+ getFloat32Mask,
41
+ getFloat64Mask,
42
+ getInt16Mask,
43
+ getInt32Mask,
44
+ getInt64Mask,
45
+ getInt8Mask,
46
+ getUint16Mask,
47
+ getUint32Mask,
48
+ getUint64Mask,
49
+ getUint8Mask,
50
+ } from "./serialization";
51
+
52
+ export { Int64, Uint64 } from "./types";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.d.ts ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import { MultiSegmentArena } from "./multi-segment-arena";
2
+ import { SingleSegmentArena } from "./single-segment-arena";
3
+ export declare type AnyArena = MultiSegmentArena | SingleSegmentArena;
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=any-arena.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"any-arena.js","sourceRoot":"","sources":["any-arena.ts"],"names":[],"mappings":""}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/any-arena.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import { MultiSegmentArena } from "./multi-segment-arena";
2
+ import { SingleSegmentArena } from "./single-segment-arena";
3
+
4
+ export type AnyArena = MultiSegmentArena | SingleSegmentArena;
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.d.ts ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ export declare class ArenaAllocationResult {
5
+ /**
6
+ * The newly allocated buffer. This buffer might be a copy of an existing segment's buffer with free space appended.
7
+ *
8
+ * @type {ArrayBuffer}
9
+ */
10
+ readonly buffer: ArrayBuffer;
11
+ /**
12
+ * The id of the newly-allocated segment.
13
+ *
14
+ * @type {number}
15
+ */
16
+ readonly id: number;
17
+ constructor(id: number, buffer: ArrayBuffer);
18
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ArenaAllocationResult = void 0;
7
+ const tslib_1 = require("tslib");
8
+ const debug_1 = tslib_1.__importDefault(require("debug"));
9
+ const trace = debug_1.default("capnp:serialization:arena:arena-allocation-result");
10
+ trace("load");
11
+ class ArenaAllocationResult {
12
+ constructor(id, buffer) {
13
+ this.id = id;
14
+ this.buffer = buffer;
15
+ trace("new", this);
16
+ }
17
+ }
18
+ exports.ArenaAllocationResult = ArenaAllocationResult;
19
+ //# sourceMappingURL=arena-allocation-result.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"arena-allocation-result.js","sourceRoot":"","sources":["arena-allocation-result.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,0DAA8B;AAE9B,MAAM,KAAK,GAAG,eAAS,CAAC,mDAAmD,CAAC,CAAC;AAC7E,KAAK,CAAC,MAAM,CAAC,CAAC;AAEd,MAAa,qBAAqB;IAiBhC,YAAY,EAAU,EAAE,MAAmB;QACzC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrB,CAAC;CACF;AAvBD,sDAuBC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-allocation-result.ts ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ import initTrace from "debug";
6
+
7
+ const trace = initTrace("capnp:serialization:arena:arena-allocation-result");
8
+ trace("load");
9
+
10
+ export class ArenaAllocationResult {
11
+ /**
12
+ * The newly allocated buffer. This buffer might be a copy of an existing segment's buffer with free space appended.
13
+ *
14
+ * @type {ArrayBuffer}
15
+ */
16
+
17
+ readonly buffer: ArrayBuffer;
18
+
19
+ /**
20
+ * The id of the newly-allocated segment.
21
+ *
22
+ * @type {number}
23
+ */
24
+
25
+ readonly id: number;
26
+
27
+ constructor(id: number, buffer: ArrayBuffer) {
28
+ this.id = id;
29
+ this.buffer = buffer;
30
+
31
+ trace("new", this);
32
+ }
33
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.d.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ export declare enum ArenaKind {
2
+ SINGLE_SEGMENT = 0,
3
+ MULTI_SEGMENT = 1
4
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArenaKind = void 0;
4
+ var ArenaKind;
5
+ (function (ArenaKind) {
6
+ ArenaKind[ArenaKind["SINGLE_SEGMENT"] = 0] = "SINGLE_SEGMENT";
7
+ ArenaKind[ArenaKind["MULTI_SEGMENT"] = 1] = "MULTI_SEGMENT";
8
+ })(ArenaKind = exports.ArenaKind || (exports.ArenaKind = {}));
9
+ //# sourceMappingURL=arena-kind.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"arena-kind.js","sourceRoot":"","sources":["arena-kind.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,6DAAc,CAAA;IACd,2DAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena-kind.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ export enum ArenaKind {
2
+ SINGLE_SEGMENT,
3
+ MULTI_SEGMENT
4
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.d.ts ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ import { Segment } from "../segment";
5
+ import { AnyArena } from "./any-arena";
6
+ import { ArenaAllocationResult } from "./arena-allocation-result";
7
+ export declare abstract class Arena {
8
+ static readonly allocate: typeof allocate;
9
+ static readonly getBuffer: typeof getBuffer;
10
+ static readonly getNumSegments: typeof getNumSegments;
11
+ }
12
+ export declare function allocate(minSize: number, segments: Segment[], a: AnyArena): ArenaAllocationResult;
13
+ export declare function getBuffer(id: number, a: AnyArena): ArrayBuffer;
14
+ export declare function getNumSegments(a: AnyArena): number;
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.js ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getNumSegments = exports.getBuffer = exports.allocate = exports.Arena = void 0;
7
+ const tslib_1 = require("tslib");
8
+ const debug_1 = tslib_1.__importDefault(require("debug"));
9
+ const errors_1 = require("../../errors");
10
+ const arena_kind_1 = require("./arena-kind");
11
+ const multi_segment_arena_1 = require("./multi-segment-arena");
12
+ const single_segment_arena_1 = require("./single-segment-arena");
13
+ const trace = debug_1.default("capnp:arena");
14
+ trace("load");
15
+ class Arena {
16
+ }
17
+ exports.Arena = Arena;
18
+ Arena.allocate = allocate;
19
+ Arena.getBuffer = getBuffer;
20
+ Arena.getNumSegments = getNumSegments;
21
+ function allocate(minSize, segments, a) {
22
+ switch (a.kind) {
23
+ case arena_kind_1.ArenaKind.MULTI_SEGMENT:
24
+ return multi_segment_arena_1.MultiSegmentArena.allocate(minSize, a);
25
+ case arena_kind_1.ArenaKind.SINGLE_SEGMENT:
26
+ return single_segment_arena_1.SingleSegmentArena.allocate(minSize, segments, a);
27
+ default:
28
+ return errors_1.assertNever(a);
29
+ }
30
+ }
31
+ exports.allocate = allocate;
32
+ function getBuffer(id, a) {
33
+ switch (a.kind) {
34
+ case arena_kind_1.ArenaKind.MULTI_SEGMENT:
35
+ return multi_segment_arena_1.MultiSegmentArena.getBuffer(id, a);
36
+ case arena_kind_1.ArenaKind.SINGLE_SEGMENT:
37
+ return single_segment_arena_1.SingleSegmentArena.getBuffer(id, a);
38
+ default:
39
+ return errors_1.assertNever(a);
40
+ }
41
+ }
42
+ exports.getBuffer = getBuffer;
43
+ function getNumSegments(a) {
44
+ switch (a.kind) {
45
+ case arena_kind_1.ArenaKind.MULTI_SEGMENT:
46
+ return multi_segment_arena_1.MultiSegmentArena.getNumSegments(a);
47
+ case arena_kind_1.ArenaKind.SINGLE_SEGMENT:
48
+ return single_segment_arena_1.SingleSegmentArena.getNumSegments();
49
+ default:
50
+ return errors_1.assertNever(a);
51
+ }
52
+ }
53
+ exports.getNumSegments = getNumSegments;
54
+ //# sourceMappingURL=arena.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"arena.js","sourceRoot":"","sources":["arena.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,0DAA8B;AAC9B,yCAA2C;AAI3C,6CAAyC;AACzC,+DAA0D;AAC1D,iEAA4D;AAE5D,MAAM,KAAK,GAAG,eAAS,CAAC,aAAa,CAAC,CAAC;AACvC,KAAK,CAAC,MAAM,CAAC,CAAC;AAEd,MAAsB,KAAK;;AAA3B,sBAIC;AAHiB,cAAQ,GAAG,QAAQ,CAAC;AACpB,eAAS,GAAG,SAAS,CAAC;AACtB,oBAAc,GAAG,cAAc,CAAC;AAGlD,SAAgB,QAAQ,CAAC,OAAe,EAAE,QAAmB,EAAE,CAAW;IACxE,QAAQ,CAAC,CAAC,IAAI,EAAE;QACd,KAAK,sBAAS,CAAC,aAAa;YAC1B,OAAO,uCAAiB,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAEhD,KAAK,sBAAS,CAAC,cAAc;YAC3B,OAAO,yCAAkB,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;QAE3D;YACE,OAAO,oBAAW,CAAC,CAAC,CAAC,CAAC;KACzB;AACH,CAAC;AAXD,4BAWC;AAED,SAAgB,SAAS,CAAC,EAAU,EAAE,CAAW;IAC/C,QAAQ,CAAC,CAAC,IAAI,EAAE;QACd,KAAK,sBAAS,CAAC,aAAa;YAC1B,OAAO,uCAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAE5C,KAAK,sBAAS,CAAC,cAAc;YAC3B,OAAO,yCAAkB,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAE7C;YACE,OAAO,oBAAW,CAAC,CAAC,CAAC,CAAC;KACzB;AACH,CAAC;AAXD,8BAWC;AAED,SAAgB,cAAc,CAAC,CAAW;IACxC,QAAQ,CAAC,CAAC,IAAI,EAAE;QACd,KAAK,sBAAS,CAAC,aAAa;YAC1B,OAAO,uCAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAE7C,KAAK,sBAAS,CAAC,cAAc;YAC3B,OAAO,yCAAkB,CAAC,cAAc,EAAE,CAAC;QAE7C;YACE,OAAO,oBAAW,CAAC,CAAC,CAAC,CAAC;KACzB;AACH,CAAC;AAXD,wCAWC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/arena.ts ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ import initTrace from "debug";
6
+ import { assertNever } from "../../errors";
7
+ import { Segment } from "../segment";
8
+ import { AnyArena } from "./any-arena";
9
+ import { ArenaAllocationResult } from "./arena-allocation-result";
10
+ import { ArenaKind } from "./arena-kind";
11
+ import { MultiSegmentArena } from "./multi-segment-arena";
12
+ import { SingleSegmentArena } from "./single-segment-arena";
13
+
14
+ const trace = initTrace("capnp:arena");
15
+ trace("load");
16
+
17
+ export abstract class Arena {
18
+ static readonly allocate = allocate;
19
+ static readonly getBuffer = getBuffer;
20
+ static readonly getNumSegments = getNumSegments;
21
+ }
22
+
23
+ export function allocate(minSize: number, segments: Segment[], a: AnyArena): ArenaAllocationResult {
24
+ switch (a.kind) {
25
+ case ArenaKind.MULTI_SEGMENT:
26
+ return MultiSegmentArena.allocate(minSize, a);
27
+
28
+ case ArenaKind.SINGLE_SEGMENT:
29
+ return SingleSegmentArena.allocate(minSize, segments, a);
30
+
31
+ default:
32
+ return assertNever(a);
33
+ }
34
+ }
35
+
36
+ export function getBuffer(id: number, a: AnyArena): ArrayBuffer {
37
+ switch (a.kind) {
38
+ case ArenaKind.MULTI_SEGMENT:
39
+ return MultiSegmentArena.getBuffer(id, a);
40
+
41
+ case ArenaKind.SINGLE_SEGMENT:
42
+ return SingleSegmentArena.getBuffer(id, a);
43
+
44
+ default:
45
+ return assertNever(a);
46
+ }
47
+ }
48
+
49
+ export function getNumSegments(a: AnyArena): number {
50
+ switch (a.kind) {
51
+ case ArenaKind.MULTI_SEGMENT:
52
+ return MultiSegmentArena.getNumSegments(a);
53
+
54
+ case ArenaKind.SINGLE_SEGMENT:
55
+ return SingleSegmentArena.getNumSegments();
56
+
57
+ default:
58
+ return assertNever(a);
59
+ }
60
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.d.ts ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ export { AnyArena } from "./any-arena";
5
+ export { Arena } from "./arena";
6
+ export { ArenaKind } from "./arena-kind";
7
+ export { MultiSegmentArena } from "./multi-segment-arena";
8
+ export { SingleSegmentArena } from "./single-segment-arena";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SingleSegmentArena = exports.MultiSegmentArena = exports.ArenaKind = exports.Arena = void 0;
7
+ var arena_1 = require("./arena");
8
+ Object.defineProperty(exports, "Arena", { enumerable: true, get: function () { return arena_1.Arena; } });
9
+ var arena_kind_1 = require("./arena-kind");
10
+ Object.defineProperty(exports, "ArenaKind", { enumerable: true, get: function () { return arena_kind_1.ArenaKind; } });
11
+ var multi_segment_arena_1 = require("./multi-segment-arena");
12
+ Object.defineProperty(exports, "MultiSegmentArena", { enumerable: true, get: function () { return multi_segment_arena_1.MultiSegmentArena; } });
13
+ var single_segment_arena_1 = require("./single-segment-arena");
14
+ Object.defineProperty(exports, "SingleSegmentArena", { enumerable: true, get: function () { return single_segment_arena_1.SingleSegmentArena; } });
15
+ //# sourceMappingURL=index.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/index.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ export { AnyArena } from "./any-arena";
6
+ export { Arena } from "./arena";
7
+ export { ArenaKind } from "./arena-kind";
8
+ export { MultiSegmentArena } from "./multi-segment-arena";
9
+ export { SingleSegmentArena } from "./single-segment-arena";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.d.ts ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ import { ArenaAllocationResult } from "./arena-allocation-result";
5
+ import { ArenaKind } from "./arena-kind";
6
+ export declare class MultiSegmentArena {
7
+ static readonly allocate: typeof allocate;
8
+ static readonly getBuffer: typeof getBuffer;
9
+ static readonly getNumSegments: typeof getNumSegments;
10
+ readonly buffers: ArrayBuffer[];
11
+ readonly kind = ArenaKind.MULTI_SEGMENT;
12
+ constructor(buffers?: ArrayBuffer[]);
13
+ toString(): string;
14
+ }
15
+ export declare function allocate(minSize: number, m: MultiSegmentArena): ArenaAllocationResult;
16
+ export declare function getBuffer(id: number, m: MultiSegmentArena): ArrayBuffer;
17
+ export declare function getNumSegments(m: MultiSegmentArena): number;
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getNumSegments = exports.getBuffer = exports.allocate = exports.MultiSegmentArena = void 0;
7
+ const tslib_1 = require("tslib");
8
+ const debug_1 = tslib_1.__importDefault(require("debug"));
9
+ const constants_1 = require("../../constants");
10
+ const errors_1 = require("../../errors");
11
+ const util_1 = require("../../util");
12
+ const arena_allocation_result_1 = require("./arena-allocation-result");
13
+ const arena_kind_1 = require("./arena-kind");
14
+ const trace = debug_1.default("capnp:arena:multi");
15
+ trace("load");
16
+ class MultiSegmentArena {
17
+ constructor(buffers = []) {
18
+ this.kind = arena_kind_1.ArenaKind.MULTI_SEGMENT;
19
+ this.buffers = buffers;
20
+ trace("new %s", this);
21
+ }
22
+ toString() {
23
+ return util_1.format("MultiSegmentArena_segments:%d", getNumSegments(this));
24
+ }
25
+ }
26
+ exports.MultiSegmentArena = MultiSegmentArena;
27
+ MultiSegmentArena.allocate = allocate;
28
+ MultiSegmentArena.getBuffer = getBuffer;
29
+ MultiSegmentArena.getNumSegments = getNumSegments;
30
+ function allocate(minSize, m) {
31
+ const b = new ArrayBuffer(util_1.padToWord(Math.max(minSize, constants_1.DEFAULT_BUFFER_SIZE)));
32
+ m.buffers.push(b);
33
+ return new arena_allocation_result_1.ArenaAllocationResult(m.buffers.length - 1, b);
34
+ }
35
+ exports.allocate = allocate;
36
+ function getBuffer(id, m) {
37
+ if (id < 0 || id >= m.buffers.length) {
38
+ throw new Error(util_1.format(errors_1.SEG_ID_OUT_OF_BOUNDS, id));
39
+ }
40
+ return m.buffers[id];
41
+ }
42
+ exports.getBuffer = getBuffer;
43
+ function getNumSegments(m) {
44
+ return m.buffers.length;
45
+ }
46
+ exports.getNumSegments = getNumSegments;
47
+ //# sourceMappingURL=multi-segment-arena.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"multi-segment-arena.js","sourceRoot":"","sources":["multi-segment-arena.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,0DAA8B;AAC9B,+CAAsD;AACtD,yCAAoD;AACpD,qCAA+C;AAC/C,uEAAkE;AAClE,6CAAyC;AAEzC,MAAM,KAAK,GAAG,eAAS,CAAC,mBAAmB,CAAC,CAAC;AAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;AAEd,MAAa,iBAAiB;IAQ5B,YAAY,UAAyB,EAAE;QAF9B,SAAI,GAAG,sBAAS,CAAC,aAAa,CAAC;QAGtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,OAAO,aAAM,CAAC,+BAA+B,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IACvE,CAAC;;AAhBH,8CAiBC;AAhBiB,0BAAQ,GAAG,QAAQ,CAAC;AACpB,2BAAS,GAAG,SAAS,CAAC;AACtB,gCAAc,GAAG,cAAc,CAAC;AAgBlD,SAAgB,QAAQ,CAAC,OAAe,EAAE,CAAoB;IAC5D,MAAM,CAAC,GAAG,IAAI,WAAW,CAAC,gBAAS,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,+BAAmB,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAElB,OAAO,IAAI,+CAAqB,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5D,CAAC;AALD,4BAKC;AAED,SAAgB,SAAS,CAAC,EAAU,EAAE,CAAoB;IACxD,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;QACpC,MAAM,IAAI,KAAK,CAAC,aAAM,CAAC,6BAAoB,EAAE,EAAE,CAAC,CAAC,CAAC;KACnD;IAED,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACvB,CAAC;AAND,8BAMC;AAED,SAAgB,cAAc,CAAC,CAAoB;IACjD,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC;AAFD,wCAEC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/multi-segment-arena.ts ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ import initTrace from "debug";
6
+ import { DEFAULT_BUFFER_SIZE } from "../../constants";
7
+ import { SEG_ID_OUT_OF_BOUNDS } from "../../errors";
8
+ import { padToWord, format } from "../../util";
9
+ import { ArenaAllocationResult } from "./arena-allocation-result";
10
+ import { ArenaKind } from "./arena-kind";
11
+
12
+ const trace = initTrace("capnp:arena:multi");
13
+ trace("load");
14
+
15
+ export class MultiSegmentArena {
16
+ static readonly allocate = allocate;
17
+ static readonly getBuffer = getBuffer;
18
+ static readonly getNumSegments = getNumSegments;
19
+
20
+ readonly buffers: ArrayBuffer[];
21
+ readonly kind = ArenaKind.MULTI_SEGMENT;
22
+
23
+ constructor(buffers: ArrayBuffer[] = []) {
24
+ this.buffers = buffers;
25
+
26
+ trace("new %s", this);
27
+ }
28
+
29
+ toString(): string {
30
+ return format("MultiSegmentArena_segments:%d", getNumSegments(this));
31
+ }
32
+ }
33
+
34
+ export function allocate(minSize: number, m: MultiSegmentArena): ArenaAllocationResult {
35
+ const b = new ArrayBuffer(padToWord(Math.max(minSize, DEFAULT_BUFFER_SIZE)));
36
+ m.buffers.push(b);
37
+
38
+ return new ArenaAllocationResult(m.buffers.length - 1, b);
39
+ }
40
+
41
+ export function getBuffer(id: number, m: MultiSegmentArena): ArrayBuffer {
42
+ if (id < 0 || id >= m.buffers.length) {
43
+ throw new Error(format(SEG_ID_OUT_OF_BOUNDS, id));
44
+ }
45
+
46
+ return m.buffers[id];
47
+ }
48
+
49
+ export function getNumSegments(m: MultiSegmentArena): number {
50
+ return m.buffers.length;
51
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.d.ts ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ import { Segment } from "../segment";
5
+ import { ArenaAllocationResult } from "./arena-allocation-result";
6
+ import { ArenaKind } from "./arena-kind";
7
+ export declare class SingleSegmentArena {
8
+ static readonly allocate: typeof allocate;
9
+ static readonly getBuffer: typeof getBuffer;
10
+ static readonly getNumSegments: typeof getNumSegments;
11
+ buffer: ArrayBuffer;
12
+ readonly kind = ArenaKind.SINGLE_SEGMENT;
13
+ constructor(buffer?: ArrayBuffer);
14
+ toString(): string;
15
+ }
16
+ export declare function allocate(minSize: number, segments: Segment[], s: SingleSegmentArena): ArenaAllocationResult;
17
+ export declare function getBuffer(id: number, s: SingleSegmentArena): ArrayBuffer;
18
+ export declare function getNumSegments(): number;
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.js ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getNumSegments = exports.getBuffer = exports.allocate = exports.SingleSegmentArena = void 0;
7
+ const tslib_1 = require("tslib");
8
+ const debug_1 = tslib_1.__importDefault(require("debug"));
9
+ const constants_1 = require("../../constants");
10
+ const errors_1 = require("../../errors");
11
+ const util_1 = require("../../util");
12
+ const arena_allocation_result_1 = require("./arena-allocation-result");
13
+ const arena_kind_1 = require("./arena-kind");
14
+ const trace = debug_1.default("capnp:arena:single");
15
+ trace("load");
16
+ class SingleSegmentArena {
17
+ constructor(buffer = new ArrayBuffer(constants_1.DEFAULT_BUFFER_SIZE)) {
18
+ this.kind = arena_kind_1.ArenaKind.SINGLE_SEGMENT;
19
+ if ((buffer.byteLength & 7) !== 0) {
20
+ throw new Error(util_1.format(errors_1.SEG_NOT_WORD_ALIGNED, buffer.byteLength));
21
+ }
22
+ this.buffer = buffer;
23
+ trace("new %s", this);
24
+ }
25
+ toString() {
26
+ return util_1.format("SingleSegmentArena_len:%x", this.buffer.byteLength);
27
+ }
28
+ }
29
+ exports.SingleSegmentArena = SingleSegmentArena;
30
+ SingleSegmentArena.allocate = allocate;
31
+ SingleSegmentArena.getBuffer = getBuffer;
32
+ SingleSegmentArena.getNumSegments = getNumSegments;
33
+ function allocate(minSize, segments, s) {
34
+ trace("Allocating %x bytes for segment 0 in %s.", minSize, s);
35
+ const srcBuffer = segments.length > 0 ? segments[0].buffer : s.buffer;
36
+ if (minSize < constants_1.MIN_SINGLE_SEGMENT_GROWTH) {
37
+ minSize = constants_1.MIN_SINGLE_SEGMENT_GROWTH;
38
+ }
39
+ else {
40
+ minSize = util_1.padToWord(minSize);
41
+ }
42
+ s.buffer = new ArrayBuffer(srcBuffer.byteLength + minSize);
43
+ // PERF: Assume that the source and destination buffers are word-aligned and use Float64Array to copy them one word
44
+ // at a time.
45
+ new Float64Array(s.buffer).set(new Float64Array(srcBuffer));
46
+ return new arena_allocation_result_1.ArenaAllocationResult(0, s.buffer);
47
+ }
48
+ exports.allocate = allocate;
49
+ function getBuffer(id, s) {
50
+ if (id !== 0)
51
+ throw new Error(util_1.format(errors_1.SEG_GET_NON_ZERO_SINGLE, id));
52
+ return s.buffer;
53
+ }
54
+ exports.getBuffer = getBuffer;
55
+ function getNumSegments() {
56
+ return 1;
57
+ }
58
+ exports.getNumSegments = getNumSegments;
59
+ //# sourceMappingURL=single-segment-arena.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"single-segment-arena.js","sourceRoot":"","sources":["single-segment-arena.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,0DAA8B;AAC9B,+CAAiF;AACjF,yCAA6E;AAC7E,qCAA+C;AAE/C,uEAAkE;AAClE,6CAAyC;AAEzC,MAAM,KAAK,GAAG,eAAS,CAAC,oBAAoB,CAAC,CAAC;AAC9C,KAAK,CAAC,MAAM,CAAC,CAAC;AAEd,MAAa,kBAAkB;IAQ7B,YAAY,MAAM,GAAG,IAAI,WAAW,CAAC,+BAAmB,CAAC;QAFhD,SAAI,GAAG,sBAAS,CAAC,cAAc,CAAC;QAGvC,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,aAAM,CAAC,6BAAoB,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;SAClE;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,OAAO,aAAM,CAAC,2BAA2B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACrE,CAAC;;AApBH,gDAqBC;AApBiB,2BAAQ,GAAG,QAAQ,CAAC;AACpB,4BAAS,GAAG,SAAS,CAAC;AACtB,iCAAc,GAAG,cAAc,CAAC;AAoBlD,SAAgB,QAAQ,CAAC,OAAe,EAAE,QAAmB,EAAE,CAAqB;IAClF,KAAK,CAAC,0CAA0C,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAE9D,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEtE,IAAI,OAAO,GAAG,qCAAyB,EAAE;QACvC,OAAO,GAAG,qCAAyB,CAAC;KACrC;SAAM;QACL,OAAO,GAAG,gBAAS,CAAC,OAAO,CAAC,CAAC;KAC9B;IAED,CAAC,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,SAAS,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC;IAE3D,mHAAmH;IACnH,aAAa;IACb,IAAI,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IAE5D,OAAO,IAAI,+CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAlBD,4BAkBC;AAED,SAAgB,SAAS,CAAC,EAAU,EAAE,CAAqB;IACzD,IAAI,EAAE,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,aAAM,CAAC,gCAAuB,EAAE,EAAE,CAAC,CAAC,CAAC;IAEnE,OAAO,CAAC,CAAC,MAAM,CAAC;AAClB,CAAC;AAJD,8BAIC;AAED,SAAgB,cAAc;IAC5B,OAAO,CAAC,CAAC;AACX,CAAC;AAFD,wCAEC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/arena/single-segment-arena.ts ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ import initTrace from "debug";
6
+ import { DEFAULT_BUFFER_SIZE, MIN_SINGLE_SEGMENT_GROWTH } from "../../constants";
7
+ import { SEG_GET_NON_ZERO_SINGLE, SEG_NOT_WORD_ALIGNED } from "../../errors";
8
+ import { format, padToWord } from "../../util";
9
+ import { Segment } from "../segment";
10
+ import { ArenaAllocationResult } from "./arena-allocation-result";
11
+ import { ArenaKind } from "./arena-kind";
12
+
13
+ const trace = initTrace("capnp:arena:single");
14
+ trace("load");
15
+
16
+ export class SingleSegmentArena {
17
+ static readonly allocate = allocate;
18
+ static readonly getBuffer = getBuffer;
19
+ static readonly getNumSegments = getNumSegments;
20
+
21
+ buffer: ArrayBuffer;
22
+ readonly kind = ArenaKind.SINGLE_SEGMENT;
23
+
24
+ constructor(buffer = new ArrayBuffer(DEFAULT_BUFFER_SIZE)) {
25
+ if ((buffer.byteLength & 7) !== 0) {
26
+ throw new Error(format(SEG_NOT_WORD_ALIGNED, buffer.byteLength));
27
+ }
28
+
29
+ this.buffer = buffer;
30
+
31
+ trace("new %s", this);
32
+ }
33
+
34
+ toString(): string {
35
+ return format("SingleSegmentArena_len:%x", this.buffer.byteLength);
36
+ }
37
+ }
38
+
39
+ export function allocate(minSize: number, segments: Segment[], s: SingleSegmentArena): ArenaAllocationResult {
40
+ trace("Allocating %x bytes for segment 0 in %s.", minSize, s);
41
+
42
+ const srcBuffer = segments.length > 0 ? segments[0].buffer : s.buffer;
43
+
44
+ if (minSize < MIN_SINGLE_SEGMENT_GROWTH) {
45
+ minSize = MIN_SINGLE_SEGMENT_GROWTH;
46
+ } else {
47
+ minSize = padToWord(minSize);
48
+ }
49
+
50
+ s.buffer = new ArrayBuffer(srcBuffer.byteLength + minSize);
51
+
52
+ // PERF: Assume that the source and destination buffers are word-aligned and use Float64Array to copy them one word
53
+ // at a time.
54
+ new Float64Array(s.buffer).set(new Float64Array(srcBuffer));
55
+
56
+ return new ArenaAllocationResult(0, s.buffer);
57
+ }
58
+
59
+ export function getBuffer(id: number, s: SingleSegmentArena): ArrayBuffer {
60
+ if (id !== 0) throw new Error(format(SEG_GET_NON_ZERO_SINGLE, id));
61
+
62
+ return s.buffer;
63
+ }
64
+
65
+ export function getNumSegments(): number {
66
+ return 1;
67
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.d.ts ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ export * from "./mask";
5
+ export { ListElementSize } from "./list-element-size";
6
+ export { Message, readRawPointer } from "./message";
7
+ export { ObjectSize } from "./object-size";
8
+ export * from "./pointers/index";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ObjectSize = exports.readRawPointer = exports.Message = exports.ListElementSize = void 0;
7
+ const tslib_1 = require("tslib");
8
+ tslib_1.__exportStar(require("./mask"), exports);
9
+ var list_element_size_1 = require("./list-element-size");
10
+ Object.defineProperty(exports, "ListElementSize", { enumerable: true, get: function () { return list_element_size_1.ListElementSize; } });
11
+ var message_1 = require("./message");
12
+ Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return message_1.Message; } });
13
+ Object.defineProperty(exports, "readRawPointer", { enumerable: true, get: function () { return message_1.readRawPointer; } });
14
+ var object_size_1 = require("./object-size");
15
+ Object.defineProperty(exports, "ObjectSize", { enumerable: true, get: function () { return object_size_1.ObjectSize; } });
16
+ tslib_1.__exportStar(require("./pointers/index"), exports);
17
+ //# sourceMappingURL=index.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,iDAAuB;AACvB,yDAAsD;AAA7C,oHAAA,eAAe,OAAA;AACxB,qCAAoD;AAA3C,kGAAA,OAAO,OAAA;AAAE,yGAAA,cAAc,OAAA;AAChC,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,2DAAiC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/index.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ export * from "./mask";
6
+ export { ListElementSize } from "./list-element-size";
7
+ export { Message, readRawPointer } from "./message";
8
+ export { ObjectSize } from "./object-size";
9
+ export * from "./pointers/index";
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.d.ts ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ export declare enum ListElementSize {
5
+ VOID = 0,
6
+ BIT = 1,
7
+ BYTE = 2,
8
+ BYTE_2 = 3,
9
+ BYTE_4 = 4,
10
+ BYTE_8 = 5,
11
+ POINTER = 6,
12
+ COMPOSITE = 7
13
+ }
14
+ export declare const ListElementOffset: number[];
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListElementOffset = exports.ListElementSize = void 0;
7
+ var ListElementSize;
8
+ (function (ListElementSize) {
9
+ ListElementSize[ListElementSize["VOID"] = 0] = "VOID";
10
+ ListElementSize[ListElementSize["BIT"] = 1] = "BIT";
11
+ ListElementSize[ListElementSize["BYTE"] = 2] = "BYTE";
12
+ ListElementSize[ListElementSize["BYTE_2"] = 3] = "BYTE_2";
13
+ ListElementSize[ListElementSize["BYTE_4"] = 4] = "BYTE_4";
14
+ ListElementSize[ListElementSize["BYTE_8"] = 5] = "BYTE_8";
15
+ ListElementSize[ListElementSize["POINTER"] = 6] = "POINTER";
16
+ ListElementSize[ListElementSize["COMPOSITE"] = 7] = "COMPOSITE";
17
+ })(ListElementSize = exports.ListElementSize || (exports.ListElementSize = {}));
18
+ exports.ListElementOffset = [
19
+ 0,
20
+ 0.125,
21
+ 1,
22
+ 2,
23
+ 4,
24
+ 8,
25
+ 8,
26
+ NaN // composite
27
+ ];
28
+ //# sourceMappingURL=list-element-size.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"list-element-size.js","sourceRoot":"","sources":["list-element-size.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,IAAY,eASX;AATD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,mDAAO,CAAA;IACP,qDAAQ,CAAA;IACR,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,2DAAW,CAAA;IACX,+DAAa,CAAA;AACf,CAAC,EATW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAS1B;AAEY,QAAA,iBAAiB,GAAG;IAC/B,CAAC;IACD,KAAK;IACL,CAAC;IACD,CAAC;IACD,CAAC;IACD,CAAC;IACD,CAAC;IACD,GAAG,CAAC,YAAY;CACjB,CAAC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/list-element-size.ts ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ export enum ListElementSize {
6
+ VOID = 0,
7
+ BIT = 1,
8
+ BYTE = 2,
9
+ BYTE_2 = 3,
10
+ BYTE_4 = 4,
11
+ BYTE_8 = 5,
12
+ POINTER = 6,
13
+ COMPOSITE = 7
14
+ }
15
+
16
+ export const ListElementOffset = [
17
+ 0, // void
18
+ 0.125, // bit
19
+ 1, // byte
20
+ 2, // two byte
21
+ 4, // four byte
22
+ 8, // eight byte
23
+ 8, // pointer
24
+ NaN // composite
25
+ ];
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.d.ts ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ import { Int64, Uint64 } from "../types/index";
5
+ export declare const getFloat32Mask: (x: number) => DataView;
6
+ export declare const getFloat64Mask: (x: number) => DataView;
7
+ export declare const getInt16Mask: (x: number) => DataView;
8
+ export declare const getInt32Mask: (x: number) => DataView;
9
+ export declare const getInt8Mask: (x: number) => DataView;
10
+ export declare const getUint16Mask: (x: number) => DataView;
11
+ export declare const getUint32Mask: (x: number) => DataView;
12
+ export declare const getUint8Mask: (x: number) => DataView;
13
+ export declare function getBitMask(value: boolean, bitOffset: number): DataView;
14
+ export declare function getInt64Mask(x: Int64): DataView;
15
+ export declare function getUint64Mask(x: Uint64): DataView;
16
+ export declare function getVoidMask(): void;
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * @author jdiaz5513
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getVoidMask = exports.getUint64Mask = exports.getInt64Mask = exports.getBitMask = exports.getUint8Mask = exports.getUint32Mask = exports.getUint16Mask = exports.getInt8Mask = exports.getInt32Mask = exports.getInt16Mask = exports.getFloat64Mask = exports.getFloat32Mask = void 0;
7
+ const errors_1 = require("../errors");
8
+ function _makePrimitiveMaskFn(byteLength, setter) {
9
+ return (x) => {
10
+ const dv = new DataView(new ArrayBuffer(byteLength));
11
+ setter.call(dv, 0, x, true);
12
+ return dv;
13
+ };
14
+ }
15
+ /* eslint-disable @typescript-eslint/unbound-method */
16
+ exports.getFloat32Mask = _makePrimitiveMaskFn(4, DataView.prototype.setFloat32);
17
+ exports.getFloat64Mask = _makePrimitiveMaskFn(8, DataView.prototype.setFloat64);
18
+ exports.getInt16Mask = _makePrimitiveMaskFn(2, DataView.prototype.setInt16);
19
+ exports.getInt32Mask = _makePrimitiveMaskFn(4, DataView.prototype.setInt32);
20
+ exports.getInt8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setInt8);
21
+ exports.getUint16Mask = _makePrimitiveMaskFn(2, DataView.prototype.setUint16);
22
+ exports.getUint32Mask = _makePrimitiveMaskFn(4, DataView.prototype.setUint32);
23
+ exports.getUint8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setUint8);
24
+ /* eslint-enable */
25
+ function getBitMask(value, bitOffset) {
26
+ const dv = new DataView(new ArrayBuffer(1));
27
+ if (!value)
28
+ return dv;
29
+ dv.setUint8(0, 1 << bitOffset % 8);
30
+ return dv;
31
+ }
32
+ exports.getBitMask = getBitMask;
33
+ function getInt64Mask(x) {
34
+ return x.toDataView();
35
+ }
36
+ exports.getInt64Mask = getInt64Mask;
37
+ function getUint64Mask(x) {
38
+ return x.toDataView();
39
+ }
40
+ exports.getUint64Mask = getUint64Mask;
41
+ function getVoidMask() {
42
+ throw new Error(errors_1.INVARIANT_UNREACHABLE_CODE);
43
+ }
44
+ exports.getVoidMask = getVoidMask;
45
+ //# sourceMappingURL=mask.js.map
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"mask.js","sourceRoot":"","sources":["mask.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,sCAAuD;AAKvD,SAAS,oBAAoB,CAAC,UAAkB,EAAE,MAAsB;IACtE,OAAO,CAAC,CAAS,EAAY,EAAE;QAC7B,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC;AAED,sDAAsD;AACzC,QAAA,cAAc,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AACxE,QAAA,cAAc,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AACxE,QAAA,YAAY,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACpE,QAAA,YAAY,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACpE,QAAA,WAAW,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAClE,QAAA,aAAa,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AACtE,QAAA,aAAa,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AACtE,QAAA,YAAY,GAAG,oBAAoB,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACjF,mBAAmB;AAEnB,SAAgB,UAAU,CAAC,KAAc,EAAE,SAAiB;IAC1D,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5C,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC;IACnC,OAAO,EAAE,CAAC;AACZ,CAAC;AAPD,gCAOC;AAED,SAAgB,YAAY,CAAC,CAAQ;IACnC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;AACxB,CAAC;AAFD,oCAEC;AAED,SAAgB,aAAa,CAAC,CAAS;IACrC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;AACxB,CAAC;AAFD,sCAEC;AAED,SAAgB,WAAW;IACzB,MAAM,IAAI,KAAK,CAAC,mCAA0B,CAAC,CAAC;AAC9C,CAAC;AAFD,kCAEC"}
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/mask.ts ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+
5
+ import { INVARIANT_UNREACHABLE_CODE } from "../errors";
6
+ import { Int64, Uint64 } from "../types/index";
7
+
8
+ type DataViewSetter = (byteOffset: number, value: number, littleEndian?: boolean) => void;
9
+
10
+ function _makePrimitiveMaskFn(byteLength: number, setter: DataViewSetter): (x: number) => DataView {
11
+ return (x: number): DataView => {
12
+ const dv = new DataView(new ArrayBuffer(byteLength));
13
+ setter.call(dv, 0, x, true);
14
+ return dv;
15
+ };
16
+ }
17
+
18
+ /* eslint-disable @typescript-eslint/unbound-method */
19
+ export const getFloat32Mask = _makePrimitiveMaskFn(4, DataView.prototype.setFloat32);
20
+ export const getFloat64Mask = _makePrimitiveMaskFn(8, DataView.prototype.setFloat64);
21
+ export const getInt16Mask = _makePrimitiveMaskFn(2, DataView.prototype.setInt16);
22
+ export const getInt32Mask = _makePrimitiveMaskFn(4, DataView.prototype.setInt32);
23
+ export const getInt8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setInt8);
24
+ export const getUint16Mask = _makePrimitiveMaskFn(2, DataView.prototype.setUint16);
25
+ export const getUint32Mask = _makePrimitiveMaskFn(4, DataView.prototype.setUint32);
26
+ export const getUint8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setUint8);
27
+ /* eslint-enable */
28
+
29
+ export function getBitMask(value: boolean, bitOffset: number): DataView {
30
+ const dv = new DataView(new ArrayBuffer(1));
31
+
32
+ if (!value) return dv;
33
+
34
+ dv.setUint8(0, 1 << bitOffset % 8);
35
+ return dv;
36
+ }
37
+
38
+ export function getInt64Mask(x: Int64): DataView {
39
+ return x.toDataView();
40
+ }
41
+
42
+ export function getUint64Mask(x: Uint64): DataView {
43
+ return x.toDataView();
44
+ }
45
+
46
+ export function getVoidMask(): void {
47
+ throw new Error(INVARIANT_UNREACHABLE_CODE);
48
+ }
workersss/Autovideos-worker/shy-hill-f5c2/node_modules/capnp-ts/src/serialization/message.d.ts ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @author jdiaz5513
3
+ */
4
+ import { AnyArena } from "./arena";
5
+ import { Pointer, StructCtor, Struct } from "./pointers";
6
+ import { Segment } from "./segment";
7
+ export interface _Message {
8
+ readonly arena: AnyArena;
9
+ segments: Segment[];
10
+ traversalLimit: number;
11
+ }
12
+ export declare class Message {
13
+ static readonly allocateSegment: typeof allocateSegment;
14
+ static readonly dump: typeof dump;
15
+ static readonly getRoot: typeof getRoot;
16
+ static readonly getSegment: typeof getSegment;
17
+ static readonly initRoot: typeof initRoot;
18
+ static readonly readRawPointer: typeof readRawPointer;
19
+ static readonly toArrayBuffer: typeof toArrayBuffer;
20
+ static readonly toPackedArrayBuffer: typeof toPackedArrayBuffer;
21
+ readonly _capnp: _Message;
22
+ /**
23
+ * A Cap'n Proto message.
24
+ *
25
+ * SECURITY WARNING: In nodejs do not pass a Buffer's internal array buffer into this constructor. Pass the buffer
26
+ * directly and everything will be fine. If not, your message will potentially be initialized with random memory
27
+ * contents!
28
+ *
29
+ * The constructor method creates a new Message, optionally using a provided arena for segment allocation, or a buffer
30
+ * to read from.
31
+ *
32
+ * @constructor {Message}
33
+ *
34
+ * @param {AnyArena|ArrayBufferView|ArrayBuffer} [src] The source for the message.
35
+ * A value of `undefined` will cause the message to initialize with a single segment arena only big enough for the
36
+ * root pointer; it will expand as you go. This is a reasonable choice for most messages.
37
+ *
38
+ * Passing an arena will cause the message to use that arena for its segment allocation. Contents will be accepted
39
+ * as-is.
40
+ *
41
+ * Passing an array buffer view (like `DataView`, `Uint8Array` or `Buffer`) will create a **copy** of the source
42
+ * buffer; beware of the potential performance cost!
43
+ *
44
+ * @param {boolean} [packed] Whether or not the message is packed. If `true` (the default), the message will be
45
+ * unpacked.
46
+ *
47
+ * @param {boolean} [singleSegment] If true, `src` will be treated as a message consisting of a single segment without
48
+ * a framing header.
49
+ *
50
+ */
51
+ constructor(src?: AnyArena | ArrayBufferView | ArrayBuffer, packed?: boolean, singleSegment?: boolean);
52
+ allocateSegment(byteLength: number): Segment;
53
+ /**
54
+ * Create a pretty-printed string dump of this message; incredibly useful for debugging.
55
+ *
56
+ * WARNING: Do not call this method on large messages!
57
+ *
58
+ * @returns {string} A big steaming pile of pretty hex digits.
59
+ */
60
+ dump(): string;
61
+ /**
62
+ * Get a struct pointer for the root of this message. This is primarily used when reading a message; it will not
63
+ * overwrite existing data.
64
+ *
65
+ * @template T
66
+ * @param {StructCtor<T>} RootStruct The struct type to use as the root.
67
+ * @returns {T} A struct representing the root of the message.
68
+ */
69
+ getRoot<T extends Struct>(RootStruct: StructCtor<T>): T;
70
+ /**
71
+ * Get a segment by its id.
72
+ *
73
+ * This will lazily allocate the first segment if it doesn't already exist.
74
+ *
75
+ * @param {number} id The segment id.
76
+ * @returns {Segment} The requested segment.
77
+ */
78
+ getSegment(id: number): Segment;
79
+ /**
80
+ * Initialize a new message using the provided struct type as the root.
81
+ *
82
+ * @template T
83
+ * @param {StructCtor<T>} RootStruct The struct type to use as the root.
84
+ * @returns {T} An initialized struct pointing to the root of the message.
85
+ */
86
+ initRoot<T extends Struct>(RootStruct: StructCtor<T>): T;
87
+ /**
88
+ * Set the root of the message to a copy of the given pointer. Used internally
89
+ * to make copies of pointers for default values.
90
+ *
91
+ * @param {Pointer} src The source pointer to copy.
92
+ * @returns {void}
93
+ */
94
+ setRoot(src: Pointer): void;
95
+ /**
96
+ * Combine the contents of this message's segments into a single array buffer and prepend a stream framing header
97
+ * containing information about the following segment data.
98
+ *
99
+ * @returns {ArrayBuffer} An ArrayBuffer with the contents of this message.
100
+ */
101
+ toArrayBuffer(): ArrayBuffer;
102
+ /**
103
+ * Like `toArrayBuffer()`, but also applies the packing algorithm to the output. This is typically what you want to
104
+ * use if you're sending the message over a network link or other slow I/O interface where size matters.
105
+ *
106
+ * @returns {ArrayBuffer} A packed message.
107
+ */
108
+ toPackedArrayBuffer(): ArrayBuffer;
109
+ toString(): string;
110
+ }
111
+ export interface CreateMessageOptions {
112
+ packed?: boolean;
113
+ singleSegment?: boolean;
114
+ }
115
+ export declare function initMessage(src?: AnyArena | ArrayBufferView | ArrayBuffer, packed?: boolean, singleSegment?: boolean): _Message;
116
+ /**
117
+ * Given an _unpacked_ message with a segment framing header, this will generate an ArrayBuffer for each segment in
118
+ * the message.
119
+ *
120
+ * This method is not typically called directly, but can be useful in certain cases.
121
+ *
122
+ * @static
123
+ * @param {ArrayBuffer} message An unpacked message with a framing header.
124
+ * @returns {ArrayBuffer[]} An array of buffers containing the segment data.
125
+ */
126
+ export declare function getFramedSegments(message: ArrayBuffer): ArrayBuffer[];
127
+ /**
128
+ * This method is called on messages that were constructed with existing data to prepopulate the segments array with
129
+ * everything we can find in the arena. Each segment will have it's `byteLength` set to the size of its buffer.
130
+ *
131
+ * Technically speaking, the message's segments will be "full" after calling this function. Calling this on your own
132
+ * may void your warranty.
133
+ *
134
+ * @param {Message} m The message to allocate.
135
+ * @returns {void}
136
+ */
137
+ export declare function preallocateSegments(m: Message): void;
138
+ export declare function allocateSegment(byteLength: number, m: Message): Segment;
139
+ export declare function dump(m: Message): string;
140
+ export declare function getRoot<T extends Struct>(RootStruct: StructCtor<T>, m: Message): T;
141
+ export declare function getSegment(id: number, m: Message): Segment;
142
+ export declare function initRoot<T extends Struct>(RootStruct: StructCtor<T>, m: Message): T;
143
+ /**
144
+ * Read a pointer in raw form (a packed message with framing headers). Does not
145
+ * care or attempt to validate the input beyond parsing the message
146
+ * segments.
147
+ *
148
+ * This is typically used by the compiler to load default values, but can be
149
+ * useful to work with messages with an unknown schema.
150
+ *
151
+ * @param {ArrayBuffer} data The raw data to read.
152
+ * @returns {Pointer} A root pointer.
153
+ */
154
+ export declare function readRawPointer(data: ArrayBuffer): Pointer;
155
+ export declare function setRoot(src: Pointer, m: Message): void;
156
+ export declare function toArrayBuffer(m: Message): ArrayBuffer;
157
+ export declare function toPackedArrayBuffer(m: Message): ArrayBuffer;
158
+ export declare function getStreamFrame(m: Message): ArrayBuffer;