@nxtedition/types 23.0.22 → 23.0.23

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.
@@ -0,0 +1,726 @@
1
+ import __typia from "typia";
2
+ export const isRenderProfile = input => {
3
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
4
+ const $io1 = input => "string" === typeof input.engine;
5
+ const $io2 = input => "string" === typeof input.language;
6
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
7
+ return null !== input && undefined !== input && ("string" === typeof input || (Array.isArray(input) && input.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io0(elem))) || "object" === typeof input && null !== input && $io0(input)));
8
+ };
9
+ export const assertRenderProfile = (input, errorFactory) => {
10
+ const __is = input => {
11
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
12
+ const $io1 = input => "string" === typeof input.engine;
13
+ const $io2 = input => "string" === typeof input.language;
14
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
15
+ return null !== input && undefined !== input && ("string" === typeof input || (Array.isArray(input) && input.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io0(elem))) || "object" === typeof input && null !== input && $io0(input)));
16
+ };
17
+ if (false === __is(input))
18
+ ((input, _path, _exceptionable = true) => {
19
+ const $guard = __typia.createAssert.guard;
20
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
21
+ path: _path + ".format",
22
+ expected: "string",
23
+ value: input.format
24
+ }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
25
+ path: _path + ".transcribe",
26
+ expected: "(__type | undefined)",
27
+ value: input.transcribe
28
+ }, errorFactory)) && $ao1(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
29
+ path: _path + ".transcribe",
30
+ expected: "(__type | undefined)",
31
+ value: input.transcribe
32
+ }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
33
+ path: _path + ".translate",
34
+ expected: "(__type.o1 | undefined)",
35
+ value: input.translate
36
+ }, errorFactory)) && $ao2(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
37
+ path: _path + ".translate",
38
+ expected: "(__type.o1 | undefined)",
39
+ value: input.translate
40
+ }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
41
+ path: _path + ".audio",
42
+ expected: "(__type.o2 | undefined)",
43
+ value: input.audio
44
+ }, errorFactory)) && $ao3(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
45
+ path: _path + ".audio",
46
+ expected: "(__type.o2 | undefined)",
47
+ value: input.audio
48
+ }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
49
+ path: _path + ".pick",
50
+ expected: "(Array<string> | undefined)",
51
+ value: input.pick
52
+ }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
53
+ path: _path + ".pick[" + _index2 + "]",
54
+ expected: "string",
55
+ value: elem
56
+ }, errorFactory)) || $guard(_exceptionable, {
57
+ path: _path + ".pick",
58
+ expected: "(Array<string> | undefined)",
59
+ value: input.pick
60
+ }, errorFactory));
61
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
62
+ path: _path + ".engine",
63
+ expected: "string",
64
+ value: input.engine
65
+ }, errorFactory);
66
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
67
+ path: _path + ".language",
68
+ expected: "string",
69
+ value: input.language
70
+ }, errorFactory);
71
+ const $ao3 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
72
+ path: _path + ".pan",
73
+ expected: "(string | undefined)",
74
+ value: input.pan
75
+ }, errorFactory);
76
+ return (null !== input || $guard(true, {
77
+ path: _path + "",
78
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
79
+ value: input
80
+ }, errorFactory)) && (undefined !== input || $guard(true, {
81
+ path: _path + "",
82
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
83
+ value: input
84
+ }, errorFactory)) && ("string" === typeof input || (Array.isArray(input) && input.every((elem, _index1) => (null !== elem || $guard(true, {
85
+ path: _path + "[" + _index1 + "]",
86
+ expected: "(RenderProfileObject | string)",
87
+ value: elem
88
+ }, errorFactory)) && (undefined !== elem || $guard(true, {
89
+ path: _path + "[" + _index1 + "]",
90
+ expected: "(RenderProfileObject | string)",
91
+ value: elem
92
+ }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(true, {
93
+ path: _path + "[" + _index1 + "]",
94
+ expected: "(RenderProfileObject | string)",
95
+ value: elem
96
+ }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
97
+ path: _path + "[" + _index1 + "]",
98
+ expected: "(RenderProfileObject | string)",
99
+ value: elem
100
+ }, errorFactory))) || "object" === typeof input && null !== input && $ao0(input, _path + "", true) || $guard(true, {
101
+ path: _path + "",
102
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
103
+ value: input
104
+ }, errorFactory)) || $guard(true, {
105
+ path: _path + "",
106
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
107
+ value: input
108
+ }, errorFactory));
109
+ })(input, "$input", true);
110
+ return input;
111
+ };
112
+ export const randomRenderProfile = generator => {
113
+ const $generator = __typia.createRandom.generator;
114
+ const $pick = __typia.createRandom.pick;
115
+ const $ro0 = (_recursive = false, _depth = 0) => ({
116
+ format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
117
+ transcribe: $pick([
118
+ () => undefined,
119
+ () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
120
+ ])(),
121
+ translate: $pick([
122
+ () => undefined,
123
+ () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
124
+ ])(),
125
+ audio: $pick([
126
+ () => undefined,
127
+ () => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
128
+ ])(),
129
+ video: $pick([
130
+ () => "any type used...",
131
+ () => undefined
132
+ ])(),
133
+ pick: $pick([
134
+ () => undefined,
135
+ () => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
136
+ ])()
137
+ });
138
+ const $ro1 = (_recursive = false, _depth = 0) => ({
139
+ engine: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
140
+ });
141
+ const $ro2 = (_recursive = false, _depth = 0) => ({
142
+ language: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
143
+ });
144
+ const $ro3 = (_recursive = false, _depth = 0) => ({
145
+ pan: $pick([
146
+ () => undefined,
147
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
148
+ ])()
149
+ });
150
+ return $pick([
151
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
152
+ () => (generator?.array ?? $generator.array)(() => $pick([
153
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
154
+ () => $ro0()
155
+ ])()),
156
+ () => $ro0()
157
+ ])();
158
+ };
159
+ export const assertGuardRenderProfile = (input, errorFactory) => {
160
+ const __is = input => {
161
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
162
+ const $io1 = input => "string" === typeof input.engine;
163
+ const $io2 = input => "string" === typeof input.language;
164
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
165
+ return null !== input && undefined !== input && ("string" === typeof input || (Array.isArray(input) && input.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io0(elem))) || "object" === typeof input && null !== input && $io0(input)));
166
+ };
167
+ if (false === __is(input))
168
+ ((input, _path, _exceptionable = true) => {
169
+ const $guard = __typia.createAssertGuard.guard;
170
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
171
+ path: _path + ".format",
172
+ expected: "string",
173
+ value: input.format
174
+ }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
175
+ path: _path + ".transcribe",
176
+ expected: "(__type | undefined)",
177
+ value: input.transcribe
178
+ }, errorFactory)) && $ao1(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
179
+ path: _path + ".transcribe",
180
+ expected: "(__type | undefined)",
181
+ value: input.transcribe
182
+ }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
183
+ path: _path + ".translate",
184
+ expected: "(__type.o1 | undefined)",
185
+ value: input.translate
186
+ }, errorFactory)) && $ao2(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
187
+ path: _path + ".translate",
188
+ expected: "(__type.o1 | undefined)",
189
+ value: input.translate
190
+ }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
191
+ path: _path + ".audio",
192
+ expected: "(__type.o2 | undefined)",
193
+ value: input.audio
194
+ }, errorFactory)) && $ao3(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
195
+ path: _path + ".audio",
196
+ expected: "(__type.o2 | undefined)",
197
+ value: input.audio
198
+ }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
199
+ path: _path + ".pick",
200
+ expected: "(Array<string> | undefined)",
201
+ value: input.pick
202
+ }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
203
+ path: _path + ".pick[" + _index2 + "]",
204
+ expected: "string",
205
+ value: elem
206
+ }, errorFactory)) || $guard(_exceptionable, {
207
+ path: _path + ".pick",
208
+ expected: "(Array<string> | undefined)",
209
+ value: input.pick
210
+ }, errorFactory));
211
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
212
+ path: _path + ".engine",
213
+ expected: "string",
214
+ value: input.engine
215
+ }, errorFactory);
216
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
217
+ path: _path + ".language",
218
+ expected: "string",
219
+ value: input.language
220
+ }, errorFactory);
221
+ const $ao3 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
222
+ path: _path + ".pan",
223
+ expected: "(string | undefined)",
224
+ value: input.pan
225
+ }, errorFactory);
226
+ return (null !== input || $guard(true, {
227
+ path: _path + "",
228
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
229
+ value: input
230
+ }, errorFactory)) && (undefined !== input || $guard(true, {
231
+ path: _path + "",
232
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
233
+ value: input
234
+ }, errorFactory)) && ("string" === typeof input || (Array.isArray(input) && input.every((elem, _index1) => (null !== elem || $guard(true, {
235
+ path: _path + "[" + _index1 + "]",
236
+ expected: "(RenderProfileObject | string)",
237
+ value: elem
238
+ }, errorFactory)) && (undefined !== elem || $guard(true, {
239
+ path: _path + "[" + _index1 + "]",
240
+ expected: "(RenderProfileObject | string)",
241
+ value: elem
242
+ }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(true, {
243
+ path: _path + "[" + _index1 + "]",
244
+ expected: "(RenderProfileObject | string)",
245
+ value: elem
246
+ }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
247
+ path: _path + "[" + _index1 + "]",
248
+ expected: "(RenderProfileObject | string)",
249
+ value: elem
250
+ }, errorFactory))) || "object" === typeof input && null !== input && $ao0(input, _path + "", true) || $guard(true, {
251
+ path: _path + "",
252
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
253
+ value: input
254
+ }, errorFactory)) || $guard(true, {
255
+ path: _path + "",
256
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
257
+ value: input
258
+ }, errorFactory));
259
+ })(input, "$input", true);
260
+ };
261
+ export const stringifyRenderProfile = input => {
262
+ const $io1 = input => "string" === typeof input.engine;
263
+ const $io2 = input => "string" === typeof input.language;
264
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
265
+ const $string = __typia.json.createStringify.string;
266
+ const $throws = __typia.json.createStringify.throws;
267
+ const $tail = __typia.json.createStringify.tail;
268
+ const $so0 = 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 ? $so3(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},`}"format":${$string(input.format)}}`;
269
+ const $so3 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
270
+ return (() => {
271
+ if ("string" === typeof input)
272
+ return $string(input);
273
+ if (Array.isArray(input))
274
+ return `[${input.map(elem => (() => {
275
+ if ("string" === typeof elem)
276
+ return $string(elem);
277
+ if ("object" === typeof elem && null !== elem)
278
+ return $so0(elem);
279
+ $throws({
280
+ expected: "(RenderProfileObject | string)",
281
+ value: elem
282
+ });
283
+ })()).join(",")}]`;
284
+ if ("object" === typeof input && null !== input)
285
+ return $so0(input);
286
+ $throws({
287
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
288
+ value: input
289
+ });
290
+ })();
291
+ };
292
+ export const assertStringifyRenderProfile = (input, errorFactory) => { const assert = (input, errorFactory) => {
293
+ const __is = input => {
294
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
295
+ const $io1 = input => "string" === typeof input.engine;
296
+ const $io2 = input => "string" === typeof input.language;
297
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
298
+ return null !== input && undefined !== input && ("string" === typeof input || (Array.isArray(input) && input.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io0(elem))) || "object" === typeof input && null !== input && $io0(input)));
299
+ };
300
+ if (false === __is(input))
301
+ ((input, _path, _exceptionable = true) => {
302
+ const $guard = __typia.json.createAssertStringify.guard;
303
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
304
+ path: _path + ".format",
305
+ expected: "string",
306
+ value: input.format
307
+ }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
308
+ path: _path + ".transcribe",
309
+ expected: "(__type | undefined)",
310
+ value: input.transcribe
311
+ }, errorFactory)) && $ao1(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
312
+ path: _path + ".transcribe",
313
+ expected: "(__type | undefined)",
314
+ value: input.transcribe
315
+ }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
316
+ path: _path + ".translate",
317
+ expected: "(__type.o1 | undefined)",
318
+ value: input.translate
319
+ }, errorFactory)) && $ao2(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
320
+ path: _path + ".translate",
321
+ expected: "(__type.o1 | undefined)",
322
+ value: input.translate
323
+ }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
324
+ path: _path + ".audio",
325
+ expected: "(__type.o2 | undefined)",
326
+ value: input.audio
327
+ }, errorFactory)) && $ao3(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
328
+ path: _path + ".audio",
329
+ expected: "(__type.o2 | undefined)",
330
+ value: input.audio
331
+ }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
332
+ path: _path + ".pick",
333
+ expected: "(Array<string> | undefined)",
334
+ value: input.pick
335
+ }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
336
+ path: _path + ".pick[" + _index2 + "]",
337
+ expected: "string",
338
+ value: elem
339
+ }, errorFactory)) || $guard(_exceptionable, {
340
+ path: _path + ".pick",
341
+ expected: "(Array<string> | undefined)",
342
+ value: input.pick
343
+ }, errorFactory));
344
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
345
+ path: _path + ".engine",
346
+ expected: "string",
347
+ value: input.engine
348
+ }, errorFactory);
349
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
350
+ path: _path + ".language",
351
+ expected: "string",
352
+ value: input.language
353
+ }, errorFactory);
354
+ const $ao3 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
355
+ path: _path + ".pan",
356
+ expected: "(string | undefined)",
357
+ value: input.pan
358
+ }, errorFactory);
359
+ return (null !== input || $guard(true, {
360
+ path: _path + "",
361
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
362
+ value: input
363
+ }, errorFactory)) && (undefined !== input || $guard(true, {
364
+ path: _path + "",
365
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
366
+ value: input
367
+ }, errorFactory)) && ("string" === typeof input || (Array.isArray(input) && input.every((elem, _index1) => (null !== elem || $guard(true, {
368
+ path: _path + "[" + _index1 + "]",
369
+ expected: "(RenderProfileObject | string)",
370
+ value: elem
371
+ }, errorFactory)) && (undefined !== elem || $guard(true, {
372
+ path: _path + "[" + _index1 + "]",
373
+ expected: "(RenderProfileObject | string)",
374
+ value: elem
375
+ }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(true, {
376
+ path: _path + "[" + _index1 + "]",
377
+ expected: "(RenderProfileObject | string)",
378
+ value: elem
379
+ }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
380
+ path: _path + "[" + _index1 + "]",
381
+ expected: "(RenderProfileObject | string)",
382
+ value: elem
383
+ }, errorFactory))) || "object" === typeof input && null !== input && $ao0(input, _path + "", true) || $guard(true, {
384
+ path: _path + "",
385
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
386
+ value: input
387
+ }, errorFactory)) || $guard(true, {
388
+ path: _path + "",
389
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
390
+ value: input
391
+ }, errorFactory));
392
+ })(input, "$input", true);
393
+ return input;
394
+ }; const stringify = input => {
395
+ const $io1 = input => "string" === typeof input.engine;
396
+ const $io2 = input => "string" === typeof input.language;
397
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
398
+ const $string = __typia.json.createAssertStringify.string;
399
+ const $throws = __typia.json.createAssertStringify.throws;
400
+ const $tail = __typia.json.createAssertStringify.tail;
401
+ const $so0 = 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 ? $so3(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},`}"format":${$string(input.format)}}`;
402
+ const $so3 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
403
+ return (() => {
404
+ if ("string" === typeof input)
405
+ return $string(input);
406
+ if (Array.isArray(input))
407
+ return `[${input.map(elem => (() => {
408
+ if ("string" === typeof elem)
409
+ return $string(elem);
410
+ if ("object" === typeof elem && null !== elem)
411
+ return $so0(elem);
412
+ $throws({
413
+ expected: "(RenderProfileObject | string)",
414
+ value: elem
415
+ });
416
+ })()).join(",")}]`;
417
+ if ("object" === typeof input && null !== input)
418
+ return $so0(input);
419
+ $throws({
420
+ expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
421
+ value: input
422
+ });
423
+ })();
424
+ }; return stringify(assert(input, errorFactory)); };
425
+ export const isRenderProfileObject = input => {
426
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
427
+ const $io1 = input => "string" === typeof input.engine;
428
+ const $io2 = input => "string" === typeof input.language;
429
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
430
+ return "object" === typeof input && null !== input && $io0(input);
431
+ };
432
+ export const assertRenderProfileObject = (input, errorFactory) => {
433
+ const __is = input => {
434
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
435
+ const $io1 = input => "string" === typeof input.engine;
436
+ const $io2 = input => "string" === typeof input.language;
437
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
438
+ return "object" === typeof input && null !== input && $io0(input);
439
+ };
440
+ if (false === __is(input))
441
+ ((input, _path, _exceptionable = true) => {
442
+ const $guard = __typia.createAssert.guard;
443
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
444
+ path: _path + ".format",
445
+ expected: "string",
446
+ value: input.format
447
+ }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
448
+ path: _path + ".transcribe",
449
+ expected: "(__type | undefined)",
450
+ value: input.transcribe
451
+ }, errorFactory)) && $ao1(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
452
+ path: _path + ".transcribe",
453
+ expected: "(__type | undefined)",
454
+ value: input.transcribe
455
+ }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
456
+ path: _path + ".translate",
457
+ expected: "(__type.o1 | undefined)",
458
+ value: input.translate
459
+ }, errorFactory)) && $ao2(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
460
+ path: _path + ".translate",
461
+ expected: "(__type.o1 | undefined)",
462
+ value: input.translate
463
+ }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
464
+ path: _path + ".audio",
465
+ expected: "(__type.o2 | undefined)",
466
+ value: input.audio
467
+ }, errorFactory)) && $ao3(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
468
+ path: _path + ".audio",
469
+ expected: "(__type.o2 | undefined)",
470
+ value: input.audio
471
+ }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
472
+ path: _path + ".pick",
473
+ expected: "(Array<string> | undefined)",
474
+ value: input.pick
475
+ }, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
476
+ path: _path + ".pick[" + _index1 + "]",
477
+ expected: "string",
478
+ value: elem
479
+ }, errorFactory)) || $guard(_exceptionable, {
480
+ path: _path + ".pick",
481
+ expected: "(Array<string> | undefined)",
482
+ value: input.pick
483
+ }, errorFactory));
484
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
485
+ path: _path + ".engine",
486
+ expected: "string",
487
+ value: input.engine
488
+ }, errorFactory);
489
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
490
+ path: _path + ".language",
491
+ expected: "string",
492
+ value: input.language
493
+ }, errorFactory);
494
+ const $ao3 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
495
+ path: _path + ".pan",
496
+ expected: "(string | undefined)",
497
+ value: input.pan
498
+ }, errorFactory);
499
+ return ("object" === typeof input && null !== input || $guard(true, {
500
+ path: _path + "",
501
+ expected: "RenderProfileObject",
502
+ value: input
503
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
504
+ path: _path + "",
505
+ expected: "RenderProfileObject",
506
+ value: input
507
+ }, errorFactory);
508
+ })(input, "$input", true);
509
+ return input;
510
+ };
511
+ export const randomRenderProfileObject = generator => {
512
+ const $generator = __typia.createRandom.generator;
513
+ const $pick = __typia.createRandom.pick;
514
+ const $ro0 = (_recursive = false, _depth = 0) => ({
515
+ format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
516
+ transcribe: $pick([
517
+ () => undefined,
518
+ () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
519
+ ])(),
520
+ translate: $pick([
521
+ () => undefined,
522
+ () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
523
+ ])(),
524
+ audio: $pick([
525
+ () => undefined,
526
+ () => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
527
+ ])(),
528
+ video: $pick([
529
+ () => "any type used...",
530
+ () => undefined
531
+ ])(),
532
+ pick: $pick([
533
+ () => undefined,
534
+ () => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
535
+ ])()
536
+ });
537
+ const $ro1 = (_recursive = false, _depth = 0) => ({
538
+ engine: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
539
+ });
540
+ const $ro2 = (_recursive = false, _depth = 0) => ({
541
+ language: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
542
+ });
543
+ const $ro3 = (_recursive = false, _depth = 0) => ({
544
+ pan: $pick([
545
+ () => undefined,
546
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
547
+ ])()
548
+ });
549
+ return $ro0();
550
+ };
551
+ export const assertGuardRenderProfileObject = (input, errorFactory) => {
552
+ const __is = input => {
553
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
554
+ const $io1 = input => "string" === typeof input.engine;
555
+ const $io2 = input => "string" === typeof input.language;
556
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
557
+ return "object" === typeof input && null !== input && $io0(input);
558
+ };
559
+ if (false === __is(input))
560
+ ((input, _path, _exceptionable = true) => {
561
+ const $guard = __typia.createAssertGuard.guard;
562
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
563
+ path: _path + ".format",
564
+ expected: "string",
565
+ value: input.format
566
+ }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
567
+ path: _path + ".transcribe",
568
+ expected: "(__type | undefined)",
569
+ value: input.transcribe
570
+ }, errorFactory)) && $ao1(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
571
+ path: _path + ".transcribe",
572
+ expected: "(__type | undefined)",
573
+ value: input.transcribe
574
+ }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
575
+ path: _path + ".translate",
576
+ expected: "(__type.o1 | undefined)",
577
+ value: input.translate
578
+ }, errorFactory)) && $ao2(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
579
+ path: _path + ".translate",
580
+ expected: "(__type.o1 | undefined)",
581
+ value: input.translate
582
+ }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
583
+ path: _path + ".audio",
584
+ expected: "(__type.o2 | undefined)",
585
+ value: input.audio
586
+ }, errorFactory)) && $ao3(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
587
+ path: _path + ".audio",
588
+ expected: "(__type.o2 | undefined)",
589
+ value: input.audio
590
+ }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
591
+ path: _path + ".pick",
592
+ expected: "(Array<string> | undefined)",
593
+ value: input.pick
594
+ }, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
595
+ path: _path + ".pick[" + _index1 + "]",
596
+ expected: "string",
597
+ value: elem
598
+ }, errorFactory)) || $guard(_exceptionable, {
599
+ path: _path + ".pick",
600
+ expected: "(Array<string> | undefined)",
601
+ value: input.pick
602
+ }, errorFactory));
603
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
604
+ path: _path + ".engine",
605
+ expected: "string",
606
+ value: input.engine
607
+ }, errorFactory);
608
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
609
+ path: _path + ".language",
610
+ expected: "string",
611
+ value: input.language
612
+ }, errorFactory);
613
+ const $ao3 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
614
+ path: _path + ".pan",
615
+ expected: "(string | undefined)",
616
+ value: input.pan
617
+ }, errorFactory);
618
+ return ("object" === typeof input && null !== input || $guard(true, {
619
+ path: _path + "",
620
+ expected: "RenderProfileObject",
621
+ value: input
622
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
623
+ path: _path + "",
624
+ expected: "RenderProfileObject",
625
+ value: input
626
+ }, errorFactory);
627
+ })(input, "$input", true);
628
+ };
629
+ export const stringifyRenderProfileObject = input => {
630
+ const $io1 = input => "string" === typeof input.engine;
631
+ const $io2 = input => "string" === typeof input.language;
632
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
633
+ const $string = __typia.json.createStringify.string;
634
+ const $tail = __typia.json.createStringify.tail;
635
+ const $so0 = 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 ? $so3(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},`}"format":${$string(input.format)}}`;
636
+ const $so3 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
637
+ return $so0(input);
638
+ };
639
+ export const assertStringifyRenderProfileObject = (input, errorFactory) => { const assert = (input, errorFactory) => {
640
+ const __is = input => {
641
+ const $io0 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io1(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io2(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io3(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
642
+ const $io1 = input => "string" === typeof input.engine;
643
+ const $io2 = input => "string" === typeof input.language;
644
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
645
+ return "object" === typeof input && null !== input && $io0(input);
646
+ };
647
+ if (false === __is(input))
648
+ ((input, _path, _exceptionable = true) => {
649
+ const $guard = __typia.json.createAssertStringify.guard;
650
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
651
+ path: _path + ".format",
652
+ expected: "string",
653
+ value: input.format
654
+ }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
655
+ path: _path + ".transcribe",
656
+ expected: "(__type | undefined)",
657
+ value: input.transcribe
658
+ }, errorFactory)) && $ao1(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
659
+ path: _path + ".transcribe",
660
+ expected: "(__type | undefined)",
661
+ value: input.transcribe
662
+ }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
663
+ path: _path + ".translate",
664
+ expected: "(__type.o1 | undefined)",
665
+ value: input.translate
666
+ }, errorFactory)) && $ao2(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
667
+ path: _path + ".translate",
668
+ expected: "(__type.o1 | undefined)",
669
+ value: input.translate
670
+ }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
671
+ path: _path + ".audio",
672
+ expected: "(__type.o2 | undefined)",
673
+ value: input.audio
674
+ }, errorFactory)) && $ao3(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
675
+ path: _path + ".audio",
676
+ expected: "(__type.o2 | undefined)",
677
+ value: input.audio
678
+ }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
679
+ path: _path + ".pick",
680
+ expected: "(Array<string> | undefined)",
681
+ value: input.pick
682
+ }, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
683
+ path: _path + ".pick[" + _index1 + "]",
684
+ expected: "string",
685
+ value: elem
686
+ }, errorFactory)) || $guard(_exceptionable, {
687
+ path: _path + ".pick",
688
+ expected: "(Array<string> | undefined)",
689
+ value: input.pick
690
+ }, errorFactory));
691
+ const $ao1 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
692
+ path: _path + ".engine",
693
+ expected: "string",
694
+ value: input.engine
695
+ }, errorFactory);
696
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
697
+ path: _path + ".language",
698
+ expected: "string",
699
+ value: input.language
700
+ }, errorFactory);
701
+ const $ao3 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
702
+ path: _path + ".pan",
703
+ expected: "(string | undefined)",
704
+ value: input.pan
705
+ }, errorFactory);
706
+ return ("object" === typeof input && null !== input || $guard(true, {
707
+ path: _path + "",
708
+ expected: "RenderProfileObject",
709
+ value: input
710
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
711
+ path: _path + "",
712
+ expected: "RenderProfileObject",
713
+ value: input
714
+ }, errorFactory);
715
+ })(input, "$input", true);
716
+ return input;
717
+ }; const stringify = input => {
718
+ const $io1 = input => "string" === typeof input.engine;
719
+ const $io2 = input => "string" === typeof input.language;
720
+ const $io3 = input => undefined === input.pan || "string" === typeof input.pan;
721
+ const $string = __typia.json.createAssertStringify.string;
722
+ const $tail = __typia.json.createAssertStringify.tail;
723
+ const $so0 = 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 ? $so3(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},`}"format":${$string(input.format)}}`;
724
+ const $so3 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
725
+ return $so0(input);
726
+ }; return stringify(assert(input, errorFactory)); };