/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@typeschema/valita@0.2.0/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,r)=>{for(var t in r)__defProp(e,t,{get:r[t],enumerable:!0})},__copyProps=(e,r,t,a)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let o of __getOwnPropNames(r))__hasOwnProp.call(e,o)||o===t||__defProp(e,o,{get:()=>r[o],enumerable:!(a=__getOwnPropDesc(r,o))||a.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),src_exports={};__export(src_exports,{assert:()=>assert,validate:()=>validate,validationAdapter:()=>validationAdapter,wrap:()=>wrap}),module.exports=__toCommonJS(src_exports);var import_core=require("@typeschema/core"),validationAdapter=async e=>async r=>{const t=e.try(r);return t.ok?{data:t.value,success:!0}:{issues:t.issues.map((({code:e,path:r})=>({message:e,path:r}))),success:!1}},validate=(0,import_core.createValidate)(validationAdapter),assert=(0,import_core.createAssert)(validate),wrap=(0,import_core.createWrap)(assert,validate);
//# sourceMappingURL=/sm/5fddf52d32b5c093c94e8b53539846d7d443196ef8bb1067e060ac84c7eecbea.map