def parse
import bendvy-ecs-core@0.1.0.4/restore_raw.bend as RestoreRawimport Base
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
97# Parse the four-field snapshot object into typed detached Data without touching
98# World. Version must be 1; nextEntity is positive U32; saved index/generation
99# accept full U32 including zero as opaque tokens, not target allocator slots.
100# Exact numeric conversion rejects fractions/nonfinite/out-of-range input before
101# narrowing. Entities/components/resources shapes are checked in authored order;
102# D.field keeps existing first-match semantics, not a new duplicate-property rule.
103# Complete-key duplicates, schema dispatch and capacity are checked by typed restore.
104def parse(+raw:D.Raw) -> Parsed:finished(raw,object(raw))