Escape the Candlelit Maze You find yourself in a strange place. A frighteningly dark maze, lit only by dim candles resting in the occasional hallway. Numerous paths lie only in impassable darkness, foreboding and-- ...Hm? What? Pick up a candle and carry it with you? No, no, that would be extremely rude.

The Task

Given a maze as input, output the minimum moves to solve it, or any falsey/invalid output if the maze cannot be solved. The catch: The maze is very dark, but is lit by candles placed on some of the grid squares. The player may only move in a direction if they can see light in that direction.

Rules


Take the maze as input in any convenient format (string, 1d array, 2d array, etc).
x represents a wall, @ represents the player, ^ represents a candle and # represents the exit.
The maze will be surrounded on all sides by walls, except for the player's starting space and the exit space, each of which will be in one of the walls. The corners will always be walls.
The player may only make orthogonal moves one space at a time in the direction of visible light. This is either a candle or the exit.
Candlelight only reaches the space it's on, but is visible from any distance.
Output the minimum number of legal moves the player can make to reach the exit, or any "invalid" value (such as a negative value, zero, false, the string "Unsolvable!", etc) if the maze is unsolvable within the rules. The player must move into the exit space to solve the maze.
Standard loophole restrictions and i/o rules apply.


Test Cases

1-

Input:
xxxxxxxxxx
@^x    ^xx
x^  ^xxxxx
xxxx x^  #
x xx x xxx
x ^ ^ ^x x
x xxxx  ^x
xxxxxxxxxx

Output:
15


2-

Input:
xxxxxxxxxxxx
x^ ^xxxxxxxx
x x        #
x x^xxxx xxx
x xxxx   xxx
x^  ^xxx^xxx
xxxx@xxxxxxx

Output:
19


Once the player moves into a space that can see a new light source, such as the exit, they can then start moving towards that light source.

3- 

Input:
xxxxxxxx
#  xx ^x
xx^  ^xx
x ^xx xx
xxxxx@xx

Output:
Unsolvable


4-

Input:
xxxxxxxxx
@      ^x
x xxxxx x
x x^   ^x
x x xxxxx
x x^   ^x
x xxxxx x
x^ ^   ^x
xxx#xxxxx

Output:
10


The player must take the shortest path.

5-

Input:
xxxxxxxxx
x   ^  ^x
xxxx xxxx
#  x    x
x^xx^xxxx
x^   x  x
xxxx x xx
x     ^ x
xxxx@xxxx

Output:
Unsolvable


Scoring

This is code-golf, so shortest code in bytes wins.
Retina 0.8.2, 229 bytes

T`#^`d
s`@.*
$&amp;_
@\d|@ ( *\d)
@=$1
(\d *) @|\d@
$1=@
m`^(((.))*@.*\n(?&lt;-2&gt;.)*(?(2)$))(\d| ((.*\n)+(?&lt;-3&gt;.)*(?(3)$)\d))
$1=$5
m`^(((.))*)(\d|(\d(.*\n)+(?&lt;-2&gt;.)*(?(2)$)) )(.*\n(?&lt;-3&gt;.)*(?(3)$)@)
$1$5=$7
@
x
}sT`=`@`.*0.*
s`.*0.*

_


Try it online! Outputs 0 for unsolvable, since solutions must take at least one step. Explanation:

T`#^`d


Change the candle and exit to golfier characters, saving 7 bytes

s`@.*
$&amp;_


If there are still squares to check, then increment the counter. (This allows the loop to terminate once it runs out of squares to check.)

@\d|@ ( *\d)
@=$1


Mark the square to the right if it is lit.

(\d *) @|\d@
$1=@


Mark the square to the left if it is lit.

m`^(((.))*@.*\n(?&lt;-2&gt;.)*(?(2)$))(\d| ((.*\n)+(?&lt;-3&gt;.)*(?(3)$)\d))
$1=$5


Mark the square below if it is lit.

m`^(((.))*)(\d|(\d(.*\n)+(?&lt;-2&gt;.)*(?(2)$)) )(.*\n(?&lt;-3&gt;.)*(?(3)$)@)
$1$5=$7


Mark the square above if it is lit.

@
x


Turn the squares that were checked into walls.

sT`=`@`.*0.*


If the exit still exists, then turn all of the marked squares into squares that need to be checked.

}`


Repeat the above until the exit is reached or no new steps could be taken.

s`.*0.*


If the exit was not reached then delete the count.

_


Convert the count to decimal and delete the input.