!function(t,e){"use strict";var n=window.angulartics||(window.angulartics={});function r(t){return["a:","button:","button:button","button:submit","input:button","input:submit"].indexOf(t.tagName.toLowerCase()+":"+(t.type||""))>=0}function i(t){var e=t.slice(9);return null!=e&&e.length>0?e.substring(0,1).toLowerCase()+e.substring(1):e}n.waitForVendorCount=0,n.waitForVendorApi=function(t,e,r,i,o){o||n.waitForVendorCount++,i||(i=r,r=void 0),!Object.prototype.hasOwnProperty.call(window,t)||void 0!==r&&void 0===window[t][r]?setTimeout(function(){n.waitForVendorApi(t,e,r,i,!0)},e):(n.waitForVendorCount--,i(window[t]))},t.module("angulartics",[]).provider("$analytics",function(){var e=this,r={pageTracking:{autoTrackFirstPage:!0,autoTrackVirtualPages:!0,trackRelativePath:!1,trackRoutes:!0,trackStates:!0,autoBasePath:!1,basePath:"",excludedRoutes:[],queryKeysWhitelisted:[],queryKeysBlacklisted:[]},eventTracking:{},bufferFlushDelay:1e3,trackExceptions:!1,optOut:!1,developerMode:!1},i=["pageTrack","eventTrack","exceptionTrack","transactionTrack","setAlias","setUsername","setUserProperties","setUserPropertiesOnce","setSuperProperties","setSuperPropertiesOnce","incrementProperty","userTimings","clearCookies"],o={},a={},s={};function u(e,n,r){return a[e]||(a[e]=[]),a[e].push(n),s[n]=r,function(){if(!this.settings.optOut){var n=Array.prototype.slice.apply(arguments);return this.$inject(["$q",t.bind(this,function(r){return r.all(a[e].map(function(e){var i=s[e]||{};if(i.async){var o=r.defer(),a=t.copy(n);return a.unshift(o.resolve),e.apply(this,a),o.promise}return r.when(e.apply(this,n))},this))})])}}}var l={settings:r};l.setOptOut=function(t){this.settings.optOut=t,g()},l.getOptOut=function(){return this.settings.optOut};var c={$get:["$injector",function(t){return d(t)}],api:l,settings:r,virtualPageviews:function(t){this.settings.pageTracking.autoTrackVirtualPages=t},trackStates:function(t){this.settings.pageTracking.trackStates=t},trackRoutes:function(t){this.settings.pageTracking.trackRoutes=t},excludeRoutes:function(t){this.settings.pageTracking.excludedRoutes=t},queryKeysWhitelist:function(t){this.settings.pageTracking.queryKeysWhitelisted=t},queryKeysBlacklist:function(t){this.settings.pageTracking.queryKeysBlacklisted=t},firstPageview:function(t){this.settings.pageTracking.autoTrackFirstPage=t},withBase:function(e){this.settings.pageTracking.basePath=e?t.element(document).find("base").attr("href"):""},withAutoBase:function(t){this.settings.pageTracking.autoBasePath=t},trackExceptions:function(t){this.settings.trackExceptions=t},developerMode:function(t){this.settings.developerMode=t}};function p(e,n,i){if(!r.developerMode){l[e]=u(e,n,i);var a=r[e],s=a?a.bufferFlushDelay:null,c=null!==s?s:r.bufferFlushDelay;t.forEach(o[e],function(t,e){var r,i;r=function(){n.apply(this,t)},(i=e*c)?setTimeout(r,i):r()})}}var d=function(e){return t.extend(l,{$inject:e.invoke})};function f(t){var e,r="register"+t.replace(/^./,function(t){return t.toUpperCase()});c[r]=function(e,n){p(t,e,n)},l[t]=u(t,(e=t,function(){n.waitForVendorCount&&(o[e]||(o[e]=[]),o[e].push(arguments))}))}function h(n,r,i){for(var o in t.forEach(r,i),n)e[o]=n[o]}var g=function(){h(c,i,f)};h(c,i,f)}).run(["$rootScope","$window","$analytics","$injector",function(e,n,r,i){function o(t,e,n){if(/\?/.test(t)&&e.length>0){for(var r=t.split("?"),i=r[0],o=r[1].split("&"),a=[],s=0;s-1)&&a.push(o[l]);var c="white"==n?a:function(t,e){for(var n=[],r=0;r0?i+"?"+c.join("&"):i}return t}function a(t,e){(function(t){for(var e=0;e-1)return!0}return!1})(t)||(t=o(t,r.settings.pageTracking.queryKeysWhitelisted,"white"),t=o(t,r.settings.pageTracking.queryKeysBlacklisted,"black"),r.pageTrack(t,e))}r.settings.pageTracking.autoTrackFirstPage&&i.invoke(["$location",function(t){var e=!0;if(i.has("$route")){var o=i.get("$route");if(o)for(var s in o.routes){e=!1;break}else null===o&&(e=!1)}else if(i.has("$state")){var u=i.get("$state");u.get().length>1&&(e=!1)}if(e)if(r.settings.pageTracking.autoBasePath&&(r.settings.pageTracking.basePath=n.location.pathname),r.settings.pageTracking.trackRelativePath){var l=r.settings.pageTracking.basePath+t.url();a(l,t)}else a(t.absUrl(),t)}]);r.settings.pageTracking.autoTrackVirtualPages&&i.invoke(["$location",function(t){r.settings.pageTracking.autoBasePath&&(r.settings.pageTracking.basePath=n.location.pathname+"#");var o=!0;if(r.settings.pageTracking.trackRoutes&&i.has("$route")){var s=i.get("$route");if(s)for(var u in s.routes){o=!1;break}else null===s&&(o=!1);e.$on("$routeChangeSuccess",function(e,n){if(!n||!(n.$$route||n).redirectTo){var i=r.settings.pageTracking.basePath+t.url();a(i,t)}})}r.settings.pageTracking.trackStates&&(i.has("$state")&&!i.has("$transitions")&&(o=!1,e.$on("$stateChangeSuccess",function(e,n){var i=r.settings.pageTracking.basePath+t.url();a(i,t)})),i.has("$state")&&i.has("$transitions")&&(o=!1,i.invoke(["$transitions",function(e){e.onSuccess({},function(e){var n=e.options();if(n.notify){var i=r.settings.pageTracking.basePath+t.url();a(i,t)}})}]))),o&&e.$on("$locationChangeSuccess",function(e,n){if(!n||!(n.$$route||n).redirectTo)if(r.settings.pageTracking.trackRelativePath){var i=r.settings.pageTracking.basePath+t.url();a(i,t)}else a(t.absUrl(),t)})}]);r.settings.developerMode&&t.forEach(r,function(t,e){"function"==typeof t&&(r[e]=function(){})})}]).directive("analyticsOn",["$analytics",function(e){return{restrict:"A",link:function(n,o,a){var s=a.analyticsOn||"click",u={};t.forEach(a.$attr,function(t,e){var n;"analytics"===(n=e).substr(0,9)&&-1===["On","Event","If","Properties","EventType"].indexOf(n.substr(9))&&(u[i(e)]=a[e],a.$observe(e,function(t){u[i(e)]=t}))}),t.element(o[0]).on(s,function(i){var s,l=a.analyticsEvent||(r(s=o[0])?s.innerText||s.value:s.id||s.name||s.tagName);u.eventType=i.type,a.analyticsIf&&!n.$eval(a.analyticsIf)||(a.analyticsProperties&&t.extend(u,n.$eval(a.analyticsProperties)),e.eventTrack(l,u))})}}}]).config(["$provide",function(t){t.decorator("$exceptionHandler",["$delegate","$injector",function(t,e){return function(n,r){var i=t(n,r),o=e.get("$analytics");return o.settings.trackExceptions&&o.exceptionTrack(n,r),i}}])}])}(angular),function(){var t;(t=angular.module("ui.bootstrap.showErrors",[])).directive("showErrors",["$timeout","showErrorsConfig","$interpolate",function(t,e,n){var r,i,o;return i=function(t){var n;return n=e.trigger,t&&null!=t.trigger&&(n=t.trigger),n},r=function(t){var n;return n=e.showSuccess,t&&null!=t.showSuccess&&(n=t.showSuccess),n},o=function(e,o,a,s){var u,l,c,p,d,f,h,g;if(u=!1,d=e.$eval(a.showErrors),f=r(d),g=i(d),l=o[0].querySelector(".form-control[name]"),p=angular.element(l),!(c=n(p.attr("name")||"")(e)))throw"show-errors element has no child input elements with a 'name' attribute and a 'form-control' class";return p.bind(g,function(){return u=!0,h(s[c].$invalid)}),e.$watch(function(){return s[c]&&s[c].$invalid},function(t){if(u)return h(t)}),e.$on("show-errors-check-validity",function(){return h(s[c].$invalid)}),e.$on("show-errors-reset",function(){return t(function(){return o.removeClass("has-error"),o.removeClass("has-success"),u=!1},0,!1)}),h=function(t){if(o.toggleClass("has-error",t),f)return o.toggleClass("has-success",!t)}},{restrict:"A",require:"^form",compile:function(t,e){if(-1===e.showErrors.indexOf("skipFormGroupCheck")&&!t.hasClass("form-group")&&!t.hasClass("input-group"))throw"show-errors element does not have the 'form-group' or 'input-group' class";return o}}}]),t.provider("showErrorsConfig",function(){var t,e;t=!1,e="blur",this.showSuccess=function(e){return t=e},this.trigger=function(t){return e=t},this.$get=function(){return{showSuccess:t,trigger:e}}})}.call(this),function(t,e){"use strict";function n(t,n,r){var i=r.baseHref(),o=t[0];return function(t,r,a){o.cookie=function(t,r,o){var a,s;s=(o=o||{}).expires,a=e.isDefined(o.path)?o.path:i,e.isUndefined(r)&&(s="Thu, 01 Jan 1970 00:00:00 GMT",r=""),e.isString(s)&&(s=new Date(s));var u=encodeURIComponent(t)+"="+encodeURIComponent(r);u+=a?";path="+a:"",u+=o.domain?";domain="+o.domain:"",u+=s?";expires="+s.toUTCString():"";var l=(u+=o.secure?";secure":"").length+1;return l>4096&&n.warn("Cookie '"+t+"' possibly not set or overflowed because it was too large ("+l+" > 4096 bytes)!"),u}(t,r,a)}}e.module("ngCookies",["ng"]).info({angularVersion:"1.6.7"}).provider("$cookies",[function(){var t=this.defaults={};function n(n){return n?e.extend({},t,n):t}this.$get=["$$cookieReader","$$cookieWriter",function(t,r){return{get:function(e){return t()[e]},getObject:function(t){var n=this.get(t);return n?e.fromJson(n):n},getAll:function(){return t()},put:function(t,e,i){r(t,e,n(i))},putObject:function(t,n,r){this.put(t,e.toJson(n),r)},remove:function(t,e){r(t,void 0,n(e))}}}]}]),e.module("ngCookies").factory("$cookieStore",["$cookies",function(t){return{get:function(e){return t.getObject(e)},put:function(e,n){t.putObject(e,n)},remove:function(e){t.remove(e)}}}]),n.$inject=["$document","$log","$browser"],e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=n})}(window,window.angular),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).angularCreditCards=t()}}(function(){return function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a=new Date(e,t)},month:{parse:function(t){return i(t)},isValid:r},year:{parse:o,format:function(t,e){return t=t.toString(),e?t.substr(2,4):t},isValid:function(t){return"number"==typeof t&&(t=i(t))>0},isPast:function(t){return(new Date).getFullYear()>t}}}},{"is-valid-month":21,"parse-int":24,"parse-year":25}],13:[function(t,e,n){"use strict";e.exports={card:t("./card"),cvc:t("./cvc"),expiration:t("./expiration")}},{"./card":10,"./cvc":11,"./expiration":12}],14:[function(t,e,n){"use strict";var r=t("creditcards-types"),i=t("to-camel-case"),o=t("xtend");e.exports=o(r,{get:function(t){return r.types[i(t)]}})},{"creditcards-types":7,"to-camel-case":26,xtend:29}],15:[function(t,e,n){"use strict";var r=t("zero-fill"),i=t("parse-int"),o=r(2);e.exports=function(t,e){var n=(e=e||new Date).getFullYear().toString().substr(0,2);return t=i(t),i(n+o(t))}},{"parse-int":24,"zero-fill":31}],16:[function(t,e,n){"use strict";var r;e.exports=(r=[0,2,4,6,8,1,3,5,7,9],function(t){if("string"!=typeof t)throw new TypeError("Expected string input");if(!t)return!1;for(var e,n=t.length,i=1,o=0;n;)e=parseInt(t.charAt(--n),10),o+=(i^=1)?r[e]:e;return!!o&&o%10==0})},{}],17:[function(t,e,n){"use strict";var r=Array.prototype.slice,i=Object.prototype.toString;e.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,o=r.call(arguments,1),a=Math.max(0,e.length-o.length),s=[],u=0;u=1&&t<=12)}},{"is-integer":20}],22:[function(t,e,n){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],23:[function(t,e,n){"use strict";e.exports=Number.isNaN||function(t){return t!=t}},{}],24:[function(t,e,n){"use strict";var r=t("is-integer");e.exports=function(t){return"number"==typeof t?r(t)?t:void 0:"string"==typeof t&&/^-?\d+$/.test(t)?parseInt(t,10):void 0}},{"is-integer":20}],25:[function(t,e,n){"use strict";var r=t("parse-int"),i=t("expand-year");e.exports=function(t,e,n){if(null!=(t=r(t)))return e?i(t,n):t}},{"expand-year":15,"parse-int":24}],26:[function(t,e,n){var r=t("to-space-case");e.exports=function(t){return r(t).replace(/\s(\w)/g,function(t,e){return e.toUpperCase()})}},{"to-space-case":28}],27:[function(t,e,n){e.exports=function(t){return r.test(t)?t.toLowerCase():i.test(t)?(n=t,n.replace(a,function(t,e){return e?" "+e:""})||t).toLowerCase():o.test(t)?(e=t,e.replace(s,function(t,e,n){return e+" "+n.toLowerCase().split("").join(" ")})).toLowerCase():t.toLowerCase();var e;var n};var r=/\s/,i=/(_|-|\.|:)/,o=/([a-z][A-Z]|[A-Z][a-z])/;var a=/[\W_]+(.|$)/g;var s=/(.)([A-Z]+)/g},{}],28:[function(t,e,n){var r=t("to-no-case");e.exports=function(t){return r(t).replace(/[\W_]+(.|$)/g,function(t,e){return e?" "+e:""}).trim()}},{"to-no-case":27}],29:[function(t,e,n){e.exports=function(){for(var t={},e=0;e0?new Array(e+(/\./.test(n)?2:1)).join(r)+n:n+"")}},{}]},{},[3])(3)}),angular.module("angular-jwt",["angular-jwt.options","angular-jwt.interceptor","angular-jwt.jwt","angular-jwt.authManager"]),angular.module("angular-jwt.authManager",[]).provider("authManager",function(){this.$get=["$rootScope","$injector","$location","jwtHelper","jwtInterceptor","jwtOptions",function(t,e,n,r,i,o){var a=o.getConfig();function s(t){return Array.isArray(t)?e.invoke(t,this,{options:null}):t()}function u(t){if(Array.isArray(t)||angular.isFunction(t))return e.invoke(t,a,{});throw new Error("unauthenticatedRedirector must be a function")}function l(){t.isAuthenticated=!0}function c(){t.isAuthenticated=!1}t.isAuthenticated=!1;var p=e.has("$state")?"$stateChangeStart":"$routeChangeStart";return t.$on(p,function(t,e){if(!e)return!1;var n=e.$$route?e.$$route:e.data;if(n&&!0===n.requiresLogin){var i=s(a.tokenGetter);i&&!r.isTokenExpired(i)||(t.preventDefault(),u(a.unauthenticatedRedirector))}}),{authenticate:l,unauthenticate:c,getToken:function(){return s(a.tokenGetter)},redirect:function(){return u(a.unauthenticatedRedirector)},checkAuthOnRefresh:function(){t.$on("$locationChangeStart",function(){var e=s(a.tokenGetter);e&&(r.isTokenExpired(e)?t.$broadcast("tokenHasExpired",e):l())})},redirectWhenUnauthenticated:function(){t.$on("unauthenticated",function(){u(a.unauthenticatedRedirector),c()})},isAuthenticated:function(){var t=s(a.tokenGetter);if(t)return!r.isTokenExpired(t)}}}]}),angular.module("angular-jwt.interceptor",[]).provider("jwtInterceptor",function(){this.urlParam,this.authHeader,this.authPrefix,this.whiteListedDomains,this.tokenGetter;var t=this;this.$get=["$q","$injector","$rootScope","urlUtils","jwtOptions",function(e,n,r,i,o){var a=angular.extend({},o.getConfig(),t);return{request:function(t){if(t.skipAuthorization||!function(t){if(!i.isSameOrigin(t)&&!a.whiteListedDomains.length)throw new Error("As of v0.1.0, requests to domains other than the application's origin must be white listed. Use jwtOptionsProvider.config({ whiteListedDomains: [] }); to whitelist.");for(var e=i.urlResolve(t).hostname.toLowerCase(),n=0;n(new Date).valueOf()+1e3*e)}}]),angular.module("angular-jwt.options",[]).provider("jwtOptions",function(){var t={};this.config=function(e){t=e},this.$get=function(){var e={urlParam:null,authHeader:"Authorization",authPrefix:"Bearer ",whiteListedDomains:[],tokenGetter:function(){return null},loginPath:"/",unauthenticatedRedirectPath:"/",unauthenticatedRedirector:["$location",function(t){t.path(this.unauthenticatedRedirectPath)}]};function n(){this.config=angular.extend({},e,t)}return n.prototype.getConfig=function(){return this.config},new n}}),angular.module("angular-jwt.interceptor").service("urlUtils",function(){var t=document.createElement("a"),e=n(window.location.href);function n(e){var n=e;return t.setAttribute("href",n),n=t.href,t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return{urlResolve:n,isSameOrigin:function(t){var r=angular.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}}),function(t,e){"use strict";var n,r,i,o;function a(){return["$animate",function(t){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(e,n,i,o,a){var s,u,l,c=n[0],p=i.ngMessage||i.when,d=i.ngMessageExp||i.whenExp,f=function(t){s=t?r(t)?t:t.split(/[\s,]+/):null,o.reRender()};d?(f(e.$eval(d)),e.$watchCollection(d,f)):f(p),o.register(c,l={test:function(t){return function(t,e){if(t)return r(t)?t.indexOf(e)>=0:t.hasOwnProperty(e)}(s,t)},attach:function(){u||a(function(e,r){t.enter(e,null,n);var i=(u=e).$$attachId=o.getAttachId();u.on("$destroy",function(){u&&u.$$attachId===i&&(o.deregister(c),l.detach()),r.$destroy()})})},detach:function(){if(u){var e=u;u=null,t.leave(e)}}})}}}]}e.module("ngMessages",[],function(){n=e.forEach,r=e.isArray,i=e.isString,o=e.element}).info({angularVersion:"1.6.7"}).directive("ngMessages",["$animate",function(t){var e="ng-active",r="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(i,s,u){var l=this,c=0,p=0;this.getAttachId=function(){return p++};var d,f,h=this.messages={};function g(t,e){for(var n=e,r=[];n&&n!==t;){var i=n.$$ngMessageNode;if(i&&i.length)return h[i];n.childNodes.length&&-1===r.indexOf(n)?(r.push(n),n=n.childNodes[n.childNodes.length-1]):n.previousSibling?n=n.previousSibling:(n=n.parentNode,r.push(n))}}this.render=function(c){d=!1,f=c=c||{};for(var p=o(s,u.ngMessagesMultiple)||o(s,u.multiple),h=[],g={},m=l.head,v=!1,y=0;null!=m;){y++;var b=m.message,w=!1;v||n(c,function(t,e){if(!w&&a(t)&&b.test(e)){if(g[e])return;g[e]=!0,w=!0,b.attach()}}),w?v=!p:h.push(b),m=m.next}n(h,function(t){t.detach()}),h.length!==y?t.setClass(i,e,r):t.setClass(i,r,e)},s.$watchCollection(u.ngMessages||u.for,l.render),i.on("$destroy",function(){n(h,function(t){t.message.detach()})}),this.reRender=function(){d||(d=!0,s.$evalAsync(function(){d&&f&&l.render(f)}))},this.register=function(t,e){var n=c.toString();h[n]={message:e},function(t,e,n){var r=h[n];if(l.head){var i=g(t,e);i?(r.next=i.next,i.next=r):(r.next=l.head,l.head=r)}else l.head=r}(i[0],t,n),t.$$ngMessageNode=n,c++,l.reRender()},this.deregister=function(t){var e,n,r,o,a=t.$$ngMessageNode;delete t.$$ngMessageNode,e=i[0],n=t,r=h[a],(o=g(e,n))?o.next=r.next:l.head=r.next,delete h[a],l.reRender()}}]};function o(t,e){return i(e)&&0===e.length||a(t.$eval(e))}function a(t){return i(t)?t.length:!!t}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(t,e,n){return{restrict:"AE",require:"^^ngMessages",link:function(e,o,a){var s=a.ngMessagesInclude||a.src;t(s).then(function(t){e.$$destroyed||(i(t)&&!t.trim()?r(o,s):n(t)(e,function(t){o.after(t),r(o,s)}))})}};function r(t,r){var i=n.$$createComment?n.$$createComment("ngMessagesInclude",r):e[0].createComment(" ngMessagesInclude: "+r+" "),a=o(i);t.after(a),t.remove()}}]).directive("ngMessage",a()).directive("ngMessageExp",a())}(window,window.angular);var app=angular.module("angular-promise-polyfill",[]).run(["$q","$window",function(t,e){e.Promise=function(e){return t(e)},e.Promise.all=t.all.bind(t),e.Promise.reject=t.reject.bind(t),e.Promise.resolve=t.when.bind(t),e.Promise.race=function(e){for(var n=t.defer(),r=0;r"))},end:function(t){t=a(t),r||!0!==C[t]||!0===g[t]||(o("")),t==r&&(r=!1)},chars:function(t){r||o(I(t))}}},u=t.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))};var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,h=/([^#-~ |!])/g,g=D("area,br,col,hr,img,wbr"),m=D("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),v=D("rp,rt"),y=r({},v,m),b=r({},m,D("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")),w=r({},v,D("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")),$=D("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"),k=D("script,style"),C=r({},g,b,w,y),x=D("background,cite,href,longdesc,src,xlink:href"),T=D("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"),S=D("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),E=r({},x,S,T);function D(t,e){var n,r={},i=t.split(",");for(n=0;n"+t;try{t=encodeURI(t)}catch(t){return}var n=new e.XMLHttpRequest;n.responseType="document",n.open("GET","data:text/html;charset=utf-8,"+t,!1),n.send(null);var r=n.response.body;return r.firstChild.remove(),r}}(t,t.document);function B(t){for(var e={},n=0,r=t.length;n/g,">")}function O(t,e){var n=e[t];if(n&&u.call(e,n))throw p("elclob","Failed to sanitize html because the element is clobbered: {0}",e.outerHTML||e.outerText);return n}}).info({angularVersion:"1.6.7"}),e.module("ngSanitize").filter("linky",["$sanitize",function(t){var n=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,i=e.$$minErr("linky"),o=e.isDefined,a=e.isFunction,u=e.isObject,l=e.isString;return function(e,p,d){if(null==e||""===e)return e;if(!l(e))throw i("notstring","Expected string but received: {0}",e);for(var f,h,g,m=a(d)?d:u(d)?function(){return d}:function(){return{}},v=e,y=[];f=v.match(n);)h=f[0],f[2]||f[4]||(h=(f[3]?"http://":"mailto:")+h),g=f.index,b(v.substr(0,g)),w(h,f[0].replace(r,"")),v=v.substring(g+f[0].length);return b(v),t(y.join(""));function b(t){var e,n;t&&y.push((e=t,c(n=[],s).chars(e),n.join("")))}function w(t,e){var n,r=m(t);for(n in y.push("'),b(e),y.push("")}}}])}(window,window.angular),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).angularStripe=t()}}(function(){return function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a>>0;return e=null==e?n||0:e<0?Math.max(r+e,0):Math.min(e,r)}e.exports=function(t,e,n){var i=t.length>>>0,o=[];for(e=r(t,e),n=r(t,n,i);ea){for(var e=0,n=i.length-o;e0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=e.call(this,i,o))}else n.push(o);return null==t?o:t.call(this,i,o)}}(e.exports=function(t,e,n,i){return JSON.stringify(t,r(e,i),n)}).getSerialize=r},{}],26:[function(t,e,n){"use strict";var r=t("assert-ok"),i=t("assert-equal"),o=t("dot-prop"),a=t("to-array"),s=t("array-last"),u=t("dezalgo"),l=t("call-all-fns");e.exports=function(t,e){r(Array.isArray(t),"methods are required"),i(typeof e,"function","load fn is required");var n=null,c=null,p=[];return e(function(t,e){c=t,n=e,l(p)(t,e),p=null}),t.reduce(function(t,e){var r;return o.set(t,e,(r=e,function(){var t=arguments;!function(t){if(t=u(t),n||c)return t(c,n);p.push(t)}(function(e,n){if(!e)return o.get(n,r).apply(null,t);var i=s(a(t));return"function"==typeof i?i(e):void 0})})),t},{})}},{"array-last":7,"assert-equal":12,"assert-ok":14,"call-all-fns":15,dezalgo:19,"dot-prop":27,"to-array":36}],27:[function(t,e,n){"use strict";var r=t("is-obj");function i(t){for(var e=t.split("."),n=[],r=0;r0&&(n+=r[0]);for(var o=1;o0?c=a.substring(0,s):!l&&a&&a.length>0&&(c=a),{base:c,query:l?a.substring(s+1):void 0});return e.base&&(n=e.base),o={},(r=e.query)?(u(r.split("&"),function(t){var e=t.split("="),n=i(e[0]),r=decodeURIComponent(n.val),a=e[1]&&decodeURIComponent(e[1]);"array"===n.type?(o[r]||(o[r]=[]),o[r].push(a)):"string"===n.type&&(o[r]=a)}),o):o}var r,o,a,s,l,c;return t});return e?a.apply({},r):n+function(t){var e,n=[];for(var r in t)t.hasOwnProperty(r)&&(void 0!==t[r]?(e=encodeURIComponent(r),o(t[r])?u(t[r],function(t){n.push(e+"[]="+encodeURIComponent(t))}):n.push(e+"="+encodeURIComponent(t[r]))):n.push(encodeURIComponent(r)));return n.length?"?"+n.join("&"):""}(a.apply({},r))},u=function(t,e){for(var n=0,r=t.length;n=0&&t.scope.refreshTimer(e)}};function f(e,n){var r=function(t){for(var e=0;e=e&&l[e-1].open.resolve(),l.length||(s.remove(),s=null,d=a.defer())}))}function h(n,o,h,m){return angular.isObject(h)&&(m=h,h=null),function(n){var o=g();if(function(){var t=o.preventDuplicates&&n.message===c,e=o.preventOpenDuplicates&&p[n.message];if(t||e)return!0;return c=n.message,p[n.message]=!0,!1}())return;var h=function(){var t={toastId:u++,isOpened:!1,scope:r.$new(),open:a.defer()};t.iconClass=n.iconClass,n.optionsOverride&&(angular.extend(o,function(t){for(var e=["containerId","iconClasses","maxOpened","newestOnTop","positionClass","preventDuplicates","preventOpenDuplicates","templates"],n=0,r=e.length;n"),e.get("$compile")(l)(s)),t;var s,l}();if(l.push(h),o.autoDismiss&&o.maxOpened&&l.length>o.maxOpened)for(var m=l.slice(0,l.length-o.maxOpened),v=0,y=m.length;v")).attr("id",e.containerId),s.addClass(e.positionClass),s.css({"pointer-events":"auto"});var n=angular.element(document.querySelector(e.target));if(!n||!n.length)throw"Target for toasts doesn't exist";return t.enter(s,n).then(function(){d.resolve()}),d.promise})(o).then(function(){if(h.isOpened=!0,o.newestOnTop)t.enter(h.el,s).then(function(){h.scope.init()});else{var e=s[0].lastChild?angular.element(s[0].lastChild):null;t.enter(h.el,s,e).then(function(){h.scope.init()})}})}),h}({iconClass:n,message:o,optionsOverride:m,title:h})}function g(){return angular.extend({},o)}}angular.module("toastr",[]).factory("toastr",t),t.$inject=["$animate","$injector","$document","$rootScope","$sce","toastrConfig","$q"]}(),function(){"use strict";angular.module("toastr").constant("toastrConfig",{allowHtml:!1,autoDismiss:!1,closeButton:!1,closeHtml:"",containerId:"toast-container",extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},maxOpened:0,messageClass:"toast-message",newestOnTop:!0,onHidden:null,onShown:null,onTap:null,positionClass:"toast-top-right",preventDuplicates:!1,preventOpenDuplicates:!1,progressBar:!1,tapToDismiss:!0,target:"body",templates:{toast:"directives/toast/toast.html",progressbar:"directives/progressbar/progressbar.html"},timeOut:5e3,titleClass:"toast-title",toastClass:"toast"})}(),function(){"use strict";function t(t){return{require:"^toast",templateUrl:function(){return t.templates.progressbar},link:function(t,e,n,r){var i,o,a;function s(){var t=(a-(new Date).getTime())/o*100;e.css("width",t+"%")}r.progressBar=t,t.start=function(t){i&&clearInterval(i),o=parseFloat(t),a=(new Date).getTime()+o,i=setInterval(s,10)},t.stop=function(){i&&clearInterval(i)},t.$on("$destroy",function(){clearInterval(i)})}}}angular.module("toastr").directive("progressBar",t),t.$inject=["toastrConfig"]}(),function(){"use strict";angular.module("toastr").controller("ToastController",function(){this.progressBar=null,this.startProgressBar=function(t){this.progressBar&&this.progressBar.start(t)},this.stopProgressBar=function(){this.progressBar&&this.progressBar.stop()}})}(),function(){"use strict";function t(t,e,n,r){return{templateUrl:function(){return n.templates.toast},controller:"ToastController",link:function(n,i,o,a){var s;if(n.toastClass=n.options.toastClass,n.titleClass=n.options.titleClass,n.messageClass=n.options.messageClass,n.progressBar=n.options.progressBar,n.options.closeHtml){var u=angular.element(n.options.closeHtml),l=t.get("$compile");u.addClass("toast-close-button"),u.attr("ng-click","close(true, $event)"),l(u)(n),i.children().prepend(u)}function c(t){return a.startProgressBar(t),e(function(){a.stopProgressBar(),r.remove(n.toastId)},t,1)}n.init=function(){n.options.timeOut&&(s=c(n.options.timeOut)),n.options.onShown&&n.options.onShown()},i.on("mouseenter",function(){n.progressBar=!1,a.stopProgressBar(),s&&e.cancel(s)}),n.tapToast=function(){angular.isFunction(n.options.onTap)&&n.options.onTap(),n.options.tapToDismiss&&n.close(!0)},n.close=function(t,e){e&&angular.isFunction(e.stopPropagation)&&e.stopPropagation(),r.remove(n.toastId,t)},n.refreshTimer=function(t){s&&(e.cancel(s),s=c(t||n.options.timeOut))},i.on("mouseleave",function(){0===n.options.timeOut&&0===n.options.extendedTimeOut||(n.$apply(function(){n.progressBar=n.options.progressBar}),s=c(n.options.extendedTimeOut))})}}}angular.module("toastr").directive("toast",t),t.$inject=["$injector","$interval","toastrConfig","toastr"]}(),function(){"use strict";function t(t,e,n,r,i,o,a){var s,u=0,l=[],c="",p={},d=a.defer();return{active:function(){return l.length},clear:function(t){if(1===arguments.length&&!t)return;if(t)f(t.toastId);else for(var e=0;e=0&&t.scope.refreshTimer(e)}};function f(e,n){var r=function(t){for(var e=0;e=e&&l[e-1].open.resolve(),l.length||(s.remove(),s=null,d=a.defer())}))}function h(n,o,h,m){return angular.isObject(h)&&(m=h,h=null),function(n){var o=g();if(function(){var t=o.preventDuplicates&&n.message===c,e=o.preventOpenDuplicates&&p[n.message];if(t||e)return!0;return c=n.message,p[n.message]=!0,!1}())return;var h=function(){var t={toastId:u++,isOpened:!1,scope:r.$new(),open:a.defer()};t.iconClass=n.iconClass,n.optionsOverride&&(angular.extend(o,function(t){for(var e=["containerId","iconClasses","maxOpened","newestOnTop","positionClass","preventDuplicates","preventOpenDuplicates","templates"],n=0,r=e.length;n"),e.get("$compile")(l)(s)),t;var s,l}();if(l.push(h),o.autoDismiss&&o.maxOpened&&l.length>o.maxOpened)for(var m=l.slice(0,l.length-o.maxOpened),v=0,y=m.length;v")).attr("id",e.containerId),s.addClass(e.positionClass),s.css({"pointer-events":"auto"});var n=angular.element(document.querySelector(e.target));if(!n||!n.length)throw"Target for toasts doesn't exist";return t.enter(s,n).then(function(){d.resolve()}),d.promise})(o).then(function(){if(h.isOpened=!0,o.newestOnTop)t.enter(h.el,s).then(function(){h.scope.init()});else{var e=s[0].lastChild?angular.element(s[0].lastChild):null;t.enter(h.el,s,e).then(function(){h.scope.init()})}})}),h}({iconClass:n,message:o,optionsOverride:m,title:h})}function g(){return angular.extend({},o)}}angular.module("toastr",[]).factory("toastr",t),t.$inject=["$animate","$injector","$document","$rootScope","$sce","toastrConfig","$q"]}(),function(){"use strict";angular.module("toastr").constant("toastrConfig",{allowHtml:!1,autoDismiss:!1,closeButton:!1,closeHtml:"",containerId:"toast-container",extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},maxOpened:0,messageClass:"toast-message",newestOnTop:!0,onHidden:null,onShown:null,onTap:null,positionClass:"toast-top-right",preventDuplicates:!1,preventOpenDuplicates:!1,progressBar:!1,tapToDismiss:!0,target:"body",templates:{toast:"directives/toast/toast.html",progressbar:"directives/progressbar/progressbar.html"},timeOut:5e3,titleClass:"toast-title",toastClass:"toast"})}(),function(){"use strict";function t(t){return{require:"^toast",templateUrl:function(){return t.templates.progressbar},link:function(t,e,n,r){var i,o,a;function s(){var t=(a-(new Date).getTime())/o*100;e.css("width",t+"%")}r.progressBar=t,t.start=function(t){i&&clearInterval(i),o=parseFloat(t),a=(new Date).getTime()+o,i=setInterval(s,10)},t.stop=function(){i&&clearInterval(i)},t.$on("$destroy",function(){clearInterval(i)})}}}angular.module("toastr").directive("progressBar",t),t.$inject=["toastrConfig"]}(),function(){"use strict";angular.module("toastr").controller("ToastController",function(){this.progressBar=null,this.startProgressBar=function(t){this.progressBar&&this.progressBar.start(t)},this.stopProgressBar=function(){this.progressBar&&this.progressBar.stop()}})}(),function(){"use strict";function t(t,e,n,r){return{templateUrl:function(){return n.templates.toast},controller:"ToastController",link:function(n,i,o,a){var s;if(n.toastClass=n.options.toastClass,n.titleClass=n.options.titleClass,n.messageClass=n.options.messageClass,n.progressBar=n.options.progressBar,n.options.closeHtml){var u=angular.element(n.options.closeHtml),l=t.get("$compile");u.addClass("toast-close-button"),u.attr("ng-click","close(true, $event)"),l(u)(n),i.children().prepend(u)}function c(t){return a.startProgressBar(t),e(function(){a.stopProgressBar(),r.remove(n.toastId)},t,1)}n.init=function(){n.options.timeOut&&(s=c(n.options.timeOut)),n.options.onShown&&n.options.onShown()},i.on("mouseenter",function(){n.progressBar=!1,a.stopProgressBar(),s&&e.cancel(s)}),n.tapToast=function(){angular.isFunction(n.options.onTap)&&n.options.onTap(),n.options.tapToDismiss&&n.close(!0)},n.close=function(t,e){e&&angular.isFunction(e.stopPropagation)&&e.stopPropagation(),r.remove(n.toastId,t)},n.refreshTimer=function(t){s&&(e.cancel(s),s=c(t||n.options.timeOut))},i.on("mouseleave",function(){0===n.options.timeOut&&0===n.options.extendedTimeOut||(n.$apply(function(){n.progressBar=n.options.progressBar}),s=c(n.options.extendedTimeOut))})}}}angular.module("toastr").directive("toast",t),t.$inject=["$injector","$interval","toastrConfig","toastr"]}(),angular.module("toastr").run(["$templateCache",function(t){t.put("directives/progressbar/progressbar.html",'
\n'),t.put("directives/toast/toast.html",'
\n
\n
{{title}}
\n
{{message}}
\n
\n
\n
\n \n
\n')}]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,n){"use strict";var r,i=e.isDefined,o=e.isFunction,a=e.isString,s=e.isObject,u=e.isArray,l=e.forEach,c=e.extend,p=e.copy,d=e.toJson;function f(t,e){return c(new(c(function(){},{prototype:t})),e)}function h(t){return l(arguments,function(e){e!==t&&l(e,function(e,n){t.hasOwnProperty(n)||(t[n]=e)})}),t}function g(t){if(Object.keys)return Object.keys(t);var e=[];return l(t,function(t,n){e.push(n)}),e}function m(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var n=t.length>>>0,r=Number(arguments[2])||0;for((r=r<0?Math.ceil(r):Math.floor(r))<0&&(r+=n);r=0||(s.push(i[l]),a[i[l]]=t[i[l]]);return c({},a,e)}function y(t,e){var n={};return l(t,function(t){n[t]=e[t]}),n}function b(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return l(n,function(n){n in t&&(e[n]=t[n])}),e}function w(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in t)-1==m(n,r)&&(e[r]=t[r]);return e}function $(t,e){var n=u(t),r=n?[]:{};return l(t,function(t,i){e(t,i)&&(r[n?r.length:i]=t)}),r}function k(t,e){var n=u(t)?[]:{};return l(t,function(t,r){n[r]=e(t,r)}),n}function C(t){return t.then(n,function(){})&&t}function x(t,e){var r=1,o=2,u={},p=[],d=u,f=c(t.when(u),{$$promises:u,$$values:u});this.study=function(u){if(!s(u))throw new Error("'invocables' must be an object");var v=g(u||{}),y=[],b=[],$={};function k(t){return s(t)&&t.then&&t.$$promises}return l(u,function t(n,i){if($[i]!==o){if(b.push(i),$[i]===r)throw b.splice(0,m(b,i)),new Error("Cyclic dependency: "+b.join(" -> "));if($[i]=r,a(n))y.push(i,[function(){return e.get(n)}],p);else{var s=e.annotate(n);l(s,function(e){e!==i&&u.hasOwnProperty(e)&&t(u[e],e)}),y.push(i,n,s)}b.pop(),$[i]=o}}),u=b=$=null,function(r,o,a){if(k(r)&&a===n&&(a=o,o=r,r=null),r){if(!s(r))throw new Error("'locals' must be an object")}else r=d;if(o){if(!k(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var u=t.defer(),p=C(u.promise),g=p.$$promises={},m=c({},r),b=1+y.length/3,$=!1;function x(){--b||($||h(m,o.$$values),p.$$values=m,p.$$promises=p.$$promises||!0,delete p.$$inheritedValues,u.resolve(m))}function T(t){p.$$failure=t,u.reject(t)}if(C(p),i(o.$$failure))return T(o.$$failure),p;o.$$inheritedValues&&h(m,w(o.$$inheritedValues,v)),c(g,o.$$promises),o.$$values?($=h(m,w(o.$$values,v)),p.$$inheritedValues=w(o.$$values,v),x()):(o.$$inheritedValues&&(p.$$inheritedValues=w(o.$$inheritedValues,v)),o.then(x,T));for(var S=0,E=y.length;S=0);)u=w(a.id,a.type,a.cfg,"path"),h+=$(a.segment,u.type.pattern.source,u.squash,u.isOptional),m.push(a.segment),g=p.lastIndex;var C=(l=t.substring(g)).indexOf("?");if(C>=0){var x=this.sourceSearch=l.substring(C);if(l=l.substring(0,C),this.sourcePath=t.substring(0,g+C),x.length>0)for(g=0;o=d.exec(x);)u=w((a=k(o,!0)).id,a.type,a.cfg,"search"),g=p.lastIndex}else this.sourcePath=t,this.sourceSearch="";h+=$(l)+(!1===e.strict?"/?":"")+"$",m.push(l),this.regexp=new RegExp(h,e.caseInsensitive?"i":n),this.prefix=m[0],this.$$paramNames=b}function S(t){c(this,t)}function E(t,r){var s,l=[],p=null,d=!1;function f(t,e,n){if(!n)return!1;var r=t.invoke(e,e,{$match:n});return!i(r)||r}function h(r,i,o,u,c){var f,h=u.baseHref(),g=r.url();function m(t){if(!t||!t.defaultPrevented){f&&r.url();f=n;var e,i=l.length;for(e=0;e=0)throw new Error("State must have a valid name");if($.hasOwnProperty(n))throw new Error("State '"+n+"' is already defined");var r,i,u=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):a(e.parent)?e.parent:s(e.parent)&&a(e.parent.name)?e.parent.name:"";if(u&&!$[u])return r=u,i=e.self,x[r]||(x[r]=[]),void x[r].push(i);for(var l in S)o(S[l])&&(e[l]=S[l](e,S.$delegates[l]));return $[n]=e,!e[T]&&e.url&&t.when(e.url,["$match","$stateParams",function(t,n){w.$current.navigable==e&&function(t,e,n){if(!n)for(var r in n=[],t)n.push(r);for(var i=0;i=I;r--)(a=g[r]).self.onExit&&S.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=I;r-1){if(!function(t){for(var e=t.split("."),n=w.$current.name.split("."),r=0,i=e.length;r2?u.enter(t,null,n).then(r):u.enter(t,null,n,r)},leave:function(t,n){e.version.minor>2?u.leave(t).then(n):u.leave(t,n)}};if(s){var r=s&&s(n,t);return{enter:function(t,e,n){r.enter(t,null,e),n()},leave:function(t,e){r.leave(t),e()}}}return{enter:function(t,e,n){e.after(t),n()},leave:function(t,e){t.remove(),e()}}}(c,n);a.inheritedData("$uiView");function y(s){var u,y=O(n,c,a,i),b=y&&t.$current&&t.$current.locals[y];if(s||b!==h){u=n.$new(),h=t.$current.locals[y],u.$emit("$viewContentLoading",y);var w=l(u,function(t){var i=o.defer(),s=o.defer(),u={$animEnter:i.promise,$animLeave:s.promise,$$animLeave:s};t.data("$uiViewAnim",u),v.enter(t,a,function(){i.resolve(),f&&f.$emit("$viewContentAnimationEnded"),(e.isDefined(m)&&!m||n.$eval(m))&&r(t)}),function(){if(p&&(p.remove(),p=null),f&&(f.$destroy(),f=null),d){var t=d.data("$uiViewAnim");v.leave(d,function(){t.$$animLeave.resolve(),p=null}),p=d,d=null}}()});d=w,(f=u).$emit("$viewContentLoaded",y),f.$eval(g)}}n.$on("$stateChangeSuccess",function(){y(!1)}),y(!0)}}}}function I(t,n,r,i){return{restrict:"ECA",priority:-400,compile:function(a){var s=a.html();return a.empty?a.empty():a[0].innerHTML=null,function(a,u,l){var c=r.$current,p=O(a,l,u,i),d=c&&c.locals[p];if(!d)return u.html(s),void t(u.contents())(a);u.data("$uiView",{name:p,state:d.$$state}),u.html(d.$template?d.$template:s);var f=e.extend({},d);a[d.$$resolveAs]=f;var h=t(u.contents());if(d.$$controller){d.$scope=a,d.$element=u;var g=n(d.$$controller,d);d.$$controllerAs&&(a[d.$$controllerAs]=g,a[d.$$controllerAs][d.$$resolveAs]=f),o(g.$onInit)&&g.$onInit(),u.data("$ngControllerController",g),u.children().data("$ngControllerController",g)}h(a)}}}}function O(t,e,n,r){var i=r(e.uiView||e.name||"")(t),o=n.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(o?o.state.name:"")}function M(t,e){var n,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t=e+"("+r[1]+")"),!(n=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/))||4!==n.length)throw new Error("Invalid state ref '"+t+"'");return{state:n[1],paramExpr:n[3]||null}}function P(t){var e=t.parent().inheritedData("$uiView");if(e&&e.state&&e.state.name)return e.state}function _(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),n="FORM"===t[0].nodeName;return{attr:n?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!n}}function R(t,e,n,r,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=n(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var l=r.isAnchor&&!s.href?1:0;o.preventDefault=function(){l--<=0&&n.cancel(u)}}}}function L(t,n){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,o,a){var s,u,l=M(o.uiSref,t.current.name),p={state:l.state,href:null,params:null},d=_(i),f=a[1]||a[0],h=null;p.options=c((u=t,{relative:P(i)||u.$current,inherit:!0}),o.uiSrefOpts?r.$eval(o.uiSrefOpts):{});var g=function(n){n&&(p.params=e.copy(n)),p.href=t.href(l.state,p.params,p.options),h&&h(),f&&(h=f.$$addStateInfo(l.state,p.params)),null!==p.href&&o.$set(d.attr,p.href)};l.paramExpr&&(r.$watch(l.paramExpr,function(t){t!==p.params&&g(t)},!0),p.params=e.copy(r.$eval(l.paramExpr))),g(),d.clickable&&(s=R(i,t,n,d,function(){return p}),i[i.on?"on":"bind"]("click",s),r.$on("$destroy",function(){i[i.off?"off":"unbind"]("click",s)}))}}}function N(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,r,i,o){var a,s=_(r),u=o[1]||o[0],l="["+[i.uiState,i.uiStateParams||null,i.uiStateOpts||null].map(function(t){return t||"null"}).join(", ")+"]",c={state:null,params:null,options:null,href:null},p=null;function d(e){c.state=e[0],c.params=e[1],c.options=e[2],c.href=t.href(c.state,c.params,c.options),p&&p(),u&&(p=u.$$addStateInfo(c.state,c.params)),c.href&&i.$set(s.attr,c.href)}n.$watch(l,d,!0),d(n.$eval(l)),s.clickable&&(a=R(r,t,e,s,function(){return c}),r[r.on?"on":"bind"]("click",a),n.$on("$destroy",function(){r[r.off?"off":"unbind"]("click",a)}))}}}function U(t,e,n){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,r,i,o){var u,c,p=[],f={};u=n(i.uiSrefActiveEq||"",!1)(e);try{c=e.$eval(i.uiSrefActive)}catch(t){}function h(n,i,o){var u=t.get(n,P(r)),l=function(t,n){if(!a(t))throw new Error("state should be a string");if(s(n))return t+d(n);if(n=e.$eval(n),s(n))return t+d(n);return t}(n,i),c={state:u||{name:n},params:i,hash:l};return p.push(c),f[l]=o,function(){var t=p.indexOf(c);-1!==t&&p.splice(t,1)}}function g(){for(var e=0;e0)){var n=h(t,e,c);return g(),n}},e.$on("$stateChangeSuccess",g),g()}]}}function j(t){var e=function(e,n){return t.is(e,n)};return e.$stateful=!0,e}function q(t){var e=function(e,n,r){return t.includes(e,n,r)};return e.$stateful=!0,e}e.module("ui.router.util",["ng"]),e.module("ui.router.router",["ui.router.util"]),e.module("ui.router.state",["ui.router.router","ui.router.util"]),e.module("ui.router",["ui.router.state"]),e.module("ui.router.compat",["ui.router"]),x.$inject=["$q","$injector"],e.module("ui.router.util").service("$resolve",x),e.module("ui.router.util").provider("$templateFactory",function(){var t=e.version.minor<3;this.shouldUnsafelyUseHttp=function(e){t=!!e},this.$get=["$http","$templateCache","$injector",function(e,n,r){return new function(t,e,n,r){this.fromConfig=function(t,e,n){return i(t.template)?this.fromString(t.template,e):i(t.templateUrl)?this.fromUrl(t.templateUrl,e):i(t.templateProvider)?this.fromProvider(t.templateProvider,e,n):null},this.fromString=function(t,e){return o(t)?t(e):t},this.fromUrl=function(i,a){return o(i)&&(i=i(a)),null==i?null:r?t.get(i,{cache:e,headers:{Accept:"text/html"}}).then(function(t){return t.data}):n.get("$templateRequest")(i)},this.fromProvider=function(t,e,r){return n.invoke(t,null,r||{params:e})}}(e,n,r,t)}]}),T.prototype.concat=function(t,e){var n={caseInsensitive:r.caseInsensitive(),strict:r.strictMode(),squash:r.defaultSquashPolicy()};return new T(this.sourcePath+t+this.sourceSearch,c(n,e),this)},T.prototype.toString=function(){return this.source},T.prototype.exec=function(t,e){var n=this.regexp.exec(t);if(!n)return null;e=e||{};var r,o,a,s,u,l=this.parameters(),c=l.length,p=this.segments.length-1,d={};if(p!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");function f(t){function e(t){return t.split("").reverse().join("")}return k(k(e(t).split(/-(?!\\)/),e),function(t){return t.replace(/\\-/g,"-")}).reverse()}for(r=0;r0&&(o=n(m,e))}function m(){var e=+t.interval;a&&!isNaN(e)&&e>0&&u.length?t.next():t.pause()}e.addClass("carousel"),s.addSlide=function(e,n){u.push({slide:e,element:n}),u.sort(function(t,e){return+t.slide.index-+e.slide.index}),(e.index===t.active||1===u.length&&!angular.isNumber(t.active))&&(t.$currentTransition&&(t.$currentTransition=null),c=e.index,t.active=e.index,d(c),s.select(u[f(e)]),1===u.length&&t.play())},s.getCurrentIndex=function(){for(var t=0;t0&&c===n?n>=u.length?(c=u.length-1,t.active=c,d(c),s.select(u[u.length-1])):(c=n,t.active=c,d(c),s.select(u[n])):c>n&&(c--,t.active=c),0===u.length&&(c=null,t.active=null)},s.select=t.select=function(n,r){var o=f(n.slide);void 0===r&&(r=o>s.getCurrentIndex()?"next":"prev"),n.slide.index===c||t.$currentTransition||function(n,r,o){if(p)return;if(angular.extend(n,{direction:o}),angular.extend(u[c].slide||{},{direction:o}),i.enabled(e)&&!t.$currentTransition&&u[r].element&&s.slides.length>1){u[r].element.data(l,n.direction);var a=s.getCurrentIndex();angular.isNumber(a)&&u[a].element&&u[a].element.data(l,n.direction),t.$currentTransition=!0,i.on("addClass",u[r].element,function(e,n){"close"===n&&(t.$currentTransition=null,i.off("addClass",e))})}t.active=n.index,c=n.index,d(r),g()}(n.slide,o,r)},t.indexOfSlide=function(t){return+t.slide.index},t.isActive=function(e){return t.active===e.slide.index},t.isPrevDisabled=function(){return 0===t.active&&t.noWrap()},t.isNextDisabled=function(){return t.active===u.length-1&&t.noWrap()},t.pause=function(){t.noPause||(a=!1,h())},t.play=function(){a||(a=!0,g())},e.on("mouseenter",t.pause),e.on("mouseleave",t.play),t.$on("$destroy",function(){p=!0,h()}),t.$watch("noTransition",function(t){i.enabled(e,!t)}),t.$watch("interval",g),t.$watchCollection("slides",function(e){e.length||(t.$currentTransition=null)}),t.$watch("active",function(t){if(angular.isNumber(t)&&c!==t){for(var e=0;e=1&&angular.version.minor>4&&a.push({key:"LLLL",regex:e.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.STANDALONEMONTH.indexOf(t)},formatter:function(t){return n(t,"LLLL")}})},this.init(),this.getParser=function(t){var e=u(t);return e&&e.apply||null},this.overrideParser=function(t,e){var n=u(t);n&&angular.isFunction(e)&&(this.parsers={},n.apply=e)}.bind(this),this.filter=function(t,n){return angular.isDate(t)&&!isNaN(t)&&n?(n=e.DATETIME_FORMATS[n]||n,e.id!==o&&this.init(),this.formatters[n]||(this.formatters[n]=function(t){for(var e,n,r=[],i=0;i=t.length||"'"!==t.charAt(i+1))&&(r.push(l(t,n,i)),n=null);else if(i===t.length)for(;n-1){var o=!1;t=t.split("");for(var s=i;s-1){t=t.split(""),n[i]="("+r.regex+")",t[i]="$";for(var o=i+1,a=i+r.key.length;o28)return 29===n&&(t%4==0&&t%100!=0||t%400==0);if(3===e||5===e||8===e||10===e)return n<31;return!0}(h.year,h.month,h.date)&&(!angular.isDate(u)||isNaN(u.getTime())||f?(g=new Date(0),b.call(g,h.year,h.month,h.date),w.call(g,h.hours||0,h.minutes||0,h.seconds||0,h.milliseconds||0)):(g=new Date(u),b.call(g,h.year,h.month,h.date),w.call(g,h.hours,h.minutes,h.seconds,h.milliseconds))),g}},this.toTimezone=function(t,e){return t&&e?h(t,e):t},this.fromTimezone=function(t,e){return t&&e?h(t,e,!0):t},this.timezoneToOffset=d,this.addDateMinutes=f,this.convertTimezoneToLocal=h}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(t){var e=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,n=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(r,i){var o=[],a=[],s={},u=i.uibIsClass.match(e),l=u[2],c=u[1].split(",");return function(e,r,i){o.push(e),a.push({scope:e,element:r}),c.forEach(function(r,i){!function(e,r){var i=e.match(n),o=r.$eval(i[1]),u=i[2],c=s[e];if(!c){var p=function(e){var n=null;a.some(function(t){var r=t.scope.$eval(l);if(r===e)return n=t,!0}),c.lastActivated!==n&&(c.lastActivated&&t.removeClass(c.lastActivated.element,o),n&&t.addClass(n.element,o),c.lastActivated=n)};s[e]=c={lastActivated:null,scope:r,watchFn:p,compareWithExp:u,watcher:r.$watch(u,p)}}c.watchFn(r.$eval(u))}(r,e)}),e.$on("$destroy",p)};function p(t){var e=t.targetScope,n=o.indexOf(e);if(o.splice(n,1),a.splice(n,1),o.length){var r=o[0];angular.forEach(s,function(t){t.scope===e&&(t.watcher=r.$watch(t.compareWithExp,t.watchFn),t.scope=r)})}else s={}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(t,e,n,r,i,o,a,s,u,l,c,p){var d=this,f={$setViewValue:angular.noop},h={},g=[];e.addClass("uib-datepicker"),n.$set("role","application"),t.datepickerOptions||(t.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(e){switch(e){case"customClass":case"dateDisabled":t[e]=t.datepickerOptions[e]||angular.noop;break;case"datepickerMode":t.datepickerMode=angular.isDefined(t.datepickerOptions.datepickerMode)?t.datepickerOptions.datepickerMode:u.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":d[e]=angular.isDefined(t.datepickerOptions[e])?i(t.datepickerOptions[e])(t.$parent):u[e];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":d[e]=angular.isDefined(t.datepickerOptions[e])?t.datepickerOptions[e]:u[e];break;case"startingDay":angular.isDefined(t.datepickerOptions.startingDay)?d.startingDay=t.datepickerOptions.startingDay:angular.isNumber(u.startingDay)?d.startingDay=u.startingDay:d.startingDay=(o.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":t.$watch("datepickerOptions."+e,function(t){t?angular.isDate(t)?d[e]=p.fromTimezone(new Date(t),h.getOption("timezone")):(l&&a.warn("Literal date support has been deprecated, please switch to date object usage"),d[e]=new Date(s(t,"medium"))):d[e]=u[e]?p.fromTimezone(new Date(u[e]),h.getOption("timezone")):null,d.refreshView()});break;case"maxMode":case"minMode":t.datepickerOptions[e]?t.$watch(function(){return t.datepickerOptions[e]},function(n){d[e]=t[e]=angular.isDefined(n)?n:t.datepickerOptions[e],("minMode"===e&&d.modes.indexOf(t.datepickerOptions.datepickerMode)d.modes.indexOf(d[e]))&&(t.datepickerMode=d[e],t.datepickerOptions.datepickerMode=d[e])}):d[e]=t[e]=u[e]||null}}),t.uniqueId="datepicker-"+t.$id+"-"+Math.floor(1e4*Math.random()),t.disabled=angular.isDefined(n.disabled)||!1,angular.isDefined(n.ngDisabled)&&g.push(t.$parent.$watch(n.ngDisabled,function(e){t.disabled=e,d.refreshView()})),t.isActive=function(e){return 0===d.compare(e.date,d.activeDate)&&(t.activeDateId=e.uid,!0)},this.init=function(e){h=function(e){var n;if(angular.version.minor<6)(n=e.$options||t.datepickerOptions.ngModelOptions||u.ngModelOptions||{}).getOption=function(t){return n[t]};else{var r=e.$options.getOption("timezone")||(t.datepickerOptions.ngModelOptions?t.datepickerOptions.ngModelOptions.timezone:null)||(u.ngModelOptions?u.ngModelOptions.timezone:null);n=e.$options.createChild(u.ngModelOptions).createChild(t.datepickerOptions.ngModelOptions).createChild(e.$options).createChild({timezone:r})}return n}(f=e),t.datepickerOptions.initDate?(d.activeDate=p.fromTimezone(t.datepickerOptions.initDate,h.getOption("timezone"))||new Date,t.$watch("datepickerOptions.initDate",function(t){t&&(f.$isEmpty(f.$modelValue)||f.$invalid)&&(d.activeDate=p.fromTimezone(t,h.getOption("timezone")),d.refreshView())})):d.activeDate=new Date;var n=f.$modelValue?new Date(f.$modelValue):new Date;this.activeDate=isNaN(n)?p.fromTimezone(new Date,h.getOption("timezone")):p.fromTimezone(n,h.getOption("timezone")),f.$render=function(){d.render()}},this.render=function(){if(f.$viewValue){var t=new Date(f.$viewValue);!isNaN(t)?this.activeDate=p.fromTimezone(t,h.getOption("timezone")):c||a.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){t.selectedDt=null,this._refreshView(),t.activeDt&&(t.activeDateId=t.activeDt.uid);var e=f.$viewValue?new Date(f.$viewValue):null;e=p.fromTimezone(e,h.getOption("timezone")),f.$setValidity("dateDisabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,n){var r=f.$viewValue?new Date(f.$viewValue):null;r=p.fromTimezone(r,h.getOption("timezone"));var i=new Date;i=p.fromTimezone(i,h.getOption("timezone"));var o=this.compare(e,i),a={date:e,label:p.filter(e,n),selected:r&&0===this.compare(e,r),disabled:this.isDisabled(e),past:o<0,current:0===o,future:o>0,customClass:this.customClass(e)||null};return r&&0===this.compare(e,r)&&(t.selectedDt=a),d.activeDate&&0===this.compare(a.date,d.activeDate)&&(t.activeDt=a),a},this.isDisabled=function(e){return t.disabled||this.minDate&&this.compare(e,this.minDate)<0||this.maxDate&&this.compare(e,this.maxDate)>0||t.dateDisabled&&t.dateDisabled({date:e,mode:t.datepickerMode})},this.customClass=function(e){return t.customClass({date:e,mode:t.datepickerMode})},this.split=function(t,e){for(var n=[];t.length>0;)n.push(t.splice(0,e));return n},t.select=function(e){if(t.datepickerMode===d.minMode){var n=f.$viewValue?p.fromTimezone(new Date(f.$viewValue),h.getOption("timezone")):new Date(0,0,0,0,0,0,0);n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n=p.toTimezone(n,h.getOption("timezone")),f.$setViewValue(n),f.$render()}else d.activeDate=e,m(d.modes[d.modes.indexOf(t.datepickerMode)-1]),t.$emit("uib:datepicker.mode");t.$broadcast("uib:datepicker.focus")},t.move=function(t){var e=d.activeDate.getFullYear()+t*(d.step.years||0),n=d.activeDate.getMonth()+t*(d.step.months||0);d.activeDate.setFullYear(e,n,1),d.refreshView()},t.toggleMode=function(e){e=e||1,t.datepickerMode===d.maxMode&&1===e||t.datepickerMode===d.minMode&&-1===e||(m(d.modes[d.modes.indexOf(t.datepickerMode)+e]),t.$emit("uib:datepicker.mode"))},t.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};function m(e){t.datepickerMode=e,t.datepickerOptions.datepickerMode=e}t.$on("uib:datepicker.focus",function(){d.element[0].focus()}),t.keydown=function(e){var n=t.keys[e.which];if(n&&!e.shiftKey&&!e.altKey&&!t.disabled)if(e.preventDefault(),d.shortcutPropagation||e.stopPropagation(),"enter"===n||"space"===n){if(d.isDisabled(d.activeDate))return;t.select(d.activeDate)}else!e.ctrlKey||"up"!==n&&"down"!==n?(d.handleKeyDown(n,e),d.refreshView()):t.toggleMode("up"===n?1:-1)},e.on("keydown",function(e){t.$apply(function(){t.keydown(e)})}),t.$on("$destroy",function(){for(;g.length;)g.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(t,e,n){var r=[31,28,31,30,31,30,31,31,30,31,30,31];function i(t,e){return 1!==e||t%4!=0||t%100==0&&t%400!=0?r[e]:29}function o(t){var e=new Date(t);e.setDate(e.getDate()+4-(e.getDay()||7));var n=e.getTime();return e.setMonth(0),e.setDate(1),Math.floor(Math.round((n-e)/864e5)/7)+1}this.step={months:1},this.element=e,this.init=function(e){angular.extend(e,this),t.showWeeks=e.showWeeks,e.refreshView()},this.getDates=function(t,e){for(var n,r=new Array(e),i=new Date(t),o=0;o0?7-a:-a,u=new Date(i);s>0&&u.setDate(1-s);for(var l=this.getDates(u,42),c=0;c<42;c++)l[c]=angular.extend(this.createDateObject(l[c],this.formatDay),{secondary:l[c].getMonth()!==r,uid:t.uniqueId+"-"+c});t.labels=new Array(7);for(var p=0;p<7;p++)t.labels[p]={abbr:n(l[p].date,this.formatDayHeader),full:n(l[p].date,"EEEE")};if(t.title=n(this.activeDate,this.formatDayTitle),t.rows=this.split(l,7),t.showWeeks){t.weekNumbers=[];for(var d=(11-this.startingDay)%7,f=t.rows.length,h=0;h3?this.monthColumns-2:1},this.compare=function(t,e){var n=new Date(t.getFullYear(),t.getMonth()),r=new Date(e.getFullYear(),e.getMonth());return n.setFullYear(t.getFullYear()),r.setFullYear(e.getFullYear()),n-r},this.handleKeyDown=function(t,e){var n=this.activeDate.getMonth();if("left"===t)n-=1;else if("up"===t)n-=this.monthColumns;else if("right"===t)n+=1;else if("down"===t)n+=this.monthColumns;else if("pageup"===t||"pagedown"===t){var r=this.activeDate.getFullYear()+("pageup"===t?-1:1);this.activeDate.setFullYear(r)}else"home"===t?n=0:"end"===t&&(n=11);this.activeDate.setMonth(n)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(t,e,n){var r,i;function o(t){return parseInt((t-1)/i,10)*i+1}this.element=e,this.yearpickerInit=function(){r=this.yearColumns,i=this.yearRows*r,this.step={years:i}},this._refreshView=function(){for(var e,n=new Array(i),a=0,s=o(this.activeDate.getFullYear());a');t.find("body").append(a),n=a[0].offsetWidth-a[0].clientWidth,n=isFinite(n)?n:0,a.remove()}return n},scrollbarPadding:function(t){t=this.getRawNode(t);var n=e.getComputedStyle(t),r=this.parseStyle(n.paddingRight),i=this.parseStyle(n.paddingBottom),o=this.scrollParent(t,!1,!0),s=this.scrollbarWidth(a.test(o.tagName));return{scrollbarWidth:s,widthOverflow:o.scrollWidth>o.clientWidth,right:r+s,originalRight:r,heightOverflow:o.scrollHeight>o.clientHeight,bottom:i+s,originalBottom:i}},isScrollable:function(t,n){t=this.getRawNode(t);var r=n?i.hidden:i.normal,o=e.getComputedStyle(t);return r.test(o.overflow+o.overflowY+o.overflowX)},scrollParent:function(n,r,o){n=this.getRawNode(n);var a=r?i.hidden:i.normal,s=t[0].documentElement,u=e.getComputedStyle(n);if(o&&a.test(u.overflow+u.overflowY+u.overflowX))return n;var l="absolute"===u.position,c=n.parentElement||s;if(c===s||"fixed"===u.position)return s;for(;c.parentElement&&c!==s;){var p=e.getComputedStyle(c);if(l&&"static"!==p.position&&(l=!1),!l&&a.test(p.overflow+p.overflowY+p.overflowX))break;c=c.parentElement}return c},position:function(n,r){n=this.getRawNode(n);var i=this.offset(n);if(r){var o=e.getComputedStyle(n);i.top-=this.parseStyle(o.marginTop),i.left-=this.parseStyle(o.marginLeft)}var a=this.offsetParent(n),s={top:0,left:0};return a!==t[0].documentElement&&((s=this.offset(a)).top+=a.clientTop-a.scrollTop,s.left+=a.clientLeft-a.scrollLeft),{width:Math.round(angular.isNumber(i.width)?i.width:n.offsetWidth),height:Math.round(angular.isNumber(i.height)?i.height:n.offsetHeight),top:Math.round(i.top-s.top),left:Math.round(i.left-s.left)}},offset:function(n){var r=(n=this.getRawNode(n)).getBoundingClientRect();return{width:Math.round(angular.isNumber(r.width)?r.width:n.offsetWidth),height:Math.round(angular.isNumber(r.height)?r.height:n.offsetHeight),top:Math.round(r.top+(e.pageYOffset||t[0].documentElement.scrollTop)),left:Math.round(r.left+(e.pageXOffset||t[0].documentElement.scrollLeft))}},viewportOffset:function(n,r,i){i=!1!==i;var o=(n=this.getRawNode(n)).getBoundingClientRect(),a={top:0,left:0,bottom:0,right:0},s=r?t[0].documentElement:this.scrollParent(n),u=s.getBoundingClientRect();if(a.top=u.top+s.clientTop,a.left=u.left+s.clientLeft,s===t[0].documentElement&&(a.top+=e.pageYOffset,a.left+=e.pageXOffset),a.bottom=a.top+s.clientHeight,a.right=a.left+s.clientWidth,i){var l=e.getComputedStyle(s);a.top+=this.parseStyle(l.paddingTop),a.bottom-=this.parseStyle(l.paddingBottom),a.left+=this.parseStyle(l.paddingLeft),a.right-=this.parseStyle(l.paddingRight)}return{top:Math.round(o.top-a.top),bottom:Math.round(a.bottom-o.bottom),left:Math.round(o.left-a.left),right:Math.round(a.right-o.right)}},parsePlacement:function(t){var e=o.auto.test(t);return e&&(t=t.replace(o.auto,"")),(t=t.split("-"))[0]=t[0]||"top",o.primary.test(t[0])||(t[0]="top"),t[1]=t[1]||"center",o.secondary.test(t[1])||(t[1]="center"),t[2]=!!e,t},positionElements:function(t,n,r,i){t=this.getRawNode(t),n=this.getRawNode(n);var a=angular.isDefined(n.offsetWidth)?n.offsetWidth:n.prop("offsetWidth"),s=angular.isDefined(n.offsetHeight)?n.offsetHeight:n.prop("offsetHeight");r=this.parsePlacement(r);var u=i?this.offset(t):this.position(t),l={top:0,left:0,placement:""};if(r[2]){var c=this.viewportOffset(t,i),p=e.getComputedStyle(n),d=a+Math.round(Math.abs(this.parseStyle(p.marginLeft)+this.parseStyle(p.marginRight))),f=s+Math.round(Math.abs(this.parseStyle(p.marginTop)+this.parseStyle(p.marginBottom)));if(r[0]="top"===r[0]&&f>c.top&&f<=c.bottom?"bottom":"bottom"===r[0]&&f>c.bottom&&f<=c.top?"top":"left"===r[0]&&d>c.left&&d<=c.right?"right":"right"===r[0]&&d>c.right&&d<=c.left?"left":r[0],r[1]="top"===r[1]&&f-u.height>c.bottom&&f-u.height<=c.top?"bottom":"bottom"===r[1]&&f-u.height>c.top&&f-u.height<=c.bottom?"top":"left"===r[1]&&d-u.width>c.right&&d-u.width<=c.left?"right":"right"===r[1]&&d-u.width>c.left&&d-u.width<=c.right?"left":r[1],"center"===r[1])if(o.vertical.test(r[0])){var h=u.width/2-a/2;c.left+h<0&&d-u.width<=c.right?r[1]="left":c.right+h<0&&d-u.width<=c.left&&(r[1]="right")}else{var g=u.height/2-f/2;c.top+g<0&&f-u.height<=c.bottom?r[1]="top":c.bottom+g<0&&f-u.height<=c.top&&(r[1]="bottom")}}switch(r[0]){case"top":l.top=u.top-s;break;case"bottom":l.top=u.top+u.height;break;case"left":l.left=u.left-a;break;case"right":l.left=u.left+u.width}switch(r[1]){case"top":l.top=u.top;break;case"bottom":l.top=u.top+u.height-s;break;case"left":l.left=u.left;break;case"right":l.left=u.left+u.width-a;break;case"center":o.vertical.test(r[0])?l.left=u.left+u.width/2-a/2:l.top=u.top+u.height/2-s/2}return l.top=Math.round(l.top),l.left=Math.round(l.left),l.placement="center"===r[1]?r[0]:r[0]+"-"+r[1],l},adjustTop:function(t,e,n,r){if(-1!==t.indexOf("top")&&n!==r)return{top:e.top-r+"px"}},positionArrow:function(t,n){var r=(t=this.getRawNode(t)).querySelector(".tooltip-inner, .popover-inner");if(r){var i=angular.element(r).hasClass("tooltip-inner"),a=i?t.querySelector(".tooltip-arrow"):t.querySelector(".arrow");if(a){var s={top:"",bottom:"",left:"",right:""};if("center"!==(n=this.parsePlacement(n))[1]){var u="border-"+n[0]+"-width",l=e.getComputedStyle(a)[u],c="border-";o.vertical.test(n[0])?c+=n[0]+"-"+n[1]:c+=n[1]+"-"+n[0],c+="-radius";var p=e.getComputedStyle(i?r:t)[c];switch(n[0]){case"top":s.bottom=i?"0":"-"+l;break;case"bottom":s.top=i?"0":"-"+l;break;case"left":s.right=i?"0":"-"+l;break;case"right":s.left=i?"0":"-"+l}s[n[1]]=p,angular.element(a).css(s)}else angular.element(a).css(s)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(t,e,n,r,i,o,a,s,u,l,c,p,d,f,h,g){var m,v,y,b,w,$,k,C,x,T,S,E,D,A=!1,B=[];function I(e){var n=p.parse(e,m,t.date);if(isNaN(n))for(var r=0;r
")).attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":w}),(C=angular.element(k.children()[0])).attr("template-url",$),t.datepickerOptions||(t.datepickerOptions={}),A&&"month"===n.type&&(t.datepickerOptions.datepickerMode="month",t.datepickerOptions.minMode="month"),C.attr("datepicker-options","datepickerOptions"),A?T.$formatters.push(function(e){return t.date=p.fromTimezone(e,S.getOption("timezone")),e}):(T.$$parserName="date",T.$validators.date=M,T.$parsers.unshift(O),T.$formatters.push(function(e){return T.$isEmpty(e)?(t.date=e,e):(angular.isNumber(e)&&(e=new Date(e)),t.date=p.fromTimezone(e,S.getOption("timezone")),p.filter(t.date,m))})),T.$viewChangeListeners.push(function(){t.date=I(T.$viewValue)}),e.on("keydown",_),E=r(k)(t),k.remove(),y?s.find("body").append(E):e.after(E),t.$on("$destroy",function(){for(!0===t.isOpen&&(u.$$phase||t.$apply(function(){t.isOpen=!1})),E.remove(),e.off("keydown",_),s.off("click",P),x&&x.off("scroll",R),angular.element(a).off("resize",R);B.length;)B.shift()()})},t.getText=function(e){return t[e+"Text"]||d[e+"Text"]},t.isDisabled=function(e){"today"===e&&(e=p.fromTimezone(new Date,S.getOption("timezone")));var n={};return angular.forEach(["minDate","maxDate"],function(e){t.datepickerOptions[e]?angular.isDate(t.datepickerOptions[e])?n[e]=new Date(t.datepickerOptions[e]):(g&&i.warn("Literal date support has been deprecated, please switch to date object usage"),n[e]=new Date(c(t.datepickerOptions[e],"medium"))):n[e]=null}),t.datepickerOptions&&n.minDate&&t.compare(e,n.minDate)<0||n.maxDate&&t.compare(e,n.maxDate)>0},t.compare=function(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate())-new Date(e.getFullYear(),e.getMonth(),e.getDate())},t.dateSelection=function(n){t.date=n;var r=t.date?p.filter(t.date,m):null;e.val(r),T.$setViewValue(r),v&&(t.isOpen=!1,e[0].focus())},t.keydown=function(n){27===n.which&&(n.stopPropagation(),t.isOpen=!1,e[0].focus())},t.select=function(e,n){if(n.stopPropagation(),"today"===e){var r=new Date;angular.isDate(t.date)?(e=new Date(t.date)).setFullYear(r.getFullYear(),r.getMonth(),r.getDate()):(e=p.fromTimezone(r,S.getOption("timezone"))).setHours(0,0,0,0)}t.dateSelection(e)},t.close=function(n){n.stopPropagation(),t.isOpen=!1,e[0].focus()},t.disabled=angular.isDefined(n.disabled)||!1,n.ngDisabled&&B.push(t.$parent.$watch(o(n.ngDisabled),function(e){t.disabled=e})),t.$watch("isOpen",function(r){r?t.disabled?t.isOpen=!1:f(function(){R(),b&&t.$broadcast("uib:datepicker.focus"),s.on("click",P);var r=n.popupPlacement?n.popupPlacement:d.placement;y||l.parsePlacement(r)[2]?(x=x||angular.element(l.scrollParent(e)))&&x.on("scroll",R):x=null,angular.element(a).on("resize",R)},0,!1):(s.off("click",P),x&&x.off("scroll",R),angular.element(a).off("resize",R))}),t.$on("uib:datepicker.mode",function(){f(R,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(t,e,n,r){var i=r[0];r[1].init(i)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(t){return function(e,n){var r;return function(){var i=this,o=Array.prototype.slice.call(arguments);r&&t.cancel(r),r=t(function(){e.apply(i,o)},n)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var t={};return{entries:function(){return Object.keys(t).map(function(e){return{key:e,value:t[e]}})},get:function(e){return t[e]},hasKey:function(e){return!!t[e]},keys:function(){return Object.keys(t)},put:function(e,n){t[e]||(t[e]=[]),t[e].push(n)},remove:function(e,n){var r=t[e];if(r){var i=r.indexOf(n);-1!==i&&r.splice(i,1),r.length||delete t[e]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(t,e,n){var r=null,i=n.createNew();this.isOnlyOpen=function(t,e){var n=i.get(e);if(n&&n.reduce(function(e,n){return n.scope===t?n:e},{}))return 1===n.length;return!1},this.open=function(e,n,a){if(r||t.on("click",o),r&&r!==e&&(r.isOpen=!1),r=e,a){var s=i.get(a);if(s)-1===s.map(function(t){return t.scope}).indexOf(e)&&i.put(a,{scope:e});else i.put(a,{scope:e})}},this.close=function(e,n,a){if(r===e&&(t.off("click",o),t.off("keydown",this.keybindFilter),r=null),a){var s=i.get(a);if(s){var u=s.reduce(function(t,n){return n.scope===e?n:t},{});u&&i.remove(a,u)}}};var o=function(t){if(r&&r.isOpen&&!(t&&"disabled"===r.getAutoClose()||t&&3===t.which)){var n=r.getToggleElement();if(!(t&&n&&n[0].contains(t.target))){var i=r.getDropdownElement();t&&"outsideClick"===r.getAutoClose()&&i&&i[0].contains(t.target)||(r.focusToggleElement(),r.isOpen=!1,e.$$phase||r.$apply())}}};this.keybindFilter=function(t){if(r){var e=r.getDropdownElement(),n=r.getToggleElement(),i=e&&e[0].contains(t.target),a=n&&n[0].contains(t.target);27===t.which?(t.stopPropagation(),r.focusToggleElement(),o()):r.isKeynavEnabled()&&-1!==[38,40].indexOf(t.which)&&r.isOpen&&(i||a)&&(t.preventDefault(),t.stopPropagation(),r.focusDropdownEntry(t.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(t,e,n,r,i,o,a,s,u,l,c){var p,d,f=this,h=t.$new(),g=i.appendToOpenClass,m=i.openClass,v=angular.noop,y=n.onToggle?r(n.onToggle):angular.noop,b=!1,w=u.find("body");function $(){e.append(f.dropdownMenu)}e.addClass("dropdown"),this.init=function(){n.isOpen&&(d=r(n.isOpen),v=d.assign,t.$watch(d,function(t){h.isOpen=!!t})),b=angular.isDefined(n.keyboardNav)},this.toggle=function(t){return h.isOpen=arguments.length?!!t:!h.isOpen,angular.isFunction(v)&&v(h,h.isOpen),h.isOpen},this.isOpen=function(){return h.isOpen},h.getToggleElement=function(){return f.toggleElement},h.getAutoClose=function(){return n.autoClose||"always"},h.getElement=function(){return e},h.isKeynavEnabled=function(){return b},h.focusDropdownEntry=function(t){var n=f.dropdownMenu?angular.element(f.dropdownMenu).find("a"):e.find("ul").eq(0).find("a");switch(t){case 40:angular.isNumber(f.selectedOption)?f.selectedOption=f.selectedOption===n.length-1?f.selectedOption:f.selectedOption+1:f.selectedOption=0;break;case 38:angular.isNumber(f.selectedOption)?f.selectedOption=0===f.selectedOption?0:f.selectedOption-1:f.selectedOption=n.length-1}n[f.selectedOption].focus()},h.getDropdownElement=function(){return f.dropdownMenu},h.focusToggleElement=function(){f.toggleElement&&f.toggleElement[0].focus()},h.$watch("isOpen",function(i,d){var b=null,k=!1;if(angular.isDefined(n.dropdownAppendTo)){var C=r(n.dropdownAppendTo)(h);C&&(b=angular.element(C))}angular.isDefined(n.dropdownAppendToBody)&&(!1!==r(n.dropdownAppendToBody)(h)&&(k=!0));if(k&&!b&&(b=w),b&&f.dropdownMenu&&(i?(b.append(f.dropdownMenu),e.on("$destroy",$)):(e.off("$destroy",$),$())),b&&f.dropdownMenu){var x,T,S,E=s.positionElements(e,f.dropdownMenu,"bottom-left",!0),D=0;if(x={top:E.top+"px",display:i?"block":"none"},(T=f.dropdownMenu.hasClass("dropdown-menu-right"))?(x.left="auto",(S=s.scrollbarPadding(b)).heightOverflow&&S.scrollbarWidth&&(D=S.scrollbarWidth),x.right=window.innerWidth-D-(E.left+e.prop("offsetWidth"))+"px"):(x.left=E.left+"px",x.right="auto"),!k){var A=s.offset(b);x.top=E.top-A.top+"px",T?x.right=window.innerWidth-(E.left-A.left+e.prop("offsetWidth"))+"px":x.left=E.left-A.left+"px"}f.dropdownMenu.css(x)}var B=b||e,I=b?g:m,O=B.hasClass(I),M=o.isOnlyOpen(t,b);O===!i&&a[b?M?"removeClass":"addClass":i?"addClass":"removeClass"](B,I).then(function(){angular.isDefined(i)&&i!==d&&y(t,{open:!!i})});if(i)f.dropdownMenuTemplateUrl?c(f.dropdownMenuTemplateUrl).then(function(t){p=h.$new(),l(t.trim())(p,function(t){var e=t;f.dropdownMenu.replaceWith(e),f.dropdownMenu=e,u.on("keydown",o.keybindFilter)})}):u.on("keydown",o.keybindFilter),h.focusToggleElement(),o.open(h,e,b);else{if(o.close(h,e,b),f.dropdownMenuTemplateUrl){p&&p.$destroy();var P=angular.element('');f.dropdownMenu.replaceWith(P),f.dropdownMenu=P}f.selectedOption=null}angular.isFunction(v)&&v(t,i)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(t,e,n,r){r.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(t,e,n,r){if(r&&!angular.isDefined(n.dropdownNested)){e.addClass("dropdown-menu");var i=n.templateUrl;i&&(r.dropdownMenuTemplateUrl=i),r.dropdownMenu||(r.dropdownMenu=e)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(t,e,n,r){if(r){e.addClass("dropdown-toggle"),r.toggleElement=e;var i=function(i){i.preventDefault(),e.hasClass("disabled")||n.disabled||t.$apply(function(){r.toggle()})};e.on("click",i),e.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(r.isOpen,function(t){e.attr("aria-expanded",!!t)}),t.$on("$destroy",function(){e.off("click",i)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var t=[];return{add:function(e,n){t.push({key:e,value:n})},get:function(e){for(var n=0;n-1&&t0&&(e=f.top().value).modalDomEl.toggleClass(e.windowTopClass||"",t)}function C(e,n,r,i){var a,s=null;return n.$broadcast(g.NOW_CLOSING_EVENT,function(){return a||(a=o.defer(),s=a.promise),function(){a.resolve()}}),o.when(s).then(function o(){if(o.done)return;o.done=!0;t.leave(e).then(function(){r&&r(),e.remove(),i&&i.resolve()});n.$destroy()})}function x(t){if(t.isDefaultPrevented())return t;var e=f.top();if(e)switch(t.which){case 27:e.value.keyboard&&(t.preventDefault(),i.$apply(function(){g.dismiss(e.key,"escape key press")}));break;case 9:var n=g.loadFocusElementList(e),r=!1;t.shiftKey?(g.isFocusInFirstItem(t,n)||g.isModalFocused(t,e))&&(r=g.focusLastFocusableElement(n)):g.isFocusInLastItem(t,n)&&(r=g.focusFirstFocusableElement(n)),r&&(t.preventDefault(),t.stopPropagation())}}function T(t,e,n){return!t.value.modalScope.$broadcast("modal.closing",e,n).defaultPrevented}function S(){Array.prototype.forEach.call(document.querySelectorAll("["+y+"]"),function(t){var e=parseInt(t.getAttribute(y),10)-1;t.setAttribute(y,e),e||(t.removeAttribute(y),t.removeAttribute("aria-hidden"))})}return i.$watch(w,function(t){c&&(c.index=t)}),n.on("keydown",x),i.$on("$destroy",function(){n.off("keydown",x)}),g.open=function(e,o){var a=n[0].activeElement,s=o.openedClass||d;k(!1),v=f.top(),f.add(e,{deferred:o.deferred,renderDeferred:o.renderDeferred,closedDeferred:o.closedDeferred,modalScope:o.scope,backdrop:o.backdrop,keyboard:o.keyboard,openedClass:o.openedClass,windowTopClass:o.windowTopClass,animation:o.animation,appendTo:o.appendTo}),h.put(s,e);var g,$=o.appendTo,C=w();C>=0&&!l&&((c=i.$new(!0)).modalOptions=o,c.index=C,(l=angular.element('
')).attr({class:"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),o.backdropClass&&l.addClass(o.backdropClass),o.animation&&l.attr("modal-animation","true"),r(l)(c),t.enter(l,$),u.isScrollable($)&&(p=u.scrollbarPadding($)).heightOverflow&&p.scrollbarWidth&&$.css({paddingRight:p.right+"px"})),o.component?(g=document.createElement(o.component.name.replace(b,function(t,e){return(e?"-":"")+t.toLowerCase()})),(g=angular.element(g)).attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):g=o.content,m=v?parseInt(v.value.modalDomEl.attr("index"),10)+1:0;var x=angular.element('
');x.attr({class:"modal","template-url":o.windowTemplateUrl,"window-top-class":o.windowTopClass,role:"dialog","aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,size:o.size,index:m,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(g),o.windowClass&&x.addClass(o.windowClass),o.animation&&x.attr("modal-animation","true"),$.addClass(s),o.scope&&(o.scope.$$topModalIndex=m),t.enter(r(x)(o.scope),$),f.top().value.modalDomEl=x,f.top().value.modalOpener=a,function t(e){if(!e||"BODY"===e[0].tagName)return;(n=e,r=n.parent()?n.parent().children():[],Array.prototype.filter.call(r,function(t){return t!==n[0]})).forEach(function(t){var e="true"===t.getAttribute("aria-hidden"),n=parseInt(t.getAttribute(y),10);n||(n=e?1:0),t.setAttribute(y,n+1),t.setAttribute("aria-hidden","true")});var n,r;return t(e.parent())}(x)},g.close=function(t,e){var n=f.get(t);return S(),n&&T(n,e,!0)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.resolve(e),$(t,n.value.modalOpener),!0):!n},g.dismiss=function(t,e){var n=f.get(t);return S(),n&&T(n,e,!1)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.reject(e),$(t,n.value.modalOpener),!0):!n},g.dismissAll=function(t){for(var e=this.getTop();e&&this.dismiss(e.key,t);)e=this.getTop()},g.getTop=function(){return f.top()},g.modalRendered=function(t){var e=f.get(t);e&&e.value.renderDeferred.resolve()},g.focusFirstFocusableElement=function(t){return t.length>0&&(t[0].focus(),!0)},g.focusLastFocusableElement=function(t){return t.length>0&&(t[t.length-1].focus(),!0)},g.isModalFocused=function(t,e){if(t&&e){var n=e.value.modalDomEl;if(n&&n.length)return(t.target||t.srcElement)===n[0]}return!1},g.isFocusInFirstItem=function(t,e){return e.length>0&&(t.target||t.srcElement)===e[0]},g.isFocusInLastItem=function(t,e){return e.length>0&&(t.target||t.srcElement)===e[e.length-1]},g.loadFocusElementList=function(t){if(t){var e=t.value.modalDomEl;if(e&&e.length){var n=e[0].querySelectorAll("a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]");return n?Array.prototype.filter.call(n,function(t){return!!((e=t).offsetWidth||e.offsetHeight||e.getClientRects().length);var e}):n}}},g}]).provider("$uibModal",function(){var t={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(e,n,r,i,o,a,s){var u={};var l=null;return u.getPromiseChain=function(){return l},u.open=function(u){var c,p,d,f=n.defer(),h=n.defer(),g=n.defer(),m=n.defer(),v={result:f.promise,opened:h.promise,closed:g.promise,rendered:m.promise,close:function(t){return s.close(v,t)},dismiss:function(t){return s.dismiss(v,t)}};if((u=angular.extend({},t.options,u)).resolve=u.resolve||{},u.appendTo=u.appendTo||r.find("body").eq(0),!u.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!u.component&&!u.template&&!u.templateUrl)throw new Error("One of component or template or templateUrl options is required.");function y(){return c}return c=u.component?n.when(a.resolve(u.resolve,{},null,null)):n.all([(p=u,p.template?n.when(p.template):i(angular.isFunction(p.templateUrl)?p.templateUrl():p.templateUrl)),a.resolve(u.resolve,{},null,null)]),d=l=n.all([l]).then(y,y).then(function(t){var n=u.scope||e,r=n.$new();r.$close=v.close,r.$dismiss=v.dismiss,r.$on("$destroy",function(){r.$$uibDestructionScheduled||r.$dismiss("$uibUnscheduledDestruction")});var i,a,l={scope:r,deferred:f,renderDeferred:m,closedDeferred:g,animation:u.animation,backdrop:u.backdrop,keyboard:u.keyboard,backdropClass:u.backdropClass,windowTopClass:u.windowTopClass,windowClass:u.windowClass,windowTemplateUrl:u.windowTemplateUrl,ariaLabelledBy:u.ariaLabelledBy,ariaDescribedBy:u.ariaDescribedBy,size:u.size,openedClass:u.openedClass,appendTo:u.appendTo},c={},p={};function d(e,n,i,o){e.$scope=r,e.$scope.$resolve={},i?e.$scope.$uibModalInstance=v:e.$uibModalInstance=v;var a=n?t[1]:t;angular.forEach(a,function(t,n){o&&(e[n]=t),e.$scope.$resolve[n]=t})}u.component?(d(c,!1,!0,!1),c.name=u.component,l.component=c):u.controller&&(d(p,!0,!1,!0),a=o(u.controller,p,!0,u.controllerAs),u.controllerAs&&u.bindToController&&((i=a.instance).$close=r.$close,i.$dismiss=r.$dismiss,angular.extend(i,{$resolve:p.$scope.$resolve},n)),i=a(),angular.isFunction(i.$onInit)&&i.$onInit()),u.component||(l.content=t[0]),s.open(v,l),h.resolve(!0)},function(t){h.reject(t),f.reject(t)}).finally(function(){l===d&&(l=null)}),v},u}]};return t}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(t){return{create:function(e,n,r){e.setNumPages=r.numPages?t(r.numPages).assign:angular.noop,e.ngModelCtrl={$setViewValue:angular.noop},e._watchers=[],e.init=function(t,i){e.ngModelCtrl=t,e.config=i,t.$render=function(){e.render()},r.itemsPerPage?e._watchers.push(n.$parent.$watch(r.itemsPerPage,function(t){e.itemsPerPage=parseInt(t,10),n.totalPages=e.calculateTotalPages(),e.updatePage()})):e.itemsPerPage=i.itemsPerPage,n.$watch("totalItems",function(t,r){(angular.isDefined(t)||t!==r)&&(n.totalPages=e.calculateTotalPages(),e.updatePage())})},e.calculateTotalPages=function(){var t=e.itemsPerPage<1?1:Math.ceil(n.totalItems/e.itemsPerPage);return Math.max(t||0,1)},e.render=function(){n.page=parseInt(e.ngModelCtrl.$viewValue,10)||1},n.selectPage=function(t,r){r&&r.preventDefault(),(!n.ngDisabled||!r)&&n.page!==t&&t>0&&t<=n.totalPages&&(r&&r.target&&r.target.blur(),e.ngModelCtrl.$setViewValue(t),e.ngModelCtrl.$render())},n.getText=function(t){return n[t+"Text"]||e.config[t+"Text"]},n.noPrevious=function(){return 1===n.page},n.noNext=function(){return n.page===n.totalPages},e.updatePage=function(){e.setNumPages(n.$parent,n.totalPages),n.page>n.totalPages?n.selectPage(n.totalPages):e.ngModelCtrl.$render()},n.$on("$destroy",function(){for(;e._watchers.length;)e._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(t,e,n,r){t.align=angular.isDefined(e.align)?t.$parent.$eval(e.align):r.align,n.create(this,t,e)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(t){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(t,e){return e.templateUrl||"uib/template/pager/pager.html"},link:function(e,n,r,i){n.addClass("pager");var o=i[0],a=i[1];a&&o.init(a,t)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(t,e,n,r,i){var o=this,a=angular.isDefined(e.maxSize)?t.$parent.$eval(e.maxSize):i.maxSize,s=angular.isDefined(e.rotate)?t.$parent.$eval(e.rotate):i.rotate,u=angular.isDefined(e.forceEllipses)?t.$parent.$eval(e.forceEllipses):i.forceEllipses,l=angular.isDefined(e.boundaryLinkNumbers)?t.$parent.$eval(e.boundaryLinkNumbers):i.boundaryLinkNumbers,c=angular.isDefined(e.pageLabel)?function(n){return t.$parent.$eval(e.pageLabel,{$page:n})}:angular.identity;function p(t,e,n){return{number:t,text:e,active:n}}t.boundaryLinks=angular.isDefined(e.boundaryLinks)?t.$parent.$eval(e.boundaryLinks):i.boundaryLinks,t.directionLinks=angular.isDefined(e.directionLinks)?t.$parent.$eval(e.directionLinks):i.directionLinks,e.$set("role","menu"),r.create(this,t,e),e.maxSize&&o._watchers.push(t.$parent.$watch(n(e.maxSize),function(t){a=parseInt(t,10),o.render()}));var d=this.render;this.render=function(){d(),t.page>0&&t.page<=t.totalPages&&(t.pages=function(t,e){var n=[],r=1,i=e,o=angular.isDefined(a)&&ae&&(r=(i=e)-a+1):(r=(Math.ceil(t/a)-1)*a+1,i=Math.min(r+a-1,e)));for(var d=r;d<=i;d++){var f=p(d,c(d),d===t);n.push(f)}if(o&&a>0&&(!s||u||l)){if(r>1){if(!l||r>3){var h=p(r-1,"...",!1);n.unshift(h)}if(l){if(3===r){var g=p(2,"2",!1);n.unshift(g)}var m=p(1,"1",!1);n.unshift(m)}}if(i';return{compile:function(t,e){var n=i(y);return function(t,e,i,u){var p,g,m,v,y,b,w,$,k=!!angular.isDefined(f.appendToBody)&&f.appendToBody,C=h(void 0),x=angular.isDefined(i[l+"Enable"]),T=t.$new(!0),S=!1,E=!!angular.isDefined(i[l+"IsOpen"])&&c(i[l+"IsOpen"]),D=!!f.useContentExp&&c(i[r]),A=[],B=function(){p&&p.html()&&(b||(b=o(function(){var t=s.positionElements(e,p,T.placement,k),n=angular.isDefined(p.offsetHeight)?p.offsetHeight:p.prop("offsetHeight"),r=k?s.offset(e):s.position(e);p.css({top:t.top+"px",left:t.left+"px"});var i=t.placement.split("-");p.hasClass(i[0])||(p.removeClass($.split("-")[0]),p.addClass(i[0])),p.hasClass(f.placementClassPrefix+t.placement)||(p.removeClass(f.placementClassPrefix+$),p.addClass(f.placementClassPrefix+t.placement)),w=o(function(){var t=angular.isDefined(p.offsetHeight)?p.offsetHeight:p.prop("offsetHeight"),e=s.adjustTop(i,r,n,t);e&&p.css(e),w=null},0,!1),p.hasClass("uib-position-measure")?(s.positionArrow(p,t.placement),p.removeClass("uib-position-measure")):$!==t.placement&&s.positionArrow(p,t.placement),$=t.placement,b=null},0,!1)))};function I(){T.isOpen?M():O()}function O(){x&&!t.$eval(i[l+"Enable"])||(L(),function(){T.title=i[l+"Title"],T.content=D?D(t):i[r];T.popupClass=i[l+"Class"],T.placement=angular.isDefined(i[l+"Placement"])?i[l+"Placement"]:f.placement;var e=s.parsePlacement(T.placement);$=e[1]?e[0]+"-"+e[1]:e[0];var n=parseInt(i[l+"PopupDelay"],10),o=parseInt(i[l+"PopupCloseDelay"],10);T.popupDelay=isNaN(n)?f.popupDelay:n,T.popupCloseDelay=isNaN(o)?f.popupCloseDelay:o}(),T.popupDelay?v||(v=o(P,T.popupDelay,!1)):P())}function M(){_(),T.popupCloseDelay?y||(y=o(R,T.popupCloseDelay,!1)):R()}function P(){if(_(),L(),!T.content)return angular.noop;!function(){if(p)return;g=T.$new(),p=n(g,function(t){k?a.find("body").append(t):e.after(t)}),d.add(T,{close:R}),function(){A.length=0,D?(A.push(t.$watch(D,function(t){T.content=t,!t&&T.isOpen&&R()})),A.push(g.$watch(function(){S||(S=!0,g.$$postDigest(function(){S=!1,T&&T.isOpen&&B()}))}))):A.push(i.$observe(r,function(t){T.content=t,!t&&T.isOpen?R():B()}));A.push(i.$observe(l+"Title",function(t){T.title=t,T.isOpen&&B()})),A.push(i.$observe(l+"Placement",function(t){T.placement=t||f.placement,T.isOpen&&B()}))}()}(),T.$evalAsync(function(){T.isOpen=!0,U(!0),B()})}function _(){v&&(o.cancel(v),v=null),b&&(o.cancel(b),b=null)}function R(){T&&T.$evalAsync(function(){T&&(T.isOpen=!1,U(!1),T.animation?m||(m=o(N,150,!1)):N())})}function L(){y&&(o.cancel(y),y=null),m&&(o.cancel(m),m=null)}function N(){_(),L(),A.length&&(angular.forEach(A,function(t){t()}),A.length=0),p&&(p.remove(),p=null,w&&o.cancel(w)),d.remove(T),g&&(g.$destroy(),g=null)}function U(e){E&&angular.isFunction(E.assign)&&E.assign(t,e)}function j(t){T&&T.isOpen&&p&&(e[0].contains(t.target)||p[0].contains(t.target)||M())}function q(t){27===t.which&&M()}T.origScope=t,T.isOpen=!1,T.contentExp=function(){return T.content},i.$observe("disabled",function(t){t&&_(),t&&T.isOpen&&R()}),E&&t.$watch(E,function(t){T&&!t===T.isOpen&&I()});var F,V,z,H=function(){C.show.forEach(function(t){"outsideClick"===t?e.off("click",I):(e.off(t,O),e.off(t,I)),e.off("keypress",q)}),C.hide.forEach(function(t){"outsideClick"===t?a.off("click",j):e.off(t,M)})};F=[],V=[],z=t.$eval(i[l+"Trigger"]),H(),angular.isObject(z)?(Object.keys(z).forEach(function(t){F.push(t),V.push(z[t])}),C={show:F,hide:V}):C=h(z),"none"!==C.show&&C.show.forEach(function(t,n){"outsideClick"===t?(e.on("click",I),a.on("click",j)):t===C.hide[n]?e.on(t,I):t&&(e.on(t,O),e.on(C.hide[n],M)),e.on("keypress",q)});var K,W=t.$eval(i[l+"Animation"]);T.animation=angular.isDefined(W)?!!W:f.animation;var G=l+"AppendToBody";K=G in i&&void 0===i[G]||t.$eval(i[G]),k=angular.isDefined(K)?K:k,t.$on("$destroy",function(){H(),N(),T=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(t,e,n,r){return{link:function(i,o,a){var s,u,l,c=i.$eval(a.tooltipTemplateTranscludeScope),p=0,d=function(){u&&(u.remove(),u=null),s&&(s.$destroy(),s=null),l&&(t.leave(l).then(function(){u=null}),u=l,l=null)};i.$watch(e.parseAsResourceUrl(a.uibTooltipTemplateTransclude),function(e){var a=++p;e?(r(e,!0).then(function(r){if(a===p){var i=c.$new(),u=n(r)(i,function(e){d(),t.enter(e,o)});l=u,(s=i).$emit("$includeContentLoaded",e)}},function(){a===p&&(d(),i.$emit("$includeContentError",e))}),i.$emit("$includeContentRequested",e)):d()}),i.$on("$destroy",d)}}}]).directive("uibTooltipClasses",["$uibPosition",function(t){return{restrict:"A",link:function(e,n,r){if(e.placement){var i=t.parsePlacement(e.placement);n.addClass(i[0])}e.popupClass&&n.addClass(e.popupClass),e.animation&&n.addClass(r.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(t){return t("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(t){return t("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(t){return t("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(t){return t("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(t){return t("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(t){return t("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(t,e,n){var r=this,i=angular.isDefined(e.animate)?t.$parent.$eval(e.animate):n.animate;function o(){return angular.isDefined(t.maxParam)?t.maxParam:n.max}this.bars=[],t.max=o(),this.addBar=function(t,e,n){i||e.css({transition:"none"}),this.bars.push(t),t.max=o(),t.title=n&&angular.isDefined(n.title)?n.title:"progressbar",t.$watch("value",function(e){t.recalculatePercentage()}),t.recalculatePercentage=function(){var e=r.bars.reduce(function(t,e){return e.percent=+(100*e.value/e.max).toFixed(2),t+e.percent},0);e>100&&(t.percent-=e-100)},t.$on("$destroy",function(){e=null,r.removeBar(t)})},this.removeBar=function(t){this.bars.splice(this.bars.indexOf(t),1),this.bars.forEach(function(t){t.recalculatePercentage()})},t.$watch("maxParam",function(t){r.bars.forEach(function(t){t.max=o(),t.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(t,e,n,r){r.addBar(t,e,n)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(t,e,n,r){r.addBar(t,angular.element(e.children()[0]),{title:n.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(t,e,n){var r={$setViewValue:angular.noop},i=this;this.init=function(i){(r=i).$render=this.render,r.$formatters.push(function(t){return angular.isNumber(t)&&t<<0!==t&&(t=Math.round(t)),t}),this.stateOn=angular.isDefined(e.stateOn)?t.$parent.$eval(e.stateOn):n.stateOn,this.stateOff=angular.isDefined(e.stateOff)?t.$parent.$eval(e.stateOff):n.stateOff,this.enableReset=angular.isDefined(e.enableReset)?t.$parent.$eval(e.enableReset):n.enableReset;var o=angular.isDefined(e.titles)?t.$parent.$eval(e.titles):n.titles;this.titles=angular.isArray(o)&&o.length>0?o:n.titles;var a=angular.isDefined(e.ratingStates)?t.$parent.$eval(e.ratingStates):new Array(angular.isDefined(e.max)?t.$parent.$eval(e.max):n.max);t.range=this.buildTemplateObjects(a)},this.buildTemplateObjects=function(t){for(var e=0,n=t.length;e=this.titles.length?t+1:this.titles[t]},t.rate=function(e){if(!t.readonly&&e>=0&&e<=t.range.length){var n=i.enableReset&&r.$viewValue===e?0:e;r.$setViewValue(n),r.$render()}},t.enter=function(e){t.readonly||(t.value=e),t.onHover({value:e})},t.reset=function(){t.value=r.$viewValue,t.onLeave()},t.onKeydown=function(e){/(37|38|39|40)/.test(e.which)&&(e.preventDefault(),e.stopPropagation(),t.rate(t.value+(38===e.which||39===e.which?1:-1)))},this.render=function(){t.value=r.$viewValue,t.title=i.getTitle(t.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(t,e,n,r){var i=r[0],o=r[1];i.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(t){var e,n,r=this;function i(t){for(var e=0;ee.index?1:t.indexv||tc&&t>v},t.noIncrementMinutes=function(){var t=D(c,y);return b||t>v||tc&&t>v},t.noIncrementSeconds=function(){var t=A(c,w);return b||t>v||tc&&t>v},t.noToggleMeridian=function(){return c.getHours()<12?b||D(c,720)>v:b||D(c,-720)0&&e<13:e>=0&&e<24)&&""!==t.hours)return t.showMeridian&&(12===e&&(e=0),t.meridian===f[1]&&(e+=12)),e}function k(){var e=+t.minutes;if(e>=0&&e<60&&""!==t.minutes)return e}function C(t,e){return null===t?"":angular.isDefined(t)&&t.toString().length<2&&!e?"0"+t:t.toString()}function x(t){T(),d.$setViewValue(new Date(c)),S(t)}function T(){s&&s.$setValidity("hours",!0),u&&u.$setValidity("minutes",!0),l&&l.$setValidity("seconds",!0),d.$setValidity("time",!0),t.invalidHours=!1,t.invalidMinutes=!1,t.invalidSeconds=!1}function S(e){if(d.$modelValue){var n=c.getHours(),r=c.getMinutes(),i=c.getSeconds();t.showMeridian&&(n=0===n||12===n?12:n%12),t.hours="h"===e?n:C(n,!h),"m"!==e&&(t.minutes=C(r)),t.meridian=c.getHours()<12?f[0]:f[1],"s"!==e&&(t.seconds=C(i)),t.meridian=c.getHours()<12?f[0]:f[1]}else t.hours=null,t.minutes=null,t.seconds=null,t.meridian=f[0]}function E(t){c=A(c,t),x()}function D(t,e){return A(t,60*e)}function A(t,e){var n=new Date(t.getTime()+1e3*e),r=new Date(t);return r.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),r}function B(){return(null===t.hours||""===t.hours)&&(null===t.minutes||""===t.minutes)&&(!t.showSeconds||t.showSeconds&&(null===t.seconds||""===t.seconds))}n.secondStep&&p.push(t.$parent.$watch(r(n.secondStep),function(t){w=+t})),t.showSeconds=a.showSeconds,n.showSeconds&&p.push(t.$parent.$watch(r(n.showSeconds),function(e){t.showSeconds=!!e})),t.showMeridian=a.showMeridian,n.showMeridian&&p.push(t.$parent.$watch(r(n.showMeridian),function(e){if(t.showMeridian=!!e,d.$error.time){var n=$(),r=k();angular.isDefined(n)&&angular.isDefined(r)&&(c.setHours(n),x())}else S()})),this.setupMousewheelEvents=function(e,n,r){var i=function(t){t.originalEvent&&(t=t.originalEvent);var e=t.wheelDelta?t.wheelDelta:-t.deltaY;return t.detail||e>0};e.on("mousewheel wheel",function(e){b||t.$apply(i(e)?t.incrementHours():t.decrementHours()),e.preventDefault()}),n.on("mousewheel wheel",function(e){b||t.$apply(i(e)?t.incrementMinutes():t.decrementMinutes()),e.preventDefault()}),r.on("mousewheel wheel",function(e){b||t.$apply(i(e)?t.incrementSeconds():t.decrementSeconds()),e.preventDefault()})},this.setupArrowkeyEvents=function(e,n,r){e.on("keydown",function(e){b||(38===e.which?(e.preventDefault(),t.incrementHours(),t.$apply()):40===e.which&&(e.preventDefault(),t.decrementHours(),t.$apply()))}),n.on("keydown",function(e){b||(38===e.which?(e.preventDefault(),t.incrementMinutes(),t.$apply()):40===e.which&&(e.preventDefault(),t.decrementMinutes(),t.$apply()))}),r.on("keydown",function(e){b||(38===e.which?(e.preventDefault(),t.incrementSeconds(),t.$apply()):40===e.which&&(e.preventDefault(),t.decrementSeconds(),t.$apply()))})},this.setupInputEvents=function(e,n,r){if(t.readonlyInput)return t.updateHours=angular.noop,t.updateMinutes=angular.noop,void(t.updateSeconds=angular.noop);var i=function(e,n,r){d.$setViewValue(null),d.$setValidity("time",!1),angular.isDefined(e)&&(t.invalidHours=e,s&&s.$setValidity("hours",!1)),angular.isDefined(n)&&(t.invalidMinutes=n,u&&u.$setValidity("minutes",!1)),angular.isDefined(r)&&(t.invalidSeconds=r,l&&l.$setValidity("seconds",!1))};t.updateHours=function(){var t=$(),e=k();d.$setDirty(),angular.isDefined(t)&&angular.isDefined(e)?(c.setHours(t),c.setMinutes(e),cv?i(!0):x("h")):i(!0)},e.on("blur",function(e){d.$setTouched(),B()?T():null===t.hours||""===t.hours?i(!0):!t.invalidHours&&t.hours<10&&t.$apply(function(){t.hours=C(t.hours,!h)})}),t.updateMinutes=function(){var t=k(),e=$();d.$setDirty(),angular.isDefined(t)&&angular.isDefined(e)?(c.setHours(e),c.setMinutes(t),cv?i(void 0,!0):x("m")):i(void 0,!0)},n.on("blur",function(e){d.$setTouched(),B()?T():null===t.minutes?i(void 0,!0):!t.invalidMinutes&&t.minutes<10&&t.$apply(function(){t.minutes=C(t.minutes)})}),t.updateSeconds=function(){var e,n=(e=+t.seconds)>=0&&e<60?e:void 0;d.$setDirty(),angular.isDefined(n)?(c.setSeconds(n),x("s")):i(void 0,void 0,!0)},r.on("blur",function(e){B()?T():!t.invalidSeconds&&t.seconds<10&&t.$apply(function(){t.seconds=C(t.seconds)})})},this.render=function(){var e=d.$viewValue;isNaN(e)?(d.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(c=e),cv?(d.$setValidity("time",!1),t.invalidHours=!0,t.invalidMinutes=!0):T(),S())},t.showSpinners=angular.isDefined(n.showSpinners)?t.$parent.$eval(n.showSpinners):a.showSpinners,t.incrementHours=function(){t.noIncrementHours()||E(60*g*60)},t.decrementHours=function(){t.noDecrementHours()||E(60*-g*60)},t.incrementMinutes=function(){t.noIncrementMinutes()||E(60*y)},t.decrementMinutes=function(){t.noDecrementMinutes()||E(60*-y)},t.incrementSeconds=function(){t.noIncrementSeconds()||E(w)},t.decrementSeconds=function(){t.noDecrementSeconds()||E(-w)},t.toggleMeridian=function(){var e=k(),n=$();t.noToggleMeridian()||(angular.isDefined(e)&&angular.isDefined(n)?E(720*(c.getHours()<12?60:-60)):t.meridian=t.meridian===f[0]?f[1]:f[0])},t.blur=function(){d.$setTouched()},t.$on("$destroy",function(){for(;p.length;)p.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(t){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(e,n){return n.templateUrl||t.templateUrl},link:function(t,e,n,r){var i=r[0],o=r[1];o&&i.init(o,e.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(t){var e=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var r=n.match(e);if(!r)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:r[3],source:t(r[4]),viewMapper:t(r[2]||r[1]),modelMapper:t(r[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(t,e,n,r,i,o,a,s,u,l,c,p,d){var f,h,g=[9,13,27,38,40],m=t.$eval(n.typeaheadMinLength);m||0===m||(m=1),t.$watch(n.typeaheadMinLength,function(t){m=t||0===t?t:1});var v=t.$eval(n.typeaheadWaitMs)||0,y=!1!==t.$eval(n.typeaheadEditable);t.$watch(n.typeaheadEditable,function(t){y=!1!==t});var b,w,$=i(n.typeaheadLoading).assign||angular.noop,k=n.typeaheadShouldSelect?i(n.typeaheadShouldSelect):function(t,e){var n=e.$event;return 13===n.which||9===n.which},C=i(n.typeaheadOnSelect),x=!!angular.isDefined(n.typeaheadSelectOnBlur)&&t.$eval(n.typeaheadSelectOnBlur),T=i(n.typeaheadNoResults).assign||angular.noop,S=n.typeaheadInputFormatter?i(n.typeaheadInputFormatter):void 0,E=!!n.typeaheadAppendToBody&&t.$eval(n.typeaheadAppendToBody),D=n.typeaheadAppendTo?t.$eval(n.typeaheadAppendTo):null,A=!1!==t.$eval(n.typeaheadFocusFirst),B=!!n.typeaheadSelectOnExact&&t.$eval(n.typeaheadSelectOnExact),I=i(n.typeaheadIsOpen).assign||angular.noop,O=t.$eval(n.typeaheadShowHint)||!1,M=i(n.ngModel),P=i(n.ngModel+"($$$p)"),_=d.parse(n.uibTypeahead),R=t.$new(),L=t.$on("$destroy",function(){R.$destroy()});R.$on("$destroy",L);var N,U,j="typeahead-"+R.$id+"-"+Math.floor(1e4*Math.random());e.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":j}),O&&((N=angular.element("
")).css("position","relative"),e.after(N),(U=e.clone()).attr("placeholder",""),U.attr("tabindex","-1"),U.val(""),U.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),e.css({position:"relative","vertical-align":"top","background-color":"transparent"}),U.attr("id")&&U.removeAttr("id"),N.append(U),U.after(e));var q=angular.element("
");q.attr({id:j,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(n.typeaheadTemplateUrl)&&q.attr("template-url",n.typeaheadTemplateUrl),angular.isDefined(n.typeaheadPopupTemplateUrl)&&q.attr("popup-template-url",n.typeaheadPopupTemplateUrl);var F=function(){R.matches=[],R.activeIdx=-1,e.attr("aria-expanded",!1),O&&U.val("")},V=function(t){return j+"-option-"+t};R.$watch("activeIdx",function(t){t<0?e.removeAttr("aria-activedescendant"):e.attr("aria-activedescendant",V(t))});var z=function(n,r){var i={$viewValue:n};$(t,!0),T(t,!1),o.when(_.source(t,i)).then(function(o){var a,s,u=n===f.$viewValue;if(u&&b)if(o&&o.length>0){R.activeIdx=A?0:-1,T(t,!1),R.matches.length=0;for(var l=0;ls&&a&&a.toUpperCase()===R.matches[s].label.toUpperCase())&&(angular.isNumber(R.debounceUpdate)||angular.isObject(R.debounceUpdate)?c(function(){R.select(0,r)},angular.isNumber(R.debounceUpdate)?R.debounceUpdate:R.debounceUpdate.default):R.select(0,r)),O){var p=R.matches[0].label;angular.isString(n)&&n.length>0&&p.slice(0,n.length).toUpperCase()===n.toUpperCase()?U.val(n+p.slice(n.length)):U.val("")}}else F(),T(t,!0);u&&$(t,!1)},function(){F(),$(t,!1),T(t,!0)})};E&&(angular.element(u).on("resize",W),s.find("body").on("scroll",W));var H,K=c(function(){R.matches.length&&G(),R.moveInProgress=!1},200);function W(){R.moveInProgress||(R.moveInProgress=!0,R.$digest()),K()}function G(){R.position=E?p.offset(e):p.position(e),R.position.top+=e.prop("offsetHeight")}R.moveInProgress=!1,R.query=void 0;var Y=function(){H&&a.cancel(H)};F(),R.assignIsOpen=function(e){I(t,e)},R.select=function(r,i){var o,s,u,l,c={};w=!0,c[_.itemName]=s=R.matches[r].model,o=_.modelMapper(t,c),u=t,l=o,angular.isFunction(M(t))&&h.getOption("getterSetter")?P(u,{$$$p:l}):M.assign(u,l),f.$setValidity("editable",!0),f.$setValidity("parse",!0),C(t,{$item:s,$model:o,$label:_.viewMapper(t,c),$event:i}),F(),!1!==R.$eval(n.typeaheadFocusOnSelect)&&a(function(){e[0].focus()},0,!1)},e.on("keydown",function(e){if(0!==R.matches.length&&-1!==g.indexOf(e.which)){var n,r=k(t,{$event:e});if(-1===R.activeIdx&&r||9===e.which&&e.shiftKey)return F(),void R.$digest();switch(e.preventDefault(),e.which){case 27:e.stopPropagation(),F(),t.$digest();break;case 38:R.activeIdx=(R.activeIdx>0?R.activeIdx:R.matches.length)-1,R.$digest(),(n=q[0].querySelectorAll(".uib-typeahead-match")[R.activeIdx]).parentNode.scrollTop=n.offsetTop;break;case 40:R.activeIdx=(R.activeIdx+1)%R.matches.length,R.$digest(),(n=q[0].querySelectorAll(".uib-typeahead-match")[R.activeIdx]).parentNode.scrollTop=n.offsetTop;break;default:r&&R.$apply(function(){angular.isNumber(R.debounceUpdate)||angular.isObject(R.debounceUpdate)?c(function(){R.select(R.activeIdx,e)},angular.isNumber(R.debounceUpdate)?R.debounceUpdate:R.debounceUpdate.default):R.select(R.activeIdx,e)})}}}),e.on("focus",function(t){b=!0,0!==m||f.$viewValue||a(function(){z(f.$viewValue,t)},0)}),e.on("blur",function(t){x&&R.matches.length&&-1!==R.activeIdx&&!w&&(w=!0,R.$apply(function(){angular.isObject(R.debounceUpdate)&&angular.isNumber(R.debounceUpdate.blur)?c(function(){R.select(R.activeIdx,t)},R.debounceUpdate.blur):R.select(R.activeIdx,t)})),!y&&f.$error.editable&&(f.$setViewValue(),R.$apply(function(){f.$setValidity("editable",!0),f.$setValidity("parse",!0)}),e.val("")),b=!1,w=!1});var Q=function(n){e[0]!==n.target&&3!==n.which&&0!==R.matches.length&&(F(),l.$$phase||t.$digest())};s.on("click",Q),t.$on("$destroy",function(){s.off("click",Q),(E||D)&&Z.remove(),E&&(angular.element(u).off("resize",W),s.find("body").off("scroll",W)),q.remove(),O&&N.remove()});var Z=r(q)(R);E?s.find("body").append(Z):D?angular.element(D).eq(0).append(Z):e.after(Z),this.init=function(e){h=function(t){var e;angular.version.minor<6?(e=t.$options||{}).getOption=function(t){return e[t]}:e=t.$options;return e}(f=e),R.debounceUpdate=i(h.getOption("debounce"))(t),f.$parsers.unshift(function(e){var n;return b=!0,0===m||e&&e.length>=m?v>0?(Y(),n=e,H=a(function(){z(n)},v)):z(e):($(t,!1),Y(),F()),y?e:e?void f.$setValidity("editable",!1):(f.$setValidity("editable",!0),null)}),f.$formatters.push(function(e){var n,r={};return y||f.$setValidity("editable",!0),S?(r.$model=e,S(t,r)):(r[_.itemName]=e,n=_.viewMapper(t,r),r[_.itemName]=void 0,n!==_.viewMapper(t,r)?n:e)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(t,e,n,r){r[1].init(r[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(t){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(t,e){return e.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(e,n,r){e.templateUrl=r.templateUrl,e.isOpen=function(){var t=e.matches.length>0;return e.assignIsOpen({isOpen:t}),t},e.isActive=function(t){return e.active===t},e.selectActive=function(t){e.active=t},e.selectMatch=function(n,r){var i=e.debounce();angular.isNumber(i)||angular.isObject(i)?t(function(){e.select({activeIdx:n,evt:r})},angular.isNumber(i)?i:i.default):e.select({activeIdx:n,evt:r})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(t,e,n){return{scope:{index:"=",match:"=",query:"="},link:function(r,i,o){var a=n(o.templateUrl)(r.$parent)||"uib/template/typeahead/typeahead-match.html";t(a).then(function(t){var n=angular.element(t.trim());i.replaceWith(n),e(n)(r)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(t,e,n){var r;return r=e.has("$sanitize"),function(e,i){return!r&&/<.*>/g.test(e)&&n.warn("Unsafe use of typeahead please use ngSanitize"),e=i?(""+e).replace(new RegExp(i.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"gi"),"$&"):e,r||(e=t.trustAsHtml(e)),e}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(t){t.put("uib/template/accordion/accordion-group.html",'\n
\n
\n
\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(t){t.put("uib/template/accordion/accordion.html",'
')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(t){t.put("uib/template/alert/alert.html",'\n
\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(t){t.put("uib/template/carousel/carousel.html",'\n\n \n previous\n\n\n \n next\n\n\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(t){t.put("uib/template/carousel/slide.html",'
\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/datepicker.html",'
\n
\n
\n
\n
\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{::label.abbr}}
{{ weekNumbers[$index] }}\n \n
\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/popup.html",'
\n \n
\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/datepickerPopup/popup.html",'\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(t){t.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(t){t.put("uib/template/modal/window.html","
\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(t){t.put("uib/template/pager/pager.html",'
  • {{::getText(\'previous\')}}
  • \n
  • {{::getText(\'next\')}}
  • \n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(t){t.put("uib/template/pagination/pagination.html",'\n\n\n\n\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(t){t.put("uib/template/popover/popover-html.html",'
    \n\n
    \n

    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(t){t.put("uib/template/popover/popover-template.html",'
    \n\n
    \n

    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(t){t.put("uib/template/popover/popover.html",'
    \n\n
    \n

    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(t){t.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(t){t.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(t){t.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(t){t.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(t){t.put("uib/template/tabs/tab.html",'\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(t){t.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(t){t.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(t){t.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(t){t.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend(''),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend(''),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend(''),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend(''),angular.$$uibTypeaheadCss=!0}),function(t,e,n){"use strict";e.module("angulartics.google.analytics",["angulartics"]).config(["$analyticsProvider",function(n){n.settings.pageTracking.trackRelativePath=!0,n.settings.ga={additionalAccountNames:void 0,additionalAccountHitTypes:{pageview:!0,event:!0,exception:!1,ecommerce:!1,userTiming:!1,setUserProperties:!1,userId:!1},disableEventTracking:null,disablePageTracking:null,enhancedEcommerce:!1,transport:null,userId:null},n.registerPageTrack(function(t,i){i=i||{},n.settings.ga.disablePageTracking||r("pageview","send",e.extend({},i,{hitType:"pageview",page:t}))}),n.registerEventTrack(function(i,o){if(!n.settings.ga.disableEventTracking&&(i||i+""=="0")){if((o=o||{}).category=o.category||"Event",o.value){var a=parseInt(o.value,10);o.value=isNaN(a)?0:a}e.isFunction(o.hitCallback)||(o.hitCallback=null),o.nonInteraction=o.nonInteraction||o.noninteraction,r("event","send",e.extend({},o,{hitType:"event",eventCategory:o.category,eventAction:i,eventLabel:o.label,eventValue:o.value,nonInteraction:o.nonInteraction,page:o.page||t.location.hash.substring(1)||t.location.pathname,hitCallback:o.hitCallback}))}}),n.registerExceptionTrack(function(e,n){r("exception","send",{hitType:"event",eventCategory:"Exceptions",eventAction:e.toString(),eventLabel:e.stack,nonInteraction:!0,page:t.location.hash.substring(1)||t.location.pathname,isException:!0})}),n.registerSetUsername(function(t){n.settings.ga.userId=t}),n.registerSetUserProperties(function(t){t&&r("setUserProperties","set",function(t){var e,n={};for(e in t)e.indexOf("dimension")&&e.indexOf("metric")||(n[e]=t[e]);return n}(t))}),n.registerUserTimings(function(n){if(!e.isObject(n)||e.isArray(n))return console.log("Required argument properties is missing or not an object");e.forEach(["timingCategory","timingVar","timingValue"],function(t){if(e.isUndefined(n[t]))return console.log("Argument properties missing required property "+t)}),r("userTiming","send",{hitType:"timing",timingCategory:n.timingCategory,timingVar:n.timingVar,timingValue:n.timingValue,timingLabel:n.timingLabel,optSampleRate:n.optSampleRate,page:n.page||t.location.hash.substring(1)||t.location.pathname})}),n.registerTransactionTrack(function(t){var n,i;if(r("ecommerce","require","ecommerce"),r("ecommerce","ecommerce:addTransaction",t),t.products)for(i=0;i-1&&n.settings.ga.enhancedEcommerce)switch(t){case"ecommerce:addTransaction":t=["ec:setAction","purchase"];break;case"ecommerce:addItem":t="ec:addProduct",r.id=r.sku;break;case"ecommerce:send":t="send",r.hitType="event",r.eventCategory="Angulartics Enhanced Ecommerce",r.eventAction="Purchase",r.nonInteraction=!0}o(t instanceof Array?t.concat(r):[t,r],i)}),r?function(t,e,i){var o=n.settings.ga.additionalAccountHitTypes[t];r(e,i,o)}:e.noop;function o(r,i){var o,a=n.settings.ga.userId,s=t.GoogleAnalyticsObject;t[s].apply(this,r),i&&(o=e.copy(r),a&&!n.settings.ga.additionalAccountHitTypes.userId&&o[2]&&"object"==typeof o[2]&&delete o[2].userId,e.forEach(n.settings.ga.additionalAccountNames,function(e){o[0]=e+"."+o[0],t[s].apply(this,o)}))}}()}])}(window,window.angular),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":i(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},{select:5}],8:[function(t,e,n){!function(r,i){if(void 0!==n)i(e,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var o={exports:{}};i(o,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=o.exports}}(this,function(t,e,n,r){"use strict";var i=s(e),o=s(n),a=s(r);function s(t){return t&&t.__esModule?t:{default:t}}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var l=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===u(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,a.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return p("action",t)}},{key:"defaultTarget",value:function(t){var e=p("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return p("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}();function p(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=c})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var n=e();n._onReady(n.init),t.Duo=n}}(this,function(){var t,e,n,r,i,o=/^(?:AUTH|ENROLL)+\|[A-Za-z0-9\+\/=]+\|[A-Za-z0-9\+\/=]+$/,a=/^ERR\|[\w\s\.\(\)]+$/,s=/^DUO_OPEN_WINDOW\|/,u=["duo.com","duosecurity.com","duomobile.s3-us-west-1.amazonaws.com"],l="duo_iframe",c="",p="sig_response";function d(t,e){throw new Error("Duo Web SDK error: "+t+(e?"\nSee "+e+" for more information":""))}function f(t,e){return"dataset"in t?t.dataset[e]:t.getAttribute("data-"+e.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase())}function h(t,e,n,r){"addEventListener"in window?t.addEventListener(e,r,!1):t.attachEvent(n,r)}function g(t,e,n,r){"removeEventListener"in window?t.removeEventListener(e,r,!1):t.detachEvent(n,r)}function m(t){h(document,"DOMContentLoaded","onreadystatechange",t)}function v(t){g(document,"DOMContentLoaded","onreadystatechange",t)}function y(t){if(t){0===t.indexOf("ERR|")&&d(t.split("|")[1]),-1!==t.indexOf(":")&&2===t.split(":").length||d("Duo was given a bad token. This might indicate a configuration problem with one of Duo's client libraries.","https://www.duosecurity.com/docs/duoweb#first-steps");var r=t.split(":");return t,e=r[0],n=r[1],{sigRequest:t,duoSig:r[0],appSig:r[1]}}}function b(){if(!(r=document.getElementById(l)))throw new Error('This page does not contain an iframe for Duo to use.Add an element like to this page. See https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe for more information.');k(),v(b)}function w(e){return Boolean(e.origin==="https://"+t&&"string"==typeof e.data&&(e.data.match(o)||e.data.match(a)||e.data.match(s)))}function $(t){if(w(t))if(t.data.match(s)){var e=t.data.substring("DUO_OPEN_WINDOW|".length);(function(t){if(!t)return!1;var e=document.createElement("a");{if(e.href=t,"duotrustedendpoints:"===e.protocol)return!0;if("https:"!==e.protocol)return!1}for(var n=0;n15?(n=Date.now(),a(t)):(e.push(t),1===e.length&&o.setAttribute("a",r=!r))}}i.nextTick=i.setImmediate}(),i.isNodejs="undefined"!=typeof process&&process.versions&&process.versions.node,i.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},i.isArrayBufferView=function(t){return t&&i.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},i.ByteBuffer=a,i.ByteStringBuffer=a;i.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},i.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},i.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},i.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},i.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var n=this.data;e>0;)1&e&&(n+=t),(e>>>=1)>0&&(t+=t);return this.data=n,this._optimizeConstructedString(e),this},i.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},i.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(i.encodeUtf8(t))},i.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},i.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},i.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},i.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},i.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},i.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},i.ByteStringBuffer.prototype.putInt=function(t,e){o(e);var n="";do{e-=8,n+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(n)},i.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e},i.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),n=2<=n&&(e-=n<<1),e},i.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},i.ByteStringBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},i.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},i.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},i.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},i.ByteStringBuffer.prototype.copy=function(){var t=i.createBuffer(this.data);return t.read=this.read,t},i.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},i.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},i.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},i.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var n=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+e);return r.set(n),this.data=new DataView(r.buffer),this},i.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},i.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var n=0;n>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},i.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},i.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},i.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},i.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},i.DataBuffer.prototype.putInt=function(t,e){o(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},i.DataBuffer.prototype.putSignedInt=function(t,e){return o(e),this.accommodate(e/8),t<0&&(t+=2<0);return e},i.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),n=2<=n&&(e-=n<<1),e},i.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},i.DataBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},i.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},i.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},i.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},i.DataBuffer.prototype.copy=function(){return new i.DataBuffer(this)},i.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},i.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},i.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},i.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)1&e&&(n+=t),(e>>>=1)>0&&(t+=t);return n},i.xorBytes=function(t,e,n){for(var r="",i="",o="",a=0,s=0;n>0;--n,++a)i=t.charCodeAt(a)^e.charCodeAt(a),s>=10&&(r+=o,o="",s=0),o+=String.fromCharCode(i),++s;return r+=o},i.hexToBytes=function(t){var e="",n=0;for(!0&t.length&&(n=1,e+=String.fromCharCode(parseInt(t[0],16)));n>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];i.encode64=function(t,e){for(var n,r,i,o="",a="",u=0;u>2),o+=s.charAt((3&n)<<4|r>>4),isNaN(r)?o+="==":(o+=s.charAt((15&r)<<2|i>>6),o+=isNaN(i)?"=":s.charAt(63&i)),e&&o.length>e&&(a+=o.substr(0,e)+"\r\n",o=o.substr(e));return a+=o},i.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,n,r,i,o="",a=0;a>4),64!==r&&(o+=String.fromCharCode((15&n)<<4|r>>2),64!==i&&(o+=String.fromCharCode((3&r)<<6|i)));return o},i.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},i.decodeUtf8=function(t){return decodeURIComponent(escape(t))},i.binary={raw:{},hex:{},base64:{}},i.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},i.binary.raw.decode=function(t,e,n){var r=e;r||(r=new Uint8Array(t.length));for(var i=n=n||0,o=0;o>2),o+=s.charAt((3&n)<<4|r>>4),isNaN(r)?o+="==":(o+=s.charAt((15&r)<<2|i>>6),o+=isNaN(i)?"=":s.charAt(63&i)),e&&o.length>e&&(a+=o.substr(0,e)+"\r\n",o=o.substr(e));return a+=o},i.binary.base64.decode=function(t,e,n){var r,i,o,a,s=e;s||(s=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var l=0,c=n=n||0;l>4,64!==o&&(s[c++]=(15&i)<<4|o>>2,64!==a&&(s[c++]=(3&o)<<6|a));return e?c-n:s.subarray(0,c)},i.text={utf8:{},utf16:{}},i.text.utf8.encode=function(t,e,n){t=i.encodeUtf8(t);var r=e;r||(r=new Uint8Array(t.length));for(var o=n=n||0,a=0;a0?(i=n[r].substring(0,a),o=n[r].substring(a+1)):(i=n[r],o=null),i in e||(e[i]=[]),i in Object.prototype||null===o||e[i].push(unescape(o))}return e};return void 0===t?(null===m&&(m="undefined"!=typeof window&&window.location&&window.location.search?n(window.location.search.substring(1)):{}),e=m):e=n(t),e},i.parseFragment=function(t){var e=t,n="",r=t.indexOf("?");r>0&&(e=t.substring(0,r),n=t.substring(r+1));var o=e.split("/");return o.length>0&&""===o[0]&&o.shift(),{pathString:e,queryString:n,path:o,query:""===n?{}:i.getQueryVariables(n)}},i.makeRequest=function(t){var e=i.parseFragment(t),n={path:e.pathString,query:e.queryString,getPath:function(t){return void 0===t?e.path:e.path[t]},getQuery:function(t,n){var r;return void 0===t?r=e.query:(r=e.query[t])&&void 0!==n&&(r=r[n]),r},getQueryLast:function(t,e){var r=n.getQuery(t);return r?r[r.length-1]:e}};return n},i.makeLink=function(t,e,n){t=jQuery.isArray(t)?t.join("/"):t;var r=jQuery.param(e||{});return n=n||"",t+(r.length>0?"?"+r:"")+(n.length>0?"#"+n:"")},i.setPath=function(t,e,n){if("object"==typeof t&&null!==t)for(var r=0,i=e.length;r0&&o.push(n),a=r.lastIndex;var s=e[0][1];switch(s){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+s+"?>")}}return o.push(t.substring(a)),o.join("")},i.formatNumber=function(t,e,n,r){var i=t,o=isNaN(e=Math.abs(e))?2:e,a=void 0===n?",":n,s=void 0===r?".":r,u=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",c=l.length>3?l.length%3:0;return u+(c?l.substr(0,c)+s:"")+l.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+s)+(o?a+Math.abs(i-l).toFixed(o).slice(2):"")},i.formatSize=function(t){return t=t>=1073741824?i.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?i.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?i.formatNumber(t/1024,0)+" KiB":i.formatNumber(t,0)+" bytes"},i.bytesFromIP=function(t){return-1!==t.indexOf(".")?i.bytesFromIPv4(t):-1!==t.indexOf(":")?i.bytesFromIPv6(t):null},i.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=i.createBuffer(),n=0;nn[r].end-n[r].start&&(r=n.length-1)):n.push({start:u,end:u})}e.push(a)}if(n.length>0){var l=n[r];l.end-l.start>0&&(e.splice(l.start,l.end-l.start+1,""),0===l.start&&e.unshift(""),7===l.end&&e.push(""))}return e.join(":")},i.estimateCores=function(t,e){if("function"==typeof t&&(e=t,t={}),t=t||{},"cores"in i&&!t.update)return e(null,i.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return i.cores=navigator.hardwareConcurrency,e(null,i.cores);if("undefined"==typeof Worker)return i.cores=1,e(null,i.cores);if("undefined"==typeof Blob)return i.cores=2,e(null,i.cores);var n=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(t){for(var e=Date.now(),n=e+4;Date.now()s.st&&i.sti.st&&s.ste.blockLength&&(e.start(),e.update(a.bytes()),a=e.digest()),n=r.util.createBuffer(),i=r.util.createBuffer(),l=a.length();for(u=0;u>>=2;for(i=0;i>8^255&p^99,o[g]=p,a[p]=g,f=(d=t[p])<<24^p<<16^p<<8^p^d,h=((n=t[g])^(r=t[n])^(i=t[r]))<<24^(g^i)<<16^(g^r^i)<<8^g^n^i;for(var v=0;v<4;++v)u[v][g]=f,l[v][p]=h,f=f<<24|f>>>8,h=h<<24|h>>>8;0===g?g=m=1:(g=n^t[t[t[n^i]]],m^=t[t[m]])}}function f(t,e){for(var n,r=t.slice(0),i=1,a=r.length,u=p*(a+6+1),c=a;c>>16&255]<<24^o[n>>>8&255]<<16^o[255&n]<<8^o[n>>>24]^s[i]<<24,i++):a>6&&c%a==4&&(n=o[n>>>24]<<24^o[n>>>16&255]<<16^o[n>>>8&255]<<8^o[255&n]),r[c]=r[c-a]^n;if(e){for(var d,f=l[0],h=l[1],g=l[2],m=l[3],v=r.slice(0),y=(c=0,(u=r.length)-p);c>>24]]^h[o[d>>>16&255]]^g[o[d>>>8&255]]^m[o[255&d]];r=v}return r}function h(t,e,n,r){var i,s,c,p,d,f,h,g,m,v,y,b,w=t.length/4-1;r?(i=l[0],s=l[1],c=l[2],p=l[3],d=a):(i=u[0],s=u[1],c=u[2],p=u[3],d=o),f=e[0]^t[0],h=e[r?3:1]^t[1],g=e[2]^t[2],m=e[r?1:3]^t[3];for(var $=3,k=1;k>>24]^s[h>>>16&255]^c[g>>>8&255]^p[255&m]^t[++$],y=i[h>>>24]^s[g>>>16&255]^c[m>>>8&255]^p[255&f]^t[++$],b=i[g>>>24]^s[m>>>16&255]^c[f>>>8&255]^p[255&h]^t[++$],m=i[m>>>24]^s[f>>>16&255]^c[h>>>8&255]^p[255&g]^t[++$],f=v,h=y,g=b;n[0]=d[f>>>24]<<24^d[h>>>16&255]<<16^d[g>>>8&255]<<8^d[255&m]^t[++$],n[r?3:1]=d[h>>>24]<<24^d[g>>>16&255]<<16^d[m>>>8&255]<<8^d[255&f]^t[++$],n[2]=d[g>>>24]<<24^d[m>>>16&255]<<16^d[f>>>8&255]<<8^d[255&h]^t[++$],n[r?1:3]=d[m>>>24]<<24^d[f>>>16&255]<<16^d[h>>>8&255]<<8^d[255&g]^t[++$]}function g(t){var e,n="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?r.cipher.createDecipher(n,t.key):r.cipher.createCipher(n,t.key)).start;return e.start=function(t,n){var o=null;n instanceof r.util.ByteBuffer&&(o=n,n={}),(n=n||{}).output=o,n.iv=t,i.call(e,n)},e}},function(t,e,n){var r=n(0);r.pki=r.pki||{};var i=t.exports=r.pki.oids=r.oids=r.oids||{};function o(t,e){i[t]=e,i[e]=t}function a(t,e){i[t]=e}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),a("2.5.29.1","authorityKeyIdentifier"),a("2.5.29.2","keyAttributes"),a("2.5.29.3","certificatePolicies"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.5","policyMapping"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.7","subjectAltName"),a("2.5.29.8","issuerAltName"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.10","basicConstraints"),a("2.5.29.11","nameConstraints"),a("2.5.29.12","policyConstraints"),a("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate"),a("2.5.29.25","cRLDistributionPoints"),a("2.5.29.26","issuingDistributionPoint"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},function(t,e,n){var r,i=n(0);t.exports=i.jsbn=i.jsbn||{};function o(t,e,n){this.data=[],null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function a(){return new o(null)}function s(t,e,n,r,i,o){for(var a=16383&e,s=e>>14;--o>=0;){var u=16383&this.data[t],l=this.data[t++]>>14,c=s*u+l*a;i=((u=a*u+((16383&c)<<14)+n.data[r]+i)>>28)+(c>>14)+s*l,n.data[r++]=268435455&u}return i}i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=s,r=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(t,e,n,r,i,o){for(var a=32767&e,s=e>>15;--o>=0;){var u=32767&this.data[t],l=this.data[t++]>>15,c=s*u+l*a;i=((u=a*u+((32767&c)<<15)+n.data[r]+(1073741823&i))>>>30)+(c>>>15)+s*l+(i>>>30),n.data[r++]=1073741823&u}return i},r=30):"Netscape"!=navigator.appName?(o.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var a=e*this.data[t++]+n.data[r]+i;i=Math.floor(a/67108864),n.data[r++]=67108863&a}return i},r=26):(o.prototype.am=s,r=28),o.prototype.DB=r,o.prototype.DM=(1<>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function m(t){this.m=t}function v(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function C(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function x(){}function T(t){return t}function S(t){this.r2=a(),this.q3=a(),o.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}m.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},m.prototype.revert=function(t){return t},m.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},m.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},m.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},v.prototype.convert=function(t){var e=a();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(o.ZERO)>0&&this.m.subTo(e,e),e},v.prototype.revert=function(t){var e=a();return t.copyTo(e),this.reduce(e),e},v.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t.data[n]+=this.m.am(0,r,t,e,0,this.m.t);t.data[n]>=t.DV;)t.data[n]-=t.DV,t.data[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},v.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},v.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},o.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},o.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},o.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var r=t.length,i=!1,a=0;--r>=0;){var s=8==n?255&t[r]:f(t,r);s<0?"-"==t.charAt(r)&&(i=!0):(i=!1,0==a?this.data[this.t++]=s:a+n>this.DB?(this.data[this.t-1]|=(s&(1<>this.DB-a):this.data[this.t-1]|=s<=this.DB&&(a-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t},o.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e.data[n+t]=this.data[n];for(n=t-1;n>=0;--n)e.data[n]=0;e.t=this.t+t,e.s=this.s},o.prototype.drShiftTo=function(t,e){for(var n=t;n=0;--n)e.data[n+a+1]=this.data[n]>>i|s,s=(this.data[n]&o)<=0;--n)e.data[n]=0;e.data[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},o.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<>r;for(var a=n+1;a>r;r>0&&(e.data[this.t-n-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e.data[n++]=this.DV+r:r>0&&(e.data[n++]=r),e.t=n,e.clamp()},o.prototype.multiplyTo=function(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e.data[i]=0;for(i=0;i=0;)t.data[n]=0;for(n=0;n=e.DV&&(t.data[n+e.t]-=e.DV,t.data[n+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(n,e.data[n],t,2*n,0,1)),t.s=0,t.clamp()},o.prototype.divRemTo=function(t,e,n){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t0?(r.lShiftTo(c,s),i.lShiftTo(c,n)):(r.copyTo(s),i.copyTo(n));var p=s.t,d=s.data[p-1];if(0!=d){var f=d*(1<1?s.data[p-2]>>this.F2:0),h=this.FV/f,m=(1<=0&&(n.data[n.t++]=1,n.subTo(w,n)),o.ONE.dlShiftTo(p,w),w.subTo(s,s);s.t=0;){var $=n.data[--y]==d?this.DM:Math.floor(n.data[y]*h+(n.data[y-1]+v)*m);if((n.data[y]+=s.am(0,$,n,b,0,p))<$)for(s.dlShiftTo(b,w),n.subTo(w,n);n.data[y]<--$;)n.subTo(w,n)}null!=e&&(n.drShiftTo(p,e),u!=l&&o.ZERO.subTo(e,e)),n.t=p,n.clamp(),c>0&&n.rShiftTo(c,n),u<0&&o.ZERO.subTo(n,n)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(t,e){if(t>4294967295||t<1)return o.ONE;var n=a(),r=a(),i=e.convert(this),s=g(t)-1;for(i.copyTo(n);--s>=0;)if(e.sqrTo(n,r),(t&1<0)e.mulTo(r,i,n);else{var u=n;n=r,r=u}return e.revert(n)},o.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<0)for(s>s)>0&&(i=!0,o=d(n));a>=0;)s>(s+=this.DB-e)):(n=this.data[a]>>(s-=e)&r,s<=0&&(s+=this.DB,--a)),n>0&&(i=!0),i&&(o+=d(n));return i?o:"0"},o.prototype.negate=function(){var t=a();return o.ZERO.subTo(this,t),t},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this.data[n]-t.data[n]))return e;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(t){var e=a();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(o.ZERO)>0&&t.subTo(e,e),e},o.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new m(e):new v(e),this.exp(t,n)},o.ZERO=h(0),o.ONE=h(1),x.prototype.convert=T,x.prototype.revert=T,x.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},x.prototype.sqrTo=function(t,e){t.squareTo(e)},S.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=a();return t.copyTo(e),this.reduce(e),e},S.prototype.revert=function(t){return t},S.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},S.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},S.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var E=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],D=(1<<26)/E[E.length-1];o.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},o.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=h(n),i=a(),o=a(),s="";for(this.divRemTo(r,i,o);i.signum()>0;)s=(n+o.intValue()).toString(t).substr(1)+s,i.divRemTo(r,i,o);return o.intValue().toString(t)+s},o.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),r=Math.pow(e,n),i=!1,a=0,s=0,u=0;u=n&&(this.dMultiply(r),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(e,a)),this.dAddOffset(s,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),b,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var r=new Array,i=7&t;r.length=1+(t>>3),e.nextBytes(r),i>0?r[0]&=(1<>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e.data[n++]=r:r<-1&&(e.data[n++]=this.DV+r),e.t=n,e.clamp()},o.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},o.prototype.multiplyLowerTo=function(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;i>0;)n.data[--i]=0;for(r=n.t-this.t;i=0;)n.data[r]=0;for(r=Math.max(e-this.t,0);r0)if(0==e)n=this.data[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this.data[r])%t;return n},o.prototype.millerRabin=function(t){var e=this.subtract(o.ONE),n=e.getLowestSetBit();if(n<=0)return!1;for(var r,i=e.shiftRight(n),a={nextBytes:function(t){for(var e=0;e=0);var u=r.modPow(i,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(e)){for(var l=1;l++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<=0;)r<8?(n=(this.data[t]&(1<>(r+=this.DB-8)):(n=this.data[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},o.prototype.equals=function(t){return 0==this.compareTo(t)},o.prototype.min=function(t){return this.compareTo(t)<0?this:t},o.prototype.max=function(t){return this.compareTo(t)>0?this:t},o.prototype.and=function(t){var e=a();return this.bitwiseTo(t,y,e),e},o.prototype.or=function(t){var e=a();return this.bitwiseTo(t,b,e),e},o.prototype.xor=function(t){var e=a();return this.bitwiseTo(t,w,e),e},o.prototype.andNot=function(t){var e=a();return this.bitwiseTo(t,$,e),e},o.prototype.not=function(){for(var t=a(),e=0;e=this.t?0!=this.s:0!=(this.data[e]&1<1){var p=a();for(r.sqrTo(s[1],p);u<=c;)s[u]=a(),r.mulTo(p,s[u-2],s[u]),u+=2}var d,f,y=t.t-1,b=!0,w=a();for(i=g(t.data[y])-1;y>=0;){for(i>=l?d=t.data[y]>>i-l&c:(d=(t.data[y]&(1<0&&(d|=t.data[y-1]>>this.DB+i-l)),u=n;0==(1&d);)d>>=1,--u;if((i-=u)<0&&(i+=this.DB,--y),b)s[d].copyTo(o),b=!1;else{for(;u>1;)r.sqrTo(o,w),r.sqrTo(w,o),u-=2;u>0?r.sqrTo(o,w):(f=o,o=w,w=f),r.mulTo(w,s[d],o)}for(;y>=0&&0==(t.data[y]&1<=0?(n.subTo(r,n),e&&i.subTo(s,i),a.subTo(u,a)):(r.subTo(n,r),e&&s.subTo(i,s),u.subTo(a,u))}return 0!=r.compareTo(o.ONE)?o.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},o.prototype.pow=function(t){return this.exp(t,new x)},o.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},o.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n.data[0]<=E[E.length-1]){for(e=0;e>>0,s>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=s[1],s[1]=s[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,s[0]=s[1]/4294967296>>>0;return e.putBytes(o),u(t,n,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var a=r.util.createBuffer();a.putBytes(e.bytes());var s,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;a.putBytes(o.substr(0,i.blockLength-l));for(var c=8*i.fullMessageLength[0],p=0;p>>0,a.putInt32(c>>>0),c=s>>>0;a.putInt32(c);var d={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};u(d,n,a);var f=r.util.createBuffer();return f.putInt32(d.h0),f.putInt32(d.h1),f.putInt32(d.h2),f.putInt32(d.h3),f.putInt32(d.h4),f.putInt32(d.h5),f.putInt32(d.h6),f.putInt32(d.h7),f},i};var o=null,a=!1,s=null;function u(t,e,n){for(var r,i,o,a,u,l,c,p,d,f,h,g,m,v=n.length();v>=64;){for(u=0;u<16;++u)e[u]=n.getInt32();for(;u<64;++u)r=((r=e[u-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,i=((i=e[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[u]=r+e[u-7]+i+e[u-16]|0;for(l=t.h0,c=t.h1,p=t.h2,d=t.h3,f=t.h4,h=t.h5,g=t.h6,m=t.h7,u=0;u<64;++u)o=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),a=l&c|p&(l^c),r=m+((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(g^f&(h^g))+s[u]+e[u],m=g,g=h,h=f,f=d+r>>>0,d=p,p=c,c=l,l=r+(i=o+a)>>>0;t.h0=t.h0+l|0,t.h1=t.h1+c|0,t.h2=t.h2+p|0,t.h3=t.h3+d|0,t.h4=t.h4+f|0,t.h5=t.h5+h|0,t.h6=t.h6+g|0,t.h7=t.h7+m|0,v-=64}}},function(t,e,n){n(11),n(6),n(14),n(4),n(9),n(3),t.exports=n(0)},function(t,e,n){var r=n(0);n(4),n(2),n(1);var i,o=r.pkcs5=r.pkcs5||{};r.util.isNodejs&&!r.options.usePureJavaScript&&(i=n(5)),t.exports=r.pbkdf2=o.pbkdf2=function(t,e,n,o,a,s){if("function"==typeof a&&(s=a,a=null),r.util.isNodejs&&!r.options.usePureJavaScript&&i.pbkdf2&&(null===a||"object"!=typeof a)&&(i.pbkdf2Sync.length>4||!a||"sha1"===a))return"string"!=typeof a&&(a="sha1"),t=new Buffer(t,"binary"),e=new Buffer(e,"binary"),s?4===i.pbkdf2Sync.length?i.pbkdf2(t,e,n,o,function(t,e){if(t)return s(t);s(null,e.toString("binary"))}):i.pbkdf2(t,e,n,o,a,function(t,e){if(t)return s(t);s(null,e.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(t,e,n,o).toString("binary"):i.pbkdf2Sync(t,e,n,o,a).toString("binary");if(null==a&&(a="sha1"),"string"==typeof a){if(!(a in r.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=r.md[a].create()}var u=a.digestLength;if(o>4294967295*u){var l=new Error("Derived key is too long.");if(s)return s(l);throw l}var c=Math.ceil(o/u),p=o-(c-1)*u,d=r.hmac.create();d.start(a,t);var f,h,g,m="";if(!s){for(var v=1;v<=c;++v){d.start(null,null),d.update(e),d.update(r.util.int32ToBytes(v)),f=g=d.digest().getBytes();for(var y=2;y<=n;++y)d.start(null,null),d.update(g),h=d.digest().getBytes(),f=r.util.xorBytes(f,h,u),g=h;m+=vc)return s(null,m);d.start(null,null),d.update(e),d.update(r.util.int32ToBytes(v)),f=g=d.digest().getBytes(),y=2,w()}function w(){if(y<=n)return d.start(null,null),d.update(g),h=d.digest().getBytes(),f=r.util.xorBytes(f,h,u),g=h,++y,r.util.setImmediate(w);m+=v4){var e=t;t=r.util.createBuffer();for(var n=0;n0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var n=t.length(),r=t.at(n-1);return!(r>this.blockSize<<2)&&(t.truncate(r),!0)},i.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(t,e,n){if(t.length()0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var n=t.length(),r=t.at(n-1);return!(r>this.blockSize<<2)&&(t.truncate(r),!0)},i.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(t,e,n){var r=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=o(t.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}a(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,n=r.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?r.util.createBuffer(t.additionalData):r.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=r.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=n.length();if(12===i)this._j0=[n.getInt32(),n.getInt32(),n.getInt32(),1];else{for(this._j0=[0,0,0,0];n.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[n.getInt32(),n.getInt32(),n.getInt32(),n.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),a(this._inBlock),this._partialBytes=0,e=r.util.createBuffer(e),this._aDataLength=s(8*e.length());var o=e.length()%this.blockSize;for(o&&e.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},i.gcm.prototype.encrypt=function(t,e,n){var r=t.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),a(this._inBlock)},i.gcm.prototype.decrypt=function(t,e,n){var r=t.length();if(r0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),a(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--r)e[r]=t[r]>>>1|(1&t[r-1])<<31;e[0]=t[0]>>>1,n&&(e[0]^=this._R)},i.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],n=0;n<32;++n){var r=t[n/8|0]>>>4*(7-n%8)&15,i=this._m[n][r];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e},i.gcm.prototype.ghash=function(t,e,n){return e[0]^=n[0],e[1]^=n[1],e[2]^=n[2],e[3]^=n[3],this.tableMultiply(e)},i.gcm.prototype.generateHashTable=function(t,e){for(var n=8/e,r=4*n,i=16*n,o=new Array(i),a=0;a>>1,i=new Array(n);i[r]=t.slice(0);for(var o=r>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o=0||!o.gcd(e.n).equals(i.ONE));for(var a=(t=t.multiply(o.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),s=t.mod(e.q).modPow(e.dQ,e.q);a.compareTo(s)<0;)a=a.add(e.p);var u=a.subtract(s).multiply(e.qInv).mod(e.p).multiply(e.q).add(s);return u=u.multiply(o.modInverse(e.n)).mod(e.n)};function h(t,e,n){var i=r.util.createBuffer(),o=Math.ceil(e.n.bitLength()/8);if(t.length>o-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.");throw a.length=t.length,a.max=o-11,a}i.putByte(0),i.putByte(n);var s,u=o-3-t.length;if(0===n||1===n){s=0===n?0:255;for(var l=0;l0;){var c=0,p=r.random.getBytes(u);for(l=0;l1;){if(255!==a.getByte()){--a.read;break}++l}else if(2===u)for(l=0;a.length()>1;){if(0===a.getByte()){--a.read;break}++l}if(0!==a.getByte()||l!==o-3-a.length())throw new Error("Encryption block is invalid.");return a.getBytes()}function m(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var n=r.util.hexToBytes(e);return n.length>1&&(0===n.charCodeAt(0)&&0==(128&n.charCodeAt(1))||255===n.charCodeAt(0)&&128==(128&n.charCodeAt(1)))?n.substr(1):n}function v(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function y(t){return"undefined"!=typeof window&&"object"==typeof window.crypto&&"object"==typeof window.crypto.subtle&&"function"==typeof window.crypto.subtle[t]}function b(t){return"undefined"!=typeof window&&"object"==typeof window.msCrypto&&"object"==typeof window.msCrypto.subtle&&"function"==typeof window.msCrypto.subtle[t]}function w(t){for(var e=r.util.hexToBytes(t.toString(16)),n=new Uint8Array(e.length),i=0;i0;)c.putByte(0),--p;return c.putBytes(r.util.hexToBytes(l)),c.getBytes()},a.rsa.decrypt=function(t,e,n,o){var a=Math.ceil(e.n.bitLength()/8);if(t.length!==a){var s=new Error("Encrypted message length is invalid.");throw s.length=t.length,s.expected=a,s}var u=new i(r.util.createBuffer(t).toHex(),16);if(u.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=f(u,e,n).toString(16),c=r.util.createBuffer(),p=a-Math.ceil(l.length/2);p>0;)c.putByte(0),--p;return c.putBytes(r.util.hexToBytes(l)),!1!==o?g(c.getBytes(),e,n):c.getBytes()},a.rsa.createKeyPairGenerationState=function(t,e,n){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var o,a=(n=n||{}).prng||r.random,s={nextBytes:function(t){for(var e=a.getBytesSync(t.length),n=0;n>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},a.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var n=new i(null);n.fromInt(30);for(var r,o=0,u=function(t,e){return t|e},l=+new Date,c=0;null===t.keys&&(e<=0||cp?t.pqState=0:t.num.isProbablePrime(v(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(s[o++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(i.ONE).gcd(t.e).compareTo(i.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(i.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var f=t.e.modInverse(t.phi);t.keys={privateKey:a.rsa.setPrivateKey(t.n,t.e,f,t.p,t.q,f.mod(t.p1),f.mod(t.q1),t.q.modInverse(t.p)),publicKey:a.rsa.setPublicKey(t.n,t.e)}}c+=(r=+new Date)-l,l=r}return null!==t.keys},a.rsa.generateKeyPair=function(t,e,n,s){if(1===arguments.length?"object"==typeof t?(n=t,t=void 0):"function"==typeof t&&(s=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof e?(s=e,e=void 0):"number"!=typeof e&&(n=e,e=void 0):(n=t,s=e,t=void 0,e=void 0):3===arguments.length&&("number"==typeof e?"function"==typeof n&&(s=n,n=void 0):(s=n,n=e,e=void 0)),n=n||{},void 0===t&&(t=n.bits||2048),void 0===e&&(e=n.e||65537),!r.options.usePureJavaScript&&s&&t>=256&&t<=16384&&(65537===e||3===e)){if(y("generateKey")&&y("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:w(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(t){return window.crypto.subtle.exportKey("pkcs8",t.privateKey)}).then(void 0,function(t){s(t)}).then(function(t){if(t){var e=a.privateKeyFromAsn1(o.fromDer(r.util.createBuffer(t)));s(null,{privateKey:e,publicKey:a.setRsaPublicKey(e.n,e.e)})}});if(b("generateKey")&&b("exportKey")){var u=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:w(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return u.oncomplete=function(t){var e=t.target.result,n=window.msCrypto.subtle.exportKey("pkcs8",e.privateKey);n.oncomplete=function(t){var e=t.target.result,n=a.privateKeyFromAsn1(o.fromDer(r.util.createBuffer(e)));s(null,{privateKey:n,publicKey:a.setRsaPublicKey(n.n,n.e)})},n.onerror=function(t){s(t)}},void(u.onerror=function(t){s(t)})}}var l=a.rsa.createKeyPairGenerationState(t,e,n);if(!s)return a.rsa.stepKeyPairGenerationState(l,0),l.keys;!function(t,e,n){"function"==typeof e&&(n=e,e={});var o={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(o.prng=e.prng);function s(){u(t.pBits,function(e,r){return e?n(e):(t.p=r,null!==t.q?l(e,t.q):void u(t.qBits,l))})}function u(t,e){r.prime.generateProbablePrime(t,o,e)}function l(e,r){if(e)return n(e);if(t.q=r,t.p.compareTo(t.q)<0){var o=t.p;t.p=t.q,t.q=o}if(0!==t.p.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.p=null,void s();if(0!==t.q.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.q=null,void u(t.qBits,l);if(t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(i.ONE))return t.p=t.q=null,void s();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void u(t.qBits,l);var c=t.e.modInverse(t.phi);t.keys={privateKey:a.rsa.setPrivateKey(t.n,t.e,c,t.p,t.q,c.mod(t.p1),c.mod(t.q1),t.q.modInverse(t.p)),publicKey:a.rsa.setPublicKey(t.n,t.e)},n(null,t.keys)}s()}(l,n,s)},a.setRsaPublicKey=a.rsa.setPublicKey=function(t,e){var n={n:t,e:e,encrypt:function(t,e,i){if("string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,n){return h(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return r.pkcs1.encode_rsa_oaep(e,t,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"==typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var o=e.encode(t,n,!0);return a.rsa.encrypt(o,n,!0)},verify:function(t,e,r){"string"==typeof r?r=r.toUpperCase():void 0===r&&(r="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===r?r={verify:function(t,e){return e=g(e,n,!0),t===o.fromDer(e).value[1].value}}:"NONE"!==r&&"NULL"!==r&&null!==r||(r={verify:function(t,e){return t===(e=g(e,n,!0))}});var i=a.rsa.decrypt(e,n,!0,!1);return r.verify(t,i,n.n.bitLength())}};return n},a.setRsaPrivateKey=a.rsa.setPrivateKey=function(t,e,n,i,o,s,u,l){var c={n:t,e:e,d:n,p:i,q:o,dP:s,dQ:u,qInv:l,decrypt:function(t,e,n){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var i=a.rsa.decrypt(t,c,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:g};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return r.pkcs1.decode_rsa_oaep(e,t,n)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(i,c,!1)},sign:function(t,e){var n=!1;"string"==typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:d},n=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},n=1);var r=e.encode(t,c.n.bitLength());return a.rsa.encrypt(r,c,n)}};return c},a.wrapRsaPrivateKey=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(t).getBytes())])},a.privateKeyFromAsn1=function(t){var e,n,s,c,p,d,f,h,g={},m=[];if(o.validate(t,u,g,m)&&(t=o.fromDer(r.util.createBuffer(g.privateKey))),g={},m=[],!o.validate(t,l,g,m)){var v=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw v.errors=m,v}return e=r.util.createBuffer(g.privateKeyModulus).toHex(),n=r.util.createBuffer(g.privateKeyPublicExponent).toHex(),s=r.util.createBuffer(g.privateKeyPrivateExponent).toHex(),c=r.util.createBuffer(g.privateKeyPrime1).toHex(),p=r.util.createBuffer(g.privateKeyPrime2).toHex(),d=r.util.createBuffer(g.privateKeyExponent1).toHex(),f=r.util.createBuffer(g.privateKeyExponent2).toHex(),h=r.util.createBuffer(g.privateKeyCoefficient).toHex(),a.setRsaPrivateKey(new i(e,16),new i(n,16),new i(s,16),new i(c,16),new i(p,16),new i(d,16),new i(f,16),new i(h,16))},a.privateKeyToAsn1=a.privateKeyToRSAPrivateKey=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.qInv))])},a.publicKeyFromAsn1=function(t){var e={},n=[];if(o.validate(t,p,e,n)){var s,u=o.derToOid(e.publicKeyOid);if(u!==a.oids.rsaEncryption)throw(s=new Error("Cannot read public key. Unknown OID.")).oid=u,s;t=e.rsaPublicKey}if(n=[],!o.validate(t,c,e,n))throw(s=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=n,s;var l=r.util.createBuffer(e.publicKeyModulus).toHex(),d=r.util.createBuffer(e.publicKeyExponent).toHex();return a.setRsaPublicKey(new i(l,16),new i(d,16))},a.publicKeyToAsn1=a.publicKeyToSubjectPublicKeyInfo=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[a.publicKeyToRSAPublicKey(t)])])},a.publicKeyToRSAPublicKey=function(t){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,m(t.e))])}},function(t,e,n){var r=n(0);n(1),n(7);var i=t.exports=r.asn1=r.asn1||{};function o(t,e,n){if(n>e){var r=new Error("Too few bytes to parse DER.");throw r.available=t.length(),r.remaining=e,r.requested=n,r}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(t,e,n,o,a){if(r.util.isArray(o)){for(var s=[],u=0;un){if(s.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=e.length(),f.remaining=n,f.requested=d,f}d=n}var h;var g;var m=32==(32&l);if(m)if(h=[],void 0===d)for(;;){if(o(e,n,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),n-=2;break}u=e.length(),h.push(t(e,n,r+1,s)),n-=u-e.length()}else for(;d>0;)u=e.length(),h.push(t(e,d,r+1,s)),n-=u-e.length(),d-=u-e.length();void 0===h&&c===i.Class.UNIVERSAL&&p===i.Type.BITSTRING&&(g=e.bytes(d));if(void 0===h&&s.decodeBitStrings&&c===i.Class.UNIVERSAL&&p===i.Type.BITSTRING&&d>1){var v=e.read,y=n,b=0;if(p===i.Type.BITSTRING&&(o(e,n,1),b=e.getByte(),n--),0===b)try{u=e.length();var w={verbose:s.verbose,strict:!0,decodeBitStrings:!0},$=t(e,n,r+1,w),k=u-e.length();n-=k,p==i.Type.BITSTRING&&k++;var C=$.tagClass;k!==d||C!==i.Class.UNIVERSAL&&C!==i.Class.CONTEXT_SPECIFIC||(h=[$])}catch(t){}void 0===h&&(e.read=v,n=y)}if(void 0===h){if(void 0===d){if(s.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=n}if(p===i.Type.BMPSTRING)for(h="";d>0;d-=2)o(e,n,2),h+=String.fromCharCode(e.getInt16()),n-=2;else h=e.getBytes(d)}var x=void 0===g?null:{bitStringContents:g};return i.create(c,p,m,h,x)}(t,t.length(),0,e)},i.toDer=function(t){var e=r.util.createBuffer(),n=t.tagClass|t.type,o=r.util.createBuffer(),a=!1;if("bitStringContents"in t&&(a=!0,t.original&&(a=i.equals(t,t.original))),a)o.putBytes(t.bitStringContents);else if(t.composed){t.constructed?n|=32:o.putByte(0);for(var s=0;s1&&(0===t.value.charCodeAt(0)&&0==(128&t.value.charCodeAt(1))||255===t.value.charCodeAt(0)&&128==(128&t.value.charCodeAt(1)))?o.putBytes(t.value.substr(1)):o.putBytes(t.value);if(e.putByte(n),o.length()<=127)e.putByte(127&o.length());else{var u=o.length(),l="";do{l+=String.fromCharCode(255&u),u>>>=8}while(u>0);e.putByte(128|l.length);for(s=l.length-1;s>=0;--s)e.putByte(l.charCodeAt(s))}return e.putBuffer(o),e},i.oidToDer=function(t){var e,n,i,o,a=t.split("."),s=r.util.createBuffer();s.putByte(40*parseInt(a[0],10)+parseInt(a[1],10));for(var u=2;u>>=7,e||(o|=128),n.push(o),e=!1}while(i>0);for(var l=n.length-1;l>=0;--l)s.putByte(n[l])}return s},i.derToOid=function(t){var e;"string"==typeof t&&(t=r.util.createBuffer(t));var n=t.getByte();e=Math.floor(n/40)+"."+n%40;for(var i=0;t.length()>0;)i<<=7,128&(n=t.getByte())?i+=127&n:(e+="."+(i+n),i=0);return e},i.utcTimeToDate=function(t){var e=new Date,n=parseInt(t.substr(0,2),10);n=n>=50?1900+n:2e3+n;var r=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),o=parseInt(t.substr(6,2),10),a=parseInt(t.substr(8,2),10),s=0;if(t.length>11){var u=t.charAt(10),l=10;"+"!==u&&"-"!==u&&(s=parseInt(t.substr(10,2),10),l+=2)}if(e.setUTCFullYear(n,r,i),e.setUTCHours(o,a,s,0),l&&("+"===(u=t.charAt(l))||"-"===u)){var c=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10);c*=6e4,"+"===u?e.setTime(+e-c):e.setTime(+e+c)}return e},i.generalizedTimeToDate=function(t){var e=new Date,n=parseInt(t.substr(0,4),10),r=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),o=parseInt(t.substr(8,2),10),a=parseInt(t.substr(10,2),10),s=parseInt(t.substr(12,2),10),u=0,l=0,c=!1;"Z"===t.charAt(t.length-1)&&(c=!0);var p=t.length-5,d=t.charAt(p);"+"!==d&&"-"!==d||(l=60*parseInt(t.substr(p+1,2),10)+parseInt(t.substr(p+4,2),10),l*=6e4,"+"===d&&(l*=-1),c=!0);return"."===t.charAt(14)&&(u=1e3*parseFloat(t.substr(14),10)),c?(e.setUTCFullYear(n,r,i),e.setUTCHours(o,a,s,u),e.setTime(+e+l)):(e.setFullYear(n,r,i),e.setHours(o,a,s,u)),e},i.dateToUtcTime=function(t){if("string"==typeof t)return t;var e="",n=[];n.push((""+t.getUTCFullYear()).substr(2)),n.push(""+(t.getUTCMonth()+1)),n.push(""+t.getUTCDate()),n.push(""+t.getUTCHours()),n.push(""+t.getUTCMinutes()),n.push(""+t.getUTCSeconds());for(var r=0;r=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var n=new Error("Integer too large; max is 32-bits.");throw n.integer=t,n},i.derToInteger=function(t){"string"==typeof t&&(t=r.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},i.validate=function(t,e,n,o){var a=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)o&&(t.tagClass!==e.tagClass&&o.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&o.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(a=!0,e.value&&r.util.isArray(e.value))for(var s=0,u=0;a&&u0&&(o+="\n");for(var a="",u=0;u1?o+="0x"+r.util.bytesToHex(t.value.slice(1)):o+="(none)",t.value.length>0){var d=t.value.charCodeAt(0);1==d?o+=" (1 unused bit shown)":d>1&&(o+=" ("+d+" unused bits shown)")}}else t.type===i.Type.OCTETSTRING?(s.test(t.value)||(o+="("+t.value+") "),o+="0x"+r.util.bytesToHex(t.value)):t.type===i.Type.UTF8?o+=r.util.decodeUtf8(t.value):t.type===i.Type.PRINTABLESTRING||t.type===i.Type.IA5String?o+=t.value:s.test(t.value)?o+="0x"+r.util.bytesToHex(t.value):0===t.value.length?o+="[null]":o+=t.value}return o}},function(t,e,n){var r=n(0);n(1),n(3),n(18);var i=t.exports=r.pkcs1=r.pkcs1||{};function o(t,e,n){n||(n=r.md.sha1.create());for(var i="",o=Math.ceil(e/n.digestLength),a=0;a>24&255,a>>16&255,a>>8&255,255&a);n.start(),n.update(t+s),i+=n.digest().getBytes()}return i.substring(0,e)}i.encode_rsa_oaep=function(t,e,n){var i,a,s,u;"string"==typeof n?(i=n,a=arguments[3]||void 0,s=arguments[4]||void 0):n&&(i=n.label||void 0,a=n.seed||void 0,s=n.md||void 0,n.mgf1&&n.mgf1.md&&(u=n.mgf1.md)),s?s.start():s=r.md.sha1.create(),u||(u=s);var l=Math.ceil(t.n.bitLength()/8),c=l-2*s.digestLength-2;if(e.length>c)throw(m=new Error("RSAES-OAEP input message length is too long.")).length=e.length,m.maxLength=c,m;i||(i=""),s.update(i,"raw");for(var p=s.digest(),d="",f=c-e.length,h=0;h=32)return u();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),u()}function u(){var t=e.plugin.md.create();t.update(e.pools[0].digest().getBytes()),e.pools[0].start();for(var n=1,r=1;r<32;++r)(n=31===n?2147483648:n<<2)%e.reseeds==0&&(t.update(e.pools[r].digest().getBytes()),e.pools[r].start());var i=t.digest().getBytes();t.start(),t.update(i);var o=t.digest().getBytes();e.key=e.plugin.formatKey(i),e.seed=e.plugin.formatSeed(o),e.reseeds=4294967295===e.reseeds?0:e.reseeds+1,e.generated=0}function l(t){var e=null;if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;n&&n.getRandomValues&&(e=function(t){return n.getRandomValues(t)})}var i=r.util.createBuffer();if(e)for(;i.length()>16)))<<16,p=4294967295&(l=(2147483647&(l+=u>>15))+(l>>31));for(s=0;s<3;++s)c=p>>>(s<<3),c^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&c))}return i.getBytes(t)}return e.pools=o,e.pool=0,e.generate=function(t,n){if(!n)return e.generateSync(t);var i=e.plugin.cipher,o=e.plugin.increment,a=e.plugin.formatKey,s=e.plugin.formatSeed,l=r.util.createBuffer();e.key=null,function c(p){if(p)return n(p);if(l.length()>=t)return n(null,l.getBytes(t));e.generated>1048575&&(e.key=null);if(null===e.key)return r.util.nextTick(function(){!function(t){if(e.pools[0].messageLength>=32)return u(),t();var n=32-e.pools[0].messageLength<<5;e.seedFile(n,function(n,r){if(n)return t(n);e.collect(r),u(),t()})}(c)});var d=i(e.key,e.seed);e.generated+=d.length;l.putBytes(d);e.key=a(i(e.key,o(e.seed)));e.seed=s(i(e.key,e.seed));r.util.setImmediate(c)}()},e.generateSync=function(t){var n=e.plugin.cipher,i=e.plugin.increment,o=e.plugin.formatKey,a=e.plugin.formatSeed;e.key=null;for(var u=r.util.createBuffer();u.length()1048575&&(e.key=null),null===e.key&&s();var l=n(e.key,e.seed);e.generated+=l.length,u.putBytes(l),e.key=o(n(e.key,i(e.seed))),e.seed=a(n(e.key,e.seed))}return u.getBytes(t)},i?(e.seedFile=function(t,e){i.randomBytes(t,function(t,n){if(t)return e(t);e(null,n.toString())})},e.seedFileSync=function(t){return i.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,l(t))}catch(t){e(t)}},e.seedFileSync=l),e.collect=function(t){for(var n=t.length,r=0;r>i&255);e.collect(r)},e.registerWorker=function(t){if(t===self)e.seedFile=function(t,e){self.addEventListener("message",function t(n){var r=n.data;r.forge&&r.forge.prng&&(self.removeEventListener("message",t),e(r.forge.prng.err,r.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:t}}})};else{t.addEventListener("message",function(n){var r=n.data;r.forge&&r.forge.prng&&e.seedFile(r.forge.prng.needed,function(e,n){t.postMessage({forge:{prng:{err:e,bytes:n}}})})})}},e}},function(t,e,n){var r=n(0);n(2),n(1);var i=t.exports=r.sha1=r.sha1||{};r.md.sha1=r.md.algorithms.sha1=i,i.create=function(){a||(o=String.fromCharCode(128),o+=r.util.fillString(String.fromCharCode(0),64),a=!0);var t=null,e=r.util.createBuffer(),n=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,o=0;o>>0,u>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=u[1],u[1]=u[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(o),s(t,n,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var a=r.util.createBuffer();a.putBytes(e.bytes());var u,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;a.putBytes(o.substr(0,i.blockLength-l));for(var c=8*i.fullMessageLength[0],p=0;p>>0,a.putInt32(c>>>0),c=u>>>0;a.putInt32(c);var d={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};s(d,n,a);var f=r.util.createBuffer();return f.putInt32(d.h0),f.putInt32(d.h1),f.putInt32(d.h2),f.putInt32(d.h3),f.putInt32(d.h4),f},i};var o=null,a=!1;function s(t,e,n){for(var r,i,o,a,s,u,l,c=n.length();c>=64;){for(i=t.h0,o=t.h1,a=t.h2,s=t.h3,u=t.h4,l=0;l<16;++l)r=n.getInt32(),e[l]=r,r=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<20;++l)r=(r=e[l-3]^e[l-8]^e[l-14]^e[l-16])<<1|r>>>31,e[l]=r,r=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<32;++l)r=(r=e[l-3]^e[l-8]^e[l-14]^e[l-16])<<1|r>>>31,e[l]=r,r=(i<<5|i>>>27)+(o^a^s)+u+1859775393+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<40;++l)r=(r=e[l-6]^e[l-16]^e[l-28]^e[l-32])<<2|r>>>30,e[l]=r,r=(i<<5|i>>>27)+(o^a^s)+u+1859775393+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<60;++l)r=(r=e[l-6]^e[l-16]^e[l-28]^e[l-32])<<2|r>>>30,e[l]=r,r=(i<<5|i>>>27)+(o&a|s&(o^a))+u+2400959708+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;for(;l<80;++l)r=(r=e[l-6]^e[l-16]^e[l-28]^e[l-32])<<2|r>>>30,e[l]=r,r=(i<<5|i>>>27)+(o^a^s)+u+3395469782+r,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=r;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+a|0,t.h3=t.h3+s|0,t.h4=t.h4+u|0,c-=64}}},function(t,e,n){var r=n(0);n(1),n(8),n(3),function(){if(r.prime)t.exports=r.prime;else{var e=t.exports=r.prime=r.prime||{},n=r.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new n(null);o.fromInt(30);var a=function(t,e){return t|e};e.generateProbablePrime=function(t,e,i){"function"==typeof e&&(i=e,e={});var o=(e=e||{}).algorithm||"PRIMEINC";"string"==typeof o&&(o={name:o}),o.options=o.options||{};var a=e.prng||r.random,l={nextBytes:function(t){for(var e=a.getBytesSync(t.length),n=0;nt&&(a=u(t,e));var f=a.toString(16);i.target.postMessage({hex:f,workLoad:c}),a.dAddOffset(p,0)}}}f()}(t,e,i,o);return s(t,e,i,o)}(t,l,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function s(t,e,n,o){var a,s=u(t,e),l=(a=s.bitLength())<=100?27:a<=150?18:a<=200?15:a<=250?12:a<=300?9:a<=350?8:a<=400?7:a<=500?6:a<=600?5:a<=800?4:a<=1250?3:2;"millerRabinTests"in n&&(l=n.millerRabinTests);var c=10;"maxBlockTime"in n&&(c=n.maxBlockTime),function t(e,n,o,a,s,l,c){var p=+new Date;do{if(e.bitLength()>n&&(e=u(n,o)),e.isProbablePrime(s))return c(null,e);e.dAddOffset(i[a++%8],0)}while(l<0||+new Date-p0,s=!(e[0]instanceof Array);if(a&&r){for(var u=0;u0&&(n+=i),n+=p(t[u],u);e.length>0&&(n+=o)}for(var l=0;l0&&(n+=i);var f=a&&s?t[d]:d;n+=p(e[l][f],d)}l-1)return!0;return!1}(t,u.BAD_DELIMITERS)||t.indexOf(i)>-1||" "===t.charAt(0)||" "===t.charAt(t.length-1);return r?a+t+a:t}}};if(u.RECORD_SEP=String.fromCharCode(30),u.UNIT_SEP=String.fromCharCode(31),u.BYTE_ORDER_MARK="\ufeff",u.BAD_DELIMITERS=["\r","\n",'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!r&&!!n.Worker,u.SCRIPT_PATH=null,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=m,u.ParserHandle=g,u.NetworkStreamer=p,u.FileStreamer=d,u.StringStreamer=f,u.ReadableStreamStreamer=h,n.jQuery){var l=n.jQuery;l.fn.parse=function(t){var e=t.config||{},r=[];return this.each(function(t){if(!("INPUT"===l(this).prop("tagName").toUpperCase()&&"file"===l(this).attr("type").toLowerCase()&&n.FileReader)||!this.files||0===this.files.length)return!0;for(var i=0;i=this._config.preview;if(i)n.postMessage({results:o,workerId:u.WORKER_ID,finished:s});else if(k(this._config.chunk)){if(this._config.chunk(o,this._handle),this._paused)return;o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),!s||!k(this._config.complete)||o&&o.meta.aborted||this._config.complete(this._completeResults,this._input),s||o&&o.meta.paused||this._nextChunk(),o}},this._sendError=function(t){k(this._config.error)?this._config.error(t):i&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:t,finished:!1})}}function p(t){var e;(t=t||{}).chunkSize||(t.chunkSize=u.RemoteChunkSize),c.call(this,t),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),r||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.open("GET",this._input,!r),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var n in t)e.setRequestHeader(n,t[n])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;e.setRequestHeader("Range","bytes="+this._start+"-"+i),e.setRequestHeader("If-None-Match","webkit-no-cache")}try{e.send()}catch(t){this._chunkError(t.message)}r&&0===e.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){4==e.readyState&&(e.status<200||e.status>=400?this._chunkError():(this._finished=!this._config.chunkSize||this._start>function(t){var e=t.getResponseHeader("Content-Range");if(null===e)return-1;return parseInt(e.substr(e.lastIndexOf("/")+1))}(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){var n=e.statusText||t;this._sendError(n)}}function d(t){var e,n;(t=t||{}).chunkSize||(t.chunkSize=u.LocalChunkSize),c.call(this,t);var r="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,r?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function f(t){var e;t=t||{},c.call(this,t),this.stream=function(t){return t,e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t=this._config.chunkSize,n=t?e.substr(0,t):e;return e=t?e.substr(t):"",this._finished=!e,this.parseChunk(n)}}}function h(t){t=t||{},c.call(this,t);var e=[],n=!0;this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._nextChunk=function(){e.length?this.parseChunk(e.shift()):n=!0},this._streamData=$(function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),n&&(n=!1,this.parseChunk(e.shift()))}catch(t){this._streamError(t)}},this),this._streamError=$(function(t){this._streamCleanUp(),this._sendError(t.message)},this),this._streamEnd=$(function(){this._streamCleanUp(),this._finished=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function g(t){var e,n,r,i=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,o=this,a=0,s=!1,l=!1,c=[],p={data:[],errors:[],meta:{}};if(k(t.step)){var d=t.step;t.step=function(e){if(p=e,h())f();else{if(f(),0===p.data.length)return;a+=e.data.length,t.preview&&a>t.preview?n.abort():d(p,o)}}}function f(){if(p&&r&&(v("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),r=!1),t.skipEmptyLines)for(var e=0;e=c.length?"__parsed_extra":c[r]),o=g(i,o),"__parsed_extra"===i?(n[i]=n[i]||[],n[i].push(o)):n[i]=o}p.data[e]=n,t.header&&(r>c.length?v("FieldMismatch","TooManyFields","Too many fields: expected "+c.length+" fields but parsed "+r,e):r1&&n[0].length=e.length/2?"\r\n":"\r"}(i)),r=!1,t.delimiter)k(t.delimiter)&&(t.delimiter=t.delimiter(i),p.meta.delimiter=t.delimiter);else{var l=function(e,n,r){for(var i,o,a,s=[",","\t","|",";",u.RECORD_SEP,u.UNIT_SEP],l=0;l1&&(p+=Math.abs(v-a),a=v):a=v}h.data.length>0&&(d/=h.data.length-f),(void 0===o||p1.99&&(o=p,i=c)}return t.delimiter=i,{successful:!!i,bestDelimiter:i}}(i,t.newline,t.skipEmptyLines);l.successful?t.delimiter=l.bestDelimiter:(r=!0,t.delimiter=u.DefaultDelimiter),p.meta.delimiter=t.delimiter}var c=w(t);return t.preview&&t.header&&c.preview++,e=i,n=new m(c),p=n.parse(e,o,a),f(),s?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return s},this.pause=function(){s=!0,n.abort(),e=e.substr(n.getCharIndex())},this.resume=function(){s=!1,o.streamer.parseChunk(e)},this.aborted=function(){return l},this.abort=function(){l=!0,n.abort(),p.meta.aborted=!0,k(t.complete)&&t.complete(p),e=""}}function m(t){var e=(t=t||{}).delimiter,n=t.newline,r=t.comments,i=t.step,o=t.preview,a=t.fastMode,s=t.quoteChar||'"';if(("string"!=typeof e||u.BAD_DELIMITERS.indexOf(e)>-1)&&(e=","),r===e)throw"Comment character same as delimiter";!0===r?r="#":("string"!=typeof r||u.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!=n&&"\r"!=n&&"\r\n"!=n&&(n="\n");var l=0,c=!1;this.parse=function(t,u,p){if("string"!=typeof t)throw"Input must be a string";var d=t.length,f=e.length,h=n.length,g=r.length,m=k(i);l=0;var v=[],y=[],b=[],w=0;if(!t)return I();if(a||!1!==a&&-1===t.indexOf(s)){for(var $=t.split(n),C=0;C<$.length;C++){b=$[C];if(l+=b.length,C!==$.length-1)l+=n.length;else if(p)return I();if(!r||b.substr(0,g)!==r){if(m){if(v=[],D(b.split(e)),O(),c)return I()}else D(b.split(e));if(o&&C>=o)return v=v.slice(0,o),I(!0)}}return I()}for(var x=t.indexOf(e,l),T=t.indexOf(n,l),S=new RegExp(s+s,"g");;)if(t[l]!==s)if(r&&0===b.length&&t.substr(l,g)===r){if(-1===T)return I();l=T+h,T=t.indexOf(n,l),x=t.indexOf(e,l)}else if(-1!==x&&(x=o)return I(!0)}else{var E=l;for(l++;;){if(-1===(E=t.indexOf(s,E+1)))return p||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:v.length,index:l}),A();if(E===d-1)return A(t.substring(l,E).replace(S,s));if(t[E+1]!==s){if(t[E+1]===e){b.push(t.substring(l,E).replace(S,s)),l=E+1+f,x=t.indexOf(e,l),T=t.indexOf(n,l);break}if(t.substr(E+1,h)===n){if(b.push(t.substring(l,E).replace(S,s)),B(E+1+h),x=t.indexOf(e,l),m&&(O(),c))return I();if(o&&v.length>=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:v.length,index:l}),E++}else E++}}return A();function D(t){v.push(t),w=l}function A(e){return p?I():(void 0===e&&(e=t.substr(l)),b.push(e),l=d,D(b),m&&O(),I())}function B(e){l=e,D(b),b=[],T=t.indexOf(n,l)}function I(t){return{data:v,errors:y,meta:{delimiter:e,linebreak:n,aborted:c,truncated:!!t,cursor:w+(u||0)}}}function O(){i(I()),v=[],y=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return l}}function v(t){var e=t.data,n=a[e.workerId],r=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){r=!0,y(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(k(n.userStep)){for(var o=0;o .wrapper").css("overflow","hidden");var t=$(".main-footer").outerHeight()||0,e=$(".main-header").outerHeight()+t,n=$(window).height(),r=$(".sidebar").height()||0;if($("body").hasClass("fixed"))$(".content-wrapper, .right-side").css("min-height",n-t);else{var i;n>=r?($(".content-wrapper, .right-side").css("min-height",n-e),i=n-e):($(".content-wrapper, .right-side").css("min-height",r),i=r);var o=$($.AdminLTE.options.controlSidebarOptions.selector);void 0!==o&&o.height()>i&&$(".content-wrapper, .right-side").css("min-height",o.height())}},fixSidebar:function(){$("body").hasClass("fixed")?(void 0===$.fn.slimScroll&&window.console&&window.console.error("Error: the fixed layout requires the slimscroll plugin!"),$.AdminLTE.options.sidebarSlimScroll&&void 0!==$.fn.slimScroll&&($(".sidebar").slimScroll({destroy:!0}).height("auto"),$(".sidebar").slimScroll({height:$(window).height()-$(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"}))):void 0!==$.fn.slimScroll&&$(".sidebar").slimScroll({destroy:!0}).height("auto")}},$.AdminLTE.pushMenu={activate:function(t){var e=$.AdminLTE.options.screenSizes;$(document).on("click",t,function(t){t.preventDefault(),$(window).width()>e.sm-1?$("body").hasClass("sidebar-collapse")?$("body").removeClass("sidebar-collapse").trigger("expanded.pushMenu"):$("body").addClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").hasClass("sidebar-open")?$("body").removeClass("sidebar-open").removeClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").addClass("sidebar-open").trigger("expanded.pushMenu")}),$(".content-wrapper").click(function(){$(window).width()<=e.sm-1&&$("body").hasClass("sidebar-open")&&$("body").removeClass("sidebar-open")}),($.AdminLTE.options.sidebarExpandOnHover||$("body").hasClass("fixed")&&$("body").hasClass("sidebar-mini"))&&this.expandOnHover()},expandOnHover:function(){var t=this,e=$.AdminLTE.options.screenSizes.sm-1;$(".main-sidebar").hover(function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-collapse")&&$(window).width()>e&&t.expand()},function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-expanded-on-hover")&&$(window).width()>e&&t.collapse()})},expand:function(){$("body").removeClass("sidebar-collapse").addClass("sidebar-expanded-on-hover")},collapse:function(){$("body").hasClass("sidebar-expanded-on-hover")&&$("body").removeClass("sidebar-expanded-on-hover").addClass("sidebar-collapse")}},$.AdminLTE.tree=function(t){var e=this,n=$.AdminLTE.options.animationSpeed;$(document).off("click",t+" li a").on("click",t+" li a",function(t){var r=$(this),i=r.next();if(i.is(".treeview-menu")&&i.is(":visible")&&!$("body").hasClass("sidebar-collapse"))i.slideUp(n,function(){i.removeClass("menu-open")}),i.parent("li").removeClass("active");else if(i.is(".treeview-menu")&&!i.is(":visible")){var o=r.parents("ul").first();o.find("ul:visible").slideUp(n).removeClass("menu-open");var a=r.parent("li");i.slideDown(n,function(){i.addClass("menu-open"),o.find("li.active").removeClass("active"),a.addClass("active"),e.layout.fix()})}i.is(".treeview-menu")&&t.preventDefault()})},$.AdminLTE.controlSidebar={activate:function(){var t=this,e=$.AdminLTE.options.controlSidebarOptions,n=$(e.selector);$(e.toggleBtnSelector).on("click",function(r){r.preventDefault(),n.hasClass("control-sidebar-open")||$("body").hasClass("control-sidebar-open")?t.close(n,e.slide):t.open(n,e.slide)});var r=$(".control-sidebar-bg");t._fix(r),$("body").hasClass("fixed")?t._fixForFixed(n):$(".content-wrapper, .right-side").height() .box-body, > .box-footer, > form >.box-body, > form > .box-footer");e.hasClass("collapsed-box")?(t.children(":first").removeClass(this.icons.open).addClass(this.icons.collapse),n.slideDown(this.animationSpeed,function(){e.removeClass("collapsed-box")})):(t.children(":first").removeClass(this.icons.collapse).addClass(this.icons.open),n.slideUp(this.animationSpeed,function(){e.addClass("collapsed-box")}))},remove:function(t){t.parents(".box").first().slideUp(this.animationSpeed)}}}$.AdminLTE={},$.AdminLTE.options={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",animationSpeed:500,sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,sidebarExpandOnHover:!1,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableFastclick:!1,enableControlTreeView:!0,enableControlSidebar:!0,controlSidebarOptions:{toggleBtnSelector:"[data-toggle='control-sidebar']",selector:".control-sidebar",slide:!0},enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa-minus",open:"fa-plus",remove:"fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},directChat:{enable:!0,contactToggleSelector:'[data-widget="chat-pane-toggle"]'},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#d2d6de"},screenSizes:{xs:480,sm:768,md:992,lg:1200}},$(function(){"use strict";$("body").removeClass("hold-transition"),"undefined"!=typeof AdminLTEOptions&&$.extend(!0,$.AdminLTE.options,AdminLTEOptions);var t=$.AdminLTE.options;_init(),$.AdminLTE.layout.activate(),t.enableControlTreeView&&$.AdminLTE.tree(".sidebar"),t.enableControlSidebar&&$.AdminLTE.controlSidebar.activate(),t.navbarMenuSlimscroll&&void 0!==$.fn.slimscroll&&$(".navbar .menu").slimscroll({height:t.navbarMenuHeight,alwaysVisible:!1,size:t.navbarMenuSlimscrollWidth}).css("width","100%"),t.sidebarPushMenu&&$.AdminLTE.pushMenu.activate(t.sidebarToggleSelector),t.enableBSToppltip&&$("body").tooltip({selector:t.BSTooltipSelector,container:"body"}),t.enableBoxWidget&&$.AdminLTE.boxWidget.activate(),t.enableFastclick&&"undefined"!=typeof FastClick&&FastClick.attach(document.body),t.directChat.enable&&$(document).on("click",t.directChat.contactToggleSelector,function(){$(this).parents(".direct-chat").first().toggleClass("direct-chat-contacts-open")}),$('.btn-group[data-toggle="btn-toggle"]').each(function(){var t=$(this);$(this).find(".btn").on("click",function(e){t.find(".btn.active").removeClass("active"),$(this).addClass("active"),e.preventDefault()})})}),function(t){"use strict";t.fn.boxRefresh=function(e){var n=t.extend({trigger:".refresh-btn",source:"",onLoadStart:function(t){return t},onLoadDone:function(t){return t}},e),r=t('
    ');return this.each(function(){if(""!==n.source){var e=t(this);e.find(n.trigger).first().on("click",function(t){var i;t.preventDefault(),(i=e).append(r),n.onLoadStart.call(i),e.find(".box-body").load(n.source,function(){var t;(t=e).find(r).remove(),n.onLoadDone.call(t)})})}else window.console&&window.console.log("Please specify a source first - boxRefresh()")})}}(jQuery),function(t){"use strict";t.fn.activateBox=function(){t.AdminLTE.boxWidget.activate(this)},t.fn.toggleBox=function(){var e=t(t.AdminLTE.boxWidget.selectors.collapse,this);t.AdminLTE.boxWidget.collapse(e)},t.fn.removeBox=function(){var e=t(t.AdminLTE.boxWidget.selectors.remove,this);t.AdminLTE.boxWidget.remove(e)}}(jQuery),function(t){"use strict";t.fn.todolist=function(e){var n=t.extend({onCheck:function(t){return t},onUncheck:function(t){return t}},e);return this.each(function(){void 0!==t.fn.iCheck?(t("input",this).on("ifChecked",function(){var e=t(this).parents("li").first();e.toggleClass("done"),n.onCheck.call(e)}),t("input",this).on("ifUnchecked",function(){var e=t(this).parents("li").first();e.toggleClass("done"),n.onUncheck.call(e)})):t("input",this).on("change",function(){var e=t(this).parents("li").first();e.toggleClass("done"),t("input",e).is(":checked")?n.onCheck.call(e):n.onUncheck.call(e)})})}}(jQuery);