\(xyz-\left(xy+yz+xz\right)+\left(x+y+z\right)-1\)
\(=xyz-xy-yz+y-xz+x+z-1\)
\(=xy\left(z-1\right)-y\left(z-1\right)-x\left(z-1\right)+z-1\)
\(=\left(xy-y-x+1\right)\left(z-1\right)\)
\(=[\left(x-1\right)y-\left(x-1\right)]\left(z-1\right)\)
\(=\left(x-1\right)\left(y-1\right)\left(z-1\right)\)