(function(n,t){"use strict";function l(n,t){var i,e,r;if(u(n))for(t=t||[],i=0,e=n.length;i<e;i++)t[i]=n[i];else if(f(n)){t=t||{};for(r in n)r.charAt(0)==="$"&&r.charAt(1)==="$"||(t[r]=n[r])}return t||n}function v(){function r(n,i){return t.extend(Object.create(n),i)}function s(n,t){var r=t.caseInsensitiveMatch,i={originalPath:n,regexp:n},u=i.keys=[];return n=n.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(n,t,i,r){var f=r==="?"||r==="*?"?"?":null,e=r==="*"||r==="*?"?"*":null;return u.push({name:i,optional:!!f}),t=t||"",""+(f?"":t)+"(?:"+(f?t:"")+(e&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([/$*])/g,"\\$1"),i.regexp=new RegExp("^"+n+"$",r?"i":""),i}u=t.isArray;f=t.isObject;e=t.isDefined;o=t.noop;var n={};this.when=function(i,r){var u=l(r),f;return t.isUndefined(u.reloadOnUrl)&&(u.reloadOnUrl=!0),t.isUndefined(u.reloadOnSearch)&&(u.reloadOnSearch=!0),t.isUndefined(u.caseInsensitiveMatch)&&(u.caseInsensitiveMatch=this.caseInsensitiveMatch),n[i]=t.extend(u,i&&s(i,u)),i&&(f=i[i.length-1]==="/"?i.substr(0,i.length-1):i+"/",n[f]=t.extend({redirectTo:i},s(f,u))),this};this.caseInsensitiveMatch=!1;this.otherwise=function(n){return typeof n=="string"&&(n={redirectTo:n}),this.when(null,n),this};i=!0;this.eagerInstantiationEnabled=function(n){return e(n)?(i=n,this):i};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(i,u,f,e,s,h,c,l){function g(n,t){var s=t.keys,e={},r,i,o,u,f;if(!t.regexp||(r=t.regexp.exec(n),!r))return null;for(i=1,o=r.length;i<o;++i)u=s[i-1],f=r[i],u&&f&&(e[u.name]=f);return e}function b(n){var t=v.current;y=ut();w=ft(y,t);!w&&(t||y)&&i.$broadcast("$routeChangeStart",y,t).defaultPrevented&&n&&n.preventDefault()}function k(){var r=v.current,n=y,u;w?(r.params=n.params,t.copy(r.params,f),i.$broadcast("$routeUpdate",r)):(n||r)&&(p=!1,v.current=n,u=e.resolve(n),l.$$incOutstandingRequestCount(),u.then(nt).then(tt).then(function(e){return e&&u.then(it).then(function(u){n===v.current&&(n&&(n.locals=u,t.copy(n.params,f)),i.$broadcast("$routeChangeSuccess",n,r))})}).catch(function(t){n===v.current&&i.$broadcast("$routeChangeError",n,r,t)}).finally(function(){l.$$completeOutstandingRequest(o)}))}function nt(n){var i={route:n,hasRedirection:!1};if(n)if(n.redirectTo)if(t.isString(n.redirectTo))i.path=d(n.redirectTo,n.params),i.search=n.params,i.hasRedirection=!0;else{var f=u.path(),o=u.search(),r=n.redirectTo(n.pathParams,f,o);t.isDefined(r)&&(i.url=r,i.hasRedirection=!0)}else if(n.resolveRedirectTo)return e.resolve(s.invoke(n.resolveRedirectTo)).then(function(n){return t.isDefined(n)&&(i.url=n,i.hasRedirection=!0),i});return i}function tt(n){var i=!0,r,t;return n.route!==v.current?i=!1:n.hasRedirection&&(r=u.url(),t=n.url,t?u.url(t).replace():t=u.path(n.path).search(n.search).replace().url(),t!==r&&(i=!1)),i}function it(n){var i,r;if(n)return i=t.extend({},n.resolve),t.forEach(i,function(n,r){i[r]=t.isString(n)?s.get(n):s.invoke(n,null,null,r)}),r=rt(n),t.isDefined(r)&&(i.$template=r),e.all(i)}function rt(n){var r,i;return t.isDefined(r=n.template)?t.isFunction(r)&&(r=r(n.params)):t.isDefined(i=n.templateUrl)&&(t.isFunction(i)&&(i=i(n.params)),t.isDefined(i)&&(n.loadedTemplateUrl=c.valueOf(i),r=h(i))),r}function ut(){var f,i;return t.forEach(n,function(n){!i&&(f=g(u.path(),n))&&(i=r(n,{params:t.extend({},u.search(),f),pathParams:f}),i.$$route=n)}),i||n[null]&&r(n[null],{params:{},pathParams:{}})}function ft(n,i){return!p&&n&&i&&n.$$route===i.$$route&&(!n.reloadOnUrl||!n.reloadOnSearch&&t.equals(n.pathParams,i.pathParams))}function d(n,i){var r=[];return t.forEach((n||"").split(":"),function(n,t){if(t===0)r.push(n);else{var u=n.match(/(\w+)(?:[?*])?(.*)/),f=u[1];r.push(i[f]);r.push(u[2]||"");delete i[f]}}),r.join("")}var p=!1,y,w,v={routes:n,reload:function(){p=!0;var n={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;p=!1}};i.$evalAsync(function(){b(n);n.defaultPrevented||k()})},updateParams:function(n){if(this.current&&this.current.$$route)n=t.extend({},this.current.params,n),u.path(d(this.current.$$route.originalPath,n)),u.search(n);else throw a("norout","Tried updating route with no current route");}};return i.$on("$locationChangeStart",b),i.$on("$locationChangeSuccess",k),v}]}function s(n){i&&n.get("$route")}function y(){this.$get=function(){return{}}}function h(n,i,r){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(u,f,e,o,s){function v(){c&&(r.cancel(c),c=null);h&&(h.$destroy(),h=null);l&&(c=r.leave(l),c.done(function(n){n!==!1&&(c=null)}),l=null)}function y(){var e=n.current&&n.current.locals,c=e&&e.$template;if(t.isDefined(c)){var o=u.$new(),y=n.current,w=s(o,function(n){r.enter(n,null,l||f).done(function(n){n!==!1&&t.isDefined(a)&&(!a||u.$eval(a))&&i()});v()});l=w;h=y.scope=o;h.$emit("$viewContentLoaded");h.$eval(p)}else v()}var h,l,c,a=e.autoscroll,p=e.onload||"";u.$on("$routeChangeSuccess",y);y()}}}function c(n,t,i){return{restrict:"ECA",priority:-400,link:function(r,u){var f=i.current,e=f.locals,s,o;u.html(e.$template);s=n(u.contents());f.controller&&(e.$scope=r,o=t(f.controller,e),f.controllerAs&&(r[f.controllerAs]=o),u.data("$ngControllerController",o),u.children().data("$ngControllerController",o));r[f.resolveAs||"$resolve"]=e;s(r)}}}var u,f,e,o,r=t.module("ngRoute",[]).info({angularVersion:"1.7.2"}).provider("$route",v).run(s),a=t.$$minErr("ngRoute"),i;s.$inject=["$injector"];r.provider("$routeParams",y);r.directive("ngView",h);r.directive("ngView",c);h.$inject=["$route","$anchorScroll","$animate"];c.$inject=["$compile","$controller","$route"]})(window,window.angular),function(n,t){"use strict";function a(){function a(n,t){for(var f={},u=n.split(","),i=0;i<u.length;i++)f[t?r(u[i]):u[i]]=!0;return f}function at(n,t){var r,e,i,f;if(n===null||n===undefined?n="":typeof n!="string"&&(n=""+n),r=w(n),!r)return"";e=5;do{if(e===0)throw u("uinput","Failed to sanitize html because the input is unstable");e--;n=r.innerHTML;r=w(n)}while(n!==r.innerHTML);for(i=r.firstChild;i;){switch(i.nodeType){case 1:t.start(i.nodeName.toLowerCase(),vt(i.attributes));break;case 3:t.chars(i.textContent)}if(!(f=i.firstChild)&&(i.nodeType===1&&t.end(i.nodeName.toLowerCase()),f=v("nextSibling",i),!f))while(f==null){if(i=v("parentNode",i),i===r)break;f=v("nextSibling",i);i.nodeType===1&&t.end(i.nodeName.toLowerCase())}i=f}while(i=r.firstChild)r.removeChild(i)}function vt(n){for(var i,r={},t=0,u=n.length;t<u;t++)i=n[t],r[i.name]=i.value;return r}function nt(n){return n.replace(/&/g,"&amp;").replace(it,function(n){var t=n.charCodeAt(0),i=n.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(rt,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function yt(n,t){var u=!1,i=e(n,n.push);return{start:function(n,f){n=r(n);!u&&st[n]&&(u=n);u||p[n]!==!0||(i("<"),i(n),o(f,function(u,f){var e=r(f),o=n==="img"&&e==="src"||e==="background";lt[e]===!0&&(g[e]!==!0||t(u,o))&&(i(" "),i(f),i('="'),i(nt(u)),i('"'))}),i(">"))},end:function(n){n=r(n);u||p[n]!==!0||b[n]===!0||(i("<\/"),i(n),i(">"));n==u&&(u=!1)},chars:function(n){u||i(nt(n))}}}function tt(t){for(var r,i,u,f,e,o;t;){if(t.nodeType===n.Node.ELEMENT_NODE)for(r=t.attributes,i=0,u=r.length;i<u;i++)f=r[i],e=f.name.toLowerCase(),(e==="xmlns:ns1"||e.lastIndexOf("ns1:",0)===0)&&(t.removeAttributeNode(f),i--,u--);o=t.firstChild;o&&tt(o);t=v("nextSibling",t)}}function v(n,t){var i=t[n];if(i&&c.call(t,i))throw u("elclob","Failed to sanitize html because the element is clobbered: {0}",t.outerHTML||t.outerText);return i}var y=!1,w;this.$get=["$$sanitizeUri",function(n){return y&&i(p,ot),function(t){var i=[];return l(t,f(i,function(t,i){return!/^unsafe:/.test(n(t,i))})),i.join("")}}];this.enableSvg=function(n){return s(n)?(y=n,this):y};e=t.bind;i=t.extend;o=t.forEach;s=t.isDefined;r=t.lowercase;h=t.noop;l=at;f=yt;c=n.Node.prototype.contains||function(n){return!!(this.compareDocumentPosition(n)&16)};var it=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rt=/([^#-~ |!])/g,b=a("area,br,col,hr,img,wbr"),k=a("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),d=a("rp,rt"),ut=i({},d,k),ft=i({},k,a("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),et=i({},d,a("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),ot=a("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),st=a("script,style"),p=i({},b,ft,et,ut),g=a("background,cite,href,longdesc,src,xlink:href"),ht=a("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),ct=a("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),lt=i({},g,ct,ht);w=function(n,t){function f(t){var i,r;t="<remove><\/remove>"+t;try{t=encodeURI(t)}catch(u){return undefined}return i=new n.XMLHttpRequest,i.responseType="document",i.open("GET","data:text/html;charset=utf-8,"+t,!1),i.send(null),r=i.response.body,r.firstChild.remove(),r}function e(t){t="<remove><\/remove>"+t;try{var i=(new n.DOMParser).parseFromString(t,"text/html").body;return i.firstChild.remove(),i}catch(r){return undefined}}function o(n){return i.innerHTML=n,t.documentMode&&tt(i),i}var r,i;if(t&&t.implementation)r=t.implementation.createHTMLDocument("inert");else throw u("noinert","Can't create an inert html document");return i=(r.documentElement||r.getDocumentElement()).querySelector("body"),i.innerHTML='<svg><g onload="this.parentNode.remove()"><\/g><\/svg>',i.querySelector("svg")?(i.innerHTML='<svg><p><style><img src="<\/style><img src=x onerror=alert(1)//">',i.querySelector("svg img")?e:o):f}(n,n.document)}function v(n){var t=[],i=f(t,h);return i.chars(n),t.join("")}var u=t.$$minErr("$sanitize"),e,i,o,s,r,h,c,l,f;t.module("ngSanitize",[]).provider("$sanitize",a).info({angularVersion:"1.6.8"});t.module("ngSanitize").filter("linky",["$sanitize",function(n){var i=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,u=t.$$minErr("linky"),f=t.isDefined,e=t.isFunction,o=t.isObject,s=t.isString;return function(t,h,c){function b(n){n&&a.push(v(n))}function d(n,t){var i,r=k(n);a.push("<a ");for(i in r)a.push(i+'="'+r[i]+'" ');!f(h)||"target"in r||a.push('target="',h,'" ');a.push('href="',n.replace(/"/g,"&quot;"),'">');b(t);a.push("<\/a>")}if(t==null||t==="")return t;if(!s(t))throw u("notstring","Expected string but received: {0}",t);for(var k=e(c)?c:o(c)?function(){return c}:function(){return{}},l,y=t,a=[],p,w;l=y.match(i);)p=l[0],l[2]||l[4]||(p=(l[3]?"http://":"mailto:")+p),w=l.index,b(y.substr(0,w)),d(p,l[0].replace(r,"")),y=y.substring(w+l[0].length);return b(y),n(a.join(""))}}])}(window,window.angular),function(n,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("angular")):typeof define=="function"&&define.amd?define(["exports","angular"],t):t(n["@uirouter/angularjs"]={},n.angular)}(this,function(n,t){"use strict";function ii(n){function t(i){return i.length>=r?n.apply(null,i):function(){return t(i.concat([].slice.apply(arguments)))}}var i=[].slice.apply(arguments,[1]),r=n.length;return t(i)}function lf(){var n=arguments,t=n.length-1;return function(){for(var r=t,i=n[t].apply(this,arguments);r--;)i=n[r].call(this,i);return i}}function ri(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return lf.apply(null,[].slice.call(arguments).reverse())}function af(n,t){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n.apply(null,r)&&t.apply(null,r)}}function vf(n,t){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n.apply(null,r)||t.apply(null,r)}}function go(n,t){return function(i){return i[n].apply(i,t)}}function dt(n){return function(t){for(var i=0;i<n.length;i++)if(n[i][0](t))return n[i][1](t)}}function hi(n){if(e(n)&&n.length){var t=n.slice(0,-1),i=n.slice(-1);return!(t.filter(wt(f)).length||i.filter(wt(o)).length)}return o(n)}function k(n){return n}function rt(){}function ut(n,t,i,r,u){u===void 0&&(u=!1);var f=function(t){return n()[t].bind(i())},e=function(n){return function(){return t[n]=f(n),t[n].apply(null,arguments)}};return r=r||Object.keys(n()),r.reduce(function(n,t){return n[t]=u?e(t):f(t),n},t)}function df(n,t){return n.indexOf(t)!==-1}function gf(n,t){var i=n.indexOf(t);return i>=0&&n.splice(i,1),n}function te(n,t){return n.push(t),t}function yt(n){for(var r,u=[],t=1;t<arguments.length;t++)u[t-1]=arguments[t];return r=i.apply(void 0,[{}].concat(u.reverse())),i(r,ci(n||{},Object.keys(r)))}function re(n,t){var r=[];for(var i in n.path){if(n.path[i]!==t.path[i])break;r.push(n.path[i])}return r}function ci(n,t){var r={};for(var i in n)t.indexOf(i)!==-1&&(r[i]=n[i]);return r}function li(n,t){return Object.keys(n).filter(wt(et(t))).reduce(function(t,i){return t[i]=n[i],t},{})}function ts(n,t){return ft(n,s(t))}function di(n,t){var r=e(n),i=r?[]:{},u=r?function(n){return i.push(n)}:function(n,t){return i[t]=n};return kt(n,function(n,i){t(n,i)&&u(n,i)}),i}function vt(n,t){var i;return kt(n,function(n,r){i||t(n,r)&&(i=n)}),i}function ft(n,t,i){return i=i||(e(n)?[]:{}),kt(n,function(n,r){return i[r]=t(n,r)}),i}function nr(n,t){return n.push(t),n}function fu(n,t){return t===void 0&&(t="assert failure"),function(i){var r=n(i);if(!r)throw new Error(o(t)?t(i):t);return r}}function gt(){for(var r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(n.length===0)return[];var u=n.reduce(function(n,t){return Math.min(t.length,n)},9007199254740991),t=[],f=function(i){switch(n.length){case 1:t.push([n[0][i]]);break;case 2:t.push([n[0][i],n[1][i]]);break;case 3:t.push([n[0][i],n[1][i],n[2][i]]);break;case 4:t.push([n[0][i],n[1][i],n[2][i],n[3][i]]);break;default:t.push(n.map(function(n){return n[i]}))}};for(r=0;r<u;r++)f(r);return t}function ai(n,t){var i,r;if(e(t)&&(i=t[0],r=t[1]),!f(i))throw new Error("invalid parameters to applyPairs");return n[i]=r,n}function d(n){return n.length&&n[n.length-1]||undefined}function ue(n,t){return t&&Object.keys(t).forEach(function(n){return delete t[n]}),t||(t={}),i(t,n)}function bc(n,t,i){if(e(n))return n.forEach(t,i);Object.keys(n).forEach(function(i){return t(n[i],i)})}function fe(n){for(var r,u,t,i=1;i<arguments.length;i++)if(r=arguments[i],r)for(u=Object.keys(r),t=0;t<u.length;t++)n[u[t]]=r[u[t]];return n}function ee(n,t){var u,s,i,h,f,r;if(n===t)return!0;if(n===null||t===null)return!1;if(n!==n&&t!==t)return!0;if(u=typeof n,s=typeof t,u!==s||u!=="object")return!1;if(i=[n,t],si(e)(i))return kc(n,t);if(si(kr)(i))return n.getTime()===t.getTime();if(si(dr)(i))return n.toString()===t.toString();if(si(o)(i))return!0;if(h=[o,e,kr,dr],h.map(yf).reduce(function(n,t){return n||!!t(i)},!1))return!1;f={};for(r in n){if(!ee(n[r],t[r]))return!1;f[r]=!0}for(r in t)if(!f[r])return!1;return!0}function kc(n,t){return n.length!==t.length?!1:gt(n,t).reduce(function(n,t){return n&&ee(t[0],t[1])},!0)}function oi(n,t){return t.length<=n?t:t.substr(0,n-3)+"..."}function oe(n,t){while(t.length<n)t+=" ";return t}function ou(n){return n.replace(/^([A-Z])/,function(n){return n.toLowerCase()}).replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()})}function su(n){var i=hu(n),r=i.match(/^(function [^ ]+\([^)]*\))/),t=r?r[1]:i,u=n.name||"";return u&&t.match(/function \(/)?"function "+u+t.substr(9):t}function hu(n){var t=e(n)?n.slice(-1)[0]:n;return t&&t.toString()||"undefined"}function w(n){function i(n){if(b(n)){if(t.indexOf(n)!==-1)return"[circular ref]";t.push(n)}return nl(n)}var t=[];return at(n)?i(n):JSON.stringify(n,function(n,t){return i(t)}).replace(/\\"/g,'"')}function ce(n){var t=new RegExp("("+n+")","g");return function(n){return n.split(t).filter(k)}}function le(n,t){return f(d(n))&&f(t)?n.slice(0,-1).concat(d(n)+t):nr(n,t)}function os(n){if(!n)return"ui-view (defunct)";var t=n.creationContext?n.creationContext.name||"(root)":"(none)";return"[ui-view#"+n.id+" "+n.$type+":"+n.fqn+" ("+n.name+"@"+t+")]"}function hs(t){return pf(t)?n.Category[t]:n.Category[n.Category[t]]}function rl(n,t){function u(n){return e(n)?n:r(n)?[n]:[]}function s(n){switch(n.length){case 0:return undefined;case 1:return t==="auto"?n[0]:n;default:return n}}function f(n,t){return function(i){if(e(i)&&i.length===0)return i;var f=u(i),r=ft(f,n);return t===!0?di(r,function(n){return!n}).length===0:s(r)}}function h(n){return function(t,i){var f=u(t),e=u(i),r;if(f.length!==e.length)return!1;for(r=0;r<f.length;r++)if(!n(f[r],e[r]))return!1;return!0}}var o=this;["encode","decode","equals","$normalize"].forEach(function(t){var i=n[t].bind(n),r=t==="equals"?h:f;o[t]=r(i)});i(this,{dynamic:n.dynamic,name:n.name,pattern:n.pattern,inherit:n.inherit,raw:n.raw,is:f(n.is.bind(n),!0),$arrayMode:t})}function ul(t,u,f){var o=f.reloadOnSearch===!1&&u===n.DefType.SEARCH||undefined,e=[f.dynamic,o].find(r),s=r(e)?{dynamic:e}:{},h=fl(f&&f.params&&f.params[t]);return i(s,h)}function fl(n){function t(){return n.value}n=vs(n)?{value:n}:n;t.__cacheable=!0;var r=hi(n.value)?n.value:t;return i(n,{$$fn:r})}function el(t,i,r,u,f){if(t.type&&i&&i.name!=="string")throw new Error("Param '"+u+"' has two type configurations.");if(t.type&&i&&i.name==="string"&&f.type(t.type))return f.type(t.type);if(i)return i;if(!t.type){var e=r===n.DefType.CONFIG?"any":r===n.DefType.PATH?"path":r===n.DefType.SEARCH?"query":"string";return f.type(e)}return t.type instanceof fr?t.type:f.type(t.type)}function ol(n,t,i){var u=n.squash;if(!t||u===!1)return!1;if(!r(u)||u==null)return i;if(u===!0||f(u))return u;throw new Error("Invalid squash policy: '"+u+"'. Valid policies: false, true, or arbitrary string");}function sl(n,t,i,r){var h=[{from:"",to:i||t?undefined:""},{from:null,to:i||t?undefined:""},],u=e(n.replace)?n.replace:[],o;return f(r)&&u.push({from:r,to:undefined}),o=ft(u,s("from")),di(h,function(n){return o.indexOf(n.from)===-1}).concat(u)}function hl(){var n=function(n){var t=function(n){return n!=null?n.toString():n},r={encode:t,decode:t,is:nt(String),pattern:/.*/,equals:function(n,t){return n==t}};return i({},r,n)};i(er.prototype,{string:n({}),path:n({pattern:/[^/]*/}),query:n({}),hash:n({inherit:!1}),int:n({decode:function(n){return parseInt(n,10)},is:function(n){return!br(n)&&this.decode(n.toString())===n},pattern:/-?\d+/}),bool:n({encode:function(n){return n&&1||0},decode:function(n){return parseInt(n,10)!==0},is:nt(Boolean),pattern:/0|1/}),date:n({encode:function(n){return this.is(n)?[n.getFullYear(),("0"+(n.getMonth()+1)).slice(-2),("0"+n.getDate()).slice(-2)].join("-"):undefined},decode:function(n){if(this.is(n))return n;var t=this.capture.exec(n);return t?new Date(t[1],t[2]-1,t[3]):undefined},is:function(n){return n instanceof Date&&!isNaN(n.valueOf())},equals:function(n,t){return["getFullYear","getMonth","getDate"].reduce(function(i,r){return i&&n[r]()===t[r]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/}),json:n({encode:kf,decode:bf,is:nt(Object),equals:bi,pattern:/[^/]*/}),any:n({encode:k,decode:k,is:function(){return!0},equals:bi})})}function vl(n){return n.name}function yl(n){return n.self.$$state=function(){return n},n.self}function pl(n){return n.parent&&n.parent.data&&(n.data=n.self.data=fi(n.parent.data,n.data)),n.data}function dl(n){return n.parent?n.parent.path.concat(n):[n]}function gl(n){var t=n.parent?i({},n.parent.includes):{};return t[n.name]=!0,t}function we(n){var h=function(n,t){return Object.keys(n||{}).map(function(i){return{token:i,val:n[i],deps:undefined,policy:t[i]}})},c=function(n){var t=u.$injector;return n.$inject||t&&t.annotate(n,t.strictDi)||"deferred"},a=function(n){return!!(n.token&&n.resolveFn)},y=function(n){return!!((n.provide||n.token)&&(n.useValue||n.useFactory||n.useExisting||n.useClass))},p=function(n){return!!(n&&n.val&&(f(n.val)||e(n.val)||o(n.val)))},t=function(n){return n.provide||n.token},r=dt([[s("resolveFn"),function(n){return new l(t(n),n.resolveFn,n.deps,n.policy)}],[s("useFactory"),function(n){return new l(t(n),n.useFactory,n.deps||n.dependencies,n.policy)}],[s("useClass"),function(n){return new l(t(n),function(){return new n.useClass},[],n.policy)}],[s("useValue"),function(n){return new l(t(n),function(){return n.useValue},[],n.policy,n.useValue)}],[s("useExisting"),function(n){return new l(t(n),k,[n.useExisting],n.policy)}],]),b=dt([[ri(s("val"),f),function(n){return new l(n.token,k,[n.val],n.policy)}],[ri(s("val"),e),function(n){return new l(n.token,d(n.val),n.val.slice(0,-1),n.policy)}],[ri(s("val"),o),function(n){return new l(n.token,n.val,c(n.val),n.policy)}],]),g=dt([[nt(l),function(n){return n}],[a,r],[y,r],[p,b],[v(!0),function(n){throw new Error("Invalid resolve value: "+w(n));},],]),i=n.resolve,tt=e(i)?i:h(i,n.resolvePolicy||{});return tt.map(g)}function sr(n,t){function r(n){for(var r,u=i,t=0;t<u.length;t++)if(r=new ir(u[t]),r&&r.matches(n.name)||!r&&u[t]===n.name)return!0;return!1}var i=f(t)?[t]:t,u=o(i)?i:r;return!!u(n)}function bu(n,t,i){function u(n,u,f){f===void 0&&(f={});var o=new wu(t,i,u,n,e,f);return r.push(o),o.deregister.bind(o)}var f=n._registeredHooks=n._registeredHooks||{},r=f[i.name]=[],e=tt(r);return n[i.name]=u,u}function na(n){return n===void 0&&(n=!1),function(t,i){var u=n?-1:1,r=(t.node.state.path.length-i.node.state.path.length)*u;return r!==0?r:i.hook.priority-t.hook.priority}}function ws(n,t){var i=["",""],r=n.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return r;switch(t.squash){case!1:i=["(",")"+(t.isOptional?"?":"")];break;case!0:r=r.replace(/\/$/,"");i=["(?:/(",")|/)?"];break;default:i=["("+t.squash+"|",")?"]}return r+i[0]+t.type.pattern.source+i[1]}function fa(n,t,i,r){return r==="/"?n:t?cu(r)+n:i?r.slice(1)+n:n}function ks(n){if(!o(n)&&!f(n)&&!nt(lt)(n)&&!lt.isDef(n))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return o(n)?n:v(n)}function ya(n){n.addResolvable(l.fromData(rf,n.router),"");n.addResolvable(l.fromData(vi,n),"");n.addResolvable(l.fromData("$transition$",n),"");n.addResolvable(l.fromData("$stateParams",n.params()),"");n.entering().forEach(function(t){n.addResolvable(l.fromData("$state$",t),t)})}function ro(n){return function(t,i){var r=i.$$state(),u=r[n];return u(t,i)}}function th(n,t){function o(t){return t&&Array.isArray(t.states)&&t.states.forEach(function(t){return n.router.stateRegistry.register(t)}),t}var i=t.$$state().lazyLoad,r=i._promise,f,e;return r||(f=function(n){return delete t.lazyLoad,delete t.$$state().lazyLoad,delete i._promise,n},e=function(n){return delete i._promise,u.$q.reject(n)},r=i._promise=u.$q.when(i(n,t)).then(o).then(f,e)),r}function ty(n){var i=n._ignoredReason(),t;if(i)return h.traceTransitionIgnored(n),t=n.router.globals.transition,i==="SameAsCurrent"&&t&&t.abort(),y.ignored().toPromise()}function iy(n){if(!n.valid())throw new Error(n.error().toString());}function lr(n){var t=function(n){return n||""},i=lu(n).map(t),u=i[0],f=i[1],r=au(u).map(t),e=r[0],o=r[1];return{path:e,search:o,hash:f,url:n}}function ar(n,t,i,r){return function(u){function o(n){n.dispose(f);n.dispose(e)}var f=u.locationService=new i(u),e=u.locationConfig=new r(u,t);return{name:n,service:f,configuration:e,dispose:o}}}function uh(){return u.$injector=pi,u.$q=cr,{name:"vanilla.services",$q:cr,$injector:pi,dispose:function(){return null}}}function hh(){var n=null;return function(t,i){return n=n||u.$injector.get("$templateFactory"),[new vo(t,i,n)]}}function ch(n){var o,s;if(!n.parent)return{};var t=["component","bindings","componentProvider"],u=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=t.concat(u);if(r(n.views)&&sf(e,n))throw new Error("State '"+n.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level.  Move the following properties into a view (in the 'views' object): "+(" "+e.filter(function(t){return r(n[t])}).join(", ")));return o={},s=n.views||{$default:ci(n,e)},kt(s,function(r,e){if(e=e||"$default",f(r)&&(r={component:r}),r=i({},r),sf(t,r)&&sf(u,r))throw new Error("Cannot combine: "+t.join("|")+" with: "+u.join("|")+" in stateview: '"+e+"@"+n.name+"'");r.resolveAs=r.resolveAs||"$resolve";r.$type="ng1";r.$context=n;r.$name=e;var s=tf.normalizeUIViewTarget(r.$context,r.$name);r.$uiViewName=s.uiViewName;r.$uiViewContextAnchor=s.uiViewContextAnchor;o[e]=r}),o}function ay(n){var t=u.$injector.get(n+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+n+"'");return t.map(vy).reduce(c,[])}function bh(n){function t(n,t,r,u,f){return i._runtimeServices(f,n,u,t,r),delete a.router,delete a.$get,a}a=this.router=new rf;a.stateProvider=new ah(a.stateRegistry,a.stateService);a.stateRegistry.decorator("views",ch);a.stateRegistry.decorator("onExit",yo("onExit"));a.stateRegistry.decorator("onRetain",yo("onRetain"));a.stateRegistry.decorator("onEnter",yo("onEnter"));a.viewService._pluginapi._viewConfigFactory("ng1",hh());var i=a.locationService=a.locationConfig=new vh(n);return vh.monkeyPatchPathParameterType(a),a.router=a,a.$get=t,t.$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],a}function kh(n,t,i){if(u.$injector=n,u.$q=t,!n.hasOwnProperty("strictDi"))try{n.invoke(function(){})}catch(r){n.strictDi=!!/strict mode/.exec(r&&r.toString())}i.stateRegistry.get().map(function(n){return n.$$state().resolvables}).reduce(c,[]).filter(function(n){return n.deps==="deferred"}).forEach(function(t){return t.deps=n.annotate(t.resolveFn,n.strictDi)})}function wo(n){n.$watch(function(){h.approximateDigests++})}function nc(n){var t,i=n.match(/^\s*({[^}]*})\s*$/);if(i&&(n="("+i[1]+")"),t=n.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/),!t||t.length!==4)throw new Error("Invalid state ref '"+n+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function tc(n){var i=n.parent().inheritedData("$uiView"),t=g("$cfg.path")(i);return t?d(t).state.name:undefined}function ic(n,t,r){var u=r.uiState||n.current.name,f=i(yy(t,n),r.uiStateOpts||{}),e=n.href(u,r.uiStateParams,f);return{uiState:u,uiStateParams:r.uiStateParams,uiStateOpts:f,href:e}}function rc(n){var i=Object.prototype.toString.call(n.prop("href"))==="[object SVGAnimatedString]",t=n[0].nodeName==="FORM";return{attr:t?"action":i?"xlink:href":"href",isAnchor:n.prop("tagName").toUpperCase()==="A",clickable:!t}}function uc(n,t,i,r,u){return function(f){var h=f.which||f.button,e=u(),o,s;h>1||f.ctrlKey||f.metaKey||f.shiftKey||n.attr("target")||(o=i(function(){n.attr("disabled")||t.go(e.uiState,e.uiStateParams,e.uiStateOpts)}),f.preventDefault(),s=r.isAnchor&&!e.href?1:0,f.preventDefault=function(){s--<=0&&i.cancel(o)})}}function yy(n,t){return{relative:tc(n)||t.$current,inherit:!0,source:"sref"}}function fc(n,t,i,r){var u,s,f,o,h;for(r&&(u=r.events),e(u)||(u=["click"]),s=n.on?"on":"bind",f=0,o=u;f<o.length;f++)h=o[f],n[s](h,i);t.$on("$destroy",function(){for(var f,e=n.off?"off":"unbind",t=0,r=u;t<r.length;t++)f=r[t],n[e](f,i)})}function sc(n){var t=function(t,i,r){return n.is(t,i,r)};return t.$stateful=!0,t}function hc(n){var t=function(t,i,r){return n.includes(t,i,r)};return t.$stateful=!0,t}function lc(n,t,r,u,e){var o=g("viewDecl.controllerAs"),s=g("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(u){var c=u.html();return u.empty(),function(u,l){var w=l.data("$uiView"),a,y,v;if(!w){l.html(c);n(l.contents())(u);return}a=w.$cfg||{viewDecl:{},getTemplate:rt};y=a.path&&new st(a.path);l.html(a.getTemplate(l,y)||c);h.traceUIViewFill(w.$uiView,l.html());var nt=n(l.contents()),d=a.controller,b=o(a),g=s(a),k=y&&cf(y);if(u[g]=k,d&&(v=t(d,i({},k,{$scope:u,$element:l})),b&&(u[b]=v,u[b][g]=k),l.data("$ngControllerController",v),l.children().data("$ngControllerController",v),yc(e,r,v,u,a)),f(a.component))var tt=ou(a.component),it=new RegExp("^(x-|data-)?"+tt+"$","i"),ut=function(){var n=[].slice.call(l[0].children).filter(function(n){return n&&n.tagName&&it.exec(n.tagName)});return n&&p.element(n).data("$"+a.component+"Controller")},ft=u.$watch(ut,function(n){n&&(yc(e,r,n,u,a),ft())});nt(u)}}}}function yc(n,t,i,r,u){var e,s;if(!o(i.$onInit)||u.viewDecl.component&&ac||i.$onInit(),e=d(u.path).state.self,s={bind:i},o(i.uiOnParamsChanged)){var a=new st(u.path),v=a.getResolvable("$transition$").data,y=function(n){var o,s;if(n!==v&&n.exiting().indexOf(e)===-1){var t=n.params("to"),h=n.params("from"),r=function(n){return n.paramSchema},l=n.treeChanges("to").map(r).reduce(c,[]),u=n.treeChanges("from").map(r).reduce(c,[]),f=l.filter(function(n){var i=u.indexOf(n);return i===-1||!u[i].type.equals(t[n.id],h[n.id])});f.length&&(o=f.map(function(n){return n.id}),s=di(t,function(n,t){return o.indexOf(t)!==-1}),i.uiOnParamsChanged(s,n))}};r.$on("$destroy",t.onSuccess({},y,s))}if(o(i.uiCanExit)){var h=vc++,f="_uiCanExitIds",l=function(n){return!!n&&(n[f]&&n[f][h]===!0||l(n.redirectedFrom()))},p=function(t){var r,u=t[f]=t[f]||{};return l(t)||(r=n.when(i.uiCanExit(t)),r.then(function(n){return u[h]=n!==!1})),r},w={exiting:e.name};r.$on("$destroy",t.onBefore(w,p,s))}}function py(){var n=!1;this.useAnchorScroll=function(){n=!0};this.$get=["$anchorScroll","$timeout",function(t,i){return n?t:function(n){return i(function(){n[0].scrollIntoView()},0,!1)}},]}var wc=angular,p=t&&t.module?t:wc,s=function(n){return function(t){return t&&t[n]}},pt=ii(function(n,t,i){return i&&i[n]===t}),g=function(n){return ri.apply(null,n.split(".").map(s))},wt=function(n){return function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];return!n.apply(null,i)}},si=function(n){return function(t){return t.reduce(function(t,i){return t&&!!n(i)},!0)}},yf=function(n){return function(t){return t.reduce(function(t,i){return t||!!n(i)},!1)}},nt=function(n){return function(t){return t!=null&&t.constructor===n||t instanceof n}},ko=function(n){return function(t){return n===t}},v=function(n){return function(){return n}},ns=Object.prototype.toString,pr=function(n){return function(t){return typeof t===n}},at=pr("undefined"),r=wt(at),wr=function(n){return n===null},br=vf(wr,at),o=pr("function"),pf=pr("number"),f=pr("string"),b=function(n){return n!==null&&typeof n=="object"},e=Array.isArray,kr=function(n){return ns.call(n)==="[object Date]"},dr=function(n){return ns.call(n)==="[object RegExp]"},ui=af(b,ri(s("then"),o)),wf=function(n){return function(){throw new Error(n+"(): No coreservices implementation for UI-Router is loaded.");}},u={$q:undefined,$injector:undefined},bt=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||undefined,gr=bt.angular||{},bf=gr.fromJson||JSON.parse.bind(JSON),kf=gr.toJson||JSON.stringify.bind(JSON),kt=gr.forEach||bc,i=Object.assign||fe,bi=gr.equals||ee,fi=function(n,t){return i(Object.create(n),t)},et=ii(df),tt=ii(gf),ne=ii(te),ie=function(n){return n.slice().forEach(function(t){typeof t=="function"&&t();tt(n,t)})},ki=function(n,t){return i(n,t)},nu=ft,ct=function(n){return Object.keys(n).map(function(t){return n[t]})},tu=function(n,t){return n&&t},iu=function(n,t){return n||t},c=function(n,t){return n.concat(t)},gi=function(n,t){return e(t)?n.concat(t.reduce(gi,[])):nr(n,t)},ei=function(n,t){return et(n,t)?n:nr(n,t)},ru=function(n){return n.reduce(c,[])},is=function(n){return n.reduce(gi,[])},uu=fu,rs=fu,us=function(n){return Object.keys(n).map(function(t){return[t,n[t]]})},eu=function(n){return n.catch(function(){return 0})&&n},tr=function(n){return eu(u.$q.reject(n))},ir=function(){function n(n){this.text=n;this.glob=n.split(".");var t=this.text.split(".").map(function(n){return n==="**"?"(?:|(?:\\.[^.]*)*)":n==="*"?"\\.[^.]*":"\\."+n}).join("");this.regexp=new RegExp("^"+t+"$")}return n.is=function(n){return!!/[!,*]+/.exec(n)},n.fromString=function(t){return n.is(t)?new n(t):null},n.prototype.matches=function(n){return this.regexp.test("."+n)},n}(),rr=function(){function n(n,t){n===void 0&&(n=[]);t===void 0&&(t=null);this._items=n;this._limit=t;this._evictListeners=[];this.onEvict=ne(this._evictListeners)}return n.prototype.enqueue=function(n){var t=this._items;return t.push(n),this._limit&&t.length>this._limit&&this.evict(),n},n.prototype.evict=function(){var n=this._items.shift();return this._evictListeners.forEach(function(t){return t(n)}),n},n.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},n.prototype.clear=function(){var n=this._items;return this._items=[],n},n.prototype.size=function(){return this._items.length},n.prototype.remove=function(n){var t=this._items.indexOf(n);return t>-1&&this._items.splice(t,1)[0]},n.prototype.peekTail=function(){return this._items[this._items.length-1]},n.prototype.peekHead=function(){if(this.size())return this._items[0]},n}(),fs,y,ss,cs,ls,as,vs,it,er,ps,ht,wu,ku,du,vi,nf,uf,ih,ef,sf,yr,dh,gh,cf,ec,oc,bo,cc,ac,vc,pc;(function(n){n[n.SUPERSEDED=2]="SUPERSEDED";n[n.ABORTED=3]="ABORTED";n[n.INVALID=4]="INVALID";n[n.IGNORED=5]="IGNORED";n[n.ERROR=6]="ERROR"})(n.RejectType||(n.RejectType={}));fs=0;y=function(){function t(n,t,i){this.$id=fs++;this.type=n;this.message=t;this.detail=i}return t.isRejectionPromise=function(n){return n&&typeof n.then=="function"&&nt(t)(n._transitionRejection)},t.superseded=function(i,r){var u=new t(n.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",i);return r&&r.redirected&&(u.redirected=!0),u},t.redirected=function(n){return t.superseded(n,{redirected:!0})},t.invalid=function(i){return new t(n.RejectType.INVALID,"This transition is invalid",i)},t.ignored=function(i){return new t(n.RejectType.IGNORED,"The transition was ignored",i)},t.aborted=function(i){return new t(n.RejectType.ABORTED,"The transition has been aborted",i)},t.errored=function(i){return new t(n.RejectType.ERROR,"The transition errored",i)},t.normalize=function(n){return nt(t)(n)?n:t.errored(n)},t.prototype.toString=function(){var t=function(n){return n&&n.toString!==Object.prototype.toString?n.toString():w(n)},i=t(this.detail),n=this,r=n.$id,u=n.type,f=n.message;return"Transition Rejection($id: "+r+" type: "+u+", message: "+f+", detail: "+i+")"},t.prototype.toPromise=function(){return i(tr(this),{_transitionRejection:this})},t}();var dc=y.isRejectionPromise,gc=function(n){return b(n)&&!e(n)&&n.constructor!==Object&&o(n.toString)},nl=dt([[at,v("undefined")],[wr,v("null")],[ui,v("[Promise]")],[dc,function(n){return n._transitionRejection.toString()}],[gc,function(n){return n.toString()}],[hi,su],[v(!0),k],]);var ur=function(n){return function(t){if(!t)return["",""];var i=t.indexOf(n);return i===-1?[t,""]:[t.substr(0,i),t.substr(i+1)]}},es=new RegExp("^(?:[a-z]+:)?//[^/]+/"),cu=function(n){return n.replace(/\/[^/]*$/,"")},lu=ur("#"),au=ur("?"),se=ur("="),he=function(n){return n?n.replace(/^#/,""):""};ss=function(n){var t=n.viewDecl,i=t.$context.name||"(root)";return"[View#"+n.$id+" from '"+i+"' state]: target ui-view: '"+t.$uiViewName+"@"+t.$uiViewContextAnchor+"'"};cs=Function.prototype.bind.call(console.log,console);ls=o(console.table)?console.table.bind(console):cs.bind(console),function(n){n[n.RESOLVE=0]="RESOLVE";n[n.TRANSITION=1]="TRANSITION";n[n.HOOK=2]="HOOK";n[n.UIVIEW=3]="UIVIEW";n[n.VIEWCONFIG=4]="VIEWCONFIG"}(n.Category||(n.Category={}));var tl=g("$id"),il=g("router.$id"),ni=function(n){return"Transition #"+tl(n)+"-"+il(n)},ae=function(){function t(){this._enabled={};this.approximateDigests=0}return t.prototype._set=function(t,i){var r=this;i.length||(i=Object.keys(n.Category).map(function(n){return parseInt(n,10)}).filter(function(n){return!isNaN(n)}).map(function(t){return n.Category[t]}));i.map(hs).forEach(function(n){return r._enabled[n]=t})},t.prototype.enable=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._set(!0,t)},t.prototype.disable=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._set(!1,t)},t.prototype.enabled=function(n){return!!this._enabled[hs(n)]},t.prototype.traceTransitionStart=function(t){this.enabled(n.Category.TRANSITION)&&console.log(ni(t)+": Started  -> "+w(t))},t.prototype.traceTransitionIgnored=function(t){this.enabled(n.Category.TRANSITION)&&console.log(ni(t)+": Ignored  <> "+w(t))},t.prototype.traceHookInvocation=function(t,i,r){if(this.enabled(n.Category.HOOK)){var u=g("traceData.hookType")(r)||"internal",f=g("traceData.context.state.name")(r)||g("traceData.context")(r)||"unknown",e=su(t.registeredHook.callback);console.log(ni(i)+":   Hook -> "+u+" context: "+f+", "+oi(200,e))}},t.prototype.traceHookResult=function(t,i){this.enabled(n.Category.HOOK)&&console.log(ni(i)+":   <- Hook returned: "+oi(200,w(t)))},t.prototype.traceResolvePath=function(t,i,r){this.enabled(n.Category.RESOLVE)&&console.log(ni(r)+":         Resolving "+t+" ("+i+")")},t.prototype.traceResolvableResolved=function(t,i){this.enabled(n.Category.RESOLVE)&&console.log(ni(i)+":               <- Resolved  "+t+" to: "+oi(200,w(t.data)))},t.prototype.traceError=function(t,i){this.enabled(n.Category.TRANSITION)&&console.log(ni(i)+": <- Rejected "+w(i)+", reason: "+t)},t.prototype.traceSuccess=function(t,i){this.enabled(n.Category.TRANSITION)&&console.log(ni(i)+": <- Success  "+w(i)+", final state: "+t.name)},t.prototype.traceUIViewEvent=function(t,i,r){(r===void 0&&(r=""),this.enabled(n.Category.UIVIEW))&&console.log("ui-view: "+oe(30,t)+" "+os(i)+r)},t.prototype.traceUIViewConfigUpdated=function(t,i){this.enabled(n.Category.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+i+"'")},t.prototype.traceUIViewFill=function(t,i){this.enabled(n.Category.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+oi(200,i))},t.prototype.traceViewSync=function(t){if(this.enabled(n.Category.VIEWCONFIG)){var i="uiview component fqn",r="view config state (view name)",u=t.map(function(n){var f=n.uiView,u=n.viewConfig,t,e=f&&f.fqn,o=u&&u.viewDecl.$context.name+": ("+u.viewDecl.$name+")";return t={},t[i]=e,t[r]=o,t}).sort(function(n,t){return(n[i]||"").localeCompare(t[i]||"")});ls(u)}},t.prototype.traceViewServiceEvent=function(t,i){this.enabled(n.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+ss(i))},t.prototype.traceViewServiceUIViewEvent=function(t,i){this.enabled(n.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+os(i))},t}(),h=new ae,fr=function(){function n(n){this.pattern=/.*/;this.inherit=!0;i(this,n)}return n.prototype.is=function(){return!0},n.prototype.encode=function(n){return n},n.prototype.decode=function(n){return n},n.prototype.equals=function(n,t){return n==t},n.prototype.$subPattern=function(){var n=this.pattern.toString();return n.substr(1,n.length-2)},n.prototype.toString=function(){return"{ParamType:"+this.name+"}"},n.prototype.$normalize=function(n){return this.is(n)?n:this.decode(n)},n.prototype.$asArray=function(n,t){if(!n)return this;if(n==="auto"&&!t)throw new Error("'auto' array mode is for query parameters only");return new rl(this,n)},n}();as=Object.prototype.hasOwnProperty;vs=function(n){return["value","type","squash","array","dynamic"].filter(as.bind(n||{})).length===0},function(n){n[n.PATH=0]="PATH";n[n.SEARCH=1]="SEARCH";n[n.CONFIG=2]="CONFIG"}(n.DefType||(n.DefType={}));it=function(){function t(t,u,f,e,o){function w(){var r={array:f===n.DefType.SEARCH?"auto":!1},u=t.match(/\[\]$/)?{array:!0}:{};return i(r,u,s).array}var s=ul(t,f,o),h;u=el(s,u,f,t,e.paramTypes);h=w();u=h?u.$asArray(h,f===n.DefType.SEARCH):u;var c=s.value!==undefined||f===n.DefType.SEARCH,a=r(s.dynamic)?!!s.dynamic:!!u.dynamic,v=r(s.raw)?!!s.raw:!!u.raw,l=ol(s,c,e.defaultSquashPolicy()),y=sl(s,h,c,l),p=r(s.inherit)?!!s.inherit:!!u.inherit;i(this,{id:t,type:u,location:f,isOptional:c,dynamic:a,raw:v,squash:l,replace:y,inherit:p,array:h,config:s})}return t.values=function(n,t){var u,i,f,r;for(t===void 0&&(t={}),u={},i=0,f=n;i<f.length;i++)r=f[i],u[r.id]=r.value(t[r.id]);return u},t.changed=function(n,t,i){return t===void 0&&(t={}),i===void 0&&(i={}),n.filter(function(n){return!n.type.equals(t[n.id],i[n.id])})},t.equals=function(n,i,r){return i===void 0&&(i={}),r===void 0&&(r={}),t.changed(n,i,r).length===0},t.validates=function(n,t){return t===void 0&&(t={}),n.map(function(n){return n.validates(t[n.id])}).reduce(tu,!0)},t.prototype.isDefaultValue=function(n){return this.isOptional&&this.type.equals(this.value(),n)},t.prototype.value=function(n){var t=this,i=function(){if(t._defaultValueCache)return t._defaultValueCache.defaultValue;if(!u.$injector)throw new Error("Injectable functions cannot be called at configuration time");var n=u.$injector.invoke(t.config.$$fn);if(n!==null&&n!==undefined&&!t.type.is(n))throw new Error("Default value ("+n+") for parameter '"+t.id+"' is not an instance of ParamType ("+t.type.name+")");return t.config.$$fn.__cacheable&&(t._defaultValueCache={defaultValue:n}),n},r=function(n){for(var u,i=0,r=t.replace;i<r.length;i++)if(u=r[i],u.from===n)return u.to;return n};return n=r(n),at(n)?i():this.type.$normalize(n)},t.prototype.isSearch=function(){return this.location===n.DefType.SEARCH},t.prototype.validates=function(n){var t,i;return(at(n)||n===null)&&this.isOptional?!0:(t=this.type.$normalize(n),!this.type.is(t))?!1:(i=this.type.encode(t),!(f(i)&&!this.type.pattern.exec(i)))},t.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},t}();er=function(){function n(){this.enqueue=!0;this.typeQueue=[];this.defaultTypes=ci(n.prototype,["hash","string","query","path","int","bool","date","json","any",]);var t=function(n,t){return new fr(i({name:t},n))};this.types=fi(ft(this.defaultTypes,t),{})}return n.prototype.dispose=function(){this.types={}},n.prototype.type=function(n,t,u){if(!r(t))return this.types[n];if(this.types.hasOwnProperty(n))throw new Error("A type named '"+n+"' has already been defined.");return this.types[n]=new fr(i({name:n},t)),u&&(this.typeQueue.push({name:n,def:u}),this.enqueue||this._flushTypeQueue()),this},n.prototype._flushTypeQueue=function(){while(this.typeQueue.length){var n=this.typeQueue.shift();if(n.pattern)throw new Error("You cannot override a type's .pattern at runtime.");i(this.types[n.name],u.$injector.invoke(n.def))}},n}();hl();var ve=function(){function n(n){n===void 0&&(n={});i(this,n)}return n.prototype.$inherit=function(n,t,r){var u,e=re(t,r),s={},h=[],o,f;for(o in e)if(e[o]&&e[o].params&&(u=Object.keys(e[o].params),u.length))for(f in u)h.indexOf(u[f])>=0||(h.push(u[f]),s[u[f]]=this[u[f]]);return i({},s,n)},n}(),or=function(){function n(t){var r,u;t instanceof n?(r=t,this.state=r.state,this.paramSchema=r.paramSchema.slice(),this.paramValues=i({},r.paramValues),this.resolvables=r.resolvables.slice(),this.views=r.views&&r.views.slice()):(u=t,this.state=u,this.paramSchema=u.parameters({inherit:!1}),this.paramValues={},this.resolvables=u.resolvables.map(function(n){return n.clone()}))}return n.prototype.clone=function(){return new n(this)},n.prototype.applyRawParams=function(n){var t=function(t){return[t.id,t.value(n[t.id])]};return this.paramValues=this.paramSchema.reduce(function(n,i){return ai(n,t(i))},{}),this},n.prototype.parameter=function(n){return vt(this.paramSchema,pt("id",n))},n.prototype.equals=function(n,t){var i=this.diff(n,t);return i&&i.length===0},n.prototype.diff=function(n,t){if(this.state!==n.state)return!1;var i=t?t(this):this.paramSchema;return it.changed(i,this.paramValues,n.paramValues)},n.clone=function(n){return n.clone()},n}(),lt=function(){function n(n,t,r,u){this._stateRegistry=n;this._identifier=t;this._identifier=t;this._params=i({},r||{});this._options=i({},u||{});this._definition=n.matcher.find(t,this._options.relative)}return n.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},n.prototype.identifier=function(){return this._identifier},n.prototype.params=function(){return this._params},n.prototype.$state=function(){return this._definition},n.prototype.state=function(){return this._definition&&this._definition.self},n.prototype.options=function(){return this._options},n.prototype.exists=function(){return!!(this._definition&&this._definition.self)},n.prototype.valid=function(){return!this.error()},n.prototype.error=function(){var n=this.options().relative,t;return!this._definition&&!!n?(t=n.name?n.name:n,"Could not resolve '"+this.name()+"' from state '"+t+"'"):this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},n.prototype.toString=function(){return"'"+this.name()+"'"+w(this.params())},n.prototype.withState=function(t){return new n(this._stateRegistry,t,this._params,this._options)},n.prototype.withParams=function(t,r){r===void 0&&(r=!1);var u=r?t:i({},this._params,t);return new n(this._stateRegistry,this._identifier,u,this._options)},n.prototype.withOptions=function(t,r){r===void 0&&(r=!1);var u=r?t:i({},this._options,t);return new n(this._stateRegistry,this._identifier,this._params,u)},n.isDef=function(n){return n&&n.state&&(f(n.state)||f(n.state.name))},n}(),ot=function(){function n(){}return n.makeTargetState=function(n,t){var i=d(t).state;return new lt(n,i,t.map(s("paramValues")).reduce(ki,{}),{})},n.buildPath=function(n){var t=n.params();return n.$state().path.map(function(n){return new or(n).applyRawParams(t)})},n.buildToPath=function(t,i){var r=n.buildPath(i);return i.options().inherit?n.inheritParams(t,r,Object.keys(i.params())):r},n.applyViewConfigs=function(t,i,r){i.filter(function(n){return et(r,n.state)}).forEach(function(r){var u=ct(r.state.views||{}),f=n.subPath(i,function(n){return n===r}),e=u.map(function(n){return t.createViewConfig(f,n)});r.views=e.reduce(c,[])})},n.inheritParams=function(n,t,r){function u(n,t){var r=vt(n,pt("state",t));return i({},r&&r.paramValues)}function e(t){var e=i({},t&&t.paramValues),h=ci(e,r),o,s;return e=li(e,r),o=li(u(n,t.state)||{},f),s=i(e,o,h),new or(t.state).applyRawParams(s)}r===void 0&&(r=[]);var f=n.map(function(n){return n.paramSchema}).reduce(c,[]).filter(function(n){return!n.inherit}).map(s("id"));return t.map(e)},n.treeChanges=function(t,i,r){function v(n,t){var r=n.clone();return r.paramValues=i[t].paramValues,r}for(var l=Math.min(t.length,i.length),u=0,a=function(t,i){return t.equals(i,n.nonDynamicParams)},f,e,h,o,c,s;u<l&&t[u].state!==r&&a(t[u],i[u]);)u++;return f=t,e=f.slice(0,u),h=f.slice(u),s=e.map(v),o=i.slice(u),c=s.concat(o),{from:f,to:c,retained:e,retainedWithToParams:s,exiting:h,entering:o}},n.matching=function(n,t,i){var r=!1,u=gt(n,t);return u.reduce(function(n,t){var u=t[0],f=t[1];return r=r||!u.equals(f,i),r?n:n.concat(u)},[])},n.equals=function(t,i,r){return t.length===i.length&&n.matching(t,i,r).length===t.length},n.subPath=function(n,t){var r=vt(n,t),i=n.indexOf(r);return i===-1?undefined:n.slice(0,i+1)},n.nonDynamicParams=function(n){return n.state.parameters({inherit:!1}).filter(function(n){return!n.dynamic})},n.paramValues=function(n){return n.reduce(function(n,t){return i(n,t.paramValues)},{})},n}(),vu={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT",RXWAIT:"RXWAIT"}},yu={when:"LAZY",async:"WAIT"},l=function(){function n(t,r,f,e,s){if(this.resolved=!1,this.promise=undefined,t instanceof n)i(this,t);else if(o(r)){if(br(t))throw new Error("new Resolvable(): token argument is required");if(!o(r))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=t;this.policy=e;this.resolveFn=r;this.deps=f||[];this.data=s;this.resolved=s!==undefined;this.promise=this.resolved?u.$q.when(this.data):undefined}else if(b(t)&&t.token&&(t.hasOwnProperty("resolveFn")||t.hasOwnProperty("data"))){var h=t;return new n(h.token,h.resolveFn,h.deps,h.policy,h.data)}}return n.prototype.getPolicy=function(n){var t=this.policy||{},i=n&&n.resolvePolicy||{};return{when:t.when||i.when||yu.when,async:t.async||i.async||yu.async}},n.prototype.resolve=function(n,t){var i=this,r=u.$q,e=function(){return r.all(n.getDependencies(i).map(function(i){return i.get(n,t)}))},o=function(n){return i.resolveFn.apply(null,n)},s=function(n){var t=n.cache(1);return t.take(1).toPromise().then(function(){return t})},f=n.findNode(this),c=f&&f.state,l=this.getPolicy(c).async==="RXWAIT"?s:k,a=function(n){return i.data=n,i.resolved=!0,i.resolveFn=null,h.traceResolvableResolved(i,t),i.data};return this.promise=r.when().then(e).then(o).then(l).then(a)},n.prototype.get=function(n,t){return this.promise||this.resolve(n,t)},n.prototype.toString=function(){return"Resolvable(token: "+w(this.token)+", requires: ["+this.deps.map(w)+"])"},n.prototype.clone=function(){return new n(this)},n.fromData=function(t,i){return new n(t,function(){return i},null,null,i)},n}(),ye=vu.when,ys=[ye.EAGER,ye.LAZY],cl=[ye.EAGER],pe="Native Injector",st=function(){function n(n){this._path=n}return n.prototype.getTokens=function(){return this._path.reduce(function(n,t){return n.concat(t.resolvables.map(function(n){return n.token}))},[]).reduce(ei,[])},n.prototype.getResolvable=function(n){var t=this._path.map(function(n){return n.resolvables}).reduce(c,[]).filter(function(t){return t.token===n});return d(t)},n.prototype.getPolicy=function(n){var t=this.findNode(n);return n.getPolicy(t.state)},n.prototype.subContext=function(t){return new n(ot.subPath(this._path,function(n){return n.state===t}))},n.prototype.addResolvables=function(n,t){var i=vt(this._path,pt("state",t)),r=n.map(function(n){return n.token});i.resolvables=i.resolvables.filter(function(n){return r.indexOf(n.token)===-1}).concat(n)},n.prototype.resolvePath=function(n,t){var r=this,f,e,i,o;return n===void 0&&(n="LAZY"),f=et(ys,n)?n:"LAZY",e=f===vu.when.EAGER?cl:ys,h.traceResolvePath(this._path,n,t),i=function(n,t){return function(i){return et(n,r.getPolicy(i)[t])}},o=this._path.reduce(function(n,u){var f=u.resolvables.filter(i(e,"when")),s=f.filter(i(["NOWAIT"],"async")),h=f.filter(wt(i(["NOWAIT"],"async"))),c=r.subContext(u.state),o=function(n){return n.get(c,t).then(function(t){return{token:n.token,value:t}})};return s.forEach(o),n.concat(h.map(o))},[]),u.$q.all(o)},n.prototype.injector=function(){return this._injector||(this._injector=new ll(this))},n.prototype.findNode=function(n){return vt(this._path,function(t){return et(t.resolvables,n)})},n.prototype.getDependencies=function(n){var t=this,i=this.findNode(n),r=ot.subPath(this._path,function(n){return n===i})||this._path,u=r.reduce(function(n,t){return n.concat(t.resolvables)},[]).filter(function(t){return t!==n}),f=function(n){var r=u.filter(function(t){return t.token===n}),i;if(r.length)return d(r);if(i=t.injector().getNative(n),at(i))throw new Error("Could not find Dependency Injection token: "+w(n));return new l(n,function(){return i},[],i)};return n.deps.map(f)},n}(),ll=function(){function n(n){this.context=n;this.native=this.get(pe)||u.$injector}return n.prototype.get=function(n){var t=this.context.getResolvable(n);if(t){if(this.context.getPolicy(t).async==="NOWAIT")return t.get(this.context);if(!t.resolved)throw new Error("Resolvable async .get() not complete:"+w(t.token));return t.data}return this.getNative(n)},n.prototype.getAsync=function(n){var t=this.context.getResolvable(n);return t?t.get(this.context):u.$q.when(this.native.get(n))},n.prototype.getNative=function(n){return this.native&&this.native.get(n)},n}(),al=function(n){if(!f(n))return!1;var t=n.charAt(0)==="^";return{val:t?n.substring(1):n,root:t}};var wl=function(n,t){return function(i){var r=i.self;r&&r.url&&r.name&&r.name.match(/\.\*\*$/)&&(r.url+="{remainder:any}");var e=i.parent,f=al(r.url),u=f?n.compile(f.val,{state:r}):r.url;if(!u)return null;if(!n.isMatcher(u))throw new Error("Invalid url '"+u+"' in state '"+i+"'");return f&&f.root?u:(e&&e.navigable||t()).url.append(u)}},bl=function(n){return function(t){return!n(t)&&t.url?t:t.parent?t.parent.navigable:null}},kl=function(n){return function(t){var r=function(i,r){return n.fromConfig(r,null,t.self)},i=t.url&&t.url.parameters({inherit:!1})||[],u=ct(nu(li(t.params||{},i.map(s("id"))),r));return i.concat(u).map(function(n){return[n.id,n]}).reduce(ai,{})}};var be=function(){function n(n,t){function f(t){return r(t)?null:n.find(u.parentName(t))||i()}this.matcher=n;var u=this,i=function(){return n.find("")},r=function(n){return n.name===""};this.builders={name:[vl],self:[yl],parent:[f],data:[pl],url:[wl(t,i)],navigable:[bl(r)],params:[kl(t.paramFactory)],views:[],path:[dl],includes:[gl],resolvables:[we]}}return n.prototype.builder=function(n,t){var i=this.builders,u=i[n]||[];return f(n)&&!r(t)?u.length>1?u:u[0]:!f(n)||!o(t)?void 0:(i[n]=u,i[n].push(t),function(){return i[n].splice(i[n].indexOf(t,1))&&null})},n.prototype.build=function(n){var r=this,e=r.matcher,i=r.builders,u=this.parentName(n),t,f;if(u&&!e.find(u,undefined,!1))return null;for(t in i)i.hasOwnProperty(t)&&(f=i[t].reduce(function(n,t){return function(i){return t(i,n)}},rt),n[t]=f(n));return n},n.prototype.parentName=function(n){var i=n.name||"",t=i.split("."),r=t.pop();if(r==="**"&&t.pop(),t.length){if(n.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+i+")");return t.join(".")}return n.parent?f(n.parent)?n.parent:n.parent.name:""},n.prototype.name=function(n){var t=n.name,i;return t.indexOf(".")!==-1||!n.parent?t:(i=f(n.parent)?n.parent:n.parent.name,i?i+"."+t:t)},n}(),pu=function(){function n(t){return n.create(t||{})}return n.create=function(t){t=n.isStateClass(t)?new t:t;var i=fi(fi(t,n.prototype));return t.$$state=function(){return i},i.self=t,i.__stateObjectCache={nameGlob:ir.fromString(i.name)},i},n.prototype.is=function(n){return this===n||this.self===n||this.fqn()===n},n.prototype.fqn=function(){if(!this.parent||!(this.parent instanceof this.constructor))return this.name;var n=this.parent.fqn();return n?n+"."+this.name:this.name},n.prototype.root=function(){return this.parent&&this.parent.root()||this},n.prototype.parameters=function(n){n=yt(n,{inherit:!0,matchingKeys:null});var t=n.inherit&&this.parent&&this.parent.parameters()||[];return t.concat(ct(this.params)).filter(function(t){return!n.matchingKeys||n.matchingKeys.hasOwnProperty(t.id)})},n.prototype.parameter=function(n,t){return t===void 0&&(t={}),this.url&&this.url.parameter(n,t)||vt(ct(this.params),pt("id",n))||t.inherit&&this.parent&&this.parent.parameter(n)},n.prototype.toString=function(){return this.fqn()},n.isStateClass=function(n){return o(n)&&n.__uiRouterState===!0},n.isState=function(n){return b(n.__stateObjectCache)},n}(),ke=function(){function n(n){this._states=n}return n.prototype.isRelative=function(n){return n=n||"",n.indexOf(".")===0||n.indexOf("^")===0},n.prototype.find=function(n,t,i){var u,r,e,s,o;return(i===void 0&&(i=!0),!n&&n!=="")?undefined:(u=f(n),r=u?n:n.name,this.isRelative(r)&&(r=this.resolvePath(r,t)),e=this._states[r],e&&(u||!u&&(e===n||e.self===n)))?e:u&&i?(s=ct(this._states),o=s.filter(function(n){return n.__stateObjectCache.nameGlob&&n.__stateObjectCache.nameGlob.matches(r)}),o.length>1&&console.log("stateMatcher.find: Found multiple matches for "+r+" using glob: ",o.map(function(n){return n.name})),o[0]):undefined},n.prototype.resolvePath=function(n,t){var e;if(!t)throw new Error("No reference point given for path '"+n+"'");for(var f=this.find(t),u=n.split("."),o=u.length,i=0,r=f;i<o;i++){if(u[i]===""&&i===0){r=f;continue}if(u[i]==="^"){if(!r.parent)throw new Error("Path '"+n+"' not valid for state '"+f.name+"'");r=r.parent;continue}break}return e=u.slice(i).join("."),r.name+(r.name&&e?".":"")+e},n}(),de=function(){function n(n,t,i,r,u){this.$registry=n;this.$urlRouter=t;this.states=i;this.builder=r;this.listeners=u;this.queue=[];this.matcher=n.matcher}return n.prototype.dispose=function(){this.queue=[]},n.prototype.register=function(n){var r=this.queue,i=pu.create(n),t=i.name;if(!f(t))throw new Error("State must have a valid name");if(this.states.hasOwnProperty(t)||et(r.map(s("name")),t))throw new Error("State '"+t+"' is already defined");return r.push(i),this.flush(),i},n.prototype.flush=function(){for(var u=this,f=this,i=f.queue,e=f.states,p=f.builder,o=[],s=[],l={},a=function(n){return u.states.hasOwnProperty(n)&&u.states[n]},v=function(){o.length&&u.listeners.forEach(function(n){return n("registered",o.map(function(n){return n.self}))})},h,c,y;i.length>0;){var n=i.shift(),t=n.name,w=p.build(n),r=s.indexOf(n);if(w){if(h=a(t),h&&h.name===t)throw new Error("State '"+t+"' is already defined");c=a(t+".**");c&&this.$registry.deregister(c);e[t]=n;this.attachRoute(n);r>=0&&s.splice(r,1);o.push(n);continue}if(y=l[t],l[t]=i.length,r>=0&&y===i.length)return i.push(n),v(),e;r<0&&s.push(n);i.push(n)}return v(),e},n.prototype.attachRoute=function(n){!n.abstract&&n.url&&this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(n))},n}(),ge=function(){function n(n){this._router=n;this.states={};this.listeners=[];this.matcher=new ke(this.states);this.builder=new be(this.matcher,n.urlMatcherFactory);this.stateQueue=new de(this,n.urlRouter,this.states,this.builder,this.listeners);this._registerRoot()}return n.prototype._registerRoot=function(){var n=this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0});n.navigable=null},n.prototype.dispose=function(){var n=this;this.stateQueue.dispose();this.listeners=[];this.get().forEach(function(t){return n.get(t)&&n.deregister(t)})},n.prototype.onStatesChanged=function(n){return this.listeners.push(n),function(){tt(this.listeners)(n)}.bind(this)},n.prototype.root=function(){return this._root},n.prototype.register=function(n){return this.stateQueue.register(n)},n.prototype._deregisterTree=function(n){var t=this,u=this.get().map(function(n){return n.$$state()}),i=function(n){var t=u.filter(function(t){return n.indexOf(t.parent)!==-1});return t.length===0?t:t.concat(i(t))},f=i([n]),r=[n].concat(f).reverse();return r.forEach(function(n){var i=t._router.urlRouter;i.rules().filter(pt("state",n)).forEach(i.removeRule.bind(i));delete t.states[n.name]}),r},n.prototype.deregister=function(n){var i=this.get(n),t;if(!i)throw new Error("Can't deregister state; not found: "+n);return t=this._deregisterTree(i.$$state()),this.listeners.forEach(function(n){return n("deregistered",t.map(function(n){return n.self}))}),t},n.prototype.get=function(n,t){var r=this,i;return arguments.length===0?Object.keys(this.states).map(function(n){return r.states[n].self}):(i=this.matcher.find(n,t),i&&i.self||null)},n.prototype.decorator=function(n,t){return this.builder.builder(n,t)},n}();(function(n){n[n.CREATE=0]="CREATE";n[n.BEFORE=1]="BEFORE";n[n.RUN=2]="RUN";n[n.SUCCESS=3]="SUCCESS";n[n.ERROR=4]="ERROR"})(n.TransitionHookPhase||(n.TransitionHookPhase={})),function(n){n[n.TRANSITION=0]="TRANSITION";n[n.STATE=1]="STATE"}(n.TransitionHookScope||(n.TransitionHookScope={}));ps={current:rt,transition:null,traceData:{},bind:null};ht=function(){function t(t,i,r,u){var f=this;this.transition=t;this.stateContext=i;this.registeredHook=r;this.options=u;this.isSuperseded=function(){return f.type.hookPhase===n.TransitionHookPhase.RUN&&!f.options.transition.isActive()};this.options=yt(u,ps);this.type=r.eventType}return t.chain=function(n,t){var i=function(n,t){return n.then(function(){return t.invokeHook()})};return n.reduce(i,t||u.$q.when())},t.invokeHooks=function(n,i){for(var u,f,r=0;r<n.length;r++)if(u=n[r].invokeHook(),ui(u))return f=n.slice(r+1),t.chain(f,u).then(i);return i()},t.runAllHooks=function(n){n.forEach(function(n){return n.invokeHook()})},t.prototype.logError=function(n){this.transition.router.stateService.defaultErrorHandler()(n)},t.prototype.invokeHook=function(){var t=this,n=this.registeredHook,r,u,i;if(!n._deregistered){if(r=this.getNotCurrentRejection(),r)return r;u=this.options;h.traceHookInvocation(this,this.transition,u);var o=function(){return n.callback.call(u.bind,t.transition,t.stateContext)},s=function(n){return y.normalize(n).toPromise()},f=function(i){return n.eventType.getErrorHandler(t)(i)},e=function(i){return n.eventType.getResultHandler(t)(i)};try{return i=o(),!this.type.synchronous&&ui(i)?i.catch(s).then(e,f):e(i)}catch(c){return f(y.normalize(c))}finally{n.invokeLimit&&++n.invokeCount>=n.invokeLimit&&n.deregister()}}},t.prototype.handleHookResult=function(n){var r=this,t=this.getNotCurrentRejection(),i;return t?t:ui(n)?n.then(function(n){return r.handleHookResult(n)}):(h.traceHookResult(n,this.transition,this.options),n===!1)?y.aborted("Hook aborted transition").toPromise():(i=nt(lt),i(n)?y.redirected(n).toPromise():void 0)},t.prototype.getNotCurrentRejection=function(){var n=this.transition.router;return n._disposed?y.aborted("UIRouter instance #"+n.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?y.aborted().toPromise():this.isSuperseded()?y.superseded(this.options.current()).toPromise():void 0},t.prototype.toString=function(){var t=this,n=t.options,i=t.registeredHook,r=g("traceData.hookType")(n)||"internal",u=g("traceData.context.state.name")(n)||g("traceData.context")(n)||"unknown",f=hu(i.callback);return r+" context: "+u+", "+oi(200,f)},t.HANDLE_RESULT=function(n){return function(t){return n.handleHookResult(t)}},t.LOG_REJECTED_RESULT=function(n){return function(t){return ui(t)&&t.catch(function(t){return n.logError(y.normalize(t))}),undefined}},t.LOG_ERROR=function(n){return function(t){return n.logError(t)}},t.REJECT_ERROR=function(){return function(n){return tr(n)}},t.THROW_ERROR=function(){return function(n){throw n;}},t}();wu=function(){function t(n,t,i,r,u,f){f===void 0&&(f={});this.tranSvc=n;this.eventType=t;this.callback=i;this.matchCriteria=r;this.removeHookFromRegistry=u;this.invokeCount=0;this._deregistered=!1;this.priority=f.priority||0;this.bind=f.bind||null;this.invokeLimit=f.invokeLimit}return t.prototype._matchingNodes=function(n,t){if(t===!0)return n;var i=n.filter(function(n){return sr(n.state,t)});return i.length?i:null},t.prototype._getDefaultMatchCriteria=function(){return nu(this.tranSvc._pluginapi._getPathTypes(),function(){return!0})},t.prototype._getMatchingNodes=function(t){var r=this,u=i(this._getDefaultMatchCriteria(),this.matchCriteria),f=ct(this.tranSvc._pluginapi._getPathTypes());return f.reduce(function(i,f){var o=f.scope===n.TransitionHookScope.STATE,e=t[f.name]||[],s=o?e:[d(e)];return i[f.name]=r._matchingNodes(s,u[f.name]),i},{})},t.prototype.matches=function(n){var t=this._getMatchingNodes(n),i=ct(t).every(k);return i?t:null},t.prototype.deregister=function(){this.removeHookFromRegistry(this);this._deregistered=!0},t}();ku=function(){function t(n){this.transition=n}return t.prototype.buildHooksForPhase=function(n){var t=this,i=this.transition.router.transitionService;return i._pluginapi._getEvents(n).map(function(n){return t.buildHooks(n)}).reduce(c,[]).filter(k)},t.prototype.buildHooks=function(t){var r=this.transition,u=r.treeChanges(),f=this.getMatchingHooks(t,u),e,o;return f?(e={transition:r,current:r.options().current},o=function(f){var o=f.matches(u),s=o[t.criteriaMatchPath.name];return s.map(function(u){var o=i({bind:f.bind,traceData:{hookType:t.name,context:u}},e),s=t.criteriaMatchPath.scope===n.TransitionHookScope.STATE?u.state.self:null,h=new ht(r,s,f,o);return{hook:f,node:u,transitionHook:h}})},f.map(o).reduce(c,[]).sort(na(t.reverseSort)).map(function(n){return n.transitionHook})):[]},t.prototype.getMatchingHooks=function(t,i){var u=t.hookPhase===n.TransitionHookPhase.CREATE,r=this.transition.router.transitionService,f=u?[r]:[this.transition,r];return f.map(function(n){return n.getHooks(t.name)}).filter(uu(e,"broken event named: "+t.name)).reduce(c,[]).filter(function(n){return n.matches(i)})},t}();du=s("self");vi=function(){function t(t,r,f){var e=this,o,s;if(this._deferred=u.$q.defer(),this.promise=this._deferred.promise,this._registeredHooks={},this._hookBuilder=new ku(this),this.isActive=function(){return e.router.globals.transition===e},this.router=f,this._targetState=r,!r.valid())throw new Error(r.error());this._options=i({current:v(this)},r.options());this.$id=f.transitionService._transitionCount++;o=ot.buildToPath(t,r);this._treeChanges=ot.treeChanges(t,o,this._options.reloadState);this.createTransitionHookRegFns();s=this._hookBuilder.buildHooksForPhase(n.TransitionHookPhase.CREATE);ht.invokeHooks(s,function(){return null});this.applyViewConfigs(f)}return t.prototype.onBefore=function(){return},t.prototype.onStart=function(){return},t.prototype.onExit=function(){return},t.prototype.onRetain=function(){return},t.prototype.onEnter=function(){return},t.prototype.onFinish=function(){return},t.prototype.onSuccess=function(){return},t.prototype.onError=function(){return},t.prototype.createTransitionHookRegFns=function(){var t=this;this.router.transitionService._pluginapi._getEvents().filter(function(t){return t.hookPhase!==n.TransitionHookPhase.CREATE}).forEach(function(n){return bu(t,t.router.transitionService,n)})},t.prototype.getHooks=function(n){return this._registeredHooks[n]},t.prototype.applyViewConfigs=function(n){var t=this._treeChanges.entering.map(function(n){return n.state});ot.applyViewConfigs(n.transitionService.$view,this._treeChanges.to,t)},t.prototype.$from=function(){return d(this._treeChanges.from).state},t.prototype.$to=function(){return d(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(n){return n instanceof t?this.is({to:n.$to().name,from:n.$from().name}):!(n.to&&!sr(this.$to(),n.to)||n.from&&!sr(this.$from(),n.from))},t.prototype.params=function(n){return n===void 0&&(n="to"),Object.freeze(this._treeChanges[n].map(s("paramValues")).reduce(ki,{}))},t.prototype.paramsChanged=function(){var t=this.params("from"),n=this.params("to"),i=[].concat(this._treeChanges.to).concat(this._treeChanges.from).map(function(n){return n.paramSchema}).reduce(gi,[]).reduce(ei,[]),r=it.changed(i,t,n);return r.reduce(function(t,i){return t[i.id]=n[i.id],t},{})},t.prototype.injector=function(n,t){t===void 0&&(t="to");var i=this._treeChanges[t];return n&&(i=ot.subPath(i,function(t){return t.state===n||t.state.name===n})),new st(i).injector()},t.prototype.getResolveTokens=function(n){return n===void 0&&(n="to"),new st(this._treeChanges[n]).getTokens()},t.prototype.addResolvable=function(n,t){t===void 0&&(t="");n=nt(l)(n)?n:new l(n);var r=typeof t=="string"?t:t.name,i=this._treeChanges.to,u=vt(i,function(n){return n.state.name===r}),f=new st(i);f.addResolvables([n],u.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.originalTransition=function(){var n=this.redirectedFrom();return n&&n.originalTransition()||this},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return ft(this._treeChanges.entering,s("state")).map(du)},t.prototype.exiting=function(){return ft(this._treeChanges.exiting,s("state")).map(du).reverse()},t.prototype.retained=function(){return ft(this._treeChanges.retained,s("state")).map(du)},t.prototype.views=function(n,t){n===void 0&&(n="entering");var i=this._treeChanges[n];return i=t?i.filter(pt("state",t)):i,i.map(s("views")).filter(k).reduce(c,[])},t.prototype.treeChanges=function(n){return n?this._treeChanges[n]:this._treeChanges},t.prototype.redirect=function(n){for(var o=1,r=this,t,u;(r=r.redirectedFrom())!=null;)if(++o>20)throw new Error("Too many consecutive Transition redirects (20+)");t={redirectedFrom:this,source:"redirect"};this.options().source==="url"&&n.options().location!==!1&&(t.location="replace");u=i({},this.options(),n.options(),t);n=n.withOptions(u,!0);var f=this.router.transitionService.create(this._treeChanges.from,n),e=this._treeChanges.entering,s=f._treeChanges.entering,h=function(n){return function(t){return n&&t.state.includes[n.name]}},c=ot.matching(s,e,ot.nonDynamicParams).filter(wt(h(n.options().reloadState)));return c.forEach(function(n,t){n.resolvables=e[t].resolvables}),f},t.prototype._changedParams=function(){var n=this._treeChanges,t;if(this._options.reload||n.exiting.length||n.entering.length||n.to.length!==n.from.length||(t=gt(n.to,n.from).map(function(n){return n[0].state!==n[1].state}).reduce(iu,!1),t))return undefined;var r=n.to.map(function(n){return n.paramSchema}),i=[n.to,n.from].map(function(n){return n.map(function(n){return n.paramValues})}),u=i[0],f=i[1],e=gt(r,u,f);return e.map(function(n){var t=n[0],i=n[1],r=n[2];return it.changed(t,i,r)}).reduce(c,[])},t.prototype.dynamic=function(){var n=this._changedParams();return n?n.map(function(n){return n.dynamic}).reduce(iu,!1):!1},t.prototype.ignored=function(){return!!this._ignoredReason()},t.prototype._ignoredReason=function(){var r=this.router.globals.transition,u=this._options.reloadState,t=function(n,t){if(n.length!==t.length)return!1;var i=ot.matching(n,t);return n.length===i.filter(function(n){return!u||!n.state.includes[u.name]}).length},n=this.treeChanges(),i=r&&r.treeChanges();return i&&t(i.to,n.to)&&t(i.exiting,n.exiting)?"SameAsPending":n.exiting.length===0&&n.entering.length===0&&t(n.from,n.to)?"SameAsCurrent":void 0},t.prototype.run=function(){var t=this,r=ht.runAllHooks,i=function(n){return t._hookBuilder.buildHooksForPhase(n)},f=function(){h.traceSuccess(t.$to(),t);t.success=!0;t._deferred.resolve(t.to());r(i(n.TransitionHookPhase.SUCCESS))},e=function(u){h.traceError(u,t);t.success=!1;t._deferred.reject(u);t._error=u;r(i(n.TransitionHookPhase.ERROR))},o=function(){var t=i(n.TransitionHookPhase.RUN),r=function(){return u.$q.when(undefined)};return ht.invokeHooks(t,r)},s=function(){var n=t.router.globals;return n.lastStartedTransitionId=t.$id,n.transition=t,n.transitionHistory.enqueue(t),h.traceTransitionStart(t),u.$q.when(undefined)},c=i(n.TransitionHookPhase.BEFORE);return ht.invokeHooks(c,s).then(o).then(f,e),this.promise},t.prototype.valid=function(){return!this.error()||this.success!==undefined},t.prototype.abort=function(){at(this.success)&&(this._aborted=!0)},t.prototype.error=function(){var n=this.$to(),r,u;if(n.self.abstract)return y.invalid("Cannot transition to abstract state '"+n.name+"'");var f=n.parameters(),t=this.params(),i=f.filter(function(n){return!n.validates(t[n.id])});return i.length?(r=i.map(function(n){return"["+n.id+":"+w(t[n.id])+"]"}).join(", "),u="The following parameter values are not valid for state '"+n.name+"': "+r,y.invalid(u)):this.success===!1?this._error:void 0},t.prototype.toString=function(){var n=this.from(),t=this.to(),i=function(n){return n["#"]!==null&&n["#"]!==undefined?n:li(n,["#"])},r=this.$id,u=b(n)?n.name:n,f=w(i(this._treeChanges.from.map(s("paramValues")).reduce(ki,{}))),e=this.valid()?"":"(X) ",o=b(t)?t.name:t,h=w(i(this.params()));return"Transition#"+r+"( '"+u+"'"+f+" -> "+e+"'"+o+"'"+h+" )"},t.diToken=t,t}();var ta=function(n,t,i){return n[t]=n[t]||i()},ia=ce("/"),ra={state:{params:{}},strict:!0,caseInsensitive:!0},ti=function(){function t(n,i,r,u){var a=this,h,l;this._cache={path:[this]};this._children=[];this._params=[];this._segments=[];this._compiled=[];this.config=u=yt(u,ra);this.pattern=n;for(var c=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,w=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,v=[],o=0,s,y=function(i){if(!t.nameValidator.test(i))throw new Error("Invalid parameter name '"+i+"' in pattern '"+n+"'");if(vt(a._params,pt("id",i)))throw new Error("Duplicate parameter name '"+i+"' in pattern '"+n+"'");},p=function(t,r){var f=t[2]||t[3],u=r?t[4]:t[4]||(t[1]==="*"?"[\\s\\S]*":null),e=function(n){return fi(i.type(r?"query":"path"),{pattern:new RegExp(n,a.config.caseInsensitive?"i":undefined)})};return{id:f,regexp:u,segment:n.substring(o,t.index),type:u?i.type(u)||e(u):null}},f,e;s=c.exec(n);){if(f=p(s,!1),f.segment.indexOf("?")>=0)break;y(f.id);this._params.push(r.fromPath(f.id,f.type,u.state));this._segments.push(f.segment);v.push([f.segment,d(this._params)]);o=c.lastIndex}if(e=n.substring(o),h=e.indexOf("?"),h>=0&&(l=e.substring(h),e=e.substring(0,h),l.length>0))for(o=0;s=w.exec(l);)f=p(s,!0),y(f.id),this._params.push(r.fromSearch(f.id,f.type,u.state)),o=c.lastIndex;this._segments.push(e);this._compiled=v.map(function(n){return ws.apply(null,n)}).concat(ws(e))}return t.encodeDashes=function(n){return encodeURIComponent(n).replace(/-/g,function(n){return"%5C%"+n.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var i=t._segments,u=t._params.filter(function(t){return t.location===n.DefType.PATH});return gt(i,u.concat(undefined)).reduce(c,[]).filter(function(n){return n!==""&&r(n)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===n.DefType.SEARCH})},t.compare=function(n,i){var l=function(n){return n._cache.segments=n._cache.segments||n._cache.path.map(t.pathSegmentsAndParams).reduce(c,[]).reduce(le,[]).map(function(n){return f(n)?ia(n):n}).reduce(c,[])},o=function(n){return n._cache.weights=n._cache.weights||l(n).map(function(n){return n==="/"?1:f(n)?2:n instanceof it?3:void 0})},a=function(n,t,i){for(var r=Math.max(n.length,t.length);n.length<r;)n.push(i);while(t.length<r)t.push(i)},s=o(n),h=o(i),u,e,r;for(a(s,h,0),u=gt(s,h),r=0;r<u.length;r++)if(e=u[r][0]-u[r][1],e!==0)return e;return 0},t.prototype.append=function(n){return this._children.push(n),n._cache={path:this._cache.path.concat(n),parent:this,pattern:null},n},t.prototype.isRoot=function(){return this._cache.path[0]===this},t.prototype.toString=function(){return this.pattern},t.prototype.exec=function(n,t,i,u){function b(n){var t=function(n){return n.split("").reverse().join("")},i=function(n){return n.replace(/\\-/g,"-")},r=t(n).split(/-(?!\\)/),u=ft(r,t);return ft(u,i).reverse()}var a=this,c,o,e,f,h;if(t===void 0&&(t={}),u===void 0&&(u={}),c=ta(this._cache,"pattern",function(){return new RegExp(["^",ru(a._cache.path.map(s("_compiled"))).join(""),a.config.strict===!1?"/?":"","$",].join(""),a.config.caseInsensitive?"i":undefined)}).exec(n),!c)return null;var v=this.parameters(),p=v.filter(function(n){return!n.isSearch()}),w=v.filter(function(n){return n.isSearch()}),y=this._cache.path.map(function(n){return n._segments.length-1}).reduce(function(n,t){return n+t}),l={};if(y!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(o=0;o<y;o++){for(e=p[o],f=c[o+1],h=0;h<e.replace.length;h++)e.replace[h].from===f&&(f=e.replace[h].to);f&&e.array===!0&&(f=b(f));r(f)&&(f=e.type.decode(f));l[e.id]=e.value(f)}return w.forEach(function(n){for(var i=t[n.id],u=0;u<n.replace.length;u++)n.replace[u].from===i&&(i=n.replace[u].to);r(i)&&(i=n.type.decode(i));l[n.id]=n.value(i)}),i&&(l["#"]=i),l},t.prototype.parameters=function(n){return(n===void 0&&(n={}),n.inherit===!1)?this._params:ru(this._cache.path.map(function(n){return n._params}))},t.prototype.parameter=function(n,t){var u=this,r,i;return t===void 0&&(t={}),r=function(){for(var r,t=0,i=u._params;t<i.length;t++)if(r=i[t],r.id===n)return r},i=this._cache.parent,r()||t.inherit!==!1&&i&&i.parameter(n,t)||null},t.prototype.validates=function(n){var i=function(n,t){return!n||n.validates(t)},t;return n=n||{},t=this.parameters().filter(function(t){return n.hasOwnProperty(t.id)}),t.map(function(t){return i(t,n[t.id])}).reduce(tu,!0)},t.prototype.format=function(n){function s(t){var i=t.value(n[t.id]),u=t.validates(i),r=t.isDefaultValue(i),f=r?t.squash:!1,e=t.type.encode(i);return{param:t,value:i,isValid:u,isDefaultValue:r,squash:f,encoded:e}}var h,i;n===void 0&&(n={});var r=this._cache.path,u=r.map(t.pathSegmentsAndParams).reduce(c,[]).map(function(n){return f(n)?n:s(n)}),o=r.map(t.queryParams).reduce(c,[]).map(s),l=function(n){return n.isValid===!1};return u.concat(o).filter(l).length?null:(h=u.reduce(function(n,i){if(f(i))return n+i;var u=i.squash,r=i.encoded,o=i.param;return u===!0?n.match(/\/$/)?n.slice(0,-1):n:f(u)?n+u:u!==!1?n:r==null?n:e(r)?n+ft(r,t.encodeDashes).join("-"):o.raw?n+r:n+encodeURIComponent(r)},""),i=o.map(function(n){var i=n.param,r=n.squash,t=n.encoded,u=n.isDefaultValue;if(t!=null&&(!u||r===!1))return(e(t)||(t=[t]),t.length===0)?void 0:(i.raw||(t=ft(t,encodeURIComponent)),t.map(function(n){return i.id+"="+n}))}).filter(k).reduce(c,[]).join("&"),h+(i?"?"+i:"")+(n["#"]?"#"+n["#"]:""))},t.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,t}(),ua=undefined&&undefined.__assign||Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},no=function(){function t(n){this.umf=n}return t.prototype.fromConfig=function(t,i,r){return new it(t,i,n.DefType.CONFIG,this.umf,r)},t.prototype.fromPath=function(t,i,r){return new it(t,i,n.DefType.PATH,this.umf,r)},t.prototype.fromSearch=function(t,i,r){return new it(t,i,n.DefType.SEARCH,this.umf,r)},t}(),to=function(){function n(){this.paramTypes=new er;this._isCaseInsensitive=!1;this._isStrictMode=!0;this._defaultSquashPolicy=!1;this.paramFactory=new no(this);i(this,{UrlMatcher:ti,Param:it})}return n.prototype.caseInsensitive=function(n){return this._isCaseInsensitive=r(n)?n:this._isCaseInsensitive},n.prototype.strictMode=function(n){return this._isStrictMode=r(n)?n:this._isStrictMode},n.prototype.defaultSquashPolicy=function(n){if(r(n)&&n!==!0&&n!==!1&&!f(n))throw new Error("Invalid squash policy: "+n+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=r(n)?n:this._defaultSquashPolicy},n.prototype.compile=function(n,t){var r=t&&!t.state&&t.params,u;return t=r?ua({state:{params:r}},t):t,u={strict:this._isStrictMode,caseInsensitive:this._isCaseInsensitive},new ti(n,this.paramTypes,this.paramFactory,i(u,t))},n.prototype.isMatcher=function(n){if(!b(n))return!1;var t=!0;return kt(ti.prototype,function(i,u){o(i)&&(t=t&&r(n[u])&&o(n[u]))}),t},n.prototype.type=function(n,t,i){var u=this.paramTypes.type(n,t,i);return r(t)?this:u},n.prototype.$get=function(){return this.paramTypes.enqueue=!1,this.paramTypes._flushTypeQueue(),this},n.prototype.dispose=function(){this.paramTypes.dispose()},n}(),gu=function(){function n(n){this.router=n}return n.prototype.compile=function(n){return this.router.urlMatcherFactory.compile(n)},n.prototype.create=function(n,t){var i=this,e=pu.isState,r=dt([[f,function(n){return r(i.compile(n))}],[nt(ti),function(n){return i.fromUrlMatcher(n,t)}],[e,function(n){return i.fromState(n,i.router)}],[nt(RegExp),function(n){return i.fromRegExp(n,t)}],[o,function(n){return new yi(n,t)}],]),u=r(n);if(!u)throw new Error("invalid 'what' in when()");return u},n.prototype.fromUrlMatcher=function(n,t){function e(t){var i=n.exec(t.path,t.search,t.hash);return n.validates(i)&&i}function o(t){var i=n.parameters().filter(function(n){return n.isOptional}),r;return i.length?(r=i.filter(function(n){return t[n.id]}),r.length/i.length):1e-6}var r=t,u;return f(t)&&(t=this.router.urlMatcherFactory.compile(t)),nt(ti)(t)&&(r=function(n){return t.format(n)}),u={urlMatcher:n,matchPriority:o,type:"URLMATCHER"},i(new yi(e,r),u)},n.prototype.fromState=function(n,t){var r=function(i){var r=t.stateService,u=t.globals;r.href(n,i)!==r.href(u.current,u.params)&&r.transitionTo(n,i,{inherit:!0,source:"url"})},u={state:n,type:"STATE"};return i(this.fromUrlMatcher(n.url,r),u)},n.prototype.fromRegExp=function(n,t){if(n.global||n.sticky)throw new Error("Rule RegExp must not be global or sticky");var r=function(n){return t.replace(/\$(\$|\d{1,2})/,function(t,i){return n[i==="$"?0:Number(i)]})},u=f(t)?r:t,e=function(t){return n.exec(t.path)},o={regexp:n,type:"REGEXP"};return i(new yi(e,u),o)},n.isUrlRule=function(n){return n&&["type","match","handler"].every(function(t){return r(n[t])})},n}(),yi=function(){function n(n,t){var i=this;this.match=n;this.type="RAW";this.matchPriority=function(){return 0-i.$id};this.handler=t||k}return n}();var ea=function(n,t){return(t.priority||0)-(n.priority||0)},oa=function(n,t){var i={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1};return(i[n.type]||0)-(i[t.type]||0)},sa=function(n,t){return!n.urlMatcher||!t.urlMatcher?0:ti.compare(n.urlMatcher,t.urlMatcher)},ha=function(n,t){var i={STATE:!0,URLMATCHER:!0},r=i[n.type]&&i[t.type];return r?0:(n.$id||0)-(t.$id||0)},bs;bs=function(n,t){var i=ea(n,t);return i!==0?i:(i=oa(n,t),i!==0)?i:(i=sa(n,t),i!==0)?i:ha(n,t)};nf=function(){function n(t){this._sortFn=bs;this._rules=[];this.interceptDeferred=!1;this._id=0;this._sorted=!1;this._router=t;this.urlRuleFactory=new gu(t);ut(v(n.prototype),this,v(this))}return n.prototype.dispose=function(){this.listen(!1);this._rules=[];delete this._otherwiseFn},n.prototype.sort=function(n){this._rules=this.stableSort(this._rules,this._sortFn=n||this._sortFn);this._sorted=!0},n.prototype.ensureSorted=function(){this._sorted||this.sort()},n.prototype.stableSort=function(n,t){var i=n.map(function(n,t){return{elem:n,idx:t}});return i.sort(function(n,i){var r=t(n.elem,i.elem);return r===0?n.idx-i.idx:r}),i.map(function(n){return n.elem})},n.prototype.match=function(n){var o=this,r,e,t,u,f;for(this.ensureSorted(),n=i({path:"",search:{},hash:""},n),r=this.rules(),this._otherwiseFn&&r.push(this._otherwiseFn),e=function(t){var i=t.match(n,o._router);return i&&{match:i,rule:t,weight:t.matchPriority(i)}},u=0;u<r.length;u++){if(t&&this._sortFn(r[u],t.rule)!==0)break;f=e(r[u]);t=!t||f&&f.weight>t.weight?f:t}return t},n.prototype.sync=function(n){if(!n||!n.defaultPrevented){var i=this._router,t=i.urlService,u=i.stateService,e={path:t.path(),search:t.search(),hash:t.hash()},r=this.match(e),o=dt([[f,function(n){return t.url(n,!0)}],[lt.isDef,function(n){return u.go(n.state,n.params,n.options)}],[nt(lt),function(n){return u.go(n.state(),n.params(),n.options())}],]);o(r&&r.rule.handler(r.match,e,i))}},n.prototype.listen=function(n){var t=this;if(n===!1)this._stopFn&&this._stopFn(),delete this._stopFn;else return this._stopFn=this._stopFn||this._router.urlService.onChange(function(n){return t.sync(n)})},n.prototype.update=function(n){var t=this._router.locationService;if(n){this.location=t.url();return}t.url()!==this.location&&t.url(this.location,!0)},n.prototype.push=function(n,t,i){var r=i&&!!i.replace;this._router.urlService.url(n.format(t||{}),r)},n.prototype.href=function(n,t,i){var r=n.format(t),u,f;if(r==null)return null;if(i=i||{absolute:!1},u=this._router.urlService.config,f=u.html5Mode(),f||r===null||(r="#"+u.hashPrefix()+r),r=fa(r,f,i.absolute,u.baseHref()),!i.absolute||!r)return r;var o=!f&&r?"/":"",e=u.port(),s=e===80||e===443?"":":"+e;return[u.protocol(),"://",u.host(),s,o,r].join("")},n.prototype.rule=function(n){var t=this;if(!gu.isUrlRule(n))throw new Error("invalid rule");return n.$id=this._id++,n.priority=n.priority||0,this._rules.push(n),this._sorted=!1,function(){return t.removeRule(n)}},n.prototype.removeRule=function(n){tt(this._rules,n)},n.prototype.rules=function(){return this.ensureSorted(),this._rules.slice()},n.prototype.otherwise=function(n){var t=ks(n);this._otherwiseFn=this.urlRuleFactory.create(v(!0),t);this._sorted=!1},n.prototype.initial=function(n){var t=ks(n),i=function(n,t){return t.globals.transitionHistory.size()===0&&!!/^\/?$/.exec(n.path)};this.rule(this.urlRuleFactory.create(i,t))},n.prototype.when=function(n,t,i){var u=this.urlRuleFactory.create(n,t);return r(i&&i.priority)&&(u.priority=i.priority),this.rule(u),u},n.prototype.deferIntercept=function(n){n===undefined&&(n=!0);this.interceptDeferred=n},n}();var tf=function(){function n(n){var t=this;this.router=n;this._uiViews=[];this._viewConfigs=[];this._viewConfigFactories={};this._listeners=[];this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIView:function(n){return vt(t._uiViews,function(i){return t.router.$id+"."+i.id===n})},_registeredUIViews:function(){return t._uiViews},_activeViewConfigs:function(){return t._viewConfigs},_onSync:function(n){return t._listeners.push(n),function(){return tt(t._listeners,n)}}}}return n.normalizeUIViewTarget=function(n,t){var o,s;t===void 0&&(t="");var u=t.split("@"),r=u[0]||"$default",i=f(u[1])?u[1]:"^",e=/^(\^(?:\.\^)*)\.(.*$)/.exec(r);return e&&(i=e[1],r=e[2]),r.charAt(0)==="!"&&(r=r.substr(1),i=""),o=/^(\^(?:\.\^)*)$/,o.exec(i)?(s=i.split(".").reduce(function(n){return n.parent},n),i=s.name):i==="."&&(i=n.name),{uiViewName:r,uiViewContextAnchor:i}},n.prototype._rootViewContext=function(n){return this._rootContext=n||this._rootContext},n.prototype._viewConfigFactory=function(n,t){this._viewConfigFactories[n]=t},n.prototype.createViewConfig=function(n,t){var r=this._viewConfigFactories[t.$type],i;if(!r)throw new Error("ViewService: No view config factory registered for type "+t.$type);return i=r(n,t),e(i)?i:[i]},n.prototype.deactivateViewConfig=function(n){h.traceViewServiceEvent("<- Removing",n);tt(this._viewConfigs,n)},n.prototype.activateViewConfig=function(n){h.traceViewServiceEvent("-> Registering",n);this._viewConfigs.push(n)},n.prototype.sync=function(){function e(n){var t=function(n){return n&&n.parent?t(n.parent)+1:1};return n.fqn.split(".").length*1e4+t(n.creationContext)}function o(n){for(var t=n.viewDecl.$context,i=0;++i&&t.parent;)t=t.parent;return i}var r=this,f=this._uiViews.map(function(n){return[n.fqn,n]}).reduce(ai,{}),u=ii(function(n,t,i,r){return t*(n(i)-n(r))}),s=function(t){var i=r._viewConfigs.filter(n.matches(f,t));return i.length>1&&i.sort(u(o,-1)),{uiView:t,viewConfig:i[0]}},c=function(n){r._uiViews.indexOf(n.uiView)!==-1&&n.uiView.configUpdated(n.viewConfig)},t=this._uiViews.sort(u(e,1)).map(s),l=t.map(function(n){return n.viewConfig}),a=this._viewConfigs.filter(function(n){return!et(l,n)}).map(function(n){return{uiView:undefined,viewConfig:n}}),i;t.forEach(c);i=t.concat(a);this._listeners.forEach(function(n){return n(i)});h.traceViewSync(i)},n.prototype.registerUIView=function(n){h.traceViewServiceUIViewEvent("-> Registering",n);var t=this._uiViews,i=function(t){return t.fqn===n.fqn&&t.$type===n.$type};return t.filter(i).length&&h.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",n),t.push(n),this.sync(),function(){var i=t.indexOf(n);if(i===-1){h.traceViewServiceUIViewEvent("Tried removing non-registered uiView",n);return}h.traceViewServiceUIViewEvent("<- Deregistering",n);tt(t)(n)}},n.prototype.available=function(){return this._uiViews.map(s("fqn"))},n.prototype.active=function(){return this._uiViews.filter(s("$config")).map(s("name"))},n.matches=function(n,t){return function(i){if(t.$type!==i.viewDecl.$type)return!1;var u=i.viewDecl,r=u.$uiViewName.split("."),f=t.fqn.split(".");if(!bi(r,f.slice(0-r.length)))return!1;var o=1-r.length||undefined,s=f.slice(0,o).join("."),e=n[s].creationContext;return u.$uiViewContextAnchor===(e&&e.name)}},n}(),io=function(){function n(){this.params=new ve;this.lastStartedTransitionId=-1;this.transitionHistory=new rr([],1);this.successfulTransitions=new rr([],1)}return n.prototype.dispose=function(){this.transitionHistory.clear();this.successfulTransitions.clear();this.transition=null},n}(),ds=function(n){return n.reduce(function(n,t){return n[t]=wf(t),n},{dispose:rt})},gs=["url","path","search","hash","onChange"],nh=["port","protocol","host","baseHref","html5Mode","hashPrefix"],ca=["type","caseInsensitive","strictMode","defaultSquashPolicy"],la=["sort","when","initial","otherwise","rules","rule","removeRule"],aa=["deferIntercept","listen","sync","match"],hr=function(){function n(n,t){var r,u,f,i;t===void 0&&(t=!0);this.router=n;this.rules={};this.config={};r=function(){return n.locationService};ut(r,this,r,gs,t);u=function(){return n.locationConfig};ut(u,this.config,u,nh,t);f=function(){return n.urlMatcherFactory};ut(f,this.config,f,ca);i=function(){return n.urlRouter};ut(i,this.rules,i,la);ut(i,this,i,aa)}return n.prototype.url=function(){return},n.prototype.path=function(){return},n.prototype.search=function(){return},n.prototype.hash=function(){return},n.prototype.onChange=function(){return},n.prototype.parts=function(){return{path:this.path(),search:this.search(),hash:this.hash()}},n.prototype.dispose=function(){},n.prototype.sync=function(){return},n.prototype.listen=function(){return},n.prototype.deferIntercept=function(){return},n.prototype.match=function(){return},n.locationServiceStub=ds(gs),n.locationConfigStub=ds(nh),n}(),va=0,rf=function(){function n(n,t){n===void 0&&(n=hr.locationServiceStub);t===void 0&&(t=hr.locationConfigStub);this.locationService=n;this.locationConfig=t;this.$id=va++;this._disposed=!1;this._disposables=[];this.trace=h;this.viewService=new tf(this);this.globals=new io;this.transitionService=new fo(this);this.urlMatcherFactory=new to;this.urlRouter=new nf(this);this.stateRegistry=new ge(this);this.stateService=new eo(this);this.urlService=new hr(this);this._plugins={};this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());this.globals.$current=this.stateRegistry.root();this.globals.current=this.globals.$current.self;this.disposable(this.globals);this.disposable(this.stateService);this.disposable(this.stateRegistry);this.disposable(this.transitionService);this.disposable(this.urlRouter);this.disposable(n);this.disposable(t)}return n.prototype.disposable=function(n){this._disposables.push(n)},n.prototype.dispose=function(n){var t=this;if(n&&o(n.dispose))return n.dispose(this),undefined;this._disposed=!0;this._disposables.slice().forEach(function(n){try{typeof n.dispose=="function"&&n.dispose(t);tt(t._disposables,n)}catch(i){}})},n.prototype.plugin=function(n,t){t===void 0&&(t={});var i=new n(this,t);if(!i.name)throw new Error("Required property `name` missing on plugin: "+i);return this._disposables.push(i),this._plugins[i.name]=i},n.prototype.getPlugin=function(n){return n?this._plugins[n]:ct(this._plugins)},n}();var pa=function(n){return n.onCreate({},ya)},wa=["$transition$",vi],ba=et(wa),ka=function(n){var t=ct(n.treeChanges()).reduce(c,[]).reduce(ei,[]),i=function(n){return ba(n.token)?l.fromData(n.token,null):n};t.forEach(function(n){n.resolvables=n.resolvables.map(i)})},da=function(n){function r(t){if(t)return t instanceof lt?t:f(t)?i.target(t,n.params(),n.options()):t.state||t.params?i.target(t.state||n.to(),t.params||n.params(),n.options()):void 0}var t=n.to().redirectTo,i;if(t)return(i=n.router.stateService,o(t))?u.$q.when(t(n)).then(r):r(t)},ga=function(n){return n.onStart({to:function(n){return!!n.redirectTo}},da)};var nv=ro("onExit"),tv=function(n){return n.onExit({exiting:function(n){return!!n.onExit}},nv)},iv=ro("onRetain"),rv=function(n){return n.onRetain({retained:function(n){return!!n.onRetain}},iv)},uv=ro("onEnter"),fv=function(n){return n.onEnter({entering:function(n){return!!n.onEnter}},uv)},uo=1e3,ev=function(n){return new st(n.treeChanges().to).resolvePath("EAGER",n).then(rt)},ov=function(n){return n.onStart({},ev,{priority:uo})},sv=function(n,t){return new st(n.treeChanges().to).subContext(t.$$state()).resolvePath("LAZY",n).then(rt)},hv=function(n){return n.onEnter({entering:v(!0)},sv,{priority:uo})},cv=function(n){return new st(n.treeChanges().to).resolvePath("LAZY",n).then(rt)},lv=function(n){return n.onFinish({},cv,{priority:uo})},av=function(n){var t=u.$q,i=n.views("entering");if(i.length)return t.all(i.map(function(n){return t.when(n.load())})).then(rt)},vv=function(n){return n.onFinish({},av)},yv=function(n){var i=n.views("entering"),r=n.views("exiting"),t;(i.length||r.length)&&(t=n.router.viewService,r.forEach(function(n){return t.deactivateViewConfig(n)}),i.forEach(function(n){return t.activateViewConfig(n)}),t.sync())},pv=function(n){return n.onSuccess({},yv)},wv=function(n){var t=n.router.globals,r=function(){t.successfulTransitions.enqueue(n);t.$current=n.$to();t.current=t.$current.self;ue(n.params(),t.params)},i=function(){t.transition===n&&(t.transition=null)};n.onSuccess({},r,{priority:1e4});n.promise.then(i,i)},bv=function(n){return n.onCreate({},wv)},kv=function(n){var t=n.options(),i=n.router.stateService,r=n.router.urlRouter,u;t.source!=="url"&&t.location&&i.$current.navigable&&(u={replace:t.location==="replace"},r.push(i.$current.navigable.url,i.params,u));r.update(!0)},dv=function(n){return n.onSuccess({},kv,{priority:9999})},gv=function(n){function i(){var i,e,o;if(n.originalTransition().options().source!=="url")return i=n.targetState(),t.stateService.target(i.identifier(),i.params(),i.options());var f=t.urlService,r=f.match(f.parts()),u=r&&r.rule;if(u&&u.type==="STATE")return e=u.state,o=r.match,t.stateService.target(e,o,n.options());t.urlService.sync()}var t=n.router,r=n.entering().filter(function(n){return!!n.$$state().lazyLoad}).map(function(t){return th(n,t)});return u.$q.all(r).then(i)},ny=function(n){return n.onBefore({entering:function(n){return!!n.lazyLoad}},gv)};uf=function(){function n(n,t,i,r,u,f,e,o){u===void 0&&(u=!1);f===void 0&&(f=ht.HANDLE_RESULT);e===void 0&&(e=ht.REJECT_ERROR);o===void 0&&(o=!1);this.name=n;this.hookPhase=t;this.hookOrder=i;this.criteriaMatchPath=r;this.reverseSort=u;this.getResultHandler=f;this.getErrorHandler=e;this.synchronous=o}return n}();ih=function(n){return n.onBefore({},ty,{priority:-9999})};var ry=function(n){return n.onBefore({},iy,{priority:-1e4})},ff={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},fo=function(){function t(n){this._transitionCount=0;this._eventTypes=[];this._registeredHooks={};this._criteriaPaths={};this._router=n;this.$view=n.viewService;this._deregisterHookFns={};this._pluginapi=ut(v(this),{},v(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks",]);this._defineCorePaths();this._defineCoreEvents();this._registerCoreTransitionHooks();n.globals.successfulTransitions.onEvict(ka)}return t.prototype.onCreate=function(){return},t.prototype.onBefore=function(){return},t.prototype.onStart=function(){return},t.prototype.onExit=function(){return},t.prototype.onRetain=function(){return},t.prototype.onEnter=function(){return},t.prototype.onFinish=function(){return},t.prototype.onSuccess=function(){return},t.prototype.onError=function(){return},t.prototype.dispose=function(){ct(this._registeredHooks).forEach(function(n){return n.forEach(function(t){t._deregistered=!0;tt(n,t)})})},t.prototype.create=function(n,t){return new vi(n,t,this._router)},t.prototype._defineCoreEvents=function(){var t=n.TransitionHookPhase,r=ht,i=this._criteriaPaths,u=!1,f=!0;this._defineEvent("onCreate",t.CREATE,0,i.to,u,r.LOG_REJECTED_RESULT,r.THROW_ERROR,f);this._defineEvent("onBefore",t.BEFORE,0,i.to);this._defineEvent("onStart",t.RUN,0,i.to);this._defineEvent("onExit",t.RUN,100,i.exiting,!0);this._defineEvent("onRetain",t.RUN,200,i.retained);this._defineEvent("onEnter",t.RUN,300,i.entering);this._defineEvent("onFinish",t.RUN,400,i.to);this._defineEvent("onSuccess",t.SUCCESS,0,i.to,u,r.LOG_REJECTED_RESULT,r.LOG_ERROR,f);this._defineEvent("onError",t.ERROR,0,i.to,u,r.LOG_REJECTED_RESULT,r.LOG_ERROR,f)},t.prototype._defineCorePaths=function(){var t=n.TransitionHookScope.STATE,i=n.TransitionHookScope.TRANSITION;this._definePathType("to",i);this._definePathType("from",i);this._definePathType("exiting",t);this._definePathType("retained",t);this._definePathType("entering",t)},t.prototype._defineEvent=function(n,t,i,r,u,f,e,o){u===void 0&&(u=!1);f===void 0&&(f=ht.HANDLE_RESULT);e===void 0&&(e=ht.REJECT_ERROR);o===void 0&&(o=!1);var s=new uf(n,t,i,r,u,f,e,o);this._eventTypes.push(s);bu(this,this,s)},t.prototype._getEvents=function(n){var t=r(n)?this._eventTypes.filter(function(t){return t.hookPhase===n}):this._eventTypes.slice();return t.sort(function(n,t){var i=n.hookPhase-t.hookPhase;return i===0?n.hookOrder-t.hookOrder:i})},t.prototype._definePathType=function(n,t){this._criteriaPaths[n]={name:n,scope:t}},t.prototype._getPathTypes=function(){return this._criteriaPaths},t.prototype.getHooks=function(n){return this._registeredHooks[n]},t.prototype._registerCoreTransitionHooks=function(){var n=this._deregisterHookFns;n.addCoreResolves=pa(this);n.ignored=ih(this);n.invalid=ry(this);n.redirectTo=ga(this);n.onExit=tv(this);n.onRetain=rv(this);n.onEnter=fv(this);n.eagerResolve=ov(this);n.lazyResolve=hv(this);n.resolveAll=lv(this);n.loadViews=vv(this);n.activateViews=pv(this);n.updateGlobals=bv(this);n.updateUrl=dv(this);n.lazyLoad=ny(this)},t}(),eo=function(){function t(n){this.router=n;this.invalidCallbacks=[];this._defaultErrorHandler=function(n){n instanceof Error&&n.stack?(console.error(n),console.error(n.stack)):n instanceof y?(console.error(n.toString()),n.detail&&n.detail.stack&&console.error(n.detail.stack)):console.error(n)};var i=Object.keys(t.prototype).filter(wt(et(["current","$current","params","transition"])));ut(v(t.prototype),this,v(this),i)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.defaultErrorHandler(rt);this.invalidCallbacks=[]},t.prototype._handleInvalidTargetState=function(n,t){function f(){var n=h.dequeue(),i;return n===undefined?y.invalid(t.error()).toPromise():(i=u.$q.when(n(t,e,c)),i.then(l).then(function(n){return n||f()}))}var i=this,e=ot.makeTargetState(this.router.stateRegistry,n),o=this.router.globals,r=function(){return o.transitionHistory.peekTail()},s=r(),h=new rr(this.invalidCallbacks.slice()),c=new st(n).injector(),l=function(n){if(n instanceof lt){var t=n;return(t=i.target(t.identifier(),t.params(),t.options()),!t.valid())?y.invalid(t.error()).toPromise():r()!==s?y.superseded().toPromise():i.transitionTo(t.identifier(),t.params(),t.options())}};return f()},t.prototype.onInvalid=function(n){return this.invalidCallbacks.push(n),function(){tt(this.invalidCallbacks)(n)}.bind(this)},t.prototype.reload=function(n){return this.transitionTo(this.current,this.params,{reload:r(n)?n:!0,inherit:!1,notify:!1})},t.prototype.go=function(n,t,i){var r={relative:this.$current,inherit:!0},u=yt(i,r,ff);return this.transitionTo(n,t,u)},t.prototype.target=function(n,t,i){if(i===void 0&&(i={}),b(i.reload)&&!i.reload.name)throw new Error("Invalid reload state object");var r=this.router.stateRegistry;if(i.reloadState=i.reload===!0?r.root():r.matcher.find(i.reload,i.relative),i.reload&&!i.reloadState)throw new Error("No such reload state '"+(f(i.reload)?i.reload:i.reload.name)+"'");return new lt(this.router.stateRegistry,n,t,i)},t.prototype.getCurrentPath=function(){var t=this,i=this.router.globals,n=i.successfulTransitions.peekTail(),r=function(){return[new or(t.router.stateRegistry.root())]};return n?n.treeChanges().to:r()},t.prototype.transitionTo=function(t,r,f){var p=this,o,s,l,e,h;if(r===void 0&&(r={}),f===void 0&&(f={}),o=this.router,s=o.globals,f=yt(f,ff),l=function(){return s.transition},f=i(f,{current:l}),e=this.target(t,r,f),h=this.getCurrentPath(),!e.exists())return this._handleInvalidTargetState(h,e);if(!e.valid())return tr(e.error());var a=function(t){return function(i){var r,f,e,h;if(i instanceof y){if(r=o.globals.lastStartedTransitionId===t.$id,i.type===n.RejectType.IGNORED)return r&&o.urlRouter.update(),u.$q.when(s.current);if(f=i.detail,i.type===n.RejectType.SUPERSEDED&&i.redirected&&f instanceof lt)return e=t.redirect(f),e.run().catch(a(e));if(i.type===n.RejectType.ABORTED)return r&&o.urlRouter.update(),u.$q.reject(i)}return h=p.defaultErrorHandler(),h(i),u.$q.reject(i)}},c=this.router.transitionService.create(h,e),v=c.run().catch(a(c));return eu(v),i(v,{transition:c})},t.prototype.is=function(n,t,i){var u,f;return(i=yt(i,{relative:this.$current}),u=this.router.stateRegistry.matcher.find(n,i.relative),!r(u))?undefined:this.$current!==u?!1:t?(f=u.parameters({inherit:!0,matchingKeys:t}),it.equals(f,it.values(f,t),this.params)):!0},t.prototype.includes=function(n,t,i){var e,u,s,o;if(i=yt(i,{relative:this.$current}),e=f(n)&&ir.fromString(n),e){if(!e.matches(this.$current.name))return!1;n=this.$current.name}return(u=this.router.stateRegistry.matcher.find(n,i.relative),s=this.$current.includes,!r(u))?undefined:r(s[u.name])?t?(o=u.parameters({inherit:!0,matchingKeys:t}),it.equals(o,it.values(o,t),this.params)):!0:!1},t.prototype.href=function(n,t,i){var e={lossy:!0,inherit:!0,absolute:!1,relative:this.$current},u,f;return(i=yt(i,e),t=t||{},u=this.router.stateRegistry.matcher.find(n,i.relative),!r(u))?null:(i.inherit&&(t=this.params.$inherit(t,this.$current,u)),f=u&&i.lossy?u.navigable:u,!f||f.url===undefined||f.url===null)?null:this.router.urlRouter.href(f.url,t,{absolute:i.absolute})},t.prototype.defaultErrorHandler=function(n){return this._defaultErrorHandler=n||this._defaultErrorHandler},t.prototype.get=function(n,t){var i=this.router.stateRegistry;return arguments.length===0?i.get():i.get(n,t||this.$current)},t.prototype.lazyLoad=function(n,t){var i=this.get(n),r,u;if(!i||!i.lazyLoad)throw new Error("Can not lazy load "+n);return r=this.getCurrentPath(),u=ot.makeTargetState(this.router.stateRegistry,r),t=t||this.router.transitionService.create(r,u),th(t,i)},t}(),cr={when:function(n){return new Promise(function(t){return t(n)})},reject:function(n){return new Promise(function(t,i){i(n)})},defer:function(){var n={};return n.promise=new Promise(function(t,i){n.resolve=t;n.reject=i}),n},all:function(n){if(e(n))return Promise.all(n);if(b(n)){var t=Object.keys(n).map(function(t){return n[t].then(function(n){return{key:t,val:n}})});return cr.all(t).then(function(n){return n.reduce(function(n,t){return n[t.key]=t.val,n},{})})}}},rh={},uy=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,fy=/([^\s,]+)/g,pi={get:function(n){return rh[n]},has:function(n){return pi.get(n)!=null},invoke:function(n,t,r){var u=i({},rh,r||{}),e=pi.annotate(n),s=uu(function(n){return u.hasOwnProperty(n)},function(n){return"DI can't find injectable: '"+n+"'"}),f=e.filter(s).map(function(n){return u[n]});return o(n)?n.apply(t,f):n.slice(-1)[0].apply(t,f)},annotate:function(n){if(!hi(n))throw new Error("Not an injectable function: "+n);if(n&&n.$inject)return n.$inject;if(e(n))return n.slice(0,-1);var t=n.toString().replace(uy,""),i=t.slice(t.indexOf("(")+1,t.indexOf(")")).match(fy);return i||[]}},oo=function(n,t){var i=t[0],r=t[1];return n.hasOwnProperty(i)?e(n[i])?n[i].push(r):n[i]=[n[i],r]:n[i]=r,n},so=function(n){return n.split("&").filter(k).map(se).reduce(oo,{})};ef=function(n){var u=n.path(),t=n.search(),i=n.hash(),r=Object.keys(t).map(function(n){var i=t[n],r=e(i)?i:[i];return r.map(function(t){return n+"="+t})}).reduce(c,[]).join("&");return u+(r?"?"+r:"")+(i?"#"+i:"")};var vr=function(){function n(n,t){var i=this;this.fireAfterUpdate=t;this._listeners=[];this._listener=function(n){return i._listeners.forEach(function(t){return t(n)})};this.hash=function(){return lr(i._get()).hash};this.path=function(){return lr(i._get()).path};this.search=function(){return so(lr(i._get()).search)};this._location=bt.location;this._history=bt.history}return n.prototype.url=function(n,t){return t===void 0&&(t=!0),r(n)&&n!==this._get()&&(this._set(null,null,n,t),this.fireAfterUpdate&&this._listeners.forEach(function(t){return t({url:n})})),ef(this)},n.prototype.onChange=function(n){var t=this;return this._listeners.push(n),function(){return tt(t._listeners,n)}},n.prototype.dispose=function(){ie(this._listeners)},n}(),ey=undefined&&undefined.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),ho=function(n){function t(t){var i=n.call(this,t,!1)||this;return bt.addEventListener("hashchange",i._listener,!1),i}return ey(t,n),t.prototype._get=function(){return he(this._location.hash)},t.prototype._set=function(n,t,i){this._location.hash=i},t.prototype.dispose=function(t){n.prototype.dispose.call(this,t);bt.removeEventListener("hashchange",this._listener)},t}(vr),oy=undefined&&undefined.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),co=function(n){function t(t){return n.call(this,t,!0)||this}return oy(t,n),t.prototype._get=function(){return this._url},t.prototype._set=function(n,t,i){this._url=i},t}(vr),sy=undefined&&undefined.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),lo=function(n){function t(t){var i=n.call(this,t,!0)||this;return i._config=t.urlService.config,bt.addEventListener("popstate",i._listener,!1),i}return sy(t,n),t.prototype._getBasePrefix=function(){return cu(this._config.baseHref())},t.prototype._get=function(){var r=this._location,n=r.pathname,t=r.hash,i=r.search;i=au(i)[1];t=lu(t)[1];var u=this._getBasePrefix(),f=n===this._config.baseHref(),e=n.substr(0,u.length)===u;return n=f?"/":e?n.substring(u.length):n,n+(i?"?"+i:"")+(t?"#"+t:"")},t.prototype._set=function(n,t,i,r){var f=this._getBasePrefix(),e=i&&i[0]!=="/"?"/":"",u=i===""||i==="/"?this._config.baseHref():f+e+i;r?this._history.replaceState(n,t,u):this._history.pushState(n,t,u)},t.prototype.dispose=function(t){n.prototype.dispose.call(this,t);bt.removeEventListener("popstate",this._listener)},t}(vr),ao=function(){function n(){var n=this;this.dispose=rt;this._baseHref="";this._port=80;this._protocol="http";this._host="localhost";this._hashPrefix="";this.port=function(){return n._port};this.protocol=function(){return n._protocol};this.host=function(){return n._host};this.baseHref=function(){return n._baseHref};this.html5Mode=function(){return!1};this.hashPrefix=function(t){return r(t)?n._hashPrefix=t:n._hashPrefix}}return n}(),of=function(){function n(n,t){t===void 0&&(t=!1);this._isHtml5=t;this._baseHref=undefined;this._hashPrefix=""}return n.prototype.port=function(){return location.port?Number(location.port):this.protocol()==="https"?443:80},n.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},n.prototype.host=function(){return location.hostname},n.prototype.html5Mode=function(){return this._isHtml5},n.prototype.hashPrefix=function(n){return r(n)?this._hashPrefix=n:this._hashPrefix},n.prototype.baseHref=function(n){return r(n)&&(this._baseHref=n),at(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},n.prototype.getBaseHref=function(){var n=document.getElementsByTagName("base")[0];return!n||!n.href?location.pathname||"/":n.href.replace(/^(https?:)?\/\/[^/]*/,"")},n.prototype.dispose=function(){},n}();var fh=ar("vanilla.hashBangLocation",!1,ho,of),eh=ar("vanilla.pushStateLocation",!0,lo,of),oh=ar("vanilla.memoryLocation",!1,co,ao),sh=function(){function n(){}return n.prototype.dispose=function(){},n}(),hy=Object.freeze({root:bt,fromJson:bf,toJson:kf,forEach:kt,extend:i,equals:bi,identity:k,noop:rt,createProxyFunctions:ut,inherit:fi,inArray:et,_inArray:df,removeFrom:tt,_removeFrom:gf,pushTo:ne,_pushTo:te,deregAll:ie,defaults:yt,mergeR:ki,ancestors:re,pick:ci,omit:li,pluck:ts,filter:di,find:vt,mapObj:nu,map:ft,values:ct,allTrueR:tu,anyTrueR:iu,unnestR:c,flattenR:gi,pushR:nr,uniqR:ei,unnest:ru,flatten:is,assertPredicate:uu,assertMap:rs,assertFn:fu,pairs:us,arrayTuples:gt,applyPairs:ai,tail:d,copy:ue,_extend:fe,silenceUncaughtInPromise:eu,silentRejection:tr,notImplemented:wf,services:u,Glob:ir,curry:ii,compose:lf,pipe:ri,prop:s,propEq:pt,parse:g,not:wt,and:af,or:vf,all:si,any:yf,is:nt,eq:ko,val:v,invoke:go,pattern:dt,isUndefined:at,isDefined:r,isNull:wr,isNullOrUndefined:br,isFunction:o,isNumber:pf,isString:f,isObject:b,isArray:e,isDate:kr,isRegExp:dr,isInjectable:hi,isPromise:ui,Queue:rr,maxLength:oi,padString:oe,kebobString:ou,functionToString:su,fnToString:hu,stringify:w,beforeAfterSubstr:ur,hostRegex:es,stripLastPathElement:cu,splitHash:lu,splitQuery:au,splitEqual:se,trimHashVal:he,splitOnDelim:ce,joinNeighborsR:le,get Category(){return n.Category},Trace:ae,trace:h,get DefType(){return n.DefType},Param:it,ParamTypes:er,StateParams:ve,ParamType:fr,PathNode:or,PathUtils:ot,resolvePolicies:vu,defaultResolvePolicy:yu,Resolvable:l,NATIVE_INJECTOR_TOKEN:pe,ResolveContext:st,resolvablesBuilder:we,StateBuilder:be,StateObject:pu,StateMatcher:ke,StateQueueManager:de,StateRegistry:ge,StateService:eo,TargetState:lt,get TransitionHookPhase(){return n.TransitionHookPhase},get TransitionHookScope(){return n.TransitionHookScope},HookBuilder:ku,matchState:sr,RegisteredHook:wu,makeEvent:bu,get RejectType(){return n.RejectType},Rejection:y,Transition:vi,TransitionHook:ht,TransitionEventType:uf,defaultTransOpts:ff,TransitionService:fo,UrlMatcher:ti,ParamFactory:no,UrlMatcherFactory:to,UrlRouter:nf,UrlRuleFactory:gu,BaseUrlRule:yi,UrlService:hr,ViewService:tf,UIRouterGlobals:io,UIRouter:rf,$q:cr,$injector:pi,BaseLocationServices:vr,HashLocationService:ho,MemoryLocationService:co,PushStateLocationService:lo,MemoryLocationConfig:ao,BrowserLocationConfig:of,keyValsToObjectR:oo,getParams:so,parseUrl:lr,buildUrl:ef,locationPluginFactory:ar,servicesPlugin:uh,hashLocationPlugin:fh,pushStateLocationPlugin:eh,memoryLocationPlugin:oh,UIRouterPluginBase:sh});sf=function(n,t){return n.reduce(function(n,i){return n||r(t[i])},!1)};var cy=0,vo=function(){function n(n,t,i){var r=this;this.path=n;this.viewDecl=t;this.factory=i;this.$id=cy++;this.loaded=!1;this.getTemplate=function(n,t){return r.component?r.factory.makeComponentTemplate(n,t,r.component,r.viewDecl.bindings):r.template}}return n.prototype.load=function(){var n=this,t=u.$q,r=new st(this.path),f=this.path.reduce(function(n,t){return i(n,t.paramValues)},{}),e={template:t.when(this.factory.fromConfig(this.viewDecl,f,r)),controller:t.when(this.getController(r))};return t.all(e).then(function(t){return h.traceViewServiceEvent("Loaded",n),n.controller=t.controller,i(n,t.template),n})},n.prototype.getController=function(n){var t=this.viewDecl.controllerProvider;if(!hi(t))return this.viewDecl.controller;var i=u.$injector.annotate(t),r=e(t)?d(t):t,f=new l("",r,i);return f.get(n)},n}(),ly=function(){function n(){var n=this;this._useHttp=p.version.minor<3;this.$get=["$http","$templateCache","$injector",function(t,i,r){return n.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),n.$http=t,n.$templateCache=i,n},]}return n.prototype.useHttpService=function(n){this._useHttp=n},n.prototype.fromConfig=function(n,t,i){var f=function(n){return u.$q.when(n).then(function(n){return{template:n}})},e=function(n){return u.$q.when(n).then(function(n){return{component:n}})};return r(n.template)?f(this.fromString(n.template,t)):r(n.templateUrl)?f(this.fromUrl(n.templateUrl,t)):r(n.templateProvider)?f(this.fromProvider(n.templateProvider,t,i)):r(n.component)?e(n.component):r(n.componentProvider)?e(this.fromComponentProvider(n.componentProvider,t,i)):f("<ui-view><\/ui-view>")},n.prototype.fromString=function(n,t){return o(n)?n(t):n},n.prototype.fromUrl=function(n,t){return(o(n)&&(n=n(t)),n==null)?null:this._useHttp?this.$http.get(n,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(n){return n.data}):this.$templateRequest(n)},n.prototype.fromProvider=function(n,t,i){var r=u.$injector.annotate(n),f=e(n)?d(n):n,o=new l("",f,r);return o.get(i)},n.prototype.fromComponentProvider=function(n,t,i){var r=u.$injector.annotate(n),f=e(n)?d(n):n,o=new l("",f,r);return o.get(i)},n.prototype.makeComponentTemplate=function(n,t,i,r){r=r||{};var f=p.version.minor>=3?"::":"",o=function(n){var t=ou(n);return/^(x|data)-/.exec(t)?"x-"+t:t},h=function(i){var c=i.name,a=i.type,s=o(c),h;if(n.attr(s)&&!r[c])return s+"='"+n.attr(s)+"'";if(h=r[c]||c,a==="@")return s+"='{{"+f+"$resolve."+h+"}}'";if(a==="&"){var v=t.getResolvable(h),l=v&&v.data,y=l&&u.$injector.annotate(l)||[],p=e(l)?"["+(l.length-1)+"]":"";return s+"='$resolve."+h+p+"("+y.join(",")+")'"}return s+"='"+f+"$resolve."+h+"'"},c=ay(i).map(h).join(" "),s=o(i);return"<"+s+" "+c+"><\/"+s+">"},n}();var vy=function(n){return b(n.bindToController)?lh(n.bindToController):lh(n.scope)},lh=function(n){return Object.keys(n||{}).map(function(t){return[t,/^([=<@&])[?]?(.*)/.exec(n[t])]}).filter(function(n){return r(n)&&e(n[1])}).map(function(n){return{name:n[1][2]||n[0],type:n[1][1]}})},ah=function(){function n(t,i){this.stateRegistry=t;this.stateService=i;ut(v(n.prototype),this,v(this))}return n.prototype.decorator=function(n,t){return this.stateRegistry.decorator(n,t)||this},n.prototype.state=function(n,t){return b(n)?t=n:t.name=n,this.stateRegistry.register(t),this},n.prototype.onInvalid=function(n){return this.stateService.onInvalid(n)},n}(),yo=function(n){return function(t){function e(n,t){var e=new st(n.treeChanges(f)),o=e.subContext(t.$$state()),s=i(cf(o),{$state$:t,$transition$:n});return u.$injector.invoke(r,this,s)}var r=t[n],f=n==="onExit"?"from":"to";return r?e:undefined}},vh=function(){function n(n){this._urlListeners=[];this.$locationProvider=n;var t=v(n);ut(t,this,t,["hashPrefix"])}return n.monkeyPatchPathParameterType=function(n){var t=n.urlMatcherFactory.type("path");t.encode=function(n){return n!=null?n.toString().replace(/(~|\/)/g,function(n){return{"~":"~~","/":"~2F"}[n]}):n};t.decode=function(n){return n!=null?n.toString().replace(/(~~|~2F)/g,function(n){return{"~~":"~","~2F":"/"}[n]}):n}},n.prototype.dispose=function(){},n.prototype.onChange=function(n){var t=this;return this._urlListeners.push(n),function(){return tt(t._urlListeners)(n)}},n.prototype.html5Mode=function(){var n=this.$locationProvider.html5Mode();return n=b(n)?n.enabled:n,n&&this.$sniffer.history},n.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},n.prototype.url=function(n,t,i){return t===void 0&&(t=!1),r(n)&&this.$location.url(n),t&&this.$location.replace(),i&&this.$location.state(i),this.$location.url()},n.prototype._runtimeServices=function(n,t,i,r,u){var e=this,f;this.$location=t;this.$sniffer=i;this.$browser=r;this.$window=u;n.$on("$locationChangeSuccess",function(n){return e._urlListeners.forEach(function(t){return t(n)})});f=v(t);ut(f,this,f,["replace","path","search","hash"]);ut(f,this,f,["port","protocol","host"])},n}(),yh=function(){function n(n){this._router=n;this._urlRouter=n.urlRouter}return n.injectableHandler=function(n,t){return function(i){return u.$injector.invoke(t,null,{$match:i,$stateParams:n.globals.params})}},n.prototype.$get=function(){var n=this._urlRouter;return n.update(!0),n.interceptDeferred||n.listen(),n},n.prototype.rule=function(n){var r=this,t,i;if(!o(n))throw new Error("'rule' must be a function");return t=function(){return n(u.$injector,r._router.locationService)},i=new yi(t,k),this._urlRouter.rule(i),this},n.prototype.otherwise=function(n){var i=this,t=this._urlRouter;if(f(n))t.otherwise(n);else if(o(n))t.otherwise(function(){return n(u.$injector,i._router.locationService)});else throw new Error("'rule' must be a string or function");return this},n.prototype.when=function(t,i){return(e(i)||o(i))&&(i=n.injectableHandler(this._router,i)),this._urlRouter.when(t,i),this},n.prototype.deferIntercept=function(n){this._urlRouter.deferIntercept(n)},n}();p.module("ui.router.angular1",[]);var ph=p.module("ui.router.init",["ng"]),hf=p.module("ui.router.util",["ui.router.init"]),wh=p.module("ui.router.router",["ui.router.util"]),wi=p.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),po=p.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),wy=p.module("ui.router.compat",["ui.router"]),a=null;bh.$inject=["$locationProvider"];yr=function(n){return["$uiRouterProvider",function(t){var i=t.router[n];return i.$get=function(){return i},i},]};kh.$inject=["$injector","$q","$uiRouter"];dh=function(n){return n.urlRouterProvider=new yh(n)};gh=function(){return i(a.stateProvider,{$get:function(){return a.stateService}})};wo.$inject=["$rootScope"];ph.provider("$uiRouter",bh);wh.provider("$urlRouter",["$uiRouterProvider",dh]);hf.provider("$urlService",yr("urlService"));hf.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return a.urlMatcherFactory}]);hf.provider("$templateFactory",function(){return new ly});wi.provider("$stateRegistry",yr("stateRegistry"));wi.provider("$uiRouterGlobals",yr("globals"));wi.provider("$transitions",yr("transitionService"));wi.provider("$state",["$uiRouterProvider",gh]);wi.factory("$stateParams",["$uiRouter",function(n){return n.globals.params}]);po.factory("$view",function(){return a.viewService});po.service("$trace",function(){return h});po.run(wo);hf.run(["$urlMatcherFactory",function(){}]);wi.run(["$state",function(){}]);wh.run(["$urlRouter",function(){}]);ph.run(kh);cf=function(n){var t=n.getTokens().filter(f),i=t.map(function(t){var i=n.getResolvable(t),r=n.getPolicy(i).async;return[t,r==="NOWAIT"?i.promise:i.data]});return i.reduce(ai,{})};ec=["$uiRouter","$timeout",function(n,t){var r=n.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(u,f,e,o){function c(){var n=p();a&&a();v&&(a=v.$$addStateInfo(n.uiState,n.uiStateParams));n.href!=null&&e.$set(l.attr,n.href)}var l=rc(f),v=o[1]||o[0],a=null,y,s={},p=function(){return ic(r,f,s)},h=nc(e.uiSref);(s.uiState=h.state,s.uiStateOpts=e.uiSrefOpts?u.$eval(e.uiSrefOpts):{},h.paramExpr&&(u.$watch(h.paramExpr,function(n){s.uiStateParams=i({},n);c()},!0),s.uiStateParams=i({},u.$eval(h.paramExpr))),c(),u.$on("$destroy",n.stateRegistry.onStatesChanged(c)),u.$on("$destroy",n.transitionService.onSuccess({},c)),l.clickable)&&(y=uc(f,r,t,l,p),fc(f,u,y,s.uiStateOpts))}}},];oc=["$uiRouter","$timeout",function(n,t){var i=n.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,u,f,e){function s(){var n=v();c&&c();l&&(c=l.$$addStateInfo(n.uiState,n.uiStateParams));n.href!=null&&f.$set(h.attr,n.href)}var h=rc(u),l=e[1]||e[0],c=null,a,o={},v=function(){return ic(i,u,o)},y=["uiState","uiStateParams","uiStateOpts"],p=y.reduce(function(n,t){return n[t]=rt,n},{});(y.forEach(function(n){o[n]=f[n]?r.$eval(f[n]):null;f.$observe(n,function(t){p[n]();p[n]=r.$watch(t,function(t){o[n]=t;s()},!0)})}),s(),r.$on("$destroy",n.stateRegistry.onStatesChanged(s)),r.$on("$destroy",n.transitionService.onSuccess({},s)),h.clickable)&&(a=uc(u,i,t,h,v),fc(u,r,a,o.uiStateOpts))}}},];bo=["$state","$stateParams","$interpolate","$uiRouter",function(n,t,i,r){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,u,o){function v(n){n.promise.then(l,rt)}function w(){var n=r.stateRegistry.onStatesChanged(d),i=r.transitionService.onStart({},v),u=t.$on("$stateChangeSuccess",l);return function(){n();i();u()}}function d(){y(h)}function y(n){b(n)&&(s=[],kt(n,function(n,i){var r=function(n,i){var r=nc(n);p(r.state,t.$eval(r.paramExpr),i)};f(n)?r(n,i):e(n)&&kt(n,function(n){r(n,i)})}))}function p(t,i,r){var e=n.get(t,tc(u)),f={state:e||{name:t},params:i,activeClass:r};return s.push(f),function(){tt(s)(f)}}function l(){var i=function(n){return n.split(/\s/).filter(k)},r=function(n){return n.map(function(n){return n.activeClass}).map(i).reduce(c,[])},e=r(s).concat(i(a)).reduce(ei,[]),o=r(s.filter(function(t){return n.includes(t.state.name,t.params)})),h=!!s.filter(function(t){return n.is(t.state.name,t.params)}).length,l=h?i(a):[],f=o.concat(l).reduce(ei,[]),v=e.filter(function(n){return!et(f,n)});t.$evalAsync(function(){f.forEach(function(n){return u.addClass(n)});v.forEach(function(n){return u.removeClass(n)})})}var s=[],a,h;a=i(o.uiSrefActiveEq||"",!1)(t);try{h=t.$eval(o.uiSrefActive)}catch(g){}h=h||i(o.uiSrefActive||"",!1)(t);y(h);this.$$addStateInfo=function(n,t){if(!b(h)||!(s.length>0)){var i=p(n,t,h);return l(),i}};t.$on("$destroy",w());r.globals.transition&&v(r.globals.transition);l()},]}},];p.module("ui.router.state").directive("uiSref",ec).directive("uiSrefActive",bo).directive("uiSrefActiveEq",bo).directive("uiState",oc);sc.$inject=["$state"];hc.$inject=["$state"];p.module("ui.router.state").filter("isState",sc).filter("includedByState",hc);cc=["$view","$animate","$uiViewScroll","$interpolate","$q",function(n,t,i,u,f){function o(){return{enter:function(n,i,r){p.version.minor>2?t.enter(n,null,i).then(r):t.enter(n,null,i,r)},leave:function(n,i){p.version.minor>2?t.leave(n).then(i):t.leave(n,i)}}}function s(n,t){return n===t}var c={$cfg:{viewDecl:{$context:n._pluginapi._rootViewContext()}},$uiView:{}},e={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(t,l,a){return function(t,l,v){function et(n){(!n||n instanceof vo)&&(s(tt,n)||(h.traceUIViewConfigUpdated(p,n&&n.viewDecl&&n.viewDecl.$context),tt=n,ut(n)))}function ot(){if(w&&(h.traceUIViewEvent("Removing (previous) el",w.data("$uiView")),w.remove(),w=null),y&&(h.traceUIViewEvent("Destroying scope",p),y.$destroy(),y=null),b){var n=b.data("$uiViewAnim");h.traceUIViewEvent("Animate out",n);it.leave(b,function(){n.$$animLeave.resolve();w=null});w=b;b=null}}function ut(n){var u=t.$new(),e=f.defer(),o=f.defer(),h={$cfg:n,$uiView:p},c={$animEnter:e.promise,$animLeave:o.promise,$$animLeave:o},s;u.$emit("$viewContentLoading",d);s=a(u,function(n){n.data("$uiViewAnim",c);n.data("$uiView",h);it.enter(n,l,function(){e.resolve();y&&y.$emit("$viewContentAnimationEnded");(r(nt)&&!nt||t.$eval(nt))&&i(n)});ot()});b=s;y=u;y.$emit("$viewContentLoaded",n||tt);y.$eval(ft)}var ft=v.onload||"",nt=v.autoscroll,it=o(v,t),k=l.inheritedData("$uiView")||c,d=u(v.uiView||v.name||"")(t)||"$default",w,b,y,tt,rt,p={$type:"ng1",id:e.count++,name:d,fqn:k.$uiView.fqn?k.$uiView.fqn+"."+d:d,config:null,configUpdated:et,get creationContext(){var n=g("$cfg.viewDecl.$context")(k),t=g("$uiView.creationContext")(k);return n||t}};h.traceUIViewEvent("Linking",p);l.data("$uiView",{$uiView:p});ut();rt=n.registerUIView(p);t.$on("$destroy",function(){h.traceUIViewEvent("Destroying/Unregistering",p);rt()})}}};return e},];lc.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];ac=typeof p.module("ui.router").component=="function";vc=0;p.module("ui.router.state").directive("uiView",cc);p.module("ui.router.state").directive("uiView",lc);p.module("ui.router.state").provider("$uiViewScroll",py);pc="ui.router";n.default=pc;n.core=hy;n.watchDigests=wo;n.getLocals=cf;n.getNg1ViewConfigFactory=hh;n.ng1ViewsBuilder=ch;n.Ng1ViewConfig=vo;n.StateProvider=ah;n.UrlRouterProvider=yh;n.root=bt;n.fromJson=bf;n.toJson=kf;n.forEach=kt;n.extend=i;n.equals=bi;n.identity=k;n.noop=rt;n.createProxyFunctions=ut;n.inherit=fi;n.inArray=et;n._inArray=df;n.removeFrom=tt;n._removeFrom=gf;n.pushTo=ne;n._pushTo=te;n.deregAll=ie;n.defaults=yt;n.mergeR=ki;n.ancestors=re;n.pick=ci;n.omit=li;n.pluck=ts;n.filter=di;n.find=vt;n.mapObj=nu;n.map=ft;n.values=ct;n.allTrueR=tu;n.anyTrueR=iu;n.unnestR=c;n.flattenR=gi;n.pushR=nr;n.uniqR=ei;n.unnest=ru;n.flatten=is;n.assertPredicate=uu;n.assertMap=rs;n.assertFn=fu;n.pairs=us;n.arrayTuples=gt;n.applyPairs=ai;n.tail=d;n.copy=ue;n._extend=fe;n.silenceUncaughtInPromise=eu;n.silentRejection=tr;n.notImplemented=wf;n.services=u;n.Glob=ir;n.curry=ii;n.compose=lf;n.pipe=ri;n.prop=s;n.propEq=pt;n.parse=g;n.not=wt;n.and=af;n.or=vf;n.all=si;n.any=yf;n.is=nt;n.eq=ko;n.val=v;n.invoke=go;n.pattern=dt;n.isUndefined=at;n.isDefined=r;n.isNull=wr;n.isNullOrUndefined=br;n.isFunction=o;n.isNumber=pf;n.isString=f;n.isObject=b;n.isArray=e;n.isDate=kr;n.isRegExp=dr;n.isInjectable=hi;n.isPromise=ui;n.Queue=rr;n.maxLength=oi;n.padString=oe;n.kebobString=ou;n.functionToString=su;n.fnToString=hu;n.stringify=w;n.beforeAfterSubstr=ur;n.hostRegex=es;n.stripLastPathElement=cu;n.splitHash=lu;n.splitQuery=au;n.splitEqual=se;n.trimHashVal=he;n.splitOnDelim=ce;n.joinNeighborsR=le;n.Trace=ae;n.trace=h;n.Param=it;n.ParamTypes=er;n.StateParams=ve;n.ParamType=fr;n.PathNode=or;n.PathUtils=ot;n.resolvePolicies=vu;n.defaultResolvePolicy=yu;n.Resolvable=l;n.NATIVE_INJECTOR_TOKEN=pe;n.ResolveContext=st;n.resolvablesBuilder=we;n.StateBuilder=be;n.StateObject=pu;n.StateMatcher=ke;n.StateQueueManager=de;n.StateRegistry=ge;n.StateService=eo;n.TargetState=lt;n.HookBuilder=ku;n.matchState=sr;n.RegisteredHook=wu;n.makeEvent=bu;n.Rejection=y;n.Transition=vi;n.TransitionHook=ht;n.TransitionEventType=uf;n.defaultTransOpts=ff;n.TransitionService=fo;n.UrlMatcher=ti;n.ParamFactory=no;n.UrlMatcherFactory=to;n.UrlRouter=nf;n.UrlRuleFactory=gu;n.BaseUrlRule=yi;n.UrlService=hr;n.ViewService=tf;n.UIRouterGlobals=io;n.UIRouter=rf;n.$q=cr;n.$injector=pi;n.BaseLocationServices=vr;n.HashLocationService=ho;n.MemoryLocationService=co;n.PushStateLocationService=lo;n.MemoryLocationConfig=ao;n.BrowserLocationConfig=of;n.keyValsToObjectR=oo;n.getParams=so;n.parseUrl=lr;n.buildUrl=ef;n.locationPluginFactory=ar;n.servicesPlugin=uh;n.hashLocationPlugin=fh;n.pushStateLocationPlugin=eh;n.memoryLocationPlugin=oh;n.UIRouterPluginBase=sh;Object.defineProperty(n,"__esModule",{value:!0})}),function(n,t){"use strict";function si(n,t,i){if(!n)throw gi("areq","Argument '{0}' is {1}",t||"?",i||"required");return n}function hi(n,t){return!n&&!t?"":n?t?(c(n)&&(n=n.join(" ")),c(t)&&(t=t.join(" ")),n+" "+t):n:t}function nr(n){var t={};return n&&(n.to||n.from)&&(t.to=n.to,t.from=n.from),t}function h(n,t,r){var u="";return n=c(n)?n:n&&o(n)&&n.length?n.split(/\s+/):[],i(n,function(n,i){n&&n.length>0&&(u+=i>0?" ":"",u+=r?t+n:n+t)}),u}function tr(n,t){var i=n.indexOf(t);t>=0&&n.splice(i,1)}function ci(n){if(n instanceof r)switch(n.length){case 0:return n;case 1:if(n[0].nodeType===b)return n;break;default:return r(vt(n))}if(n.nodeType===b)return r(n)}function vt(n){var t,i;if(!n[0])return n;for(t=0;t<n.length;t++)if(i=n[t],i.nodeType===b)return i}function ir(n,t,r){i(t,function(t){n.addClass(t,r)})}function rr(n,t,r){i(t,function(t){n.removeClass(t,r)})}function k(n){return function(t,i){i.addClass&&(ir(n,t,i.addClass),i.addClass=null);i.removeClass&&(rr(n,t,i.removeClass),i.removeClass=null)}}function d(n){if(n=n||{},!n.$$prepared){var t=n.domOperation||f;n.domOperation=function(){n.$$domOperationFired=!0;t();t=f};n.$$prepared=!0}return n}function y(n,t){li(n,t);ai(n,t)}function li(n,t){t.from&&(n.css(t.from),t.from=null)}function ai(n,t){t.to&&(n.css(t.to),t.to=null)}function g(n,t,i){var r=t.options||{},u=i.options||{},s=(r.addClass||"")+" "+(u.addClass||""),h=(r.removeClass||"")+" "+(u.removeClass||""),e=ur(n.attr("class"),s,h),o;return u.preparationClasses&&(r.preparationClasses=tt(u.preparationClasses,r.preparationClasses),delete u.preparationClasses),o=r.domOperation!==f?r.domOperation:null,dt(r,u),o&&(r.domOperation=o),r.addClass=e.addClass?e.addClass:null,r.removeClass=e.removeClass?e.removeClass:null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function ur(n,t,r){function s(n){o(n)&&(n=n.split(" "));var t={};return i(n,function(n){n.length&&(t[n]=!0)}),t}var e=1,h=-1,f={},u;return n=s(n),t=s(t),i(t,function(n,t){f[t]=e}),r=s(r),i(r,function(n,t){f[t]=f[t]===e?null:h}),u={addClass:"",removeClass:""},i(f,function(t,i){var r,f;t===e?(r="addClass",f=!n[i]||n[i+et]):t===h&&(r="removeClass",f=n[i]||n[i+ft]);f&&(u[r].length&&(u[r]+=" "),u[r]+=i)}),u}function u(n){return n instanceof r?n[0]:n}function fr(n,t,i,r){var u="";i&&(u=h(i,ti,!0));r.addClass&&(u=tt(u,h(r.addClass,ft)));r.removeClass&&(u=tt(u,h(r.removeClass,et)));u.length&&(r.preparationClasses=u,t.addClass(u))}function er(n,t){t.preparationClasses&&(n.removeClass(t.preparationClasses),t.preparationClasses=null);t.activeClasses&&(n.removeClass(t.activeClasses),t.activeClasses=null)}function nt(n,t){var i=t?"-"+t+"s":"";return p(n,[v,i]),[v,i]}function yt(n,t){var i=t?"paused":"",r=s+ki;return p(n,[r,i]),[r,i]}function p(n,t){var i=t[0],r=t[1];n.style[i]=r}function tt(n,t){return n?t?n+" "+t:n:t}function vr(n){return[at,n+"s"]}function pt(n,t){var i=t?lt:v;return[i,n+"s"]}function vi(n,t,r){var u=Object.create(null),f=n.getComputedStyle(t)||{};return i(r,function(n,t){var i=f[n],r;i&&(r=i.charAt(0),(r==="-"||r==="+"||r>=0)&&(i=yr(i)),i===0&&(i=null),u[t]=i)}),u}function yr(n){var t=0,r=n.split(/\s*,\s*/);return i(r,function(n){n.charAt(n.length-1)==="s"&&(n=n.substring(0,n.length-1));n=parseFloat(n)||0;t=t?Math.max(n,t):n}),t}function wt(n){return n===0||n!=null}function yi(n,t){var i=e,r=n+"s";return t?i+=ct:r+=" linear all",[i,r]}function pi(n,t,r){i(r,function(i){n[i]=gt(n[i])?n[i]:t.style.getPropertyValue(i)})}var b=1,ft="-add",et="-remove",ti="ng-",wi="-active",bi="-prepare",ii="ng-animate",ot="$$ngAnimateChildren",ri="",e,st,s,ht;n.ontransitionend===undefined&&n.onwebkittransitionend!==undefined?(ri="-webkit-",e="WebkitTransition",st="webkitTransitionEnd transitionend"):(e="transition",st="transitionend");n.onanimationend===undefined&&n.onwebkitanimationend!==undefined?(ri="-webkit-",s="WebkitAnimation",ht="webkitAnimationEnd animationend"):(s="animation",ht="animationend");var ct="Duration",ui="Property",fi="Delay",ei="TimingFunction",ki="PlayState",di=9999,lt=s+fi,at=s+ct,v=e+fi,oi=e+ct,gi=t.$$minErr("ng");var or=["$$rAF",function(n){function r(n){i=i.concat(n);u()}function u(){var f,r;if(i.length){for(f=i.shift(),r=0;r<f.length;r++)f[r]();t||n(function(){t||u()})}}var i,t;return i=r.queue=[],r.waitUntilQuiet=function(i){t&&t();t=n(function(){t=null;i();u()})},r}],sr=["$interpolate",function(n){return{link:function(t,i,r){function f(n){n=n==="on"||n==="true";i.data(ot,n)}var u=r.ngAnimateChildren;o(u)&&u.length===0?i.data(ot,!0):(f(n(u)(t)),r.$observe("ngAnimateChildren",f))}}}],l="$$animateCss",w=1e3,hr=3,cr=1.5,lr={transitionDuration:oi,transitionDelay:v,transitionProperty:e+ui,animationDuration:at,animationDelay:lt,animationIterationCount:s+"IterationCount"},ar={transitionDuration:oi,transitionDelay:v,animationDuration:at,animationDelay:lt};var pr=["$animateProvider",function(){this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$animateCache","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(n,t,r,o,a,v,b,g,tt){function ct(t,i,r,u,f){var e=a.get(r),o;return e||(e=vi(n,t,f),e.animationIterationCount==="infinite"&&(e.animationIterationCount=1)),o=u||e.transitionDuration>0||e.animationDuration>0,a.put(r,e,o),e}function lt(i,r,u,f){var e,s="stagger-"+u,o;return a.count(u)>0&&(e=a.get(s),e||(o=h(r,"-stagger"),t.addClass(i,o),e=vi(n,i,f),e.animationDuration=Math.max(e.animationDuration,0),e.transitionDuration=Math.max(e.transitionDuration,0),t.removeClass(i,o),a.put(s,e,!0))),e||{}}function ut(n){it.push(n);g.waitUntilQuiet(function(){var t,n;for(a.flush(),t=v(),n=0;n<it.length;n++)it[n](t);it.length=0})}function ot(n,t,i,r){var u=ct(n,t,i,r,lr),f=u.animationDelay,e=u.transitionDelay;return u.maxDelay=f&&e?Math.max(f,e):f||e,u.maxDuration=Math.max(u.animationDuration*u.animationIterationCount,u.transitionDuration),u}var rt=k(t),it=[];return function(n,v){function or(){ni()}function uu(){ni(!0)}function ni(r){if(!ki&&(!sr||!ri)){ki=!0;ri=!1;bt&&!k.$$skipPreparationClasses&&t.removeClass(n,bt);er&&t.removeClass(n,er);yt(it,!1);nt(it,!1);i(at,function(n){it.style[n[0]]=""});rt(n,k);y(n,k);Object.keys(bi).length&&i(bi,function(n,t){n?it.style.setProperty(t,n):it.style.removeProperty(t)});k.onDone&&k.onDone();fi&&fi.length&&n.off(fi.join(" "),eu);var u=n.data(l);u&&(o.cancel(u[0].timer),n.removeData(l));hi&&hi.complete(!r)}}function fu(n){g.blockTransition&&nt(it,n);g.blockKeyframeAnimation&&yt(it,!!n)}function gi(){return hi=new r({end:or,cancel:uu}),ut(f),ni(),{$$willAnimate:!1,start:function(){return hi},end:or}}function eu(n){var t,i,r;(n.stopPropagation(),t=n.originalEvent||n,t.target===it)&&(i=t.$manualTimeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(hr)),Math.max(i-yr,0)>=rr&&r>=vt&&(sr=!0,ni()))}function hu(){function f(){var r,f,v,b;if(!ki){if(fu(!1),i(at,function(n){var t=n[0],i=n[1];it.style[t]=i}),rt(n,k),t.addClass(n,er),g.recalculateTimingStyles){if(wr=it.getAttribute("class")+" "+bt,si=a.cacheKey(it,vi,k.addClass,k.removeClass),ct=ot(it,wr,si,!1),gt=ct.maxDelay,ci=Math.max(gt,0),vt=ct.maxDuration,vt===0){ni();return}g.hasTransitions=ct.transitionDuration>0;g.hasAnimations=ct.animationDuration>0}g.applyAnimationDelay&&(gt=typeof k.delay!="boolean"&&wt(k.delay)?parseFloat(k.delay):gt,ci=Math.max(gt,0),ct.animationDelay=gt,ii=pt(gt,!0),at.push(ii),it.style[ii[0]]=ii[1]);rr=ci*w;lr=vt*w;k.easing&&(f=k.easing,g.hasTransitions&&(r=e+ei,at.push([r,f]),it.style[r]=f),g.hasAnimations&&(r=s+ei,at.push([r,f]),it.style[r]=f));ct.transitionDuration&&fi.push(st);ct.animationDuration&&fi.push(ht);yr=Date.now();var y=rr+cr*lr,p=yr+y,u=n.data(l)||[],c=!0;if(u.length&&(v=u[0],c=p>v.expectedEndTime,c?o.cancel(v.timer):u.push(ni)),c&&(b=o(h,y,!1),u[0]={timer:b,expectedEndTime:p},u.push(ni),n.data(l,u)),fi.length)n.on(fi.join(" "),eu);k.to&&(k.cleanupStyles&&pi(bi,it,Object.keys(k.to)),ai(n,k))}}function h(){var i=n.data(l),t;if(i){for(t=1;t<i.length;t++)i[t]();n.removeData(l)}}if(!ki){if(!it.parentNode){ni();return}var r=function(n){if(sr)ri&&n&&(ri=!1,ni());else if(ri=!n,ct.animationDuration){var t=yt(it,ri);ri?at.push(t):tr(at,t)}},u=fr>0&&(ct.transitionDuration&&dt.transitionDuration===0||ct.animationDuration&&dt.animationDuration===0)&&Math.max(dt.animationDelay,dt.transitionDelay);u?o(f,Math.floor(u*fr*w),!1):f();ir.resume=function(){r(!0)};ir.pause=function(){r(!1)}}}var k=v||{},bi,it,dt,si,br,ur,kr,dr,gr,fr,nu,ct,gt,g,er,ii;if(k.$$prepared||(k=d(kt(k))),bi={},it=u(n),!it||!it.parentNode||!tt.enabled())return gi();var at=[],ou=n.attr("class"),tu=nr(k),ki,ri,sr,hi,ir,ci,rr,vt,lr,yr,fi=[];if(k.duration===0||!b.animations&&!b.transitions)return gi();var vi=k.event&&c(k.event)?k.event.join(" "):k.event,iu=vi&&k.structural,pr="",oi="";iu?pr=h(vi,ti,!0):vi&&(pr=vi);k.addClass&&(oi+=h(k.addClass,ft));k.removeClass&&(oi.length&&(oi+=" "),oi+=h(k.removeClass,et));k.applyClassesEarly&&oi.length&&rt(n,k);var bt=[pr,oi].join(" ").trim(),wr=ou+" "+bt,ru=tu.to&&Object.keys(tu.to).length>0,su=(k.keyframeStyle||"").length>0;return!su&&!ru&&!bt?gi():(si=a.cacheKey(it,vi,k.addClass,k.removeClass),a.containsCachedAnimationWithoutDuration(si))?(bt=null,gi()):(k.stagger>0?(br=parseFloat(k.stagger),dt={transitionDelay:br,animationDelay:br,transitionDuration:0,animationDuration:0}):dt=lt(it,bt,si,ar),k.$$skipPreparationClasses||t.addClass(n,bt),k.transitionStyle&&(kr=[e,k.transitionStyle],p(it,kr),at.push(kr)),k.duration>=0&&(ur=it.style[e].length>0,dr=yi(k.duration,ur),p(it,dr),at.push(dr)),k.keyframeStyle&&(gr=[s,k.keyframeStyle],p(it,gr),at.push(gr)),fr=dt?k.staggerIndex>=0?k.staggerIndex:a.count(si):0,nu=fr===0,nu&&!k.skipBlocking&&nt(it,di),ct=ot(it,wr,si,!iu),gt=ct.maxDelay,ci=Math.max(gt,0),vt=ct.maxDuration,g={},g.hasTransitions=ct.transitionDuration>0,g.hasAnimations=ct.animationDuration>0,g.hasTransitionAll=g.hasTransitions&&ct.transitionProperty==="all",g.applyTransitionDuration=ru&&(g.hasTransitions&&!g.hasTransitionAll||g.hasAnimations&&!g.hasTransitions),g.applyAnimationDuration=k.duration&&g.hasAnimations,g.applyTransitionDelay=wt(k.delay)&&(g.applyTransitionDuration||g.hasTransitions),g.applyAnimationDelay=wt(k.delay)&&g.hasAnimations,g.recalculateTimingStyles=oi.length>0,(g.applyTransitionDuration||g.applyAnimationDuration)&&(vt=k.duration?parseFloat(k.duration):vt,g.applyTransitionDuration&&(g.hasTransitions=!0,ct.transitionDuration=vt,ur=it.style[e+ui].length>0,at.push(yi(vt,ur))),g.applyAnimationDuration&&(g.hasAnimations=!0,ct.animationDuration=vt,at.push(vr(vt)))),vt===0&&!g.recalculateTimingStyles)?gi():(er=h(bt,wi),k.delay!=null&&(typeof k.delay!="boolean"&&(ii=parseFloat(k.delay),ci=Math.max(ii,0)),g.applyTransitionDelay&&at.push(pt(ii)),g.applyAnimationDelay&&at.push(pt(ii,!0))),k.duration==null&&ct.transitionDuration>0&&(g.recalculateTimingStyles=g.recalculateTimingStyles||nu),rr=ci*w,lr=vt*w,k.skipBlocking||(g.blockTransition=ct.transitionDuration>0,g.blockKeyframeAnimation=ct.animationDuration>0&&dt.animationDelay>0&&dt.animationDuration===0),k.from&&(k.cleanupStyles&&pi(bi,it,Object.keys(k.from)),li(n,k)),g.blockTransition||g.blockKeyframeAnimation?fu(vt):k.skipBlocking||nt(it,!1),{$$willAnimate:!0,end:or,start:function(){if(!ki)return ir={end:or,cancel:uu,resume:null,pause:null},hi=new r(ir),ut(hu),hi}})}}]}],wr=["$$animationProvider",function(n){function c(n){return n.parentNode&&n.parentNode.nodeType===11}n.drivers.push("$$animateCssDriver");var t="ng-animate-shim",s="ng-anchor",e="ng-anchor-out",h="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(n,l,a,v,y,p,w){function g(n){return n.replace(/\bng-\S+\b/g,"")}function nt(n,t){return o(n)&&(n=n.split(" ")),o(t)&&(t=t.split(" ")),n.filter(function(n){return t.indexOf(n)===-1}).join(" ")}function rt(f,o,c){function d(n){var t={},r=u(n).getBoundingClientRect();return i(["width","height","top","left"],function(n){var i=r[n];switch(n){case"top":i+=b.scrollTop;break;case"left":i+=b.scrollLeft}t[n]=Math.floor(i)+"px"}),t}function ut(){var t=n(v,{addClass:e,delay:!0,from:d(o)});return t.$$willAnimate?t:null}function tt(n){return n.attr("class")||""}function rt(){var t=g(tt(c)),r=nt(t,w),u=nt(w,t),i=n(v,{to:d(c),addClass:h+" "+r,removeClass:e+" "+u,delay:!0});return i.$$willAnimate?i:null}function p(){v.remove();o.removeClass(t);c.removeClass(t)}var v=r(u(o).cloneNode(!0)),w=g(tt(v)),l,y,k;return(o.addClass(t),c.addClass(t),v.addClass(s),it.append(v),y=ut(),!y&&(l=rt(),!l))?p():(k=y||l,{start:function(){function i(){n&&n.end()}var t,n=k.start();return n.done(function(){if(n=null,!l&&(l=rt(),l))return n=l.start(),n.done(function(){n=null;p();t.complete()}),n;p();t.complete()}),t=new a({end:i,cancel:i})}})}function ut(n,t,r,u){var e=d(n,f),o=d(t,f),s=[];if(i(u,function(n){var i=n.out,u=n["in"],t=rt(r,i,u);t&&s.push(t)}),e||o||s.length!==0)return{start:function(){function r(){i(n,function(n){n.end()})}var n=[],t;return e&&n.push(e.start()),o&&n.push(o.start()),i(s,function(t){n.push(t.start())}),t=new a({end:r,cancel:r}),a.all(n,function(n){t.complete(n)}),t}}}function d(t){var u=t.element,i=t.options||{},r;return t.structural&&(i.event=t.event,i.structural=!0,i.applyClassesEarly=!0,t.event==="leave"&&(i.onDone=i.domOperation)),i.preparationClasses&&(i.event=tt(i.event,i.preparationClasses)),r=n(u,i),r.$$willAnimate?r:null}if(!y.animations&&!y.transitions)return f;var b=w[0].body,k=u(v),it=r(c(k)||b.contains(k)?k:b);return function(n){return n.from&&n.to?ut(n.from,n.to,n.classes,n.anchors):d(n)}}]}],br=["$animateProvider",function(n){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,r,u){function o(i){var f,e,r,u,o;for(i=c(i)?i:i.split(" "),f=[],e={},r=0;r<i.length;r++)u=i[r],o=n.$$registeredAnimations[u],o&&!e[u]&&(f.push(t.get(o)),e[u]=!0);return f}var e=k(u);return function(n,t,u,s){function b(){s.domOperation();e(n,s)}function tt(){k=!0;b();y(n,s)}function rt(n,t,i,u,e){var s,o;switch(i){case"animate":s=[t,u.from,u.to,e];break;case"setClass":s=[t,g,nt,e];break;case"addClass":s=[t,g,e];break;case"removeClass":s=[t,nt,e];break;default:s=[t,e]}if(s.push(u),o=n.apply(n,s),o)if(ni(o.start)&&(o=o.start()),o instanceof r)o.done(e);else if(ni(o))return o;return f}function c(n,t,u,e,o){var s=[];return i(e,function(i){var e=i[o];e&&s.push(function(){var i,s,h=!1,o=function(n){h||(h=!0,(s||f)(n),i.complete(!n))};return i=new r({end:function(){o()},cancel:function(){o(!0)}}),s=rt(e,n,t,u,function(n){var t=n===!1;o(t)}),i})}),s}function it(n,t,u,f,e){var o=c(n,t,u,f,e),s,h;if(o.length===0&&(e==="beforeSetClass"?(s=c(n,"removeClass",u,f,"beforeRemoveClass"),h=c(n,"addClass",u,f,"beforeAddClass")):e==="setClass"&&(s=c(n,"removeClass",u,f,"removeClass"),h=c(n,"addClass",u,f,"addClass")),s&&(o=o.concat(s)),h&&(o=o.concat(h))),o.length!==0)return function(n){var t=[];return o.length&&i(o,function(n){t.push(n())}),t.length?r.all(t,n):n(),function(n){i(t,function(t){n?t.cancel():t.end()})}}}var k=!1,p,w,h;arguments.length===3&&ut(u)&&(s=u,u=null);s=d(s);u||(u=n.attr("class")||"",s.addClass&&(u+=" "+s.addClass),s.removeClass&&(u+=" "+s.removeClass));var g=s.addClass,nt=s.removeClass,v=o(u),l,a;if(v.length&&(t==="leave"?(w="leave",p="afterLeave"):(w="before"+t.charAt(0).toUpperCase()+t.substr(1),p=t),t!=="enter"&&t!=="move"&&(l=it(n,t,s,v,w)),a=it(n,t,s,v,p)),l||a)return{$$willAnimate:!0,end:function(){return h?h.end():(tt(),h=new r,h.complete(!0)),h},start:function(){function i(n){tt(n);h.complete(n)}function u(n){k||((t||f)(n),i(n))}if(h)return h;h=new r;var t,n=[];return l&&n.push(function(n){t=l(n)}),n.length?n.push(function(n){b();n(!0)}):b(),a&&n.push(function(n){t=a(n)}),h.setHost({end:function(){u()},cancel:function(){u(!0)}}),r.chain(n,i),h}}}}]}],kr=["$$animationProvider",function(n){n.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(n,t){function r(t){var i=t.element,r=t.event,u=t.options,f=t.classes;return n(i,r,f,u)}return function(n){if(n.from&&n.to){var u=r(n.from),f=r(n.to);return!u&&!f?void 0:{start:function(){function e(){return function(){i(n,function(n){n.end()})}}function o(n){r.complete(n)}var n=[],r;return u&&n.push(u.start()),f&&n.push(f.start()),t.all(n,o),r=new t({end:e(),cancel:e()})}}}return r(n)}}]}],it="data-ng-animate",bt="$ngAnimatePin",dr=["$animateProvider",function(t){function h(n){return{addClass:n.addClass,removeClass:n.removeClass,from:n.from,to:n.to}}function nt(n){if(!n)return null;var r=n.split(p),t=Object.create(null);return i(r,function(n){t[n]=!0}),t}function w(n,t){if(n&&t){var i=nt(t);return n.split(p).some(function(n){return i[n]})}}function v(n,t,i){return f[n].some(function(n){return n(t,i)})}function s(n,t){var i=(n.addClass||"").length>0,r=(n.removeClass||"").length>0;return t?i&&r:i||r}var l=1,e=2,p=" ",f=this.rules={skip:[],cancel:[],join:[]};f.join.push(function(n){return!n.structural&&s(n)});f.skip.push(function(n){return!n.structural&&!s(n)});f.skip.push(function(n,t){return t.event==="leave"&&n.structural});f.skip.push(function(n,t){return t.structural&&t.state===e&&!n.structural});f.cancel.push(function(n,t){return t.structural&&n.structural});f.cancel.push(function(n,t){return t.state===e&&n.structural});f.cancel.push(function(n,t){if(t.structural)return!1;var i=n.addClass,r=n.removeClass,u=t.addClass,f=t.removeClass;return a(i)&&a(r)||a(u)&&a(f)?!1:w(i,f)||w(r,u)});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(f,p,w,nt,tt,ft,et,st,ht,ct,lt){function ai(n){pt.delete(n.target)}function vi(){var n=!1;return function(t){n?t():p.$$postDigest(function(){n=!0;t()})}}function fi(n,t){return g(n,t,{})}function ki(n,t,r){var u=[],f=yt[r];return f&&i(f,function(i){ei.call(i.node,t)?u.push(i.callback):r==="leave"&&ei.call(i.node,n)&&u.push(i.callback)}),u}function oi(n,t,i){var r=vt(t);return n.filter(function(n){var t=n.node===r&&(!i||n.callback===i);return!t})}function hi(n,t){n!=="close"||t.parentNode||ni.off(t)}function di(n,t,r){function vt(n,t,r,u){dt(function(){var n=ki(bt,w,t);n.length?f(function(){i(n,function(n){n(k,r,u)});hi(r,w)}):hi(r,w)});n.progress(t,r,u)}function it(n){er(k,a);ui(k,a);y(k,a);a.domOperation();tt.complete(!n)}var a=kt(r),k=ci(n),w=u(k),bt=w&&w.parentNode,tt,dt,nt,ni,ii,ri,st,ct;if(a=d(a),tt=new et,dt=vi(),c(a.addClass)&&(a.addClass=a.addClass.join(" ")),a.addClass&&!o(a.addClass)&&(a.addClass=null),c(a.removeClass)&&(a.removeClass=a.removeClass.join(" ")),a.removeClass&&!o(a.removeClass)&&(a.removeClass=null),a.from&&!ut(a.from)&&(a.from=null),a.to&&!ut(a.to)&&(a.to=null),!wt||!w||!wi(w,t,r)||!bi(w,a))return it(),tt;var rt=["enter","move","leave"].indexOf(t)>=0,yt=lt(),ot=yt||pt.get(w),b=!ot&&at.get(w)||{},gt=!!b.state;if(ot||gt&&b.state===l||(ot=!nr(w,bt,t)),ot)return yt&&vt(tt,t,"start",h(a)),it(),yt&&vt(tt,t,"close",h(a)),tt;if(rt&&gi(w),nt={structural:rt,element:k,event:t,addClass:a.addClass,removeClass:a.removeClass,close:it,options:a,runner:tt},gt){if(ni=v("skip",nt,b),ni)return b.state===e?(it(),tt):(g(k,b,nt),b.runner);if(ii=v("cancel",nt,b),ii)if(b.state===e)b.runner.end();else if(b.structural)b.close();else return g(k,b,nt),b.runner;else if(ri=v("join",nt,b),ri)if(b.state===e)fi(k,nt);else return fr(ht,k,rt?t:null,a),t=nt.event=b.event,a=g(k,b,nt),b.runner}else fi(k,nt);return(st=nt.structural,st||(st=nt.event==="animate"&&Object.keys(nt.options.to||{}).length>0||s(nt)),!st)?(it(),ti(w),tt):(ct=(b.counter||0)+1,nt.counter=ct,li(w,l,nt),p.$$postDigest(function(){var i,r,o,u,f;if(k=ci(n),i=at.get(w),r=!i,i=i||{},o=k.parent()||[],u=o.length>0&&(i.event==="animate"||i.structural||s(i)),r||i.counter!==ct||!u){r&&(ui(k,a),y(k,a));(r||rt&&i.event!==t)&&(a.domOperation(),tt.end());u||ti(w);return}t=!i.structural&&s(i,!0)?"setClass":i.event;li(w,e);f=ft(k,t,i.options);tt.setHost(f);vt(tt,t,"start",h(a));f.done(function(n){it(!n);var i=at.get(w);i&&i.counter===ct&&ti(w);vt(tt,t,"close",h(a))})}),tt)}function gi(n){var t=n.querySelectorAll("["+it+"]");i(t,function(n){var i=parseInt(n.getAttribute(it),10),t=at.get(n);if(t)switch(i){case e:t.runner.end();case l:at.delete(n)}})}function ti(n){n.removeAttribute(it);at.delete(n)}function nr(n,t){var v=nt[0].body,y=u(w),o=n===v||n.nodeName==="HTML",i=n===y,s=!1,h=pt.get(n),f,e=r.data(n,bt),p,c,l,k;for(e&&(t=u(e));t;){if(i||(i=t===y),t.nodeType!==b)break;if(p=at.get(t)||{},!s){if(c=pt.get(t),c===!0&&h!==!1){h=!0;break}else c===!1&&(h=!1);s=p.structural}if((a(f)||f===!0)&&(l=r.data(t,ot),gt(l)&&(f=l)),s&&f===!1)break;if(o||(o=t===v),o&&i)break;if(!i&&(e=r.data(t,bt),e)){t=u(e);continue}t=t.parentNode}return k=(!s||f)&&h!==!0,k&&i&&o}function li(n,t,i){i=i||{};i.state=t;n.setAttribute(it,t);var r=at.get(n),u=r?dt(r,i):i;at.set(n,u)}var at=new tt,pt=new tt,wt=null,yi=p.$watch(function(){return st.totalPendingRequests===0},function(n){n&&(yi(),p.$$postDigest(function(){p.$$postDigest(function(){wt===null&&(wt=!0)})}))}),yt=Object.create(null),pi=t.customFilter(),ii=t.classNameFilter(),ri=function(){return!0},wi=pi||ri,bi=ii?function(n,t){var i=[n.getAttribute("class"),t.addClass,t.removeClass].join(" ");return ii.test(i)}:ri,ui=k(ht),ei=n.Node.prototype.contains||function(n){return this===n||!!(this.compareDocumentPosition(n)&16)},ni={on:function(n,t,i){var u=vt(t);yt[n]=yt[n]||[];yt[n].push({node:u,callback:i});r(t).on("$destroy",function(){var r=at.get(u);r||ni.off(n,t,i)})},off:function(n,t,i){var r,u;if(arguments.length===1&&!o(arguments[0])){t=arguments[0];for(r in yt)yt[r]=oi(yt[r],t);return}(u=yt[n],u)&&(yt[n]=arguments.length===1?null:oi(u,t,i))},pin:function(n,t){si(rt(n),"element","not an element");si(rt(t),"parentElement","not an element");n.data(bt,t)},push:function(n,t,i,r){return i=i||{},i.domOperation=r,di(n,t,i)},enabled:function(n,t){var f=arguments.length,e,i;if(f===0)t=!!wt;else if(e=rt(n),e)if(i=u(n),f===1)t=!pt.get(i);else{if(!pt.has(i))r(n).on("$destroy",ai);pt.set(i,!t)}else t=wt=!!n;return t}};return ni}]}],gr=function(){var t="$$ngAnimateParentKey",i=0,n=Object.create(null);this.$get=[function(){return{cacheKey:function(n,r,u,f){var o=n.parentNode,s=o[t]||(o[t]=++i),e=[s,r,n.getAttribute("class")];return u&&e.push(u),f&&e.push(f),e.join(" ")},containsCachedAnimationWithoutDuration:function(t){var i=n[t];return i&&!i.isValid||!1},flush:function(){n=Object.create(null)},count:function(t){var i=n[t];return i?i.total:0},get:function(t){var i=n[t];return i&&i.value},put:function(t,i,r){n[t]?(n[t].total++,n[t].value=i):n[t]={total:1,value:i,isValid:r}}}}]},nu=["$animateProvider",function(){function s(n,t){n.data(o,t)}function h(n){n.removeData(o)}function f(n){return n.data(o)}var n="ng-animate-ref",e=this.drivers=[],o="$$animationRunner",t="$$animatePrepareClasses";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler","$$animateCache",function(o,c,l,a,v,p,w){function nt(n){function f(n){var e,i,t;if(n.processed)return n;for(n.processed=!0,e=n.domNode,i=e.parentNode,r.set(e,n);i;){if(t=r.get(i),t){t.processed||(t=f(t));break}i=i.parentNode}return(t||u).children.push(n),n}function e(n){for(var u=[],i=[],o,t=0;t<n.children.length;t++)i.push(n.children[t]);var f=i.length,e=0,r=[];for(t=0;t<i.length;t++)o=i[t],f<=0&&(f=e,e=0,u.push(r),r=[]),r.push(o),o.children.forEach(function(n){e++;i.push(n)}),f--;return r.length&&u.push(r),u}for(var u={children:[]},r=new v,i,t=0;t<n.length;t++)i=n[t],r.set(i.domNode,n[t]={domNode:i.domNode,element:i.element,fn:i.fn,children:[]});for(t=0;t<n.length;t++)f(n[t]);return e(u)}var b=[],g=k(o);return function(v,k,tt){function ht(t){var u="["+n+"]",f=t.hasAttribute(n)?[t]:t.querySelectorAll(u),r=[];return i(f,function(t){var i=t.getAttribute(n);i&&i.length&&r.push(t)}),r}function ct(t){var f=[],e={},s,o;return i(t,function(t,o){var c=t.element,l=u(c),a=t.event,v=["enter","move"].indexOf(a)>=0,s=t.structural?ht(l):[],h;s.length?(h=v?"to":"from",i(s,function(t){var i=t.getAttribute(n);e[i]=e[i]||{};e[i][h]={animationID:o,element:r(t)}})):f.push(t)}),s={},o={},i(e,function(n){var i=n.from,e=n.to,h,c,a;if(!i||!e){h=i?i.animationID:e.animationID;c=h.toString();s[c]||(s[c]=!0,f.push(t[h]));return}var r=t[i.animationID],u=t[e.animationID],l=i.animationID.toString();o[l]||(a=o[l]={structural:!0,beforeStart:function(){r.beforeStart();u.beforeStart()},close:function(){r.close();u.close()},classes:lt(r.classes,u.classes),from:r,to:u,anchors:[]},a.classes.length?f.push(a):(f.push(r),f.push(u)));o[l].anchors.push({out:i.element,"in":e.element})}),f}function lt(n,t){var f,i,r,u;for(n=n.split(" "),t=t.split(" "),f=[],i=0;i<n.length;i++)if(r=n[i],r.substring(0,3)!=="ng-")for(u=0;u<t.length;u++)if(r===t[u]){f.push(r);break}return f.join(" ")}function at(n){for(var t=e.length-1;t>=0;t--){var r=e[t],u=l.get(r),i=u(n);if(i)return i}}function vt(){it=(it?it+" ":"")+ii;o.addClass(v,it);var n=v.data(t);n&&(o.removeClass(v,n),n=null)}function yt(n,t){function i(n){var i=f(n);i&&i.setHost(t)}n.from&&n.to?(i(n.from.element),i(n.to.element)):i(n.element)}function ot(){var n=f(v);n&&(k!=="leave"||!tt.$$domOperationFired)&&n.end()}function ut(n){v.off("$destroy",ot);h(v);g(v,tt);y(v,tt);tt.domOperation();it&&o.removeClass(v,it);rt.complete(!n)}var st=u(v),ft,rt,et,it;if(tt=d(tt),ft=["enter","move","leave"].indexOf(k)>=0,rt=new a({end:function(){ut()},cancel:function(){ut(!0)}}),!e.length)return ut(),rt;et=hi(v.attr("class"),hi(tt.addClass,tt.removeClass));it=tt.tempClasses;it&&(et+=" "+it,tt.tempClasses=null);ft&&v.data(t,"ng-"+k+bi);s(v,rt);b.push({element:v,classes:et,event:k,structural:ft,options:tt,beforeStart:vt,close:ut});v.on("$destroy",ot);return b.length>1?rt:(c.$$postDigest(function(){var v=[],y,h,r,n,c,e,l,s,a;for(i(b,function(n){f(n.element)?v.push(n):n.close()}),b.length=0,y=ct(v),h=[],i(y,function(n){var i=n.from?n.from.element:n.element,t=tt.addClass,r;t=(t?t+" ":"")+ii;r=w.cacheKey(st,k,t,tt.removeClass);h.push({element:i,domNode:u(i),fn:function(){var t,i=n.close,o,u,e;if(w.containsCachedAnimationWithoutDuration(r)){i();return}n.beforeStart();o=n.anchors?n.from.element||n.to.element:n.element;f(o)&&(u=at(n),u&&(t=u.start));t?(e=t(),e.done(function(n){i(!n)}),yt(n,e)):i()}})}),r=nt(h),n=0;n<r.length;n++)for(c=r[n],e=0;e<c.length;e++){if(l=c[e],s=l.element,r[n][e]=l.fn,n===0){s.removeData(t);continue}a=s.data(t);a&&o.addClass(s,a)}p(r)}),rt)}}]}],tu=["$animate",function(n){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,i,r,u,f){var o,e;t.$watchCollection(r.ngAnimateSwap||r["for"],function(t){o&&n.leave(o);e&&(e.$destroy(),e=null);(t||t===0)&&f(function(t,r){o=t;e=r;n.enter(t,null,i)})})}}}],kt,dt,i,c,gt,rt,ni,ut,o,a,r,f;t.module("ngAnimate",[],function(){f=t.noop;kt=t.copy;dt=t.extend;r=t.element;i=t.forEach;c=t.isArray;o=t.isString;ut=t.isObject;a=t.isUndefined;gt=t.isDefined;ni=t.isFunction;rt=t.isElement}).info({angularVersion:"1.7.3"}).directive("ngAnimateSwap",tu).directive("ngAnimateChildren",sr).factory("$$rAFScheduler",or).provider("$$animateQueue",dr).provider("$$animateCache",gr).provider("$$animation",nu).provider("$animateCss",pr).provider("$$animateCssDriver",wr).provider("$$animateJs",br).provider("$$animateJsDriver",kr)}(window,window.angular),function(n,t){typeof module!="undefined"&&module.exports?(typeof angular=="undefined"?t(require("angular")):t(angular),module.exports="ngDialog"):typeof define=="function"&&define.amd?define(["angular"],t):t(n.angular)}(this,function(n){"use strict";var s=n.module("ngDialog",[]),t=n.element,r=n.isDefined,u=(document.body||document.documentElement).style,p=r(u.animation)||r(u.WebkitAnimation)||r(u.MozAnimation)||r(u.MsAnimation)||r(u.OAnimation),l="animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend",w="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",b="ngdialog-disabled-animation",h={html:!1,body:!1},e={},i=[],o=[],c=!1,a=!1,f=[],v="legacy",y="1.0.0+";return s.provider("ngDialog",function(){var s=this.defaults={className:"ngdialog-theme-default",appendClassName:"",disableAnimation:!1,plain:!1,showClose:!0,closeByDocument:!0,closeByEscape:!0,closeByNavigation:!1,appendTo:!1,preCloseCallback:!1,onOpenCallback:!1,overlay:!0,cache:!0,trapFocus:!0,preserveFocus:!0,ariaAuto:!0,ariaRole:null,ariaLabelledById:null,ariaLabelledBySelector:null,ariaDescribedById:null,ariaDescribedBySelector:null,bodyClassName:"ngdialog-open",width:null,height:null};this.setForceHtmlReload=function(n){h.html=n||!1};this.setForceBodyReload=function(n){h.body=n||!1};this.setDefaults=function(t){n.extend(s,t)};this.setOpenOnePerName=function(n){a=n||!1};var d=0,r=0,u,k={};this.$get=["$document","$templateCache","$compile","$q","$http","$rootScope","$timeout","$window","$controller","$injector",function(g,nt,tt,it,rt,ut,ft,et,ot,st){var ct=[],ht={onDocumentKeydown:function(n){n.keyCode===27&&lt.close("$escape")},activate:function(n){var t=n.data("$ngDialogOptions");if(t.trapFocus){n.on("keydown",ht.onTrapFocusKeydown);ct.body.on("keydown",ht.onTrapFocusKeydown)}},deactivate:function(n){n.off("keydown",ht.onTrapFocusKeydown);ct.body.off("keydown",ht.onTrapFocusKeydown)},deactivateAll:function(t){n.forEach(t,function(t){var i=n.element(t);ht.deactivate(i)})},setBodyPadding:function(n){var t=parseInt(ct.body.css("padding-right")||0,10);ct.body.css("padding-right",t+n+"px");ct.body.data("ng-dialog-original-padding",t);ut.$broadcast("ngDialog.setPadding",n)},resetBodyPadding:function(){var n=ct.body.data("ng-dialog-original-padding");n?ct.body.css("padding-right",n+"px"):ct.body.css("padding-right","");ut.$broadcast("ngDialog.setPadding",0)},performCloseDialog:function(n,t){var a=n.data("$ngDialogOptions"),f=n.attr("id"),o=e[f],s,h;(ht.deactivate(n),o)&&(typeof et.Hammer!="undefined"?(s=o.hammerTime,s.off("tap",u),s.destroy&&s.destroy(),delete o.hammerTime):n.unbind("click"),r===1&&ct.body.unbind("keydown",ht.onDocumentKeydown),n.hasClass("ngdialog-closing")||(r-=1),h=n.data("$ngDialogPreviousFocus"),h&&h.focus&&h.focus(),ut.$broadcast("ngDialog.closing",n,t),r=r<0?0:r,p&&!a.disableAnimation?(o.$destroy(),n.unbind(l).bind(l,function(){ht.closeDialogElement(n,t)}).addClass("ngdialog-closing")):(o.$destroy(),ht.closeDialogElement(n,t)),k[f]&&(k[f].resolve({id:f,value:t,$dialog:n,remainingDialogs:r}),delete k[f]),e[f]&&delete e[f],i.splice(i.indexOf(f),1),i.length||(ct.body.unbind("keydown",ht.onDocumentKeydown),c=!1),r==0&&(u=undefined))},closeDialogElement:function(n,t){var i=n.data("$ngDialogOptions");n.remove();o.splice(o.indexOf(i.bodyClassName),1);o.indexOf(i.bodyClassName)===-1&&(ct.html.removeClass(i.bodyClassName),ct.body.removeClass(i.bodyClassName));r===0&&ht.resetBodyPadding();ut.$broadcast("ngDialog.closed",n,t)},closeDialog:function(t,i){var u=t.data("$ngDialogPreCloseCallback"),r;if(u&&n.isFunction(u))if(r=u.call(t,i),n.isObject(r))r.closePromise?r.closePromise.then(function(){ht.performCloseDialog(t,i)},function(){return!1}):r.then(function(){ht.performCloseDialog(t,i)},function(){return!1});else if(r!==!1)ht.performCloseDialog(t,i);else return!1;else ht.performCloseDialog(t,i)},onTrapFocusKeydown:function(t){var r=n.element(t.currentTarget),i,u,f;if(r.hasClass("ngdialog"))i=r;else if(i=ht.getActiveDialog(),i===null)return;u=t.keyCode===9;f=t.shiftKey===!0;u&&ht.handleTab(i,t,f)},handleTab:function(n,t,i){var r=ht.getFocusableElements(n);if(r.length===0){document.activeElement&&document.activeElement.blur&&document.activeElement.blur();return}var o=document.activeElement,u=Array.prototype.indexOf.call(r,o),e=u===-1,s=u===0,h=u===r.length-1,f=!1;i?(e||s)&&(r[r.length-1].focus(),f=!0):(e||h)&&(r[0].focus(),f=!0);f&&(t.preventDefault(),t.stopPropagation())},autoFocus:function(n){var e=n[0],i=e.querySelector("*[autofocus]"),r,u,f;if(i===null||(i.focus(),document.activeElement!==i)){if(r=ht.getFocusableElements(n),r.length>0){r[0].focus();return}u=ht.filterVisibleElements(e.querySelectorAll("h1,h2,h3,h4,h5,h6,p,span"));u.length>0&&(f=u[0],t(f).attr("tabindex","-1").css("outline","0"),f.focus())}},getFocusableElements:function(n){var t=n[0],i=t.querySelectorAll(w),r=ht.filterTabbableElements(i);return ht.filterVisibleElements(r)},filterTabbableElements:function(n){for(var r,u=[],i=0;i<n.length;i++)r=n[i],t(r).attr("tabindex")!=="-1"&&u.push(r);return u},filterVisibleElements:function(n){for(var t,r=[],i=0;i<n.length;i++)t=n[i],(t.offsetWidth>0||t.offsetHeight>0)&&r.push(t);return r},getActiveDialog:function(){var n=document.querySelectorAll(".ngdialog");return n.length===0?null:t(n[n.length-1])},applyAriaAttributes:function(n,t){if(t.ariaAuto){if(!t.ariaRole){var i=ht.getFocusableElements(n).length>0?"dialog":"alertdialog";t.ariaRole=i}t.ariaLabelledBySelector||(t.ariaLabelledBySelector="h1,h2,h3,h4,h5,h6");t.ariaDescribedBySelector||(t.ariaDescribedBySelector="article,section,p")}t.ariaRole&&n.attr("role",t.ariaRole);ht.applyAriaAttribute(n,"aria-labelledby",t.ariaLabelledById,t.ariaLabelledBySelector);ht.applyAriaAttribute(n,"aria-describedby",t.ariaDescribedById,t.ariaDescribedBySelector)},applyAriaAttribute:function(n,i,r,u){var o,e,f;if(r){n.attr(i,r);return}if(u)return(o=n.attr("id"),e=n[0].querySelector(u),!e)?void 0:(f=o+"-"+i,t(e).attr("id",f),n.attr(i,f),f)},detectUIRouter:function(){return st.has("$transitions")?y:st.has("$state")?v:!1},getRouterLocationEventName:function(){return ht.detectUIRouter()?"$stateChangeStart":"$locationChangeStart"}},lt={__PRIVATE__:ht,open:function(h){function pt(t,i){var i=i||{};return i.headers=i.headers||{},n.extend(i.headers,{Accept:"text/html"}),ut.$broadcast("ngDialog.templateLoading",t),rt.get(t,i).then(function(n){return ut.$broadcast("ngDialog.templateLoaded",t),n.data||""})}function wt(t){return t?n.isString(t)&&l.plain?t:typeof l.cache=="boolean"&&!l.cache?pt(t,{cache:!1}):pt(t,{cache:nt}):"Empty template"}var p=null,l,vt,yt,y,v,at,w,g;if(h=h||{},!a||!h.name||(p=h.name.toLowerCase().replace(/\s/g,"-")+"-dialog",!this.isOpen(p)))return l=n.copy(s),vt=++d,p=p||"ngdialog"+vt,i.push(p),typeof l.data!="undefined"&&(typeof h.data=="undefined"&&(h.data={}),h.data=n.merge(n.copy(l.data),h.data)),n.extend(l,h),k[p]=yt=it.defer(),e[p]=y=n.isObject(l.scope)?l.scope.$new():ut.$new(),g=n.extend({},l.resolve),n.forEach(g,function(t,i){g[i]=n.isString(t)?st.get(t):st.invoke(t,null,null,i)}),it.all({template:wt(l.template||l.templateUrl),locals:it.all(g)}).then(function(i){var s=i.template,g=i.locals,a,h,k,e,d;if(l.showClose&&(s+='<button aria-label="Dismiss" class="ngdialog-close"><\/button>'),a=l.overlay?"":" ngdialog-no-overlay",v=t('<div id="'+p+'" class="ngdialog'+a+'"><\/div>'),v.html(l.overlay?'<div class="ngdialog-overlay"><\/div><div class="ngdialog-content" role="document">'+s+"<\/div>":'<div class="ngdialog-content" role="document">'+s+"<\/div>"),v.data("$ngDialogOptions",l),y.ngDialogId=p,l.data&&n.isString(l.data)?(h=l.data.replace(/^\s*/,"")[0],y.ngDialogData=h==="{"||h==="["?n.fromJson(l.data):new String(l.data),y.ngDialogData.ngDialogId=p):l.data&&n.isObject(l.data)&&(y.ngDialogData=l.data,y.ngDialogData.ngDialogId=p),l.className&&v.addClass(l.className),l.appendClassName&&v.addClass(l.appendClassName),l.width&&(w=v[0].querySelector(".ngdialog-content"),w.style.width=n.isString(l.width)?l.width:l.width+"px"),l.height&&(w=v[0].querySelector(".ngdialog-content"),w.style.height=n.isString(l.height)?l.height:l.height+"px"),l.disableAnimation&&v.addClass(b),at=l.appendTo&&n.isString(l.appendTo)?n.element(document.querySelector(l.appendTo)):ct.body,ht.applyAriaAttributes(v,l),[{name:"$ngDialogPreCloseCallback",value:l.preCloseCallback},{name:"$ngDialogOnOpenCallback",value:l.onOpenCallback}].forEach(function(t){if(t.value){var i;n.isFunction(t.value)?i=t.value:n.isString(t.value)&&y&&(n.isFunction(y[t.value])?i=y[t.value]:y.$parent&&n.isFunction(y.$parent[t.value])?i=y.$parent[t.value]:ut&&n.isFunction(ut[t.value])&&(i=ut[t.value]));i&&v.data(t.name,i)}}),y.closeThisDialog=function(n){ht.closeDialog(v,n)},l.controller&&(n.isString(l.controller)||n.isArray(l.controller)||n.isFunction(l.controller))&&(l.controllerAs&&n.isString(l.controllerAs)&&(k=l.controllerAs),e=ot(l.controller,n.extend(g,{$scope:y,$element:v}),!0,k),l.bindToController&&n.extend(e.instance,{ngDialogId:y.ngDialogId,ngDialogData:y.ngDialogData,closeThisDialog:y.closeThisDialog,confirm:y.confirm}),typeof e=="function"?v.data("$ngDialogControllerController",e()):v.data("$ngDialogControllerController",e)),ft(function(){var u=document.querySelectorAll(".ngdialog"),r,i,t;ht.deactivateAll(u);tt(v)(y);r=et.innerWidth-ct.body.prop("clientWidth");ct.html.addClass(l.bodyClassName);ct.body.addClass(l.bodyClassName);o.push(l.bodyClassName);i=r-(et.innerWidth-ct.body.prop("clientWidth"));i>0&&ht.setBodyPadding(i);at.append(v);ht.activate(v);l.trapFocus&&ht.autoFocus(v);l.name?ut.$broadcast("ngDialog.opened",{dialog:v,name:l.name}):ut.$broadcast("ngDialog.opened",v);t=v.data("$ngDialogOnOpenCallback");t&&n.isFunction(t)&&t.call(v)}),c||(ct.body.bind("keydown",ht.onDocumentKeydown),c=!0),l.closeByNavigation&&f.push(v),l.preserveFocus&&v.data("$ngDialogPreviousFocus",document.activeElement),u=function(n){var r=l.closeByDocument?t(n.target).hasClass("ngdialog-overlay"):!1,i=t(n.target).hasClass("ngdialog-close");(r||i)&&lt.close(v.attr("id"),i?"$closeButton":"$document")},typeof et.Hammer!="undefined"){d=y.hammerTime=et.Hammer(v[0]);d.on("tap",u)}else v.bind("click",u);return r+=1,lt}),{id:p,closePromise:yt.promise,close:function(n){ht.closeDialog(v,n)}}},openConfirm:function(i){var u=it.defer(),r=n.copy(s),f;return i=i||{},typeof r.data!="undefined"&&(typeof i.data=="undefined"&&(i.data={}),i.data=n.merge(n.copy(r.data),i.data)),n.extend(r,i),r.scope=n.isObject(r.scope)?r.scope.$new():ut.$new(),r.scope.confirm=function(n){u.resolve(n);var i=t(document.getElementById(f.id));ht.performCloseDialog(i,n)},f=lt.open(r),f?(f.closePromise.then(function(n){return n?u.reject(n.value):u.reject()}),u.promise):void 0},isOpen:function(n){var i=t(document.getElementById(n));return i.length>0},close:function(n,r){var u=t(document.getElementById(n)),f;return u.length?ht.closeDialog(u,r):n==="$escape"?(f=i[i.length-1],u=t(document.getElementById(f)),u.data("$ngDialogOptions").closeByEscape&&ht.closeDialog(u,"$escape")):lt.closeAll(r),lt},closeAll:function(n){for(var u,r=document.querySelectorAll(".ngdialog"),i=r.length-1;i>=0;i--)u=r[i],ht.closeDialog(t(u),n)},getOpenDialogs:function(){return i},getDefaults:function(){return s}},at,vt,yt;if(n.forEach(["html","body"],function(n){if(ct[n]=g.find(n),h[n]){var t=ht.getRouterLocationEventName();ut.$on(t,function(){ct[n]=g.find(n)})}}),at=ht.detectUIRouter(),at===y){vt=st.get("$transitions");vt.onStart({},function(){while(f.length>0){var n=f.pop();if(ht.closeDialog(n)===!1)return!1}})}else yt=at===v?"$stateChangeStart":"$locationChangeStart",ut.$on(yt,function(n){while(f.length>0){var t=f.pop();ht.closeDialog(t)===!1&&n.preventDefault()}});return lt}]}),s.directive("ngDialog",["ngDialog",function(t){return{restrict:"A",scope:{ngDialogScope:"="},link:function(i,r,u){r.on("click",function(r){var e,f;r.preventDefault();e=n.isDefined(i.ngDialogScope)?i.ngDialogScope:"noScope";n.isDefined(u.ngDialogClosePrevious)&&t.close(u.ngDialogClosePrevious);f=t.getDefaults();t.open({template:u.ngDialog,className:u.ngDialogClass||f.className,appendClassName:u.ngDialogAppendClass,controller:u.ngDialogController,controllerAs:u.ngDialogControllerAs,bindToController:u.ngDialogBindToController,disableAnimation:u.ngDialogDisableAnimation,scope:e,data:u.ngDialogData,showClose:u.ngDialogShowClose==="false"?!1:u.ngDialogShowClose==="true"?!0:f.showClose,closeByDocument:u.ngDialogCloseByDocument==="false"?!1:u.ngDialogCloseByDocument==="true"?!0:f.closeByDocument,closeByEscape:u.ngDialogCloseByEscape==="false"?!1:u.ngDialogCloseByEscape==="true"?!0:f.closeByEscape,overlay:u.ngDialogOverlay==="false"?!1:u.ngDialogOverlay==="true"?!0:f.overlay,preCloseCallback:u.ngDialogPreCloseCallback||f.preCloseCallback,onOpenCallback:u.ngDialogOnOpenCallback||f.onOpenCallback,bodyClassName:u.ngDialogBodyClass||f.bodyClassName})})}}}]),s})