"use strict";function log(n){console.log(n)}var TCOM=angular.module("TCOM",["api.services","ui.bootstrap","ui.bootstrap.modal","ui.bootstrap.typeahead","angularFileUpload","ngCookies"]);TCOM.config(["$routeProvider","$locationProvider",function(n,t){t.html5Mode(!0).hashPrefix("!");n.when("/",{templateUrl:"/partial/landing"}).when("/blog",{controller:"BlogCtrl",templateUrl:"/scripts/app/views/blog/blogwrapper.html"}).when("/blog/post/:postTitle",{controller:"BlogCtrl",templateUrl:"/scripts/app/views/blog/blogwrapper.html"}).when("/blog/page/:pageNumber",{controller:"BlogCtrl",templateUrl:"/scripts/app/views/blog/blogwrapper.html"}).when("/careers",{templateUrl:"/partial/careers"}).when("/careers/search/:searchString",{templateUrl:"/partial/careers"}).when("/careers/:category",{templateUrl:"/partial/careers"}).when("/careers/:category/:jobTitle",{templateUrl:"/partial/careers"}).when("/careers/:category/:jobTitle/:jobLocation",{templateUrl:"/partial/careers"}).when("/contact-us",{templateUrl:"/partial/contact-us"}).when("/easy-integration",{templateUrl:"/partial/easy-integration"}).when("/for-providers",{templateUrl:"/partial/for-providers"}).when("/get-started",{templateUrl:"/partial/get-started"}).when("/in-walgreens",{templateUrl:"/partial/in-walgreens"}).when("/location-search",{templateUrl:"/partial/location-search"}).when("/location-search/:zipCode",{templateUrl:"/partial/location-search"}).when("/our-centers",{templateUrl:"/partial/our-centers"}).when("/our-company",{templateUrl:"/partial/our-company"}).when("/our-lab",{templateUrl:"/partial/our-lab"}).when("/our-solution",{templateUrl:"/partial/our-solution"}).when("/our-technology",{templateUrl:"/partial/our-technology"}).when("/our-tests",{templateUrl:"/partial/our-tests"}).when("/our-tools",{templateUrl:"/partial/our-tools"}).when("/partner-login",{templateUrl:"/scripts/app/views/login/partnerlogin.html",controller:"PartnerLoginCtrl"}).when("/news",{templateUrl:"/partial/news"}).when("/news/new-board-of-directors-members",{templateUrl:"/partial/news/new-board-of-directors-members"}).when("/news/theranos-selects-walgreens-as-a-long-term-partner",{templateUrl:"/partial/news/theranos-selects-walgreens-as-a-long-term-partner"}).when("/news/theranos-and-walgreens-expand-to-phoenix",{templateUrl:"/partial/news/theranos-and-walgreens-expand-to-phoenix"}).when("/news/theranos-appoints-david-helfet-to-its-medical-advisory-board",{templateUrl:"/partial/news/theranos-appoints-david-helfet-to-its-medical-advisory-board"}).when("/news/theranos-appoints-william-h-frist-to-its-board-of-directors",{templateUrl:"/partial/news/theranos-appoints-william-h-frist-to-its-board-of-directors"}).when("/news/theranos-appoints-riley-p-bechtel-to-its-board-of-directors",{templateUrl:"/partial/news/theranos-appoints-riley-p-bechtel-to-its-board-of-directors"}).when("/news/theranos-appoints-william-h-foege-to-its-board-of-directors",{templateUrl:"/partial/news/theranos-appoints-william-h-foege-to-its-board-of-directors"}).when("/news/jon-shieber-gets-some-blood-work-done-with-elizabeth-holmes-of-theranos",{templateUrl:"/partial/news/jon-shieber-gets-some-blood-work-done-with-elizabeth-holmes-of-theranos"}).when("/news/theranos-wins-at-2014-edison-awards",{templateUrl:"/partial/news/theranos-wins-at-2014-edison-awards"}).when("/news/real-cost-of-healthcare",{templateUrl:"/partial/news/real-cost-of-healthcare"}).when("/news/a-new-day-in-diagnostics",{templateUrl:"/partial/news/a-new-day-in-diagnostics"}).when("/news/personalized-medicine-the-future-is-now",{templateUrl:"/partial/news/personalized-medicine-the-future-is-now"}).when("/news/most-powerful-women-next-generation",{templateUrl:"/partial/news/most-powerful-women-next-generation"}).when("/news/computer-history-museum-revolutionaries",{templateUrl:"/partial/news/chm"}).when("/news/scottsdale-cure-corridor-keynote-address",{templateUrl:"/partial/news/scottsdale-cure-corridor-keynote-address"}).when("/news/clinton-foundation-health-matters",{templateUrl:"/partial/news/clinton-foundation-health-matters"}).when("/news/stanford-gsb-vftt",{templateUrl:"/partial/news/stanford-gsb-vftt"}).when("/news/theranos-files-comment-fda",{templateUrl:"/partial/news/theranos-files-comment-fda"}).when("/news/theranos-cleveland-clinic-announce-strategic-alliance",{templateUrl:"/partial/news/theranos-cleveland-clinic-announce-strategic-alliance"}).when("/news/arizona-bill-signing",{templateUrl:"/partial/news/arizona-bill-signing"}).when("/privacy-policy",{templateUrl:"/partial/privacy-policy"}).when("/privacy-practices",{templateUrl:"/partial/privacy-practices"}).when("/security-policy",{templateUrl:"/partial/security-policy"}).when("/subscription/confirm/:confirmationId",{templateUrl:"/scripts/app/views/wrapper.html",controller:"WrapperCtrl"}).when("/terms-of-use",{templateUrl:"/partial/terms-of-use"}).when("/test-menu",{templateUrl:"/partial/test-menu"}).when("/test-menu/test/:theranosId",{templateUrl:"/partial/test-menu"}).when("/the-experience",{templateUrl:"/partial/the-experience"}).otherwise({templateUrl:"/scripts/app/views/404.html"})}]);TCOM.run(["$rootScope","$location","$timeout",function(n){String.prototype.normalizeForUrl=function(){var n=this;return!n||n.length<1?"":n.split(" ").map(function(n){return n.toLowerCase().replace(/\W/g,"")}).filter(function(n){if(n&&n.length>0)return n}).join("-")};String.prototype.toTitleCase=function(){var n=this;return n.replace(/\w\S*/g,function(n){return n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()})};Array.prototype.indexOf||(Array.prototype.indexOf=function(n){var i=this.length>>>0,t=Number(arguments[1])||0;for(t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=i);t<i;t++)if(t in this&&this[t]===n)return t;return-1});n=angular.extend(n,{registerAllIncludeContentLoadedListener:function(n,t){n.$on("allIncludesLoaded"+n.$id,t)},registerViewContentLoadedListener:function(n,t){n.$on("viewLoaded"+n.$id,t)}})}]);TCOM.controller("MapsCtrl",["$scope","$timeout",function(n,t){function i(){var n={center:new google.maps.LatLng(37.408248,-122.152764),zoom:15,disableDefaultUI:!0,panControl:!0,mapTypeControl:!0,mapTypeId:google.maps.MapTypeId.ROADMAP},t=new google.maps.Map(document.getElementById("map-canvas"),n),i=new google.maps.LatLng(37.408248,-122.152764),r=new google.maps.Marker({position:i,map:t,icon:"/Content/images/contact/pinpoint.png"})}t(i,100)}]);TCOM.directive("ngInclude",function(){function n(t,i){i.hasOwnProperty("includesLoading")||(i.includesLoading=[]);i.includesLoading.indexOf(t.$id)===-1&&i.includesLoading.push(t.$id);i.$parent&&n(t,i.$parent)}function t(n,i){var r=i.includesLoading.indexOf(n.$id);r!==-1&&(i.includesLoading.splice(r,1),i.includesLoading.length===0&&i.$emit("allIncludesLoaded"+i.$id));i.$parent&&t(n,i.$parent)}function i(n){n.includesLoading.length=0;n.$parent&&i(n.$parent)}return{restrict:"A",link:function(r){n(r,r.$parent);r.$on("$routeChangeSuccess",function(){i(r)});r.$on("$includeContentLoaded",function(){t(r,r.$parent)})}}});TCOM.directive("ngView",function(){function n(t,i){i.hasOwnProperty("viewLoading")||(i.viewLoading=[]);i.viewLoading.indexOf(t.$id)===-1&&i.viewLoading.push(t.$id);i.$parent&&n(t,i.$parent)}function t(n,i){var r=i.viewLoading.indexOf(n.$id);r!==-1&&(i.viewLoading.splice(r,1),i.viewLoading.length===0&&i.$emit("viewLoaded"+i.$id));i.$parent&&t(n,i.$parent)}function i(n){n.viewLoading.length=0;n.$parent&&i(n.$parent)}return{restrict:"E",link:function(r){n(r,r.$parent);r.$on("$routeChangeSuccess",function(){i(r)});r.$on("$viewContentLoaded",function(){t(r,r.$parent)})}}});document.createElement("rotater");document.createElement("header");document.createElement("footer");document.createElement("ng-view");document.createElement("ng-include");document.createElement("ng-pluralize");document.createElement("ng:view");document.createElement("ng:include");document.createElement("ng:pluralize");TCOM.controller("AppCtrl",["$scope","callAPI","$timeout","$location","$rootScope","$window",function(n,t,i,r,u){n.name="AppCtrlScope";n.appChildrenLoaded=!1;n.partnerLogin={url:"https://"+r.host()+"/partner-login"};r.url().toString().toLowerCase().indexOf("/subscription")>-1&&(n.appChildrenLoaded=!0);var f=function(){n.appChildrenLoaded=!0};u.registerViewContentLoadedListener(n,f);n.trackFakePageView=function(n){_gaq.push(["_trackPageview",n])};u.pageInfo={};u.updatePageInfo=function(){var t=r.url(),n=t.indexOf("/",1);n===-1&&(n=t.indexOf("?",1));n===-1&&(n=t.indexOf("#",1));n===-1&&(n=t.length);u.pageInfo.bodyId=t.substring(1,n);u.pageInfo.bodyId=u.pageInfo.bodyId.replace("#","").replace("!","").replace("/","");u.pageInfo.bodyId||(u.pageInfo.bodyId="home");u.pageInfo.url=r.absUrl().toString().toLowerCase()};u.updatePageInfo();n.$on("$routeChangeSuccess",function(){u.updatePageInfo();(r.url().indexOf("contact-us")>-1||r.url().indexOf("location-search")>-1)&&(n.loadMap=!0);var t=r.url().toString().toLowerCase();_gaq.push(["_trackPageview",t]);_paq.push(["trackPageView",t])});n.getMainContentMinHeight=function(){var n=document.getElementsByTagName("footer")[0],t=document.getElementsByTagName("header")[0];return window.innerHeight-t.clientHeight-n.clientHeight};n.setMainContentMinHeight=function(){var n=scope.getMainContentMinHeight()-10;element.css("min-height",n+"px");element.css("display","block")}}]);TCOM.directive("expandingdisplayblock",["$timeout",function(n){return{link:function(t,i,r){i.css("display","block");i.css("overflow",r.expandHideOverflow==="false"?"auto":"hidden");var u=function(){var n=t.getMainContentMinHeight()-(r.expandMargin?r.expandMargin:0);i.css("min-height",(r.expandMin?Math.max(r.expandMin,n):n)+"px")},f=angular.element(window);f.bind("resize",function(){u()});t.$watch("appChildrenLoaded",function(){n(function(){u()},10)});t.$on("searchMapLoaded",function(){u()})}}}]);TCOM.directive("scriptAppend",[function(){return{restrict:"A",link:function(n,t,i){var r=angular.element(document.createElement("script")).attr({type:"text/javascript",src:i.scriptAppend});t.append(r)}}}]);TCOM.controller("BlogCtrl",["$scope","$location","$routeParams","$timeout","$http","$route",function(n,t,i,r,u,f){function s(){n.currentPageNumber==1&&o==1?(n.blog.blogStart=!0,n.blog.blogEnd=!0):n.currentPageNumber==1&&o>1?(n.blog.blogStart=!0,n.blog.blogEnd=!1):n.currentPageNumber>1&&n.currentPageNumber<o?(n.blog.blogEnd=!1,n.blog.blogEnd=!1):n.currentPageNumber==o&&(n.blog.blogStart=!1,n.blog.blogEnd=!0)}function h(){var t=(n.currentPageNumber-1)*2,i=n.blogPosts.slice(t,t+1),r=n.blogPosts.slice(t+1,t+2);n.blog.currentPosts=i.concat(r)}function c(){var t=n.blogPosts.indexOf(n.blog.fullPost);t<0||t>n.blogPosts.length||(n.blog.previousFullPost=n.blogPosts[t-1],n.blog.nextFullPost=n.blogPosts[t+1])}function l(){var t=n.blogPosts.indexOf(n.blog.fullPost);t<0||t>n.blogPosts.length||(n.blog.postStart=n.blogPosts[t-1]==undefined?!0:!1,n.blog.postEnd=n.blogPosts[t+1]==undefined?!0:!1)}var e,o,a;n.blogPosts=["1.html","2.html","3.html","4.html","5.html"];n.blog={};n.fullBlogView=!1;e=f.current;n.$on("$locationChangeSuccess",function(){var t,i;f.current.$$route.controller=="BlogCtrl"&&(f.current.params.pageNumber&&e.params.pageNumber?(t=f.current.params.pageNumber,f.current=e,f.current.params.pageNumber=t,n.currentPageNumber=t,s(),h()):f.current.params.postTitle&&e.params.postTitle&&(i=f.current.params.postTitle,f.current=e,f.current.params.postTitle=i,n.blog.fullPost=i,l()))});n.currentPageNumber=i.pageNumber;o=Math.round(n.blogPosts.length/2);a=n.blogPosts.indexOf(i.postTitle);n.currentPageNumber?(s(),h()):(n.blog.fullPost=i.postTitle,n.blog.fullBlogView=!0,l());n.goPreviousPage=function(){n.blog.blogStart||t.url("/blog/page/"+(parseInt(n.currentPageNumber,10)-1))};n.goNextPage=function(){n.blog.blogEnd||t.url("/blog/page/"+(parseInt(n.currentPageNumber,10)+1))};n.goPreviousPost=function(){c();n.blog.previousFullPost&&(n.blog.postStart=!1,t.url("/blog/post/"+n.blog.previousFullPost))};n.goNextPost=function(){c();n.blog.nextFullPost&&(n.blog.postEnd=!1,t.url("/blog/post/"+n.blog.nextFullPost))};n.readMore=function(n){t.url("/blog/post/"+n)};r(function(){twttr||!function(n,t,i){var r,f=n.getElementsByTagName(t),u=u||f[f.length-1],e=/^http:/.test(n.location)?"http":"https";n.getElementById(i)||(r=n.createElement(t),r.type="text/javascript",r.id=i,r.src=e+"://platform.twitter.com/widgets.js",u.parentNode.insertBefore(r,u))}(document,"script","twitter-wjs");twttr.widgets.load()},1)}]);TCOM.controller("CareerMenuCtrl",["$scope","jobsService","$routeParams",function(n){n.name="CareerMenuCtrlScope";n.isCollapsed=!0}]);TCOM.directive("childMenu",["$location",function(){return{restrict:"A",link:function(n,t){n.expandCat=n.expandSubCategories(n.cat);n.menuLink="/careers/"+n.cat.Name.normalizeForUrl();t.bind("click",function(){if(n.cat.SubCategories)var t=n.cat.SubCategories.filter(function(t){if(t.Name.normalizeForUrl()===n.Jobs.category)return t})})}}}]);TCOM.controller("CareersCtrl",["$location","$rootScope","$scope","$routeParams","jobsService","$timeout","$window",function(n,t,i,r,u,f,e){var o,h,c,s;i.gettingJobDetails=!0;i.navigation={};i.goBack=function(){i.navigation.lastSearchString!==undefined?e.history.back():n.path("/careers/"+i.navigation.url)};o=function(n,t){var i=[],r;return n.Name.normalizeForUrl().indexOf(t)>=0?(n.Titles&&n.Titles.length>0&&(i=i.concat(n.Titles.map(function(t){return[t,n.Name]}))),n.SubCategories&&n.SubCategories.forEach(function(n){i=i.concat(n.Titles.map(function(t){return[t,n.Name]}))})):n.SubCategories&&n.SubCategories.length>0?n.SubCategories.forEach(function(n){i=i.concat(o(n,t))}):n.Titles&&n.Titles.length>0&&(r=n.Titles.filter(function(i){return i.Title.normalizeForUrl().indexOf(t)>=0?n:i.Location.normalizeForUrl().toLowerCase().indexOf(t)>=0?n:void 0}),r.length>0&&(i=i.concat(r.map(function(t){return[t,n.Name]})))),i};h=function(n){var t=[],r=n.normalizeForUrl();return r.length===0?t:(i.Jobs.jobCategories.forEach(function(n){t=t.concat(o(n,r))}),t)};i.$on("$routeChangeSuccess",function(n,t,r){r&&(i.navigation.lastWasCareerHome=!0,(r.params.searchString||r.params.category)&&(i.navigation.lastWasCareerHome=!1),r.params&&(i.navigation.lastSearchString=r.params.searchString))});i.searchJobs=function(){!i.jobSearchString||i.jobSearchString.length<=0||(i.jobSearchString=i.jobSearchString.trim(),i.jobSearchString!=="."&&i.jobSearchString!=="..")&&n.path("/careers/search/"+i.jobSearchString)};i.getTitlesInCategory=function(n){var r=i.Jobs.jobCategories.filter(function(t){if(n&&t.Name.normalizeForUrl()===n.toLowerCase())return t}),t;return r&&r.length>0?r[0].Titles:(t=[],i.Jobs.jobCategories.map(function(i){var u,r;if(i.SubCategories&&i.SubCategories.length>0)for(u=i.SubCategories.filter(function(t){if(n&&t.Name.normalizeForUrl()===n.toLowerCase())return t}),r=0;r<u.length;r++)t=t.concat(u[r].Titles)}),t)};i.expandSubCategories=function(n){if(n.Name.normalizeForUrl()===r.category)return!0;if(n.SubCategories){var t=n.SubCategories.filter(function(n){if(n.Name.normalizeForUrl()===r.category)return n});if(t.length>0)return!0}return!1};i.name="CareersCtrlScope";i.Jobs={category:r.category};i.Jobs.jobCategories=[];i.isAtCareerHome=r.searchString||r.category||r.jobTitle?!1:!0;c=function(t){var f=t.slice(0),o,u,l,s,e,c,a;for(f.sort(function(n,t){return n.Name.normalizeForUrl()<t.Name.normalizeForUrl()?-1:n.Name.normalizeForUrl()>t.Name.normalizeForUrl()?1:0}),o=[],u=0;u<f.length;u++)f[u].SubCategories&&f[u].SubCategories.length>0&&o.push(u);for(u=0;u<o.length;u++)l=f.splice(o[u],1),f=l.concat(f);i.Jobs.jobCategories=f;i.Jobs.category&&(s=i.Jobs.jobCategories.filter(function(n){return n.Name.normalizeForUrl()===i.Jobs.category?!0:!1}),s&&s.length>0?i.Jobs.categoryObj=s[0]:(e=i.Jobs.jobCategories.filter(function(n){return n.SubCategories&&n.SubCategories.length>0}).filter(function(n){var t=n.SubCategories.filter(function(n){return n.Name.normalizeForUrl()===i.Jobs.category});return t.length>0?!0:!1}),e&&e.length>0&&(c=e[0].SubCategories.filter(function(n){return n.Name.normalizeForUrl()===i.Jobs.category}),c.length>0&&(i.Jobs.subcategoryObj=c[0],i.Jobs.categoryObj=e[0]))));r.searchString?(i.mainContent="/scripts/app/views/careers/maincontent/searchresult.html",i.jobSearchString=r.searchString,i.jobSearchStringForDisplay=r.searchString,a=h(r.searchString),i.jobSearchResult=a,r.src&&r.src.indexOf("menu")>=0&&(i.isPhoenixClicked=!0)):r.jobTitle?i.mainContent="/scripts/app/views/careers/maincontent/jobdetails/default.html":r.category?(i.titlesInCategory=i.getTitlesInCategory(i.Jobs.category),i.titlesInCategory&&i.titlesInCategory.length===1?n.path("/careers/"+i.Jobs.category+"/"+i.titlesInCategory[0].Title.normalizeForUrl()).replace():i.mainContent="/scripts/app/views/careers/maincontent/category.html"):(i.isAtCareerHome=!0,i.mainContent="/scripts/app/views/careers/maincontent/careerhome.html");i.gettingJobDetails=!1};s=function(n){return function(t){var r=t instanceof Array?t[0]:t,i="";return n.map(function(n){i+=r[n]+"_"}),i}};i.sorting={column:s(["Title"]),descending:!1,lastColumn:"Title"};i.updateSorting=function(n){i.sorting.lastColumn===n.join()?i.sorting.descending=!i.sorting.descending:(i.sorting.lastColumn=n.join(),i.sorting.column=s(n),i.sorting.descending=!1)};u.getJobCategoriesAsync().then(c)}]);TCOM.controller("CarouselCtrl",["$scope","$timeout","$cookieStore",function(n,t,i){n.originalItems=["6.html","50.html","51.html","49.html","48.html","47.html","42.html","43.html","25.html"];var r=i.get("carouselInitial"),u=i.get("visitCount")||0;n.hover={prev:!1,next:!1};n.items=n.originalItems.concat(n.originalItems);n.size=n.originalItems.length;n.goToNext=function(){n.current.center+=1;t(function(){n.centerIndex=n.current.center-1},300)};n.goToPrev=function(){n.current.center-=1;t(function(){n.centerIndex=n.current.center-1},300)};n.current={center:3};n.centerIndex=n.current.center-1}]);TCOM.controller("CentersCtrl",["$scope","$location",function(n,t){n.zip="";n.searchLocation=function(){if(_gaq){var i=n.zip;_gaq.push(["_setCustomVar",1,"zip",i.toString()]);_gaq.push(["_trackEvent","Our Centers","Click","Find Locations Submit"])}if(!n.zip){t.url("/location-search");return}if(n.zip=n.zip.trim(),n.zip==="."||n.zip===".."){t.url("/location-search");return}t.url("/location-search/"+n.zip)}}]);TCOM.controller("DigitalToolsCtrl",["$scope",function(n){n.toolsCenterHeroClass="tools-hero-findlocations"}]);TCOM.controller("FooterCtrl",["$scope","callAPI",function(n,t){function i(){log("success");n.isSubmitted=!0}function r(){log("error")}n.submit=function(){var u=n.partner;log("submit login: "+n.partner.username+" "+n.partner.password);t.query("/Content/data/GetStarted.json",u,i,r)}}]);TCOM.controller("GetStartedCtrl",["$http","$scope","callAPI","$timeout","$window",function(n,t,i,r,u){function f(){log("success");t.isSubmitted=!0;window.scrollTo(0,0)}function e(){log("error")}t.isSubmitted=!1;t.clientType="patient";t.subscriptionForm={type:"",firstName:"",lastName:"",email:"",zipcode:"",comments:"",PraticeType:"",wantUpdates:!0,wantSamplesInfo:!1,wantGeneralInfo:!1,jobTitle:"",organizationName:"",organizationType:""};t.data={patient:{},provider:{},other:{}};t.titles=[{name:"Physician"},{name:"Nurse"},{name:"Administrator"},{name:"Other"}];t.specialties=[{name:"Geriatrics"},{name:"Internal Medicine"},{name:"Oncology"},{name:"Pediatrics"},{name:"Primary Care Physician"},{name:"Other"}];t.data.patient.sendUpdate=!0;u.onresize=function(){t.adjustDropDowns()};t.$watch("clientType",function(){t.adjustDropDowns()});t.init=function(){t.adjustDropDowns()};t.adjustDropDowns=function(){r(function(){t.adjustDropDownText("titleSelectContainer","titleSelect","titles","Title*");t.adjustDropDownText("specialtySelectContainer","specialtySelect","specialties","Select specialty*")},100)};t.adjustDropDownText=function(n,i,r,u){var c=document.getElementById(n).offsetWidth,e=document.getElementById(i),o=e.selectedIndex,s=o===0?u:t[r][o-1].name,l=s.length,h=Math.floor(c/12),f;for(l>h?o!==0&&(e.options[e.selectedIndex].text=s.substring(0,h)+"..."):e.options[e.selectedIndex].text=s,f=0;f<t[r].length+1;f++)f!==o&&(e.options[f].text=f===0?u:t[r][f-1].name)};t.checkOtherTitle=function(n){var i=t.subscriptionForm.jobTitle,u;i&&i.name==="Other"?(t.showOtherTitle=!0,r(function(){var n=document.getElementById("otherTitle");n.focus()},100)):t.showOtherTitle=!1;u=document.getElementById(n);u.className=!i&&u?"styled-select error":"styled-select";t.adjustDropDowns()};t.setOtherTitle=function(){var n={name:t.otherTitle};t.titles.unshift(n);t.data.provider.title=n;t.showOtherTitle=!1;t.adjustDropDowns()};t.checkOtherSpecialty=function(n){var i=t.subscriptionForm.specialty,u;i&&i.name==="Other"?(t.showOtherSpecialty=!0,r(function(){var n=document.getElementById("otherSpecialty");n.focus()},100)):t.showOtherSpecialty=!1;u=document.getElementById(n);u.className=!i&&u?"styled-select error":"styled-select";t.adjustDropDowns()};t.setOtherSpecialty=function(){var n={name:t.otherSpecialty};t.specialties.unshift(n);t.subscriptionForm.specialty=n;t.showOtherSpecialty=!1;t.adjustDropDowns()};t.submit=function(){t.isProcessingSubscription=!0;var i=t.data[t.clientType];i.clientType=t.clientType;log(i);t.clientType==="patient"?t.subscriptionForm.type=0:t.clientType==="provider"?t.subscriptionForm.type=1:(t.subscriptionForm.type=2,t.subscriptionForm.zipcode="00000");t.subscriptionForm.phone&&(t.subscriptionForm.phone=t.subscriptionForm.phone.normalizeForUrl());t.subscriptionForm.zipcode&&(t.subscriptionForm.zipcode=t.subscriptionForm.zipcode.normalizeForUrl());n({url:"/subscription/submit",method:"POST",headers:{"Content-Type":"application/json"},data:t.subscriptionForm}).success(f).error(e).then(function(){r(function(){t.isProcessingSubscription=!1},800)})}}]);TCOM.controller("HeaderCtrl",["$scope","$timeout","$location",function(n,t,i){var u,f,r,e=!1,o=200;n.force_reload=function(n){i.path(n);t(function(){window.location.reload()},300)};n.mobileNavShown=!1;n.dropDownVisibility={our_solution:"off",our_centers:"off",our_company:"off",for_providers:"off"};document.onmousemove=function(n){n=n||window.event;u=n.target||n.srcElement;e=!0};n.showDropdown=function(i){e&&(f=i.target,r=f.innerText||f.textContent,r&&(r=r.toLowerCase().replace(" ","_")),t(function(){u===f&&r&&(n.dropDownVisibility[r]="on")},o))};n.hideDropdown=function(){function r(){(u!==f||u.className==="nav-trigger")&&n.hideSubmenuDrawer()}var i=u.className==="nav-trigger"?o:0;t(function(){r()},i)};n.hideSubmenuDrawer=function(){for(var t in n.dropDownVisibility)n.dropDownVisibility[t]="off"};n.toggleMobileNav=function(){n.mobileNavShown=n.mobileNavShown==!1?!0:!1};n.setRefferer=function(n){$rootScope.referrer=n.target.textContent;log($rootScope.referrer)}}]);TCOM.controller("JobApplicationCtrl",["$scope","$http","$timeout",function(n,t){n.Applicant={};n.error={appError:!1,resumeError:!1};n.isProcessingJobApplication=!1;n.states=["AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","HI","IA","ID","IL","IN","KS","KY","LA","ME","MA","MD","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","RI","SD","SC","TN","TX","UT","VT","VA","WA","WV","WI","WY","OTHER"];n.degrees=["Bachelors","Masters","Doctorate","MBA","MD","PhD","Associates","High School Diploma/GED"];n.sources=["Theranos Exclusive Premier 4/14","Theranos Careers Page","Employee Referral","Career Fair","Indeed","Glassdoor","LinkedIn","LinkedIn Careers Page","Twitter","Recruiting Event","Monster","Bay Bio","Other"];n.Applicant.Education=[{SchoolName:"",Degree:"",GraduationYear:""}];n.addSchool=function(){n.isSubFormInvalid()===!1&&n.Applicant.Education.push({SchoolName:"",Degree:"",GraduationYear:""})};n.files=[];n.onFileSelect=function(t){n.files=t[0];n.Applicant.ResumeFilePath=t[0].name;n.resumeFileName=n.Applicant.ResumeFilePath};n.processApplication=function(){n.isProcessingJobApplication=!0;t.uploadFile({url:"/api/Careers/Applicant/UploadFile",data:{emailId:n.Applicant.Email},file:n.files}).then(function(i){var u=i.ApiData,r;if(u=u||i.data.ApiData,!i)return n.error.appError=!0,n.jobApplicationError="Sorry, unable to get a response from the server. Please try again.",!1;if(r=i.Code,r===undefined&&(r=i.data?i.data.Code:1),r!=0&&(n.error.appError=!0),r==1)return n.jobApplicationError="Input error. Please try again.",!1;if(r==2)return n.jobApplicationError="Resume file uploaded is not valid. "+u+" Please try uploading a valid resume.",!1;if(r==3)return n.jobApplicationError="Unable to upload your resume. Please try again.",!1;n.Applicant.TaleoJobCode=n.job.Code;n.Applicant.ResumeFileName=u;n.Applicant.State="US-"+n.Applicant.USState;t({url:"/api/Careers/Applicant/Apply",method:"POST",headers:{"Content-Type":"application/json"},data:{model:n.Applicant}}).success(function(t){if(n.isProcessingJobApplication=!1,t.Code==0){n.error.appError=!1;n.open();n.resetForm();return}return(n.error.appError=!0,t.Code==1)?(n.error.jobApplicationError="Input error. Please try again.",!1):t.Code==4?(n.error.jobApplicationError="Invalid input. Please try again after correcting the following errors: "+t.Message,!1):t.Code==5?(n.error.jobApplicationError="This e-mail address was already used to apply for this job.",!1):t.Code==6?(n.error.jobApplicationError="Sorry, we are unable to save your data. Please try again.",!1):(n.error.appError=!0,n.error.jobApplicationError="Application submission failed, Please try again after sometime.",!1)})})};t.get("/content/data/universities.json").success(function(t){n.universities=t});n.resetForm=function(){n.jobDetailContext.showApplicationForm=!1;document.getElementById("jobApplication").reset();n.Applicant.Education.length=0;n.Applicant.Education.length=1};n.isSubFormInvalid=function(){return n.Applicant.Education.some(function(n){return angular.isUndefined(n.SchoolName)||angular.isUndefined(n.Degree)||angular.isUndefined(n.GraduationYear)||n.SchoolName===""||n.degree===""||n.GraduationYear===""})};n.openSelect=function(){console.log("opening select")};n.setShowError=function(){this.showError=!0};n.open=function(){n.shouldBeOpen=!0;n.currentJobCategory=n.job.Category.replace(" ","-")};n.closeModal=function(){n.shouldBeOpen=!1;n.jobDetailContext.showApplicationForm=!1};n.closeErrorModal=function(){n.error.appError=!1};n.closeResumeErrorModal=function(){n.error.resumeError=!1};n.opts={backdropFade:!0};n.customFileUpload=function(){var o=document.createElement&&document.getElementsByTagName,r,f,u,i,t,e;if(o)for(r=document.createElement("div"),r.className="fakefile",f=document.createElement("input"),f.className="fakeInput",r.appendChild(f),u=document.createElement("span"),u.className="text-button green",u.textContent="+ BROWSE",r.appendChild(u),i=document.getElementsByTagName("input"),t=0;t<i.length;t++)i[t].type=="file"&&(i[t].parentNode.className.indexOf("fileinputs")<0||(i[t].className="file fileHidden",e=r.cloneNode(!0),i[t].parentNode.appendChild(e),i[t].relatedElement=e.getElementsByTagName("input")[0],i[t].onclick=function(){this.value=""},i[t].onchange=function(){if(this.files&&this.files[0]&&this.files[0].size>2097152)return n.error.resumeError=!0,n.error.jobApplicationError="Resume exceeds max file size of 2MB. Please attach a smaller file and try again.",!1;this.relatedElement.value=this.value}))};n.customFileUpload()}]);TCOM.directive("thNgBlur",function(){return{link:function(n,t,i){t.bind("blur",function(){n.$apply(i.thNgBlur)})}}});TCOM.directive("thValidationGroup",function(){return{scope:!0,link:function(n,t,i){var r=t.find("select");r&&r.length>0&&(r.bind("mousedown",function(t){var u=i,f=n,r;if(t.target.options!==undefined)for(r=1;r<t.target.options.length;r++)t.target.options[r].text=n[i.thSelectSource][r-1]}),r.bind("change",function(n){var t,i,r;t=n.target.selectedIndex!==undefined?n.target.options[n.target.selectedIndex]:n.target.selectedOptions[0];i=n.target.offsetWidth*.8;r=12;t.text&&(t.text.length-3)*r>i&&(t.text=t.text.substring(0,Math.ceil(i/r)-3)+"...")}))}}});TCOM.directive("fileUpload",function(){return{restrict:"A",require:"ngModel",scope:!0,link:function(n,t,i,r){function e(n){var t,i,s,r,e,o,h,c,f;if(n&&n.size>2097152)return!1;if(t=n.name,t==null||t.length==0)return document.getElementById("resume")!=null?!0:(u("Resume file must be attached"),!1);if(t.length>300)return n.value="",u('File name is too long. Use "Browse" button to select valid file name.'),!1;for(i=t.lastIndexOf("/"),i>=0&&(t=t.substring(i+1)),i=t.lastIndexOf("\\"),i>=0&&(t=t.substring(i+1)),s=0;s<t.length;s++)if(r=t.charAt(s),r==":"||r=="*"||r=="?"||r=='"'||r=="<"||r==">"||r=="|")return n.value="",u("File name contains illegal character"+r),!1;if((i=t.lastIndexOf("."),i<0)||(e=t.substring(i+1),e.length==0))return n.value="",u("Cannot determine file extension."),!1;for(e=e.toLowerCase(),o=["doc","docx","rtf","pdf","txt"],f=0;f<o.length;f++)if(e==o[f])return!0;for(h="",c="",f=0;f<o.length;f++)h+=c+"*."+o[f],c=", ";return u("You have attempted to upload a file type that is not in a format that is supported for upload. Currently you are able to upload files with the following extensions:"+h+"\nYour file was not uploaded.  Please try again with a supported file type."),!1}function u(t){n.error.resumeError=!0;n.error.jobApplicationError=t}var f=!1;r.$render=function(){if(t[0]&&t[0].files[0]&&!f){if(e(t[0].files[0])){r.$setViewValue(t.val());return}f=!0}};t.bind("change",function(t){t.stopPropagation();f=!1;n.$apply(function(){r.$render()})})}}});TCOM.controller("JobCategoryCtrl",["$rootScope","$scope","$location","$http","$routeParams","$timeout","$templateCache",function(n,t,i,r,u,f,e){var h,o,s;t.name="JobCategoryCtrlScope";t.jobCategoryChildrenLoaded=!1;h=function(){t.jobCategoryChildrenLoaded=!0};n.registerAllIncludeContentLoadedListener(t,h);t.templates={};t.templates.categoryDescriptionTpl="/scripts/app/views/careers/maincontent/categories/empty.html";o=t.Jobs.jobCategories.filter(function(n){if(n.Name.normalizeForUrl()===t.Jobs.category)return n});o&&o.length>0&&r({url:"/scripts/app/views/careers/maincontent/categories/"+t.Jobs.category+".html",method:"GET"}).success(function(n){n.indexOf("<html")<0&&(e.put("/scripts/app/views/careers/maincontent/categories/"+t.Jobs.category+".html",n),t.templates.categoryDescriptionTpl="/scripts/app/views/careers/maincontent/categories/"+t.Jobs.category+".html")}).error(function(){});t.subcategories=[];t.templates.categoryJobsListTpl="/scripts/app/views/careers/maincontent/jobslist.html";o[0]?o[0].SubCategories&&o[0].SubCategories.length>0&&(t.subcategories=o[0].SubCategories,t.templates.categoryJobsListTpl="/scripts/app/views/careers/maincontent/categorylist.html"):(s=t.Jobs.jobCategories.filter(function(n){return n.SubCategories&&n.SubCategories.length>0?n.SubCategories.some(function(n){return n.Name.normalizeForUrl()===t.Jobs.category}):!1}),t.parentCategory=s[0],t.parentCategoryUrlName=s[0].Name.normalizeForUrl());t.getJobLinkForCategoryAndTitle=function(n,t){return"/careers/"+n+"/"+t.Title.normalizeForUrl()+"/"+t.Location.normalizeForUrl()};t.categorySortGetter=function(n){return n.Name.normalizeForUrl()};t.friendlyCategoryName=t.Jobs.subcategoryObj?t.Jobs.subcategoryObj.Name:t.Jobs.categoryObj.Name}]);TCOM.controller("JobCategoryDescriptionCtrl",["$rootScope","$scope",function(n,t){t.name="JobCategoryDescriptionCtrlScope"}]);TCOM.controller("JobDetailCtrl",["$scope","$routeParams","jobsService",function(n,t,i){n.name="JobDetailCtrlScope";n.jobDetailContext={showApplicationForm:!1};n.navigation.url="";n.Jobs.categoryObj&&n.Jobs.categoryObj.Titles&&n.Jobs.categoryObj.Titles.length>1&&(n.navigation.url=n.Jobs.category);n.Jobs.subcategoryObj&&n.Jobs.subcategoryObj.Titles&&n.Jobs.subcategoryObj&&(n.navigation.url=n.Jobs.subcategoryObj.Titles.length>1?n.Jobs.category:n.Jobs.categoryObj.Name.normalizeForUrl());n.gettingJobDetails=!0;i.getJobDetailsByCategoryAndTitle(t.category,t.jobTitle,t.jobLocation).then(function(t){n.job=t;n.gettingJobDetails=!1})}]);TCOM.controller("JobsListCtrl",["$rootScope","$scope",function(n,t){t.name="JobsListCtrlScope"}]);TCOM.controller("LocationSearchCtrl",["$scope","callAPI","$location","$http","$routeParams","$window","$timeout",function(n,t,i,r,u,f,e){e(function(){n.$broadcast("searchMapLoaded")},10);n.shouldBeOpen=!1;n.currentZip="";n.markersArray=[];n.locationSearchCompleted=!1;n.openInfoWindow=function(t){var i=n.markersArray[t];google.maps.event.trigger(i,"click");n.panMap(i.getPosition().lat(),i.getPosition().lng())};n.onSuccess=function(t){n.$broadcast("searchMapLoaded");n.deleteOverlays();var i=[];t&&t.length>0&&(i=t.map(function(n){var t=n.StreetAddress+" "+n.City+", "+n.State+" "+n.PostalCode;return n.full_address=t,n}));n.refreshMap();n.locations=i;i.length==0?(n.shouldBeOpen=!0,r({url:"/api/locations",method:"GET"}).success(n.onSuccess).error(n.onError).then(function(){n.showingAllLocations=!0;n.isLocationSearchInProgress=!1})):(n.showingAllLocations=!1,t&&t.length>0&&n.setMarkers(),n.locationSearchCompleted=!0)};n.onError=function(){n.isLocationSearchInProgress=!1;n.deleteOverlays();n.shouldBeOpen=!0};n.goToZipCode=function(n){n&&(n=n.trim(),n!=="."&&n!=="..")&&i.path("/location-search/"+n.toString())};n.searchLocations=function(){var i,t,u;n.data&&(_gaq&&(i=n.data.PostalCode,_gaq.push(["_setCustomVar",1,"zip",i.toString()]),_gaq.push(["_trackEvent","Our Centers_Search","Click","Find Locations Submit"])),n.isLocationSearchInProgress=!0,u=new google.maps.Geocoder,u.geocode({address:n.data.PostalCode},function(i,u){u==google.maps.GeocoderStatus.OK?(t={latitude:i[0].geometry.location.lat(),longitude:i[0].geometry.location.lng()},angular.extend(t,{minDistance:0,maxDistance:200}),r({url:"/api/locations",params:t,method:"GET"}).success(n.onSuccess).error(n.onError).then(function(){n.currentZip=n.data.PostalCode;n.isLocationSearchInProgress=!1})):n.onSuccess()}))};n.openModal=function(){n.shouldBeOpen=!0};n.closeModal=function(){n.shouldBeOpen=!1};u.zipCode&&(n.currentZip=u.zipCode);n.data={PostalCode:n.currentZip};n.data&&n.data.PostalCode?n.searchLocations():n.mapBehavior={refreshOnce:!0};n.stylePharmacyHours=function(n){return n?(n.indexOf("*")>-1&&(n=n.concat('<br /><span class="special-hours">*lunch break 1:30p-2:30p<\/span>')),n.replace("\\n","<br />")):n}}]);angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(n){n.put("template/carousel/carousel.html",'<div class="carousel">\n    <div class="carousel-inner" data-ng-transclude><\/div>\n<div class="carousel-prev-btn" data-ng-click="prev()" data-ng-show="slides().length > 1"><\/div><div class="carousel-next-btn" data-ng-click="next()" data-ng-show="slides().length > 1"><\/div>    <ol class="carousel-indicators" data-ng-show="slides().length > 1">\n        <li data-ng-repeat="slide in slides()" data-ng-class="{active: isActive(slide)}" data-ng-click="select(slide)"><\/li>\n    <\/ol>\n<\/div>\n')}]);TCOM.controller("OurLabCtrl",["$scope","$cookieStore",function(n,t){n.labGraphs=[{image:"alp.jpg",altText:"ALP"},{image:"ast.jpg",altText:"AST"},{image:"bun.jpg",altText:"BUN"},{image:"chloride.jpg",altText:"Chloride"},{image:"eosinophils.jpg",altText:"Eosinophils"},{image:"hematocrit.jpg",altText:"Hematocrit"},{image:"hemoglobin.jpg",altText:"Hemoglobin"},{image:"lymphocytes.jpg",altText:"Lymphocytes"},{image:"neutrophils.jpg",altText:"Neutrophils"},{image:"platelets.jpg",altText:"Platelets"},{image:"potassium.jpg",altText:"Potassium"},{image:"red-blood-cells.jpg",altText:"Red-blood-cells"},{image:"sodium.jpg",altText:"Sodium"},{image:"white-blood-cells.jpg",altText:"White-blood-cells"}];var i=t.get("graphSeen");i?n.labGraphs=n.labGraphs.splice(Math.round(Math.random()*n.labGraphs.length)).concat(n.labGraphs):t.put("graphSeen",!0);n.image={imageClicked:!1,graph:null};n.click=function(t){n.image.imageClicked=n.image.imageClicked?!1:!0;n.image.graph=t}}]);TCOM.controller("PartnerLoginCtrl",["$http","$scope","callAPI","$timeout","$window",function(n,t,i,r){function u(n){log("success");t.isSubmitted=!0;n&&n!=""?(document.getElementById("partnerForm").setAttribute("action",n),document.getElementById("partnerForm").submit()):(t.hasError=!0,t.errorMessage="Invalid credentials.")}function f(){log("error");t.hasError=!0;t.errorMessage="Failed to get a response from the server. Please try again later."}t.isSubmitted=!1;t.subscriptionForm={userName:"",password:""};t.hasError=!1;t.errorMessage="";t.formState={submittable:!1};t.submit=function(){t.subscriptionForm&&document.getElementById("userID").value&&document.getElementById("userPass").value&&(t.isProcessingSubscription=!0,t.subscriptionForm.userName=document.getElementById("userID").value,t.subscriptionForm.password=document.getElementById("userPass").value,n({url:"/api/partner/login/apply",method:"POST",headers:{"Content-Type":"application/json"},data:t.subscriptionForm}).success(u).error(f).then(function(){r(function(){t.isProcessingSubscription=!1},0)}))}}]);TCOM.controller("TestsCtrl",["$scope","$http","$location","$routeParams","testService",function(n,t,i,r,u){function s(t){n.gettingTestDetails=!1;var i=t;o(i);u.allTestsSvc().then(e,f)}function f(){n.error="There was an issue retrieving the test list. Please try refreshing the page."}function e(t){n.gettingTestDetails=!1;n.tests=t;n.searchList=u.testSearchList();l()}function f(){n.error="There was an issue retrieving the test list. Please try refreshing the page."}function h(){n.searchedFor="";n.isDetailView=!1;n.isListView=!0;n.selectedTest=null}function o(t){if(t&&(n.selectedTest=c(t),n.isDetailView=!0,n.isListView=!1,_gaq)){var i=n.selectedTest.CptCode;_gaq.push(["_setCustomVar",1,"test",i.toString()]);_gaq.push(["_trackEvent","Test","Event","Grab Information"])}}function c(n){return n.TheTest?(n.TheTest=n.TheTest.replace(/<a/gi,"<div").replace(/<\/a>/gi,"<\/div>"),n.CommonQuestions=n.CommonQuestions.replace(/<a/gi,"<div").replace(/<\/a>/gi,"<\/div>"),n):n}function l(){r.theranosId||(a(),h())}function a(){var t=_.groupBy(n.tests,function(n){return n.TestName.substr(0,1)});_.each(n.alphabet,function(i,r){t.hasOwnProperty(r)&&(n.alphabet[r]=!0)})}i.search().ref&&(n.referrer=i.search().ref.replace("_"," "));n.alphabet={A:!1,B:!1,C:!1,D:!1,E:!1,F:!1,G:!1,H:!1,I:!1,J:!1,K:!1,L:!1,M:!1,N:!1,O:!1,P:!1,Q:!1,R:!1,S:!1,T:!1,U:!1,V:!1,W:!1,X:!1,Y:!1,Z:!1};n.selectedTest={};n.error=null;n.currentLetter="All";n.gettingTestDetails=!0;r.theranosId?u.singleTestSvc(r.theranosId).then(s,f):u.allTestsSvc().then(e,f);n.onSelect=function(){if(n.searchedFor&&n.searchedFor.length!==0){var t=_.first(_.filter(n.tests,function(t){return t.TheranosId&&t.TheranosId.toLowerCase()===n.searchedFor.toLowerCase()}));t&&t.TheranosId&&(n.searchedFor="",i.url("/test-menu/test/"+t.TheranosId),o(t))}};n.setCurrentLetter=function(t,i){i&&(n.currentLetter=t)};n.getShowHideStatus=function(t){return n.currentLetter===t||n.currentLetter==="All"?!0:!1}}]);TCOM.controller("WrapperCtrl",["$scope","$routeParams",function(n,t){n.wrapperContext=n.wrapperContext||{};n.wrapperContext.url="/partial/subscription/confirm/"+t.confirmationId}]);TCOM.directive("thCarousel",["$timeout",function(n){var t=function(t,i){var r=720,u=3;t.$watch("current.center",function(f,e){f+2>t.size*2-1?(i.addClass("instant"),i.css("margin-left",((u-e+t.size)*r).toString()+"px"),n(function(){t.current.center=f-t.size},20)):f-2<1?(i.addClass("instant"),i.css("margin-left",((u-e-t.size)*r).toString()+"px"),n(function(){t.current.center=f+t.size},20)):(i.removeClass("instant"),i.addClass("carousel-transition"),i.css("margin-left",((u-f)*r).toString()+"px"))})};return{link:t}}]);TCOM.directive("thCarouselImage",["$timeout",function(n){var t=function(t,i,r){var e=r.imgFileName.lastIndexOf("."),u=r.imgFileName.substring(0,e).replace("_gray",""),f=r.imgFileName.substring(e,r.imgFileName.length);t.$index===t.centerIndex||t.$index+t.size===t.centerIndex||t.$index-t.size===t.centerIndex?i.attr("src","/content/images/carousel/homePage/"+u+f):i.attr("src","/content/images/carousel/homePage/"+u+"_gray"+f);t.$watch("centerIndex",function(){t.$index===t.centerIndex||t.$index+t.size===t.centerIndex||t.$index-t.size===t.centerIndex?i.attr("src","/content/images/carousel/homePage/"+u+f):(t.$index===t.centerIndex+1||t.$index===t.centerIndex-1)&&n(function(){i.attr("src","/content/images/carousel/homePage/"+u+"_gray"+f)},250)})};return{link:t}}]);TCOM.directive("table",function(){var n={};return n.restrict="E",n.compile=function(n){n.addClass("table table-bordered table-condensed");return function(){}},n});TCOM.directive("compile",["$compile",function(n){return function(t,i,r){t.$watch(function(n){return n.$eval(r.compile)},function(r){i.html(r);n(i.contents())(t)})}}]);TCOM.directive("remaining",function(){return{template:"{{remaining}} characters remaining",scope:{maxLen:"@max",model:"=ngModel"},link:function(n){n.$watch("model",function(t){var i=parseInt(n.maxLen,10),r;if(t===null||t===undefined){n.remaining=i;return}r=i-t.length;r<0?n.model=t.substr(0,i):n.remaining=r})}}});TCOM.directive("loremIpsum",function(){var n=function(n,t,i){for(var u="",r=0;r<i.count;r++)u+="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi aliquam ipsum sit amet imperdiet malesuada.";t.text(u)};return{restrict:"EA",scope:{count:"="},link:n}});TCOM.directive("map",["$timeout",function(n){return{restrict:"E",replace:!0,template:"<div><\/div>",link:function(t,i,r){var c=new google.maps.Geocoder,o,f=new google.maps.LatLngBounds,s=function(){var i,n;for(i in t.locations)n=t.locations[i],f.extend(new google.maps.LatLng(n.GeoLatitude,n.GeoLongitude)),f.extend(new google.maps.LatLng(n.GeoLatitude+.01,n.GeoLongitude+.25)),f.extend(new google.maps.LatLng(n.GeoLatitude-.01,n.GeoLongitude-.25))},h,e,u;t.setMarkers=function(){s();for(var n in t.locations)t.placeMarker(n,t.locations[n]);u.fitBounds(f);t.markersArray.length===0&&(t.locations=[],t.openModal())};t.refreshMap=function(){u=u||new google.maps.Map(document.getElementById(r.id),e);google.maps.event.trigger(u,"resize")};t.placeMarker=function(n,i){var s,h;u=u||new google.maps.Map(document.getElementById(r.id),e);var i=t.locations[n],a=Number(n)+1,c=i.full_address,v=new google.maps.MarkerImage("/Content/images/location-search/markers/map-pin.png",new google.maps.Size(46,55),new google.maps.Point(0,0),new google.maps.Point(23,55)),y=new google.maps.MarkerImage("/Content/images/location-search/shadow.png",new google.maps.Size(78,55),new google.maps.Point(0,0),new google.maps.Point(23,55)),l=new google.maps.Marker({position:new google.maps.LatLng(i.GeoLatitude,i.GeoLongitude),icon:v,shadow:y,shape:{coord:[26,0,30,1,33,2,34,3,36,4,37,5,38,6,39,7,40,8,41,9,41,10,42,11,43,12,43,13,44,14,44,15,44,16,44,17,45,18,45,19,45,20,45,21,45,22,45,23,45,24,45,25,45,26,45,27,45,28,44,29,44,30,44,31,43,32,43,33,42,34,42,35,41,36,40,37,40,38,39,39,38,40,37,41,36,42,35,43,34,44,33,45,32,46,31,47,30,48,29,49,28,50,27,51,26,52,25,53,24,54,21,54,20,53,19,52,18,51,17,50,16,49,15,48,14,47,13,46,12,45,11,44,10,43,9,42,8,41,7,40,6,39,6,38,5,37,4,36,3,35,3,34,2,33,2,32,1,31,1,30,1,29,1,28,0,27,0,26,0,25,0,24,0,23,0,22,0,21,0,20,0,19,0,18,1,17,1,16,1,15,2,14,2,13,3,12,3,11,4,10,4,9,5,8,6,7,7,6,8,5,9,4,11,3,13,2,15,1,19,0,26,0],type:"poly"},map:u,draggable:!1});f.extend(new google.maps.LatLng(i.GeoLatitude,i.GeoLongitude));f.extend(new google.maps.LatLng(i.GeoLatitude+.01,i.GeoLongitude+.25));f.extend(new google.maps.LatLng(i.GeoLatitude-.01,i.GeoLongitude-.25));t.markersArray.push(l);o=new google.maps.InfoWindow({maxWidth:320});s=_.map(i.PharmacyHours.split(";"),function(n){return n.trim()}).join("<br />").replace("\\n","");s.indexOf("*")>-1&&(s=s.concat('<br /><span class="special-hours">*lunch break 1:30p-2:30p<\/span>'));h=i.StoreHours?i.StoreHours.replace("\\n","<br />"):"";google.maps.event.addListener(l,"click",function(){var n='<div class="infowindow"><i class="icon-marker">'+a+'<\/i><span class="location-title">'+i.LocationName+"<\/span><br/>"+i.StreetAddress+"<br/>"+i.City+", "+i.State+" "+i.PostalCode+"<br/><span>"+s+"<\/span><br />";h.length>0&&(n+='<span class="holiday-hours">'+h+"<\/span><br />");n+="<a onclick=\"trackFakePageView('http://maps.google.com/maps?q="+c+'\')" href="http://maps.google.com/maps?q='+encodeURIComponent(c)+'" target="_blank">Get Directions <i><\/i><\/a><\/div>';o.setContent(n);o.open(u,this)})};h=new google.maps.LatLng(37.5483,-122.1);e={center:h,zoom:10,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.DEFAULT,position:google.maps.ControlPosition.TOP_RIGHT},scrollwheel:!1,disableDefaultUI:!0,mapTypeId:google.maps.MapTypeId.ROADMAP};t.locations&&t.locations.length>0&&(s(),e.center=f.getCenter());n(function(){u=u||new google.maps.Map(document.getElementById(r.id),e)},1e3);t.deleteOverlays=function(){if(t.markersArray){for(var n in t.markersArray)t.markersArray[n].setMap(null);t.markersArray.length=0}};t.panMap=function(n,t){var i=new google.maps.LatLng(n,t);u.panTo(i);u.setZoom(10)};t.$watch("mapBehavior.refreshOnce",function(){t.mapBehavior&&t.mapBehavior.refreshOnce&&t.refreshMap()})}}}]);TCOM.directive("thMetadata",["metadataService","$location","$window",function(n,t,i){var r=function(r,u,f){var e=function(){var o=t.url().toString().toLowerCase(),c=t.url(),s,h,r,e;if(f.thMetadata==="description"&&(s=n.getDescription(o),u.attr("content",s)),f.thMetadata==="keywords"&&(h=n.getKeywords(o),u.attr("content",h)),f.thMetadata==="title"){if(r=c.split("/").filter(function(n){return n!==""}),r.length===0){u.text("Theranos");i.document.title="Theranos";return}e=r.slice(0,2).map(function(n){return n.replace(/-/gi," ")}).reverse().join(" - ").toTitleCase()+" | Theranos";u.text(e);i.document.title=e}};r.$on("$routeChangeSuccess",function(){e()});e()};return{restrict:"A",link:r}}]);TCOM.directive("placeholder",["$timeout",function(n){var t=document.createElement("input");return"placeholder"in t?{}:{link:function(t,i,r){r.type==="password";n(function(){i.val(r.placeholder);r.name==="password"&&(r.$set("type","text"),i.bind("keydown keypress",function(){r.$set("type","password")}));i.bind("focus",function(){i.val()==r.placeholder&&i.val("")}).bind("blur",function(){i.val()==""&&(i.val(r.placeholder),r.name==="password"&&r.$set("type","text"))})})}}}]);TCOM.directive("rotater",["$timeout",function(){return{restrict:"E",link:function(n,t){var r=t.find("img"),i=1,u;setInterval(function(){u=i===0?r.length-1:i-1;r[u].className="";r[i].className="on";i++;i>=r.length&&(i=0)},3e3)}}}]);TCOM.directive("bgRotater",["$timeout",function(){return{restrict:"A",link:function(n,t){var r=t.find("div"),i=1,u;setInterval(function(){u=i===0?r.length-1:i-1;r[u].className=r[u].className.replace("active","");r[i].className=r[i].className.concat(" active");i++;i>=r.length&&(i=0)},1e4)}}}]);TCOM.directive("syncContainer",function(){return{scope:!0,controller:["$scope",function(n){var i=[],t,r=function(n){if(t!==undefined&&t===n){n.collapse();t=undefined;return}i.forEach(function(i){i===n?(i.expand(),t=i):i.collapse()})};this.registerCollapsable=function(t){i.indexOf(t)===-1&&(i.push(t),n.$on("syncedCollapseItemClicked",function(n,t){n.stopPropagation();r(t)}))}}],link:function(){}}});TCOM.directive("syncedCollapse",[function(){return{scope:!0,require:"^syncContainer",controller:["$scope",function(n){var t;this.registerLimitable=function(n){t=n};n.collapse=function(){t!==undefined&&t.collapse!==undefined&&t.collapse()};n.expand=function(){t!==undefined&&t.expand!==undefined&&t.expand()}}],link:function(n,t,i,r){var u=!1,f=function(){u||(t.removeClass("collapse").removeClass("open").addClass("transition-height"),t.css({height:""}),n.collapse(),u=!0)},o=function(){u&&(n.expand(),t.removeClass("collapse").addClass("transition-height").addClass("open"),t.css({height:t[0].scrollHeight+"px"}),u=!1)},e={collapse:f,expand:o};f();t.bind("click",function(){n.$emit("syncedCollapseItemClicked",e)});r.registerCollapsable(e)}}}]);TCOM.directive("truncateable",["$timeout",function(n){return{require:"^syncedCollapse",link:function(t,i,r,u){var f=isNaN(r.truncateable)?50:parseInt(r.truncateable,10),e=i[0].innerText,o,s,h;(isNaN(f)||f<50)&&(f=50);s=function(t){return function(){o=n(function(){i[0].innerText=i[0].innerText.length<f?i[0].innerText:e.substring(0,e.indexOf(" ",f))+"..."},t)}};h={expand:function(){i[0].innerText=e;o&&n.cancel(o)},collapse:s(120)};s(0)();u.registerLimitable(h)}}}]);TCOM.directive("ngTracking",["$location","$window","$rootScope",function(n){var t,i;return function(r,u,f){f.pageload==="true"&&r.$watch(function(){var r=n.$$absUrl.split("/");r.splice(0,3);t="/"+r.join("/");t!==i;i=t});f.trackcategory!==undefined&&u.bind("click",function(){_gaq.push(["_trackEvent",f.trackcategory,f.trackaction,f.tracklabel])})}}]);angular.module("api.services",[]).factory("callAPI",["$http",function(n){function i(n){return t.API_BASE_URL+n}n.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded";var t={API_METHOD:"GET",API_BASE_URL:"http://"+window.location.host};return{query:function(r,u,f,e){n({url:i(r),method:t.API_METHOD,params:u}).success(function(n,t,i,r){f(n,t,i,r)}).error(e)}}}]);TCOM.factory("jobsService",["$http",function(n){var t,i=function(){return t||(t=n.get("/api/careerapi/jobcategories").then(function(n){return n.data})),t},r=function(t,i,r){return n.get("/api/careerapi/jobdetails?category="+t+"&title="+i+(r?"&location="+r:"")).then(function(n){return n.data})},u=function(n){for(var u=[],e=[],t,i,f,r=0;r<n.length;r++)(t=n[r],!t.Category||t.Category.length<1)||(i={},e.indexOf(t.Category.toLowerCase())===-1?(e.push(t.Category.toLowerCase()),i.c=t.Category,i.sc=[],u.push(i)):i=u.filter(function(n){if(n.c.toLowerCase()===t.Category.toLowerCase())return n})[0],t.Subcategory&&t.Subcategory.length>0&&(f=i.sc.filter(function(n){if(n.toLowerCase()===t.Subcategory.toLowerCase())return n}),(!f||f.length<1)&&i.sc.push(t.Subcategory)));return u};return{getJobCategoriesAsync:i,getCategories:u,getJobDetailsByCategoryAndTitle:r}}]);TCOM.factory("metadataService",[function(){var n={"default":{description:"Theranos, Inc. is a consumer healthcare technology company. Theranos' clinical laboratory offers comprehensive laboratory tests from samples as small as a few drops of blood at unprecedented low prices. Founded in 2003 by Elizabeth Holmes, Theranos' mission is to make actionable health information accessible to people everywhere in the world at the time it matters, enabling early detection and intervention of disease, and empowering individuals with information to live the lives they want to live.",keywords:["lab test","blood test","diagnosis","healthcare"]},"our-solution":{description:"Reinventing the lab test.",keywords:["solution","innovation","lab test","diagnosis","healthcare"]},"our-technology":{description:"One drop. A world of answers.",keywords:["technology","innovation","speed","accuracy","price","lab test","diagnosis","healthcare"]},"the-experience":{description:"Goodbye, big bad needle.",keywords:["experience","painless","micro","nano","lab test","diagnosis","healthcare"]},"our-tools":{description:"Welcome to the future.",keywords:["tools","technology","digital","lab test","diagnosis","healthcare"]},"our-tests":{description:"A full range of tests. A fraction of the cost.",keywords:["tests","accessible","lab test","diagnosis","healthcare"]},"test-menu":{description:"A full range of tests. A fraction of the cost.",keywords:["test list","tests","price","lab test","diagnosis","healthcare"]},"our-centers":{description:"A new experience. Everything is designed with you in mind.",keywords:["search","locations","lab test","diagnosis","healthcare"]},"location-search":{description:"Find your nearest Theranos Wellness Center.",keywords:["location","comfort","convenient","lab test","diagnosis","healthcare"]},"in-walgreens":{description:"Bringing our new experience to convenient, neighborhood locations.",keywords:["Walgreens","convenient location","local","lab test","diagnosis","healthcare"]},"our-company":{description:"Theranos' mission is to make actionable information accessible for everyone at the time it matters.",keywords:["mission","board","lab test","diagnosis","healthcare"]},"careers/android/android-developers":{description:"We are redefining healthcare. Join us.",keywords:["Android","Java","careers","jobs"]},"careers/front-end/front-end-engineers":{description:"We are redefining healthcare. Join us.",keywords:["AngularJS","SASS","HTML5","REST","careers","jobs"]},"careers/ios/ios-developers":{description:"We are redefining healthcare. Join us.",keywords:["iOS","Objective-C","Xcode","careers","jobs"]},"careers/digital-studio":{description:"We are redefining healthcare. Join us.",keywords:["studio","design","UX","careers","jobs"]},"careers/net":{description:"We are redefining healthcare. Join us.",keywords:[".Net","C#","WCF","WPF","MVC","careers","jobs"]},"careers/quality-assurance":{description:"We are redefining healthcare. Join us.",keywords:["QA","Test","careers","jobs"]},"careers/software-development":{description:"We are redefining healthcare. Join us.",keywords:[".Net","C#","iOS","Android","careers","jobs","positions","lab test","diagnosis","healthcare"]},"careers/administration":{description:"The dedication of our administrative professionals creates the environment for the company to excel in making its impact.",keywords:["time management","communication","correspondence","errands","organizing"]},"careers/assay-systems":{description:"Our Assay Systems team drives groundbreaking research and innovation at the forefront of scientific discovery.",keywords:["scientist","research associate","sr. chemist","chemist","formulations"]},"careers/clinical-laboratory":{description:"Our laboratory professionals perform complex testing utilizing advanced equipment and processing techniques.",keywords:["phlebotomy","clia","transcriptionist","director","supervisor"]},"careers/computational-biosciences":{description:"Our Computational Biosciences team designs and implements innovative methods to analyze a diverse array of scientific data in order to realize patterns, and solutions that power our applications.",keywords:["machine learning","modeler","bioinformatics"]},"careers/electrical-engineering":{description:"Electrical engineering jobs.",keywords:["design schemes","fabrication","PCBs","prototyping"]},"careers/facilities":{description:"Facilities.",keywords:["environment manager","technician","security officer"]},"careers/finance":{description:"Our finance professionals perform complex financial analyses, planning, and reporting to support the efficiency and financial success of Theranos.",keywords:["accounting","payroll","QAD","EXCEL","financial reporting"]},"careers/hardware-engineering":{description:"Hardware Engineering at Theranos is about building something truly great, with impeccable quality, that will change people’s lives forever.",keywords:["optimization","biomedical","prototyped","designs","V&V","PLC"]},"careers/human-resources":{description:"Theranos is committed to attracting, developing, and retaining the highest caliber talent and each member of the Human Resources team is dedicated to these efforts.",keywords:["recruiter","sourcer","coordinator"]},"careers/information-technology":{description:"Our IT team maximizes the company’s technology through the implementation and maintenance of the most advanced systems and IT solutions.",keywords:["virtualization","domain servers","cisco firewall","devops","linux","windows"]},"careers/legal":{description:"Our Legal team collaborates with our business leaders in corporate partnerships, intellectual property development, and other areas core to our success.",keywords:["patents","copyright","IP","commercial","transactions","deal","negotiations"]},"careers/manufacturing":{description:"Theranos' cutting edge manufacturing facilities utilize the most sophisticated production technologies.",keywords:["industrial engineer","electro-mechanical assembly","manual assembly","device testing","injection molding","Manager QA/QC"]},"careers/sales-marketing":{description:"Sales Marketing jobs.",keywords:["sales","social media","PR","communications","brand awareness","industry training"]},"careers/supply-chain":{description:"Our Supply Chain team ensures that our developers, engineers, and scientists have access to the highest quality products at the greatest value.",keywords:["global supply manager ","supply chain","sourcing materials","procurement agent","ERP","quality requirements","regulatory requirements"]},careers:{description:"We are redefining healthcare. Join us.",keywords:["careers","jobs","positions","work","lab test","diagnosis","healthcare"]},press:{description:"Announcements and press materials.",keywords:["press","news","announcements","lab test","diagnosis","healthcare"]},"contact-us":{description:"Contact information.",keywords:["contact","address","phone","lab test","diagnosis","healthcare"]},"for-providers":{description:"For providers.",keywords:["healthcare provider","lab test","diagnosis","healthcare"]},"our-lab":{description:"The lab test, reinvented.",keywords:["innovation","lab test","diagnosis","healthcare"]},"easy-integration":{description:"Seamlessly integrates with your practice.",keywords:["healthcare provider","integration","lab test","diagnosis"]},"get-started":{description:"Find out more about Theranos.",keywords:["subscribe","lab test","diagnosis","healthcare"]}},t=function(t){for(var i in n)if(t.indexOf(i)>=0)return n[i].description;return n.default.description},i=function(t){for(var i in n)if(t.indexOf(i)>=0)return n[i].keywords;return n.default.keywords};return{getDescription:t,getKeywords:i}}]);TCOM.factory("testService",["$http",function(n){var t=[],i=[],r;return{allTestsSvc:function(){return r||(r=n({method:"GET",url:"/api/tests",cache:!0}).then(function(n){return t=n.data})),r},singleTestSvc:function(t){return n({method:"GET",url:"/api/tests?theranosId="+t,cache:!0}).then(function(n){return n.data})},testSearchList:function(){var n,r;if(i.length>0)return i;for(n=0;n<t.length;n++)r={testName:t[n].CptCode.join("-")+" "+t[n].TestName,theranosId:t[n].TheranosId},i.push(r);return i}}}]);TCOM.filter("escape",function(){return window.escape});TCOM.filter("firstChar",function(){return function(n,t){var r,f,u,i;if(n){for(r=[],f=[],i=0;i<n.length;i++)u=n[i].TestName,u.toUpperCase().charAt(0)===t?r.push(n[i]):isNaN(u.charAt(0))||(f=u.match(/[a-zA-Z]/),f[0].toUpperCase()===t&&r.push(n[i]));return r}}})