function RxBrioUtils.flatCombineLatestBrio(W,q)assert(type(W)=="\116\097\098\108\101","\066\097\100 \111\098\115\101\114\118\097\098\108\101\115")return(RxBrioUtils.flatCombineLatest(W)):Pipe({RxBrioUtils.switchToBrio();q and RxBrioUtils.where(q)or nil})end
--[=[
	Flattens all the brios in one brio and combines them, and then switches it to
	a brio so only the last state is valid.

	@param observables { [any]: Observable<Brio<T>> | Observable<T> | T }
	@param filter function | nil
	@return Observable<Brio<{ [any]: T }>>
]=]
function RxBrioUtils.flatCombineLatestBrio(observables, filter)
	assert(type(observables) == "table", "Bad observables")

	return RxBrioUtils.flatCombineLatest(observables):Pipe({
		RxBrioUtils.switchToBrio(),
		filter and RxBrioUtils.where(filter) or nil,
	})
end
