1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/*
AngularJS v1.0.2
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
*/
(function(q,k,I){'use strict';function G(c){return c.replace(/\&/g,"&").replace(/\</g,"<").replace(/\>/g,">").replace(/"/g,""")}function D(c,e){var b=k.element("<pre>"+e+"</pre>");c.html("");c.append(b.contents());return c}var t={},w={value:{}},L={"angular.js":"http://code.angularjs.org/angular-"+k.version.full+".min.js","angular-resource.js":"http://code.angularjs.org/angular-resource-"+k.version.full+".min.js","angular-sanitize.js":"http://code.angularjs.org/angular-sanitize-"+k.version.full+
".min.js","angular-cookies.js":"http://code.angularjs.org/angular-cookies-"+k.version.full+".min.js"};t.jsFiddle=function(c,e,b){return{terminal:!0,link:function(x,a,r){function d(a,b){return'<input type="hidden" name="'+a+'" value="'+e(b)+'">'}var H={html:"",css:"",js:""};k.forEach(r.jsFiddle.split(" "),function(a,b){var d=a.split(".")[1];H[d]+=d=="html"?b==0?"<div ng-app"+(r.module?'="'+r.module+'"':"")+">\n"+c(a,2):"\n\n\n <\!-- CACHE FILE: "+a+' --\>\n <script type="text/ng-template" id="'+
a+'">\n'+c(a,4)+" <\/script>\n":c(a)+"\n"});H.html+="</div>\n";D(a,'<form class="jsfiddle" method="post" action="http://jsfiddle.net/api/post/library/pure/" target="_blank">'+d("title","AngularJS Example: ")+d("css",'</style> <\!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --\> \n<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">\n'+b.angular+(r.resource?b.resource:"")+"<style>\n"+H.css)+d("html",H.html)+d("js",H.js)+'<button class="btn btn-primary"><i class="icon-white icon-pencil"></i> Edit Me</button></form>')}}};
t.code=function(){return{restrict:"E",terminal:!0}};t.prettyprint=["reindentCode",function(c){return{restrict:"C",terminal:!0,compile:function(e){e.html(q.prettyPrintOne(c(e.html()),I,!0))}}}];t.ngSetText=["getEmbeddedTemplate",function(c){return{restrict:"CA",priority:10,compile:function(e,b){D(e,G(c(b.ngSetText)))}}}];t.ngHtmlWrap=["reindentCode","templateMerge",function(c,e){return{compile:function(b,c){var a={head:"",module:"",body:b.text()};k.forEach((c.ngHtmlWrap||"").split(" "),function(b){if(b){var b=
L[b]||b,d=b.split(/\./).pop();d=="css"?a.head+='<link rel="stylesheet" href="'+b+'" type="text/css">\n':d=="js"?a.head+='<script src="'+b+'"><\/script>\n':a.module='="'+b+'"'}});D(b,G(e("<!doctype html>\n<html ng-app{{module}}>\n <head>\n{{head:4}} </head>\n <body>\n{{body:4}} </body>\n</html>",a)))}}}];t.ngSetHtml=["getEmbeddedTemplate",function(c){return{restrict:"CA",priority:10,compile:function(e,b){D(e,c(b.ngSetHtml))}}}];t.ngEvalJavascript=["getEmbeddedTemplate",function(c){return{compile:function(e,
b){var x=c(b.ngEvalJavascript);try{q.execScript?q.execScript(x||'""'):q.eval(x)}catch(a){q.console?q.console.log(x,"\n",a):q.alert(a)}}}}];t.ngEmbedApp=["$templateCache","$browser","$rootScope","$location",function(c,e,b,x){return{terminal:!0,link:function(a,r,d){a=[];a.push(["$provide",function(a){a.value("$templateCache",c);a.value("$anchorScroll",k.noop);a.value("$browser",e);a.provider("$location",function(){this.$get=["$rootScope",function(a){b.$on("$locationChangeSuccess",function(b,d,c){a.$broadcast("$locationChangeSuccess",
d,c)});return x}];this.html5Mode=k.noop});a.decorator("$timeout",["$rootScope","$delegate",function(a,b){return k.extend(function(d,c){return c&&c>50?setTimeout(function(){a.$apply(d)},c):b.apply(this,arguments)},b)}]);a.decorator("$rootScope",["$delegate",function(a){b.$watch(function(){a.$digest()});return a}])}]);d.ngEmbedApp&&a.push(d.ngEmbedApp);r.bind("click",function(a){a.target.attributes.getNamedItem("ng-click")&&a.preventDefault()});k.bootstrap(r,a)}}}];w.reindentCode=function(){return function(c,
e){if(!c)return c;for(var b=c.split(/\r?\n/),x=" ".substr(0,e||0),a;b.length&&b[0].match(/^\s*$/);)b.shift();for(;b.length&&b[b.length-1].match(/^\s*$/);)b.pop();var r=999;for(a=0;a<b.length;a++){var d=b[0],k=d.match(/^\s*/)[0];if(k!==d&&k.length<r)r=k.length}for(a=0;a<b.length;a++)b[a]=x+b[a].substring(r);b.push("");return b.join("\n")}};w.templateMerge=["reindentCode",function(c){return function(e,b){return e.replace(/\{\{(\w+)(?:\:(\d+))?\}\}/g,function(e,a,k){e=b[a];k&&(e=c(e,k));return e==
I?"":e})}}];w.getEmbeddedTemplate=["reindentCode",function(c){return function(e){e=document.getElementById(e);return!e?null:c(k.element(e).html(),0)}}];k.module("bootstrapPrettify",[]).directive(t).factory(w);q.PR_SHOULD_USE_CONTINUATION=!0;(function(){function c(a){function b(i){var a=i.charCodeAt(0);if(a!==92)return a;var l=i.charAt(1);return(a=k[l])?a:"0"<=l&&l<="7"?parseInt(i.substring(1),8):l==="u"||l==="x"?parseInt(i.substring(2),16):i.charCodeAt(1)}function A(i){if(i<32)return(i<16?"\\x0":
"\\x")+i.toString(16);i=String.fromCharCode(i);return i==="\\"||i==="-"||i==="]"||i==="^"?"\\"+i:i}function M(i){var a=i.substring(1,i.length-1).match(/\\u[0-9A-Fa-f]{4}|\\x[0-9A-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\s\S]|-|[^-\\]/g),i=[],l=a[0]==="^",f=["["];l&&f.push("^");for(var l=l?1:0,g=a.length;l<g;++l){var j=a[l];if(/\\[bdsw]/i.test(j))f.push(j);else{var j=b(j),h;l+2<g&&"-"===a[l+1]?(h=b(a[l+2]),l+=2):h=j;i.push([j,h]);h<65||j>122||(h<65||j>90||i.push([Math.max(65,j)|32,Math.min(h,90)|
32]),h<97||j>122||i.push([<
|