@nxtedition/types 23.0.31 → 23.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +22 -1
- package/dist/app.js +254 -6
- package/dist/common/render-preset.js +230 -22
- package/dist/common/render-profile.d.ts +17 -0
- package/dist/common/render-profile.js +344 -18
- package/dist/common/render-query.js +830 -169
- package/dist/common/render-scene.d.ts +7 -0
- package/dist/common/render-scene.js +1258 -144
- package/dist/common/settings.d.ts +19 -4
- package/dist/common/settings.js +1719 -1483
- package/dist/domains/event.d.ts +21 -19
- package/dist/domains/event.js +460 -44
- package/dist/domains/media.d.ts +4 -0
- package/dist/domains/media.js +827 -89
- package/dist/domains/publish.js +10806 -3560
- package/dist/domains/render.js +826 -163
- package/dist/domains/settings.js +1725 -1504
- package/dist/index.d.ts +12 -1
- package/dist/schema.json +325 -20
- package/package.json +1 -1
package/dist/domains/media.js
CHANGED
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isMediaSourceRecord = input => {
|
|
3
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
3
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io2(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io5(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io7(input.transcribe));
|
|
4
4
|
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
5
|
-
const $io2 = input =>
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
6
|
+
const value = input[key];
|
|
7
|
+
if (undefined === value)
|
|
8
|
+
return true;
|
|
9
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value);
|
|
10
|
+
});
|
|
11
|
+
const $io3 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io4(input.styleOverrides));
|
|
12
|
+
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
13
|
+
const $io5 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io6(input.crop);
|
|
14
|
+
const $io6 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
15
|
+
const $io7 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
8
16
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
9
17
|
};
|
|
10
18
|
export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
11
19
|
const __is = input => {
|
|
12
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
20
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io2(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io5(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io7(input.transcribe));
|
|
13
21
|
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
14
|
-
const $io2 = input =>
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
23
|
+
const value = input[key];
|
|
24
|
+
if (undefined === value)
|
|
25
|
+
return true;
|
|
26
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value);
|
|
27
|
+
});
|
|
28
|
+
const $io3 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io4(input.styleOverrides));
|
|
29
|
+
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
30
|
+
const $io5 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io6(input.crop);
|
|
31
|
+
const $io6 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
32
|
+
const $io7 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
17
33
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
18
34
|
};
|
|
19
35
|
if (false === __is(input))
|
|
20
36
|
((input, _path, _exceptionable = true) => {
|
|
21
37
|
const $guard = __typia.createAssert.guard;
|
|
38
|
+
const $join = __typia.createAssert.join;
|
|
22
39
|
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.id || "string" === typeof input.id || $guard(_exceptionable, {
|
|
23
40
|
path: _path + ".id",
|
|
24
41
|
expected: "(string | undefined)",
|
|
@@ -43,13 +60,21 @@ export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
|
43
60
|
path: _path + ".subtitle",
|
|
44
61
|
expected: "(string | undefined)",
|
|
45
62
|
value: input.subtitle
|
|
63
|
+
}, errorFactory)) && (undefined === input.subtitleTracks || ("object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) || $guard(_exceptionable, {
|
|
64
|
+
path: _path + ".subtitleTracks",
|
|
65
|
+
expected: "(__type.o1 | undefined)",
|
|
66
|
+
value: input.subtitleTracks
|
|
67
|
+
}, errorFactory)) && $ao2(input.subtitleTracks, _path + ".subtitleTracks", true && _exceptionable) || $guard(_exceptionable, {
|
|
68
|
+
path: _path + ".subtitleTracks",
|
|
69
|
+
expected: "(__type.o1 | undefined)",
|
|
70
|
+
value: input.subtitleTracks
|
|
46
71
|
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
47
72
|
path: _path + ".video",
|
|
48
|
-
expected: "(__type.
|
|
73
|
+
expected: "(__type.o3 | undefined)",
|
|
49
74
|
value: input.video
|
|
50
|
-
}, errorFactory)) && $
|
|
75
|
+
}, errorFactory)) && $ao5(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
51
76
|
path: _path + ".video",
|
|
52
|
-
expected: "(__type.
|
|
77
|
+
expected: "(__type.o3 | undefined)",
|
|
53
78
|
value: input.video
|
|
54
79
|
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
55
80
|
path: _path + ".start",
|
|
@@ -61,11 +86,11 @@ export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
|
61
86
|
value: input.end
|
|
62
87
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
63
88
|
path: _path + ".transcribe",
|
|
64
|
-
expected: "(__type.
|
|
89
|
+
expected: "(__type.o5 | undefined)",
|
|
65
90
|
value: input.transcribe
|
|
66
|
-
}, errorFactory)) && $
|
|
91
|
+
}, errorFactory)) && $ao7(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
67
92
|
path: _path + ".transcribe",
|
|
68
|
-
expected: "(__type.
|
|
93
|
+
expected: "(__type.o5 | undefined)",
|
|
69
94
|
value: input.transcribe
|
|
70
95
|
}, errorFactory));
|
|
71
96
|
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
@@ -77,16 +102,136 @@ export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
|
77
102
|
expected: "(null | string | undefined)",
|
|
78
103
|
value: input.file
|
|
79
104
|
}, errorFactory));
|
|
80
|
-
const $ao2 = (input, _path, _exceptionable = true) =>
|
|
105
|
+
const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
106
|
+
const value = input[key];
|
|
107
|
+
if (undefined === value)
|
|
108
|
+
return true;
|
|
109
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
110
|
+
path: _path + $join(key),
|
|
111
|
+
expected: "__type.o2",
|
|
112
|
+
value: value
|
|
113
|
+
}, errorFactory)) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
114
|
+
path: _path + $join(key),
|
|
115
|
+
expected: "__type.o2",
|
|
116
|
+
value: value
|
|
117
|
+
}, errorFactory);
|
|
118
|
+
});
|
|
119
|
+
const $ao3 = (input, _path, _exceptionable = true) => (null === input.style || undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
120
|
+
path: _path + ".style",
|
|
121
|
+
expected: "(null | string | undefined)",
|
|
122
|
+
value: input.style
|
|
123
|
+
}, errorFactory)) && (undefined === input.styleOverrides || ("object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) || $guard(_exceptionable, {
|
|
124
|
+
path: _path + ".styleOverrides",
|
|
125
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
126
|
+
value: input.styleOverrides
|
|
127
|
+
}, errorFactory)) && $ao4(input.styleOverrides, _path + ".styleOverrides", true && _exceptionable) || $guard(_exceptionable, {
|
|
128
|
+
path: _path + ".styleOverrides",
|
|
129
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
130
|
+
value: input.styleOverrides
|
|
131
|
+
}, errorFactory));
|
|
132
|
+
const $ao4 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
133
|
+
path: _path + ".name",
|
|
134
|
+
expected: "(string | undefined)",
|
|
135
|
+
value: input.name
|
|
136
|
+
}, errorFactory)) && (undefined === input.fontname || "string" === typeof input.fontname || $guard(_exceptionable, {
|
|
137
|
+
path: _path + ".fontname",
|
|
138
|
+
expected: "(string | undefined)",
|
|
139
|
+
value: input.fontname
|
|
140
|
+
}, errorFactory)) && (undefined === input.fontsize || "string" === typeof input.fontsize || $guard(_exceptionable, {
|
|
141
|
+
path: _path + ".fontsize",
|
|
142
|
+
expected: "(string | undefined)",
|
|
143
|
+
value: input.fontsize
|
|
144
|
+
}, errorFactory)) && (undefined === input.primaryColour || "string" === typeof input.primaryColour || $guard(_exceptionable, {
|
|
145
|
+
path: _path + ".primaryColour",
|
|
146
|
+
expected: "(string | undefined)",
|
|
147
|
+
value: input.primaryColour
|
|
148
|
+
}, errorFactory)) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour || $guard(_exceptionable, {
|
|
149
|
+
path: _path + ".secondaryColour",
|
|
150
|
+
expected: "(string | undefined)",
|
|
151
|
+
value: input.secondaryColour
|
|
152
|
+
}, errorFactory)) && (undefined === input.outlineColour || "string" === typeof input.outlineColour || $guard(_exceptionable, {
|
|
153
|
+
path: _path + ".outlineColour",
|
|
154
|
+
expected: "(string | undefined)",
|
|
155
|
+
value: input.outlineColour
|
|
156
|
+
}, errorFactory)) && (undefined === input.backColour || "string" === typeof input.backColour || $guard(_exceptionable, {
|
|
157
|
+
path: _path + ".backColour",
|
|
158
|
+
expected: "(string | undefined)",
|
|
159
|
+
value: input.backColour
|
|
160
|
+
}, errorFactory)) && (undefined === input.bold || "string" === typeof input.bold || $guard(_exceptionable, {
|
|
161
|
+
path: _path + ".bold",
|
|
162
|
+
expected: "(string | undefined)",
|
|
163
|
+
value: input.bold
|
|
164
|
+
}, errorFactory)) && (undefined === input.italic || "string" === typeof input.italic || $guard(_exceptionable, {
|
|
165
|
+
path: _path + ".italic",
|
|
166
|
+
expected: "(string | undefined)",
|
|
167
|
+
value: input.italic
|
|
168
|
+
}, errorFactory)) && (undefined === input.underline || "string" === typeof input.underline || $guard(_exceptionable, {
|
|
169
|
+
path: _path + ".underline",
|
|
170
|
+
expected: "(string | undefined)",
|
|
171
|
+
value: input.underline
|
|
172
|
+
}, errorFactory)) && (undefined === input.strikeOut || "string" === typeof input.strikeOut || $guard(_exceptionable, {
|
|
173
|
+
path: _path + ".strikeOut",
|
|
174
|
+
expected: "(string | undefined)",
|
|
175
|
+
value: input.strikeOut
|
|
176
|
+
}, errorFactory)) && (undefined === input.scaleX || "string" === typeof input.scaleX || $guard(_exceptionable, {
|
|
177
|
+
path: _path + ".scaleX",
|
|
178
|
+
expected: "(string | undefined)",
|
|
179
|
+
value: input.scaleX
|
|
180
|
+
}, errorFactory)) && (undefined === input.scaleY || "string" === typeof input.scaleY || $guard(_exceptionable, {
|
|
181
|
+
path: _path + ".scaleY",
|
|
182
|
+
expected: "(string | undefined)",
|
|
183
|
+
value: input.scaleY
|
|
184
|
+
}, errorFactory)) && (undefined === input.spacing || "string" === typeof input.spacing || $guard(_exceptionable, {
|
|
185
|
+
path: _path + ".spacing",
|
|
186
|
+
expected: "(string | undefined)",
|
|
187
|
+
value: input.spacing
|
|
188
|
+
}, errorFactory)) && (undefined === input.angle || "string" === typeof input.angle || $guard(_exceptionable, {
|
|
189
|
+
path: _path + ".angle",
|
|
190
|
+
expected: "(string | undefined)",
|
|
191
|
+
value: input.angle
|
|
192
|
+
}, errorFactory)) && (undefined === input.borderStyle || "string" === typeof input.borderStyle || $guard(_exceptionable, {
|
|
193
|
+
path: _path + ".borderStyle",
|
|
194
|
+
expected: "(string | undefined)",
|
|
195
|
+
value: input.borderStyle
|
|
196
|
+
}, errorFactory)) && (undefined === input.outline || "string" === typeof input.outline || $guard(_exceptionable, {
|
|
197
|
+
path: _path + ".outline",
|
|
198
|
+
expected: "(string | undefined)",
|
|
199
|
+
value: input.outline
|
|
200
|
+
}, errorFactory)) && (undefined === input.shadow || "string" === typeof input.shadow || $guard(_exceptionable, {
|
|
201
|
+
path: _path + ".shadow",
|
|
202
|
+
expected: "(string | undefined)",
|
|
203
|
+
value: input.shadow
|
|
204
|
+
}, errorFactory)) && (undefined === input.alignment || "string" === typeof input.alignment || $guard(_exceptionable, {
|
|
205
|
+
path: _path + ".alignment",
|
|
206
|
+
expected: "(string | undefined)",
|
|
207
|
+
value: input.alignment
|
|
208
|
+
}, errorFactory)) && (undefined === input.marginL || "string" === typeof input.marginL || $guard(_exceptionable, {
|
|
209
|
+
path: _path + ".marginL",
|
|
210
|
+
expected: "(string | undefined)",
|
|
211
|
+
value: input.marginL
|
|
212
|
+
}, errorFactory)) && (undefined === input.marginR || "string" === typeof input.marginR || $guard(_exceptionable, {
|
|
213
|
+
path: _path + ".marginR",
|
|
214
|
+
expected: "(string | undefined)",
|
|
215
|
+
value: input.marginR
|
|
216
|
+
}, errorFactory)) && (undefined === input.marginV || "string" === typeof input.marginV || $guard(_exceptionable, {
|
|
217
|
+
path: _path + ".marginV",
|
|
218
|
+
expected: "(string | undefined)",
|
|
219
|
+
value: input.marginV
|
|
220
|
+
}, errorFactory)) && (undefined === input.encoding || "string" === typeof input.encoding || $guard(_exceptionable, {
|
|
221
|
+
path: _path + ".encoding",
|
|
222
|
+
expected: "(string | undefined)",
|
|
223
|
+
value: input.encoding
|
|
224
|
+
}, errorFactory));
|
|
225
|
+
const $ao5 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
81
226
|
path: _path + ".crop",
|
|
82
|
-
expected: "(__type.
|
|
227
|
+
expected: "(__type.o4 | undefined)",
|
|
83
228
|
value: input.crop
|
|
84
|
-
}, errorFactory)) && $
|
|
229
|
+
}, errorFactory)) && $ao6(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
85
230
|
path: _path + ".crop",
|
|
86
|
-
expected: "(__type.
|
|
231
|
+
expected: "(__type.o4 | undefined)",
|
|
87
232
|
value: input.crop
|
|
88
233
|
}, errorFactory);
|
|
89
|
-
const $
|
|
234
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x || $guard(_exceptionable, {
|
|
90
235
|
path: _path + ".x",
|
|
91
236
|
expected: "(number | undefined)",
|
|
92
237
|
value: input.x
|
|
@@ -103,7 +248,7 @@ export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
|
103
248
|
expected: "(number | undefined)",
|
|
104
249
|
value: input.height
|
|
105
250
|
}, errorFactory));
|
|
106
|
-
const $
|
|
251
|
+
const $ao7 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
107
252
|
path: _path + ".language",
|
|
108
253
|
expected: "(string | undefined)",
|
|
109
254
|
value: input.language
|
|
@@ -156,10 +301,14 @@ export const randomMediaSourceRecord = generator => {
|
|
|
156
301
|
() => undefined,
|
|
157
302
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
158
303
|
])(),
|
|
159
|
-
|
|
304
|
+
subtitleTracks: $pick([
|
|
160
305
|
() => undefined,
|
|
161
306
|
() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
162
307
|
])(),
|
|
308
|
+
video: $pick([
|
|
309
|
+
() => undefined,
|
|
310
|
+
() => $ro5(_recursive, _recursive ? 1 + _depth : _depth)
|
|
311
|
+
])(),
|
|
163
312
|
start: $pick([
|
|
164
313
|
() => undefined,
|
|
165
314
|
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
@@ -170,7 +319,7 @@ export const randomMediaSourceRecord = generator => {
|
|
|
170
319
|
])(),
|
|
171
320
|
transcribe: $pick([
|
|
172
321
|
() => undefined,
|
|
173
|
-
() => $
|
|
322
|
+
() => $ro7(_recursive, _recursive ? 1 + _depth : _depth)
|
|
174
323
|
])()
|
|
175
324
|
});
|
|
176
325
|
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
@@ -184,13 +333,123 @@ export const randomMediaSourceRecord = generator => {
|
|
|
184
333
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
185
334
|
])()
|
|
186
335
|
});
|
|
187
|
-
const $ro2 = (_recursive = false, _depth = 0) =>
|
|
336
|
+
const $ro2 = (_recursive = false, _depth = 0) => {
|
|
337
|
+
const output = {};
|
|
338
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $ro3(_recursive, _recursive ? 1 + _depth : _depth), (generator?.integer ?? $generator.integer)(0, 3));
|
|
339
|
+
return output;
|
|
340
|
+
};
|
|
341
|
+
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
342
|
+
style: $pick([
|
|
343
|
+
() => undefined,
|
|
344
|
+
() => null,
|
|
345
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
346
|
+
])(),
|
|
347
|
+
styleOverrides: $pick([
|
|
348
|
+
() => undefined,
|
|
349
|
+
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
350
|
+
])()
|
|
351
|
+
});
|
|
352
|
+
const $ro4 = (_recursive = false, _depth = 0) => ({
|
|
353
|
+
name: $pick([
|
|
354
|
+
() => undefined,
|
|
355
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
356
|
+
])(),
|
|
357
|
+
fontname: $pick([
|
|
358
|
+
() => undefined,
|
|
359
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
360
|
+
])(),
|
|
361
|
+
fontsize: $pick([
|
|
362
|
+
() => undefined,
|
|
363
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
364
|
+
])(),
|
|
365
|
+
primaryColour: $pick([
|
|
366
|
+
() => undefined,
|
|
367
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
368
|
+
])(),
|
|
369
|
+
secondaryColour: $pick([
|
|
370
|
+
() => undefined,
|
|
371
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
372
|
+
])(),
|
|
373
|
+
outlineColour: $pick([
|
|
374
|
+
() => undefined,
|
|
375
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
376
|
+
])(),
|
|
377
|
+
backColour: $pick([
|
|
378
|
+
() => undefined,
|
|
379
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
380
|
+
])(),
|
|
381
|
+
bold: $pick([
|
|
382
|
+
() => undefined,
|
|
383
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
384
|
+
])(),
|
|
385
|
+
italic: $pick([
|
|
386
|
+
() => undefined,
|
|
387
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
388
|
+
])(),
|
|
389
|
+
underline: $pick([
|
|
390
|
+
() => undefined,
|
|
391
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
392
|
+
])(),
|
|
393
|
+
strikeOut: $pick([
|
|
394
|
+
() => undefined,
|
|
395
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
396
|
+
])(),
|
|
397
|
+
scaleX: $pick([
|
|
398
|
+
() => undefined,
|
|
399
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
400
|
+
])(),
|
|
401
|
+
scaleY: $pick([
|
|
402
|
+
() => undefined,
|
|
403
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
404
|
+
])(),
|
|
405
|
+
spacing: $pick([
|
|
406
|
+
() => undefined,
|
|
407
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
408
|
+
])(),
|
|
409
|
+
angle: $pick([
|
|
410
|
+
() => undefined,
|
|
411
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
412
|
+
])(),
|
|
413
|
+
borderStyle: $pick([
|
|
414
|
+
() => undefined,
|
|
415
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
416
|
+
])(),
|
|
417
|
+
outline: $pick([
|
|
418
|
+
() => undefined,
|
|
419
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
420
|
+
])(),
|
|
421
|
+
shadow: $pick([
|
|
422
|
+
() => undefined,
|
|
423
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
424
|
+
])(),
|
|
425
|
+
alignment: $pick([
|
|
426
|
+
() => undefined,
|
|
427
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
428
|
+
])(),
|
|
429
|
+
marginL: $pick([
|
|
430
|
+
() => undefined,
|
|
431
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
432
|
+
])(),
|
|
433
|
+
marginR: $pick([
|
|
434
|
+
() => undefined,
|
|
435
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
436
|
+
])(),
|
|
437
|
+
marginV: $pick([
|
|
438
|
+
() => undefined,
|
|
439
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
440
|
+
])(),
|
|
441
|
+
encoding: $pick([
|
|
442
|
+
() => undefined,
|
|
443
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
444
|
+
])()
|
|
445
|
+
});
|
|
446
|
+
const $ro5 = (_recursive = false, _depth = 0) => ({
|
|
188
447
|
crop: $pick([
|
|
189
448
|
() => undefined,
|
|
190
|
-
() => $
|
|
449
|
+
() => $ro6(_recursive, _recursive ? 1 + _depth : _depth)
|
|
191
450
|
])()
|
|
192
451
|
});
|
|
193
|
-
const $
|
|
452
|
+
const $ro6 = (_recursive = false, _depth = 0) => ({
|
|
194
453
|
x: $pick([
|
|
195
454
|
() => undefined,
|
|
196
455
|
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
@@ -208,7 +467,7 @@ export const randomMediaSourceRecord = generator => {
|
|
|
208
467
|
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
209
468
|
])()
|
|
210
469
|
});
|
|
211
|
-
const $
|
|
470
|
+
const $ro7 = (_recursive = false, _depth = 0) => ({
|
|
212
471
|
language: $pick([
|
|
213
472
|
() => undefined,
|
|
214
473
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
@@ -222,16 +481,25 @@ export const randomMediaSourceRecord = generator => {
|
|
|
222
481
|
};
|
|
223
482
|
export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
224
483
|
const __is = input => {
|
|
225
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
484
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io2(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io5(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io7(input.transcribe));
|
|
226
485
|
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
227
|
-
const $io2 = input =>
|
|
228
|
-
|
|
229
|
-
|
|
486
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
487
|
+
const value = input[key];
|
|
488
|
+
if (undefined === value)
|
|
489
|
+
return true;
|
|
490
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value);
|
|
491
|
+
});
|
|
492
|
+
const $io3 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io4(input.styleOverrides));
|
|
493
|
+
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
494
|
+
const $io5 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io6(input.crop);
|
|
495
|
+
const $io6 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
496
|
+
const $io7 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
230
497
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
231
498
|
};
|
|
232
499
|
if (false === __is(input))
|
|
233
500
|
((input, _path, _exceptionable = true) => {
|
|
234
501
|
const $guard = __typia.createAssertGuard.guard;
|
|
502
|
+
const $join = __typia.createAssertGuard.join;
|
|
235
503
|
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.id || "string" === typeof input.id || $guard(_exceptionable, {
|
|
236
504
|
path: _path + ".id",
|
|
237
505
|
expected: "(string | undefined)",
|
|
@@ -256,13 +524,21 @@ export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
|
256
524
|
path: _path + ".subtitle",
|
|
257
525
|
expected: "(string | undefined)",
|
|
258
526
|
value: input.subtitle
|
|
527
|
+
}, errorFactory)) && (undefined === input.subtitleTracks || ("object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) || $guard(_exceptionable, {
|
|
528
|
+
path: _path + ".subtitleTracks",
|
|
529
|
+
expected: "(__type.o1 | undefined)",
|
|
530
|
+
value: input.subtitleTracks
|
|
531
|
+
}, errorFactory)) && $ao2(input.subtitleTracks, _path + ".subtitleTracks", true && _exceptionable) || $guard(_exceptionable, {
|
|
532
|
+
path: _path + ".subtitleTracks",
|
|
533
|
+
expected: "(__type.o1 | undefined)",
|
|
534
|
+
value: input.subtitleTracks
|
|
259
535
|
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
260
536
|
path: _path + ".video",
|
|
261
|
-
expected: "(__type.
|
|
537
|
+
expected: "(__type.o3 | undefined)",
|
|
262
538
|
value: input.video
|
|
263
|
-
}, errorFactory)) && $
|
|
539
|
+
}, errorFactory)) && $ao5(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
264
540
|
path: _path + ".video",
|
|
265
|
-
expected: "(__type.
|
|
541
|
+
expected: "(__type.o3 | undefined)",
|
|
266
542
|
value: input.video
|
|
267
543
|
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
268
544
|
path: _path + ".start",
|
|
@@ -274,11 +550,11 @@ export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
|
274
550
|
value: input.end
|
|
275
551
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
276
552
|
path: _path + ".transcribe",
|
|
277
|
-
expected: "(__type.
|
|
553
|
+
expected: "(__type.o5 | undefined)",
|
|
278
554
|
value: input.transcribe
|
|
279
|
-
}, errorFactory)) && $
|
|
555
|
+
}, errorFactory)) && $ao7(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
280
556
|
path: _path + ".transcribe",
|
|
281
|
-
expected: "(__type.
|
|
557
|
+
expected: "(__type.o5 | undefined)",
|
|
282
558
|
value: input.transcribe
|
|
283
559
|
}, errorFactory));
|
|
284
560
|
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
@@ -290,16 +566,136 @@ export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
|
290
566
|
expected: "(null | string | undefined)",
|
|
291
567
|
value: input.file
|
|
292
568
|
}, errorFactory));
|
|
293
|
-
const $ao2 = (input, _path, _exceptionable = true) =>
|
|
569
|
+
const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
570
|
+
const value = input[key];
|
|
571
|
+
if (undefined === value)
|
|
572
|
+
return true;
|
|
573
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
574
|
+
path: _path + $join(key),
|
|
575
|
+
expected: "__type.o2",
|
|
576
|
+
value: value
|
|
577
|
+
}, errorFactory)) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
578
|
+
path: _path + $join(key),
|
|
579
|
+
expected: "__type.o2",
|
|
580
|
+
value: value
|
|
581
|
+
}, errorFactory);
|
|
582
|
+
});
|
|
583
|
+
const $ao3 = (input, _path, _exceptionable = true) => (null === input.style || undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
584
|
+
path: _path + ".style",
|
|
585
|
+
expected: "(null | string | undefined)",
|
|
586
|
+
value: input.style
|
|
587
|
+
}, errorFactory)) && (undefined === input.styleOverrides || ("object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) || $guard(_exceptionable, {
|
|
588
|
+
path: _path + ".styleOverrides",
|
|
589
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
590
|
+
value: input.styleOverrides
|
|
591
|
+
}, errorFactory)) && $ao4(input.styleOverrides, _path + ".styleOverrides", true && _exceptionable) || $guard(_exceptionable, {
|
|
592
|
+
path: _path + ".styleOverrides",
|
|
593
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
594
|
+
value: input.styleOverrides
|
|
595
|
+
}, errorFactory));
|
|
596
|
+
const $ao4 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
597
|
+
path: _path + ".name",
|
|
598
|
+
expected: "(string | undefined)",
|
|
599
|
+
value: input.name
|
|
600
|
+
}, errorFactory)) && (undefined === input.fontname || "string" === typeof input.fontname || $guard(_exceptionable, {
|
|
601
|
+
path: _path + ".fontname",
|
|
602
|
+
expected: "(string | undefined)",
|
|
603
|
+
value: input.fontname
|
|
604
|
+
}, errorFactory)) && (undefined === input.fontsize || "string" === typeof input.fontsize || $guard(_exceptionable, {
|
|
605
|
+
path: _path + ".fontsize",
|
|
606
|
+
expected: "(string | undefined)",
|
|
607
|
+
value: input.fontsize
|
|
608
|
+
}, errorFactory)) && (undefined === input.primaryColour || "string" === typeof input.primaryColour || $guard(_exceptionable, {
|
|
609
|
+
path: _path + ".primaryColour",
|
|
610
|
+
expected: "(string | undefined)",
|
|
611
|
+
value: input.primaryColour
|
|
612
|
+
}, errorFactory)) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour || $guard(_exceptionable, {
|
|
613
|
+
path: _path + ".secondaryColour",
|
|
614
|
+
expected: "(string | undefined)",
|
|
615
|
+
value: input.secondaryColour
|
|
616
|
+
}, errorFactory)) && (undefined === input.outlineColour || "string" === typeof input.outlineColour || $guard(_exceptionable, {
|
|
617
|
+
path: _path + ".outlineColour",
|
|
618
|
+
expected: "(string | undefined)",
|
|
619
|
+
value: input.outlineColour
|
|
620
|
+
}, errorFactory)) && (undefined === input.backColour || "string" === typeof input.backColour || $guard(_exceptionable, {
|
|
621
|
+
path: _path + ".backColour",
|
|
622
|
+
expected: "(string | undefined)",
|
|
623
|
+
value: input.backColour
|
|
624
|
+
}, errorFactory)) && (undefined === input.bold || "string" === typeof input.bold || $guard(_exceptionable, {
|
|
625
|
+
path: _path + ".bold",
|
|
626
|
+
expected: "(string | undefined)",
|
|
627
|
+
value: input.bold
|
|
628
|
+
}, errorFactory)) && (undefined === input.italic || "string" === typeof input.italic || $guard(_exceptionable, {
|
|
629
|
+
path: _path + ".italic",
|
|
630
|
+
expected: "(string | undefined)",
|
|
631
|
+
value: input.italic
|
|
632
|
+
}, errorFactory)) && (undefined === input.underline || "string" === typeof input.underline || $guard(_exceptionable, {
|
|
633
|
+
path: _path + ".underline",
|
|
634
|
+
expected: "(string | undefined)",
|
|
635
|
+
value: input.underline
|
|
636
|
+
}, errorFactory)) && (undefined === input.strikeOut || "string" === typeof input.strikeOut || $guard(_exceptionable, {
|
|
637
|
+
path: _path + ".strikeOut",
|
|
638
|
+
expected: "(string | undefined)",
|
|
639
|
+
value: input.strikeOut
|
|
640
|
+
}, errorFactory)) && (undefined === input.scaleX || "string" === typeof input.scaleX || $guard(_exceptionable, {
|
|
641
|
+
path: _path + ".scaleX",
|
|
642
|
+
expected: "(string | undefined)",
|
|
643
|
+
value: input.scaleX
|
|
644
|
+
}, errorFactory)) && (undefined === input.scaleY || "string" === typeof input.scaleY || $guard(_exceptionable, {
|
|
645
|
+
path: _path + ".scaleY",
|
|
646
|
+
expected: "(string | undefined)",
|
|
647
|
+
value: input.scaleY
|
|
648
|
+
}, errorFactory)) && (undefined === input.spacing || "string" === typeof input.spacing || $guard(_exceptionable, {
|
|
649
|
+
path: _path + ".spacing",
|
|
650
|
+
expected: "(string | undefined)",
|
|
651
|
+
value: input.spacing
|
|
652
|
+
}, errorFactory)) && (undefined === input.angle || "string" === typeof input.angle || $guard(_exceptionable, {
|
|
653
|
+
path: _path + ".angle",
|
|
654
|
+
expected: "(string | undefined)",
|
|
655
|
+
value: input.angle
|
|
656
|
+
}, errorFactory)) && (undefined === input.borderStyle || "string" === typeof input.borderStyle || $guard(_exceptionable, {
|
|
657
|
+
path: _path + ".borderStyle",
|
|
658
|
+
expected: "(string | undefined)",
|
|
659
|
+
value: input.borderStyle
|
|
660
|
+
}, errorFactory)) && (undefined === input.outline || "string" === typeof input.outline || $guard(_exceptionable, {
|
|
661
|
+
path: _path + ".outline",
|
|
662
|
+
expected: "(string | undefined)",
|
|
663
|
+
value: input.outline
|
|
664
|
+
}, errorFactory)) && (undefined === input.shadow || "string" === typeof input.shadow || $guard(_exceptionable, {
|
|
665
|
+
path: _path + ".shadow",
|
|
666
|
+
expected: "(string | undefined)",
|
|
667
|
+
value: input.shadow
|
|
668
|
+
}, errorFactory)) && (undefined === input.alignment || "string" === typeof input.alignment || $guard(_exceptionable, {
|
|
669
|
+
path: _path + ".alignment",
|
|
670
|
+
expected: "(string | undefined)",
|
|
671
|
+
value: input.alignment
|
|
672
|
+
}, errorFactory)) && (undefined === input.marginL || "string" === typeof input.marginL || $guard(_exceptionable, {
|
|
673
|
+
path: _path + ".marginL",
|
|
674
|
+
expected: "(string | undefined)",
|
|
675
|
+
value: input.marginL
|
|
676
|
+
}, errorFactory)) && (undefined === input.marginR || "string" === typeof input.marginR || $guard(_exceptionable, {
|
|
677
|
+
path: _path + ".marginR",
|
|
678
|
+
expected: "(string | undefined)",
|
|
679
|
+
value: input.marginR
|
|
680
|
+
}, errorFactory)) && (undefined === input.marginV || "string" === typeof input.marginV || $guard(_exceptionable, {
|
|
681
|
+
path: _path + ".marginV",
|
|
682
|
+
expected: "(string | undefined)",
|
|
683
|
+
value: input.marginV
|
|
684
|
+
}, errorFactory)) && (undefined === input.encoding || "string" === typeof input.encoding || $guard(_exceptionable, {
|
|
685
|
+
path: _path + ".encoding",
|
|
686
|
+
expected: "(string | undefined)",
|
|
687
|
+
value: input.encoding
|
|
688
|
+
}, errorFactory));
|
|
689
|
+
const $ao5 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
294
690
|
path: _path + ".crop",
|
|
295
|
-
expected: "(__type.
|
|
691
|
+
expected: "(__type.o4 | undefined)",
|
|
296
692
|
value: input.crop
|
|
297
|
-
}, errorFactory)) && $
|
|
693
|
+
}, errorFactory)) && $ao6(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
298
694
|
path: _path + ".crop",
|
|
299
|
-
expected: "(__type.
|
|
695
|
+
expected: "(__type.o4 | undefined)",
|
|
300
696
|
value: input.crop
|
|
301
697
|
}, errorFactory);
|
|
302
|
-
const $
|
|
698
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x || $guard(_exceptionable, {
|
|
303
699
|
path: _path + ".x",
|
|
304
700
|
expected: "(number | undefined)",
|
|
305
701
|
value: input.x
|
|
@@ -316,7 +712,7 @@ export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
|
316
712
|
expected: "(number | undefined)",
|
|
317
713
|
value: input.height
|
|
318
714
|
}, errorFactory));
|
|
319
|
-
const $
|
|
715
|
+
const $ao7 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
320
716
|
path: _path + ".language",
|
|
321
717
|
expected: "(string | undefined)",
|
|
322
718
|
value: input.language
|
|
@@ -346,30 +742,51 @@ export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
|
346
742
|
};
|
|
347
743
|
export const stringifyMediaSourceRecord = input => {
|
|
348
744
|
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
349
|
-
const $io2 = input =>
|
|
350
|
-
|
|
351
|
-
|
|
745
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
746
|
+
const value = input[key];
|
|
747
|
+
if (undefined === value)
|
|
748
|
+
return true;
|
|
749
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value);
|
|
750
|
+
});
|
|
751
|
+
const $io3 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io4(input.styleOverrides));
|
|
752
|
+
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
753
|
+
const $io5 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io6(input.crop);
|
|
754
|
+
const $io6 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
755
|
+
const $io7 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
352
756
|
const $string = __typia.json.createStringify.string;
|
|
353
757
|
const $tail = __typia.json.createStringify.tail;
|
|
354
|
-
const $so0 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $
|
|
758
|
+
const $so0 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.subtitleTracks ? "" : `"subtitleTracks":${undefined !== input.subtitleTracks ? $so2(input.subtitleTracks) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so5(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so7(input.transcribe) : undefined}`}`)}}`;
|
|
355
759
|
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? null !== input.file ? $string(input.file) : "null" : undefined}`}`)}}`;
|
|
356
|
-
const $so2 = input => `{${
|
|
357
|
-
|
|
358
|
-
const $
|
|
760
|
+
const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
761
|
+
return ""; return `${JSON.stringify(key)}:${$so3(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
762
|
+
const $so3 = input => `{${$tail(`${undefined === input.style ? "" : `"style":${undefined !== input.style ? null !== input.style ? $string(input.style) : "null" : undefined},`}${undefined === input.styleOverrides ? "" : `"styleOverrides":${undefined !== input.styleOverrides ? $so4(input.styleOverrides) : undefined}`}`)}}`;
|
|
763
|
+
const $so4 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined}`}`)}}`;
|
|
764
|
+
const $so5 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so6(input.crop) : undefined}`}`)}}`;
|
|
765
|
+
const $so6 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
766
|
+
const $so7 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
359
767
|
return $so0(input);
|
|
360
768
|
};
|
|
361
769
|
export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
362
770
|
const __is = input => {
|
|
363
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
771
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io2(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io5(input.video)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end)) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io7(input.transcribe));
|
|
364
772
|
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
365
|
-
const $io2 = input =>
|
|
366
|
-
|
|
367
|
-
|
|
773
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
774
|
+
const value = input[key];
|
|
775
|
+
if (undefined === value)
|
|
776
|
+
return true;
|
|
777
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value);
|
|
778
|
+
});
|
|
779
|
+
const $io3 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io4(input.styleOverrides));
|
|
780
|
+
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
781
|
+
const $io5 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io6(input.crop);
|
|
782
|
+
const $io6 = input => (undefined === input.x || "number" === typeof input.x && !Number.isNaN(input.x)) && (undefined === input.y || "number" === typeof input.y && !Number.isNaN(input.y)) && (undefined === input.width || "number" === typeof input.width && !Number.isNaN(input.width)) && (undefined === input.height || "number" === typeof input.height && !Number.isNaN(input.height));
|
|
783
|
+
const $io7 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem && !Number.isNaN(elem)));
|
|
368
784
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
369
785
|
};
|
|
370
786
|
if (false === __is(input))
|
|
371
787
|
((input, _path, _exceptionable = true) => {
|
|
372
788
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
789
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
373
790
|
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.id || "string" === typeof input.id || $guard(_exceptionable, {
|
|
374
791
|
path: _path + ".id",
|
|
375
792
|
expected: "(string | undefined)",
|
|
@@ -394,13 +811,21 @@ export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const
|
|
|
394
811
|
path: _path + ".subtitle",
|
|
395
812
|
expected: "(string | undefined)",
|
|
396
813
|
value: input.subtitle
|
|
814
|
+
}, errorFactory)) && (undefined === input.subtitleTracks || ("object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) || $guard(_exceptionable, {
|
|
815
|
+
path: _path + ".subtitleTracks",
|
|
816
|
+
expected: "(__type.o1 | undefined)",
|
|
817
|
+
value: input.subtitleTracks
|
|
818
|
+
}, errorFactory)) && $ao2(input.subtitleTracks, _path + ".subtitleTracks", true && _exceptionable) || $guard(_exceptionable, {
|
|
819
|
+
path: _path + ".subtitleTracks",
|
|
820
|
+
expected: "(__type.o1 | undefined)",
|
|
821
|
+
value: input.subtitleTracks
|
|
397
822
|
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
398
823
|
path: _path + ".video",
|
|
399
|
-
expected: "(__type.
|
|
824
|
+
expected: "(__type.o3 | undefined)",
|
|
400
825
|
value: input.video
|
|
401
|
-
}, errorFactory)) && $
|
|
826
|
+
}, errorFactory)) && $ao5(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
402
827
|
path: _path + ".video",
|
|
403
|
-
expected: "(__type.
|
|
828
|
+
expected: "(__type.o3 | undefined)",
|
|
404
829
|
value: input.video
|
|
405
830
|
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
|
|
406
831
|
path: _path + ".start",
|
|
@@ -412,11 +837,11 @@ export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const
|
|
|
412
837
|
value: input.end
|
|
413
838
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
414
839
|
path: _path + ".transcribe",
|
|
415
|
-
expected: "(__type.
|
|
840
|
+
expected: "(__type.o5 | undefined)",
|
|
416
841
|
value: input.transcribe
|
|
417
|
-
}, errorFactory)) && $
|
|
842
|
+
}, errorFactory)) && $ao7(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
418
843
|
path: _path + ".transcribe",
|
|
419
|
-
expected: "(__type.
|
|
844
|
+
expected: "(__type.o5 | undefined)",
|
|
420
845
|
value: input.transcribe
|
|
421
846
|
}, errorFactory));
|
|
422
847
|
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
@@ -428,16 +853,136 @@ export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const
|
|
|
428
853
|
expected: "(null | string | undefined)",
|
|
429
854
|
value: input.file
|
|
430
855
|
}, errorFactory));
|
|
431
|
-
const $ao2 = (input, _path, _exceptionable = true) =>
|
|
856
|
+
const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
857
|
+
const value = input[key];
|
|
858
|
+
if (undefined === value)
|
|
859
|
+
return true;
|
|
860
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
861
|
+
path: _path + $join(key),
|
|
862
|
+
expected: "__type.o2",
|
|
863
|
+
value: value
|
|
864
|
+
}, errorFactory)) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
865
|
+
path: _path + $join(key),
|
|
866
|
+
expected: "__type.o2",
|
|
867
|
+
value: value
|
|
868
|
+
}, errorFactory);
|
|
869
|
+
});
|
|
870
|
+
const $ao3 = (input, _path, _exceptionable = true) => (null === input.style || undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
871
|
+
path: _path + ".style",
|
|
872
|
+
expected: "(null | string | undefined)",
|
|
873
|
+
value: input.style
|
|
874
|
+
}, errorFactory)) && (undefined === input.styleOverrides || ("object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) || $guard(_exceptionable, {
|
|
875
|
+
path: _path + ".styleOverrides",
|
|
876
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
877
|
+
value: input.styleOverrides
|
|
878
|
+
}, errorFactory)) && $ao4(input.styleOverrides, _path + ".styleOverrides", true && _exceptionable) || $guard(_exceptionable, {
|
|
879
|
+
path: _path + ".styleOverrides",
|
|
880
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
881
|
+
value: input.styleOverrides
|
|
882
|
+
}, errorFactory));
|
|
883
|
+
const $ao4 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
884
|
+
path: _path + ".name",
|
|
885
|
+
expected: "(string | undefined)",
|
|
886
|
+
value: input.name
|
|
887
|
+
}, errorFactory)) && (undefined === input.fontname || "string" === typeof input.fontname || $guard(_exceptionable, {
|
|
888
|
+
path: _path + ".fontname",
|
|
889
|
+
expected: "(string | undefined)",
|
|
890
|
+
value: input.fontname
|
|
891
|
+
}, errorFactory)) && (undefined === input.fontsize || "string" === typeof input.fontsize || $guard(_exceptionable, {
|
|
892
|
+
path: _path + ".fontsize",
|
|
893
|
+
expected: "(string | undefined)",
|
|
894
|
+
value: input.fontsize
|
|
895
|
+
}, errorFactory)) && (undefined === input.primaryColour || "string" === typeof input.primaryColour || $guard(_exceptionable, {
|
|
896
|
+
path: _path + ".primaryColour",
|
|
897
|
+
expected: "(string | undefined)",
|
|
898
|
+
value: input.primaryColour
|
|
899
|
+
}, errorFactory)) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour || $guard(_exceptionable, {
|
|
900
|
+
path: _path + ".secondaryColour",
|
|
901
|
+
expected: "(string | undefined)",
|
|
902
|
+
value: input.secondaryColour
|
|
903
|
+
}, errorFactory)) && (undefined === input.outlineColour || "string" === typeof input.outlineColour || $guard(_exceptionable, {
|
|
904
|
+
path: _path + ".outlineColour",
|
|
905
|
+
expected: "(string | undefined)",
|
|
906
|
+
value: input.outlineColour
|
|
907
|
+
}, errorFactory)) && (undefined === input.backColour || "string" === typeof input.backColour || $guard(_exceptionable, {
|
|
908
|
+
path: _path + ".backColour",
|
|
909
|
+
expected: "(string | undefined)",
|
|
910
|
+
value: input.backColour
|
|
911
|
+
}, errorFactory)) && (undefined === input.bold || "string" === typeof input.bold || $guard(_exceptionable, {
|
|
912
|
+
path: _path + ".bold",
|
|
913
|
+
expected: "(string | undefined)",
|
|
914
|
+
value: input.bold
|
|
915
|
+
}, errorFactory)) && (undefined === input.italic || "string" === typeof input.italic || $guard(_exceptionable, {
|
|
916
|
+
path: _path + ".italic",
|
|
917
|
+
expected: "(string | undefined)",
|
|
918
|
+
value: input.italic
|
|
919
|
+
}, errorFactory)) && (undefined === input.underline || "string" === typeof input.underline || $guard(_exceptionable, {
|
|
920
|
+
path: _path + ".underline",
|
|
921
|
+
expected: "(string | undefined)",
|
|
922
|
+
value: input.underline
|
|
923
|
+
}, errorFactory)) && (undefined === input.strikeOut || "string" === typeof input.strikeOut || $guard(_exceptionable, {
|
|
924
|
+
path: _path + ".strikeOut",
|
|
925
|
+
expected: "(string | undefined)",
|
|
926
|
+
value: input.strikeOut
|
|
927
|
+
}, errorFactory)) && (undefined === input.scaleX || "string" === typeof input.scaleX || $guard(_exceptionable, {
|
|
928
|
+
path: _path + ".scaleX",
|
|
929
|
+
expected: "(string | undefined)",
|
|
930
|
+
value: input.scaleX
|
|
931
|
+
}, errorFactory)) && (undefined === input.scaleY || "string" === typeof input.scaleY || $guard(_exceptionable, {
|
|
932
|
+
path: _path + ".scaleY",
|
|
933
|
+
expected: "(string | undefined)",
|
|
934
|
+
value: input.scaleY
|
|
935
|
+
}, errorFactory)) && (undefined === input.spacing || "string" === typeof input.spacing || $guard(_exceptionable, {
|
|
936
|
+
path: _path + ".spacing",
|
|
937
|
+
expected: "(string | undefined)",
|
|
938
|
+
value: input.spacing
|
|
939
|
+
}, errorFactory)) && (undefined === input.angle || "string" === typeof input.angle || $guard(_exceptionable, {
|
|
940
|
+
path: _path + ".angle",
|
|
941
|
+
expected: "(string | undefined)",
|
|
942
|
+
value: input.angle
|
|
943
|
+
}, errorFactory)) && (undefined === input.borderStyle || "string" === typeof input.borderStyle || $guard(_exceptionable, {
|
|
944
|
+
path: _path + ".borderStyle",
|
|
945
|
+
expected: "(string | undefined)",
|
|
946
|
+
value: input.borderStyle
|
|
947
|
+
}, errorFactory)) && (undefined === input.outline || "string" === typeof input.outline || $guard(_exceptionable, {
|
|
948
|
+
path: _path + ".outline",
|
|
949
|
+
expected: "(string | undefined)",
|
|
950
|
+
value: input.outline
|
|
951
|
+
}, errorFactory)) && (undefined === input.shadow || "string" === typeof input.shadow || $guard(_exceptionable, {
|
|
952
|
+
path: _path + ".shadow",
|
|
953
|
+
expected: "(string | undefined)",
|
|
954
|
+
value: input.shadow
|
|
955
|
+
}, errorFactory)) && (undefined === input.alignment || "string" === typeof input.alignment || $guard(_exceptionable, {
|
|
956
|
+
path: _path + ".alignment",
|
|
957
|
+
expected: "(string | undefined)",
|
|
958
|
+
value: input.alignment
|
|
959
|
+
}, errorFactory)) && (undefined === input.marginL || "string" === typeof input.marginL || $guard(_exceptionable, {
|
|
960
|
+
path: _path + ".marginL",
|
|
961
|
+
expected: "(string | undefined)",
|
|
962
|
+
value: input.marginL
|
|
963
|
+
}, errorFactory)) && (undefined === input.marginR || "string" === typeof input.marginR || $guard(_exceptionable, {
|
|
964
|
+
path: _path + ".marginR",
|
|
965
|
+
expected: "(string | undefined)",
|
|
966
|
+
value: input.marginR
|
|
967
|
+
}, errorFactory)) && (undefined === input.marginV || "string" === typeof input.marginV || $guard(_exceptionable, {
|
|
968
|
+
path: _path + ".marginV",
|
|
969
|
+
expected: "(string | undefined)",
|
|
970
|
+
value: input.marginV
|
|
971
|
+
}, errorFactory)) && (undefined === input.encoding || "string" === typeof input.encoding || $guard(_exceptionable, {
|
|
972
|
+
path: _path + ".encoding",
|
|
973
|
+
expected: "(string | undefined)",
|
|
974
|
+
value: input.encoding
|
|
975
|
+
}, errorFactory));
|
|
976
|
+
const $ao5 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
432
977
|
path: _path + ".crop",
|
|
433
|
-
expected: "(__type.
|
|
978
|
+
expected: "(__type.o4 | undefined)",
|
|
434
979
|
value: input.crop
|
|
435
|
-
}, errorFactory)) && $
|
|
980
|
+
}, errorFactory)) && $ao6(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
436
981
|
path: _path + ".crop",
|
|
437
|
-
expected: "(__type.
|
|
982
|
+
expected: "(__type.o4 | undefined)",
|
|
438
983
|
value: input.crop
|
|
439
984
|
}, errorFactory);
|
|
440
|
-
const $
|
|
985
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x && !Number.isNaN(input.x) || $guard(_exceptionable, {
|
|
441
986
|
path: _path + ".x",
|
|
442
987
|
expected: "(number | undefined)",
|
|
443
988
|
value: input.x
|
|
@@ -454,7 +999,7 @@ export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const
|
|
|
454
999
|
expected: "(number | undefined)",
|
|
455
1000
|
value: input.height
|
|
456
1001
|
}, errorFactory));
|
|
457
|
-
const $
|
|
1002
|
+
const $ao7 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
458
1003
|
path: _path + ".language",
|
|
459
1004
|
expected: "(string | undefined)",
|
|
460
1005
|
value: input.language
|
|
@@ -484,35 +1029,49 @@ export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const
|
|
|
484
1029
|
return input;
|
|
485
1030
|
}; const stringify = input => {
|
|
486
1031
|
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
487
|
-
const $io2 = input =>
|
|
488
|
-
|
|
489
|
-
|
|
1032
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
1033
|
+
const value = input[key];
|
|
1034
|
+
if (undefined === value)
|
|
1035
|
+
return true;
|
|
1036
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value);
|
|
1037
|
+
});
|
|
1038
|
+
const $io3 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io4(input.styleOverrides));
|
|
1039
|
+
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
1040
|
+
const $io5 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io6(input.crop);
|
|
1041
|
+
const $io6 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
1042
|
+
const $io7 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
490
1043
|
const $string = __typia.json.createAssertStringify.string;
|
|
491
1044
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
492
|
-
const $so0 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $
|
|
1045
|
+
const $so0 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.subtitleTracks ? "" : `"subtitleTracks":${undefined !== input.subtitleTracks ? $so2(input.subtitleTracks) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so5(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so7(input.transcribe) : undefined}`}`)}}`;
|
|
493
1046
|
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? null !== input.file ? $string(input.file) : "null" : undefined}`}`)}}`;
|
|
494
|
-
const $so2 = input => `{${
|
|
495
|
-
|
|
496
|
-
const $
|
|
1047
|
+
const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1048
|
+
return ""; return `${JSON.stringify(key)}:${$so3(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
1049
|
+
const $so3 = input => `{${$tail(`${undefined === input.style ? "" : `"style":${undefined !== input.style ? null !== input.style ? $string(input.style) : "null" : undefined},`}${undefined === input.styleOverrides ? "" : `"styleOverrides":${undefined !== input.styleOverrides ? $so4(input.styleOverrides) : undefined}`}`)}}`;
|
|
1050
|
+
const $so4 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined}`}`)}}`;
|
|
1051
|
+
const $so5 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so6(input.crop) : undefined}`}`)}}`;
|
|
1052
|
+
const $so6 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
1053
|
+
const $so7 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
497
1054
|
return $so0(input);
|
|
498
1055
|
}; return stringify(assert(input, errorFactory)); };
|
|
499
1056
|
export const isMediaConsolidateRecord = input => {
|
|
500
1057
|
const $io0 = input => true && true && (null !== input.preset && (undefined === input.preset || "string" === typeof input.preset || "object" === typeof input.preset && null !== input.preset && $io1(input.preset))) && true;
|
|
501
1058
|
const $io1 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io2(elem))) || "object" === typeof input.profile && null !== input.profile && $io2(input.profile))));
|
|
502
|
-
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1059
|
+
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io6(input.subtitle)));
|
|
503
1060
|
const $io3 = input => "string" === typeof input.engine;
|
|
504
1061
|
const $io4 = input => "string" === typeof input.language;
|
|
505
1062
|
const $io5 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1063
|
+
const $io6 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
506
1064
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
507
1065
|
};
|
|
508
1066
|
export const assertMediaConsolidateRecord = (input, errorFactory) => {
|
|
509
1067
|
const __is = input => {
|
|
510
1068
|
const $io0 = input => true && true && (null !== input.preset && (undefined === input.preset || "string" === typeof input.preset || "object" === typeof input.preset && null !== input.preset && $io1(input.preset))) && true;
|
|
511
1069
|
const $io1 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io2(elem))) || "object" === typeof input.profile && null !== input.profile && $io2(input.profile))));
|
|
512
|
-
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1070
|
+
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io6(input.subtitle)));
|
|
513
1071
|
const $io3 = input => "string" === typeof input.engine;
|
|
514
1072
|
const $io4 = input => "string" === typeof input.language;
|
|
515
1073
|
const $io5 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1074
|
+
const $io6 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
516
1075
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
517
1076
|
};
|
|
518
1077
|
if (false === __is(input))
|
|
@@ -608,7 +1167,19 @@ export const assertMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
608
1167
|
path: _path + ".pick",
|
|
609
1168
|
expected: "(Array<string> | undefined)",
|
|
610
1169
|
value: input.pick
|
|
611
|
-
}, errorFactory))
|
|
1170
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
1171
|
+
path: _path + ".subtitle",
|
|
1172
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1173
|
+
value: input.subtitle
|
|
1174
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
1175
|
+
path: _path + ".subtitle",
|
|
1176
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1177
|
+
value: input.subtitle
|
|
1178
|
+
}, errorFactory)) && $ao6(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
1179
|
+
path: _path + ".subtitle",
|
|
1180
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1181
|
+
value: input.subtitle
|
|
1182
|
+
}, errorFactory)));
|
|
612
1183
|
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
613
1184
|
path: _path + ".engine",
|
|
614
1185
|
expected: "string",
|
|
@@ -624,6 +1195,15 @@ export const assertMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
624
1195
|
expected: "(string | undefined)",
|
|
625
1196
|
value: input.pan
|
|
626
1197
|
}, errorFactory);
|
|
1198
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
1199
|
+
path: _path + ".lang",
|
|
1200
|
+
expected: "(string | undefined)",
|
|
1201
|
+
value: input.lang
|
|
1202
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
1203
|
+
path: _path + ".style",
|
|
1204
|
+
expected: "(string | undefined)",
|
|
1205
|
+
value: input.style
|
|
1206
|
+
}, errorFactory));
|
|
627
1207
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
628
1208
|
path: _path + "",
|
|
629
1209
|
expected: "MediaConsolidateRecord",
|
|
@@ -690,6 +1270,11 @@ export const randomMediaConsolidateRecord = generator => {
|
|
|
690
1270
|
pick: $pick([
|
|
691
1271
|
() => undefined,
|
|
692
1272
|
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
1273
|
+
])(),
|
|
1274
|
+
subtitle: $pick([
|
|
1275
|
+
() => undefined,
|
|
1276
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1277
|
+
() => $ro6(_recursive, _recursive ? 1 + _depth : _depth)
|
|
693
1278
|
])()
|
|
694
1279
|
});
|
|
695
1280
|
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
@@ -704,16 +1289,27 @@ export const randomMediaConsolidateRecord = generator => {
|
|
|
704
1289
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
705
1290
|
])()
|
|
706
1291
|
});
|
|
1292
|
+
const $ro6 = (_recursive = false, _depth = 0) => ({
|
|
1293
|
+
lang: $pick([
|
|
1294
|
+
() => undefined,
|
|
1295
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
1296
|
+
])(),
|
|
1297
|
+
style: $pick([
|
|
1298
|
+
() => undefined,
|
|
1299
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
1300
|
+
])()
|
|
1301
|
+
});
|
|
707
1302
|
return $ro0();
|
|
708
1303
|
};
|
|
709
1304
|
export const assertGuardMediaConsolidateRecord = (input, errorFactory) => {
|
|
710
1305
|
const __is = input => {
|
|
711
1306
|
const $io0 = input => true && true && (null !== input.preset && (undefined === input.preset || "string" === typeof input.preset || "object" === typeof input.preset && null !== input.preset && $io1(input.preset))) && true;
|
|
712
1307
|
const $io1 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io2(elem))) || "object" === typeof input.profile && null !== input.profile && $io2(input.profile))));
|
|
713
|
-
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1308
|
+
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io6(input.subtitle)));
|
|
714
1309
|
const $io3 = input => "string" === typeof input.engine;
|
|
715
1310
|
const $io4 = input => "string" === typeof input.language;
|
|
716
1311
|
const $io5 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1312
|
+
const $io6 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
717
1313
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
718
1314
|
};
|
|
719
1315
|
if (false === __is(input))
|
|
@@ -809,7 +1405,19 @@ export const assertGuardMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
809
1405
|
path: _path + ".pick",
|
|
810
1406
|
expected: "(Array<string> | undefined)",
|
|
811
1407
|
value: input.pick
|
|
812
|
-
}, errorFactory))
|
|
1408
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
1409
|
+
path: _path + ".subtitle",
|
|
1410
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1411
|
+
value: input.subtitle
|
|
1412
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
1413
|
+
path: _path + ".subtitle",
|
|
1414
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1415
|
+
value: input.subtitle
|
|
1416
|
+
}, errorFactory)) && $ao6(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
1417
|
+
path: _path + ".subtitle",
|
|
1418
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1419
|
+
value: input.subtitle
|
|
1420
|
+
}, errorFactory)));
|
|
813
1421
|
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
814
1422
|
path: _path + ".engine",
|
|
815
1423
|
expected: "string",
|
|
@@ -825,6 +1433,15 @@ export const assertGuardMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
825
1433
|
expected: "(string | undefined)",
|
|
826
1434
|
value: input.pan
|
|
827
1435
|
}, errorFactory);
|
|
1436
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
1437
|
+
path: _path + ".lang",
|
|
1438
|
+
expected: "(string | undefined)",
|
|
1439
|
+
value: input.lang
|
|
1440
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
1441
|
+
path: _path + ".style",
|
|
1442
|
+
expected: "(string | undefined)",
|
|
1443
|
+
value: input.style
|
|
1444
|
+
}, errorFactory));
|
|
828
1445
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
829
1446
|
path: _path + "",
|
|
830
1447
|
expected: "MediaConsolidateRecord",
|
|
@@ -838,10 +1455,11 @@ export const assertGuardMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
838
1455
|
};
|
|
839
1456
|
export const stringifyMediaConsolidateRecord = input => {
|
|
840
1457
|
const $io1 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io2(elem))) || "object" === typeof input.profile && null !== input.profile && $io2(input.profile))));
|
|
841
|
-
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1458
|
+
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io6(input.subtitle)));
|
|
842
1459
|
const $io3 = input => "string" === typeof input.engine;
|
|
843
1460
|
const $io4 = input => "string" === typeof input.language;
|
|
844
1461
|
const $io5 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1462
|
+
const $io6 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
845
1463
|
const $string = __typia.json.createStringify.string;
|
|
846
1464
|
const $throws = __typia.json.createStringify.throws;
|
|
847
1465
|
const $tail = __typia.json.createStringify.tail;
|
|
@@ -876,18 +1494,29 @@ export const stringifyMediaConsolidateRecord = input => {
|
|
|
876
1494
|
value: input.profile
|
|
877
1495
|
});
|
|
878
1496
|
})()}}`;
|
|
879
|
-
const $so2 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so5(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"
|
|
1497
|
+
const $so2 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so5(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
|
|
1498
|
+
if ("string" === typeof input.subtitle)
|
|
1499
|
+
return $string(input.subtitle);
|
|
1500
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
1501
|
+
return $so6(input.subtitle);
|
|
1502
|
+
$throws({
|
|
1503
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1504
|
+
value: input.subtitle
|
|
1505
|
+
});
|
|
1506
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
880
1507
|
const $so5 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
1508
|
+
const $so6 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
881
1509
|
return $so0(input);
|
|
882
1510
|
};
|
|
883
1511
|
export const assertStringifyMediaConsolidateRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
884
1512
|
const __is = input => {
|
|
885
1513
|
const $io0 = input => true && true && (null !== input.preset && (undefined === input.preset || "string" === typeof input.preset || "object" === typeof input.preset && null !== input.preset && $io1(input.preset))) && true;
|
|
886
1514
|
const $io1 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io2(elem))) || "object" === typeof input.profile && null !== input.profile && $io2(input.profile))));
|
|
887
|
-
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1515
|
+
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io6(input.subtitle)));
|
|
888
1516
|
const $io3 = input => "string" === typeof input.engine;
|
|
889
1517
|
const $io4 = input => "string" === typeof input.language;
|
|
890
1518
|
const $io5 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1519
|
+
const $io6 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
891
1520
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
892
1521
|
};
|
|
893
1522
|
if (false === __is(input))
|
|
@@ -983,7 +1612,19 @@ export const assertStringifyMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
983
1612
|
path: _path + ".pick",
|
|
984
1613
|
expected: "(Array<string> | undefined)",
|
|
985
1614
|
value: input.pick
|
|
986
|
-
}, errorFactory))
|
|
1615
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
1616
|
+
path: _path + ".subtitle",
|
|
1617
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1618
|
+
value: input.subtitle
|
|
1619
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
1620
|
+
path: _path + ".subtitle",
|
|
1621
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1622
|
+
value: input.subtitle
|
|
1623
|
+
}, errorFactory)) && $ao6(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
1624
|
+
path: _path + ".subtitle",
|
|
1625
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1626
|
+
value: input.subtitle
|
|
1627
|
+
}, errorFactory)));
|
|
987
1628
|
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
988
1629
|
path: _path + ".engine",
|
|
989
1630
|
expected: "string",
|
|
@@ -999,6 +1640,15 @@ export const assertStringifyMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
999
1640
|
expected: "(string | undefined)",
|
|
1000
1641
|
value: input.pan
|
|
1001
1642
|
}, errorFactory);
|
|
1643
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
1644
|
+
path: _path + ".lang",
|
|
1645
|
+
expected: "(string | undefined)",
|
|
1646
|
+
value: input.lang
|
|
1647
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
1648
|
+
path: _path + ".style",
|
|
1649
|
+
expected: "(string | undefined)",
|
|
1650
|
+
value: input.style
|
|
1651
|
+
}, errorFactory));
|
|
1002
1652
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1003
1653
|
path: _path + "",
|
|
1004
1654
|
expected: "MediaConsolidateRecord",
|
|
@@ -1012,10 +1662,11 @@ export const assertStringifyMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
1012
1662
|
return input;
|
|
1013
1663
|
}; const stringify = input => {
|
|
1014
1664
|
const $io1 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io2(elem))) || "object" === typeof input.profile && null !== input.profile && $io2(input.profile))));
|
|
1015
|
-
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1665
|
+
const $io2 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io3(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io4(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io5(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io6(input.subtitle)));
|
|
1016
1666
|
const $io3 = input => "string" === typeof input.engine;
|
|
1017
1667
|
const $io4 = input => "string" === typeof input.language;
|
|
1018
1668
|
const $io5 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1669
|
+
const $io6 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
1019
1670
|
const $string = __typia.json.createAssertStringify.string;
|
|
1020
1671
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
1021
1672
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
@@ -1050,8 +1701,18 @@ export const assertStringifyMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
1050
1701
|
value: input.profile
|
|
1051
1702
|
});
|
|
1052
1703
|
})()}}`;
|
|
1053
|
-
const $so2 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so5(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"
|
|
1704
|
+
const $so2 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so5(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
|
|
1705
|
+
if ("string" === typeof input.subtitle)
|
|
1706
|
+
return $string(input.subtitle);
|
|
1707
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
1708
|
+
return $so6(input.subtitle);
|
|
1709
|
+
$throws({
|
|
1710
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1711
|
+
value: input.subtitle
|
|
1712
|
+
});
|
|
1713
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
1054
1714
|
const $so5 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
1715
|
+
const $so6 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
1055
1716
|
return $so0(input);
|
|
1056
1717
|
}; return stringify(assert(input, errorFactory)); };
|
|
1057
1718
|
export const isMediaRendersRecord = input => {
|
|
@@ -3301,7 +3962,7 @@ export const assertStringifyMediaRestrictionsRecord = (input, errorFactory) => {
|
|
|
3301
3962
|
return $so0(input);
|
|
3302
3963
|
}; return stringify(assert(input, errorFactory)); };
|
|
3303
3964
|
export const isMediaProbeRecord = input => {
|
|
3304
|
-
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live);
|
|
3965
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live) && (null === input.url || undefined === input.url || "string" === typeof input.url) && (undefined === input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io4(input.subtitle));
|
|
3305
3966
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3306
3967
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3307
3968
|
const value = input[key];
|
|
@@ -3310,11 +3971,12 @@ export const isMediaProbeRecord = input => {
|
|
|
3310
3971
|
return "string" === typeof value;
|
|
3311
3972
|
});
|
|
3312
3973
|
const $io3 = input => true;
|
|
3974
|
+
const $io4 = input => null === input.codec || undefined === input.codec || "string" === typeof input.codec;
|
|
3313
3975
|
return "object" === typeof input && null !== input && $io0(input);
|
|
3314
3976
|
};
|
|
3315
3977
|
export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
3316
3978
|
const __is = input => {
|
|
3317
|
-
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live);
|
|
3979
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live) && (null === input.url || undefined === input.url || "string" === typeof input.url) && (undefined === input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io4(input.subtitle));
|
|
3318
3980
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3319
3981
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3320
3982
|
const value = input[key];
|
|
@@ -3323,6 +3985,7 @@ export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
|
3323
3985
|
return "string" === typeof value;
|
|
3324
3986
|
});
|
|
3325
3987
|
const $io3 = input => true;
|
|
3988
|
+
const $io4 = input => null === input.codec || undefined === input.codec || "string" === typeof input.codec;
|
|
3326
3989
|
return "object" === typeof input && null !== input && $io0(input);
|
|
3327
3990
|
};
|
|
3328
3991
|
if (false === __is(input))
|
|
@@ -3349,6 +4012,18 @@ export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
|
3349
4012
|
path: _path + ".live",
|
|
3350
4013
|
expected: "(boolean | null | undefined)",
|
|
3351
4014
|
value: input.live
|
|
4015
|
+
}, errorFactory)) && (null === input.url || undefined === input.url || "string" === typeof input.url || $guard(_exceptionable, {
|
|
4016
|
+
path: _path + ".url",
|
|
4017
|
+
expected: "(null | string | undefined)",
|
|
4018
|
+
value: input.url
|
|
4019
|
+
}, errorFactory)) && (undefined === input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
4020
|
+
path: _path + ".subtitle",
|
|
4021
|
+
expected: "(__type | undefined)",
|
|
4022
|
+
value: input.subtitle
|
|
4023
|
+
}, errorFactory)) && $ao4(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
4024
|
+
path: _path + ".subtitle",
|
|
4025
|
+
expected: "(__type | undefined)",
|
|
4026
|
+
value: input.subtitle
|
|
3352
4027
|
}, errorFactory));
|
|
3353
4028
|
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
3354
4029
|
path: _path + ".message",
|
|
@@ -3426,6 +4101,11 @@ export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
|
3426
4101
|
}, errorFactory);
|
|
3427
4102
|
});
|
|
3428
4103
|
const $ao3 = (input, _path, _exceptionable = true) => true;
|
|
4104
|
+
const $ao4 = (input, _path, _exceptionable = true) => null === input.codec || undefined === input.codec || "string" === typeof input.codec || $guard(_exceptionable, {
|
|
4105
|
+
path: _path + ".codec",
|
|
4106
|
+
expected: "(null | string | undefined)",
|
|
4107
|
+
value: input.codec
|
|
4108
|
+
}, errorFactory);
|
|
3429
4109
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
3430
4110
|
path: _path + "",
|
|
3431
4111
|
expected: "MediaProbeRecord",
|
|
@@ -3460,6 +4140,15 @@ export const randomMediaProbeRecord = generator => {
|
|
|
3460
4140
|
() => undefined,
|
|
3461
4141
|
() => null,
|
|
3462
4142
|
() => (generator?.boolean ?? $generator.boolean)()
|
|
4143
|
+
])(),
|
|
4144
|
+
url: $pick([
|
|
4145
|
+
() => undefined,
|
|
4146
|
+
() => null,
|
|
4147
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
4148
|
+
])(),
|
|
4149
|
+
subtitle: $pick([
|
|
4150
|
+
() => undefined,
|
|
4151
|
+
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
3463
4152
|
])()
|
|
3464
4153
|
});
|
|
3465
4154
|
const $ro1 = (_recursive = true, _depth = 0) => ({
|
|
@@ -3509,11 +4198,18 @@ export const randomMediaProbeRecord = generator => {
|
|
|
3509
4198
|
return output;
|
|
3510
4199
|
};
|
|
3511
4200
|
const $ro3 = (_recursive = false, _depth = 0) => {};
|
|
4201
|
+
const $ro4 = (_recursive = false, _depth = 0) => ({
|
|
4202
|
+
codec: $pick([
|
|
4203
|
+
() => undefined,
|
|
4204
|
+
() => null,
|
|
4205
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
4206
|
+
])()
|
|
4207
|
+
});
|
|
3512
4208
|
return $ro0();
|
|
3513
4209
|
};
|
|
3514
4210
|
export const assertGuardMediaProbeRecord = (input, errorFactory) => {
|
|
3515
4211
|
const __is = input => {
|
|
3516
|
-
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live);
|
|
4212
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live) && (null === input.url || undefined === input.url || "string" === typeof input.url) && (undefined === input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io4(input.subtitle));
|
|
3517
4213
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3518
4214
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3519
4215
|
const value = input[key];
|
|
@@ -3522,6 +4218,7 @@ export const assertGuardMediaProbeRecord = (input, errorFactory) => {
|
|
|
3522
4218
|
return "string" === typeof value;
|
|
3523
4219
|
});
|
|
3524
4220
|
const $io3 = input => true;
|
|
4221
|
+
const $io4 = input => null === input.codec || undefined === input.codec || "string" === typeof input.codec;
|
|
3525
4222
|
return "object" === typeof input && null !== input && $io0(input);
|
|
3526
4223
|
};
|
|
3527
4224
|
if (false === __is(input))
|
|
@@ -3548,6 +4245,18 @@ export const assertGuardMediaProbeRecord = (input, errorFactory) => {
|
|
|
3548
4245
|
path: _path + ".live",
|
|
3549
4246
|
expected: "(boolean | null | undefined)",
|
|
3550
4247
|
value: input.live
|
|
4248
|
+
}, errorFactory)) && (null === input.url || undefined === input.url || "string" === typeof input.url || $guard(_exceptionable, {
|
|
4249
|
+
path: _path + ".url",
|
|
4250
|
+
expected: "(null | string | undefined)",
|
|
4251
|
+
value: input.url
|
|
4252
|
+
}, errorFactory)) && (undefined === input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
4253
|
+
path: _path + ".subtitle",
|
|
4254
|
+
expected: "(__type | undefined)",
|
|
4255
|
+
value: input.subtitle
|
|
4256
|
+
}, errorFactory)) && $ao4(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
4257
|
+
path: _path + ".subtitle",
|
|
4258
|
+
expected: "(__type | undefined)",
|
|
4259
|
+
value: input.subtitle
|
|
3551
4260
|
}, errorFactory));
|
|
3552
4261
|
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
3553
4262
|
path: _path + ".message",
|
|
@@ -3625,6 +4334,11 @@ export const assertGuardMediaProbeRecord = (input, errorFactory) => {
|
|
|
3625
4334
|
}, errorFactory);
|
|
3626
4335
|
});
|
|
3627
4336
|
const $ao3 = (input, _path, _exceptionable = true) => true;
|
|
4337
|
+
const $ao4 = (input, _path, _exceptionable = true) => null === input.codec || undefined === input.codec || "string" === typeof input.codec || $guard(_exceptionable, {
|
|
4338
|
+
path: _path + ".codec",
|
|
4339
|
+
expected: "(null | string | undefined)",
|
|
4340
|
+
value: input.codec
|
|
4341
|
+
}, errorFactory);
|
|
3628
4342
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
3629
4343
|
path: _path + "",
|
|
3630
4344
|
expected: "MediaProbeRecord",
|
|
@@ -3645,9 +4359,11 @@ export const stringifyMediaProbeRecord = input => {
|
|
|
3645
4359
|
return "string" === typeof value;
|
|
3646
4360
|
});
|
|
3647
4361
|
const $io3 = input => true;
|
|
4362
|
+
const $io4 = input => null === input.codec || undefined === input.codec || "string" === typeof input.codec;
|
|
3648
4363
|
const $string = __typia.json.createStringify.string;
|
|
3649
4364
|
const $throws = __typia.json.createStringify.throws;
|
|
3650
|
-
const $
|
|
4365
|
+
const $tail = __typia.json.createStringify.tail;
|
|
4366
|
+
const $so0 = input => `{${undefined === input.duration ? "" : `"duration":${undefined !== input.duration ? null !== input.duration ? input.duration : "null" : undefined},`}${undefined === input.live ? "" : `"live":${undefined !== input.live ? null !== input.live ? input.live : "null" : undefined},`}${undefined === input.url ? "" : `"url":${undefined !== input.url ? null !== input.url ? $string(input.url) : "null" : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $so4(input.subtitle) : undefined},`}"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3651
4367
|
if ("string" === typeof input.type)
|
|
3652
4368
|
return $string(input.type);
|
|
3653
4369
|
if ("string" === typeof input.type)
|
|
@@ -3660,11 +4376,12 @@ export const stringifyMediaProbeRecord = input => {
|
|
|
3660
4376
|
const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
|
|
3661
4377
|
const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
3662
4378
|
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
4379
|
+
const $so4 = input => `{${$tail(`${undefined === input.codec ? "" : `"codec":${undefined !== input.codec ? null !== input.codec ? $string(input.codec) : "null" : undefined}`}`)}}`;
|
|
3663
4380
|
return $so0(input);
|
|
3664
4381
|
};
|
|
3665
4382
|
export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
3666
4383
|
const __is = input => {
|
|
3667
|
-
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration && !Number.isNaN(input.duration)) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live);
|
|
4384
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration && !Number.isNaN(input.duration)) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type) && (null === input.live || undefined === input.live || "boolean" === typeof input.live) && (null === input.url || undefined === input.url || "string" === typeof input.url) && (undefined === input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io4(input.subtitle));
|
|
3668
4385
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3669
4386
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3670
4387
|
const value = input[key];
|
|
@@ -3673,6 +4390,7 @@ export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const
|
|
|
3673
4390
|
return "string" === typeof value;
|
|
3674
4391
|
});
|
|
3675
4392
|
const $io3 = input => true;
|
|
4393
|
+
const $io4 = input => null === input.codec || undefined === input.codec || "string" === typeof input.codec;
|
|
3676
4394
|
return "object" === typeof input && null !== input && $io0(input);
|
|
3677
4395
|
};
|
|
3678
4396
|
if (false === __is(input))
|
|
@@ -3699,6 +4417,18 @@ export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const
|
|
|
3699
4417
|
path: _path + ".live",
|
|
3700
4418
|
expected: "(boolean | null | undefined)",
|
|
3701
4419
|
value: input.live
|
|
4420
|
+
}, errorFactory)) && (null === input.url || undefined === input.url || "string" === typeof input.url || $guard(_exceptionable, {
|
|
4421
|
+
path: _path + ".url",
|
|
4422
|
+
expected: "(null | string | undefined)",
|
|
4423
|
+
value: input.url
|
|
4424
|
+
}, errorFactory)) && (undefined === input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
4425
|
+
path: _path + ".subtitle",
|
|
4426
|
+
expected: "(__type | undefined)",
|
|
4427
|
+
value: input.subtitle
|
|
4428
|
+
}, errorFactory)) && $ao4(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
4429
|
+
path: _path + ".subtitle",
|
|
4430
|
+
expected: "(__type | undefined)",
|
|
4431
|
+
value: input.subtitle
|
|
3702
4432
|
}, errorFactory));
|
|
3703
4433
|
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
3704
4434
|
path: _path + ".message",
|
|
@@ -3776,6 +4506,11 @@ export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const
|
|
|
3776
4506
|
}, errorFactory);
|
|
3777
4507
|
});
|
|
3778
4508
|
const $ao3 = (input, _path, _exceptionable = true) => true;
|
|
4509
|
+
const $ao4 = (input, _path, _exceptionable = true) => null === input.codec || undefined === input.codec || "string" === typeof input.codec || $guard(_exceptionable, {
|
|
4510
|
+
path: _path + ".codec",
|
|
4511
|
+
expected: "(null | string | undefined)",
|
|
4512
|
+
value: input.codec
|
|
4513
|
+
}, errorFactory);
|
|
3779
4514
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
3780
4515
|
path: _path + "",
|
|
3781
4516
|
expected: "MediaProbeRecord",
|
|
@@ -3796,9 +4531,11 @@ export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const
|
|
|
3796
4531
|
return "string" === typeof value;
|
|
3797
4532
|
});
|
|
3798
4533
|
const $io3 = input => true;
|
|
4534
|
+
const $io4 = input => null === input.codec || undefined === input.codec || "string" === typeof input.codec;
|
|
3799
4535
|
const $string = __typia.json.createAssertStringify.string;
|
|
3800
4536
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
3801
|
-
const $
|
|
4537
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
4538
|
+
const $so0 = input => `{${undefined === input.duration ? "" : `"duration":${undefined !== input.duration ? null !== input.duration ? input.duration : "null" : undefined},`}${undefined === input.live ? "" : `"live":${undefined !== input.live ? null !== input.live ? input.live : "null" : undefined},`}${undefined === input.url ? "" : `"url":${undefined !== input.url ? null !== input.url ? $string(input.url) : "null" : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $so4(input.subtitle) : undefined},`}"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3802
4539
|
if ("string" === typeof input.type)
|
|
3803
4540
|
return $string(input.type);
|
|
3804
4541
|
if ("string" === typeof input.type)
|
|
@@ -3811,5 +4548,6 @@ export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const
|
|
|
3811
4548
|
const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
|
|
3812
4549
|
const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
3813
4550
|
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
4551
|
+
const $so4 = input => `{${$tail(`${undefined === input.codec ? "" : `"codec":${undefined !== input.codec ? null !== input.codec ? $string(input.codec) : "null" : undefined}`}`)}}`;
|
|
3814
4552
|
return $so0(input);
|
|
3815
4553
|
}; return stringify(assert(input, errorFactory)); };
|