// @bun
var{defineProperty:u,getOwnPropertyNames:w,getOwnPropertyDescriptor:x}=Object,y=Object.prototype.hasOwnProperty;function z(f){return this[f]}var F=(f)=>{var j=(v??=new WeakMap).get(f),k;if(j)return j;if(j=u({},"__esModule",{value:!0}),f&&typeof f==="object"||typeof f==="function"){for(var q of w(f))if(!y.call(j,q))u(j,q,{get:z.bind(f,q),enumerable:!(k=x(f,q))||k.enumerable})}return v.set(f,j),j},v;var A=(f)=>f;function B(f,j){this[f]=A.bind(null,j)}var G=(f,j)=>{for(var k in j)u(f,k,{get:j[k],enumerable:!0,configurable:!0,set:B.bind(j,k)})};var H=(f,j)=>()=>(f&&(j=f(f=0)),j);import{isSchemaModel as C}from"@contractspec/lib.schema/SchemaModel";function D(f){if(C(f))return f.config.name;return"AnonymousSchema_"+Math.random().toString(36).substring(7)}class E{items=new Map;constructor(f){if(f)f.forEach((j)=>this.register(j))}register(f){let j=D(f);if(this.items.has(j))throw Error(`Duplicate contract \`model\` ${j}`);return this.items.set(j,f),this}list(){return[...this.items.values()]}get(f){return this.items.get(f)}}export{E as ModelRegistry};
