angular.module("docsApp",["ngRoute","ngCookies","ngSanitize","ngAnimate","DocsController","versionsData","pagesData","navData","directives","errors","examples","search","tutorials","versions","bootstrap","ui.bootstrap.dropdown"]).config(["$locationProvider",function(e){e.html5Mode(!0).hashPrefix("!")}]),angular.module("directives",[]).directive("backToTop",["$anchorScroll","$location",function(e,t){return function(n,r){r.on("click",function(){t.hash(""),n.$apply(e)})}}]).directive("code",function(){return{restrict:"E",terminal:!0,compile:function(e){var t=e.hasClass("linenum"),n=/lang-(\S)+/.exec(e.className),r=n&&n[1],a=e.html();e.html(window.prettyPrintOne(a,r,t))}}}),angular.module("DocsController",[]).controller("DocsController",["$scope","$rootScope","$location","$window","$cookies","openPlunkr","NG_PAGES","NG_NAVIGATION","NG_VERSION",function(e,t,n,r,a,o,i,s,c){e.openPlunkr=o,e.docsVersion=c.isSnapshot?"snapshot":c.version,e.navClass=function(e){return{active:e.href&&this.currentPage.path,"nav-index-section":"section"===e.type}},e.$on("$includeContentLoaded",function(){var t=e.currentPage?e.currentPage.path:n.path();r._gaq.push(["_trackPageview",t])}),e.$watch(function(){return n.path()},function(t){if(t=t.replace(/^\/?(.+?)(\/index)?\/?$/,"$1"),currentPage=e.currentPage=i[t]){e.partialPath="partials/"+t+".html",e.currentArea=s[currentPage.area];var n=currentPage.path.split("/"),r=e.breadcrumb=[],a="";angular.forEach(n,function(e){a+=e,r.push({name:i[a]&&i[a].name||e,url:a}),a+="/"})}else e.currentArea=s.api,e.breadcrumb=[],e.partialPath="Error404.html"}),e.versionNumber=angular.version.full,e.version=angular.version.full+"  "+angular.version.codeName,e.loading=0;var u=/^(\/|\/index[^\.]*.html)$/;(!n.path()||u.test(n.path()))&&n.path("/api").replace()}]),angular.module("errors",["ngSanitize"]).filter("errorLink",["$sanitize",function(e){var t=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}<>]/g,n=/^mailto:/,r=/:\d+:\d+$/,a=function(e,t){return e.length>t?e.substr(0,t-3)+"...":e};return function(o,i){var s=i?' target="'+i+'"':"";return o?e(o.replace(t,function(e){return r.test(e)?e:(/^((ftp|https?):\/\/|mailto:)/.test(e)||(e="mailto:"+e),"<a"+s+' href="'+e+'">'+a(e.replace(n,""),60)+"</a>")})):o}}]).directive("errorDisplay",["$location","errorLinkFilter",function(e,t){var n=function(e){var t=arguments;return e.replace(/\{\d+\}/g,function(e){var n=+e.slice(1,-1);return n+1>=t.length?e:t[n+1]})};return{link:function(r,a,o){var i,s=e.search(),c=[o.errorDisplay];for(i=0;angular.isDefined(s["p"+i]);i++)c.push(s["p"+i]);a.html(t(n.apply(null,c),"_blank"))}}}]),angular.module("examples",[]).factory("formPostData",["$document",function(e){return function(t,n){var r=angular.element('<form style="display: none;" method="post" action="'+t+'"></form>');angular.forEach(n,function(e,t){var n=angular.element('<input type="hidden" name="'+t+'">');n.attr("value",e),r.append(n)}),e.find("body").append(r),r[0].submit(),r.remove()}}]).factory("openPlunkr",["formPostData","$http","$q",function(e,t,n){return function(r){var a="AngularJS Example";t.get(r+"/manifest.json").then(function(e){return e.data}).then(function(e){var o=[],i=e.name.split("-");return i.unshift("AngularJS"),angular.forEach(i,function(e,t){i[t]=e.charAt(0).toUpperCase()+e.substr(1)}),a=i.join(" - "),angular.forEach(e.files,function(e){o.push(t.get(r+"/"+e,{transformResponse:[]}).then(function(t){return"index-production.html"===e&&(e="index.html"),{name:e,content:t.data}}))}),n.all(o)}).then(function(t){var n={};angular.forEach(t,function(e){n["files["+e.name+"]"]=e.content}),n["tags[0]"]="angularjs",n["tags[1]"]="example",n.private=!0,n.description=a,e("http://plnkr.co/edit/?p=preview",n)})}}]),angular.module("search",[]).controller("DocsSearchCtrl",["$scope","$location","docsSearch",function(e,t,n){function r(){e.results=[],e.colClassName=null,e.hasResults=!1}e.search=function(t){var a=2;t.length>=a?n(t).then(function(t){var n={};angular.forEach(t,function(e){var t=e.area,r="api"==t?40:14;n[t]=n[t]||[],n[t].length<r&&n[t].push(e)});var r=0;for(var a in n)++r;r>0&&(e.colClassName="cols-"+r),e.hasResults=r>0,e.results=n}):r(),e.$$phase||e.$apply()},e.submit=function(){var n;for(var r in e.results)if(n=e.results[r][0])break;n&&(t.path(n.path),e.hideResults())},e.hideResults=function(){r(),e.q=""}}]).controller("Error404SearchCtrl",["$scope","$location","docsSearch",function(e,t,n){n(t.path().split(/[\/\.:]/).pop()).then(function(t){e.results={},angular.forEach(t,function(t){var n=e.results[t.area]||[];n.push(t),e.results[t.area]=n})})}]).provider("docsSearch",function(){function e(e,t,n){console.log("Using Local Search Index");var r=lunr(function(){this.ref("path"),this.field("titleWords",{boost:50}),this.field("members",{boost:40}),this.field("keywords",{boost:20})}),a=e.get("js/search-data.json").then(function(e){var n=e.data;return t(function(){angular.forEach(n,function(e){r.add(e)})},500)});return function(e){return a.then(function(){var t=r.search(e),a=[];return angular.forEach(t,function(e){a.push(n[e.ref])}),a})}}function t(e,t,n){console.log("Using WebWorker Search Index");var r,a=e.defer(),o=new Worker("js/search-worker.js");return o.onmessage=function(e){t.$apply(function(){switch(e.data.e){case"index-ready":a.resolve();break;case"query-ready":var t=e.data.d.map(function(e){return n[e]});r.resolve(t)}})},function(t){return a.promise.then(function(){return r=e.defer(),o.postMessage({q:t}),r.promise})}}return e.$inject=["$http","$timeout","NG_PAGES"],t.$inject=["$q","$rootScope","NG_PAGES"],{$get:window.Worker?t:e}}).directive("focused",function(e){return function(t,n,r){n[0].focus(),n.on("focus",function(){t.$apply(r.focused+"=true")}),n.on("blur",function(){e(function(){t.$eval(r.focused+"=false")})}),t.$eval(r.focused+"=true")}}).directive("docsSearchInput",["$document",function(e){return function(t,n){var r=27,a=191;angular.element(e[0].body).bind("keydown",function(e){var t=n[0];e.keyCode==a&&document.activeElement!=t&&(e.stopPropagation(),e.preventDefault(),t.focus())}),n.bind("keydown",function(e){e.keyCode==r&&(e.stopPropagation(),e.preventDefault(),t.$apply(function(){t.hideResults()}))})}}]),angular.module("tutorials",[]).directive("docTutorialNav",function(){var e=["","step_00","step_01","step_02","step_03","step_04","step_05","step_06","step_07","step_08","step_09","step_10","step_11","step_12","the_end"];return{scope:{},template:'<a ng-href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n<a ng-href="http://angular.github.io/angular-phonecat/step-{{seq}}/app"><li class="btn btn-primary"><i class="glyphicon glyphicon-play"></i> Live Demo</li></a>\n<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{diffLo}}...step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n<a ng-href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>',link:function(t,n,r){var a=1*r.docTutorialNav;t.seq=a,t.prev=e[a],t.next=e[2+a],t.diffLo=a?a-1:"0~1",t.diffHi=a,n.addClass("btn-group"),n.addClass("tutorial-nav")}}}).directive("docTutorialReset",function(){return{scope:{step:"@docTutorialReset"},template:'<p><a href="" ng-click="show=!show;$event.stopPropagation()">Workspace Reset Instructions  ➤</a></p>\n<div class="alert alert-info" ng-show="show">\n  <p>Reset the workspace to step {{step}}.</p>  <p><pre>git checkout -f step-{{step}}</pre></p>\n  <p>Refresh your browser or check out this step online: <a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n</div>\n<p>The most important changes are listed below. You can see the full diff on <a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{step ? (step - 1): \'0~1\'}}...step-{{step}}">GitHub</a>\n</p>'}}),angular.module("versions",[]).controller("DocsVersionsCtrl",["$scope","$location","$window","NG_VERSIONS",function(e,t,n,r){e.docs_version=r[0],e.docs_versions=r;for(var a=0,o=0/0;a<r.length;a++){var i=r[a];o<=i.minor||(i.isLatest=!0,o=i.minor)}e.getGroupName=function(e){return e.isLatest?"Latest":"v"+e.major+"."+e.minor+".x"},e.jumpToDocsVersion=function(e){var r=t.path().replace(/\/$/,"");n.location=e.docsUrl+r}}]);
//# sourceMappingURL=docs.min.js.map