when using complex ternary operators , often it becomes rather painful to count all the parentheses.
or even longer when using even more operators.
I suggest using color coding. first parenthesis opened has color green, next blue, next red, etc etc. if a parenthesis is missing, then the parenthesis stays black until closed.
this will vastly improve usability for experienced users.