!function(t,e){"use strict";var n=window.angulartics||(window.angulartics={});n.waitForVendorCount=0,n.waitForVendorApi=function(t,e,r,i,a){a||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"],a={},o={},s={};function u(e,n,r){return o[e]||(o[e]=[]),o[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(o[e].map(function(e){var i=s[e]||{};if(i.async){var a=r.defer(),o=t.copy(n);return o.unshift(a.resolve),e.apply(this,o),a.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 o=r[e],s=o?o.bufferFlushDelay:null,c=null!==s?s:r.bufferFlushDelay;t.forEach(a[e],function(t,e){r=function(){n.apply(this,t)},(i=e*c)?setTimeout(r,i):r();var r,i})}}var d=function(e){return t.extend(l,{$inject:e.invoke})};function f(t){var e,r="register"+(e=t,e.replace(/^./,function(t){return t.toUpperCase()}));c[r]=function(e,n){p(t,e,n)},l[t]=u(t,(i=t,function(){n.waitForVendorCount&&(a[i]||(a[i]=[]),a[i].push(arguments))}));var i}function h(n,r,i){t.forEach(r,i);for(var a in n)e[a]=n[a]}var g=function(){h(c,i,f)};h(c,i,f)}).run(["$rootScope","$window","$analytics","$injector",function(e,n,r,i){function a(t,e,n){if(/\?/.test(t)&&e.length>0){for(var r=t.split("?"),i=r[0],a=r[1].split("&"),o=[],s=0;s-1)&&o.push(a[l]);var c="white"==n?o:function(t,e){for(var n=[],r=0;r0?i+"?"+c.join("&"):i}return t}function o(t,e){(function(t){for(var e=0;e-1)return!0}return!1})(t)||(t=a(t,r.settings.pageTracking.queryKeysWhitelisted,"white"),t=a(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 a=i.get("$route");if(a)for(var s in a.routes){e=!1;break}else null===a&&(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();o(l,t)}else o(t.absUrl(),t)}]);r.settings.pageTracking.autoTrackVirtualPages&&i.invoke(["$location",function(t){r.settings.pageTracking.autoBasePath&&(r.settings.pageTracking.basePath=n.location.pathname+"#");var a=!0;if(r.settings.pageTracking.trackRoutes&&i.has("$route")){var s=i.get("$route");if(s)for(var u in s.routes){a=!1;break}else null===s&&(a=!1);e.$on("$routeChangeSuccess",function(e,n){if(!n||!(n.$$route||n).redirectTo){var i=r.settings.pageTracking.basePath+t.url();o(i,t)}})}r.settings.pageTracking.trackStates&&(i.has("$state")&&!i.has("$transitions")&&(a=!1,e.$on("$stateChangeSuccess",function(e,n){var i=r.settings.pageTracking.basePath+t.url();o(i,t)})),i.has("$state")&&i.has("$transitions")&&(a=!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();o(i,t)}})}]))),a&&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();o(i,t)}else o(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,a,o){var s=o.analyticsOn||"click",u={};t.forEach(o.$attr,function(t,e){"analytics"===(n=e).substr(0,9)&&-1===["On","Event","If","Properties","EventType"].indexOf(n.substr(9))&&(u[i(e)]=o[e],o.$observe(e,function(t){u[i(e)]=t}));var n}),t.element(a[0]).on(s,function(i){var s,l=o.analyticsEvent||(s=a[0],r(s)?s.innerText||s.value:s.id||s.name||s.tagName);u.eventType=i.type,o.analyticsIf&&!n.$eval(o.analyticsIf)||(o.analyticsProperties&&t.extend(u,n.$eval(o.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),a=e.get("$analytics");return a.settings.trackExceptions&&a.exceptionTrack(n,r),i}}])}]);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 void 0!==e&&null!==e&&e.length>0?e.substring(0,1).toLowerCase()+e.substring(1):e}}(angular),function(){var t;(t=angular.module("ui.bootstrap.showErrors",[])).directive("showErrors",["$timeout","showErrorsConfig","$interpolate",function(t,e,n){var r,i,a;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},a=function(e,a,o,s){var u,l,c,p,d,f,h,g;if(u=!1,d=e.$eval(o.showErrors),f=r(d),g=i(d),l=a[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 a.removeClass("has-error"),a.removeClass("has-success"),u=!1},0,!1)}),function(t){if(a.toggleClass("has-error",t),f)return a.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 a}}}]),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";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)}}}]);function n(t,n,r){var i=r.baseHref(),a=t[0];return function(t,r,o){a.cookie=function(t,r,a){var o,s;s=(a=a||{}).expires,o=e.isDefined(a.path)?a.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+=o?";path="+o:"",u+=a.domain?";domain="+a.domain:"",u+=s?";expires="+s.toUTCString():"";var l=(u+=a.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,o)}}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 t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o=new Date(e,t)},month:{parse:function(t){return i(t)},isValid:r},year:{parse:a,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"),a=t("xtend");e.exports=a(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"),a=r(2);e.exports=function(t,e){var n=(e=e||new Date).getFullYear().toString().substr(0,2);return t=i(t),i(n+a(t))}},{"parse-int":24,"zero-fill":31}],16:[function(t,e,n){"use strict";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,a=0;n;)e=parseInt(t.charAt(--n),10),a+=(i^=1)?r[e]:e;return!!a&&a%10==0});var r},{}],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,a=r.call(arguments,1),o=Math.max(0,e.length-a.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){var e;return r.test(t)?t.toLowerCase():i.test(t)?(e=t,e.replace(a,function(t,e,n){return e+" "+n.toLowerCase().split("").join(" ")})).toLowerCase():t.toLowerCase();return t.toLowerCase()};var r=/\s/,i=/([a-z][A-Z]|[A-Z][a-z])/;var a=/(.)([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,a){var o=a.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,o,{});throw new Error("unauthenticatedRedirector must be a function")}t.isAuthenticated=!1;function l(){t.isAuthenticated=!0}function c(){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(o.tokenGetter);i&&!r.isTokenExpired(i)||(t.preventDefault(),u(o.unauthenticatedRedirector))}}),{authenticate:l,unauthenticate:c,getToken:function(){return s(o.tokenGetter)},redirect:function(){return u(o.unauthenticatedRedirector)},checkAuthOnRefresh:function(){t.$on("$locationChangeStart",function(){var e=s(o.tokenGetter);e&&(r.isTokenExpired(e)?t.$broadcast("tokenHasExpired",e):l())})},redirectWhenUnauthenticated:function(){t.$on("unauthenticated",function(){u(o.unauthenticatedRedirector),c()})},isAuthenticated:function(){var t=s(o.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,a){var o=angular.extend({},a.getConfig(),t);return{request:function(t){if(t.skipAuthorization||!function(t){if(!i.isSameOrigin(t)&&!o.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,a;e.module("ngMessages",[],function(){n=e.forEach,r=e.isArray,i=e.isString,a=e.element}).info({angularVersion:"1.6.7"}).directive("ngMessages",["$animate",function(t){return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(i,a,o){var s=this,u=0,l=0;this.getAttachId=function(){return l++};var c,p,d=this.messages={};this.render=function(u){c=!1,p=u=u||{};for(var l=e(a,o.ngMessagesMultiple)||e(a,o.multiple),d=[],f={},h=s.head,g=!1,m=0;null!=h;){m++;var v=h.message,y=!1;g||n(u,function(t,e){if(!y&&r(t)&&v.test(e)){if(f[e])return;f[e]=!0,y=!0,v.attach()}}),y?g=!l:d.push(v),h=h.next}n(d,function(t){t.detach()}),d.length!==m?t.setClass(i,"ng-active","ng-inactive"):t.setClass(i,"ng-inactive","ng-active")},a.$watchCollection(o.ngMessages||o.for,s.render),i.on("$destroy",function(){n(d,function(t){t.message.detach()})}),this.reRender=function(){c||(c=!0,a.$evalAsync(function(){c&&p&&s.render(p)}))},this.register=function(t,e){var n=u.toString();d[n]={message:e},function(t,e,n){var r=d[n];if(s.head){var i=f(t,e);i?(r.next=i.next,i.next=r):(r.next=s.head,s.head=r)}else s.head=r}(i[0],t,n),t.$$ngMessageNode=n,u++,s.reRender()},this.deregister=function(t){var e=t.$$ngMessageNode;delete t.$$ngMessageNode,function(t,e,n){var r=d[n],i=f(t,e);i?i.next=r.next:s.head=r.next}(i[0],t,e),delete d[e],s.reRender()};function f(t,e){for(var n=e,r=[];n&&n!==t;){var i=n.$$ngMessageNode;if(i&&i.length)return d[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))}}}]};function e(t,e){return i(e)&&0===e.length||r(t.$eval(e))}function r(t){return i(t)?t.length:!!t}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(t,e,n){return{restrict:"AE",require:"^^ngMessages",link:function(e,a,o){var s=o.ngMessagesInclude||o.src;t(s).then(function(t){e.$$destroyed||(i(t)&&!t.trim()?r(a,s):n(t)(e,function(t){a.after(t),r(a,s)}))})}};function r(t,r){var i=n.$$createComment?n.$$createComment("ngMessagesInclude",r):e[0].createComment(" ngMessagesInclude: "+r+" "),o=a(i);t.after(o),t.remove()}}]).directive("ngMessage",o()).directive("ngMessageExp",o());function o(){return["$animate",function(t){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(e,n,i,a,o){var s,u=n[0],l=i.ngMessage||i.when,c=i.ngMessageExp||i.whenExp,p=function(t){s=t?r(t)?t:t.split(/[\s,]+/):null,a.reRender()};c?(p(e.$eval(c)),e.$watchCollection(c,p)):p(l);var d,f;a.register(u,f={test:function(t){return function(t,e){if(t)return r(t)?t.indexOf(e)>=0:t.hasOwnProperty(e)}(s,t)},attach:function(){d||o(function(e,r){t.enter(e,null,n);var i=(d=e).$$attachId=a.getAttachId();d.on("$destroy",function(){d&&d.$$attachId===i&&(a.deregister(u),f.detach()),r.$destroy()})})},detach:function(){if(d){var e=d;d=null,t.leave(e)}}})}}}]}}(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=o(t),r||!0!==C[t]||!0===g[t]||(a("")),t==r&&(r=!1)},chars:function(t){r||a(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"+e;try{e=encodeURI(e)}catch(t){return}var n=new t.XMLHttpRequest;n.responseType="document",n.open("GET","data:text/html;charset=utf-8,"+e,!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(e){for(;e;){if(e.nodeType===t.Node.ELEMENT_NODE)for(var n=e.attributes,r=0,i=n.length;r"\u201d\u2019]/i,r=/^mailto:/i,i=e.$$minErr("linky"),a=e.isDefined,o=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=o(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){t&&y.push(function(t){var e=[];return c(e,s).chars(t),e.join("")}(t))}function w(t,e){var n,r=m(t);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 t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o>>0,a=[];for(e=r(t,e),n=r(t,n,i);e>>0;return e=null==e?n||0:e<0?Math.max(r+e,0):Math.min(e,r)}},{}],9:[function(t,e,n){"use strict";var r=t("./raw"),i=[],a=[],o=r.makeRequestCallFromTimer(function(){if(a.length)throw a.shift()});e.exports=s;function s(t){var e;(e=i.length?i.pop():new u).task=t,r(e)}function u(){this.task=null}u.prototype.call=function(){try{this.task.call()}catch(t){s.onerror?s.onerror(t):(a.push(t),o())}finally{this.task=null,i[i.length]=this}}},{"./raw":10}],10:[function(t,e,n){(function(t){"use strict";e.exports=n;function n(t){i.length||(r(),!0),i[i.length]=t}var r,i=[],a=0,o=1024;function s(){for(;ao){for(var e=0,n=i.length-a;e0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?r.splice(o,1/0,i):r.push(i),~n.indexOf(a)&&(a=e.call(this,i,a))}else n.push(a);return null==t?a:t.call(this,i,a)}}},{}],25:[function(t,e,n){"use strict";var r=t("assert-ok"),i=t("assert-equal"),a=t("dot-prop"),o=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){a.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 a.get(n,r).apply(null,t);var i=s(o(t));return"function"==typeof i?i(e):void 0})}));var r;return t},{})}},{"array-last":7,"assert-equal":11,"assert-ok":13,"call-all-fns":14,dezalgo:16,"dot-prop":26,"to-array":34}],26:[function(t,e,n){"use strict";var r=t("is-obj");e.exports.get=function(t,e){if(!r(t)||"string"!=typeof e)return t;for(var n=i(e),a=0;a0&&(n+=r[0]);for(var a=1;a0?r=t.substring(0,e):!n&&t&&t.length>0&&(r=t),{base:r,query:n?t.substring(e+1):void 0}}(t);return e.base&&(a=e.base),function(t){var e={};return t?(o(t.split("&"),function(t){var r=t.split("="),i=n(r[0]),a=decodeURIComponent(i.val),o=r[1]&&decodeURIComponent(r[1]);"array"===i.type?(e[a]||(e[a]=[]),e[a].push(o)):"string"===i.type&&(e[a]=o)}),e):e}(e.query)}return t});return e?i.apply({},u):a+function(t){var e,n=[];for(var i in t)t.hasOwnProperty(i)&&(void 0!==t[i]?(e=encodeURIComponent(i),r(t[i])?o(t[i],function(t){n.push(e+"[]="+encodeURIComponent(t))}):n.push(e+"="+encodeURIComponent(t[i]))):n.push(encodeURIComponent(i)));return n.length?"?"+n.join("&"):""}(i.apply({},u))},o=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=o.defer())}))}function h(n,a,h,m){return angular.isObject(h)&&(m=h,h=null),function(n){var a=g();if(function(){var t=a.preventDuplicates&&n.message===c,e=a.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:o.defer()};t.iconClass=n.iconClass,n.optionsOverride&&(angular.extend(a,function(t){for(var e=["containerId","iconClasses","maxOpened","newestOnTop","positionClass","preventDuplicates","preventOpenDuplicates","templates"],n=0,r=e.length;n");return e.get("$compile")(n)(t)}(t.scope),t}();if(l.push(h),a.autoDismiss&&a.maxOpened&&l.length>a.maxOpened)for(var m=l.slice(0,l.length-a.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})(a).then(function(){if(h.isOpened=!0,a.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:a,optionsOverride:m,title:h})}function g(){return angular.extend({},a)}}}(),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";angular.module("toastr").directive("progressBar",t),t.$inject=["toastrConfig"];function t(t){return{require:"^toast",templateUrl:function(){return t.templates.progressbar},link:function(t,e,n,r){var i,a,o;r.progressBar=t,t.start=function(t){i&&clearInterval(i),a=parseFloat(t),o=(new Date).getTime()+a,i=setInterval(s,10)},t.stop=function(){i&&clearInterval(i)};function s(){var t=(o-(new Date).getTime())/a*100;e.css("width",t+"%")}t.$on("$destroy",function(){clearInterval(i)})}}}}(),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";angular.module("toastr").directive("toast",t),t.$inject=["$injector","$interval","toastrConfig","toastr"];function t(t,e,n,r){return{templateUrl:function(){return n.templates.toast},controller:"ToastController",link:function(n,i,a,o){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)}n.init=function(){n.options.timeOut&&(s=c(n.options.timeOut)),n.options.onShown&&n.options.onShown()},i.on("mouseenter",function(){n.progressBar=!1,o.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))});function c(t){return o.startProgressBar(t),e(function(){o.stopProgressBar(),r.remove(n.toastId)},t,1)}}}}}(),function(){"use strict";angular.module("toastr",[]).factory("toastr",t),t.$inject=["$animate","$injector","$document","$rootScope","$sce","toastrConfig","$q"];function t(t,e,n,r,i,a,o){var s,u=0,l=[],c="",p={},d=o.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=o.defer())}))}function h(n,a,h,m){return angular.isObject(h)&&(m=h,h=null),function(n){var a=g();if(function(){var t=a.preventDuplicates&&n.message===c,e=a.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:o.defer()};t.iconClass=n.iconClass,n.optionsOverride&&(angular.extend(a,function(t){for(var e=["containerId","iconClasses","maxOpened","newestOnTop","positionClass","preventDuplicates","preventOpenDuplicates","templates"],n=0,r=e.length;n");return e.get("$compile")(n)(t)}(t.scope),t}();if(l.push(h),a.autoDismiss&&a.maxOpened&&l.length>a.maxOpened)for(var m=l.slice(0,l.length-a.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})(a).then(function(){if(h.isOpened=!0,a.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:a,optionsOverride:m,title:h})}function g(){return angular.extend({},a)}}}(),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";angular.module("toastr").directive("progressBar",t),t.$inject=["toastrConfig"];function t(t){return{require:"^toast",templateUrl:function(){return t.templates.progressbar},link:function(t,e,n,r){var i,a,o;r.progressBar=t,t.start=function(t){i&&clearInterval(i),a=parseFloat(t),o=(new Date).getTime()+a,i=setInterval(s,10)},t.stop=function(){i&&clearInterval(i)};function s(){var t=(o-(new Date).getTime())/a*100;e.css("width",t+"%")}t.$on("$destroy",function(){clearInterval(i)})}}}}(),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";angular.module("toastr").directive("toast",t),t.$inject=["$injector","$interval","toastrConfig","toastr"];function t(t,e,n,r){return{templateUrl:function(){return n.templates.toast},controller:"ToastController",link:function(n,i,a,o){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)}n.init=function(){n.options.timeOut&&(s=c(n.options.timeOut)),n.options.onShown&&n.options.onShown()},i.on("mouseenter",function(){n.progressBar=!1,o.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))});function c(t){return o.startProgressBar(t),e(function(){o.stopProgressBar(),r.remove(n.toastId)},t,1)}}}}}(),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')}]),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(t,e,n,r){var i=r.has("$animateCss")?r.get("$animateCss"):null;return{link:function(r,a,o){var s=n(o.expanding),u=n(o.expanded),l=n(o.collapsing),c=n(o.collapsed),p=!1,d={},f={};!function(){(p=!!("horizontal"in o))?(d={width:""},f={width:"0"}):(d={height:""},f={height:"0"});r.$eval(o.uibCollapse)||a.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(d)}();function h(t){return p?{width:t.scrollWidth+"px"}:{height:t.scrollHeight+"px"}}function g(){a.removeClass("collapsing").addClass("collapse").css(d),u(r)}function m(){a.css(f),a.removeClass("collapsing").addClass("collapse"),c(r)}r.$watch(o.uibCollapse,function(n){n?function(){if(!a.hasClass("collapse")&&!a.hasClass("in"))return m();e.resolve(l(r)).then(function(){a.css(h(a[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),i?i(a,{removeClass:"in",to:f}).start().finally(m):t.removeClass(a,"in",{to:f}).then(m)},angular.noop)}():a.hasClass("collapse")&&a.hasClass("in")||e.resolve(s(r)).then(function(){a.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),i?i(a,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:h(a[0])}).start().finally(g):t.addClass(a,"in",{css:{overflow:"hidden"},to:h(a[0])}).then(g)},angular.noop)})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(t,e,n){n.$observe("disabled",function(t){n.$set("tabindex",t?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(t,e,n){this.groups=[],this.closeOthers=function(r){(angular.isDefined(e.closeOthers)?t.$eval(e.closeOthers):n.closeOthers)&&angular.forEach(this.groups,function(t){t!==r&&(t.isOpen=!1)})},this.addGroup=function(t){var e=this;this.groups.push(t),t.$on("$destroy",function(n){e.removeGroup(t)})},this.removeGroup=function(t){var e=this.groups.indexOf(t);-1!==e&&this.groups.splice(e,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(t,e){return e.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(t){this.heading=t}},link:function(t,e,n,r){e.addClass("panel"),r.addGroup(t),t.openClass=n.openClass||"panel-open",t.panelClass=n.panelClass||"panel-default",t.$watch("isOpen",function(n){e.toggleClass(t.openClass,!!n),n&&r.closeOthers(t)}),t.toggleOpen=function(e){t.isDisabled||e&&32!==e.which||(t.isOpen=!t.isOpen)};var i="accordiongroup-"+t.$id+"-"+Math.floor(1e4*Math.random());t.headingId=i+"-tab",t.panelId=i+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(t,e,n,r,i){r.setHeading(i(t,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(t,e,n,r){t.$watch(function(){return r[n.uibAccordionTransclude]},function(t){if(t){var n=angular.element(e[0].querySelector("uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"));n.html(""),n.append(t)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(t,e,n,r,i){t.closeable=!!n.close,e.addClass("alert"),n.$set("role","alert"),t.closeable&&e.addClass("alert-dismissible");var a=angular.isDefined(n.dismissOnTimeout)?r(n.dismissOnTimeout)(t.$parent):null;a&&i(function(){t.close()},parseInt(a,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(t,e){return e.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(t){this.activeClass=t.activeClass||"active",this.toggleEvent=t.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(t){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(e,n,r,i){var a=i[0],o=i[1],s=t(r.uibUncheckable);n.find("input").css({display:"none"}),o.$render=function(){n.toggleClass(a.activeClass,angular.equals(o.$modelValue,e.$eval(r.uibBtnRadio)))},n.on(a.toggleEvent,function(){if(!r.disabled){var t=n.hasClass(a.activeClass);t&&!angular.isDefined(r.uncheckable)||e.$apply(function(){o.$setViewValue(t?null:e.$eval(r.uibBtnRadio)),o.$render()})}}),r.uibUncheckable&&e.$watch(s,function(t){r.$set("uncheckable",t?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(t,e,n,r){var i=r[0],a=r[1];e.find("input").css({display:"none"});function o(){return s(n.btnCheckboxTrue,!0)}function s(e,n){return angular.isDefined(e)?t.$eval(e):n}a.$render=function(){e.toggleClass(i.activeClass,angular.equals(a.$modelValue,o()))},e.on(i.toggleEvent,function(){n.disabled||t.$apply(function(){a.$setViewValue(e.hasClass(i.activeClass)?s(n.btnCheckboxFalse,!1):o()),a.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(t,e,n,r,i){var a,o,s=this,u=s.slides=t.slides=[],l="uib-slideDirection",c=t.active,p=!1;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 a=f(n.slide);void 0===r&&(r=a>s.getCurrentIndex()?"next":"prev"),n.slide.index===c||t.$currentTransition||function(n,r,a){if(p)return;if(angular.extend(n,{direction:a}),angular.extend(u[c].slide||{},{direction:a}),i.enabled(e)&&!t.$currentTransition&&u[r].element&&s.slides.length>1){u[r].element.data(l,n.direction);var o=s.getCurrentIndex();angular.isNumber(o)&&u[o].element&&u[o].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,a,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||(o=!1,h())},t.play=function(){o||(o=!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;e0&&(a=n(m,e))}function m(){var e=+t.interval;o&&!isNaN(e)&&e>0&&u.length?t.next():t.pause()}}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(t,e){return e.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(t){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(e,n,r,i){n.addClass("item"),i.addSlide(e,n),e.$on("$destroy",function(){i.removeSlide(e)}),e.$watch("active",function(e){t[e?"addClass":"removeClass"](n,"active")})}}}]).animation(".item",["$animateCss",function(t){var e="uib-slideDirection";function n(t,e,n){t.removeClass(e),n&&n()}return{beforeAddClass:function(r,i,a){if("active"===i){var o=r.data(e),s="next"===o?"left":"right",u=n.bind(this,r,s+" "+o,a);return r.addClass(o),t(r,{addClass:s}).start().done(u),function(){!0}}a()},beforeRemoveClass:function(r,i,a){if("active"===i){var o="next"===r.data(e)?"left":"right",s=n.bind(this,r,o,a);return t(r,{addClass:o}).start().done(s),function(){!0}}a()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter","filterFilter",function(t,e,n,r,i){var a,o,s=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){a=e.id,this.parsers={},this.formatters={},o=[{key:"yyyy",regex:"\\d{4}",apply:function(t){this.year=+t},formatter:function(t){var e=new Date;return e.setFullYear(Math.abs(t.getFullYear())),n(e,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(t){t=+t,this.year=t<69?t+2e3:t+1900},formatter:function(t){var e=new Date;return e.setFullYear(Math.abs(t.getFullYear())),n(e,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(t){this.year=+t},formatter:function(t){var e=new Date;return e.setFullYear(Math.abs(t.getFullYear())),n(e,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(t){this.month=t-1},formatter:function(t){var e=t.getMonth();return/^[0-9]$/.test(e)?n(t,"MM"):n(t,"M")}},{key:"MMMM",regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)},formatter:function(t){return n(t,"MMMM")}},{key:"MMM",regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)},formatter:function(t){return n(t,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(t){this.month=t-1},formatter:function(t){return n(t,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(t){this.month=t-1},formatter:function(t){return n(t,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t},formatter:function(t){var e=t.getDate();return/^[1-9]$/.test(e)?n(t,"dd"):n(t,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t},formatter:function(t){return n(t,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(t){this.date=+t},formatter:function(t){return n(t,"d")}},{key:"EEEE",regex:e.DATETIME_FORMATS.DAY.join("|"),formatter:function(t){return n(t,"EEEE")}},{key:"EEE",regex:e.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(t){return n(t,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(t){this.hours=+t},formatter:function(t){return n(t,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(t){this.minutes=+t},formatter:function(t){return n(t,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(t){this.minutes=+t},formatter:function(t){return n(t,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(t){this.milliseconds=+t},formatter:function(t){return n(t,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(t){this.seconds=+t},formatter:function(t){return n(t,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(t){this.seconds=+t},formatter:function(t){return n(t,"s")}},{key:"a",regex:e.DATETIME_FORMATS.AMPMS.join("|"),apply:function(t){12===this.hours&&(this.hours=0),"PM"===t&&(this.hours+=12)},formatter:function(t){return n(t,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(t){var e=t.match(/([+-])(\d{2})(\d{2})/),n=e[1],r=e[2],i=e[3];this.hours+=c(n+r),this.minutes+=c(n+i)},formatter:function(t){return n(t,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(t){return n(t,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(t){return n(t,"w")}},{key:"GGGG",regex:e.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(t){return n(t,"GGGG")}},{key:"GGG",regex:e.DATETIME_FORMATS.ERAS.join("|"),formatter:function(t){return n(t,"GGG")}},{key:"GG",regex:e.DATETIME_FORMATS.ERAS.join("|"),formatter:function(t){return n(t,"GG")}},{key:"G",regex:e.DATETIME_FORMATS.ERAS.join("|"),formatter:function(t){return n(t,"G")}}],angular.version.major>=1&&angular.version.minor>4&&o.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();function u(t){return i(o,{key:t},!0)[0]}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);function l(t,e){for(var n=t.substr(e),r=0;r=t.length||"'"!==t.charAt(i+1))&&(r.push((a=t,o=n,s=i,function(){return a.substr(o+1,s-o-1)})),n=null);else if(i===t.length)for(;n-1){var a=!1;t=t.split("");for(var s=i;s-1){t=t.split(""),n[i]="("+r.regex+")",t[i]="$";for(var a=i+1,o=i+r.key.length;a28)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}};function c(t){return parseInt(t,10)}this.toTimezone=function(t,e){return t&&e?f(t,e):t},this.fromTimezone=function(t,e){return t&&e?f(t,e,!0):t},this.timezoneToOffset=p,this.addDateMinutes=d,this.convertTimezoneToLocal=f;function p(t,e){t=t.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function d(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}function f(t,e,n){n=n?-1:1;var r=t.getTimezoneOffset();return d(t,n*(p(e,r)-r))}}]),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 a=[],o=[],s={},u=i.uibIsClass.match(e),l=u[2],c=u[1].split(",");return function(e,r,i){a.push(e),o.push({scope:e,element:r}),c.forEach(function(r,i){!function(e,r){var i=e.match(n),a=r.$eval(i[1]),u=i[2],c=s[e];if(!c){var p=function(e){var n=null;o.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,a),n&&t.addClass(n.element,a),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=a.indexOf(e);if(a.splice(n,1),o.splice(n,1),a.length){var r=a[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,a,o,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=(a.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&&o.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||o.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 a=this.compare(e,i),o={date:e,label:p.filter(e,n),selected:r&&0===this.compare(e,r),disabled:this.isDisabled(e),past:a<0,current:0===a,future:a>0,customClass:this.customClass(e)||null};return r&&0===this.compare(e,r)&&(t.selectedDt=o),d.activeDate&&0===this.compare(o.date,d.activeDate)&&(t.activeDt=o),o},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"};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()()});function m(e){t.datepickerMode=e,t.datepickerOptions.datepickerMode=e}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(t,e,n){var r=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=e;function i(t,e){return 1!==e||t%4!=0||t%100==0&&t%400!=0?r[e]:29}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),a=0;a0?7-o:-o,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;this.element=e;function a(t){return parseInt((t-1)/i,10)*i+1}this.yearpickerInit=function(){r=this.yearColumns,i=this.yearRows*r,this.step={years:i}},this._refreshView=function(){for(var e,n=new Array(i),o=0,s=a(this.activeDate.getFullYear());o');t.find("body").append(o),n=o[0].offsetWidth-o[0].clientWidth,n=isFinite(n)?n:0,o.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),a=this.scrollParent(t,!1,!0),s=this.scrollbarWidth(o.test(a.tagName));return{scrollbarWidth:s,widthOverflow:a.scrollWidth>a.clientWidth,right:r+s,originalRight:r,heightOverflow:a.scrollHeight>a.clientHeight,bottom:i+s,originalBottom:i}},isScrollable:function(t,n){t=this.getRawNode(t);var r=n?i.hidden:i.normal,a=e.getComputedStyle(t);return r.test(a.overflow+a.overflowY+a.overflowX)},scrollParent:function(n,r,a){n=this.getRawNode(n);var o=r?i.hidden:i.normal,s=t[0].documentElement,u=e.getComputedStyle(n);if(a&&o.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&&o.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 a=e.getComputedStyle(n);i.top-=this.parseStyle(a.marginTop),i.left-=this.parseStyle(a.marginLeft)}var o=this.offsetParent(n),s={top:0,left:0};return o!==t[0].documentElement&&((s=this.offset(o)).top+=o.clientTop-o.scrollTop,s.left+=o.clientLeft-o.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 a=(n=this.getRawNode(n)).getBoundingClientRect(),o={top:0,left:0,bottom:0,right:0},s=r?t[0].documentElement:this.scrollParent(n),u=s.getBoundingClientRect();if(o.top=u.top+s.clientTop,o.left=u.left+s.clientLeft,s===t[0].documentElement&&(o.top+=e.pageYOffset,o.left+=e.pageXOffset),o.bottom=o.top+s.clientHeight,o.right=o.left+s.clientWidth,i){var l=e.getComputedStyle(s);o.top+=this.parseStyle(l.paddingTop),o.bottom-=this.parseStyle(l.paddingBottom),o.left+=this.parseStyle(l.paddingLeft),o.right-=this.parseStyle(l.paddingRight)}return{top:Math.round(a.top-o.top),bottom:Math.round(o.bottom-a.bottom),left:Math.round(a.left-o.left),right:Math.round(o.right-a.right)}},parsePlacement:function(t){var e=a.auto.test(t);return e&&(t=t.replace(a.auto,"")),(t=t.split("-"))[0]=t[0]||"top",a.primary.test(t[0])||(t[0]="top"),t[1]=t[1]||"center",a.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 o=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=o+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(a.vertical.test(r[0])){var h=u.width/2-o/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-o;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-o;break;case"center":a.vertical.test(r[0])?l.left=u.left+u.width/2-o/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"),o=i?t.querySelector(".tooltip-arrow"):t.querySelector(".arrow");if(o){var s={top:"",bottom:"",left:"",right:""};if("center"!==(n=this.parsePlacement(n))[1]){var u="border-"+n[0]+"-width",l=e.getComputedStyle(o)[u],c="border-";a.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(o).css(s)}else angular.element(o).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,a,o,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=[];this.init=function(i){if(S=function(t){var e;angular.version.minor<6?(e=angular.isObject(t.$options)?t.$options:{timezone:null}).getOption=function(t){return e[t]}:e=t.$options;return e}(T=i),v=angular.isDefined(n.closeOnDateSelection)?t.$parent.$eval(n.closeOnDateSelection):d.closeOnDateSelection,y=angular.isDefined(n.datepickerAppendToBody)?t.$parent.$eval(n.datepickerAppendToBody):d.appendToBody,b=angular.isDefined(n.onOpenFocus)?t.$parent.$eval(n.onOpenFocus):d.onOpenFocus,w=angular.isDefined(n.datepickerPopupTemplateUrl)?n.datepickerPopupTemplateUrl:d.datepickerPopupTemplateUrl,$=angular.isDefined(n.datepickerTemplateUrl)?n.datepickerTemplateUrl:d.datepickerTemplateUrl,D=angular.isDefined(n.altInputFormats)?t.$parent.$eval(n.altInputFormats):d.altInputFormats,t.showButtonBar=angular.isDefined(n.showButtonBar)?t.$parent.$eval(n.showButtonBar):d.showButtonBar,d.html5Types[n.type]?(m=d.html5Types[n.type],A=!0):(m=n.uibDatepickerPopup||d.datepickerPopup,n.$observe("uibDatepickerPopup",function(t,e){var n=t||d.datepickerPopup;if(n!==m&&(m=n,T.$modelValue=null,!m))throw new Error("uibDatepickerPopup must have a date format specified.")})),!m)throw new Error("uibDatepickerPopup must have a date format specified.");if(A&&n.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");(k=angular.element("
")).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(o).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(a(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(o).on("resize",R)},0,!1):(s.off("click",P),x&&x.off("scroll",R),angular.element(o).off("resize",R))});function I(e){var n=p.parse(e,m,t.date);if(isNaN(n))for(var r=0;r');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 o,s=null;return n.$broadcast(g.NOW_CLOSING_EVENT,function(){return o||(o=a.defer(),s=o.promise),function(){o.resolve()}}),a.when(s).then(u);function u(){u.done||(u.done=!0,t.leave(e).then(function(){r&&r(),e.remove(),i&&i.resolve()}),n.$destroy())}}n.on("keydown",x),i.$on("$destroy",function(){n.off("keydown",x)});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())}}g.open=function(e,a){var o=n[0].activeElement,s=a.openedClass||d;k(!1),v=f.top(),f.add(e,{deferred:a.deferred,renderDeferred:a.renderDeferred,closedDeferred:a.closedDeferred,modalScope:a.scope,backdrop:a.backdrop,keyboard:a.keyboard,openedClass:a.openedClass,windowTopClass:a.windowTopClass,animation:a.animation,appendTo:a.appendTo}),h.put(s,e);var g=a.appendTo,$=w();$>=0&&!l&&((c=i.$new(!0)).modalOptions=a,c.index=$,(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"}),a.backdropClass&&l.addClass(a.backdropClass),a.animation&&l.attr("modal-animation","true"),r(l)(c),t.enter(l,g),u.isScrollable(g)&&(p=u.scrollbarPadding(g)).heightOverflow&&p.scrollbarWidth&&g.css({paddingRight:p.right+"px"}));var C;a.component?(C=document.createElement((x=a.component.name,x.replace(b,function(t,e){return(e?"-":"")+t.toLowerCase()}))),(C=angular.element(C)).attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):C=a.content;var x;m=v?parseInt(v.value.modalDomEl.attr("index"),10)+1:0;var T=angular.element('
');T.attr({class:"modal","template-url":a.windowTemplateUrl,"window-top-class":a.windowTopClass,role:"dialog","aria-labelledby":a.ariaLabelledBy,"aria-describedby":a.ariaDescribedBy,size:a.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(C),a.windowClass&&T.addClass(a.windowClass),a.animation&&T.attr("modal-animation","true"),g.addClass(s),a.scope&&(a.scope.$$topModalIndex=m),t.enter(r(T)(a.scope),g),f.top().value.modalDomEl=T,f.top().value.modalOpener=o,S(T);function S(t){if(t&&"BODY"!==t[0].tagName)return function(t){var e=t.parent()?t.parent().children():[];return Array.prototype.filter.call(e,function(e){return e!==t[0]})}(t).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")}),S(t.parent())}};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 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,a,o,s){var u={};var l=null;return u.getPromiseChain=function(){return l},u.open=function(u){var c=n.defer(),p=n.defer(),d=n.defer(),f=n.defer(),h={result:c.promise,opened:p.promise,closed:d.promise,rendered:f.promise,close:function(t){return s.close(h,t)},dismiss:function(t){return s.dismiss(h,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.");var g;g=u.component?n.when(o.resolve(u.resolve,{},null,null)):n.all([(m=u,m.template?n.when(m.template):i(angular.isFunction(m.templateUrl)?m.templateUrl():m.templateUrl)),o.resolve(u.resolve,{},null,null)]);var m;function v(){return g}var y;return y=l=n.all([l]).then(v,v).then(function(t){var n=u.scope||e,r=n.$new();r.$close=h.close,r.$dismiss=h.dismiss,r.$on("$destroy",function(){r.$$uibDestructionScheduled||r.$dismiss("$uibUnscheduledDestruction")});var i,o,l={scope:r,deferred:c,renderDeferred:f,closedDeferred:d,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},g={},m={};u.component?(v(g,!1,!0,!1),g.name=u.component,l.component=g):u.controller&&(v(m,!0,!1,!0),o=a(u.controller,m,!0,u.controllerAs),u.controllerAs&&u.bindToController&&((i=o.instance).$close=r.$close,i.$dismiss=r.$dismiss,angular.extend(i,{$resolve:m.$scope.$resolve},n)),i=o(),angular.isFunction(i.$onInit)&&i.$onInit()),u.component||(l.content=t[0]),s.open(h,l),p.resolve(!0);function v(e,n,i,a){e.$scope=r,e.$scope.$resolve={},i?e.$scope.$uibModalInstance=h:e.$uibModalInstance=h;var o=n?t[1]:t;angular.forEach(o,function(t,n){a&&(e[n]=t),e.$scope.$resolve[n]=t})}},function(t){p.reject(t),c.reject(t)}).finally(function(){l===y&&(l=null)}),h},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 a=i[0],o=i[1];o&&a.init(o,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 a=this,o=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;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&&a._watchers.push(t.$parent.$watch(n(e.maxSize),function(t){o=parseInt(t,10),a.render()}));function p(t,e,n){return{number:t,text:e,active:n}}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,a=angular.isDefined(o)&&oe&&(r=(i=e)-o+1):(r=(Math.ceil(t/o)-1)*o+1,i=Math.min(r+o-1,e)));for(var d=r;d<=i;d++){var f=p(d,c(d),d===t);n.push(f)}if(a&&o>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(b);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=a(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=a(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)))};T.origScope=t,T.isOpen=!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),a=parseInt(i[l+"PopupCloseDelay"],10);T.popupDelay=isNaN(n)?f.popupDelay:n,T.popupCloseDelay=isNaN(a)?f.popupCloseDelay:a}(),T.popupDelay?v||(v=a(P,T.popupDelay,!1)):P())}function M(){_(),T.popupCloseDelay?y||(y=a(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?o.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&&(a.cancel(v),v=null),b&&(a.cancel(b),b=null)}function R(){T&&T.$evalAsync(function(){T&&(T.isOpen=!1,U(!1),T.animation?m||(m=a(N,150,!1)):N())})}function L(){y&&(a.cancel(y),y=null),m&&(a.cancel(m),m=null)}function N(){_(),L(),A.length&&(angular.forEach(A,function(t){t()}),A.length=0),p&&(p.remove(),p=null,w&&a.cancel(w)),d.remove(T),g&&(g.$destroy(),g=null)}function U(e){E&&angular.isFunction(E.assign)&&E.assign(t,e)}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()});function q(t){T&&T.isOpen&&p&&(e[0].contains(t.target)||p[0].contains(t.target)||M())}function j(t){27===t.which&&M()}var F=function(){C.show.forEach(function(t){"outsideClick"===t?e.off("click",I):(e.off(t,O),e.off(t,I)),e.off("keypress",j)}),C.hide.forEach(function(t){"outsideClick"===t?o.off("click",q):e.off(t,M)})};!function(){var n=[],r=[],a=t.$eval(i[l+"Trigger"]);F(),angular.isObject(a)?(Object.keys(a).forEach(function(t){n.push(t),r.push(a[t])}),C={show:n,hide:r}):C=h(a),"none"!==C.show&&C.show.forEach(function(t,n){"outsideClick"===t?(e.on("click",I),o.on("click",q)):t===C.hide[n]?e.on(t,I):t&&(e.on(t,O),e.on(C.hide[n],M)),e.on("keypress",j)})}();var V=t.$eval(i[l+"Animation"]);T.animation=angular.isDefined(V)?!!V:f.animation;var z,H=l+"AppendToBody";z=H in i&&void 0===i[H]||t.$eval(i[H]),k=angular.isDefined(z)?z:k,t.$on("$destroy",function(){F(),N(),T=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(t,e,n,r){return{link:function(i,a,o){var s,u,l,c=i.$eval(o.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(o.uibTooltipTemplateTransclude),function(e){var o=++p;e?(r(e,!0).then(function(r){if(o===p){var i=c.$new(),u=n(r)(i,function(e){d(),t.enter(e,a)});l=u,(s=i).$emit("$includeContentLoaded",e)}},function(){o===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;this.bars=[],t.max=a(),this.addBar=function(t,e,n){i||e.css({transition:"none"}),this.bars.push(t),t.max=a(),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=a(),t.recalculatePercentage()})});function a(){return angular.isDefined(t.maxParam)?t.maxParam:n.max}}]).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 a=angular.isDefined(e.titles)?t.$parent.$eval(e.titles):n.titles;this.titles=angular.isArray(a)&&a.length>0?a:n.titles;var o=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(o)},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],a=r[1];i.init(a)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(t){var e,n=this;n.tabs=[],n.select=function(t,a){if(!r){var o=i(e),s=n.tabs[o];if(s){if(s.tab.onDeselect({$event:a,$selectedIndex:t}),a&&a.isDefaultPrevented())return;s.tab.active=!1}var u=n.tabs[t];u?(u.tab.onSelect({$event:a}),u.tab.active=!0,n.active=u.index,e=u.index):!u&&angular.isDefined(e)&&(n.active=null,e=null)}},n.addTab=function(t){if(n.tabs.push({tab:t,index:t.index}),n.tabs.sort(function(t,e){return t.index>e.index?1:t.indexy||tc&&t>y},t.noIncrementMinutes=function(){var t=D(c,m);return b||t>y||tc&&t>y},t.noIncrementSeconds=function(){var t=A(c,w);return b||t>y||tc&&t>y},t.noToggleMeridian=function(){return c.getHours()<12?b||D(c,720)>y: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()}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),cy?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),cy?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=function(){var e=+t.seconds;return e>=0&&e<60?e:void 0}();d.$setDirty(),angular.isDefined(e)?(c.setSeconds(e),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),cy?(d.$setValidity("time",!1),t.invalidHours=!0,t.invalidMinutes=!0):T(),S())};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))}t.showSpinners=angular.isDefined(n.showSpinners)?t.$parent.$eval(n.showSpinners):o.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*m)},t.decrementMinutes=function(){t.noDecrementMinutes()||E(60*-m)},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],a=r[1];a&&i.init(a,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,a,o,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="typeahead-"+R.$id+"-"+Math.floor(1e4*Math.random());e.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":N});var U,q;O&&((U=angular.element("
")).css("position","relative"),e.after(U),(q=e.clone()).attr("placeholder",""),q.attr("tabindex","-1"),q.val(""),q.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"}),q.attr("id")&&q.removeAttr("id"),U.append(q),q.after(e));var j=angular.element("
");j.attr({id:N,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)&&j.attr("template-url",n.typeaheadTemplateUrl),angular.isDefined(n.typeaheadPopupTemplateUrl)&&j.attr("popup-template-url",n.typeaheadPopupTemplateUrl);var F=function(){R.matches=[],R.activeIdx=-1,e.attr("aria-expanded",!1),O&&q.val("")},V=function(t){return N+"-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),a.when(_.source(t,i)).then(function(a){var o=n===f.$viewValue;if(o&&b)if(a&&a.length>0){R.activeIdx=A?0:-1,T(t,!1),R.matches.length=0;for(var s=0;sp&&l&&l.toUpperCase()===R.matches[p].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 u=R.matches[0].label;angular.isString(n)&&n.length>0&&u.slice(0,n.length).toUpperCase()===n.toUpperCase()?q.val(n+u.slice(n.length)):q.val("")}}else F(),T(t,!0);var l,p;o&&$(t,!1)},function(){F(),$(t,!1),T(t,!0)})};E&&(angular.element(u).on("resize",K),s.find("body").on("scroll",K));var H=c(function(){R.matches.length&&W(),R.moveInProgress=!1},200);R.moveInProgress=!1;function K(){R.moveInProgress||(R.moveInProgress=!0,R.$digest()),H()}function W(){R.position=E?p.offset(e):p.position(e),R.position.top+=e.prop("offsetHeight")}R.query=void 0;var G,Y=function(){G&&o.cancel(G)};F(),R.assignIsOpen=function(e){I(t,e)},R.select=function(r,i){var a,s,u={};w=!0,u[_.itemName]=s=R.matches[r].model,a=_.modelMapper(t,u),l=t,c=a,angular.isFunction(M(t))&&h.getOption("getterSetter")?P(l,{$$$p:c}):M.assign(l,c);var l,c;f.$setValidity("editable",!0),f.$setValidity("parse",!0),C(t,{$item:s,$model:a,$label:_.viewMapper(t,u),$event:i}),F(),!1!==R.$eval(n.typeaheadFocusOnSelect)&&o(function(){e[0].focus()},0,!1)},e.on("keydown",function(e){if(0!==R.matches.length&&-1!==g.indexOf(e.which)){var n=k(t,{$event:e});if(-1===R.activeIdx&&n||9===e.which&&e.shiftKey)return F(),void R.$digest();e.preventDefault();var r;switch(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(),(r=j[0].querySelectorAll(".uib-typeahead-match")[R.activeIdx]).parentNode.scrollTop=r.offsetTop;break;case 40:R.activeIdx=(R.activeIdx+1)%R.matches.length,R.$digest(),(r=j[0].querySelectorAll(".uib-typeahead-match")[R.activeIdx]).parentNode.scrollTop=r.offsetTop;break;default:n&&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||o(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",K),s.find("body").off("scroll",K)),j.remove(),O&&U.remove()});var Z=r(j)(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){b=!0,0===m||e&&e.length>=m?v>0?(Y(),n=e,G=o(function(){z(n)},v)):z(e):($(t,!1),Y(),F());var n;return 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,a){var o=n(a.templateUrl)(r.$parent)||"uib/template/typeahead/typeahead-match.html";t(o).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;r=e.has("$sanitize");return function(e,i){!r&&(a=e,/<.*>/g.test(a))&&n.warn("Unsafe use of typeahead please use ngSanitize");var a;e=i?(""+e).replace(new RegExp((o=i,o.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")),"gi"),"$&"):e;var o;return 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}),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,n){"use strict";var r=e.isDefined,i=e.isFunction,a=e.isString,o=e.isObject,s=e.isArray,u=e.forEach,l=e.extend,c=e.copy,p=e.toJson;function d(t,e){return l(new(l(function(){},{prototype:t})),e)}function f(t){return u(arguments,function(e){e!==t&&u(e,function(e,n){t.hasOwnProperty(n)||(t[n]=e)})}),t}function h(t){if(Object.keys)return Object.keys(t);var e=[];return u(t,function(t,n){e.push(n)}),e}function g(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[c]),o[i[c]]=t[i[c]]);return l({},o,e)}function v(t,e){var n={};return u(t,function(t){n[t]=e[t]}),n}function y(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return u(n,function(n){n in t&&(e[n]=t[n])}),e}function b(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in t)-1==g(n,r)&&(e[r]=t[r]);return e}function w(t,e){var n=s(t),r=n?[]:{};return u(t,function(t,i){e(t,i)&&(r[n?r.length:i]=t)}),r}function $(t,e){var n=s(t)?[]:{};return u(t,function(t,r){n[r]=e(t,r)}),n}function k(t){return t.then(n,function(){})&&t}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"]),C.$inject=["$q","$injector"];function C(t,e){var i=1,s=2,c={},p=[],d=c,m=l(t.when(c),{$$promises:c,$$values:c});this.study=function(c){if(!o(c))throw new Error("'invocables' must be an object");var v=h(c||{}),y=[],w=[],$={};function C(t,n){if($[n]!==s){if(w.push(n),$[n]===i)throw w.splice(0,g(w,n)),new Error("Cyclic dependency: "+w.join(" -> "));if($[n]=i,a(t))y.push(n,[function(){return e.get(t)}],p);else{var r=e.annotate(t);u(r,function(t){t!==n&&c.hasOwnProperty(t)&&C(c[t],t)}),y.push(n,t,r)}w.pop(),$[n]=s}}u(c,C),c=w=$=null;function x(t){return o(t)&&t.then&&t.$$promises}return function(i,a,s){if(x(i)&&s===n&&(s=a,a=i,i=null),i){if(!o(i))throw new Error("'locals' must be an object")}else i=d;if(a){if(!x(a))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else a=m;var c=t.defer(),p=k(c.promise),h=p.$$promises={},g=l({},i),w=1+y.length/3,$=!1;k(p);function C(){--w||($||f(g,a.$$values),p.$$values=g,p.$$promises=p.$$promises||!0,delete p.$$inheritedValues,c.resolve(g))}function T(t){p.$$failure=t,c.reject(t)}if(r(a.$$failure))return T(a.$$failure),p;a.$$inheritedValues&&f(g,b(a.$$inheritedValues,v)),l(h,a.$$promises),a.$$values?($=f(g,b(a.$$values,v)),p.$$inheritedValues=b(a.$$values,v),C()):(a.$$inheritedValues&&(p.$$inheritedValues=b(a.$$inheritedValues,v)),a.then(C,T));for(var S=0,E=y.length;S=0);)w=m(b.id,b.type,b.cfg,"path"),u+=v(b.segment,w.type.pattern.source,w.squash,w.isOptional),p.push(b.segment),c=a.lastIndex;var k=($=t.substring(c)).indexOf("?");if(k>=0){var C=this.sourceSearch=$.substring(k);if($=$.substring(0,k),this.sourcePath=t.substring(0,c+k),C.length>0)for(c=0;i=s.exec(C);)w=m((b=y(i,!0)).id,b.type,b.cfg,"search"),c=a.lastIndex}else this.sourcePath=t,this.sourceSearch="";u+=v($)+(!1===e.strict?"/?":"")+"$",p.push($),this.regexp=new RegExp(u,e.caseInsensitive?"i":n),this.prefix=p[0],this.$$paramNames=g}T.prototype.concat=function(t,e){var n={caseInsensitive:x.caseInsensitive(),strict:x.strictMode(),squash:x.defaultSquashPolicy()};return new T(this.sourcePath+t+this.sourceSearch,l(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 i,a,o,s=this.parameters(),u=s.length,l=this.segments.length-1,c={};if(l!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");function p(t){function e(t){return t.split("").reverse().join("")}return $($(e(t).split(/-(?!\\)/),e),function(t){return t.replace(/\\-/g,"-")}).reverse()}var d,f;for(i=0;i=0)throw new Error("State must have a valid name");if(w.hasOwnProperty(n))throw new Error("State '"+n+"' is already defined");var r=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):a(e.parent)?e.parent:o(e.parent)&&a(e.parent.name)?e.parent.name:"";if(r&&!w[r])return s=r,u=e.self,C[s]||(C[s]=[]),void C[s].push(u);var s,u;for(var l in S)i(S[l])&&(e[l]=S[l](e,S.$delegates[l]));return w[n]=e,!e[T]&&e.url&&t.when(e.url,["$match","$stateParams",function(t,n){b.$current.navigable==e&&function(t,e,n){if(!n){n=[];for(var r in t)n.push(r)}for(var i=0;i=I;r--)(o=h[r]).self.onExit&&S.invoke(o.self.onExit,o.self,o.locals.globals),o.locals=null;for(r=I;r-1)){if(!function(t){for(var e=t.split("."),n=b.$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);o.inheritedData("$uiView");n.$on("$stateChangeSuccess",function(){y(!1)}),y(!0);function y(s){var u,y=M(n,c,o,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=a.defer(),s=a.defer(),u={$animEnter:i.promise,$animLeave:s.promise,$$animLeave:s};t.data("$uiViewAnim",u),v.enter(t,o,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)}}}}}}O.$inject=["$compile","$controller","$state","$interpolate"];function O(t,n,r,a){return{restrict:"ECA",priority:-400,compile:function(o){var s=o.html();return o.empty?o.empty():o[0].innerHTML=null,function(o,u,l){var c=r.$current,p=M(o,l,u,a),d=c&&c.locals[p];if(!d)return u.html(s),void t(u.contents())(o);u.data("$uiView",{name:p,state:d.$$state}),u.html(d.$template?d.$template:s);var f=e.extend({},d);o[d.$$resolveAs]=f;var h=t(u.contents());if(d.$$controller){d.$scope=o,d.$element=u;var g=n(d.$$controller,d);d.$$controllerAs&&(o[d.$$controllerAs]=g,o[d.$$controllerAs][d.$$resolveAs]=f),i(g.$onInit)&&g.$onInit(),u.data("$ngControllerController",g),u.children().data("$ngControllerController",g)}h(o)}}}}function M(t,e,n,r){var i=r(e.uiView||e.name||"")(t),a=n.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(a?a.state.name:"")}e.module("ui.router.state").directive("uiView",I),e.module("ui.router.state").directive("uiView",O);function P(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 _(t){var e=t.parent().inheritedData("$uiView");if(e&&e.state&&e.state.name)return e.state}function R(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 L(t,e,n,r,i){return function(a){var o=a.which||a.button,s=i();if(!(o>1||a.ctrlKey||a.metaKey||a.shiftKey||t.attr("target"))){var u=n(function(){e.go(s.state,s.params,s.options)});a.preventDefault();var l=r.isAnchor&&!s.href?1:0;a.preventDefault=function(){l--<=0&&n.cancel(u)}}}}N.$inject=["$state","$timeout"];function N(t,n){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,a,o){var s,u=P(a.uiSref,t.current.name),c={state:u.state,href:null,params:null},p=R(i),d=o[1]||o[0],f=null;c.options=l((h=i,g=t,{relative:_(h)||g.$current,inherit:!0}),a.uiSrefOpts?r.$eval(a.uiSrefOpts):{});var h,g,m=function(n){n&&(c.params=e.copy(n)),c.href=t.href(u.state,c.params,c.options),f&&f(),d&&(f=d.$$addStateInfo(u.state,c.params)),null!==c.href&&a.$set(p.attr,c.href)};u.paramExpr&&(r.$watch(u.paramExpr,function(t){t!==c.params&&m(t)},!0),c.params=e.copy(r.$eval(u.paramExpr))),m(),p.clickable&&(s=L(i,t,n,p,function(){return c}),i[i.on?"on":"bind"]("click",s),r.$on("$destroy",function(){i[i.off?"off":"unbind"]("click",s)}))}}}U.$inject=["$state","$timeout"];function U(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,r,i,a){var o,s=R(r),u=a[1]||a[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&&(o=L(r,t,e,s,function(){return c}),r[r.on?"on":"bind"]("click",o),n.$on("$destroy",function(){r[r.off?"off":"unbind"]("click",o)}))}}}q.$inject=["$state","$stateParams","$interpolate"];function q(t,e,n){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,r,i,s){var l,c,d=[],f={};l=n(i.uiSrefActiveEq||"",!1)(e);try{c=e.$eval(i.uiSrefActive)}catch(t){}c=c||n(i.uiSrefActive||"",!1)(e),o(c)&&u(c,function(n,r){if(a(n)){var i=P(n,t.current.name);h(i.state,e.$eval(i.paramExpr),r)}}),this.$$addStateInfo=function(t,e){if(!(o(c)&&d.length>0)){var n=h(t,e,c);return g(),n}},e.$on("$stateChangeSuccess",g);function h(n,i,s){var u=t.get(n,_(r)),l=function(t,n){if(!a(t))throw new Error("state should be a string");if(o(n))return t+p(n);if(n=e.$eval(n),o(n))return t+p(n);return t}(n,i),c={state:u||{name:n},params:i,hash:l};return d.push(c),f[l]=s,function(){var t=d.indexOf(c);-1!==t&&d.splice(t,1)}}function g(){for(var e=0;e-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}i(t instanceof Array?t.concat(r):[t,r],a)}),r?function(t,e,i){var a=n.settings.ga.additionalAccountHitTypes[t];r(e,i,a)}:e.noop;function i(r,i){var a,o=n.settings.ga.userId,s=t.GoogleAnalyticsObject;t[s].apply(this,r),i&&(a=e.copy(r),o&&!n.settings.ga.additionalAccountHitTypes.userId&&a[2]&&"object"==typeof a[2]&&delete a[2].userId,e.forEach(n.settings.ga.additionalAccountNames,function(e){a[0]=e+"."+a[0],t[s].apply(this,a)}))}}()}])}(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(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o0&&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=o})},{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 a={exports:{}};i(a,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=a.exports}}(this,function(t,e,n,r){"use strict";var i=s(e),a=s(n),o=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,o.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,a=/^(?:AUTH|ENROLL)+\|[A-Za-z0-9\+\/=]+\|[A-Za-z0-9\+\/=]+$/,o=/^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-"+(n=e,n.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()));var n}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.');C(),v(b)}function w(e){return Boolean(e.origin==="https://"+t&&"string"==typeof e.data&&(e.data.match(a)||e.data.match(o)||e.data.match(s)))}function $(e){e&&(e.host&&(t=e.host),e.sig_request&&y(e.sig_request),e.post_action&&(c=e.post_action),e.post_argument&&(p=e.post_argument),e.iframe&&(e.iframe.tagName?r=e.iframe:"string"==typeof e.iframe&&(l=e.iframe)),"function"==typeof e.submit_callback&&(i=e.submit_callback)),(r=document.getElementById(l))?C():m(b),v($)}function k(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(),o(t)):(e.push(t),1===e.length&&a.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};function a(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}i.ByteBuffer=o;function o(t){if(this.data="",this.read=0,"string"==typeof t)this.data=t;else if(i.isArrayBuffer(t)||i.isArrayBufferView(t)){var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(t){for(var n=0;n4096&&(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){a(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){a(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 a(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="",a="",o=0,s=0;n>0;--n,++o)i=t.charCodeAt(o)^e.charCodeAt(o),s>=10&&(r+=a,a="",s=0),a+=String.fromCharCode(i),++s;return r+=a},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,a="",o="",u=0;u>2),a+=s.charAt((3&n)<<4|r>>4),isNaN(r)?a+="==":(a+=s.charAt((15&r)<<2|i>>6),a+=isNaN(i)?"=":s.charAt(63&i)),e&&a.length>e&&(o+=a.substr(0,e)+"\r\n",a=a.substr(e));return o+=a},i.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,n,r,i,a="",o=0;o>4),64!==r&&(a+=String.fromCharCode((15&n)<<4|r>>2),64!==i&&(a+=String.fromCharCode((3&r)<<6|i)));return a},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,a=0;a>2),a+=s.charAt((3&n)<<4|r>>4),isNaN(r)?a+="==":(a+=s.charAt((15&r)<<2|i>>6),a+=isNaN(i)?"=":s.charAt(63&i)),e&&a.length>e&&(o+=a.substr(0,e)+"\r\n",a=a.substr(e));return o+=a},i.binary.base64.decode=function(t,e,n){var r=e;r||(r=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var i,a,o,s,l=0,c=n=n||0;l>4,64!==o&&(r[c++]=(15&a)<<4|o>>2,64!==s&&(r[c++]=(3&o)<<6|s));return e?c-n:r.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 a=n=n||0,o=0;o0?(i=n[r].substring(0,o),a=n[r].substring(o+1)):(i=n[r],a=null),i in e||(e[i]=[]),i in Object.prototype||null===a||e[i].push(unescape(a))}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 a=e.split("/");a.length>0&&""===a[0]&&a.shift();return{pathString:e,queryString:n,path:a,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&&a.push(n),o=r.lastIndex;var s=e[0][1];switch(s){case"s":case"o":i");break;case"%":a.push("%");break;default:a.push("<%"+s+"?>")}}return a.push(t.substring(o)),a.join("")},i.formatNumber=function(t,e,n,r){var i=t,a=isNaN(e=Math.abs(e))?2:e,o=void 0===n?",":n,s=void 0===r?".":r,u=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(a),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)+(a?o+Math.abs(i-l).toFixed(a).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(o)}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(o.bytes()),o=e.digest()),n=r.util.createBuffer(),i=r.util.createBuffer(),l=o.length();for(u=0;u>>=2;for(i=0;i>8^255&p^99,a[g]=p,o[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,o=r.length,u=p*(o+6+1),c=o;c>>16&255]<<24^a[n>>>8&255]<<16^a[255&n]<<8^a[n>>>24]^s[i]<<24,i++):o>6&&c%o==4&&(n=a[n>>>24]<<24^a[n>>>16&255]<<16^a[n>>>8&255]<<8^a[255&n]),r[c]=r[c-o]^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[a[d>>>16&255]]^g[a[d>>>8&255]]^m[a[255&d]];r=v}return r}function h(t,e,n,r){var i,s,c,p,d,f=t.length/4-1;r?(i=l[0],s=l[1],c=l[2],p=l[3],d=o):(i=u[0],s=u[1],c=u[2],p=u[3],d=a);var h,g,m,v,y,b,w;h=e[0]^t[0],g=e[r?3:1]^t[1],m=e[2]^t[2],v=e[r?1:3]^t[3];for(var $=3,k=1;k>>24]^s[g>>>16&255]^c[m>>>8&255]^p[255&v]^t[++$],b=i[g>>>24]^s[m>>>16&255]^c[v>>>8&255]^p[255&h]^t[++$],w=i[m>>>24]^s[v>>>16&255]^c[h>>>8&255]^p[255&g]^t[++$],v=i[v>>>24]^s[h>>>16&255]^c[g>>>8&255]^p[255&m]^t[++$],h=y,g=b,m=w;n[0]=d[h>>>24]<<24^d[g>>>16&255]<<16^d[m>>>8&255]<<8^d[255&v]^t[++$],n[r?3:1]=d[g>>>24]<<24^d[m>>>16&255]<<16^d[v>>>8&255]<<8^d[255&h]^t[++$],n[2]=d[m>>>24]<<24^d[v>>>16&255]<<16^d[h>>>8&255]<<8^d[255&g]^t[++$],n[r?1:3]=d[v>>>24]<<24^d[h>>>16&255]<<16^d[g>>>8&255]<<8^d[255&m]^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 a=null;n instanceof r.util.ByteBuffer&&(a=n,n={}),(n=n||{}).output=a,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 a(t,e){i[t]=e,i[e]=t}function o(t,e){i[t]=e}a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRSAEncryption"),a("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),a("1.2.840.113549.1.1.7","RSAES-OAEP"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.9","pSpecified"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),a("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),a("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("1.2.840.113549.2.5","md5"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),a("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),a("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),a("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),a("1.2.840.113549.2.7","hmacWithSHA1"),a("1.2.840.113549.2.8","hmacWithSHA224"),a("1.2.840.113549.2.9","hmacWithSHA256"),a("1.2.840.113549.2.10","hmacWithSHA384"),a("1.2.840.113549.2.11","hmacWithSHA512"),a("1.2.840.113549.3.7","des-EDE3-CBC"),a("2.16.840.1.101.3.4.1.2","aes128-CBC"),a("2.16.840.1.101.3.4.1.22","aes192-CBC"),a("2.16.840.1.101.3.4.1.42","aes256-CBC"),a("2.5.4.3","commonName"),a("2.5.4.5","serialName"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.16.840.1.113730.1.1","nsCertType"),o("2.5.29.1","authorityKeyIdentifier"),o("2.5.29.2","keyAttributes"),o("2.5.29.3","certificatePolicies"),o("2.5.29.4","keyUsageRestriction"),o("2.5.29.5","policyMapping"),o("2.5.29.6","subtreesConstraint"),o("2.5.29.7","subjectAltName"),o("2.5.29.8","issuerAltName"),o("2.5.29.9","subjectDirectoryAttributes"),o("2.5.29.10","basicConstraints"),o("2.5.29.11","nameConstraints"),o("2.5.29.12","policyConstraints"),o("2.5.29.13","basicConstraints"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),o("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),o("2.5.29.20","cRLNumber"),o("2.5.29.21","cRLReason"),o("2.5.29.22","expirationDate"),o("2.5.29.23","instructionCode"),o("2.5.29.24","invalidityDate"),o("2.5.29.25","cRLDistributionPoints"),o("2.5.29.26","issuingDistributionPoint"),o("2.5.29.27","deltaCRLIndicator"),o("2.5.29.28","issuingDistributionPoint"),o("2.5.29.29","certificateIssuer"),o("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),o("2.5.29.33","policyMappings"),o("2.5.29.34","policyConstraints"),a("2.5.29.35","authorityKeyIdentifier"),o("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),o("2.5.29.46","freshestCRL"),o("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping")},function(t,e,n){var r=n(0);t.exports=r.jsbn=r.jsbn||{};var i;function a(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))}r.jsbn.BigInteger=a;function o(){return new a(null)}function s(t,e,n,r,i,a){for(var o=16383&e,s=e>>14;--a>=0;){var u=16383&this.data[t],l=this.data[t++]>>14,c=s*u+l*o;i=((u=o*u+((16383&c)<<14)+n.data[r]+i)>>28)+(c>>14)+s*l,n.data[r++]=268435455&u}return i}"undefined"==typeof navigator?(a.prototype.am=s,i=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(t,e,n,r,i,a){for(var o=32767&e,s=e>>15;--a>=0;){var u=32767&this.data[t],l=this.data[t++]>>15,c=s*u+l*o;i=((u=o*u+((32767&c)<<15)+n.data[r]+(1073741823&i))>>>30)+(c>>>15)+s*l+(i>>>30),n.data[r++]=1073741823&u}return i},i=30):"Netscape"!=navigator.appName?(a.prototype.am=function(t,e,n,r,i,a){for(;--a>=0;){var o=e*this.data[t++]+n.data[r]+i;i=Math.floor(o/67108864),n.data[r++]=67108863&o}return i},i=26):(a.prototype.am=s,i=28),a.prototype.DB=i,a.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}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)};function v(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},v.prototype.revert=function(t){var e=o();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)};a.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},a.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},a.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,o=0;--r>=0;){var s=8==n?255&t[r]:f(t,r);s<0?"-"==t.charAt(r)&&(i=!0):(i=!1,0==o?this.data[this.t++]=s:o+n>this.DB?(this.data[this.t-1]|=(s&(1<>this.DB-o):this.data[this.t-1]|=s<=this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t},a.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},a.prototype.drShiftTo=function(t,e){for(var n=t;n=0;--n)e.data[n+o+1]=this.data[n]>>i|s,s=(this.data[n]&a)<=0;--n)e.data[n]=0;e.data[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},a.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,a=(1<>r;for(var o=n+1;o>r;r>0&&(e.data[this.t-n-1]|=(this.s&a)<>=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()},a.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()},a.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)),a.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&&a.ZERO.subTo(e,e)),n.t=p,n.clamp(),c>0&&n.rShiftTo(c,n),u<0&&a.ZERO.subTo(n,n)}}},a.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},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(t,e){if(t>4294967295||t<1)return a.ONE;var n=o(),r=o(),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)},a.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,a=d(n));o>=0;)s>(s+=this.DB-e)):(n=this.data[o]>>(s-=e)&r,s<=0&&(s+=this.DB,--o)),n>0&&(i=!0),i&&(a+=d(n));return i?a:"0"},a.prototype.negate=function(){var t=o();return a.ZERO.subTo(this,t),t},a.prototype.abs=function(){return this.s<0?this.negate():this},a.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},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(t){var e=o();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(a.ZERO)>0&&t.subTo(e,e),e},a.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new m(e):new v(e),this.exp(t,n)},a.ZERO=h(0),a.ONE=h(1);function y(t,e){return t&e}function b(t,e){return t|e}function w(t,e){return t^e}function $(t,e){return t&~e}function k(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=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}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)};function S(t){this.r2=o(),this.q3=o(),a.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}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=o();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];a.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},a.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=o(),a=o(),s="";for(this.divRemTo(r,i,a);i.signum()>0;)s=(n+a.intValue()).toString(t).substr(1)+s,i.divRemTo(r,i,a);return a.intValue().toString(t)+s},a.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,o=0,s=0,u=0;u=n&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),i&&a.ZERO.subTo(this,this)},a.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(a.ONE.shiftLeft(t-1),b,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(a.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()},a.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},a.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]}},a.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n.data[--r]=0;var i;for(i=n.t-this.t;r=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},a.prototype.millerRabin=function(t){var e=this.subtract(a.ONE),n=e.getLowestSetBit();if(n<=0)return!1;for(var r,i=e.shiftRight(n),o={nextBytes:function(t){for(var e=0;e=0);var u=r.modPow(i,this);if(0!=u.compareTo(a.ONE)&&0!=u.compareTo(e)){for(var l=1;l++>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.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},a.prototype.equals=function(t){return 0==this.compareTo(t)},a.prototype.min=function(t){return this.compareTo(t)<0?this:t},a.prototype.max=function(t){return this.compareTo(t)>0?this:t},a.prototype.and=function(t){var e=o();return this.bitwiseTo(t,y,e),e},a.prototype.or=function(t){var e=o();return this.bitwiseTo(t,b,e),e},a.prototype.xor=function(t){var e=o();return this.bitwiseTo(t,w,e),e},a.prototype.andNot=function(t){var e=o();return this.bitwiseTo(t,$,e),e},a.prototype.not=function(){for(var t=o(),e=0;e=this.t?0!=this.s:0!=(this.data[e]&1<1){var p=o();for(r.sqrTo(s[1],p);u<=c;)s[u]=o(),r.mulTo(p,s[u-2],s[u]),u+=2}var d,f,y=t.t-1,b=!0,w=o();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(a),b=!1;else{for(;u>1;)r.sqrTo(a,w),r.sqrTo(w,a),u-=2;u>0?r.sqrTo(a,w):(f=a,a=w,w=f),r.mulTo(w,s[d],a)}for(;y>=0&&0==(t.data[y]&1<=0?(n.subTo(r,n),e&&i.subTo(s,i),o.subTo(u,o)):(r.subTo(n,r),e&&s.subTo(i,s),u.subTo(o,u))}return 0!=r.compareTo(a.ONE)?a.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},a.prototype.pow=function(t){return this.exp(t,new x)},a.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(),a=n.getLowestSetBit();if(a<0)return e;for(i0&&(e.rShiftTo(a,e),n.rShiftTo(a,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 a>0&&n.lShiftTo(a,n),n},a.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(a),u(t,n,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var o=r.util.createBuffer();o.putBytes(e.bytes());var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-s));for(var l,c=8*i.fullMessageLength[0],p=0;p>>0,o.putInt32(c>>>0),c=l>>>0;o.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,o);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 a=null,o=!1,s=null;function u(t,e,n){for(var r,i,a,o,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)a=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),o=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=a+o)>>>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,a=r.pkcs5=r.pkcs5||{};r.util.isNodejs&&!r.options.usePureJavaScript&&(i=n(5)),t.exports=r.pbkdf2=a.pbkdf2=function(t,e,n,a,o,s){if("function"==typeof o&&(s=o,o=null),r.util.isNodejs&&!r.options.usePureJavaScript&&i.pbkdf2&&(null===o||"object"!=typeof o)&&(i.pbkdf2Sync.length>4||!o||"sha1"===o))return"string"!=typeof o&&(o="sha1"),t=new Buffer(t,"binary"),e=new Buffer(e,"binary"),s?4===i.pbkdf2Sync.length?i.pbkdf2(t,e,n,a,function(t,e){if(t)return s(t);s(null,e.toString("binary"))}):i.pbkdf2(t,e,n,a,o,function(t,e){if(t)return s(t);s(null,e.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(t,e,n,a).toString("binary"):i.pbkdf2Sync(t,e,n,a,o).toString("binary");if(void 0!==o&&null!==o||(o="sha1"),"string"==typeof o){if(!(o in r.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=r.md[o].create()}var u=o.digestLength;if(a>4294967295*u){var l=new Error("Derived key is too long.");if(s)return s(l);throw l}var c=Math.ceil(a/u),p=a-(c-1)*u,d=r.hmac.create();d.start(o,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+=v0))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=a(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=a(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&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!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&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!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=a(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&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!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=a(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&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}o(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=r.util.createBuffer(t.iv);this._cipherLength=0;var n;if(n="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=e.length();if(12===i)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),o(this._inBlock),this._partialBytes=0,n=r.util.createBuffer(n),this._aDataLength=s(8*n.length());var a=n.length()%this.blockSize;for(a&&n.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];n.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[n.getInt32(),n.getInt32(),n.getInt32(),n.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&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!n)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),o(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),o(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,a=new Array(i),o=0;o>>1,i=new Array(n);i[r]=t.slice(0);for(var a=r>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a4){var e=t;t=r.util.createBuffer();for(var n=0;n=0||!a.gcd(e.n).equals(i.ONE));for(var o=(t=t.multiply(a.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);o.compareTo(s)<0;)o=o.add(e.p);var u=o.subtract(s).multiply(e.qInv).mod(e.p).multiply(e.q).add(s);return u=u.multiply(a.modInverse(e.n)).mod(e.n)};o.rsa.encrypt=function(t,e,n){var a,o=n,s=Math.ceil(e.n.bitLength()/8);!1!==n&&!0!==n?(o=2===n,a=h(t,e,n)):(a=r.util.createBuffer()).putBytes(t);for(var u=new i(a.toHex(),16),l=f(u,e,o).toString(16),c=r.util.createBuffer(),p=s-Math.ceil(l.length/2);p>0;)c.putByte(0),--p;return c.putBytes(r.util.hexToBytes(l)),c.getBytes()},o.rsa.decrypt=function(t,e,n,a){var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var s=new Error("Encrypted message length is invalid.");throw s.length=t.length,s.expected=o,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=o-Math.ceil(l.length/2);p>0;)c.putByte(0),--p;return c.putBytes(r.util.hexToBytes(l)),!1!==a?g(c.getBytes(),e,n):c.getBytes()},o.rsa.createKeyPairGenerationState=function(t,e,n){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var a,o=(n=n||{}).prng||r.random,s={nextBytes:function(t){for(var e=o.getBytesSync(t.length),n=0;n>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(a.eInt),a},o.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var n=new i(null);n.fromInt(30);for(var r,a=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[a++%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:o.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:o.rsa.setPublicKey(t.n,t.e)}}c+=(r=+new Date)-l,l=r}return null!==t.keys},o.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=o.privateKeyFromAsn1(a.fromDer(r.util.createBuffer(t)));s(null,{privateKey:e,publicKey:o.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=o.privateKeyFromAsn1(a.fromDer(r.util.createBuffer(e)));s(null,{privateKey:n,publicKey:o.setRsaPublicKey(n.n,n.e)})},n.onerror=function(t){s(t)}},void(u.onerror=function(t){s(t)})}}var l=o.rsa.createKeyPairGenerationState(t,e,n);if(!s)return o.rsa.stepKeyPairGenerationState(l,0),l.keys;!function(t,e,n){"function"==typeof e&&(n=e,e={});var a={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(a.prng=e.prng);s();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,a,e)}function l(e,r){if(e)return n(e);if(t.q=r,t.p.compareTo(t.q)<0){var a=t.p;t.p=t.q,t.q=a}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:o.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:o.rsa.setPublicKey(t.n,t.e)},n(null,t.keys)}}(l,n,s)},o.setRsaPublicKey=o.rsa.setPublicKey=function(t,e){var n={n:t,e:e};return n.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 a=e.encode(t,n,!0);return o.rsa.encrypt(a,n,!0)},n.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){e=g(e,n,!0);return t===a.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=o.rsa.decrypt(e,n,!0,!1);return r.verify(t,i,n.n.bitLength())},n},o.setRsaPrivateKey=o.rsa.setPrivateKey=function(t,e,n,i,a,s,u,l){var c={n:t,e:e,d:n,p:i,q:a,dP:s,dQ:u,qInv:l};return c.decrypt=function(t,e,n){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var i=o.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)},c.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 o.rsa.encrypt(r,c,n)},c},o.wrapRsaPrivateKey=function(t){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(t).getBytes())])},o.privateKeyFromAsn1=function(t){var e={},n=[];if(a.validate(t,u,e,n)&&(t=a.fromDer(r.util.createBuffer(e.privateKey))),e={},n=[],!a.validate(t,l,e,n)){var s=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw s.errors=n,s}var c,p,d,f,h,g,m,v;return c=r.util.createBuffer(e.privateKeyModulus).toHex(),p=r.util.createBuffer(e.privateKeyPublicExponent).toHex(),d=r.util.createBuffer(e.privateKeyPrivateExponent).toHex(),f=r.util.createBuffer(e.privateKeyPrime1).toHex(),h=r.util.createBuffer(e.privateKeyPrime2).toHex(),g=r.util.createBuffer(e.privateKeyExponent1).toHex(),m=r.util.createBuffer(e.privateKeyExponent2).toHex(),v=r.util.createBuffer(e.privateKeyCoefficient).toHex(),o.setRsaPrivateKey(new i(c,16),new i(p,16),new i(d,16),new i(f,16),new i(h,16),new i(g,16),new i(m,16),new i(v,16))},o.privateKeyToAsn1=o.privateKeyToRSAPrivateKey=function(t){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.e)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.d)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.p)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.q)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.dP)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.dQ)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.qInv))])},o.publicKeyFromAsn1=function(t){var e={},n=[];if(a.validate(t,p,e,n)){var s=a.derToOid(e.publicKeyOid);if(s!==o.oids.rsaEncryption){throw(u=new Error("Cannot read public key. Unknown OID.")).oid=s,u}t=e.rsaPublicKey}if(n=[],!a.validate(t,c,e,n)){var u;throw(u=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=n,u}var l=r.util.createBuffer(e.publicKeyModulus).toHex(),d=r.util.createBuffer(e.publicKeyExponent).toHex();return o.setRsaPublicKey(new i(l,16),new i(d,16))},o.publicKeyToAsn1=o.publicKeyToSubjectPublicKeyInfo=function(t){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,[o.publicKeyToRSAPublicKey(t)])])},o.publicKeyToRSAPublicKey=function(t){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(t.e))])};function h(t,e,n){var i=r.util.createBuffer(),a=Math.ceil(e.n.bitLength()/8);if(t.length>a-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=t.length,o.max=a-11,o}i.putByte(0),i.putByte(n);var s,u=a-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!==o.getByte()){--o.read;break}++l}else if(2===u)for(l=0;o.length()>1;){if(0===o.getByte()){--o.read;break}++l}if(0!==o.getByte()||l!==a-3-o.length())throw new Error("Encryption block is invalid.");return o.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;ie){var r=new Error("Too few bytes to parse DER.");throw r.available=t.length(),r.remaining=e,r.requested=n,r}}var o=function(t,e){var n=t.getByte();if(e--,128!==n){var r;if(128&n){var i=127&n;a(t,e,i),r=t.getInt(i<<3)}else r=n;if(r<0)throw new Error("Negative length: "+r);return r}};i.fromDer=function(t,e){return void 0===e&&(e={strict:!0,decodeBitStrings:!0}),"boolean"==typeof e&&(e={strict:e,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"string"==typeof t&&(t=r.util.createBuffer(t)),s(t,t.length(),0,e)};function s(t,e,n,r){var u;a(t,e,2);var l=t.getByte();e--;var c=192&l,p=31&l;u=t.length();var d=o(t,e);if(e-=u-t.length(),void 0!==d&&d>e){if(r.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=t.length(),f.remaining=e,f.requested=d,f}d=e}var h,g,m=32==(32&l);if(m)if(h=[],void 0===d)for(;;){if(a(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}u=t.length(),h.push(s(t,e,n+1,r)),e-=u-t.length()}else for(;d>0;)u=t.length(),h.push(s(t,d,n+1,r)),e-=u-t.length(),d-=u-t.length();if(void 0===h&&c===i.Class.UNIVERSAL&&p===i.Type.BITSTRING&&(g=t.bytes(d)),void 0===h&&r.decodeBitStrings&&c===i.Class.UNIVERSAL&&p===i.Type.BITSTRING&&d>1){var v=t.read,y=e,b=0;if(p===i.Type.BITSTRING&&(a(t,e,1),b=t.getByte(),e--),0===b)try{u=t.length();var w=s(t,e,n+1,{verbose:r.verbose,strict:!0,decodeBitStrings:!0}),$=u-t.length();e-=$,p==i.Type.BITSTRING&&$++;var k=w.tagClass;$!==d||k!==i.Class.UNIVERSAL&&k!==i.Class.CONTEXT_SPECIFIC||(h=[w])}catch(t){}void 0===h&&(t.read=v,e=y)}if(void 0===h){if(void 0===d){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=e}if(p===i.Type.BMPSTRING)for(h="";d>0;d-=2)a(t,e,2),h+=String.fromCharCode(t.getInt16()),e-=2;else h=t.getBytes(d)}var C=void 0===g?null:{bitStringContents:g};return i.create(c,p,m,h,C)}i.toDer=function(t){var e=r.util.createBuffer(),n=t.tagClass|t.type,a=r.util.createBuffer(),o=!1;if("bitStringContents"in t&&(o=!0,t.original&&(o=i.equals(t,t.original))),o)a.putBytes(t.bitStringContents);else if(t.composed){t.constructed?n|=32:a.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)))?a.putBytes(t.value.substr(1)):a.putBytes(t.value);if(e.putByte(n),a.length()<=127)e.putByte(127&a.length());else{var u=a.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(a),e},i.oidToDer=function(t){var e=t.split("."),n=r.util.createBuffer();n.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var i,a,o,s,u=2;u>>=7,i||(s|=128),a.push(s),i=!1}while(o>0);for(var l=a.length-1;l>=0;--l)n.putByte(a[l])}return n},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),a=parseInt(t.substr(6,2),10),o=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(a,o,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),a=parseInt(t.substr(8,2),10),o=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);if("+"===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(a,o,s,u),e.setTime(+e+l)):(e.setFullYear(n,r,i),e.setHours(a,o,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,a){var o=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)a&&(t.tagClass!==e.tagClass&&a.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&a.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(o=!0,e.value&&r.util.isArray(e.value))for(var s=0,u=0;o&&u0&&(a+="\n");for(var o="",s=0;s1?a+="0x"+r.util.bytesToHex(t.value.slice(1)):a+="(none)",t.value.length>0){var d=t.value.charCodeAt(0);1==d?a+=" (1 unused bit shown)":d>1&&(a+=" ("+d+" unused bits shown)")}}else t.type===i.Type.OCTETSTRING?(u.test(t.value)||(a+="("+t.value+") "),a+="0x"+r.util.bytesToHex(t.value)):t.type===i.Type.UTF8?a+=r.util.decodeUtf8(t.value):t.type===i.Type.PRINTABLESTRING||t.type===i.Type.IA5String?a+=t.value:u.test(t.value)?a+="0x"+r.util.bytesToHex(t.value):0===t.value.length?a+="[null]":a+=t.value}return a}},function(t,e,n){var r=n(0);n(1),n(3),n(18);var i=t.exports=r.pkcs1=r.pkcs1||{};i.encode_rsa_oaep=function(t,e,n){var i,o,s,u;"string"==typeof n?(i=n,o=arguments[3]||void 0,s=arguments[4]||void 0):n&&(i=n.label||void 0,o=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>24&255,o>>16&255,o>>8&255,255&o);n.start(),n.update(t+s),i+=n.digest().getBytes()}return i.substring(0,e)}},function(t,e,n){var r=n(0);n(1);var i=null;!r.util.isNodejs||r.options.usePureJavaScript||process.versions["node-webkit"]||(i=n(5));(t.exports=r.prng=r.prng||{}).create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0},n=t.md,a=new Array(32),o=0;o<32;++o)a[o]=n.create();e.pools=a,e.pool=0,e.generate=function(t,n){if(!n)return e.generateSync(t);var i=e.plugin.cipher,a=e.plugin.increment,o=e.plugin.formatKey,s=e.plugin.formatSeed,l=r.util.createBuffer();e.key=null,c();function c(p){if(p)return n(p);if(l.length()>=t)return n(null,l.getBytes(t));if(e.generated>1048575&&(e.key=null),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=o(i(e.key,a(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,a=e.plugin.formatKey,o=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=a(n(e.key,i(e.seed))),e.seed=o(n(e.key,e.seed))}return u.getBytes(t)};function s(){if(e.pools[0].messageLength>=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 a=t.digest().getBytes();e.key=e.plugin.formatKey(i),e.seed=e.plugin.formatSeed(a),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 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){function n(t){var r=t.data;r.forge&&r.forge.prng&&(self.removeEventListener("message",n),e(r.forge.prng.err,r.forge.prng.bytes))}self.addEventListener("message",n),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(){o||(a=String.fromCharCode(128),a+=r.util.fillString(String.fromCharCode(0),64),o=!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};return i.start=function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,a=0;a>>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(a),s(t,n,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var o=r.util.createBuffer();o.putBytes(e.bytes());var u=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-u));for(var l,c=8*i.fullMessageLength[0],p=0;p>>0,o.putInt32(c>>>0),c=l>>>0;o.putInt32(c);var d={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};s(d,n,o);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 a=null,o=!1;function s(t,e,n){for(var r,i,a,o,s,u,l,c=n.length();c>=64;){for(i=t.h0,a=t.h1,o=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^a&(o^s))+u+1518500249+r,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=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^a&(o^s))+u+1518500249+r,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=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)+(a^o^s)+u+1859775393+r,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=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)+(a^o^s)+u+1859775393+r,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=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)+(a&o|s&(a^o))+u+2400959708+r,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=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)+(a^o^s)+u+3395469782+r,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=r;t.h0=t.h0+i|0,t.h1=t.h1+a|0,t.h2=t.h2+o|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],a=new n(null);a.fromInt(30);var o=function(t,e){return t|e};e.generateProbablePrime=function(t,e,i){"function"==typeof e&&(i=e,e={});var a=(e=e||{}).algorithm||"PRIMEINC";"string"==typeof a&&(a={name:a}),a.options=a.options||{};var o=e.prng||r.random,u={nextBytes:function(t){for(var e=o.getBytesSync(t.length),n=0;nt&&(o=l(t,e));var f=o.toString(16);i.target.postMessage({hex:f,workLoad:c}),o.dAddOffset(p,0)}}}}(t,e,i,a);return s(t,e,i,a)}(t,u,a.options,i);throw new Error("Invalid prime generation algorithm: "+a.name)}}function s(t,e,n,r){var i,a=l(t,e),o=(i=a.bitLength(),i<=100?27:i<=150?18:i<=200?15:i<=250?12:i<=300?9:i<=350?8:i<=400?7:i<=500?6:i<=600?5:i<=800?4:i<=1250?3:2);"millerRabinTests"in n&&(o=n.millerRabinTests);var s=10;"maxBlockTime"in n&&(s=n.maxBlockTime),u(a,t,e,0,o,s,r)}function u(t,e,n,a,o,s,c){var p=+new Date;do{if(t.bitLength()>e&&(t=l(e,n)),t.isProbablePrime(o))return c(null,t);t.dAddOffset(i[a++%8],0)}while(s<0||+new Date-p0,s=!(e[0]instanceof Array);if(o&&r){for(var u=0;u0&&(n+=i),n+=p(t[u],u);e.length>0&&(n+=a)}for(var l=0;l0&&(n+=i);var f=o&&s?t[d]:d;n+=p(e[l][f],d)}l-1)return!0;return!1}(t,s.BAD_DELIMITERS)||t.indexOf(i)>-1||" "===t.charAt(0)||" "===t.charAt(t.length-1);return r?o+t+o:t}},s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!n&&!!e.Worker,s.SCRIPT_PATH=null,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=g,s.ParserHandle=h,s.NetworkStreamer=c,s.FileStreamer=p,s.StringStreamer=d,s.ReadableStreamStreamer=f,e.jQuery){var u=e.jQuery;u.fn.parse=function(t){var n=t.config||{},r=[];return this.each(function(t){if(!("INPUT"===u(this).prop("tagName").toUpperCase()&&"file"===u(this).attr("type").toLowerCase()&&e.FileReader)||!this.files||0===this.files.length)return!0;for(var i=0;i=this._config.preview;if(r)e.postMessage({results:a,workerId:s.WORKER_ID,finished:u});else if($(this._config.chunk)){if(this._config.chunk(a,this._handle),this._paused)return;a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),!u||!$(this._config.complete)||a&&a.meta.aborted||this._config.complete(this._completeResults,this._input),u||a&&a.meta.paused||this._nextChunk(),a}},this._sendError=function(t){$(this._config.error)?this._config.error(t):r&&this._config.error&&e.postMessage({workerId:s.WORKER_ID,error:t,finished:!1})}}function c(t){(t=t||{}).chunkSize||(t.chunkSize=s.RemoteChunkSize),l.call(this,t);var e;this._nextChunk=n?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),n||(e.onload=w(this._chunkLoaded,this),e.onerror=w(this._chunkError,this)),e.open("GET",this._input,!n),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var r in t)e.setRequestHeader(r,t[r])}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)}n&&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)}}(c.prototype=Object.create(l.prototype)).constructor=c;function p(t){(t=t||{}).chunkSize||(t.chunkSize=s.LocalChunkSize),l.call(this,t);var e,n,r="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,r?((e=new FileReader).onload=w(this._chunkLoaded,this),e.onerror=w(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)}}(p.prototype=Object.create(l.prototype)).constructor=p;function d(t){l.call(this,t=t||{});var e;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)}}}(d.prototype=Object.create(d.prototype)).constructor=d;function f(t){l.call(this,t=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=w(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=w(function(t){this._streamCleanUp(),this._sendError(t.message)},this),this._streamEnd=w(function(){this._streamCleanUp(),this._finished=!0,this._streamData("")},this),this._streamCleanUp=w(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}(f.prototype=Object.create(l.prototype)).constructor=f;function h(t){var e,n,r,i=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,a=this,o=0,u=!1,l=!1,c=[],p={data:[],errors:[],meta:{}};if($(t.step)){var d=t.step;t.step=function(e){if(p=e,h())f();else{if(f(),0===p.data.length)return;o+=e.data.length,t.preview&&o>t.preview?n.abort():d(p,a)}}}this.parse=function(i,a,o){if(t.newline||(t.newline=function(t){var e=(t=t.substr(0,1048576)).split("\r"),n=t.split("\n"),r=n.length>1&&n[0].length=e.length/2?"\r\n":"\r"}(i)),r=!1,t.delimiter)$(t.delimiter)&&(t.delimiter=t.delimiter(i),p.meta.delimiter=t.delimiter);else{var l=function(e,n,r){for(var i,a,o,u=[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP],l=0;l1&&(p+=Math.abs(v-o),o=v):o=v}h.data.length>0&&(d/=h.data.length-f),(void 0===a||p1.99&&(a=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=s.DefaultDelimiter),p.meta.delimiter=t.delimiter}var c=b(t);return t.preview&&t.header&&c.preview++,e=i,n=new g(c),p=n.parse(e,a,o),f(),u?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return u},this.pause=function(){u=!0,n.abort(),e=e.substr(n.getCharIndex())},this.resume=function(){u=!1,a.streamer.parseChunk(e)},this.aborted=function(){return l},this.abort=function(){l=!0,n.abort(),p.meta.aborted=!0,$(t.complete)&&t.complete(p),e=""};function f(){if(p&&r&&(v("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),r=!1),t.skipEmptyLines)for(var e=0;e=c.length?"__parsed_extra":c[r]),a=m(i,a),"__parsed_extra"===i?(n[i]=n[i]||[],n[i].push(a)):n[i]=a}p.data[e]=n,t.header&&(r>c.length?v("FieldMismatch","TooManyFields","Too many fields: expected "+c.length+" fields but parsed "+r,e):r-1)&&(e=","),r===e)throw"Comment character same as delimiter";!0===r?r="#":("string"!=typeof r||s.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,s,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=$(i);l=0;var v=[],y=[],b=[],w=0;if(!t)return I();if(o||!1!==o&&-1===t.indexOf(u)){for(var k=t.split(n),C=0;C=a)return v=v.slice(0,a),I(!0)}}return I()}for(var x=t.indexOf(e,l),T=t.indexOf(n,l),S=new RegExp(u+u,"g");;)if(t[l]!==u)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=a)return I(!0)}else{var E=l;for(l++;;){if(-1===(E=t.indexOf(u,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,u))}if(t[E+1]!==u){if(t[E+1]===e){b.push(t.substring(l,E).replace(S,u)),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,u)),B(E+1+h),x=t.indexOf(e,l),m&&(O(),c))return I();if(a&&v.length>=a)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+(s||0)}}}function O(){i(I()),v=[],y=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return l}}function m(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,v(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if($(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 a=$($.AdminLTE.options.controlSidebarOptions.selector);void 0!==a&&a.height()>i&&$(".content-wrapper, .right-side").css("min-height",a.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 a=r.parents("ul").first();a.find("ul:visible").slideUp(n).removeClass("menu-open");var o=r.parent("li");i.slideDown(n,function(){i.addClass("menu-open"),a.find("li.active").removeClass("active"),o.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)}}}!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){t.preventDefault(),(i=e).append(r),n.onLoadStart.call(i);var i;e.find(".box-body").load(n.source,function(){(t=e).find(r).remove(),n.onLoadDone.call(t);var 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);