// What the faces read off a card beyond its words: a place holding several// entries (an event's people), a place holding a list of words (a mood's// emotions), cut where the core joined them, and a card made from its parts —// the shape a specimen or a test hands a face, exactly as the core would have// resolved it under `@card`.importCottonValuesextensionDeckCard {publicinit(face: DefinitionCardKind, corner: String? = nil, pressing: Bool = false, fields: [String: RecordValue]) {self.init(face: face.rawValue, corner: corner, pressing: pressing, pace: nil, plate: nil, fields: fields) }/// The card with what the deck reads for it beyond the core's words (its/// pages, labels, history…): the shape a specimen hands a face, exactly/// as the deck would have filled it.publicfunc reading(_ read: (inoutDeckCard) -> Void) -> DeckCard {var card = self read(&card)return card }/// A place that holds several entries (an event's people): each entry's/// own places.publicfunc entries(_ slot: String) -> [[String: RecordValue]] {guardcase .list(let items)? = fields[slot] else { return [] }return items.compactMap { item inifcase .object(let entry) = item { return entry }returnnil } }/// A place that holds a list of words (a mood's emotions, a meeting's/// speakers): each as the core said it, in its order; words the core/// joined into one (`cards` `join`) are cut where it joined them.publicfunc words(_ slot: String) -> [String] {switch fields[slot] {case .list(let items)?: return items.compactMap(\.text)case .text(let joined)?: returnSelf.chips(joined)default: return [] } }/// The parts the core joined into a place (`join`), each its own chip.publicstaticfunc chips(_ words: String?) -> [String] {guardlet words else { return [] }let join = ShellLines.line("cards", "join")return words.components(separatedBy: join).map { $0.trimmingCharacters(in: .whitespaces) }.filter { !$0.isEmpty } }}