trackTypedValue(); } /** * Get a masked version of the entered value. */ public function masked(): string { return str_repeat('•', mb_strlen($this->value())); } /** * Get the masked value with a virtual cursor. */ public function maskedWithCursor(int $maxWidth): string { if ($this->value() === '') { return $this->dim($this->addCursor($this->placeholder, 0, $maxWidth)); } return $this->addCursor($this->masked(), $this->cursorPosition, $maxWidth); } }