'R Moderation Box diagram

I saw an answer from 2017 about using the following code to create a simple mediation flow per below using the diagram package. How can I add a box for a MODERATOR between the Mediator and Y path to this below?

THANK YOU in advance

data <- c(0, "'.56*'", 0,
      0, 0, 0, 
      "'.64*'", "'.40* (.04)'")
M<- matrix (nrow=3, ncol=3, byrow = TRUE, data=data)
plot<- plotmat (M, pos=c(1,2), 
            name= c( "self.esteem","grades", "happiness"), 
            box.type = "rect", box.size = 0.13, box.prop=0.5,  curve=0)
r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source