

const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.js');
const require_zod = require('../../../../../utils/zod.js');
const require_jwk = require('../../jwk.js');
let zod = require("zod");
zod = require_rolldown_runtime.__toESM(zod);

//#region src/modules/kms/jwk/kty/rsa/rsaJwk.ts
const zKmsJwkPrivateRsaOth = zod.z.array(zod.z.object({
	d: zod.z.optional(require_zod.zBase64Url),
	r: zod.z.optional(require_zod.zBase64Url),
	t: zod.z.optional(require_zod.zBase64Url)
}).passthrough());
const zKmsJwkPublicRsa = zod.z.object({
	...require_jwk.vJwkCommon.shape,
	kty: zod.z.literal("RSA"),
	n: require_zod.zBase64Url,
	e: require_zod.zBase64Url,
	d: zod.z.optional(zod.z.undefined()),
	p: zod.z.optional(zod.z.undefined()),
	q: zod.z.optional(zod.z.undefined()),
	dp: zod.z.optional(zod.z.undefined()),
	dq: zod.z.optional(zod.z.undefined()),
	qi: zod.z.optional(zod.z.undefined()),
	oth: zod.z.optional(zod.z.undefined())
});
const zKmsJwkPrivateToPublicRsa = zod.z.object({
	...zKmsJwkPublicRsa.shape,
	d: require_zod.zOptionalToUndefined(require_zod.zBase64Url),
	p: require_zod.zOptionalToUndefined(require_zod.zBase64Url),
	q: require_zod.zOptionalToUndefined(require_zod.zBase64Url),
	dp: require_zod.zOptionalToUndefined(require_zod.zBase64Url),
	dq: require_zod.zOptionalToUndefined(require_zod.zBase64Url),
	qi: require_zod.zOptionalToUndefined(require_zod.zBase64Url),
	oth: require_zod.zOptionalToUndefined(zKmsJwkPrivateRsaOth)
});
const zKmsJwkPrivateRsa = zod.z.object({
	...zKmsJwkPublicRsa.shape,
	d: require_zod.zBase64Url,
	p: require_zod.zBase64Url,
	q: require_zod.zBase64Url,
	dp: require_zod.zBase64Url,
	dq: require_zod.zBase64Url,
	qi: require_zod.zBase64Url,
	oth: zod.z.optional(zKmsJwkPrivateRsaOth)
});

//#endregion
exports.zKmsJwkPrivateRsa = zKmsJwkPrivateRsa;
exports.zKmsJwkPrivateToPublicRsa = zKmsJwkPrivateToPublicRsa;
exports.zKmsJwkPublicRsa = zKmsJwkPublicRsa;