Fair Value Measurements (Details) - Fair Value, Measurements, Recurring - USD ($) $ in Thousands | Jun. 30, 2019 | Dec. 31, 2018 |
Available-for-sale Securities | $ 665,787 | $ 439,824 |
Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 310,550 | 43,281 |
Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 355,237 | 396,543 |
Short-term Investments | | |
Available-for-sale Securities | 216,746 | 314,464 |
Short-term Investments | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Short-term Investments | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 216,746 | 314,464 |
Short-term Investments | Commercial paper | | |
Available-for-sale Securities | 138,332 | 180,846 |
Short-term Investments | Commercial paper | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Short-term Investments | Commercial paper | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 138,332 | 180,846 |
Short-term Investments | Federal agency debt securities | | |
Available-for-sale Securities | 10,504 | 11,887 |
Short-term Investments | Federal agency debt securities | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Short-term Investments | Federal agency debt securities | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 10,504 | 11,887 |
Short-term Investments | Municipal debt securities | | |
Available-for-sale Securities | 7,450 | 14,252 |
Short-term Investments | Municipal debt securities | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Short-term Investments | Municipal debt securities | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 7,450 | 14,252 |
Short-term Investments | Corporate debt securities | | |
Available-for-sale Securities | 55,729 | 101,489 |
Short-term Investments | Corporate debt securities | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Short-term Investments | Corporate debt securities | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 55,729 | 101,489 |
Short-term Investments | US Treasury Bond Securities | | |
Available-for-sale Securities | 4,731 | 5,990 |
Short-term Investments | US Treasury Bond Securities | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Short-term Investments | US Treasury Bond Securities | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 4,731 | 5,990 |
Long Term Investments | | |
Available-for-sale Securities | 24,704 | 51,526 |
Long Term Investments | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Long Term Investments | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 24,704 | 51,526 |
Long Term Investments | Federal agency debt securities | | |
Available-for-sale Securities | 1,269 | 11,291 |
Long Term Investments | Federal agency debt securities | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Long Term Investments | Federal agency debt securities | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 1,269 | 11,291 |
Long Term Investments | Corporate debt securities | | |
Available-for-sale Securities | 20,367 | 37,334 |
Long Term Investments | Corporate debt securities | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Long Term Investments | Corporate debt securities | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 20,367 | 37,334 |
Long Term Investments | US Treasury Bond Securities | | |
Available-for-sale Securities | 3,068 | 2,901 |
Long Term Investments | US Treasury Bond Securities | Fair Value, Inputs, Level 1 | | |
Available-for-sale Securities | 0 | 0 |
Long Term Investments | US Treasury Bond Securities | Fair Value, Inputs, Level 2 | | |
Available-for-sale Securities | 3,068 | 2,901 |
Cash Equivalents | | |
Cash Equivalents | 424,337 | 73,834 |
Cash Equivalents | Fair Value, Inputs, Level 1 | | |
Cash Equivalents | 310,550 | 43,281 |
Cash Equivalents | Fair Value, Inputs, Level 2 | | |
Cash Equivalents | 113,787 | 30,553 |
Cash Equivalents | Money Market Funds | | |
Cash Equivalents | 310,550 | 43,281 |
Cash Equivalents | Money Market Funds | Fair Value, Inputs, Level 1 | | |
Cash Equivalents | 310,550 | 43,281 |
Cash Equivalents | Money Market Funds | Fair Value, Inputs, Level 2 | | |
Cash Equivalents | 0 | 0 |
Cash Equivalents | Commercial paper | | |
Cash Equivalents | 110,429 | 29,138 |
Cash Equivalents | Commercial paper | Fair Value, Inputs, Level 1 | | |
Cash Equivalents | 0 | 0 |
Cash Equivalents | Commercial paper | Fair Value, Inputs, Level 2 | | |
Cash Equivalents | 110,429 | 29,138 |
Cash Equivalents | Federal agency debt securities | | |
Cash Equivalents | 950 | 0 |
Cash Equivalents | Federal agency debt securities | Fair Value, Inputs, Level 1 | | |
Cash Equivalents | 0 | 0 |
Cash Equivalents | Federal agency debt securities | Fair Value, Inputs, Level 2 | | |
Cash Equivalents | 950 | 0 |
Cash Equivalents | Municipal debt securities | | |
Cash Equivalents | 2,408 | 0 |
Cash Equivalents | Municipal debt securities | Fair Value, Inputs, Level 1 | | |
Cash Equivalents | 0 | 0 |
Cash Equivalents | Municipal debt securities | Fair Value, Inputs, Level 2 | | |
Cash Equivalents | 2,408 | 0 |
Cash Equivalents | US Treasury Bond Securities | | |
Cash Equivalents | 0 | 1,415 |
Cash Equivalents | US Treasury Bond Securities | Fair Value, Inputs, Level 1 | | |
Cash Equivalents | 0 | 0 |
Cash Equivalents | US Treasury Bond Securities | Fair Value, Inputs, Level 2 | | |
Cash Equivalents | $ 0 | $ 1,415 |