"undefined"!=typeofmodule&&"undefined"!=typeofexports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";functiond(a,b){returnJ(new(J(function(){},{prototype:a})),b)}functione(a){returnI(arguments,function(b){b!==a&&I(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}functionf(a,b){varc=[];for(vardina.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}returnc}functiong(a){if(Object.keys)returnObject.keys(a);varc=[];returnb.forEach(a,function(a,b){c.push(b)}),c}functionh(a,b){if(Array.prototype.indexOf)returna.indexOf(b,Number(arguments[2])||0);varc=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(dina&&a[d]===b)returnd;return-1}functioni(a,b,c,d){vare,i=f(c,d),j={},k=[];for(varlini)if(i[l].params&&(e=g(i[l].params),e.length))for(varmine)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);returnJ({},j,b)}functionj(a,b,c){if(!c){c=[];for(vardina)c.push(d)}for(vare=0;e<c.length;e++){varf=c[e];if(a[f]!=b[f])return!1}return!0}functionk(a,b){varc={};returnI(a,function(a){c[a]=b[a]}),c}functionl(a,b){vard=1,f=2,g={},h=[],i=g,j=J(a.when(g),{$$promises:g,$$values:g});this.study=function(g){functionk(a,c){if(o[c]!==f){if(n.push(c),o[c]===d)thrown.splice(0,n.indexOf(c)),newError("Cyclic dependency: "+n.join(" -> "));if(o[c]=d,F(a))m.push(c,[function(){returnb.get(a)}],h);else{vare=b.annotate(a);I(e,function(a){a!==c&&g.hasOwnProperty(a)&&k(g[a],a)}),m.push(c,a,e)}n.pop(),o[c]=f}}functionl(a){returnG(a)&&a.then&&a.$$promises}if(!G(g))thrownewError("'invocables' must be an object");varm=[],n=[],o={};returnI(g,k),g=n=o=null,function(d,f,g){functionh(){--s||(t||e(r,f.$$values),p.$$values=r,p.$$promises=!0,deletep.$$inheritedValues,o.resolve(r))}functionk(a){p.$$failure=a,o.reject(a)}functionn(c,e,f){functioni(a){l.reject(a),k(a)}functionj(){if(!D(p.$$failure))try{l.resolve(b.invoke(e,g,r)),l.promise.then(function(a){r[c]=a,h()},i)}catch(a){i(a)}}varl=a.defer(),m=0;I(f,function(a){q.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,q[a].then(function(b){r[a]=b,--m||j()},i))}),m||j(),q[c]=l.promise}if(l(d)&&g===c&&(g=f,f=d,d=null),d){if(!G(d))thrownewError("'locals' must be an object")}elsed=i;if(f){if(!l(f))thrownewError("'parent' must be a promise returned by $resolve.resolve()")}elsef=j;varo=a.defer(),p=o.promise,q=p.$$promises={},r=J({},d),s=1+m.length/3,t=!1;if(D(f.$$failure))returnk(f.$$failure),p;f.$$inheritedValues&&e(r,f.$$inheritedValues),f.$$values?(t=e(r,f.$$values),p.$$inheritedValues=f.$$values,h()):(f.$$inheritedValues&&(p.$$inheritedValues=f.$$inheritedValues),J(q,f.$$promises),f.then(h,k));for(varu=0,v=m.length;v>u;u+=3)d.hasOwnProperty(m[u])?h():n(m[u],m[u+1],m[u+2]);returnp}},this.resolve=function(a,b,c,d){returnthis.study(a)(b,c,d)}}functionm(a,b,c){this.fromConfig=function(a,b,c){returnD(a.template)?this.fromString(a.template,b):D(a.templateUrl)?this.fromUrl(a.templateUrl,b):D(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){returnE(a)?a(b):a},this.fromUrl=function(c,d){returnE(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b}).then(function(a){returna.data})},this.fromProvider=function(a,b,d){returnc.invoke(a,null,d||{params:b})}}functionn(a,d){functione(a){returnD(a)?this.type.decode(a):p.$$getDefaultValue(this)}functionf(b,c,d){if(!/^\w+(-+\w+)*$/.test(b))thrownewError("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(n[b])thrownewError("Duplicate parameter name '"+b+"' in pattern '"+a+"'");n[b]=J({type:c||newo,$value:e},d)}functiong(a,b,c){vard=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)returnd;vare=c?"?":"";returnd+e+"("+b+")"+e}functionh(a){if(!d.params||!d.params[a])return{};varb=d.params[a];returnG(b)?b:{value:b}}d=b.isObject(d)?d:{};vari,j=/([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k="^",l=0,m=this.segments=[],n=this.params={};this.source=a;for(varq,r,s,t,u;(i=j.exec(a))&&(q=i[2]||i[3],r=i[4]||("*"==i[1]?".*":"[^/]*"),s=a.substring(l,i.index),t=this.$ty