function resizeView(){var a=document.documentElement.clientHeight;$(".main-panel-body,.panel-cut").css("min-height",a-100),$(".creat-wxapp .panel-app").css("min-height",a-145),0==$(".left-menu").length&&$(".footer").addClass("footer-no-left"),$(".plugin-menu").length>0&&$(".footer").addClass("footer-plugin");var b=$(".link-group");b.each(function(){var a=$(this).children("a").length;1==a?$(this).css("min-width",100):2==a?$(this).css("min-width",200):a>2&&$(this).css("min-width",320)})}!function(a){"use strict";function b(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function d(a,b,e){var f,g;if(a)if(y(a))for(f in a)"prototype"==f||"length"==f||"name"==f||a.hasOwnProperty&&!a.hasOwnProperty(f)||b.call(e,a[f],f,a);else if(Vd(a)||c(a)){var h="object"!=typeof a;for(f=0,g=a.length;g>f;f++)(h||f in a)&&b.call(e,a[f],f,a)}else if(a.forEach&&a.forEach!==d)a.forEach(b,e,a);else if(u(a))for(f in a)b.call(e,a[f],f,a);else if("function"==typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&b.call(e,a[f],f,a);else for(f in a)Ed.call(a,f)&&b.call(e,a[f],f,a);return a}function e(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(t(g)||y(g))for(var j=Object.keys(g),k=0,l=j.length;l>k;k++){var m=j[k],n=g[m];c&&t(n)?x(n)?a[m]=new Date(n.valueOf()):z(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):J(n)?a[m]=n.clone():(t(a[m])||(a[m]=Vd(n)?[]:{}),i(a[m],[n],!0)):a[m]=n}}return h(a,d),a}function j(a){return i(a,Nd.call(arguments,1),!1)}function k(a){return i(a,Nd.call(arguments,1),!0)}function l(a){return parseInt(a,10)}function m(a,b){return j(Object.create(a),b)}function n(){}function o(a){return a}function p(a){return function(){return a}}function q(a){return y(a.toString)&&a.toString!==Qd}function r(a){return"undefined"==typeof a}function s(a){return"undefined"!=typeof a}function t(a){return null!==a&&"object"==typeof a}function u(a){return null!==a&&"object"==typeof a&&!Rd(a)}function v(a){return"string"==typeof a}function w(a){return"number"==typeof a}function x(a){return"[object Date]"===Qd.call(a)}function y(a){return"function"==typeof a}function z(a){return"[object RegExp]"===Qd.call(a)}function A(a){return a&&a.window===a}function B(a){return a&&a.$evalAsync&&a.$watch}function C(a){return"[object File]"===Qd.call(a)}function D(a){return"[object FormData]"===Qd.call(a)}function E(a){return"[object Blob]"===Qd.call(a)}function F(a){return"boolean"==typeof a}function G(a){return a&&y(a.then)}function H(a){return a&&w(a.length)&&Wd.test(Qd.call(a))}function I(a){return"[object ArrayBuffer]"===Qd.call(a)}function J(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function K(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function N(a,b){function c(a,b){var c,d=b.$$hashKey;if(Vd(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(u(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Ed.call(a,c)&&(b[c]=e(a[c]));return h(b,d),b}function e(a){if(!t(a))return a;var b=g.indexOf(a);if(-1!==b)return i[b];if(A(a)||B(a))throw Sd("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var d=!1,e=f(a);return void 0===e&&(e=Vd(a)?[]:Object.create(Rd(a)),d=!0),g.push(a),i.push(e),d?c(a,e):e}function f(a){switch(Qd.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c;case"[object Blob]":return new a.constructor([a],{type:a.type})}return y(a.cloneNode)?a.cloneNode(!0):void 0}var g=[],i=[];if(b){if(H(b)||I(b))throw Sd("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Sd("cpi","Can't copy! Source and destination are identical.");return Vd(b)?b.length=0:d(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),g.push(a),i.push(b),c(a,b)}return e(a)}function O(a,b){if(Vd(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(t(a)){b=b||{};for(var e in a)"$"===e.charAt(0)&&"$"===e.charAt(1)||(b[e]=a[e])}return b||a}function P(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Vd(a)){if(x(a))return x(b)?P(a.getTime(),b.getTime()):!1;if(z(a))return z(b)?a.toString()==b.toString():!1;if(B(a)||B(b)||A(a)||A(b)||Vd(b)||x(b)||z(b))return!1;e=pa();for(d in a)if("$"!==d.charAt(0)&&!y(a[d])){if(!P(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&s(b[d])&&!y(b[d]))return!1;return!0}if(!Vd(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!P(a[d],b[d]))return!1;return!0}}return!1}function Q(a,b,c){return a.concat(Nd.call(b,c))}function R(a,b){return Nd.call(a,b||0)}function S(a,b){var c=arguments.length>2?R(arguments,2):[];return!y(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,Q(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function T(b,c){var d=c;return"string"==typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?d=void 0:A(c)?d="$WINDOW":c&&a.document===c?d="$DOCUMENT":B(c)&&(d="$SCOPE"),d}function U(a,b){return r(a)?void 0:(w(b)||(b=b?2:null),JSON.stringify(a,T,b))}function V(a){return v(a)?JSON.parse(a):a}function W(a,b){a=a.replace(_d,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function X(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function Y(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=W(b,d);return X(a,c*(e-d))}function Z(a){a=Kd(a).clone();try{a.empty()}catch(b){}var c=Kd("
").append(a).html();try{return a[0].nodeType===fe?Fd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Fd(b)})}catch(b){return Fd(c)}}function $(a){try{return decodeURIComponent(a)}catch(b){}}function _(a){var b={};return d((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=$(d),s(d)&&(e=s(e)?$(e):!0,Ed.call(b,d)?Vd(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function aa(a){var b=[];return d(a,function(a,c){Vd(a)?d(a,function(a){b.push(ca(c,!0)+(a===!0?"":"="+ca(a,!0)))}):b.push(ca(c,!0)+(a===!0?"":"="+ca(a,!0)))}),b.length?b.join("&"):""}function ba(a){return ca(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ca(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function da(a,b){var c,d,e=ae.length;for(d=0;e>d;++d)if(c=ae[d]+b,v(c=a.getAttribute(c)))return c;return null}function ea(a,b){var c,e,f={};d(ae,function(b){var d=b+"app";!c&&a.hasAttribute&&a.hasAttribute(d)&&(c=a,e=a.getAttribute(d))}),d(ae,function(b){var d,f=b+"app";!c&&(d=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=d,e=d.getAttribute(f))}),c&&(f.strictDi=null!==da(c,"strict-di"),b(c,e?[e]:[],f))}function fa(b,c,e){t(e)||(e={});var f={strictDi:!1};e=j(f,e);var g=function(){if(b=Kd(b),b.injector()){var d=b[0]===a.document?"document":Z(b);throw Sd("btstrpd","App already bootstrapped with this element '{0}'",d.replace(//,">"))}c=c||[],c.unshift(["$provide",function(a){a.value("$rootElement",b)}]),e.debugInfoEnabled&&c.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),c.unshift("ng");var f=db(c,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},h=/^NG_ENABLE_DEBUG_INFO!/,i=/^NG_DEFER_BOOTSTRAP!/;return a&&h.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(h,"")),a&&!i.test(a.name)?g():(a.name=a.name.replace(i,""),Td.resumeBootstrap=function(a){return d(a,function(a){c.push(a)}),g()},void(y(Td.resumeDeferredBootstrap)&&Td.resumeDeferredBootstrap()))}function ga(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ha(a){var b=Td.element(a).injector();if(!b)throw Sd("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ia(a,b){return b=b||"_",a.replace(be,function(a,c){return(c?b:"")+a.toLowerCase()})}function ja(){var b;if(!ce){var c=$d();Ld=r(c)?a.jQuery:c?a[c]:void 0,Ld&&Ld.fn.on?(Kd=Ld,j(Ld.fn,{scope:ye.scope,isolateScope:ye.isolateScope,controller:ye.controller,injector:ye.injector,inheritedData:ye.inheritedData}),b=Ld.cleanData,Ld.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Ld._data(d,"events"),c&&c.$destroy&&Ld(d).triggerHandler("$destroy");b(a)}):Kd=Da,Td.element=Kd,ce=!0}}function ka(a,b,c){if(!a)throw Sd("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function la(a,b,c){return c&&Vd(a)&&(a=a[a.length-1]),ka(y(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function ma(a,b){if("hasOwnProperty"===a)throw Sd("badname","hasOwnProperty is not a valid {0} name",b)}function na(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&y(a)?S(f,a):a}function oa(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Kd(Nd.call(a,0,e))),b.push(c));return b||a}function pa(){return Object.create(null)}function qa(a){function c(a,b,c){return a[b]||(a[b]=c())}var d=b("$injector"),e=b("ng"),f=c(a,"angular",Object);return f.$$minErr=f.$$minErr||b,c(f,"module",function(){var a={};return function(b,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(b,"module"),f&&a.hasOwnProperty(b)&&(a[b]=null),c(a,b,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function c(a,c){return function(d,f){return f&&y(f)&&(f.$$moduleName=b),e.push([a,c,arguments]),k}}if(!f)throw d("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",b);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:b,provider:c("$provide","provider"),factory:c("$provide","factory"),service:c("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:c("$provide","decorator"),animation:c("$animateProvider","register"),filter:c("$filterProvider","register"),controller:c("$controllerProvider","register"),directive:c("$compileProvider","directive"),component:c("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function ra(a){var b=[];return JSON.stringify(a,function(a,c){if(c=T(a,c),t(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function sa(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):r(a)?"undefined":"string"!=typeof a?ra(a):a}function ta(c){j(c,{bootstrap:fa,copy:N,extend:j,merge:k,equals:P,element:Kd,forEach:d,injector:db,noop:n,bind:S,toJson:U,fromJson:V,identity:o,isUndefined:r,isDefined:s,isString:v,isFunction:y,isObject:t,isNumber:w,isElement:J,isArray:Vd,version:je,isDate:x,lowercase:Fd,uppercase:Gd,callbacks:{counter:0},getTestability:ha,$$minErr:b,$$csp:Zd,reloadWithDebugInfo:ga}),(Md=qa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:yc}),a.provider("$compile",ob).directive({a:Gf,input:Zf,textarea:Zf,form:Lf,script:Ug,select:Xg,style:Zg,option:Yg,ngBind:ag,ngBindHtml:cg,ngBindTemplate:bg,ngClass:eg,ngClassEven:gg,ngClassOdd:fg,ngCloak:hg,ngController:ig,ngForm:Mf,ngHide:Ng,ngIf:lg,ngInclude:mg,ngInit:og,ngNonBindable:Eg,ngPluralize:Ig,ngRepeat:Jg,ngShow:Mg,ngStyle:Og,ngSwitch:Pg,ngSwitchWhen:Qg,ngSwitchDefault:Rg,ngOptions:Hg,ngTransclude:Tg,ngModel:Bg,ngList:pg,ngChange:dg,pattern:_g,ngPattern:_g,required:$g,ngRequired:$g,minlength:bh,ngMinlength:bh,maxlength:ah,ngMaxlength:ah,ngValue:_f,ngModelOptions:Dg}).directive({ngInclude:ng}).directive(Hf).directive(jg),a.provider({$anchorScroll:eb,$animate:Oe,$animateCss:Re,$$animateJs:Me,$$animateQueue:Ne,$$AnimateRunner:Qe,$$animateAsyncRun:Pe,$browser:kb,$cacheFactory:lb,$controller:ub,$document:vb,$exceptionHandler:wb,$filter:Mc,$$forceReflow:Xe,$interpolate:Kb,$interval:Lb,$http:Gb,$httpParamSerializer:yb,$httpParamSerializerJQLike:zb,$httpBackend:Ib,$xhrFactory:Hb,$location:$b,$log:_b,$parse:sc,$rootScope:xc,$q:tc,$$q:uc,$sce:Cc,$sceDelegate:Bc,$sniffer:Dc,$templateCache:mb,$templateRequest:Ec,$$testability:Fc,$timeout:Gc,$window:Jc,$$rAF:wc,$$jqLite:Ya,$$HashMap:Ce,$$cookieReader:Lc})}])}function ua(){return++le}function va(a){return a.replace(oe,function(a,b,c,d){return d?c.toUpperCase():c}).replace(pe,"Moz$1")}function wa(a){return!te.test(a)}function xa(a){var b=a.nodeType;return b===de||!b||b===he}function ya(a){for(var b in ke[a.ng339])return!0;return!1}function za(a){for(var b=0,c=a.length;c>b;b++)Ha(a[b])}function Aa(a,b){var c,e,f,g,h=b.createDocumentFragment(),i=[];if(wa(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),e=(ue.exec(a)||["",""])[1].toLowerCase(),f=we[e]||we._default,c.innerHTML=f[1]+a.replace(ve,"<$1>")+f[2],g=f[0];g--;)c=c.lastChild;i=Q(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",d(i,function(a){h.appendChild(a)}),h}function Ba(b,c){c=c||a.document;var d;return(d=se.exec(b))?[c.createElement(d[1])]:(d=Aa(b,c))?d.childNodes:[]}function Ca(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Da(a){if(a instanceof Da)return a;var b;if(v(a)&&(a=Xd(a),b=!0),!(this instanceof Da)){if(b&&"<"!=a.charAt(0))throw re("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Da(a)}b?Na(this,Ba(a)):Na(this,a)}function Ea(a){return a.cloneNode(!0)}function Fa(a,b){if(b||Ha(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ha(c[d])}function Ga(a,b,c,e){if(s(e))throw re("offargs","jqLite#off() does not support the `selector` argument");var f=Ia(a),g=f&&f.events,h=f&&f.handle;if(h)if(b){var i=function(b){var d=g[b];s(c)&&M(d||[],c),s(c)&&d&&d.length>0||(ne(a,b,h),delete g[b])};d(b.split(" "),function(a){i(a),qe[a]&&i(qe[a])})}else for(b in g)"$destroy"!==b&&ne(a,b,h),delete g[b]}function Ha(a,b){var c=a.ng339,d=c&&ke[c];if(d){if(b)return void delete d.data[b];d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Ga(a)),delete ke[c],a.ng339=void 0}}function Ia(a,b){var c=a.ng339,d=c&&ke[c];return b&&!d&&(a.ng339=c=ua(),d=ke[c]={events:{},data:{},handle:void 0}),d}function Ja(a,b,c){if(xa(a)){var d=s(c),e=!d&&b&&!t(b),f=!b,g=Ia(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];j(h,b)}}}function Ka(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function La(a,b){b&&a.setAttribute&&d(b.split(" "),function(b){a.setAttribute("class",Xd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Xd(b)+" "," ")))})}function Ma(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");d(b.split(" "),function(a){a=Xd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Xd(c))}}function Na(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Oa(a,b){return Pa(a,"$"+(b||"ngController")+"Controller")}function Pa(a,b,c){a.nodeType==he&&(a=a.documentElement);for(var d=Vd(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(s(c=Kd.data(a,d[e])))return c;a=a.parentNode||a.nodeType===ie&&a.host}}function Qa(a){for(Fa(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ra(a,b){b||Fa(a);var c=a.parentNode;c&&c.removeChild(a)}function Sa(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Kd(c).on("load",b)}function Ta(a,b){var c=ze[b.toLowerCase()];return c&&Ae[L(a)]&&c}function Ua(a){return Be[a]}function Va(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(r(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Wa;f>1&&(e=O(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Wa(a,b,c){c.call(a,b)}function Xa(a,b,c){var d=b.relatedTarget;d&&(d===a||xe.call(a,d))||c.call(a,b)}function Ya(){this.$get=function(){return j(Da,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ka(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),La(a,b)}})}}function Za(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||g)():d+":"+a}function $a(a,b){if(b){var c=0;this.nextUid=function(){return++c}}d(a,this.put,this)}function _a(a){return Function.prototype.toString.call(a)+" "}function ab(a){var b=_a(a).replace(He,""),c=b.match(De)||b.match(Ee);return c}function bb(a){var b=ab(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function cb(a,b,c){var e,f,g;if("function"==typeof a){if(!(e=a.$inject)){if(e=[],a.length){if(b)throw v(c)&&c||(c=a.name||bb(a)),Ie("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);f=ab(a),d(f[1].split(Fe),function(a){a.replace(Ge,function(a,b,c){e.push(c)})})}a.$inject=e}}else Vd(a)?(g=a.length-1,la(a[g],"fn"),e=a.slice(0,g)):la(a,"fn",!0);return e}function db(a,b){function c(a){return function(b,c){return t(b)?void d(b,f(a)):a(b,c)}}function e(a,b){if(ma(a,"service"),(y(b)||Vd(b))&&(b=x.instantiate(b)),!b.$get)throw Ie("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=B.invoke(b,this);if(r(c))throw Ie("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function h(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function i(a,b){return h(a,["$injector",function(a){return a.instantiate(b)}])}function j(a,b){return h(a,p(b),!1)}function k(a,b){ma(a,"constant"),w[a]=b,z[a]=b}function l(a,b){var c=x.get(a+q),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}function m(a){ka(r(a)||Vd(a),"modulesToLoad","not an array");var b,c=[];return d(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=x.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{v(a)?(b=Md(a),c=c.concat(m(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):y(a)?c.push(x.invoke(a)):Vd(a)?c.push(x.invoke(a)):la(a,"module")}catch(e){throw Vd(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ie("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function n(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===o)throw Ie("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=o,a[b]=c(b,d)}catch(e){throw a[b]===o&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=db.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Ie("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Jd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(_a(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Vd(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Vd(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:db.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var o={},q="Provider",s=[],u=new $a([],!0),w={$provide:{provider:c(e),factory:c(h),service:c(i),value:c(j),constant:c(k),decorator:l}},x=w.$injector=n(w,function(a,b){throw Td.isString(b)&&s.push(b),Ie("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},A=n(z,function(a,b){var c=x.get(a+q,b);return B.invoke(c.$get,c,void 0,a)}),B=A;w["$injector"+q]={$get:p(A)};var C=m(a);return B=A.get("$injector"),B.strictDi=b,d(C,function(a){a&&B.invoke(a)}),B}function eb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===L(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(y(a))a=a();else if(J(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else w(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=v(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){a===b&&""===a||Sa(function(){d.$evalAsync(h)})}),h}]}function fb(a,b){return a||b?a?b?(Vd(a)&&(a=a.join(" ")),Vd(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function gb(a){for(var b=0;bk&&this.remove(n.key),b}},get:function(a){if(ka;++a)sa[a]();sa=void 0})}finally{va++}}function I(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a}function J(a,b,c){ua.innerHTML="";var d=ua.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function K(a,b){try{a.addClass(b)}catch(c){}}function N(b,c,d,e,f){b instanceof Kd||(b=Kd(b));for(var g=/\S+/,h=0,i=b.length;i>h;h++){var j=b[h];j.nodeType===fe&&j.nodeValue.match(g)&&Ca(j,b[h]=a.document.createElement("span"))}var k=Q(b,c,b,d,e,f);N.$$addScopeClass(b);var l=null;return function(a,c,d){ka(a,"scope"),f&&f.needsNewScope&&(a=a.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=O(h));var i;if(i="html"!==l?Kd(ja(l,Kd("
").append(b).html())):c?ye.clone.call(b):b,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return N.$$addScopeInfo(i,a),c&&c(i,a),k&&k(a,i,i,e),i}}function O(a){var b=a&&a[0];return b&&"foreignobject"!==L(b)&&Qd.call(b).match(/SVG/)?"svg":"html"}function Q(a,b,c,d,e,f){function g(a,c,d,e){var f,g,h,i,j,k,l,m,p;if(n){var q=c.length;for(p=new Array(q),j=0;jj;)h=p[o[j++]],f=o[j++],g=o[j++],f?(f.scope?(i=a.$new(),N.$$addScopeInfo(Kd(h),i)):i=a,m=f.transcludeOnThisElement?T(a,f.transclude,e):!f.templateOnThisElement&&e?e:!e&&b?T(a,b):null,f(g,i,h,d,m)):g&&g(a,h.childNodes,void 0,e)}for(var h,i,j,k,l,m,n,o=[],p=0;pr;r++){var w=!1,x=!1;j=p[r],k=j.name,n=Xd(j.value),m=qb(k),(o=Aa.test(m))&&(k=k.replace(Ue,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=m.match(Ba);y&&ca(y[1])&&(w=k,x=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=qb(k.toLowerCase()),i[l]=k,!o&&c.hasOwnProperty(l)||(c[l]=n,Ta(a,l)&&(c[l]=!0)),ma(a,b,n,l,o),ba(b,l,"A",d,e,w,x)}if(g=a.className,t(g)&&(g=g.animVal), v(g)&&""!==g)for(;f=u.exec(g);)l=qb(f[2]),ba(b,l,"C",d,e)&&(c[l]=Xd(f[3])),g=g.substr(f.index+f[0].length);break;case fe:if(11===Jd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===fe;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ha(b,a.nodeValue);break;case ge:try{f=q.exec(a.nodeValue),f&&(l=qb(f[1]),ba(b,l,"M",d,e)&&(c[l]=Xd(f[2])))}catch(z){}}return b.sort(fa),b}function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Se("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==de&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Kd(d)}function W(a,b,c){return function(d,e,f,g,h){return e=V(e[0],b,c),a(d,e,f,g,h)}}function X(a,b,c,d,e,f){var g;return a?N(b,c,d,e,f):function(){return g||(g=N(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function Y(a,b,c,f,g,h,i,k,l){function m(a,b,c,d){a&&(c&&(a=W(a,c,d)),a.require=o.require,a.directiveName=p,(z===o||o.$$isolateScope)&&(a=oa(a,{isolateScope:!0})),i.push(a)),b&&(c&&(b=W(b,c,d)),b.require=o.require,b.directiveName=p,(z===o||o.$$isolateScope)&&(b=oa(b,{isolateScope:!0})),k.push(b))}function n(a,e,f,g,h){function l(a,b,c,d){var e;if(B(a)||(d=c,c=b,b=a,a=void 0),F&&(e=s),c||(c=F?v.parent():v),!d)return h(a,b,e,c,L);var f=h.$$slots[d];if(f)return f(a,b,e,c,L);if(r(f))throw Se("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',d,Z(v))}var m,n,o,p,q,s,u,v,C,D;b===f?(C=c,v=c.$$element):(v=Kd(f),C=new I(v,c)),q=e,z?p=e.$new(!0):w&&(q=e.$parent),h&&(u=l,u.$$boundTransclude=h,u.isSlotFilled=function(a){return!!h.$$slots[a]}),x&&(s=_(v,C,u,x,p,e,z)),z&&(N.$$addScopeInfo(v,p,!0,!(A&&(A===z||A===z.$$originalDirective))),N.$$addScopeClass(v,!0),p.$$isolateBindings=z.$$isolateBindings,D=ra(e,C,p,p.$$isolateBindings,z),D.removeWatches&&p.$on("$destroy",D.removeWatches));for(var E in s){var G=x[E],H=s[E],J=G.$$bindings.bindToController;H.identifier&&J?H.bindingInfo=ra(q,C,H.instance,J,G):H.bindingInfo={};var K=H();K!==H.instance&&(H.instance=K,v.data("$"+G.name+"Controller",K),H.bindingInfo.removeWatches&&H.bindingInfo.removeWatches(),H.bindingInfo=ra(q,C,H.instance,J,G))}for(d(x,function(a,b){var c=a.require;a.bindToController&&!Vd(c)&&t(c)&&j(s[b].instance,$(b,c,v,s))}),d(s,function(a){var b=a.instance;y(b.$onChanges)&&b.$onChanges(a.bindingInfo.initialChanges),y(b.$onInit)&&b.$onInit(),y(b.$onDestroy)&&q.$on("$destroy",function(){b.$onDestroy()})}),m=0,n=i.length;n>m;m++)o=i[m],qa(o,o.isolateScope?p:e,v,C,o.require&&$(o.directiveName,o.require,v,s),u);var L=e;for(z&&(z.template||null===z.templateUrl)&&(L=p),a&&a(L,f.childNodes,void 0,h),m=k.length-1;m>=0;m--)o=k[m],qa(o,o.isolateScope?p:e,v,C,o.require&&$(o.directiveName,o.require,v,s),u);d(s,function(a){var b=a.instance;y(b.$postLink)&&b.$postLink()})}l=l||{};for(var o,p,q,s,u,v=-Number.MAX_VALUE,w=l.newScopeDirective,x=l.controllerDirectives,z=l.newIsolateScopeDirective,A=l.templateDirective,C=l.nonTlbTranscludeDirective,D=!1,E=!1,F=l.hasElementTranscludeDirective,G=c.$$element=Kd(b),H=h,J=f,K=!1,M=!1,O=0,P=a.length;P>O;O++){o=a[O];var Q=o.$$start,T=o.$$end;if(Q&&(G=V(b,Q,T)),q=void 0,v>o.priority)break;if((u=o.scope)&&(o.templateUrl||(t(u)?(ga("new/isolated scope",z||w,o,G),z=o):ga("new/isolated scope",z,o,G)),w=w||o),p=o.name,!K&&(o.replace&&(o.templateUrl||o.template)||o.transclude&&!o.$$tlb)){for(var Y,ba=O+1;Y=a[ba++];)if(Y.transclude&&!Y.$$tlb||Y.replace&&(Y.templateUrl||Y.template)){M=!0;break}K=!0}if(!o.templateUrl&&o.controller&&(u=o.controller,x=x||pa(),ga("'"+p+"' controller",x[p],o,G),x[p]=o),u=o.transclude)if(D=!0,o.$$tlb||(ga("transclusion",C,o,G),C=o),"element"==u)F=!0,v=o.priority,q=G,G=c.$$element=Kd(N.$$createComment(p,c[p])),b=G[0],na(g,R(q),b),q[0].$$parentNode=q[0].parentNode,J=X(M,q,f,v,H&&H.name,{nonTlbTranscludeDirective:C});else{var ca=pa();if(q=Kd(Ea(b)).contents(),t(u)){q=[];var fa=pa(),ha=pa();d(u,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,fa[a]=b,ca[b]=null,ha[b]=c}),d(G.contents(),function(a){var b=fa[qb(L(a))];b?(ha[b]=!0,ca[b]=ca[b]||[],ca[b].push(a)):q.push(a)}),d(ha,function(a,b){if(!a)throw Se("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ia in ca)ca[ia]&&(ca[ia]=X(M,ca[ia],f))}G.empty(),J=X(M,q,f,void 0,void 0,{needsNewScope:o.$$isolateScope||o.$$newScope}),J.$$slots=ca}if(o.template)if(E=!0,ga("template",A,o,G),A=o,u=y(o.template)?o.template(G,c):o.template,u=za(u),o.replace){if(H=o,q=wa(u)?[]:sb(ja(o.templateNamespace,Xd(u))),b=q[0],1!=q.length||b.nodeType!==de)throw Se("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p,"");na(g,G,b);var ka={$attr:{}},la=U(b,[],ka),ma=a.splice(O+1,a.length-(O+1));(z||w)&&aa(la,z,w),a=a.concat(la).concat(ma),da(c,ka),P=a.length}else G.html(u);if(o.templateUrl)E=!0,ga("template",A,o,G),A=o,o.replace&&(H=o),n=ea(a.splice(O,a.length-O),G,c,g,D&&J,i,k,{controllerDirectives:x,newScopeDirective:w!==o&&w,newIsolateScopeDirective:z,templateDirective:A,nonTlbTranscludeDirective:C}),P=a.length;else if(o.compile)try{s=o.compile(G,c,J);var sa=o.$$originalDirective||o;y(s)?m(null,S(sa,s),Q,T):s&&m(S(sa,s.pre),S(sa,s.post),Q,T)}catch(ta){e(ta,Z(G))}o.terminal&&(n.terminal=!0,v=Math.max(v,o.priority))}return n.scope=w&&w.scope===!0,n.transcludeOnThisElement=D,n.templateOnThisElement=E,n.transclude=J,l.hasElementTranscludeDirective=F,n}function $(a,b,c,e){var f;if(v(b)){var g=b.match(x),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(f=e&&e[h],f=f&&f.instance),!f){var k="$"+h+"Controller";f=i?c.inheritedData(k):c.data(k)}if(!f&&!j)throw Se("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Vd(b)){f=[];for(var l=0,m=b.length;m>l;l++)f[l]=$(a,b[l],c,e)}else t(b)&&(f={},d(b,function(b,d){f[d]=$(a,b,c,e)}));return f||null}function _(a,b,c,d,e,f,g){var h=pa();for(var j in d){var k=d[j],l={$scope:k===g||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);var n=i(m,l,!0,k.controllerAs);h[k.name]=n,a.data("$"+k.name+"Controller",n.instance)}return h}function aa(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=m(a[d],{$$isolateScope:b,$$newScope:c})}function ba(a,c,d,f,h,i,j){if(c===h)return null;var n=null;if(k.hasOwnProperty(c))for(var o,p=b.get(c+l),q=0,s=p.length;s>q;q++)try{if(o=p[q],(r(f)||f>o.priority)&&-1!=o.restrict.indexOf(d)){if(i&&(o=m(o,{$$start:i,$$end:j})),!o.$$bindings){var u=o.$$bindings=g(o,o.name);t(u.isolateScope)&&(o.$$isolateBindings=u.isolateScope)}a.push(o),n=o}}catch(v){e(v)}return n}function ca(a){if(k.hasOwnProperty(a))for(var c,d=b.get(a+l),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function da(a,b){var c=b.$attr,e=a.$attr,f=a.$$element;d(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),d(b,function(b,d){"class"==d?(K(f,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==d?(f.attr("style",f.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==d.charAt(0)||a.hasOwnProperty(d)||(a[d]=b,e[d]=c[d])})}function ea(a,b,c,e,g,h,i,j){var k,l,n=[],o=b[0],p=a.shift(),q=m(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=y(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),f(r).then(function(f){var m,u,v,w;if(f=za(f),p.replace){if(v=wa(f)?[]:sb(ja(s,Xd(f))),m=v[0],1!=v.length||m.nodeType!==de)throw Se("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);u={$attr:{}},na(e,b,m);var x=U(m,[],u);t(p.scope)&&aa(x,!0),a=x.concat(a),da(c,u)}else m=o,b.html(f);for(a.unshift(q),k=Y(a,m,c,g,b,p,h,i,j),d(e,function(a,c){a==m&&(e[c]=b[0])}),l=Q(b[0].childNodes,g);n.length;){var y=n.shift(),z=n.shift(),A=n.shift(),B=n.shift(),C=b[0];if(!y.$$destroyed){if(z!==o){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ea(m)),na(A,Kd(z),C),K(Kd(C),D)}w=k.transcludeOnThisElement?T(y,k.transclude,B):B,k(l,y,C,e,w)}}n=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(n?n.push(b,c,d,f):(k.transcludeOnThisElement&&(f=T(b,k.transclude,e)),k(l,b,c,d,f)))}}function fa(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function la(a,b){if("srcdoc"==b)return A.HTML;var c=L(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?A.RESOURCE_URL:void 0}function ma(a,b,d,e,f){var g=la(a,e);f=w[e]||f;var h=c(d,!0,g,f);if(h){if("multiple"===e&&"select"===L(a))throw Se("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Z(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=pa());if(z.test(e))throw Se("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==d&&(h=k&&c(k,!0,g,f),d=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function na(b,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(b)for(e=0,f=b.length;f>e;e++)if(b[e]==g){b[e++]=d;for(var j=e,k=j+h-1,l=b.length;l>j;j++,k++)l>k?b[j]=b[k]:delete b[j];b.length-=h-1,b.context===g&&(b.context=d);break}i&&i.replaceChild(d,g);var m=a.document.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Kd.hasData(g)&&(Kd.data(d,Kd.data(g)),Kd(g).off("$destroy")),Kd.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function oa(a,b){return j(function(){return a.apply(null,arguments)},a,b)}function qa(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,Z(c))}}function ra(a,b,e,f,g){function i(b,c,d){y(e.$onChanges)&&c!==d&&(sa||(a.$$postDigest(H),sa=[]),k||(k={},sa.push(j)),k[b]&&(d=k[b].previousValue),k[b]=new pb(d,c))}function j(){e.$onChanges(k),k=void 0}var k,l=[],m={};return d(f,function(d,f){var j,k,o,p,q,r=d.attrName,s=d.optional,t=d.mode;switch(t){case"@":s||Ed.call(b,r)||(e[f]=b[r]=void 0),b.$observe(r,function(a){if(v(a)||F(a)){var b=e[f];i(f,a,b),e[f]=a}}),b.$$observers[r].$$scope=a,j=b[r],v(j)?e[f]=c(j)(a):F(j)&&(e[f]=j),m[f]=new pb(Te,e[f]);break;case"=":if(!Ed.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]),p=k.literal?P:function(a,b){return a===b||a!==a&&b!==b},o=k.assign||function(){throw j=e[f]=k(a),Se("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[r],r,g.name)},j=e[f]=k(a);var u=function(b){return p(b,e[f])||(p(b,j)?o(a,b=e[f]):e[f]=b),j=b};u.$stateful=!0,q=d.collection?a.$watchCollection(b[r],u):a.$watch(h(b[r],u),null,k.literal),l.push(q);break;case"<":if(!Ed.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]);var w=e[f]=k(a);m[f]=new pb(Te,e[f]),q=a.$watch(k,function(a,b){if(b===a){if(b===w)return;b=w}i(f,a,b),e[f]=a},k.literal),l.push(q);break;case"&":if(k=b.hasOwnProperty(r)?h(b[r]):n,k===n&&s)break;e[f]=function(b){return k(a,b)}}}),{initialChanges:m,removeWatches:l.length&&function(){for(var a=0,b=l.length;b>a;++a)l[a]()}}}var sa,ta=/^\w/,ua=a.document.createElement("div"),va=D;I.prototype={$normalize:qb,$addClass:function(a){a&&a.length>0&&E.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&E.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=rb(a,b);c&&c.length&&E.addClass(this.$$element,c);var d=rb(b,a);d&&d.length&&E.removeClass(this.$$element,d)},$set:function(a,b,c,f){var g,h=this.$$element[0],i=Ta(h,a),j=Ua(a),k=a;if(i?(this.$$element.prop(a,b),f=i):j&&(this[j]=b,k=j),this[a]=b,f?this.$attr[a]=f:(f=this.$attr[a],f||(this.$attr[a]=f=ia(a,"-"))),g=L(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=G(b,"src"===a);else if("img"===g&&"srcset"===a&&s(b)){for(var l="",m=Xd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),t=0;q>t;t++){var u=2*t;l+=G(Xd(p[u]),!0),l+=" "+Xd(p[u+1])}var v=Xd(p[2*t]).split(/\s/);l+=G(Xd(v[0]),!0),2===v.length&&(l+=" "+Xd(v[1])),this[a]=b=l}c!==!1&&(null===b||r(b)?this.$$element.removeAttr(f):ta.test(f)?this.$$element.attr(f,b):J(this.$$element[0],f,b));var w=this.$$observers;w&&d(w[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=pa()),e=d[a]||(d[a]=[]);return e.push(b),p.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||r(c[a])||b(c[a])}),function(){M(e,b)}}};var xa=c.startSymbol(),ya=c.endSymbol(),za="{{"==xa&&"}}"==ya?o:function(a){return a.replace(/\{\{/g,xa).replace(/}}/g,ya)},Aa=/^ngAttr[A-Z]/,Ba=/^(.+)Start$/;return N.$$addBindingInfo=C?function(a,b){var c=a.data("$binding")||[];Vd(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:n,N.$$addBindingClass=C?function(a){K(a,"ng-binding")}:n,N.$$addScopeInfo=C?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:n,N.$$addScopeClass=C?function(a,b){K(a,b?"ng-isolate-scope":"ng-scope")}:n,N.$$createComment=function(b,c){var d="";return C&&(d=" "+(b||"")+": ",c&&(d+=c+" ")),a.document.createComment(d)},N}]}function pb(a,b){this.previousValue=a,this.currentValue=b}function qb(a){return va(a.replace(Ue,""))}function rb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function sb(a){a=Kd(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===ge&&Od.call(a,b,1)}return a}function tb(a,b){if(b&&v(b))return b;if(v(a)){var c=We.exec(a);if(c)return c[3]}}function ub(){var a={},c=!1;this.has=function(b){return a.hasOwnProperty(b)},this.register=function(b,c){ma(b,"controller"),t(b)?j(a,b):a[b]=c},this.allowGlobals=function(){c=!0},this.$get=["$injector","$window",function(d,e){function f(a,c,d,e){if(!a||!t(a.$scope))throw b("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,c);a.$scope[c]=d}return function(b,g,h,i){var k,l,m,n;if(h=h===!0,i&&v(i)&&(n=i),v(b)){if(l=b.match(We),!l)throw Ve("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",b);m=l[1],n=n||l[3],b=a.hasOwnProperty(m)?a[m]:na(g.$scope,m,!0)||(c?na(e,m,!0):void 0),la(b,m,!0)}if(h){var o=(Vd(b)?b[b.length-1]:b).prototype;k=Object.create(o||null),n&&f(g,n,k,m||b.name);var p;return p=j(function(){var a=d.invoke(b,k,g,m);return a!==k&&(t(a)||y(a))&&(k=a,n&&f(g,n,k,m||b.name)),k},{instance:k,identifier:n})}return k=d.instantiate(b,g,m),n&&f(g,n,k,m||b.name),k}}]}function vb(){this.$get=["$window",function(a){return Kd(a.document)}]}function wb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function xb(a){return t(a)?x(a)?a.toISOString():U(a):a}function yb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return e(a,function(a,c){null===a||r(a)||(Vd(a)?d(a,function(a){b.push(ca(c)+"="+ca(xb(a)))}):b.push(ca(c)+"="+ca(xb(a))))}),b.join("&")}}}function zb(){this.$get=function(){return function(a){function b(a,f,g){null===a||r(a)||(Vd(a)?d(a,function(a,c){b(a,f+"["+(t(a)?c:"")+"]")}):t(a)&&!x(a)?e(a,function(a,c){b(a,f+(g?"":"[")+c+(g?"":"]"))}):c.push(ca(f)+"="+ca(xb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function Ab(a,b){if(v(a)){var c=a.replace(af,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ye)||Bb(c))&&(a=V(c))}}return a}function Bb(a){var b=a.match($e);return b&&_e[b[0]].test(a)}function Cb(a){function b(a,b){a&&(e[a]=e[a]?e[a]+", "+b:b)}var c,e=pa();return v(a)?d(a.split("\n"),function(a){c=a.indexOf(":"),b(Fd(Xd(a.substr(0,c))),Xd(a.substr(c+1)))}):t(a)&&d(a,function(a,c){b(Fd(c),Xd(a))}),e}function Db(a){var b;return function(c){if(b||(b=Cb(a)),c){var d=b[Fd(c)];return void 0===d&&(d=null),d}return b}}function Eb(a,b,c,e){return y(e)?e(a,b,c):(d(e,function(d){a=d(a,b,c)}),a)}function Fb(a){return a>=200&&300>a}function Gb(){var a=this.defaults={transformResponse:[Ab],transformRequest:[function(a){return!t(a)||C(a)||E(a)||D(a)?a:U(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:O(Ze),put:O(Ze),patch:O(Ze)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},c=!1;this.useApplyAsync=function(a){return s(a)?(c=!!a,this):c};var e=!0;this.useLegacyPromiseExtensions=function(a){return s(a)?(e=!!a,this):e};var f=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(g,h,i,k,l,m){function n(c){function f(a){var b=j({},a);return b.data=Eb(a.data,a.headers,a.status,i.transformResponse),Fb(a.status)?b:l.reject(b)}function g(a,b){var c,e={};return d(a,function(a,d){y(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a}),e}function h(b){var c,d,e,f=a.headers,h=j({},b.headers);f=j({},f.common,f[Fd(b.method)]);a:for(c in f){d=Fd(c);for(e in h)if(Fd(e)===d)continue a;h[c]=f[c]}return g(h,O(b))}if(!t(c))throw b("$http")("badreq","Http request configuration must be an object. Received: {0}",c);if(!v(c.url))throw b("$http")("badreq","Http request configuration url must be a string. Received: {0}",c.url);var i=j({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},c);i.headers=h(c),i.method=Gd(i.method),i.paramSerializer=v(i.paramSerializer)?m.get(i.paramSerializer):i.paramSerializer;var k=function(b){var c=b.headers,e=Eb(b.data,Db(c),void 0,b.transformRequest);return r(e)&&d(c,function(a,b){"content-type"===Fd(b)&&delete c[b]}),r(b.withCredentials)&&!r(a.withCredentials)&&(b.withCredentials=a.withCredentials),q(b,e).then(f,f)},n=[k,void 0],o=l.when(i);for(d(x,function(a){(a.request||a.requestError)&&n.unshift(a.request,a.requestError),(a.response||a.responseError)&&n.push(a.response,a.responseError)});n.length;){var p=n.shift(),s=n.shift();o=o.then(p,s)}return e?(o.success=function(a){return la(a,"fn"),o.then(function(b){a(b.data,b.status,b.headers,i)}),o},o.error=function(a){return la(a,"fn"),o.then(null,function(b){a(b.data,b.status,b.headers,i)}),o}):(o.success=cf("success"),o.error=cf("error")),o}function o(a){d(arguments,function(a){n[a]=function(b,c){return n(j({},c||{},{method:a,url:b}))}})}function p(a){d(arguments,function(a){n[a]=function(b,c,d){return n(j({},d||{},{method:a,url:b,data:c}))}})}function q(b,e){function f(a){if(a){var b={};return d(a,function(a,d){b[d]=function(b){function d(){a(b)}c?k.$applyAsync(d):k.$$phase?d():k.$apply(d)}}),b}}function i(a,b,d,e){function f(){j(b,a,d,e)}p&&(Fb(a)?p.put(z,[a,b,Cb(d),e]):p.remove(z)),c?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function j(a,c,d,e){c=c>=-1?c:0,(Fb(c)?v.resolve:v.reject)({data:a,status:c,headers:Db(d),config:b,statusText:e})}function m(a){j(a.data,a.status,O(a.headers()),a.statusText)}function o(){var a=n.pendingRequests.indexOf(b);-1!==a&&n.pendingRequests.splice(a,1)}var p,q,v=l.defer(),x=v.promise,y=b.headers,z=u(b.url,b.paramSerializer(b.params));if(n.pendingRequests.push(b),x.then(o,o),!b.cache&&!a.cache||b.cache===!1||"GET"!==b.method&&"JSONP"!==b.method||(p=t(b.cache)?b.cache:t(a.cache)?a.cache:w),p&&(q=p.get(z),s(q)?G(q)?q.then(m,m):Vd(q)?j(q[1],q[0],O(q[2]),q[3]):j(q,200,{},"OK"):p.put(z,x)),r(q)){var A=Ic(b.url)?h()[b.xsrfCookieName||a.xsrfCookieName]:void 0;A&&(y[b.xsrfHeaderName||a.xsrfHeaderName]=A),g(b.method,z,e,i,y,b.timeout,b.withCredentials,b.responseType,f(b.eventHandlers),f(b.uploadEventHandlers))}return x}function u(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=i("$http");a.paramSerializer=v(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var x=[];return d(f,function(a){x.unshift(v(a)?m.get(a):m.invoke(a))}),n.pendingRequests=[],o("get","delete","head","jsonp"),p("post","put","patch"),n.defaults=a,n}]}function Hb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Ib(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Jb(a,d,a.defer,b.angular.callbacks,c[0])}]}function Jb(a,b,c,e,f){function g(a,b,c){var d=f.createElement("script"),g=null;return d.type="text/javascript",d.src=a,d.async=!0,g=function(a){ne(d,"load",g),ne(d,"error",g),f.body.removeChild(d),d=null;var h=-1,i="unknown";a&&("load"!==a.type||e[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},me(d,"load",g),me(d,"error",g),f.body.appendChild(d),g}return function(f,h,i,j,k,l,m,o,p,q){function t(){w&&w(),x&&x.abort()}function u(b,d,e,f,g){s(A)&&c.cancel(A),w=x=null,b(d,e,f,g),a.$$completeOutstandingRequest(n)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Fd(f)){var v="_"+(e.counter++).toString(36);e[v]=function(a){e[v].data=a,e[v].called=!0};var w=g(h.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(a,b){u(j,a,e[v].data,"",b),e[v]=n})}else{var x=b(f,h);x.open(f,h,!0),d(k,function(a,b){s(a)&&x.setRequestHeader(b,a)}),x.onload=function(){var a=x.statusText||"",b="response"in x?x.response:x.responseText,c=1223===x.status?204:x.status;0===c&&(c=b?200:"file"==Hc(h).protocol?404:0),u(j,c,b,x.getAllResponseHeaders(),a)};var y=function(){u(j,-1,null,null,"")};if(x.onerror=y,x.onabort=y,d(p,function(a,b){x.addEventListener(b,a)}),d(q,function(a,b){x.upload.addEventListener(b,a)}),m&&(x.withCredentials=!0),o)try{x.responseType=o}catch(z){if("json"!==o)throw z}x.send(r(i)?null:i)}if(l>0)var A=c(t,l);else G(l)&&l.then(t)}}function Kb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=U(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function k(f,k,n,o){function q(a){try{return a=G(a),o&&!s(a)?a:h(a)}catch(b){d(df.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var t;if(!k){var u=g(f);t=p(u),t.exp=f,t.expressions=[],t.$$watchDelegate=i}return t}o=!!o;for(var v,w,x,z=0,A=[],B=[],C=f.length,D=[],E=[];C>z;){if(-1==(v=f.indexOf(a,z))||-1==(w=f.indexOf(b,v+l))){z!==C&&D.push(g(f.substring(z)));break}z!==v&&D.push(g(f.substring(z,v))),x=f.substring(v+l,w),A.push(x),B.push(c(x,q)),z=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&df.throwNoconcat(f),!k||A.length){var F=function(a){for(var b=0,c=A.length;c>b;b++){if(o&&r(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return j(function(a){var b=0,c=A.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(df.interr(f,g))}},{exp:f,expressions:A,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);y(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return k.startSymbol=function(){return a},k.endSymbol=function(){return b},k}]}function Lb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?R(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=s(j)&&!j,r=(q?d:c).defer(),t=r.promise;return i=s(i)?i:0,t.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(t.$$intervalId),delete g[t.$$intervalId]),q||a.$apply()},h),g[t.$$intervalId]=r,t}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Mb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=ba(b[c]);return b.join("/")}function Nb(a,b){var c=Hc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=l(c.port)||ff[c.protocol]||null}function Ob(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Hc(a);b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=_(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Pb(a,b){return 0===a.lastIndexOf(b,0)}function Qb(a,b){return Pb(b,a)?b.substr(a.length):void 0}function Rb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Sb(a){return a.replace(/(#.+)|#$/,"$1")}function Tb(a){return a.substr(0,Rb(a).lastIndexOf("/")+1)}function Ub(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Vb(a,b,c){this.$$html5=!0,c=c||"",Nb(a,this),this.$$parse=function(a){var c=Qb(b,a);if(!v(c))throw gf("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Ob(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=aa(this.$$search),c=this.$$hash?"#"+ba(this.$$hash):"";this.$$url=Mb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return s(f=Qb(a,d))?(g=f,h=s(f=Qb(c,f))?b+(Qb("/",f)||f):a+g):s(f=Qb(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Wb(a,b,c){Nb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return Pb(b,c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Qb(a,d)||Qb(b,d);r(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",r(g)&&(a=d,this.replace())):(f=Qb(c,g),r(f)&&(f=g)),Ob(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=aa(this.$$search),d=this.$$hash?"#"+ba(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Rb(a)==Rb(b)?(this.$$parse(b),!0):!1}}function Xb(a,b,c){this.$$html5=!0,Wb.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Rb(d)?f=d:(g=Qb(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=aa(this.$$search),d=this.$$hash?"#"+ba(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Yb(a){return function(){return this[a]}}function Zb(a,b){return function(c){return r(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function $b(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return s(b)?(a=b,this):a},this.html5Mode=function(a){return F(a)?(b.enabled=a,this):t(a)?(F(a.enabled)&&(b.enabled=a.enabled),F(a.requireBase)&&(b.requireBase=a.requireBase),F(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw gf("nobase","$location in HTML5 mode requires a tag to be present!");l=Ub(n)+(m||"/"),k=e.history?Vb:Xb}else l=Rb(n),k=Wb;var o=Tb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Kd(a.target);"a"!==L(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");t(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Hc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Sb(j.absUrl())!=Sb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return r(Qb(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Sb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Sb(d.url()),b=Sb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function _b(){var a=!0,b=this;this.debugEnabled=function(b){return s(b)?(a=b,this):a},this.$get=["$window",function(c){function e(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function f(a){var b=c.console||{},f=b[a]||b.log||n,g=!1;try{g=!!f.apply}catch(h){}return g?function(){var a=[];return d(arguments,function(b){a.push(e(b))}),f.apply(b,a)}:function(a,b){f(a,null==b?"":b)}}return{log:f("log"),info:f("info"),warn:f("warn"),error:f("error"),debug:function(){var c=f("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function ac(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw jf("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function bc(a){return a+""}function cc(a,b){if(a){if(a.constructor===a)throw jf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw jf("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw jf("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw jf("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function dc(a,b){if(a){if(a.constructor===a)throw jf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===kf||a===lf||a===mf)throw jf("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function ec(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw jf("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function fc(a,b){return"undefined"!=typeof a?a:b}function gc(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function hc(a,b){var c=a(b);return!c.$stateful}function ic(a,b){var c,e;switch(a.type){case qf.Program:c=!0,d(a.body,function(a){ic(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case qf.Literal:a.constant=!0,a.toWatch=[];break;case qf.UnaryExpression:ic(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case qf.BinaryExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case qf.LogicalExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case qf.ConditionalExpression: ic(a.test,b),ic(a.alternate,b),ic(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case qf.Identifier:a.constant=!1,a.toWatch=[a];break;case qf.MemberExpression:ic(a.object,b),a.computed&&ic(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case qf.CallExpression:c=a.filter?hc(b,a.callee.name):!1,e=[],d(a.arguments,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&hc(b,a.callee.name)?e:[a];break;case qf.AssignmentExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case qf.ArrayExpression:c=!0,e=[],d(a.elements,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=e;break;case qf.ObjectExpression:c=!0,e=[],d(a.properties,function(a){ic(a.value,b),c=c&&a.value.constant&&!a.computed,a.value.constant||e.push.apply(e,a.value.toWatch)}),a.constant=c,a.toWatch=e;break;case qf.ThisExpression:a.constant=!1,a.toWatch=[];break;case qf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function jc(a){if(1==a.length){var b=a[0].expression,c=b.toWatch;return 1!==c.length?c:c[0]!==b?c:void 0}}function kc(a){return a.type===qf.Identifier||a.type===qf.MemberExpression}function lc(a){return 1===a.body.length&&kc(a.body[0].expression)?{type:qf.AssignmentExpression,left:a.body[0].expression,right:{type:qf.NGValueParameter},operator:"="}:void 0}function mc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===qf.Literal||a.body[0].expression.type===qf.ArrayExpression||a.body[0].expression.type===qf.ObjectExpression)}function nc(a){return a.constant}function oc(a,b){this.astBuilder=a,this.$filter=b}function pc(a,b){this.astBuilder=a,this.$filter=b}function qc(a){return"constructor"==a}function rc(a){return y(a.valueOf)?a.valueOf():sf.call(a)}function sc(){var a,b,c=pa(),e=pa(),f={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(a,b){f[a]=b},this.setIdentifierFns=function(c,d){return a=c,b=d,this},this.$get=["$filter",function(g){function h(a,b,d){var f,h,j;switch(d=d||u,typeof a){case"string":a=a.trim(),j=a;var q=d?e:c;if(f=q[j],!f){":"===a.charAt(0)&&":"===a.charAt(1)&&(h=!0,a=a.substring(2));var s=d?t:r,v=new pf(s),w=new rf(v,g,s);f=w.parse(a),f.constant?f.$$watchDelegate=o:h?f.$$watchDelegate=f.literal?m:l:f.inputs&&(f.$$watchDelegate=k),d&&(f=i(f)),q[j]=f}return p(f,b);case"function":return p(a,b);default:return p(n,b)}}function i(a){function b(b,c,d,e){var f=u;u=!0;try{return a(b,c,d,e)}finally{u=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=i(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cl;l++)i[l]=j,k[l]=null;return a.$watch(function(a){for(var b=!1,c=0,e=g.length;e>c;c++){var h=g[c](a);(b||(b=!j(h,i[c])))&&(k[c]=h,i[c]=h&&rc(h))}return b&&(f=d(a,void 0,void 0,k)),f},b,c,e)}function l(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,y(b)&&b.apply(this,arguments),s(a)&&d.$$postDigest(function(){s(f)&&e()})},c)}function m(a,b,c,e){function f(a){var b=!0;return d(a,function(a){s(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return e(a)},function(a,c,d){h=a,y(b)&&b.call(this,a,c,d),f(a)&&d.$$postDigest(function(){f(h)&&g()})},c)}function o(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function p(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==m&&c!==l,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return s(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==k?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=k,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var q=Zd().noUnsafeEval,r={csp:q,expensiveChecks:!1,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},t={csp:q,expensiveChecks:!0,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},u=!1;return h.$$runningExpensiveChecks=function(){return u},h}]}function tc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return vc(function(b){a.$evalAsync(b)},b)}]}function uc(){this.$get=["$browser","$exceptionHandler",function(a,b){return vc(function(b){a.defer(b)},b)}]}function vc(a,c){function e(){this.$$state={status:0}}function f(a,b){return function(c){b.call(a,c)}}function g(a){var b,d,e;e=a.pending,a.processScheduled=!1,a.pending=void 0;for(var f=0,g=e.length;g>f;++f){d=e[f][0],b=e[f][a.status];try{y(b)?d.resolve(b(a.value)):1===a.status?d.resolve(a.value):d.reject(a.value)}catch(h){d.reject(h),c(h)}}}function h(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){g(b)}))}function i(){this.promise=new e}function k(a){var b=new i,c=0,e=Vd(a)?[]:{};return d(a,function(a,d){c++,q(a).then(function(a){e.hasOwnProperty(d)||(e[d]=a,--c||b.resolve(e))},function(a){e.hasOwnProperty(d)||b.reject(a)})}),0===c&&b.resolve(e),b.promise}var l=b("$q",TypeError),m=function(){var a=new i;return a.resolve=f(a,a.resolve),a.reject=f(a,a.reject),a.notify=f(a,a.notify),a};j(e.prototype,{then:function(a,b,c){if(r(a)&&r(b)&&r(c))return this;var d=new i;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&h(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return p(b,!0,a)},function(b){return p(b,!1,a)},b)}}),j(i.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(l("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function b(a){i||(i=!0,g.$$resolve(a))}function d(a){i||(i=!0,g.$$reject(a))}var e,g=this,i=!1;try{(t(a)||y(a))&&(e=a&&a.then),y(e)?(this.promise.$$state.status=-1,e.call(a,b,d,f(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,h(this.promise.$$state))}catch(j){d(j),c(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,h(this.promise.$$state)},notify:function(b){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(y(a)?a(b):b)}catch(h){c(h)}}})}});var n=function(a){var b=new i;return b.reject(a),b.promise},o=function(a,b){var c=new i;return b?c.resolve(a):c.reject(a),c.promise},p=function(a,b,c){var d=null;try{y(c)&&(d=c())}catch(e){return o(e,!1)}return G(d)?d.then(function(){return o(a,b)},function(a){return o(a,!1)}):o(a,b)},q=function(a,b,c,d){var e=new i;return e.resolve(a),e.promise.then(b,c,d)},s=q,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!y(a))throw l("norslvr","Expected resolverFn, got '{0}'",a);var d=new i;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=m,u.reject=n,u.when=q,u.resolve=s,u.all=k,u}function wc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function xc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=g(),this.$$ChildScope=null}return b.prototype=a,b}var e=10,f=b("$rootScope"),h=null,i=null;this.digestTtl=function(a){return arguments.length&&(e=a),e},this.$get=["$exceptionHandler","$parse","$browser",function(b,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Jd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function o(){this.$id=g(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function p(a){if(z.$$phase)throw f("inprog","{0} already in progress",z.$$phase);z.$$phase=a}function q(){z.$$phase=null}function s(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function u(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function v(){}function w(){for(;C.length;)try{C.shift()()}catch(a){b(a)}i=null}function x(){null===i&&(i=k.defer(function(){z.$apply(w)}))}o.prototype={constructor:o,$new:function(b,c){var d;return c=c||this,b?(d=new o,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,g=f.$$watchers,i={fn:b,last:v,get:e,exp:d||a,eq:!!c};return h=null,y(b)||(i.fn=n),g||(g=f.$$watchers=[]),g.unshift(i),s(this,1),function(){M(g,i)>=0&&s(f,-1),h=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(f,f,h)):b(f,e,h)}var e=new Array(a.length),f=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(f,f,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,d){f[0]=a,e[0]=c,b(f,a===c?f:e,d)}):(d(a,function(a,b){var d=h.$watch(a,function(a,d){f[b]=a,e[b]=d,i||(i=!0,h.$evalAsync(c))});g.push(d)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function d(a){f=a;var b,d,e,h,i;if(!r(f)){if(t(f))if(c(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],e=i!==i&&h!==h,e||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(d in f)Ed.call(f,d)&&(b++,h=f[d],i=g[d],d in g?(e=i!==i&&h!==h,e||i===h||(l++,g[d]=h)):(q++,g[d]=h,l++));if(q>b){l++;for(d in g)Ed.call(f,d)||(q--,delete g[d])}}else g!==f&&(g=f,l++);return l}}function e(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(t(f))if(c(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,d),n=[],o={},p=!0,q=0;return this.$watch(m,e)},$digest:function(){var a,c,d,g,j,l,m,n,o,r,s,t,u=e,x=this,C=[];p("$digest"),k.$$checkUrlChange(),this===z&&null!==i&&(k.defer.cancel(i),w()),h=null;do{n=!1,r=x;for(var E=0;Eu&&(s=4-u,C[s]||(C[s]=[]),C[s].push({msg:y(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:c,oldVal:d}))}catch(F){b(F)}if(!(o=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(o=r.$$nextSibling);)r=r.$parent}while(r=o);if((n||A.length)&&!u--)throw q(),f("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,C)}while(n||A.length);for(q();De;e++)if(d[e])try{d[e].apply(null,k)}catch(l){b(l)}else d.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,c){var d=this,e=d,f=d,g={name:a,targetScope:d,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!d.$$listenerCount[a])return g;for(var h,i,j,k=Q([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){b(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==d&&e.$$nextSibling))for(;e!==d&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var z=new o,A=z.$$asyncQueue=[],B=z.$$postDigestQueue=[],C=z.$$applyAsyncQueue=[],D=0;return z}]}function yc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return s(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return s(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Hc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function zc(a){if("self"===a)return a;if(v(a)){if(a.indexOf("***")>-1)throw tf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Yd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(z(a))return new RegExp("^"+a.source+"$");throw tf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ac(a){var b=[];return s(a)&&d(a,function(a){b.push(zc(a))}),b}function Bc(){this.SCE_CONTEXTS=uf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=Ac(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=Ac(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Ic(b):!!a.exec(b.href)}function e(c){var e,f,g=Hc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw tf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||r(b)||""===b)return b;if("string"!=typeof b)throw tf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||r(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===uf.RESOURCE_URL){if(e(b))return b;throw tf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===uf.HTML)return j(b);throw tf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw tf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[uf.HTML]=f(k),l[uf.CSS]=f(k),l[uf.URL]=f(k),l[uf.JS]=f(k),l[uf.RESOURCE_URL]=f(l[uf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Cc(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Jd)throw tf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var e=O(uf);e.isEnabled=function(){return a},e.trustAs=c.trustAs,e.getTrusted=c.getTrusted,e.valueOf=c.valueOf,a||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=o),e.parseAs=function(a,c){var d=b(c);return d.literal&&d.constant?d:b(c,function(b){return e.getTrusted(a,b)})};var f=e.parseAs,g=e.getTrusted,h=e.trustAs;return d(uf,function(a,b){var c=Fd(b);e[va("parse_as_"+c)]=function(b){return f(a,b)},e[va("get_trusted_"+c)]=function(b){return g(a,b)},e[va("trust_as_"+c)]=function(b){return h(a,b)}}),e}]}function Dc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=a.chrome&&a.chrome.app&&a.chrome.app.runtime,g=!f&&a.history&&a.history.pushState,h=l((/android (\d+)/.exec(Fd((a.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((a.navigator||{}).userAgent),j=b[0]||{},k=/^(Moz|webkit|ms)(?=[A-Z])/,m=j.body&&j.body.style,n=!1,o=!1;if(m){for(var p in m)if(d=k.exec(p)){c=d[0],c=c[0].toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in m&&"webkit"),n=!!("transition"in m||c+"Transition"in m),o=!!("animation"in m||c+"Animation"in m),!h||n&&o||(n=v(m.webkitTransition),o=v(m.webkitAnimation))}return{history:!(!g||4>h||i),hasEvent:function(a){if("input"===a&&11>=Jd)return!1;if(r(e[a])){var b=j.createElement("div");e[a]="on"+a in b}return e[a]},csp:Zd(),vendorPrefix:c,transitions:n,animations:o,android:h}}]}function Ec(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw vf("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,v(g)&&!r(b.get(g))||(g=e.getTrustedResourceUrl(g));var k=c.defaults&&c.defaults.transformResponse;return Vd(k)?k=k.filter(function(a){return a!==Ab}):k===Ab&&(k=null),c.get(g,j({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Fc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var e={};return e.findBindings=function(a,b,c){var e=a.getElementsByClassName("ng-binding"),f=[];return d(e,function(a){var e=Td.element(a).data("$binding");e&&d(e,function(d){if(c){var e=new RegExp("(^|\\s)"+Yd(b)+"(\\s|\\||$)");e.test(d)&&f.push(a)}else-1!=d.indexOf(b)&&f.push(a)})}),f},e.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),r(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Lc(){this.$get=Kc}function Mc(a){function b(e,f){if(t(e)){var g={};return d(e,function(a,c){g[c]=b(c,a)}),g}return a.factory(e+c,f)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Rc),b("date",ed),b("filter",Nc),b("json",fd),b("limitTo",gd),b("lowercase",Ef),b("number",Sc),b("orderBy",hd),b("uppercase",Ff)}function Nc(){return function(a,d,e){if(!c(a)){if(null==a)return a;throw b("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Qc(d);switch(h){case"function":f=d;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Oc(d,e,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Oc(a,b,c){var d,e=t(a)&&"$"in a;return b===!0?b=P:y(b)||(b=function(a,b){return r(a)?!1:null===a||null===b?a===b:t(b)||t(a)&&!q(a)?!1:(a=Fd(""+a),b=Fd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!t(d)?Pc(d,a.$,b,!1):Pc(d,a,b,c)}}function Pc(a,b,c,d,e){var f=Qc(a),g=Qc(b);if("string"===g&&"!"===b.charAt(0))return!Pc(a,b.substring(1),c,d);if(Vd(a))return a.some(function(a){return Pc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Pc(a[h],b,c,!0))return!0;return e?!1:Pc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!y(i)&&!r(i)){var j="$"===h,k=j?a:a[h];if(!Pc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Qc(a){return null===a?"null":typeof a}function Rc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return r(c)&&(c=b.CURRENCY_SYM),r(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Vc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Sc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Vc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Tc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(zf))>-1&&(a=a.replace(zf,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==Af;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==Af;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>yf&&(b=b.splice(0,yf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Uc(a,b,c,d){var e=a.d,f=e.length-a.i;b=r(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0){e.splice(Math.max(a.i,g));for(var i=g;ij;j++)e[j]=0}if(h>=5)if(0>g-1){for(var k=0;k>g;k--)e.unshift(0),a.i++;e.unshift(1),a.i++}else e[g-1]++;for(;fl;)k.unshift(0),l++;l>0?n=k.splice(l,k.length):(n=k,k=[0]);var o=[];for(k.length>=b.lgSize&&o.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Wc(a,b,c,d){var e="";for((0>a||d&&0>=a)&&(d?a=-a+1:(a=-a,e="-")),a=""+a;a.length0||g>-c)&&(g+=c),0===g&&-12==c&&(g=12),Wc(g,b,d,e)}}function Yc(a,b,c){return function(d,e){var f=d["get"+a](),g=(c?"STANDALONE":"")+(b?"SHORT":""),h=Gd(g+a);return e[h][f]}}function Zc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Wc(Math[d>0?"floor":"ceil"](d/60),2)+Wc(Math.abs(d%60),2)}function $c(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function _c(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function ad(a){return function(b){var c=$c(b.getFullYear()),d=_c(b),e=+d-+c,f=1+Math.round(e/6048e5);return Wc(f,a)}}function bd(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function cd(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function dd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function ed(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=l(b[9]+b[10]),f=l(b[9]+b[11])),g.call(d,l(b[1]),l(b[2])-1,l(b[3]));var i=l(b[4]||0)-e,j=l(b[5]||0)-f,k=l(b[6]||0),m=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,m),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e,f){var g,h,i="",j=[];if(e=e||"mediumDate",e=a.DATETIME_FORMATS[e]||e,v(c)&&(c=Df.test(c)?l(c):b(c)),w(c)&&(c=new Date(c)),!x(c)||!isFinite(c.getTime()))return c;for(;e;)h=Cf.exec(e),h?(j=Q(j,h,1),e=j.pop()):(j.push(e),e=null);var k=c.getTimezoneOffset();return f&&(k=W(f,k),c=Y(c,f,!0)),d(j,function(b){g=Bf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function fd(){return function(a,b){return r(b)&&(b=2),U(a,b)}}function gd(){return function(a,b,c){return b=Math.abs(Number(b))===1/0?Number(b):l(b),isNaN(b)?a:(w(a)&&(a=a.toString()),Vd(a)||v(a)?(c=!c||isNaN(c)?0:l(c),c=0>c?Math.max(0,a.length+c):c,b>=0?a.slice(c,c+b):0===c?a.slice(b,a.length):a.slice(Math.max(0,c+b),c)):a)}}function hd(a){function d(b,c){return c=c?-1:1,b.map(function(b){var d=1,e=o;if(y(b))e=b;else if(v(b)&&("+"!=b.charAt(0)&&"-"!=b.charAt(0)||(d="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(e=a(b),e.constant))){var f=e();e=function(a){return a[f]}}return{get:e,descending:d*c}})}function e(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a,b){return"function"==typeof a.valueOf&&(a=a.valueOf(),e(a))?a:q(a)&&(a=a.toString(),e(a))?a:b}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"string"===c?a=a.toLowerCase():"object"===c&&(a=f(a,b)),{value:a,type:c}}function h(a,b){var c=0;return a.type===b.type?a.value!==b.value&&(c=a.valued&&!(c=h(a.predicateValues[d],b.predicateValues[d])*k[d].descending);++d);return c}if(null==a)return a;if(!c(a))throw b("orderBy")("notarray","Expected array but received: {0}",a);Vd(e)||(e=[e]),0===e.length&&(e=["+"]);var k=d(e,f);k.push({get:function(){return{}},descending:f?-1:1});var l=Array.prototype.map.call(a,i);return l.sort(j),a=l.map(function(a){return a.value})}}function id(a){return y(a)&&(a={link:a}),a.restrict=a.restrict||"AC",p(a)}function jd(a,b){a.$name=b}function kd(a,b,c,e,f){var g=this,h=[];g.$error={},g.$$success={},g.$pending=void 0,g.$name=f(b.name||b.ngForm||"")(c),g.$dirty=!1,g.$pristine=!0,g.$valid=!0,g.$invalid=!1,g.$submitted=!1,g.$$parentForm=If,g.$rollbackViewValue=function(){d(h,function(a){a.$rollbackViewValue()})},g.$commitViewValue=function(){d(h,function(a){a.$commitViewValue()})},g.$addControl=function(a){ma(a.$name,"input"),h.push(a),a.$name&&(g[a.$name]=a),a.$$parentForm=g},g.$$renameControl=function(a,b){var c=a.$name;g[c]===a&&delete g[c],g[b]=a,a.$name=b},g.$removeControl=function(a){a.$name&&g[a.$name]===a&&delete g[a.$name],d(g.$pending,function(b,c){g.$setValidity(c,null,a)}),d(g.$error,function(b,c){g.$setValidity(c,null,a)}),d(g.$$success,function(b,c){g.$setValidity(c,null,a)}),M(h,a),a.$$parentForm=If},zd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(M(d,c),0===d.length&&delete a[b])},$animate:e}),g.$setDirty=function(){e.removeClass(a,sg),e.addClass(a,tg),g.$dirty=!0,g.$pristine=!1,g.$$parentForm.$setDirty()},g.$setPristine=function(){e.setClass(a,sg,tg+" "+Jf),g.$dirty=!1,g.$pristine=!0,g.$submitted=!1,d(h,function(a){a.$setPristine()})},g.$setUntouched=function(){d(h,function(a){a.$setUntouched()})},g.$setSubmitted=function(){e.addClass(a,Jf),g.$submitted=!0,g.$$parentForm.$setSubmitted()}}function ld(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function md(a,b,c,d,e,f){nd(a,b,c,d,e,f),ld(d)}function nd(a,b,c,d,e,f){var g=Fd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(){h=!0}),b.on("compositionend",function(){h=!1,j()})}var i,j=function(a){if(i&&(f.defer.cancel(i),i=null),!h){var e=b.val(),j=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Xd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,j)}};if(e.hasEvent("input"))b.on("input",j);else{var k=function(a,b,c){i||(i=f.defer(function(){i=null,b&&b.value===c||j(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",j),Xf[g]&&d.$$hasNativeValidators&&g===c.type&&b.on(Wf,function(a){if(!i){var b=this[Dd],c=b.badInput,d=b.typeMismatch;i=f.defer(function(){i=null,b.badInput===c&&b.typeMismatch===d||j(a)})}}),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function od(a,b){if(x(a))return a;if(v(a)){Tf.lastIndex=0;var c=Tf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=$c(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function pd(a,b){return function(c,e){var f,g;if(x(c))return c;if(v(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Nf.test(c))return new Date(c);if(a.lastIndex=0,f=a.exec(c))return f.shift(),g=e?{yyyy:e.getFullYear(),MM:e.getMonth()+1,dd:e.getDate(),HH:e.getHours(),mm:e.getMinutes(),ss:e.getSeconds(),sss:e.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},d(f,function(a,c){c=p},g.$observe("min",function(a){p=m(a),h.$validate()})}if(s(g.max)||g.ngMax){var q;h.$validators.max=function(a){return!l(a)||r(q)||c(a)<=q},g.$observe("max",function(a){q=m(a),h.$validate()})}}}function rd(a,b,c,d){var e=b[0],f=d.$$hasNativeValidators=t(e.validity);f&&d.$parsers.push(function(a){var c=b.prop(Dd)||{};return c.badInput||c.typeMismatch?void 0:a})}function sd(a,b,c,d,e,f){if(rd(a,b,c,d),nd(a,b,c,d,e,f),d.$$parserName="number",d.$parsers.push(function(a){return d.$isEmpty(a)?null:Qf.test(a)?parseFloat(a):void 0}),d.$formatters.push(function(a){if(!d.$isEmpty(a)){if(!w(a))throw zg("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),s(c.min)||c.ngMin){var g;d.$validators.min=function(a){return d.$isEmpty(a)||r(g)||a>=g},c.$observe("min",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),g=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}if(s(c.max)||c.ngMax){var h;d.$validators.max=function(a){return d.$isEmpty(a)||r(h)||h>=a},c.$observe("max",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),h=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}}function td(a,b,c,d,e,f){nd(a,b,c,d,e,f),ld(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Of.test(c)}}function ud(a,b,c,d,e,f){nd(a,b,c,d,e,f),ld(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Pf.test(c)}}function vd(a,b,c,d){r(c.name)&&b.attr("name",g());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function wd(a,b,c,d,e){var f;if(s(d)){if(f=a(d),!f.constant)throw zg("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function xd(a,b,c,d,e,f,g,h){var i=wd(h,a,"ngTrueValue",c.ngTrueValue,!0),j=wd(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return P(a,i)}),d.$parsers.push(function(a){return a?i:j})}function yd(a,b){return a="ngClass"+a,["$animate",function(c){function e(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&e.push(a))}),h.data("$classCounts",c),e.join(" ")}function m(a,b){var d=e(b,a),f=e(a,b);d=l(d,1),f=l(f,-1),d&&d.length&&c.addClass(h,d),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||(1&g.$index)===b){var c=f(a||[]);if(o){if(!P(a,o)){var d=f(o);m(d,c)}}else j(c)}o=Vd(a)?a.map(function(a){return O(a)}):O(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var e=1&c;if(e!==(1&d)){var h=f(g.$eval(i[a]));e===b?j(h):k(h)}})}}}]}function zd(a){function b(a,b,h){r(b)?c("$pending",a,h):d("$pending",a,h),F(b)?b?(k(g.$error,a,h),j(g.$$success,a,h)):(j(g.$error,a,h),k(g.$$success,a,h)):(k(g.$error,a,h),k(g.$$success,a,h)),g.$pending?(e(wg,!0),g.$valid=g.$invalid=void 0,f("",null)):(e(wg,!1),g.$valid=Ad(g.$error),g.$invalid=!g.$valid,f("",g.$valid));var i;i=g.$pending&&g.$pending[a]?void 0:g.$error[a]?!1:g.$$success[a]?!0:null,f(a,i),g.$$parentForm.$setValidity(a,i,g)}function c(a,b,c){g[a]||(g[a]={}),j(g[a],b,c)}function d(a,b,c){g[a]&&k(g[a],b,c),Ad(g[a])&&(g[a]=void 0)}function e(a,b){b&&!i[a]?(l.addClass(h,a),i[a]=!0):!b&&i[a]&&(l.removeClass(h,a),i[a]=!1)}function f(a,b){a=a?"-"+ia(a,"-"):"",e(qg+a,b===!0),e(rg+a,b===!1)}var g=a.ctrl,h=a.$element,i={},j=a.set,k=a.unset,l=a.$animate;i[rg]=!(i[qg]=h.hasClass(qg)),g.$setValidity=b}function Ad(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Bd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Cd=/^\/(.+)\/([a-z]*)$/,Dd="validity",Ed=Object.prototype.hasOwnProperty,Fd=function(a){return v(a)?a.toLowerCase():a},Gd=function(a){return v(a)?a.toUpperCase():a},Hd=function(a){return v(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Id=function(a){return v(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Fd=Hd,Gd=Id);var Jd,Kd,Ld,Md,Nd=[].slice,Od=[].splice,Pd=[].push,Qd=Object.prototype.toString,Rd=Object.getPrototypeOf,Sd=b("ng"),Td=a.angular||(a.angular={}),Ud=0;Jd=a.document.documentMode,n.$inject=[],o.$inject=[];var Vd=Array.isArray,Wd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Xd=function(a){return v(a)?a.trim():a},Yd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=ae[c],b=a.document.querySelector("["+d.replace(":","\\:")+"jq]")){e=b.getAttribute(d+"jq");break}return $d.name_=e},_d=/:/g,ae=["ng-","data-ng-","ng:","x-ng-"],be=/[A-Z]/g,ce=!1,de=1,ee=2,fe=3,ge=8,he=9,ie=11,je={full:"1.5.6",major:1,minor:5,dot:6,codeName:"arrow-stringification"};Da.expando="ng339";var ke=Da.cache={},le=1,me=function(a,b,c){a.addEventListener(b,c,!1)},ne=function(a,b,c){a.removeEventListener(b,c,!1)};Da._data=function(a){return this.cache[a[this.expando]]||{}};var oe=/([\:\-\_]+(.))/g,pe=/^moz([A-Z])/,qe={mouseleave:"mouseout",mouseenter:"mouseover"},re=b("jqLite"),se=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,te=/<|&#?\w+;/,ue=/<([\w:-]+)/,ve=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,we={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};we.optgroup=we.option,we.tbody=we.tfoot=we.colgroup=we.caption=we.thead,we.th=we.td;var xe=a.Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},ye=Da.prototype={ready:function(b){function c(){d||(d=!0,b())}var d=!1;"complete"===a.document.readyState?a.setTimeout(c):(this.on("DOMContentLoaded",c),Da(a).on("load",c))},toString:function(){var a=[];return d(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Kd(a>=0?this[a]:this[this.length+a])},length:0,push:Pd,sort:[].sort,splice:[].splice},ze={};d("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){ze[Fd(a)]=a});var Ae={};d("input,select,option,textarea,button,form,details".split(","),function(a){Ae[a]=!0});var Be={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};d({data:Ja,removeData:Ha,hasData:ya,cleanData:za},function(a,b){Da[b]=a}),d({data:Ja,inheritedData:Pa,scope:function(a){return Kd.data(a,"$scope")||Pa(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Kd.data(a,"$isolateScope")||Kd.data(a,"$isolateScopeNoTemplate")},controller:Oa,injector:function(a){return Pa(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ka,css:function(a,b,c){return b=va(b),s(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,c){var d=a.nodeType;if(d!==fe&&d!==ee&&d!==ge){var e=Fd(b);if(ze[e]){if(!s(c))return a[b]||(a.attributes.getNamedItem(b)||n).specified?e:void 0;c?(a[b]=!0,a.setAttribute(b,e)):(a[b]=!1,a.removeAttribute(e))}else if(s(c))a.setAttribute(b,c);else if(a.getAttribute){var f=a.getAttribute(b,2);return null===f?void 0:f}}},prop:function(a,b,c){return s(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(r(b)){var c=a.nodeType;return c===de||c===fe?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(r(b)){if(a.multiple&&"select"===L(a)){var c=[];return d(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return r(b)?a.innerHTML:(Fa(a,!0),void(a.innerHTML=b))},empty:Qa},function(a,b){Da.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Qa&&r(2==a.length&&a!==Ka&&a!==Oa?b:c)){if(t(b)){for(d=0;f>d;d++)if(a===Ja)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=r(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),d({removeData:Ha,on:function(a,b,c,d){if(s(d))throw re("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(xa(a)){var e=Ia(a,!0),f=e.events,g=e.handle;g||(g=e.handle=Va(a,f));for(var h=b.indexOf(" ")>=0?b.split(" "):[b],i=h.length,j=function(b,d,e){var h=f[b];h||(h=f[b]=[],h.specialHandlerWrapper=d,"$destroy"===b||e||me(a,b,g)),h.push(c)};i--;)b=h[i],qe[b]?(j(qe[b],Xa),j(b,void 0,!0)):j(b)}},off:Ga,one:function(a,b,c){a=Kd(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,e=a.parentNode;Fa(a),d(new Da(b),function(b){c?e.insertBefore(b,c.nextSibling):e.replaceChild(b,a),c=b})},children:function(a){var b=[];return d(a.childNodes,function(a){a.nodeType===de&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===de||c===ie){b=new Da(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===de){var c=a.firstChild;d(new Da(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ca(a,Kd(b).eq(0).clone()[0])},remove:Ra,detach:function(a){Ra(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Da(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Ma,removeClass:La,toggleClass:function(a,b,c){b&&d(b.split(" "),function(b){var d=c;r(d)&&(d=!Ka(a,b)),(d?Ma:La)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==ie?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ea,triggerHandler:function(a,b,c){var e,f,g,h=b.type||b,i=Ia(a),k=i&&i.events,l=k&&k[h];l&&(e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:n,type:h,target:a},b.type&&(e=j(e,b)),f=O(l),g=c?[e].concat(c):[e],d(f,function(b){e.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Da.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)r(e)?(e=a(this[f],b,c,d),s(e)&&(e=Kd(e))):Na(e,a(this[f],b,c,d));return s(e)?e:this},Da.prototype.bind=Da.prototype.on,Da.prototype.unbind=Da.prototype.off}),$a.prototype={put:function(a,b){this[Za(a,this.nextUid)]=b},get:function(a){return this[Za(a,this.nextUid)]},remove:function(a){var b=this[a=Za(a,this.nextUid)];return delete this[a],b}};var Ce=[function(){this.$get=[function(){return $a}]}],De=/^([^\(]+?)=>/,Ee=/^[^\(]*\(\s*([^\)]*)\)/m,Fe=/,/,Ge=/^\s*(_?)(\S+?)\1\s*$/,He=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ie=b("$injector");db.$$annotate=cb;var Je=b("$animate"),Ke=1,Le="ng-animate",Me=function(){this.$get=n},Ne=function(){var a=new $a,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,e){function f(a,b,c){var e=!1;return b&&(b=v(b)?b.split(" "):Vd(b)?b:[],d(b,function(b){b&&(e=!0,a[b]=c)})),e}function g(){d(b,function(b){var c=a.get(b);if(c){var e=hb(b.attr("class")),f="",g="";d(c,function(a,b){var c=!!e[b];a!==c&&(a?f+=(f.length?" ":"")+b:g+=(g.length?" ":"")+b)}),d(b,function(a){f&&Ma(a,f),g&&La(a,g)}),a.remove(b)}}),b.length=0}function h(c,d,h){var i=a.get(c)||{},j=f(i,d,!0),k=f(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&e.$$postDigest(g))}return{enabled:n,on:n,off:n,pin:n,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Oe=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw Je("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Le+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw Je("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Le)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=gb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Kd(d),e=e&&Kd(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",ib(f))},move:function(c,d,e,f){return d=d&&Kd(d),e=e&&Kd(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",ib(f))},leave:function(b,c){return a.push(b,"leave",ib(c),function(){b.remove()})},addClass:function(b,c,d){return d=ib(d),d.addClass=fb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=ib(d),d.removeClass=fb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=ib(e),e.addClass=fb(e.addClass,c),e.removeClass=fb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=ib(f),f.from=f.from?j(f.from,c):c,f.to=f.to?j(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=fb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Pe=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){nf[a]=!0});var of={n:"\n",f:"\f",r:"\r",t:" ",v:"\x0B","'":"'",'"':'"'},pf=function(a){this.options=a};pf.prototype={constructor:pf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||"\x0B"===a||" "===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var c=a.charCodeAt(0),d=b.charCodeAt(0);return c>=55296&&56319>=c&&d>=56320&&57343>=d?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=s(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw jf("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:qf.Program,body:a}},expressionStatement:function(){return{type:qf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:qf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:qf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:qf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:qf.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:qf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:qf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:qf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:qf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:qf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=N(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:qf.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:qf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:qf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:qf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:qf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.expression());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:qf.Identifier,name:a.text}},constant:function(){return{type:qf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:qf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:qf.Property,kind:"init"},this.peek().constant?(a.key=this.constant(),a.computed=!1,this.consume(":"),a.value=this.expression()):this.peek().identifier?(a.key=this.identifier(),a.computed=!1,this.peek(":")?(this.consume(":"),a.value=this.expression()):a.value=a.key):this.peek("[")?(this.consume("["),a.key=this.expression(),this.consume("]"),a.computed=!0,this.consume(":"),a.value=this.expression()):this.throwError("invalid key",this.peek()),b.push(a)}while(this.expect(","));return this.consume("}"),{type:qf.ObjectExpression,properties:b}},throwError:function(a,b){throw jf("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw jf("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw jf("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},selfReferential:{"this":{type:qf.ThisExpression},$locals:{type:qf.LocalsExpression}}},oc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ic(e,c.$filter);var f,g="";if(this.stage="assign",f=lc(e)){this.state.computing="assign";var h=this.nextId();this.recurse(f,h),this.return_(h),g="fn.assign="+this.generateFunction("assign","s,v,l")}var i=jc(e.body);c.stage="inputs",d(i,function(a,b){var d="fn"+b;c.state[d]={vars:[],body:[],own:{}},c.state.computing=d;var e=c.nextId();c.recurse(a,e),c.return_(e),c.state.inputs.push(d),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var j='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+g+this.watchFns()+"return fn;",k=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",j)(this.$filter,ac,cc,dc,bc,ec,fc,gc,a);return this.state=this.stage=void 0,k.literal=mc(e),k.constant=nc(e),k},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return d(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return d(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,c,e,f,g){var h,i,j,k,l,m=this;if(e=e||n,!g&&s(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,c,e,f,!0));switch(a.type){case qf.Program:d(a.body,function(b,c){m.recurse(b.expression,void 0,void 0,function(a){i=a}),c!==a.body.length-1?m.current().body.push(i,";"):m.return_(i)});break;case qf.Literal:k=this.escape(a.value),this.assign(b,k),e(k);break;case qf.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){i=a}),k=a.operator+"("+this.ifDefined(i,0)+")",this.assign(b,k),e(k);break;case qf.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){h=a}),this.recurse(a.right,void 0,void 0,function(a){i=a}),k="+"===a.operator?this.plus(h,i):"-"===a.operator?this.ifDefined(h,0)+a.operator+this.ifDefined(i,0):"("+h+")"+a.operator+"("+i+")",this.assign(b,k),e(k);break;case qf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case qf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case qf.Identifier:b=b||this.nextId(),c&&(c.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),c.computed=!1,c.name=a.name),ac(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){f&&1!==f&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||qc(a.name))&&m.addEnsureSafeObject(b), e(b);break;case qf.MemberExpression:h=c&&(c.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,h,void 0,function(){m.if_(m.notNull(h),function(){f&&1!==f&&m.addEnsureSafeAssignContext(h),a.computed?(i=m.nextId(),m.recurse(a.property,i),m.getStringValue(i),m.addEnsureSafeMemberName(i),f&&1!==f&&m.if_(m.not(m.computedMember(h,i)),m.lazyAssign(m.computedMember(h,i),"{}")),k=m.ensureSafeObject(m.computedMember(h,i)),m.assign(b,k),c&&(c.computed=!0,c.name=i)):(ac(a.property.name),f&&1!==f&&m.if_(m.not(m.nonComputedMember(h,a.property.name)),m.lazyAssign(m.nonComputedMember(h,a.property.name),"{}")),k=m.nonComputedMember(h,a.property.name),(m.state.expensiveChecks||qc(a.property.name))&&(k=m.ensureSafeObject(k)),m.assign(b,k),c&&(c.computed=!1,c.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!f);break;case qf.CallExpression:b=b||this.nextId(),a.filter?(i=m.filter(a.callee.name),j=[],d(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),j.push(b)}),k=i+"("+j.join(",")+")",m.assign(b,k),e(b)):(i=m.nextId(),h={},j=[],m.recurse(a.callee,i,h,function(){m.if_(m.notNull(i),function(){m.addEnsureSafeFunction(i),d(a.arguments,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(m.ensureSafeObject(a))})}),h.name?(m.state.expensiveChecks||m.addEnsureSafeObject(h.context),k=m.member(h.context,h.name,h.computed)+"("+j.join(",")+")"):k=i+"("+j.join(",")+")",k=m.ensureSafeObject(k),m.assign(b,k)},function(){m.assign(b,"undefined")}),e(b)}));break;case qf.AssignmentExpression:if(i=this.nextId(),h={},!kc(a.left))throw jf("lval","Trying to assign a value to a non l-value");this.recurse(a.left,void 0,h,function(){m.if_(m.notNull(h.context),function(){m.recurse(a.right,i),m.addEnsureSafeObject(m.member(h.context,h.name,h.computed)),m.addEnsureSafeAssignContext(h.context),k=m.member(h.context,h.name,h.computed)+a.operator+i,m.assign(b,k),e(b||k)})},1);break;case qf.ArrayExpression:j=[],d(a.elements,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(a)})}),k="["+j.join(",")+"]",this.assign(b,k),e(k);break;case qf.ObjectExpression:j=[],l=!1,d(a.properties,function(a){a.computed&&(l=!0)}),l?(b=b||this.nextId(),this.assign(b,"{}"),d(a.properties,function(a){a.computed?(h=m.nextId(),m.recurse(a.key,h)):h=a.key.type===qf.Identifier?a.key.name:""+a.key.value,i=m.nextId(),m.recurse(a.value,i),m.assign(m.member(b,h,a.computed),i)})):(d(a.properties,function(b){m.recurse(b.value,a.constant?void 0:m.nextId(),void 0,function(a){j.push(m.escape(b.key.type===qf.Identifier?b.key.name:""+b.key.value)+":"+a)})}),k="{"+j.join(",")+"}",this.assign(b,k)),e(b||k);break;case qf.ThisExpression:this.assign(b,"s"),e("s");break;case qf.LocalsExpression:this.assign(b,"l"),e("l");break;case qf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var c=/[$_a-zA-Z][$_a-zA-Z0-9]*/,d=/[^$_a-zA-Z0-9]/g;return c.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(v(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(w(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw jf("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},pc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,ic(e,c.$filter);var f,g;(f=lc(e))&&(g=this.recurse(f));var h,i=jc(e.body);i&&(h=[],d(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];d(e.body,function(a){j.push(c.recurse(a.expression))});var k=0===e.body.length?n:1===e.body.length?j[0]:function(a,b){var c;return d(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=mc(e),k.constant=nc(e),k},recurse:function(a,b,c){var e,f,g,h=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case qf.Literal:return this.value(a.value,b);case qf.UnaryExpression:return f=this.recurse(a.argument),this["unary"+a.operator](f,b);case qf.BinaryExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case qf.LogicalExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case qf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case qf.Identifier:return ac(a.name,h.expression),h.identifier(a.name,h.expensiveChecks||qc(a.name),b,c,h.expression);case qf.MemberExpression:return e=this.recurse(a.object,!1,!!c),a.computed||(ac(a.property.name,h.expression),f=a.property.name),a.computed&&(f=this.recurse(a.property)),a.computed?this.computedMember(e,f,b,c,h.expression):this.nonComputedMember(e,f,h.expensiveChecks,b,c,h.expression);case qf.CallExpression:return g=[],d(a.arguments,function(a){g.push(h.recurse(a))}),a.filter&&(f=this.$filter(a.callee.name)),a.filter||(f=this.recurse(a.callee,!0)),a.filter?function(a,c,d,e){for(var h=[],i=0;i":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,c,d,e){return function(f,g,h,i){var j=g&&a in g?g:f;d&&1!==d&&j&&!j[a]&&(j[a]={});var k=j?j[a]:void 0;return b&&cc(k,e),c?{context:j,name:a,value:k}:k}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=bc(j),ac(j,e),d&&1!==d&&(ec(l),l&&!l[j]&&(l[j]={})),k=l[j],cc(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,c,d,e,f){return function(g,h,i,j){var k=a(g,h,i,j);e&&1!==e&&(ec(k),k&&!k[b]&&(k[b]={}));var l=null!=k?k[b]:void 0;return(c||qc(b))&&cc(l,f),d?{context:k,name:b,value:l}:l}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var rf=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new qf(a,c),this.astCompiler=c.csp?new pc(this.ast,b):new oc(this.ast,b)};rf.prototype={constructor:rf,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var sf=Object.prototype.valueOf,tf=b("$sce"),uf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},vf=b("$compile"),wf=a.document.createElement("a"),xf=Hc(a.location.href);Kc.$inject=["$document"],Mc.$inject=["$provide"];var yf=22,zf=".",Af="0";Rc.$inject=["$locale"],Sc.$inject=["$locale"];var Bf={yyyy:Xc("FullYear",4,0,!1,!0),yy:Xc("FullYear",2,0,!0,!0),y:Xc("FullYear",1,0,!1,!0),MMMM:Yc("Month"),MMM:Yc("Month",!0),MM:Xc("Month",2,1),M:Xc("Month",1,1),LLLL:Yc("Month",!1,!0),dd:Xc("Date",2),d:Xc("Date",1),HH:Xc("Hours",2),H:Xc("Hours",1),hh:Xc("Hours",2,-12),h:Xc("Hours",1,-12),mm:Xc("Minutes",2),m:Xc("Minutes",1),ss:Xc("Seconds",2),s:Xc("Seconds",1),sss:Xc("Milliseconds",3),EEEE:Yc("Day"),EEE:Yc("Day",!0),a:bd,Z:Zc,ww:ad(2),w:ad(1),G:cd,GG:cd,GGG:cd,GGGG:dd},Cf=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Df=/^\-?\d+$/;ed.$inject=["$locale"];var Ef=p(Fd),Ff=p(Gd);hd.$inject=["$parse"];var Gf=p({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Qd.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),Hf={};d(ze,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=qb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),Hf[d]=function(){return{restrict:"A",priority:100,link:e}}}}),d(Be,function(a,b){Hf[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Cd);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),d(["src","srcset","href"],function(a){var b=qb("ng-"+a);Hf[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Qd.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Jd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var If={$addControl:n,$$renameControl:jd,$removeControl:n,$setValidity:n,$setDirty:n,$setPristine:n,$setSubmitted:n},Jf="ng-submitted";kd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Kf=function(a){return["$timeout","$parse",function(b,c){function d(a){return""===a?c('this[""]').assign:c(a).assign||n}var e={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:kd,compile:function(c,e){c.addClass(sg).addClass(qg);var f=e.name?"name":a&&e.ngForm?"ngForm":!1;return{pre:function(a,c,e,g){var h=g[0];if(!("action"in e)){var i=function(b){a.$apply(function(){h.$commitViewValue(),h.$setSubmitted()}),b.preventDefault()};me(c[0],"submit",i),c.on("$destroy",function(){b(function(){ne(c[0],"submit",i)},0,!1)})}var k=g[1]||h.$$parentForm;k.$addControl(h);var l=f?d(h.$name):n;f&&(l(a,h),e.$observe(f,function(b){h.$name!==b&&(l(a,void 0),h.$$parentForm.$$renameControl(h,b),(l=d(h.$name))(a,h))})),c.on("$destroy",function(){h.$$parentForm.$removeControl(h),l(a,void 0),j(h,If)})}}}};return e}]},Lf=Kf(),Mf=Kf(!0),Nf=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Of=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Pf=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Qf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Rf=/^(\d{4,})-(\d{2})-(\d{2})$/,Sf=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Tf=/^(\d{4,})-W(\d\d)$/,Uf=/^(\d{4,})-(\d\d)$/,Vf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Wf="keydown wheel mousedown",Xf=pa();d("date,datetime-local,month,time,week".split(","),function(a){Xf[a]=!0});var Yf={text:md,date:qd("date",Rf,pd(Rf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":qd("datetimelocal",Sf,pd(Sf,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:qd("time",Vf,pd(Vf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:qd("week",Tf,od,"yyyy-Www"),month:qd("month",Uf,pd(Uf,["yyyy","MM"]),"yyyy-MM"),number:sd,url:td,email:ud,radio:vd,checkbox:xd,hidden:n,button:n,submit:n,reset:n,file:n},Zf=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Yf[Fd(g.type)]||Yf.text)(e,f,g,h[0],b,a,c,d)}}}}],$f=/^(true|false|\d+)$/,_f=function(){return{restrict:"A",priority:100,compile:function(a,b){return $f.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},ag=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=r(a)?"":a})}}}}],bg=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=r(a)?"":a})}}}}],cg=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){var c=f(b);d.html(a.getTrustedHtml(c)||"")})}}}}],dg=p({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),eg=yd("",!0),fg=yd("Odd",0),gg=yd("Even",1),hg=id({compile:function(a,b){b.$set("ngCloak",void 0),a.removeClass("ng-cloak")}}),ig=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],jg={},kg={blur:!0,focus:!0};d("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=qb("ng-"+a);jg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};kg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var lg=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.$$createComment("end ngIf",e.ngIf),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=oa(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],mg=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Td.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!s(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],ng=["$compile",function(b){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Qd.call(d[0]).match(/SVG/)?(d.empty(),void b(Aa(f.template,a.document).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void b(d.contents())(c))}}}],og=id({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),pg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,c,e){var f=b.attr(c.$attr.ngList)||", ",g="false"!==c.ngTrim,h=g?Xd(f):f,i=function(a){if(!r(a)){var b=[];return a&&d(a.split(h),function(a){a&&b.push(g?Xd(a):a)}),b}};e.$parsers.push(i),e.$formatters.push(function(a){return Vd(a)?a.join(f):void 0}),e.$isEmpty=function(a){return!a||!a.length}}}},qg="ng-valid",rg="ng-invalid",sg="ng-pristine",tg="ng-dirty",ug="ng-untouched",vg="ng-touched",wg="ng-pending",xg="ng-empty",yg="ng-not-empty",zg=b("ngModel"),Ag=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,c,e,f,g,h,i,j,k){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=k(c.name||"",!1)(a),this.$$parentForm=If;var l,m=f(c.ngModel),o=m.assign,p=m,q=o,t=null,u=this;this.$$setOptions=function(a){if(u.$options=a,a&&a.getterSetter){var b=f(c.ngModel+"()"),d=f(c.ngModel+"($$$p)");p=function(a){var c=m(a);return y(c)&&(c=b(a)),c},q=function(a,b){y(m(a))?d(a,{$$$p:b}):o(a,b)}}else if(!m.assign)throw zg("nonassign","Expression '{0}' is non-assignable. Element: {1}",c.ngModel,Z(e))},this.$render=n,this.$isEmpty=function(a){return r(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){u.$isEmpty(a)?(g.removeClass(e,yg),g.addClass(e,xg)):(g.removeClass(e,xg),g.addClass(e,yg))};var v=0;zd({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:g}),this.$setPristine=function(){u.$dirty=!1,u.$pristine=!0,g.removeClass(e,tg),g.addClass(e,sg)},this.$setDirty=function(){u.$dirty=!0,u.$pristine=!1,g.removeClass(e,sg),g.addClass(e,tg),u.$$parentForm.$setDirty()},this.$setUntouched=function(){u.$touched=!1,u.$untouched=!0,g.setClass(e,ug,vg)},this.$setTouched=function(){u.$touched=!0,u.$untouched=!1,g.setClass(e,vg,ug)},this.$rollbackViewValue=function(){h.cancel(t),u.$viewValue=u.$$lastCommittedViewValue,u.$render()},this.$validate=function(){if(!w(u.$modelValue)||!isNaN(u.$modelValue)){var a=u.$$lastCommittedViewValue,b=u.$$rawModelValue,c=u.$valid,d=u.$modelValue,e=u.$options&&u.$options.allowInvalid;u.$$runValidators(b,a,function(a){e||c===a||(u.$modelValue=a?b:void 0,u.$modelValue!==d&&u.$$writeModelToScope())})}},this.$$runValidators=function(a,b,c){function e(){var a=u.$$parserName||"parse";return r(l)?(h(a,null),!0):(l||(d(u.$validators,function(a,b){h(b,null)}),d(u.$asyncValidators,function(a,b){h(b,null)})),h(a,l),l)}function f(){var c=!0;return d(u.$validators,function(d,e){var f=d(a,b);c=c&&f,h(e,f)}),c?!0:(d(u.$asyncValidators,function(a,b){h(b,null)}),!1)}function g(){var c=[],e=!0;d(u.$asyncValidators,function(d,f){var g=d(a,b);if(!G(g))throw zg("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",g);h(f,void 0),c.push(g.then(function(){h(f,!0)},function(){e=!1,h(f,!1)}))}),c.length?j.all(c).then(function(){i(e)},n):i(!0)}function h(a,b){k===v&&u.$setValidity(a,b)}function i(a){k===v&&c(a)}v++;var k=v;return e()&&f()?void g():void i(!1)},this.$commitViewValue=function(){var a=u.$viewValue;h.cancel(t),(u.$$lastCommittedViewValue!==a||""===a&&u.$$hasNativeValidators)&&(u.$$updateEmptyClasses(a),u.$$lastCommittedViewValue=a,u.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){u.$modelValue!==f&&u.$$writeModelToScope()}var c=u.$$lastCommittedViewValue,d=c;if(l=r(d)?void 0:!0)for(var e=0;ef;f++){var i=a===c?f:c[f],j=a[i],k=x(j,i),l=q(j,k);if(b.push(l),h[2]||h[1]){var m=s(d,k);b.push(m)}if(h[4]){var n=u(d,k);b.push(n)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],f=g(c),h=f.length,i=0;h>i;i++){var j=c===f?i:f[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new e(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Td.copy(a.viewValue):a.viewValue}}}}}function h(a,c,f,h){function k(a,b){var c=i.cloneNode(!1);b.appendChild(c),l(a,c)}function l(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function m(){var a=x&&o.readValue();if(x)for(var b=x.items.length-1;b>=0;b--){var d=x.items[b];Ra(d.group?d.element.parentNode:d.element)}x=y.getOptions();var e={};if(v&&c.prepend(n),x.items.forEach(function(a){var b;s(a.group)?(b=e[a.group],b||(b=j.cloneNode(!1),z.appendChild(b),b.label=a.group,e[a.group]=b),k(a,b)):k(a,z)}),c[0].appendChild(z),p.$render(),!p.$isEmpty(a)){var f=o.readValue(),g=y.trackBy||q;(g?P(a,f):a===f)||(p.$setViewValue(f),p.$render())}}for(var n,o=h[0],p=h[1],q=f.multiple,r=0,t=c.children(),u=t.length;u>r;r++)if(""===t[r].value){n=t.eq(r);break}var v=!!n,w=Kd(i.cloneNode(!1));w.val("?");var x,y=g(f.ngOptions,c,a),z=e[0].createDocumentFragment(),A=function(){v||c.prepend(n),c.val(""),n.prop("selected",!0),n.attr("selected",!0)},B=function(){v||n.remove()},C=function(){c.prepend(w),c.val("?"),w.prop("selected",!0),w.attr("selected",!0)},D=function(){w.remove()};q?(p.$isEmpty=function(a){return!a||0===a.length},o.writeValue=function(a){x.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=x.getOptionFromViewValue(a);b&&(b.element.selected=!0)})},o.readValue=function(){var a=c.val()||[],b=[];return d(a,function(a){var c=x.selectValueMap[a];c&&!c.disabled&&b.push(x.getViewValueFromOption(c))}),b},y.trackBy&&a.$watchCollection(function(){return Vd(p.$viewValue)?p.$viewValue.map(function(a){return y.getTrackByValue(a)}):void 0},function(){p.$render()})):(o.writeValue=function(a){var b=x.getOptionFromViewValue(a);b?(c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(D(),A()):(B(),C())},o.readValue=function(){var a=x.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),x.getViewValueFromOption(a)):null},y.trackBy&&a.$watch(function(){return y.getTrackByValue(p.$viewValue)},function(){p.$render()})),v?(n.remove(),b(n)(a),n.removeClass("ng-scope")):n=Kd(i.cloneNode(!1)),c.empty(),m(),a.$watchCollection(y.getWatchables,m)}var i=a.document.createElement("option"),j=a.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=n},post:h}}}],Ig=["$locale","$interpolate","$log",function(a,b,c){var e=/{}/g,f=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),o=i.offset||0,p=g.$eval(m)||{},q={},s=b.startSymbol(),t=b.endSymbol(),u=s+l+"-"+o+t,v=Td.noop;d(i,function(a,b){var c=f.exec(b);if(c){var d=(c[1]?"-":"")+Fd(c[2]);p[d]=h.attr(i.$attr[b])}}),d(p,function(a,c){q[c]=b(a.replace(e,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in p||(d=a.pluralCat(d-o)),d!==k&&!(e&&w(k)&&isNaN(k))){v();var f=q[d];r(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=n,j()):v=g.$watch(f,j),k=d}})}}}],Jg=["$parse","$animate","$compile",function(a,e,f){var g="$$NG_REMOVED",h=b("ngRepeat"),i=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},j=function(a){return a.clone[0]},k=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(b,l){var m=l.ngRepeat,n=f.$$createComment("end ngRepeat",m),o=m.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!o)throw h("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",m);var p=o[1],q=o[2],r=o[3],s=o[4];if(o=p.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!o)throw h("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",p);var t=o[3]||o[1],u=o[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw h("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",r);var v,w,x,y,z={$id:Za};return s?v=a(s):(x=function(a,b){return Za(b)},y=function(a){return a}),function(a,b,f,l,o){v&&(w=function(b,c,d){return u&&(z[u]=b),z[t]=c,z.$index=d,v(a,z)});var p=pa();a.$watchCollection(q,function(f){var l,q,s,v,z,A,B,C,D,E,F,G,H=b[0],I=pa();if(r&&(a[r]=f),c(f))D=f,C=w||x;else{C=w||y,D=[];for(var J in f)Ed.call(f,J)&&"$"!==J.charAt(0)&&D.push(J)}for(v=D.length,F=new Array(v),l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],B=C(z,A,l),p[B])E=p[B],delete p[B],I[B]=E,F[l]=E;else{if(I[B])throw d(F,function(a){a&&a.scope&&(p[a.id]=a)}),h("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",m,B,A); F[l]={id:B,scope:void 0,clone:void 0},I[B]=!0}for(var K in p){if(E=p[K],G=oa(E.clone),e.leave(G),G[0].parentNode)for(l=0,q=G.length;q>l;l++)G[l][g]=!0;E.scope.$destroy()}for(l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],E=F[l],E.scope){s=H;do s=s.nextSibling;while(s&&s[g]);j(E)!=s&&e.move(oa(E.clone),null,H),H=k(E),i(E.scope,l,t,A,u,z,v)}else o(function(a,b){E.scope=b;var c=n.cloneNode(!1);a[a.length++]=c,e.enter(a,null,H),H=c,E.clone=a,I[E.id]=E,i(E.scope,l,t,A,u,z,v)});p=I})}}}}],Kg="ng-hide",Lg="ng-hide-animate",Mg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Kg,{tempClasses:Lg})})}}}],Ng=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Kg,{tempClasses:Lg})})}}}],Og=id(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&d(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Pg=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,e,f,g){var h=f.ngSwitch||f.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var e,f;for(e=0,f=k.length;f>e;++e)a.cancel(k[e]);for(k.length=0,e=0,f=l.length;f>e;++e){var h=oa(j[e].clone);l[e].$destroy();var n=k[e]=a.leave(h);n.then(m(k,e))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&d(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Qg=id({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Rg=id({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Sg=b("ngTransclude"),Tg=id({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Sg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Z(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Ug=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Vg={$setViewValue:n,$render:n},Wg=["$element","$scope",function(b,c){var d=this,e=new $a;d.ngModelCtrl=Vg,d.unknownOption=Kd(a.document.createElement("option")),d.renderUnknownOption=function(a){var c="? "+Za(a)+" ?";d.unknownOption.val(c),b.prepend(d.unknownOption),b.val(c)},c.$on("$destroy",function(){d.renderUnknownOption=n}),d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()},d.readValue=function(){return d.removeUnknownOption(),b.val()},d.writeValue=function(a){d.hasOption(a)?(d.removeUnknownOption(),b.val(a),""===a&&d.emptyOption.prop("selected",!0)):null==a&&d.emptyOption?(d.removeUnknownOption(),b.val("")):d.renderUnknownOption(a)},d.addOption=function(a,b){if(b[0].nodeType!==ge){ma(a,'"option value"'),""===a&&(d.emptyOption=b);var c=e.get(a)||0;e.put(a,c+1),d.ngModelCtrl.$render(),Bd(b)}},d.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(d.emptyOption=void 0)):e.put(a,b-1))},d.hasOption=function(a){return!!e.get(a)},d.registerOption=function(a,b,c,e,f){if(e){var g;c.$observe("value",function(a){s(g)&&d.removeOption(g),g=a,d.addOption(a,b)})}else f?a.$watch(f,function(a,e){c.$set("value",a),e!==a&&d.removeOption(e),d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value),d.ngModelCtrl.$render()})}}],Xg=function(){function a(a,b,c,e){var f=e[1];if(f){var g=e[0];if(g.ngModelCtrl=f,b.on("change",function(){a.$apply(function(){f.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return d(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new $a(a);d(b.find("option"),function(a){a.selected=s(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==f.$viewValue||P(h,f.$viewValue)||(h=O(f.$viewValue),f.$render()),i=f.$viewValue}),f.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Wg,priority:1,link:{pre:a,post:b}}},Yg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(s(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],Zg=p({restrict:"E",terminal:!1}),$g=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},_g=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,g=d.ngPattern||d.pattern;d.$observe("pattern",function(a){if(v(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw b("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",g,a,Z(c));f=a||void 0,e.$validate()}),e.$validators.pattern=function(a,b){return e.$isEmpty(b)||r(f)||f.test(b)}}}}},ah=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=l(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},bh=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=l(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void(a.console&&console.log("WARNING: Tried to load angular more than once.")):(ja(),ta(Td),Td.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function c(a,c){var d=c;void 0===d&&(d=Math.min(b(a),3));var e=Math.pow(10,d),f=(a*e|0)%e;return{v:d,f:f}}var d={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var e=0|a,f=c(a,b);return 1==e&&0==f.v?d.ONE:d.OTHER}})}]),void Kd(a.document).ready(function(){ea(a.document,fa)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b){"use strict";function c(a,b,c){if(!a)throw pa("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function d(a,b){return a||b?a?b?(Q(a)&&(a=a.join(" ")),Q(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function e(a){var b={};return a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from),b}function f(a,b,c){var d="";return a=Q(a)?a:a&&R(a)&&a.length?a.split(/\s+/):[],P(a,function(a,e){a&&a.length>0&&(d+=e>0?" ":"",d+=c?b+a:a+b)}),d}function g(a,b){var c=a.indexOf(b);b>=0&&a.splice(c,1)}function h(a){if(a instanceof O)switch(a.length){case 0:return a;case 1:if(a[0].nodeType===X)return a;break;default:return O(i(a))}return a.nodeType===X?O(a):void 0}function i(a){if(!a[0])return a;for(var b=0;b=0)&&(c=C(c)),0===c&&(c=null),d[b]=c}}),d}function C(a){var b=0,c=a.split(/\s*,\s*/);return P(c,function(a){"s"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),a=parseFloat(a)||0,b=b?Math.max(a,b):a}),b}function D(a){return 0===a||null!=a}function E(a,b){var c=H,d=a+"s";return b?c+=ea:d+=" linear all",[c,d]}function F(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},count:function(b){var c=a[b];return c?c.total:0},get:function(b){var c=a[b];return c&&c.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function G(a,b,c){P(c,function(c){a[c]=U(a[c])?a[c]:b.style.getPropertyValue(c)})}var H,I,J,K,L=b.noop,M=b.copy,N=b.extend,O=b.element,P=b.forEach,Q=b.isArray,R=b.isString,S=b.isObject,T=b.isUndefined,U=b.isDefined,V=b.isFunction,W=b.isElement,X=1,Y="-add",Z="-remove",$="ng-",_="-active",aa="-prepare",ba="ng-animate",ca="$$ngAnimateChildren",da="";T(a.ontransitionend)&&U(a.onwebkittransitionend)?(da="-webkit-",H="WebkitTransition",I="webkitTransitionEnd transitionend"):(H="transition",I="transitionend"),T(a.onanimationend)&&U(a.onwebkitanimationend)?(da="-webkit-",J="WebkitAnimation",K="webkitAnimationEnd animationend"):(J="animation",K="animationend");var ea="Duration",fa="Property",ga="Delay",ha="TimingFunction",ia="IterationCount",ja="PlayState",ka=9999,la=J+ga,ma=J+ea,na=H+ga,oa=H+ea,pa=b.$$minErr("ng"),qa=["$$rAF",function(a){function b(a){d=d.concat(a),c()}function c(){if(d.length){for(var b=d.shift(),f=0;f0&&(j=c.get(h),!j)){var k=f(g,"-stagger");d.addClass(e,k),j=B(a,e,i),j.animationDuration=Math.max(j.animationDuration,0),j.transitionDuration=Math.max(j.transitionDuration,0),d.removeClass(e,k),c.put(h,j)}return j||{}}function C(a){R.push(a),q.waitUntilQuiet(function(){b.flush(),c.flush();for(var a=j(),d=0;d=da&&d>=ea&&(X=!0,q())}function R(){function b(){if(!V){if(u(!1),P(ja,function(a){var b=a[0],c=a[1];U.style[b]=c}),N(a,S),d.addClass(a,za),Na.recalculateTimingStyles){if(ya=U.className+" "+wa,Ca=t(U,ya),La=F(U,ya,Ca),Ma=La.maxDelay,ca=Math.max(Ma,0),ea=La.maxDuration,0===ea)return void q();Na.hasTransitions=La.transitionDuration>0,Na.hasAnimations=La.animationDuration>0}if(Na.applyAnimationDelay&&(Ma="boolean"!=typeof S.delay&&D(S.delay)?parseFloat(S.delay):Ma,ca=Math.max(Ma,0),La.animationDelay=Ma,Oa=A(Ma,!0),ja.push(Oa),U.style[Oa[0]]=Oa[1]),da=ca*ta,ga=ea*ta,S.easing){var b,e=S.easing;Na.hasTransitions&&(b=H+ha,ja.push([b,e]),U.style[b]=e),Na.hasAnimations&&(b=J+ha,ja.push([b,e]),U.style[b]=e)}La.transitionDuration&&na.push(I),La.animationDuration&&na.push(K),ia=Date.now();var f=da+va*ga,g=ia+f,h=a.data(sa)||[],j=!0;if(h.length){var k=h[0];j=g>k.expectedEndTime,j?i.cancel(k.timer):h.push(q)}if(j){var l=i(c,f,!1);h[0]={timer:l,expectedEndTime:g},h.push(q),a.data(sa,h)}na.length&&a.on(na.join(" "),O),S.to&&(S.cleanupStyles&&G(T,U,Object.keys(S.to)),p(a,S))}}function c(){var b=a.data(sa);if(b){for(var c=1;c0&&(La.transitionDuration&&0===Da.transitionDuration||La.animationDuration&&0===Da.animationDuration)&&Math.max(Da.animationDelay,Da.transitionDelay);f?i(b,Math.floor(f*Ja*ta),!1):b(),ba.resume=function(){e(!0)},ba.pause=function(){e(!1)}}}var S=c||{};S.$$prepared||(S=m(M(S)));var T={},U=s(a);if(!U||!U.parentNode||!r.enabled())return B();var V,W,X,aa,ba,ca,da,ea,ga,ia,ja=[],la=a.attr("class"),ma=e(S),na=[];if(0===S.duration||!k.animations&&!k.transitions)return B();var oa=S.event&&Q(S.event)?S.event.join(" "):S.event,pa=oa&&S.structural,qa="",ra="";pa?qa=f(oa,$,!0):oa&&(qa=oa),S.addClass&&(ra+=f(S.addClass,Y)),S.removeClass&&(ra.length&&(ra+=" "),ra+=f(S.removeClass,Z)),S.applyClassesEarly&&ra.length&&N(a,S);var wa=[qa,ra].join(" ").trim(),ya=la+" "+wa,za=f(wa,_),Aa=ma.to&&Object.keys(ma.to).length>0,Ba=(S.keyframeStyle||"").length>0;if(!Ba&&!Aa&&!wa)return B();var Ca,Da;if(S.stagger>0){var Ea=parseFloat(S.stagger);Da={transitionDelay:Ea,animationDelay:Ea,transitionDuration:0,animationDuration:0}}else Ca=t(U,ya),Da=y(U,wa,Ca,xa);S.$$skipPreparationClasses||d.addClass(a,wa);var Fa;if(S.transitionStyle){var Ga=[H,S.transitionStyle];x(U,Ga),ja.push(Ga)}if(S.duration>=0){Fa=U.style[H].length>0;var Ha=E(S.duration,Fa);x(U,Ha),ja.push(Ha)}if(S.keyframeStyle){var Ia=[J,S.keyframeStyle];x(U,Ia),ja.push(Ia)}var Ja=Da?S.staggerIndex>=0?S.staggerIndex:b.count(Ca):0,Ka=0===Ja;Ka&&!S.skipBlocking&&v(U,ka);var La=F(U,ya,Ca),Ma=La.maxDelay;ca=Math.max(Ma,0),ea=La.maxDuration;var Na={};if(Na.hasTransitions=La.transitionDuration>0,Na.hasAnimations=La.animationDuration>0,Na.hasTransitionAll=Na.hasTransitions&&"all"==La.transitionProperty,Na.applyTransitionDuration=Aa&&(Na.hasTransitions&&!Na.hasTransitionAll||Na.hasAnimations&&!Na.hasTransitions),Na.applyAnimationDuration=S.duration&&Na.hasAnimations,Na.applyTransitionDelay=D(S.delay)&&(Na.applyTransitionDuration||Na.hasTransitions),Na.applyAnimationDelay=D(S.delay)&&Na.hasAnimations,Na.recalculateTimingStyles=ra.length>0,(Na.applyTransitionDuration||Na.applyAnimationDuration)&&(ea=S.duration?parseFloat(S.duration):ea,Na.applyTransitionDuration&&(Na.hasTransitions=!0,La.transitionDuration=ea,Fa=U.style[H+fa].length>0,ja.push(E(ea,Fa))),Na.applyAnimationDuration&&(Na.hasAnimations=!0,La.animationDuration=ea,ja.push(z(ea)))),0===ea&&!Na.recalculateTimingStyles)return B();if(null!=S.delay){var Oa;"boolean"!=typeof S.delay&&(Oa=parseFloat(S.delay),ca=Math.max(Oa,0)),Na.applyTransitionDelay&&ja.push(A(Oa)),Na.applyAnimationDelay&&ja.push(A(Oa,!0))}return null==S.duration&&La.transitionDuration>0&&(Na.recalculateTimingStyles=Na.recalculateTimingStyles||Ka),da=ca*ta,ga=ea*ta,S.skipBlocking||(Na.blockTransition=La.transitionDuration>0,Na.blockKeyframeAnimation=La.animationDuration>0&&Da.animationDelay>0&&0===Da.animationDuration),S.from&&(S.cleanupStyles&&G(T,U,Object.keys(S.from)),o(a,S)),Na.blockTransition||Na.blockKeyframeAnimation?u(ea):S.skipBlocking||v(U,!1),{$$willAnimate:!0,end:j,start:function(){return V?void 0:(ba={end:j,cancel:l,resume:null,pause:null},aa=new h(ba),C(R),aa)}}}}]}],za=["$$animationProvider",function(a){function b(a){return a.parentNode&&11===a.parentNode.nodeType}a.drivers.push("$$animateCssDriver");var c="ng-animate-shim",d="ng-anchor",e="ng-anchor-out",f="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,g,h,i,j,k,m){function n(a){return a.replace(/\bng-\S+\b/g,"")}function o(a,b){return R(a)&&(a=a.split(" ")),R(b)&&(b=b.split(" ")),a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function p(b,g,i){function j(a){var b={},c=s(a).getBoundingClientRect();return P(["width","height","top","left"],function(a){var d=c[a];switch(a){case"top":d+=t.scrollTop;break;case"left":d+=t.scrollLeft}b[a]=Math.floor(d)+"px"}),b}function k(){var b=a(q,{addClass:e,delay:!0,from:j(g)});return b.$$willAnimate?b:null}function l(a){return a.attr("class")||""}function m(){var b=n(l(i)),c=o(b,r),d=o(r,b),g=a(q,{to:j(i),addClass:f+" "+c,removeClass:e+" "+d,delay:!0});return g.$$willAnimate?g:null}function p(){q.remove(),g.removeClass(c),i.removeClass(c)}var q=O(s(g).cloneNode(!0)),r=n(l(q));g.addClass(c),i.addClass(c),q.addClass(d),v.append(q);var u,w=k();if(!w&&(u=m(),!u))return p();var x=w||u;return{start:function(){function a(){c&&c.end()}var b,c=x.start();return c.done(function(){return c=null,!u&&(u=m())?(c=u.start(),c.done(function(){c=null,p(),b.complete()}),c):(p(),void b.complete())}),b=new h({end:a,cancel:a})}}}function q(a,b,c,d){var e=r(a,L),f=r(b,L),g=[];return P(d,function(a){var b=a.out,d=a["in"],e=p(c,b,d);e&&g.push(e)}),e||f||0!==g.length?{start:function(){function a(){P(b,function(a){a.end()})}var b=[];e&&b.push(e.start()),f&&b.push(f.start()),P(g,function(a){b.push(a.start())});var c=new h({end:a,cancel:a});return h.all(b,function(a){c.complete(a)}),c}}:void 0}function r(b){var c=b.element,d=b.options||{};b.structural&&(d.event=b.event,d.structural=!0,d.applyClassesEarly=!0,"leave"===b.event&&(d.onDone=d.domOperation)),d.preparationClasses&&(d.event=y(d.event,d.preparationClasses));var e=a(c,d);return e.$$willAnimate?e:null}if(!j.animations&&!j.transitions)return L;var t=m[0].body,u=s(i),v=O(b(u)||t.contains(u)?u:t);l(k);return function(a){return a.from&&a.to?q(a.from,a.to,a.classes,a.anchors):r(a)}}]}],Aa=["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function e(c){c=Q(c)?c:c.split(" ");for(var d=[],e={},f=0;f0,d=(a.removeClass||"").length>0;return b?c&&d:c||d}var k=1,o=2,p=" ",r=this.rules={skip:[],cancel:[],join:[]};r.join.push(function(a,b,c){return!b.structural&&j(b)}),r.skip.push(function(a,b,c){return!b.structural&&!j(b)}),r.skip.push(function(a,b,c){return"leave"==c.event&&b.structural}),r.skip.push(function(a,b,c){return c.structural&&c.state===o&&!b.structural}),r.cancel.push(function(a,b,c){return c.structural&&b.structural}),r.cancel.push(function(a,b,c){return c.state===o&&b.structural}),r.cancel.push(function(a,b,c){if(c.structural)return!1;var d=b.addClass,e=b.removeClass,g=c.addClass,h=c.removeClass;return T(d)&&T(e)||T(g)&&T(h)?!1:f(d,h)||f(e,g)}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(e,f,p,r,v,w,x,y,z,A){function B(){var a=!1;return function(b){a?b():f.$$postDigest(function(){a=!0,b()})}}function C(a,b){return q(a,b,{})}function D(a,b,c){var d=s(b),e=s(a),f=[],g=_[c];return g&&P(g,function(a){ea.call(a.node,d)?f.push(a.callback):"leave"===c&&ea.call(a.node,e)&&f.push(a.callback)}),f}function E(a,b,c){var d=i(b);return a.filter(function(a){var b=a.node===d&&(!c||a.callback===c);return!b})}function F(a,b){"close"!==a||b[0].parentNode||fa.off(b)}function G(a,b,c){function d(b,c,d,f){z(function(){var b=D(p,a,c);b.length?e(function(){P(b,function(b){b(a,d,f)}),F(d,a)}):F(d,a)}),b.progress(c,d,f)}function i(b){u(a,v),da(a,v),n(a,v),v.domOperation(),y.complete(!b)}var l,p,v=M(c);a=h(a),a&&(l=s(a),p=a.parent()),v=m(v);var y=new x,z=B();if(Q(v.addClass)&&(v.addClass=v.addClass.join(" ")),v.addClass&&!R(v.addClass)&&(v.addClass=null),Q(v.removeClass)&&(v.removeClass=v.removeClass.join(" ")),v.removeClass&&!R(v.removeClass)&&(v.removeClass=null),v.from&&!S(v.from)&&(v.from=null),v.to&&!S(v.to)&&(v.to=null),!l)return i(),y;var A=[l.className,v.addClass,v.removeClass].join(" ");if(!ba(A))return i(),y;var E=["enter","move","leave"].indexOf(b)>=0,G=r[0].hidden,J=!Z||G||Y.get(l),N=!J&&V.get(l)||{},O=!!N.state;if(J||O&&N.state==k||(J=!K(a,p,b)),J)return G&&d(y,b,"start"),i(),G&&d(y,b,"close"),y;E&&H(a);var T={structural:E,element:a,event:b,addClass:v.addClass,removeClass:v.removeClass,close:i,options:v,runner:y};if(O){var U=g("skip",a,T,N);if(U)return N.state===o?(i(),y):(q(a,N,T),N.runner);var W=g("cancel",a,T,N);if(W)if(N.state===o)N.runner.end();else{if(!N.structural)return q(a,N,T),N.runner;N.close()}else{var X=g("join",a,T,N);if(X){if(N.state!==o)return t(a,E?b:null,v),b=T.event=N.event,v=q(a,N,T),N.runner;C(a,T)}}}else C(a,T);var $=T.structural;if($||($="animate"===T.event&&Object.keys(T.options.to||{}).length>0||j(T)),!$)return i(),I(a),y;var _=(N.counter||0)+1;return T.counter=_,L(a,k,T),f.$$postDigest(function(){var c=V.get(l),e=!c;c=c||{};var f=a.parent()||[],g=f.length>0&&("animate"===c.event||c.structural||j(c));if(e||c.counter!==_||!g)return e&&(da(a,v),n(a,v)),(e||E&&c.event!==b)&&(v.domOperation(),y.end()),void(g||I(a));b=!c.structural&&j(c,!0)?"setClass":c.event,L(a,o);var h=w(a,b,c.options);y.setHost(h),d(y,b,"start",{}),h.done(function(c){i(!c);var e=V.get(l);e&&e.counter===_&&I(s(a)),d(y,b,"close",{})})}),y}function H(a){var b=s(a),c=b.querySelectorAll("["+Ca+"]");P(c,function(a){var b=parseInt(a.getAttribute(Ca)),c=V.get(a);if(c)switch(b){case o:c.runner.end();case k:V.remove(a)}})}function I(a){var b=s(a);b.removeAttribute(Ca),V.remove(b)}function J(a,b){return s(a)===s(b)}function K(a,b,c){var d,e=O(r[0].body),f=J(a,e)||"HTML"===a[0].nodeName,g=J(a,p),h=!1,i=Y.get(s(a)),j=O.data(a[0],Da);for(j&&(b=j),b=s(b);b&&(g||(g=J(b,p)),b.nodeType===X);){var k=V.get(b)||{};if(!h){var l=Y.get(b);if(l===!0&&i!==!1){i=!0;break}l===!1&&(i=!1),h=k.structural}if(T(d)||d===!0){var m=O.data(b,ca);U(m)&&(d=m)}if(h&&d===!1)break;if(f||(f=J(b,e)),f&&g)break;b=g||!(j=O.data(b,Da))?b.parentNode:s(j)}var n=(!h||d)&&i!==!0;return n&&g&&f}function L(a,b,c){c=c||{},c.state=b;var d=s(a);d.setAttribute(Ca,b);var e=V.get(d),f=e?N(e,c):c;V.put(d,f)}var V=new v,Y=new v,Z=null,$=f.$watch(function(){return 0===y.totalPendingRequests},function(a){a&&($(),f.$$postDigest(function(){f.$$postDigest(function(){null===Z&&(Z=!0)})}))}),_={},aa=d.classNameFilter(),ba=aa?function(a){return aa.test(a)}:function(){return!0},da=l(z),ea=a.Node.prototype.contains||function(a){return this===a||!!(16&this.compareDocumentPosition(a))},fa={on:function(a,b,c){var d=i(b);_[a]=_[a]||[],_[a].push({node:d,callback:c}),O(b).on("$destroy",function(){var e=V.get(d);e||fa.off(a,b,c)})},off:function(a,c,d){if(1!==arguments.length||b.isString(arguments[0])){var e=_[a];e&&(_[a]=1===arguments.length?null:E(e,c,d))}else{c=arguments[0];for(var f in _)_[f]=E(_[f],c)}},pin:function(a,b){c(W(a),"element","not an element"),c(W(b),"parentElement","not an element"),a.data(Da,b)},push:function(a,b,c,d){return c=c||{},c.domOperation=d,G(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!Z;else{var d=W(a);if(d){var e=s(a),f=Y.get(e);1===c?b=!f:Y.put(e,!b)}else b=Z=!!a}return b}};return fa}]}],Fa=["$animateProvider",function(a){function b(a,b){a.data(h,b)}function c(a){a.removeData(h)}function e(a){return a.data(h)}var f="ng-animate-ref",g=this.drivers=[],h="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(a,h,i,j,k,o){function p(a){function b(a){if(a.processed)return a;a.processed=!0;var c=a.domNode,d=c.parentNode;f.put(c,a);for(var g;d;){if(g=f.get(d)){g.processed||(g=b(g));break}d=d.parentNode}return(g||e).children.push(a),a}function c(a){var b,c=[],d=[];for(b=0;b=e&&(e=f,f=0,c.push(g),g=[]),g.push(h.fn),h.children.forEach(function(a){f++,d.push(a)}),e--}return g.length&&c.push(g),c}var d,e={children:[]},f=new k;for(d=0;d=0,j=a.structural?u(g):[];if(j.length){var k=i?"to":"from";P(j,function(a){var b=a.getAttribute(f);c[b]=c[b]||{},c[b][k]={animationID:d,element:O(a)}})}else b.push(a)});var d={},e={};return P(c,function(c,f){var g=c.from,h=c.to;if(!g||!h){var i=g?g.animationID:h.animationID,j=i.toString();return void(d[j]||(d[j]=!0,b.push(a[i])))}var k=a[g.animationID],l=a[h.animationID],m=g.animationID.toString();if(!e[m]){var n=e[m]={structural:!0,beforeStart:function(){k.beforeStart(),l.beforeStart()},close:function(){k.close(),l.close()},classes:w(k.classes,l.classes),from:k,to:l,anchors:[]};n.classes.length?b.push(n):(b.push(k),b.push(l))}e[m].anchors.push({out:g.element,"in":h.element})}),b}function w(a,b){a=a.split(" "),b=b.split(" ");for(var c=[],d=0;d=0;b--){var c=g[b];if(i.has(c)){var d=i.get(c),e=d(a);if(e)return e}}}function y(){k.addClass(ba),F&&a.addClass(k,F),G&&(a.removeClass(k,G),G=null)}function z(a,b){function c(a){var c=e(a);c&&c.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function A(){var a=e(k);!a||"leave"===l&&t.$$domOperationFired||a.end()}function B(b){k.off("$destroy",A),c(k),r(k,t),n(k,t),t.domOperation(),F&&a.removeClass(k,F),k.removeClass(ba),D.complete(!b)}t=m(t);var C=["enter","move","leave"].indexOf(l)>=0,D=new j({end:function(){B()},cancel:function(){B(!0)}});if(!g.length)return B(),D;b(k,D);var E=d(k.attr("class"),d(t.addClass,t.removeClass)),F=t.tempClasses;F&&(E+=" "+F,t.tempClasses=null);var G;return C&&(G="ng-"+l+aa,a.addClass(k,G)),q.push({element:k,classes:E,event:l,structural:C,options:t,beforeStart:y,close:B}),k.on("$destroy",A),q.length>1?D:(h.$$postDigest(function(){var a=[];P(q,function(b){e(b.element)?a.push(b):b.close()}),q.length=0;var b=v(a),c=[];P(b,function(a){c.push({domNode:s(a.from?a.from.element:a.element),fn:function(){a.beforeStart();var b,c=a.close,d=a.anchors?a.from.element||a.to.element:a.element;if(e(d)){var f=x(a);f&&(b=f.start)}if(b){var g=b();g.done(function(a){c(!a)}),z(a,g)}else c()}})}),o(p(c))}),D)}}]}],Ga=["$animate","$rootScope",function(a,b){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(b,c,d,e,f){var g,h;b.$watchCollection(d.ngAnimateSwap||d["for"],function(d){g&&a.leave(g),h&&(h.$destroy(),h=null),(d||0===d)&&(h=b.$new(),f(h,function(b){g=b,a.enter(b,null,c)}))})}}}];b.module("ngAnimate",[]).directive("ngAnimateSwap",Ga).directive("ngAnimateChildren",ra).factory("$$rAFScheduler",qa).provider("$$animateQueue",Ea).provider("$$animation",Fa).provider("$animateCss",ya).provider("$$animateCssDriver",za).provider("$$animateJs",Aa).provider("$$animateJsDriver",Ba)}(window,window.angular),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.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(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){r=!!("horizontal"in g),r?(s={width:"auto",height:"inherit"},t={width:"0"}):(s={width:"inherit",height:"auto"},t={height:"0"}),d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(s)}function i(a){return r?{width:a.scrollWidth+"px"}:{height:a.scrollHeight+"px"}}function j(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(n(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:i(f[0])}).start()["finally"](k):a.addClass(f,"in",{to:i(f[0])}).then(k)})}function k(){f.removeClass("collapsing").addClass("collapse").css(s),o(d)}function l(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(p(d)).then(function(){f.css(i(f[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:t}).start()["finally"](m):a.removeClass(f,"in",{to:t}).then(m)}):m()}function m(){f.css(t),f.removeClass("collapsing").addClass("collapse"),q(d)}var n=c(g.expanding),o=c(g.expanded),p=c(g.collapsing),q=c(g.collapsed),r=!1,s={},t={};h(),d.$watch(g.uibCollapse,function(a){a?l():j()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(a,b,c){c.$observe("disabled",function(a){c.$set("tabindex",a?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){b.addClass("panel"),d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){function a(){return"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]"}return{require:"^uibAccordionGroup",link:function(b,c,d,e){b.$watch(function(){return e[d.uibAccordionTransclude]},function(b){if(b){var d=angular.element(c[0].querySelector(a()));d.html(""),d.append(b)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(a,b,c,d,e){a.closeable=!!c.close,b.addClass("alert"),c.$set("role","alert"),a.closeable&&b.addClass("alert-dismissible");var f=angular.isDefined(c.dismissOnTimeout)?d(c.dismissOnTimeout)(a.$parent):null;f&&e(function(){a.close()},parseInt(f,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(a,b){return b.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(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;t.length;)t.shift()}function g(a){for(var b=0;b1){q[d].element.data(r,c.direction);var j=p.getCurrentIndex();angular.isNumber(j)&&q[j].element&&q[j].element.data(r,c.direction),a.$currentTransition=!0,e.on("addClass",q[d].element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),t.length)){var d=t.pop().slide,g=d.index,i=g>p.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})}a.active=c.index,s=c.index,g(d),l()}}function i(a){for(var b=0;b0&&(n=c(m,b))}function m(){var b=+a.interval;o&&!isNaN(b)&&b>0&&q.length?a.next():a.pause()}var n,o,p=this,q=p.slides=a.slides=[],r="uib-slideDirection",s=a.active,t=[],u=!1;b.addClass("carousel"),p.addSlide=function(b,c){q.push({slide:b,element:c}),q.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===q.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),s=b.index,a.active=b.index,g(s),p.select(q[i(b)]),1===q.length&&a.play())},p.getCurrentIndex=function(){for(var a=0;a0&&s===c?c>=q.length?(s=q.length-1,a.active=s,g(s),p.select(q[q.length-1])):(s=c,a.active=s,g(s),p.select(q[c])):s>c&&(s--,a.active=s),0===q.length&&(s=null,a.active=null,f())},p.select=a.select=function(b,c){var d=i(b.slide);void 0===c&&(c=d>p.getCurrentIndex()?"next":"prev"),b.slide.index===s||a.$currentTransition?b&&b.slide.index!==s&&a.$currentTransition&&t.push(q[d]):h(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===q.length-1&&a.noWrap()},a.pause=function(){a.noPause||(o=!1,j())},a.play=function(){o||(o=!0,l())},b.on("mouseenter",a.pause),b.on("mouseleave",a.play),a.$on("$destroy",function(){u=!0,j()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",l),a.$watchCollection("slides",k),a.$watch("active",function(a){if(angular.isNumber(a)&&s!==a){for(var b=0;b-1){var f=!1;a=a.split("");for(var g=e;g-1){a=a.split(""),c[e]="("+d.regex+")",a[e]="$";for(var f=e+1,g=e+d.key.length;g>f;f++)c[f]="",a[f]="$";a=a.join(""),b.push({index:e,key:d.key,apply:d.apply,matcher:d.regex})}}),{regex:new RegExp("^"+c.join("")+"$"),map:d(b,"index")}}function f(a){for(var b,c,d=[],e=0;e=a.length||"'"!==a.charAt(e+1))&&(d.push(g(a,c,e)),c=null);else if(e===a.length)for(;cc?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function j(a){return parseInt(a,10)}function k(a,b){return a&&b?o(a,b):a}function l(a,b){return a&&b?o(a,b,!0):a}function m(a,b){a=a.replace(/:/g,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function n(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function o(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=m(b,d);return n(a,c*(e-d))}var p,q,r=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){p=b.id,this.parsers={},this.formatters={},q=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=j(c+d),this.minutes+=j(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==p&&this.init(),this.formatters[c]||(this.formatters[c]=f(c));var d=this.formatters[c];return d.reduce(function(b,c){return b+c(a)},"")},this.parse=function(c,d,f){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(r,"\\$&"),b.id!==p&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var g=this.parsers[d],h=g.regex,j=g.map,k=c.match(h),l=!1;if(k&&k.length){var m,n;angular.isDate(f)&&!isNaN(f.getTime())?m={year:f.getFullYear(),month:f.getMonth(),date:f.getDate(),hours:f.getHours(),minutes:f.getMinutes(),seconds:f.getSeconds(),milliseconds:f.getMilliseconds()}:(f&&a.warn("dateparser:","baseDate is not a valid date"),m={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var o=1,q=k.length;q>o;o++){var s=j[o-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(m,k[o])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return i(m.year,m.month,m.date)&&(!angular.isDate(f)||isNaN(f.getTime())||l?(n=new Date(0),t.call(n,m.year,m.month,m.date),u.call(n,m.hours||0,m.minutes||0,m.seconds||0,m.milliseconds||0)):(n=new Date(f),t.call(n,m.year,m.month,m.date),u.call(n,m.hours,m.minutes,m.seconds,m.milliseconds))),n}},this.toTimezone=k,this.fromTimezone=l,this.timezoneToOffset=m,this.addDateMinutes=n,this.convertTimezoneToLocal=o}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),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(a,b,c,d,e,f,g,h,i,j,k,l){function m(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}var n=this,o={$setViewValue:angular.noop},p={},q=[];b.addClass("uib-datepicker"),c.$set("role","application"),a.datepickerOptions||(a.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(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:i.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":n[b]=angular.isDefined(a.datepickerOptions[b])?e(a.datepickerOptions[b])(a.$parent):i[b];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":n[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:i[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?n.startingDay=a.datepickerOptions.startingDay:angular.isNumber(i.startingDay)?n.startingDay=i.startingDay:n.startingDay=(f.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?n[b]=l.fromTimezone(new Date(a),p.timezone):(j&&g.warn("Literal date support has been deprecated, please switch to date object usage"),n[b]=new Date(h(a,"medium"))):n[b]=i[b]?l.fromTimezone(new Date(i[b]),p.timezone):null,n.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){n[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&n.modes.indexOf(a.datepickerOptions.datepickerMode)n.modes.indexOf(n[b]))&&(a.datepickerMode=n[b],a.datepickerOptions.datepickerMode=n[b])}):n[b]=a[b]=i[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(c.disabled)||!1,angular.isDefined(c.ngDisabled)&&q.push(a.$parent.$watch(c.ngDisabled,function(b){a.disabled=b,n.refreshView()})),a.isActive=function(b){return 0===n.compare(b.date,n.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){o=b,p=b.$options||a.datepickerOptions.ngModelOptions||i.ngModelOptions,a.datepickerOptions.initDate?(n.activeDate=l.fromTimezone(a.datepickerOptions.initDate,p.timezone)||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(o.$isEmpty(o.$modelValue)||o.$invalid)&&(n.activeDate=l.fromTimezone(a,p.timezone),n.refreshView())})):n.activeDate=new Date;var c=o.$modelValue?new Date(o.$modelValue):new Date;this.activeDate=isNaN(c)?l.fromTimezone(new Date,p.timezone):l.fromTimezone(c,p.timezone),o.$render=function(){n.render()}},this.render=function(){if(o.$viewValue){var a=new Date(o.$viewValue),b=!isNaN(a);b?this.activeDate=l.fromTimezone(a,p.timezone):k||g.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=o.$viewValue?new Date(o.$viewValue):null;b=l.fromTimezone(b,p.timezone),o.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=o.$viewValue?new Date(o.$viewValue):null;d=l.fromTimezone(d,p.timezone);var e=new Date;e=l.fromTimezone(e,p.timezone);var f=this.compare(b,e),g={date:b,label:l.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),n.activeDate&&0===this.compare(g.date,n.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===n.minMode){var c=o.$viewValue?l.fromTimezone(new Date(o.$viewValue),p.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=l.toTimezone(c,p.timezone),o.$setViewValue(c),o.$render()}else n.activeDate=b,m(n.modes[n.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=n.activeDate.getFullYear()+a*(n.step.years||0),c=n.activeDate.getMonth()+a*(n.step.months||0);n.activeDate.setFullYear(b,c,1),n.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===n.maxMode&&1===b||a.datepickerMode===n.minMode&&-1===b||(m(n.modes[n.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var r=function(){n.element[0].focus()};a.$on("uib:datepicker.focus",r),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),n.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(n.isDisabled(n.activeDate))return;a.select(n.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(n.handleKeyDown(c,b),n.refreshView()):a.toggleMode("up"===c?1:-1)},b.on("keydown",function(b){a.$apply(function(){a.keydown(b)})}),a.$on("$destroy",function(){for(;q.length;)q.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,this.monthColumns),a.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=this.monthColumns;else if("right"===a)c+=1;else if("down"===a)c+=this.monthColumns;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate), b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('
');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(f,g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},adjustTop:function(a,b,c,d){return-1!==a.indexOf("top")&&c!==d?{top:b.top-d+"px"}:void 0},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),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(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,w,a.date);if(isNaN(c))for(var d=0;d
"),C.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":A}),D=angular.element(C.children()[0]),D.attr("template-url",B),a.datepickerOptions||(a.datepickerOptions={}),J&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),D.attr("datepicker-options","datepickerOptions"),J?F.$formatters.push(function(b){return a.date=b,b}):(F.$$parserName="date",F.$validators.date=s,F.$parsers.unshift(r),F.$formatters.push(function(b){return F.$isEmpty(b)?(a.date=b,b):(angular.isNumber(b)&&(b=new Date(b)),a.date=b,l.filter(a.date,w))})),F.$viewChangeListeners.push(function(){a.date=q(F.$viewValue)}),b.on("keydown",u),H=d(C)(a),C.remove(),y?h.find("body").append(H):b.after(H),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),H.remove(),b.off("keydown",u),h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v);K.length;)K.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=new Date);var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=new Date(a.datepickerOptions[b]):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){a.date=c;var d=a.date?l.filter(a.date,w):null;b.val(d),F.$setViewValue(d),x&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):b=new Date(d.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&K.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),z&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;y||j.parsePlacement(d)[2]?(E=E||angular.element(j.scrollParent(b)),E&&E.on("scroll",v)):E=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b,e){c||a.on("click",d),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b,e){if(c===b){c=null,a.off("click",d);var f=b.getDropdownElement();f&&f.off("keydown",this.keybindFilter)}};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,c.focusToggleElement(),b.$$phase||c.$apply())}}};this.keybindFilter=function(a){27===a.which?(a.stopPropagation(),c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen,angular.isFunction(r)&&r(o,o.isOpen),o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m,v=h.positionElements(b,n.dropdownMenu,"bottom-left",!0),w=0;if(e={top:v.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",m=h.scrollbarPadding(u),m.heightOverflow&&m.scrollbarWidth&&(w=m.scrollbarWidth),e.right=window.innerWidth-w-(v.left+b.prop("offsetWidth"))+"px"):(e.left=v.left+"px",e.right="auto"),!t){var x=h.offset(u);e.top=v.top-x.top+"px",i?e.right=window.innerWidth-(v.left-x.left+b.prop("offsetWidth"))+"px":e.left=v.left-x.left+"px"}n.dropdownMenu.css(e)}var y=u?u:b,z=y.hasClass(u?p:q);if(z===!c&&g[c?"addClass":"removeClass"](y,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl?k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b,n.dropdownMenu.on("keydown",f.keybindFilter)})}):n.dropdownMenu&&n.dropdownMenu.on("keydown",f.keybindFilter),o.focusToggleElement(),f.open(o,b);else{if(f.close(o,b),n.dropdownMenuTemplateUrl){l&&l.$destroy();var A=angular.element('');n.dropdownMenu.replaceWith(A),n.dropdownMenu=A}n.selectedOption=null}angular.isFunction(r)&&r(a,c)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c-1&&y>a&&(a=y),a}function l(a,b){var c=v.get(a).value,d=c.appendTo;v.remove(a),z=v.top(),z&&(y=parseInt(z.value.modalDomEl.attr("index"),10)),o(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||u;w.remove(b,a);var e=w.hasKey(b);d.toggleClass(b,e),!e&&t&&t.heightOverflow&&t.scrollbarWidth&&(t.originalRight?d.css({paddingRight:t.originalRight+"px"}):d.css({paddingRight:""}),t=null),m(!0)},c.closedDeferred),n(),b&&b.focus?b.focus():d.focus&&d.focus()}function m(a){var b;v.length()>0&&(b=v.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function n(){if(r&&-1===k()){var a=s;o(r,s,function(){a=null}),r=void 0,s=void 0}}function o(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){d&&d(),b.remove(),e&&e.resolve()}),c.$destroy())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(x.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function p(a){if(a.isDefaultPrevented())return a;var b=v.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){x.dismiss(b.key,"escape key press")}));break;case 9:var c=x.loadFocusElementList(b),d=!1;a.shiftKey?(x.isFocusInFirstItem(a,c)||x.isModalFocused(a,b))&&(d=x.focusLastFocusableElement(c)):x.isFocusInLastItem(a,c)&&(d=x.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function q(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var r,s,t,u="modal-open",v=h.createNew(),w=g.createNew(),x={NOW_CLOSING_EVENT:"modal.stack.now-closing"},y=0,z=null,A="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 e.$watch(k,function(a){s&&(s.index=a)}),c.on("keydown",p),e.$on("$destroy",function(){c.off("keydown",p)}),x.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||u;m(!1),z=v.top(),v.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),w.put(h,b);var j=f.appendTo,l=k();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!r&&(s=e.$new(!0),s.modalOptions=f,s.index=l,r=angular.element('
'),r.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),f.backdropClass&&r.addClass(f.backdropClass),f.animation&&r.attr("modal-animation","true"),d(r)(s),a.enter(r,j),i.isScrollable(j)&&(t=i.scrollbarPadding(j),t.heightOverflow&&t.scrollbarWidth&&j.css({paddingRight:t.right+"px"}))),y=z?parseInt(z.value.modalDomEl.attr("index"),10)+1:0;var n=angular.element('
');n.attr({"class":"modal","template-url":f.windowTemplateUrl,"window-top-class":f.windowTopClass,role:"dialog",size:f.size,index:y,animate:"animate","ng-style":"{'z-index': 1050 + index*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).html(f.content),f.windowClass&&n.addClass(f.windowClass),f.animation&&n.attr("modal-animation","true"),j.addClass(h),a.enter(d(n)(f.scope),j),v.top().value.modalDomEl=n,v.top().value.modalOpener=g},x.close=function(a,b){var c=v.get(a);return c&&q(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),l(a,c.value.modalOpener),!0):!c},x.dismiss=function(a,b){var c=v.get(a);return c&&q(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),l(a,c.value.modalOpener),!0):!c},x.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},x.getTop=function(){return v.top()},x.modalRendered=function(a){var b=v.get(a);b&&b.value.renderDeferred.resolve()},x.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},x.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},x.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},x.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},x.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},x.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(A);return c?Array.prototype.filter.call(c,function(a){return j(a)}):c}}},x}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i,j={};e.controller&&(j.$scope=d,j.$scope.$resolve={},j.$uibModalInstance=p,angular.forEach(a[1],function(a,b){j[b]=a,j.$scope.$resolve[b]=a}),i=f(e.controller,j,!0,e.controllerAs),e.controllerAs&&e.bindToController&&(g=i.instance,g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,{$resolve:j.$scope.$resolve},c)),g=i(),angular.isFunction(g.$onInit)&&g.$onInit()),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"<< Previous",nextText:"Next >>",align:!0 }).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},link:function(b,c,d,e){c.addClass("pager");var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},link:function(a,c,d,e){c.addClass("pagination");var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.isOpen?q():m()}function m(){M&&!a.$eval(d[k+"Enable"])||(u(),x(),N.popupDelay?G||(G=g(r,N.popupDelay,!1)):r())}function q(){s(),N.popupCloseDelay?H||(H=g(t,N.popupCloseDelay,!1)):t()}function r(){return s(),u(),N.content?(v(),void N.$evalAsync(function(){N.isOpen=!0,y(!0),S()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){N&&N.$evalAsync(function(){N&&(N.isOpen=!1,y(!1),N.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=N.$new(),D=c(E,function(a){K?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){N.title=d[k+"Title"],Q?N.content=Q(a):N.content=d[e],N.popupClass=d[k+"Class"],N.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);N.popupDelay=isNaN(c)?n.popupDelay:c,N.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){P&&angular.isFunction(P.assign)&&P.assign(a,b)}function z(){R.length=0,Q?(R.push(a.$watch(Q,function(a){N.content=a,!a&&N.isOpen&&t()})),R.push(E.$watch(function(){O||(O=!0,E.$$postDigest(function(){O=!1,N&&N.isOpen&&S()}))}))):R.push(d.$observe(e,function(a){N.content=a,!a&&N.isOpen?t():S()})),R.push(d.$observe(k+"Title",function(a){N.title=a,N.isOpen&&S()})),R.push(d.$observe(k+"Placement",function(a){N.placement=a?a:n.placement,N.isOpen&&S()}))}function A(){R.length&&(angular.forEach(R,function(a){a()}),R.length=0)}function B(a){N&&N.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var c=[],e=[],f=a.$eval(d[k+"Trigger"]);T(),angular.isObject(f)?(Object.keys(f).forEach(function(a){c.push(a),e.push(f[a])}),L={show:c,hide:e}):L=p(f),"none"!==L.show&&L.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===L.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(L.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J,K=angular.isDefined(n.appendToBody)?n.appendToBody:!1,L=p(void 0),M=angular.isDefined(d[k+"Enable"]),N=a.$new(!0),O=!1,P=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,Q=n.useContentExp?l(d[e]):!1,R=[],S=function(){D&&D.html()&&(I||(I=g(function(){var a=i.positionElements(b,D,N.placement,K),c=angular.isDefined(D.offsetHeight)?D.offsetHeight:D.prop("offsetHeight"),d=K?i.offset(b):i.position(b);D.css({top:a.top+"px",left:a.left+"px"});var e=a.placement.split("-");D.hasClass(e[0])||(D.removeClass(J.split("-")[0]),D.addClass(e[0])),D.hasClass(n.placementClassPrefix+a.placement)||(D.removeClass(n.placementClassPrefix+J),D.addClass(n.placementClassPrefix+a.placement)),g(function(){var a=angular.isDefined(D.offsetHeight)?D.offsetHeight:D.prop("offsetHeight"),b=i.adjustTop(e,d,c,a);b&&D.css(b)},0,!1),D.hasClass("uib-position-measure")?(i.positionArrow(D,a.placement),D.removeClass("uib-position-measure")):J!==a.placement&&i.positionArrow(D,a.placement),J=a.placement,I=null},0,!1)))};N.origScope=a,N.isOpen=!1,o.add(N,{close:t}),N.contentExp=function(){return N.content},d.$observe("disabled",function(a){a&&s(),a&&N.isOpen&&t()}),P&&a.$watch(P,function(a){N&&!a===N.isOpen&&j()});var T=function(){L.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),L.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var U=a.$eval(d[k+"Animation"]);N.animation=angular.isDefined(U)?!!U:n.animation;var V,W=k+"AppendToBody";V=W in d&&void 0===d[W]?!0:a.$eval(d[W]),K=angular.isDefined(V)?V:K,a.$on("$destroy",function(){T(),w(),o.remove(N),N=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("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(a){return a("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(a){return a("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(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.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(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.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(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;bb.index?1:a.index0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===v[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),u.$setViewValue(new Date(s)),n(a)}function m(){u.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(u.$modelValue){var c=s.getHours(),d=s.getMinutes(),e=s.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!w),"m"!==b&&(a.minutes=k(d)),a.meridian=s.getHours()<12?v[0]:v[1],"s"!==b&&(a.seconds=k(e)),a.meridian=s.getHours()<12?v[0]:v[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=v[0]}function o(a){s=q(s,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s=new Date,t=[],u={$setViewValue:angular.noop},v=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,w=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){u=b,u.$render=this.render,u.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var x=g.hourStep;c.hourStep&&t.push(a.$parent.$watch(d(c.hourStep),function(a){x=+a}));var y=g.minuteStep;c.minuteStep&&t.push(a.$parent.$watch(d(c.minuteStep),function(a){y=+a}));var z;t.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);z=isNaN(b)?void 0:b}));var A;t.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);A=isNaN(b)?void 0:b}));var B=!1;c.ngDisabled&&t.push(a.$parent.$watch(d(c.ngDisabled),function(a){B=a})),a.noIncrementHours=function(){var a=p(s,60*x);return B||a>A||s>a&&z>a},a.noDecrementHours=function(){var a=p(s,60*-x);return B||z>a||a>s&&a>A},a.noIncrementMinutes=function(){var a=p(s,y);return B||a>A||s>a&&z>a},a.noDecrementMinutes=function(){var a=p(s,-y);return B||z>a||a>s&&a>A},a.noIncrementSeconds=function(){var a=q(s,C);return B||a>A||s>a&&z>a},a.noDecrementSeconds=function(){var a=q(s,-C);return B||z>a||a>s&&a>A},a.noToggleMeridian=function(){return s.getHours()<12?B||p(s,720)>A:B||p(s,-720)0};b.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){u.$setViewValue(null),u.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(a),s.setMinutes(b),z>s||s>A?e(!0):l("h")):e(!0)},b.bind("blur",function(b){u.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!w)})}),a.updateMinutes=function(){var a=i(),b=h();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(b),s.setMinutes(a),z>s||s>A?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){u.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();u.$setDirty(),angular.isDefined(a)?(s.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=u.$viewValue;isNaN(b)?(u.$setValidity("time",!1),e.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.')):(b&&(s=b),z>s||s>A?(u.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*x*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-x*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*y)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-y)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(C)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-C)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(s.getHours()<12?60:-60)):a.meridian=a.meridian===v[0]?v[1]:v[0])},a.blur=function(){u.$setTouched()},a.$on("$destroy",function(){for(;t.length;)t.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){O.moveInProgress||(O.moveInProgress=!0,O.$digest()),Z()}function o(){O.position=E?l.offset(b):l.position(b),O.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1),a.$watch(c.typeaheadMinLength,function(a){t=a||0===a?a:1});var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=c.typeaheadShouldSelect?e(c.typeaheadShouldSelect):function(a,b){var c=b.$event;return 13===c.which||9===c.which},A=e(c.typeaheadOnSelect),B=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,C=e(c.typeaheadNoResults).assign||angular.noop,D=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,E=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,F=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,G=a.$eval(c.typeaheadFocusFirst)!==!1,H=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,I=e(c.typeaheadIsOpen).assign||angular.noop,J=a.$eval(c.typeaheadShowHint)||!1,K=e(c.ngModel),L=e(c.ngModel+"($$$p)"),M=function(b,c){return angular.isFunction(K(a))&&q&&q.$options&&q.$options.getterSetter?L(b,{$$$p:c}):K.assign(b,c)},N=m.parse(c.uibTypeahead),O=a.$new(),P=a.$on("$destroy",function(){O.$destroy()});O.$on("$destroy",P);var Q="typeahead-"+O.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":Q});var R,S;J&&(R=angular.element("
"),R.css("position","relative"),b.after(R),S=b.clone(),S.attr("placeholder",""),S.attr("tabindex","-1"),S.val(""),S.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"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),S.attr("id")&&S.removeAttr("id"),R.append(S),S.after(b));var T=angular.element("
");T.attr({id:Q,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(c.typeaheadTemplateUrl)&&T.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&T.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var U=function(){J&&S.val("")},V=function(){O.matches=[],O.activeIdx=-1,b.attr("aria-expanded",!1),U()},W=function(a){return Q+"-option-"+a};O.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",W(a))});var X=function(a,b){return O.matches.length>b&&a?a.toUpperCase()===O.matches[b].label.toUpperCase():!1},Y=function(c,d){var e={$viewValue:c};y(a,!0),C(a,!1),f.when(N.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){O.activeIdx=G?0:-1,C(a,!1),O.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?S.val(c+i.slice(c.length)):S.val("")}}else V(),C(a,!0);g&&y(a,!1)},function(){V(),y(a,!1),C(a,!0)})};E&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Z=k(function(){O.matches.length&&o(),O.moveInProgress=!1},s);O.moveInProgress=!1,O.query=void 0;var $,_=function(a){$=g(function(){Y(a)},u)},aa=function(){$&&g.cancel($)};V(),O.assignIsOpen=function(b){I(a,b)},O.select=function(d,e){var f,h,i={};x=!0,i[N.itemName]=h=O.matches[d].model,f=N.modelMapper(a,i),M(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),A(a,{$item:h,$model:f,$label:N.viewMapper(a,i),$event:e}),V(),O.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==O.matches.length&&-1!==r.indexOf(b.which)){var c=z(a,{$event:b});if(-1===O.activeIdx&&c||9===b.which&&b.shiftKey)return V(),void O.$digest();b.preventDefault();var d;switch(b.which){case 27:b.stopPropagation(),V(),a.$digest();break;case 38:O.activeIdx=(O.activeIdx>0?O.activeIdx:O.matches.length)-1,O.$digest(),d=T[0].querySelectorAll(".uib-typeahead-match")[O.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;case 40:O.activeIdx=(O.activeIdx+1)%O.matches.length,O.$digest(),d=T[0].querySelectorAll(".uib-typeahead-match")[O.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;default:c&&O.$apply(function(){angular.isNumber(O.debounceUpdate)||angular.isObject(O.debounceUpdate)?k(function(){O.select(O.activeIdx,b)},angular.isNumber(O.debounceUpdate)?O.debounceUpdate:O.debounceUpdate["default"]):O.select(O.activeIdx,b)})}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){Y(p.$viewValue,a)},0)}),b.bind("blur",function(a){B&&O.matches.length&&-1!==O.activeIdx&&!x&&(x=!0,O.$apply(function(){angular.isObject(O.debounceUpdate)&&angular.isNumber(O.debounceUpdate.blur)?k(function(){O.select(O.activeIdx,a)},O.debounceUpdate.blur):O.select(O.activeIdx,a)})),!v&&p.$error.editable&&(p.$setViewValue(),O.$apply(function(){p.$setValidity("editable",!0),p.$setValidity("parse",!0)}),b.val("")),w=!1,x=!1});var ba=function(c){b[0]!==c.target&&3!==c.which&&0!==O.matches.length&&(V(),j.$$phase||a.$digest())};h.on("click",ba),a.$on("$destroy",function(){h.off("click",ba),(E||F)&&ca.remove(),E&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),T.remove(),J&&R.remove()});var ca=d(T)(O);E?h.find("body").append(ca):F?angular.element(F).eq(0).append(ca):b.after(ca),this.init=function(b,c){p=b,q=c,O.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(aa(),_(b)):Y(b):(y(a,!1),aa(),V()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),D?(e.$model=b,D(a,e)):(e[N.itemName]=b,c=N.viewMapper(a,e),e[N.itemName]=void 0,d=N.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"], link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'\n
\n
\n
\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n
\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.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(a){a.put("uib/template/carousel/slide.html",'
\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
\n
\n
\n
\n
\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.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(a){a.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/year.html",[]).run(["$templateCache",function(a){a.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(a){a.put("uib/template/datepickerPopup/popup.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html","
\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'
  • {{::getText(\'previous\')}}
  • \n
  • {{::getText(\'next\')}}
  • \n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'
  • {{::getText(\'first\')}}
  • \n
  • {{::getText(\'previous\')}}
  • \n
  • {{page.text}}
  • \n
  • {{::getText(\'next\')}}
  • \n
  • {{::getText(\'last\')}}
  • \n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n\n
    \n

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

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

    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.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(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend(''),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend(''),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend(''),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend(''),angular.$$uibTypeaheadCss=!0}),function(a,b){"function"==typeof define&&define.amd?define(["angular"],b):"object"==typeof module&&module.exports?module.exports=b(require("angular")):a.angularClipboard=b(a.angular)}(this,function(a){return a.module("angular-clipboard",[]).factory("clipboard",["$document","$window",function(a,b){function c(c,d){var e=a[0].createElement("textarea");return e.style.position="absolute",e.textContent=c,e.style.left="-10000px",e.style.top=(b.pageYOffset||a[0].documentElement.scrollTop)+"px",e}function d(b){try{a[0].body.style.webkitUserSelect="initial";var c=a[0].getSelection();if(c.removeAllRanges(),b.select(),!a[0].execCommand("copy"))throw"failure copy";c.removeAllRanges()}finally{a[0].body.style.webkitUserSelect=""}}function e(b,e){var f=c(b,e);a[0].body.appendChild(f),d(f),a[0].body.removeChild(f)}return{copyText:e,supported:"queryCommandSupported"in a[0]&&a[0].queryCommandSupported("copy")}}]).directive("clipboard",["clipboard",function(b){return{restrict:"A",scope:{onCopied:"&",onError:"&",text:"=",supported:"=?"},link:function(c,d){c.supported=b.supported,d.on("click",function(e){try{b.copyText(c.text,d[0]),a.isFunction(c.onCopied)&&c.$evalAsync(c.onCopied())}catch(f){a.isFunction(c.onError)&&c.$evalAsync(c.onError({err:f}))}})}}}])}),function(){"use strict";angular.module("cfp.hotkeys",[]).provider("hotkeys",["$injector",function(a){this.includeCheatSheet=!0,this.useNgRoute=a.has("ngViewDirective"),this.templateTitle="Keyboard Shortcuts:",this.templateHeader=null,this.templateFooter=null,this.template='',this.cheatSheetHotkey="?",this.cheatSheetDescription="Show / hide this help menu",this.$get=["$rootElement","$rootScope","$compile","$window","$document",function(a,b,c,d,e){function f(){q=!1}function g(){q=!0}function h(a){var b={command:"",shift:"",left:"←",right:"→",up:"↑",down:"↓","return":"",backspace:""};a=a.split("+");for(var c=0;c=0?a[c]="command":a[c]="ctrl"),a[c]=b[a[c]]||a[c];return a.join(" + ")}function i(a,b,c,d,e,f){this.combo=a instanceof Array?a:[a],this.description=b,this.callback=c,this.action=d,this.allowIn=e,this.persistent=f,this._formated=null}function j(){for(var a=r.hotkeys.length;a--;){var b=r.hotkeys[a];b&&!b.persistent&&m(b)}}function k(){r.helpVisible=!r.helpVisible,r.helpVisible?(w=n("esc"),m("esc"),l("esc",w.description,k,null,["INPUT","SELECT","TEXTAREA"])):(m("esc"),w!==!1&&l(w))}function l(a,b,c,d,e,f){var g,h=["INPUT","SELECT","TEXTAREA"],j=Object.prototype.toString.call(a);if("[object Object]"===j&&(b=a.description,c=a.callback,d=a.action,f=a.persistent,e=a.allowIn,a=a.combo),m(a),b instanceof Function?(d=c,c=b,b="$$undefined$$"):angular.isUndefined(b)&&(b="$$undefined$$"),void 0===f&&(f=!0),"function"==typeof c){g=c,e instanceof Array||(e=[]);for(var k,l=0;l-1)b=!0;else for(var e=0;e-1?(r.hotkeys[e].combo.length>1?r.hotkeys[e].combo.splice(r.hotkeys[e].combo.indexOf(b),1):(angular.forEach(s,function(a){var b=a.indexOf(r.hotkeys[e]);-1!==b&&a.splice(b,1)}),r.hotkeys.splice(e,1)),!0):!1}function n(a){if(!a)return r.hotkeys;for(var b,c=0;c-1)return b;return!1}function o(a){return a.$id in s||(s[a.$id]=[],a.$on("$destroy",function(){for(var b=s[a.$id].length;b--;)m(s[a.$id].pop())})),{add:function(b){var c;return c=arguments.length>1?l.apply(this,arguments):l(b),s[a.$id].push(c),this}}}function p(a){return function(c,d){ if(a instanceof Array){var e=a[0],f=a[1];a=function(a){f.scope.$eval(e)}}b.$apply(function(){a(c,n(d))})}}var q=!0;Mousetrap.prototype.stopCallback=function(a,b){return q?(" "+b.className+" ").indexOf(" mousetrap ")>-1?!1:b.contentEditable&&"true"==b.contentEditable:!0},i.prototype.format=function(){if(null===this._formated){for(var a=this.combo[0],b=a.split(/[\s]/),c=0;c95&&112>a||r.hasOwnProperty(a)&&(q[r[a]]=a)}return q}function l(a,b,c){return c||(c=k()[a]?"keydown":"keypress"),"keypress"==c&&b.length&&(c="keydown"),c}function m(a){return"+"===a?["+"]:(a=a.replace(/\+{2}/g,"+plus"),a.split("+"))}function n(a,b){var c,d,e,f=[];for(c=m(a),e=0;e1?void q(a,g,b,c):(f=n(a,c),s._callbacks[f.key]=s._callbacks[f.key]||[],k(f.key,f.modifiers,{type:f.action},d,a,e),void s._callbacks[f.key][d?"unshift":"push"]({callback:b,modifiers:f.modifiers,action:f.action,seq:d,level:e,combo:a}))}var s=this;if(a=a||b,!(s instanceof p))return new p(a);s.target=a,s._callbacks={},s._directMap={};var t,u={},v=!1,w=!1,x=!1;s._handleKey=function(a,b,d){var e,f=k(a,b,d),g={},h=0,i=!1;for(e=0;e":".","?":"/","|":"\\"},u={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},v=1;20>v;++v)r[111+v]="f"+v;for(v=0;9>=v;++v)r[v+96]=v;p.prototype.bind=function(a,b,c){var d=this;return a=a instanceof Array?a:[a],d._bindMultiple.call(d,a,b,c),d},p.prototype.unbind=function(a,b){var c=this;return c.bind.call(c,a,function(){},b)},p.prototype.trigger=function(a,b){var c=this;return c._directMap[a+":"+b]&&c._directMap[a+":"+b]({},a),c},p.prototype.reset=function(){var a=this;return a._callbacks={},a._directMap={},a},p.prototype.stopCallback=function(a,b){var c=this;return(" "+b.className+" ").indexOf(" mousetrap ")>-1?!1:o(b,c.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable},p.prototype.handleKey=function(){var a=this;return a._handleKey.apply(a,arguments)},p.init=function(){var a=p(b);for(var c in a)"_"!==c.charAt(0)&&(p[c]=function(b){return function(){return a[b].apply(a,arguments)}}(c))},p.init(),a.Mousetrap=p,"undefined"!=typeof module&&module.exports&&(module.exports=p),"function"==typeof define&&define.amd&&define(function(){return p})}(window,document),function(a,b){"use strict";function c(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(w,u),function(a){var b=[];return f(a,i(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function d(a){var c=[],d=i(c,b.noop);return d.chars(a),c.join("")}function e(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function h(a){return a.replace(/&/g,"&").replace(m,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(n,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function i(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&v[a]&&(d=a),d||w[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),i="img"===a&&"src"===g||"background"===g;A[g]!==!0||x[g]===!0&&!c(d,i)||(e(" "),e(f),e('="'),e(h(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||w[a]!==!0||o[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(h(a))}}}function j(b){if(b.nodeType===a.Node.ELEMENT_NODE)for(var c=b.attributes,d=0,e=c.length;e>d;d++){var f=c[d],g=f.name.toLowerCase();"xmlns:ns1"!==g&&0!==g.lastIndexOf("ns1:",0)||(b.removeAttributeNode(f),d--,e--)}var h=b.firstChild;h&&j(h),h=b.nextSibling,h&&j(h)}var k,l=b.$$minErr("$sanitize"),m=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n=/([^\#-~ |!])/g,o=e("area,br,col,hr,img,wbr"),p=e("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),q=e("rp,rt"),r=b.extend({},q,p),s=b.extend({},p,e("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")),t=b.extend({},q,e("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")),u=e("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"),v=e("script,style"),w=b.extend({},o,s,t,r),x=e("background,cite,href,longdesc,src,xlink:href"),y=e("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"),z=e("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),A=b.extend({},x,z,y);!function(a){var b;if(!a.document||!a.document.implementation)throw l("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)k=d[0];else{var e=b.createElement("html");k=b.createElement("body"),e.appendChild(k),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",c),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,e=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(d(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(e,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b){"use strict";function c(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function d(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,g.$$moduleName="ngTouch",c.directive("ngClick",g),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function e(a,c,d){f.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var f=b.module("ngTouch",[]);f.provider("$touch",d),d.$inject=["$provide","$compileProvider"],f.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var g=["$parse","$timeout","$rootElement",function(a,d,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;1>d&&1>e||m&&m[0]===d&&m[1]===e||(m&&(m=null),"label"===c(a.target)&&(m=[d,e]),g(l,d,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;l.push(c,e),d(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];e("ngSwipeLeft",-1,"swipeleft"),e("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("app",["ngAnimate","ngSanitize","ui.bootstrap","angular-clipboard"]),angular.module("app").run(["$rootScope",function(a){a.URL="test"}]),angular.module("app").factory("interceptors",[function(){return{request:function(a){return a.beforeSend&&a.beforeSend(),a},response:function(a){return a.config.complete&&a.config.complete(a),a}}}]),angular.module("app").config(["$httpProvider",function(a){a.interceptors.push("interceptors"),a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=utf-8",a.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var b=function(a){var c,d,e,f,g,h,i,j="";for(c in a)if(d=a[c],d instanceof Array)for(i=0;i
    ')})}function d(){var a=util.cookie.get("main-lg");1==a?($("body").addClass("main-lg-body"),$(".js-big-main").text("正常")):($("body").removeClass("main-lg-body"),$(".js-big-main").text("宽屏"))}util.cookie_message(),$(".js-clip").each(function(){util.clip(this,$(this).attr("data-url"))}),$.fn.tooltip&&($('[data-toggle="tooltip"]').tooltip(),$('[data-toggle="dropdown"]').dropdown()),$("img").error(function(){if(!$(this).attr("onerror")){var a="resource/images/nopic-107.png";$(this).width()==$(this).height()?a="resource/images/nopic-107.png":$(this).width()<$(this).height()&&(a="resource/images/nopic-203.png"),$(this).attr("src",a)}}),a(),b(),window.sysinfo.uid,window.sysinfo.module&&window.sysinfo.module.name&&$.getJSON("./index.php?c=utility&a=checkupgrade&do=module&m="+window.sysinfo.module.name,function(a){-10==a.message.errno&&$(".head").after('")}),window.sysinfo.isfounder&&c(),$(".js-big-main").click(function(){var a=$("body").hasClass("main-lg-body")?"0":"1";util.cookie.set("main-lg",a),d()})}),window.UEDITOR_HOME_URL="./resource/components/ueditor/",angular.module("app").directive("we7Colorpicker",[function(){var a={templateUrl:"directive-colorpicker-colorpicker.html",scope:{colorValue:"=we7MyColor",colorDefault:"=we7MyDefaultColor"},link:function(a,b,c){$(b).data("data-colorpicker-init")||(util.colorpicker(b,function(c){$(b).parent().parent().find(":text").val(c.toHexString()),a.colorValue=c.toHexString(),a.$apply("colorValue"),a.$watch("colorValue",function(c){$(b).spectrum("get")!=c&&($(b).spectrum("set",c?c:a.colorDefault),$(b).parent().parent().find(":text").val(c?c:a.colorDefault),$(b).parent().parent().find(".input-group-addon").css("background-color",c?c:a.colorDefault))})}),$(b).find(".colorclean").click(function(){return $(b).find(":text").val("rgba(0,0,0,0)"),$(b).find(".input-group-addon").css("background-color","rgba(0,0,0,0)"),a.colorValue=a.colorDefault="rgba(0,0,0,0)",$(b).spectrum("set",a.colorDefault),a.$apply("colorValue"),!1}),$(b).data("data-colorpicker-init",!0))}};return a}]),angular.module("app").directive("we7DatePicker",["$http","$parse",function(){var a={transclude:!0,template:"",scope:{dateValue:"=we7DateValue"},link:function(a,b,c){var d={lang:"zh",step:"1",format:"Y-m-d H:i:s",closeOnDateSelect:!0,onSelectDate:function(b,c){a.dateValue=b.dateFormat("Y-m-d H:i:s"),a.$apply("dateValue")},onSelectTime:function(b,c){a.dateValue=b.dateFormat("Y-m-d H:i:s"),a.$apply("dateValue")}};$(b).datetimepicker(d)}};return a}]),angular.module("app").directive("we7Editor",function(){var a={scope:{value:"=?we7MyValue",params:"=?we7MyParams"},template:'',link:function(b,c,d){if(!c.data("editor")){c.find("textarea").attr("id","editor"+(new Date).getTime());var e={autoClearinitialContent:!1,toolbars:[["fullscreen","source","preview","|","bold","italic","underline","strikethrough","forecolor","backcolor","|","justifyleft","justifycenter","justifyright","|","insertorderedlist","insertunorderedlist","blockquote","emotion","link","removeformat","|","rowspacingtop","rowspacingbottom","lineheight","indent","paragraph","fontfamily","fontsize","|","inserttable","deletetable","insertparagraphbeforetable","insertrow","deleterow","insertcol","deletecol","mergecells","mergeright","mergedown","splittocells","splittorows","splittocols","|","anchor","map","print","drafts"]],elementPathEnabled:!1,initialFrameHeight:200,focus:!1,maximumWords:9999999999999,autoFloatEnabled:!1};a=UE.getEditor(c.find("textarea").attr("id"),e),c.data("editor",a),a.addListener("contentChange",function(){b.value=a.getContent(),b.value&&(b.params=b.value.replace(/\"/g,"#quot;")),b.$root.$$phase||b.$apply("value")}),a.addListener("ready",function(){!b.value&&b.params&&(b.value=b.params.replace(/\#quot;/g,""")),b.value&&a&&a.getContent()!=b.value&&a.setContent(b.value),b.$watch("value",function(b){a&&a.getContent()!=b&&a.setContent(b?b:"")})})}}};return a}),angular.module("app").directive("we7Iconer",["$templateCache",function(a){var b=a.get("directive-iconer-nav-pills-inline.html"),c=a.get("directive-iconer-tab-content-inline.html"),d={scope:{image:"=we7MyImage",icon:"=we7MyIcon",iconcolor:"=we7MyIconColor"},transclude:!0,templateUrl:"directive-iconer-iconer.html",link:function(a,d,e){a.selectIcon=function(){require(["fileUploader"],function(d){var e=d.show(function(b){a.image=b.url,a.icon={},a.$apply("image"),a.$apply("icon")},{direct:!0,multiple:!1});e.on("shown.bs.modal",function(){e.find(".nav-pills").append(b),e.find(".tab-content").append(c),$.get("./index.php?c=utility&a=icon&callback=selectIconComplete",function(b){e.find("#icon").append(b),e.find("#icon").find("input").val(a.iconcolor),e.find("#icon").attr("color",a.iconcolor),e.find("#icon").find("i").css("color",a.iconcolor)})}),window.selectIconComplete=function(b){a.icon={},a.icon.name=b,a.icon.color=e.find("#icon").attr("color"),a.image="",a.$apply("image"),a.$apply("icon"),e.modal("hide")}})},a.removeIcon=function(){a.image="",a.icon={}}}};return d}]),angular.module("app").directive("we7InitialSearchbar",function(){var a={templateUrl:"directive-initialsearchbar-searchbar.html",scope:{doSearch:"&we7SearchCallback"},link:function(a,b,c){a.alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],a.searchResult=function(b){a.activeLetter=b,a.doSearch({letter:b})}}};return a}),angular.module("app").directive("we7Linker",["$http","$templateCache",function(a,b){var c=b.get("directive-linker-cms-header-inline.html"),d=b.get("directive-linker-cms-content-inline.html"),e=b.get("directive-linker-cms-article-item-inline.html"),f=b.get("directive-linker-cms-cate-item-inline.html"),g=b.get("directive-linker-news-content-inline.html"),h=b.get("directive-linker-news-item-inline.html"),j=b.get("directive-linker-page-content-inline.html"),k=b.get("directive-linker-page-item-inline.html"),l=b.get("directive-linker-map-content-inline.html"),m=b.get("directive-linker-tel-content-inline.html"),n={templateUrl:"directive-linker-linker.html",scope:{url:"=we7MyUrl",title:"=we7MyTitle"},link:function(b,n,o){n.find(".input-group-btn").mouseover(function(a){clearTimeout(b.timer),n.find(".dropdown-menu").show()}).mouseout(function(){b.timer=setTimeout(function(){n.find(".dropdown-menu").hide()},500)}),n.find(".dropdown-menu").mouseover(function(){clearTimeout(b.timer),n.find(".dropdown-menu").show()}).mouseout(function(){b.timer=setTimeout(function(){n.find(".dropdown-menu").hide()},500)}),b.addLink=function(a,c){b.url=a,c&&(b.title=c)},b.searchSystemLinker=function(){b.modalobj=util.dialog("请选择链接",["./index.php?c=utility&a=link&callback=selectLinkComplete"],"",{containerName:"link-search-system"}),b.modalobj.modal({keyboard:!1}),b.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),b.modalobj.modal("show"),window.selectLinkComplete=function(a,c){b.addLink(a,c),b.$apply("url","title"),b.modalobj.modal("hide")}},b.searchCmsLinker=function(g){var h={};h.header=c,h.content=d,h.footer="",h.articleitem=e,h.cateitem=f,$("#link-search-cms")[0]?b.modalobj=$("#link-search-cms").data("modal"):(b.modalobj=util.dialog(h.header,h.content,h.footer,{containerName:"link-search-cms"}),b.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),b.modalobj.modal("show"),b.modalobj.on("hidden.bs.modal",function(){b.modalobj.remove()}),$("#link-search-cms").data("modal",b.modalobj)),g=g||1;var j=$("#articlelist .article-list-input").val();a.get("./index.php?c=utility&a=link&do=articlelist&page="+g+"&keyword="+j).success(function(a,c,d,e){var f={items:[]};if(a.message=a.message.message,a.message.list){for(i in a.message.list)f.items.push({title:a.message.list[i].title,id:a.message.list[i].id,uniacid:a.message.list[i].uniacid,attachment:a.message.list[i].thumb_url,createtime:a.message.list[i].createtime});b.modalobj.find("#articlelist tbody").html(_.template(h.articleitem)(f)),b.modalobj.find("#pager").html(a.message.pager),b.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return b.searchCmsLinker($(this).attr("page")),!1}),b.modalobj.find("#articlelist .input-group-btn").click(function(){return b.searchCmsLinker(),!1}),b.modalobj.find(".js-btn-select").click(function(){b.addLink($(this).attr("js-url"),$(this).attr("js-title")),b.$apply("url","title"),b.modalobj.modal("hide")})}});var k=$("#category .category-list-input").val();a.get("./index.php?c=utility&a=link&do=catelist&page="+g+"&keyword="+k).success(function(a,c,d,e){var f={items:[]};if(a.message=a.message.message,a.message){for(i in a.message)f.items.push({id:a.message[i].id,uniacid:a.message[i].uniacid,name:a.message[i].name,children:a.message[i].children});b.modalobj.find("#category tbody").html(_.template(h.cateitem)(f)),b.modalobj.find("#category .input-group-btn").click(function(){return b.searchCmsLinker(),!1}),b.modalobj.find(".js-btn-select").click(function(){b.addLink($(this).attr("js-url"),$(this).attr("js-title")),b.$apply("url","title"),b.modalobj.modal("hide")})}})},b.searchNewsLinker=function(c){var d={};d.content=g,d.footer="",d.newsitem=h,$("#link-search-news")[0]?b.modalobj=$("#link-search-news").data("modal"):(b.modalobj=util.dialog(d.header,d.content,d.footer,{containerName:"link-search-news"}),b.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),b.modalobj.modal("show"),b.modalobj.on("hidden.bs.modal",function(){b.modalobj.remove()}),$("#link-search-news").data("modal",b.modalobj)),c=c||1;var e=$("#newslist .news-list-input").val();a.get("./index.php?c=utility&a=link&do=newslist&page="+c+"&keyword="+e).success(function(a,c,e,f){var g={items:[]};if(a.message=a.message.message,a.message.list){for(i in a.message.list)g.items.push({title:a.message.list[i].title,id:a.message.list[i].id,uniacid:window.sysinfo.uniacid,attachment:a.message.list[i].thumb_url,createtime:a.message.list[i].createtime});b.modalobj.find("#newslist tbody").html(_.template(d.newsitem)(g)),b.modalobj.find("#pager").html(a.message.pager),b.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return b.searchNewsLinker($(this).attr("page")),!1}),b.modalobj.find("#newslist .input-group-btn").click(function(){return b.searchNewsLinker(),!1}),b.modalobj.find(".js-btn-select").click(function(){b.addLink($(this).attr("js-url"),$(this).attr("js-title")),b.$apply("url","title"),b.modalobj.modal("hide")})}})},b.searchPageLinker=function(c){var d={};d.content=j,d.footer="",d.pageItem=k,$("#link-search-page")[0]?b.modalobj=$("#link-search-page").data("modal"):(b.modalobj=util.dialog(d.header,d.content,d.footer,{containerName:"link-search-page"}),b.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),b.modalobj.modal("show"),b.modalobj.on("hidden.bs.modal",function(){b.modalobj.remove()}),$("#link-search-page").data("modal",b.modalobj)),c=c||1;var e=$("#pageList .page-list-input").val();a.get("./index.php?c=utility&a=link&do=pagelist&&page="+c+"&keyword="+e).success(function(a,c,e,f){var g={items:[]};if(a.message=a.message.message,a.message.list){for(i in a.message.list)g.items.push({title:a.message.list[i].title,id:a.message.list[i].id,uniacid:window.sysinfo.uniacid,createtime:a.message.list[i].createtime});b.modalobj.find("#pageList tbody").html(_.template(d.pageItem)(g)),b.modalobj.find("#pager").html(a.message.pager),b.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return b.searchPageLinker($(this).attr("page")),!1}),b.modalobj.find("#pageList .input-group-btn").click(function(){return b.searchPageLinker(),!1}),b.modalobj.find(".js-btn-select").click(function(){b.addLink($(this).attr("js-url"),$(this).attr("js-title")),b.$apply("url","title"),b.modalobj.modal("hide")})}})},b.searchMapPosLinker=function(){var a={};a.content=l,b.modalobj=util.dialog(a.content),b.modalobj.modal("show"),b.modalobj.find("#getnav").click(function(){b.addLink("http://api.map.baidu.com/marker?location="+$("#navlat").val()+","+$("#navlng").val()+"&title="+$("#navtitle").val()+"&name="+$("#navtitle").val()+"&output=html&src=we7",$("#navtitle").val()),b.$apply("url","title"),b.modalobj.modal("hide")})},b.addTelLinker=function(){var a={};a.content=m,b.modalobj=util.dialog("一键拨号",a.content),b.modalobj.modal("show"),b.modalobj.find(".btn-primary").click(function(){b.addLink("tel:"+b.modalobj.find("#telphone").val(),""),b.$apply("url","title"),b.modalobj.modal("hide")})}}};return n}]),angular.module("app").run(["$templateCache",function(a){"use strict";a.put("directive-colorpicker-colorpicker.html",'
    '),a.put("directive-iconer-iconer.html",''),a.put("directive-iconer-nav-pills-inline.html",''), a.put("directive-iconer-tab-content-inline.html",'
    '),a.put("directive-initialsearchbar-searchbar.html",''),a.put("directive-linker-cms-article-item-inline.html",'<%_.each(items, function(item) {%> <%=item.title%><%=item.createtime%> <%});%>'),a.put("directive-linker-cms-cate-item-inline.html",'<%_.each(items, function(item) {%> <%=item.name%>选取 <%_.each(item.children, function(child) {%> <%=child.name%>选取 <%});%> <%});%>'),a.put("directive-linker-cms-content-inline.html",'
    标题创建时间
    标题创建时间
    '),a.put("directive-linker-cms-header-inline.html",''),a.put("directive-linker-linker.html",''),a.put("directive-linker-map-content-inline.html",'
    '),a.put("directive-linker-news-content-inline.html",'
    标题创建时间
    '),a.put("directive-linker-news-item-inline.html",'<%_.each(items, function(item) {%> <%=item.title%><%=item.createtime%> <%});%>'),a.put("directive-linker-page-content-inline.html",'
    名称创建间
    '),a.put("directive-linker-page-item-inline.html",'<%_.each(items, function(item) {%> <%=item.title%><%=item.createtime%> <%});%>'),a.put("directive-linker-tel-content-inline.html",'
    '),a.put("fans-tag-selector.html",''),a.put("directive-multipage-multipage.html",''),a.put("widget-cardactivity-display.html",'

    点此编辑『富文本』内容 ——>

    你可以对文字进行 加粗斜体下划线删除线、文字颜色背景色、 以及字号等简单排版操作。

    还可以在这里加入表格了

    中奖客户发放奖品备注
    猪猪内测码已经发放
    大麦积分领取地址

    也可在这里插入图片、并对图片加上超级链接,方便用户点击。

    '),a.put("widget-cardactivity-editor.html",'
    每消费 1 元赠送 积分
    设置消费返积分的比率.如果开启了充值优惠设置,请到充值优惠设置中->设置消费是否返还积分的开关.
    例:兑换比率:1元返10积分,那用户每消费1元,将得到10积分.
    {{discount.title}}
    {{discount.title}}
    '),a.put("widget-cardbasic-display.html",'

    会员卡

    默认会员组
    会员卡号:{$setting[\'format\']}
    '),a.put("widget-cardbasic-editor.html",'
     选择图片
    ×
     选择图片
    ×

    请填写会员卡的使用说明。
    系统会自动绑定:真实姓名和手机号码 添加填写项目
    赠送 积分
    赠送 余额
    已选:{{grant.couponTitle}}|
    添加优惠券.注意:赠送的优惠券应该各个会员组都可以领取.否则会造成赠送失败的问题
    单次最多可获取积分数量
    满足xx元,可使用积分抵扣
    积分抵 1 元

    单次最多可抵现
    例:积分抵现金比率:100积分抵1元,那用户在消费的时候,将可用账户积分抵消部分金额.
    目前仅支持后台交易抵现,暂不支持手机交易抵现.
    卡券库存的数量,不支持填写0,上限为100000000.
    卡券使用提醒,字数上限为16个汉字。
    选择是否开启刷卡支付
    天生效,有效期
    '), a.put("widget-cardnums-display.html",'

    点此编辑『富文本』内容 ——>

    你可以对文字进行 加粗斜体下划线删除线、文字颜色背景色、 以及字号等简单排版操作。

    还可以在这里加入表格了

    中奖客户发放奖品备注
    猪猪内测码已经发放
    大麦积分领取地址

    也可在这里插入图片、并对图片加上超级链接,方便用户点击。

    '),a.put("widget-cardnums-editor.html",'
    如你的业务有需要次数限制,可开启进行设置。
    例如:设置为”洗发剩余次数“,前台将显示为:”洗发剩余次数:n次“,请根据自己的业务需求设置。
    '),a.put("widget-cardrecharge-display.html",'

    点此编辑『富文本』内容 ——>

    你可以对文字进行 加粗斜体下划线删除线、文字颜色背景色、 以及字号等简单排版操作。

    还可以在这里加入表格了

    中奖客户发放奖品备注
    猪猪内测码已经发放
    大麦积分领取地址

    也可在这里插入图片、并对图片加上超级链接,方便用户点击。

    '),a.put("widget-cardrecharge-editor.html",'
    开启充值优惠设置后,用户是否继续享受消费返积分的优惠
    '),a.put("widget-cardtimes-display.html",'

    点此编辑『富文本』内容 ——>

    你可以对文字进行 加粗斜体下划线删除线、文字颜色背景色、 以及字号等简单排版操作。

    还可以在这里加入表格了

    中奖客户发放奖品备注
    猪猪内测码已经发放
    大麦积分领取地址

    也可在这里插入图片、并对图片加上超级链接,方便用户点击。

    '),a.put("widget-cardtimes-editor.html",'
    如你的业务有需要时长限制,可开启进行设置。
    例如:设置为”到期时间“,系统将根据用户的领卡时间,加上用户的可用时长,计算到期时间,前台将显示为:”到期时间:x年x月x日“,请根据自己的业务需求设置。
    '),a.put("widget-ucheader-display.html",'

    {{module.params.title}}

    '),a.put("widget-ucheader-editor.html",'
     选择图片
    ×
    用户触发关键字,系统回复此页面的图文链接
     选择图片
    ×
    用于用户触发关键字后,系统回复时的封面图片
    用于用户点击会员中心->设置->联系我们时拨打的电话
    个人中心扩展菜单
    +添加一级导航
    '),a.put("directive-pagelength-pagelength.html",'
    -
    页面长度(页):
    +
    '),a.put("directive-style-style.html",'
    px
    无效果
    淡入
    从左滚入
    从右滚入
    放大
    下落放大
    弹性放大
    弹性缩小
    向右飞入
    向左飞入
    向上飞入
    向下飞入
    旋转出现
    左右翻转
    上下翻转
    刹车
    向右滑入
    向左滑入
    向上滑入
    向下滑入
    向右展开
    向左展开
    向上展开
    向下展开
    '), a.put("widget-adimg-display.html",'
    '),a.put("widget-adimg-editor.html",'

    重新上传

    '),a.put("widget-audio-display.html",'
    歌名儿 {{module.params.title}}
    '),a.put("widget-audio-editor.html",'
    语音头像
    上传头像
    建议尺寸80*80像素
    如果不设置,默认将使用店铺logo
    '),a.put("widget-countdown-display.html",'
    '),a.put("widget-countdown-editor.html",'
    '),a.put("widget-cube-display.html",'
    '),a.put("widget-cube-editor.html",'
    +
    {{col.cols * 160}} * {{col.rows * 160}}
    点击"+",添加内容
     添加图片 建议尺寸:{{activeItem.params.currentLayout.cols * 160}} * {{activeItem.params.currentLayout.rows * 160}} 像素
    '),a.put("widget-dial-display.html",'
    '),a.put("widget-dial-editor.html",'

    更换添加图片
    '),a.put("widget-good-display.html",'
    0
    0
    "),a.put("widget-good-editor.html",'
    左右
    上下
    '),a.put("widget-header-display.html",'

    {{module.params.title}}

    '),a.put("widget-header-editor.html",'
    用户触发关键字,系统回复此页面的图文链接.不支持多关键字
     选择图片
    ×
    用于用户触发关键字后,系统回复时的封面图片
    是否在本专题页面中显示微站快捷菜单
    '),a.put("widget-image-display.html",'
    '),a.put("widget-image-editor.html",'

    重新上传

    '),a.put("widget-line-display.html",'

    '),a.put("widget-line-editor.html",'
    辅助线(请于左侧拖动缩放调整)
    '),a.put("widget-link-display.html",'
    '),a.put("widget-link-editor.html",'
    从分类中选择修改
    '), a.put("widget-navimg-display.html",'
    '),a.put("widget-navimg-editor.html",'
    '),a.put("widget-notice-display.html",'
    公告: {{module.params.notice || \'请填写内容,如果过长,将会在手机上滚动显示!\'}}
    '),a.put("widget-notice-editor.html",'
    '),a.put("widget-onlytext-display.html",'
    '),a.put("widget-onlytext-editor.html","
    "),a.put("widget-purelink-display.html",'
    '),a.put("widget-purelink-editor.html",'
    '),a.put("widget-reward-display.html","
    "),a.put("widget-reward-editor.html","
    "),a.put("widget-richtext-display.html",'

    点此编辑『富文本』内容 ——>

    你可以对文字进行 加粗斜体下划线删除线、文字颜色背景色、 以及字号等简单排版操作。

    还可以在这里加入表格了

    中奖客户发放奖品备注
    猪猪内测码已经发放
    大麦积分领取地址

    也可在这里插入图片、并对图片加上超级链接,方便用户点击。

    '),a.put("widget-richtext-editor.html",'
    '),a.put("widget-shape-display.html",'
    '),a.put("widget-shape-editor.html",'
    '),a.put("widget-textnav-display.html",'
    '),a.put("widget-textnav-editor.html",'
    '),a.put("widget-title-display.html",'

    {{ module.params.title || "点击编辑『标题』"}} - 文本导航

    副标题

    {{ module.params.title || "点击编辑『标题』"}}

    2015-03-12  zhangsan  

    '),a.put("widget-title-editor.html",'
    '),a.put("widget-white-display.html",'
    '),a.put("widget-white-editor.html",'
    空白高度(请于左侧拖动缩放调整)
    '),a.put("directive-multipage-multipage.html",'')}]),angular.module("wapeditorApp",["app"]),angular.module("wapeditorApp").controller("CommonCtrl",["$scope","$sanitize",function(a,b){}]),angular.module("wapeditorApp").directive("we7ContextMenu",["serviceBase","$timeout",function(a,b){return{link:function(c,d,e){function f(a,b){var c=$(".right-hand-menu"),d=c.parent().position();a-=d.left,b-=d.top,c.css({left:a+"px",top:b+"px"}),c.addClass("show-menu")}var g=' ';$(".right-hand-menu").length||($("body").append(g),$(".modules").on("contextmenu",function(a){a.preventDefault()}),$(document).on("mouseup",function(){$(".right-hand-menu").removeClass("show-menu")}),$(".right-hand-menu").on("click",".menu-item-del",function(){var d=$(".right-hand-menu").data("item-index");a.deleteItem(d),b(function(){c.$apply()},100)}).on("click",".menu-item-top",function(){c.savePagePosition();var d,e=$(".right-hand-menu").data("item-index"),f=[];for(var g in c.activeModules)c.activeModules[g].index==e?d=angular.copy(c.activeModules[g]):f.push(c.activeModules[g]);f.push(d),a.setBaseData("activeModules",f),b(function(){c.$apply()},100)}).on("click",".menu-item-up",function(){c.savePagePosition();var d,e,f=$(".right-hand-menu").data("item-index"),g=c.activeModules.length;for(var h in c.activeModules)if(c.activeModules[h].index==f){if(parseInt(h)+1==g)break;d=angular.copy(c.activeModules[h]),e=angular.copy(c.activeModules[parseInt(h)+1]),c.activeModules[h]=e,c.activeModules[parseInt(h)+1]=d,a.setBaseData("activeModules",c.activeModules);break}b(function(){c.$apply()},100)}).on("click",".menu-item-down",function(){c.savePagePosition();var d,e,f=$(".right-hand-menu").data("item-index");for(var g in c.activeModules)if(c.activeModules[g].index==f){if(1>=g)break;d=angular.copy(c.activeModules[g]),e=angular.copy(c.activeModules[g-1]),c.activeModules[g]=e,c.activeModules[parseInt(g)-1]=d,a.setBaseData("activeModules",c.activeModules);break}b(function(){c.$apply()},100)}).on("click",".menu-item-bottom",function(){c.savePagePosition();var d,e=$(".right-hand-menu").data("item-index"),f=[];for(var g in c.activeModules)0!=g&&(c.activeModules[g].index==e?d=angular.copy(c.activeModules[g]):f.push(c.activeModules[g]));f.unshift(d),f.unshift(c.activeModules[0]),a.setBaseData("activeModules",f),b(function(){c.$apply()},100)})),d.on("contextmenu",function(a){f(a.pageX,a.pageY);var b=d.parents("div[id^='module-']").attr("index");$(".right-hand-menu").data("item-index",b)})}}}]),angular.module("wapeditorApp").directive("we7Nobar",function(){return{link:function(a,b,c){b.on("mousedown",function(a){$(".bar").hide()})}}}).directive("we7Drag",["serviceBase","$timeout",function(a,b){return{compile:function(b,c){var d=$('
    '),e=$('
    '),f=$('
    '),g=$('
    ');return b.append(d).append(e).append(f).append(g),function(b,c,d){var e=c.parents("div[ng-controller$='Ctrl']").eq(0);e.on("mousedown",function(a){$(".bar").hide(),$(this).find(".bar").show(),$(this).find(".bar-radius").show(),$(this).draggable({containment:""})}),e.mousedown();var f=a.getBaseData("activeItem");if(f.id){var g=f.id.replace(/[a-z]/,function(a){return a.toLocaleUpperCase()}).replace(/^[a-z]/,function(a){return a.toLocaleUpperCase()})+"Ctrl";if("HeaderCtrl"!=g){var h=$("#module-"+f.index).find("div[ng-controller='"+g+"']");h.on("mousedown",function(a){$(".bar").hide(),$(this).find(".bar").show(),$(this).find(".bar-radius").show(),$(this).draggable({containment:""})}),h.mousedown()}else $(".bar").hide()}}}}}]).directive("we7Resize",function(){return{compile:function(a,b){var c=$('
    '),d=$('
    '),e=$('
    '),f=$('
    '),g=$('
    ');return a.find(".bar-n,.bar-s,.bar-e,.bar-w").append(c),a.append(e).append(f).append(g).append(d),function(a,b,c){var d=b.parents("div[ng-controller$='Ctrl']").eq(0);d.on("mousedown",function(a){var b={n:$(this).find(".bar-n"),s:$(this).find(".bar-s"),e:$(this).find(".bar-e"),w:$(this).find(".bar-w"),nw:$(this).find(".bar-nw"),se:$(this).find(".bar-se"),sw:$(this).find(".bar-sw"),ne:$(this).find(".bar-ne")};$(this).resizable({handles:b,aspectRatio:!0,onlyCorner:!0})})}}}}).directive("we7Rotate",function(){return{link:function(a,b,c){var d='
    ';b.prepend(d);var e=b.parents("div[ng-controller$='Ctrl']").eq(0);e.on("mousedown",function(b){var c,d=e.find(".bar-rotate").get(0),f=e.children(),g=new Hammer(d),h={};g.get("pan").set({threhold:0}),g.on("panstart",function(a){$("body").css({"user-select":"none",cursor:'url("./resource/images/mouserotate.ico"), default'}),h={x:f.offset().left+f.width()/2,y:f.offset().top+f.height()/2}}),g.on("panmove",function(b){var d=b.center,e=d.x-h.x,g=d.y-h.y+$(window).scrollTop(),i=Math.abs(e/g);c=Math.atan(i)/(2*Math.PI)*360,e>0&&0>g?c=360+c:e>0&&g>0?c=180-c:0>e&&g>0?c=180+c:0>e&&0>g&&(c=360-c), c>360&&(c-=360),c=parseInt(c),f.css({transform:"rotateZ("+c+"deg)"}),a.activeItem.params.borderStyle.transform=c,a.$apply()}),g.on("panend",function(){$("body").css({"user-select":"initial",cursor:"default"})})})}}}),angular.module("wapeditorApp").directive("we7EditKeyMap",["serviceBase","$timeout",function(a,b){return{restrict:"A",link:function(c,d,e){var f=$(document);f.unbind("keydown").keydown(function(d){var e=a.getBaseData("activeModules"),f=a.getBaseData("activeItem"),g=_.findIndex(e,f);if(46==d.keyCode&&g>0&&(d.preventDefault(),confirm("删除后需要重新提交才会生效,确认吗?")&&(e.splice(g,1),a.setBaseData({activeModules:e,activeItem:e[0]}))),37==d.keyCode||38==d.keyCode||39==d.keyCode||40==d.keyCode){_.isEmpty(f)||d.preventDefault();var h=1;37==d.keyCode&&(f.params.positionStyle.left-=h),38==d.keyCode&&(f.params.positionStyle.top-=h),39==d.keyCode&&(f.params.positionStyle.left+=h),40==d.keyCode&&(f.params.positionStyle.top+=h)}b(function(){c.$apply()})}).unbind("keyup").keyup(function(){c.$apply()})}}}]),angular.module("wapeditorApp").directive("we7Pagelength",function(){return{replace:!0,templateUrl:"directive-pagelength-pagelength.html",link:function(a,b,c){}}}),angular.module("wapeditorApp").directive("we7Style",["serviceSetStyle",function(a){return{templateUrl:"directive-style-style.html"}}]),angular.module("wapeditorApp").directive("we7Svger",function(){return{scope:{we7svg:"=we7Svg"},link:function(a,b,c){a.$watch("we7svg",function(){for(var c=$(a.we7svg),d=0;c.length>d;d++)if("svg"==c[d].tagName){var e=c[d];$(e).attr({width:"100%",height:"100%"}),$(e)[0].setAttribute("preserveAspectRatio","none"),b.html(e);break}})}}}),angular.module("wapeditorApp").factory("serviceBase",["$rootScope","widget","config","serviceCommon","serviceSetStyle","$timeout",function(a,b,c,d,e,f){var g={},h={modules:[],editors:[],activeModules:[],index:0,activeItem:{},activeIndex:0,pageLength:1,isNew:!0};return g.setModules=function(a,c){if(_.isNull(a)&&(h.modules=b),_.isArray(a))for(i in a){var d,e=_.findIndex(b,{id:a[i]});e>-1&&(d=angular.copy(b[e]),h.modules.push(d))}if(_.isArray(c))for(i in c){var e=_.findIndex(h.modules,{id:c[i]});e>-1&&(h.modules[e].defaultshow=!0)}return h.modules},g.setEditors=function(a){h.editors.push(a)},g.updateActiveModules=function(a,b){b&&h.activeModules.push({id:a.id,name:a.name,params:angular.copy(a.params),originParams:angular.copy(a.params),issystem:a.issystem?1:0,index:h.index,displayorder:a.displayorder?a.displayorder:h.activeModules.length})},g.initActiveModules=function(a){return h.activeModules=a?angular.copy(a):[],h.activeModules},g.addItem=function(a,b){angular.forEach(h.modules,function(c,d){if(c.id==a){var f={};return f=angular.copy(c),-1==$.inArray(a,h.editors)&&(g.setEditors(c.id),g.broadcast("editors")),"header"!=a&&"UCheader"!=a&&(f.params="uc"===b?e.UcInitStyleParams(c.params):e.initStyleParams(c.params)),g.updateActiveModules(f,!0),h.activeIndex=_.findIndex(h.activeModules,{index:parseInt(h.index)}),h.activeItem="uc"===b?h.activeModules[h.index]:h.activeModules[h.activeIndex],h.index++,g.triggerActiveItem(h.activeIndex),$(".app-text-edit").find(".nav-tabs").find("a[href='#attribute']").click(),g.broadcast("activeItem"),g.broadcast("activeModules"),void("header"!=a&&"UCheader"!=a&&e.initSetStyle(f.params))}})},g.editItem=function(a){var a=_.findIndex(h.activeModules,{index:parseInt(a)});a>-1&&(h.activeIndex=a,h.activeItem=h.activeModules[a]),-1==$.inArray(h.activeItem.id,h.editors)&&(g.setEditors(h.activeItem.id),g.broadcast("editors")),g.triggerActiveItem(a),$(".app-text-edit").find(".nav-tabs").find("a[href='#attribute']").click(),g.broadcast("activeItem")},g.deleteItem=function(a){if(confirm("删除后需要重新提交才会生效,确认吗?")){var b=$("#module-"+a).prev().attr("index"),a=_.findIndex(h.activeModules,{index:parseInt(a)});h.activeModules=_.without(h.activeModules,h.activeModules[a]),h.activeIndex=_.findIndex(h.activeModules,{index:parseInt(b)}),h.activeItem=h.activeModules[h.activeIndex],g.broadcast("activeItem"),g.broadcast("activeModules")}},g.triggerActiveItem=function(a){$("#module-"+h.activeModules[a].index).size()&&$("#editor"+h.activeModules[a].id).size()?clearTimeout(timer):timer=f(function(){g.triggerActiveItem(a)},50)},g.getBaseData=function(a){return h[a]},g.setBaseData=function(a,b){angular.isObject(a)?angular.forEach(a,function(a,b){h[b]=a}):h[a]=b,g.broadcast(a)},g.broadcast=function(b){switch(b){case"activeItem":a.$broadcast("serviceBase.activeItem.update",h.activeItem);break;case"activeModules":a.$broadcast("serviceBase.activeModules.update",h.activeModules);break;case"editors":a.$broadcast("serviceBase.editors.update",h.editors);break;case"modules":case"index":case"activeIndex":case"pageLength":case"isNew":break;default:angular.isObject(b)&&angular.forEach(b,function(b,c){switch(c){case"activeItem":a.$broadcast("serviceBase.activeItem.update",h.activeItem);break;case"activeModules":a.$broadcast("serviceBase.activeModules.update",h.activeModules);break;case"editors":a.$broadcast("serviceBase.editors.update",h.editors);break;case"modules":case"index":case"activeIndex":case"pageLength":case"isNew":}})}},g}]),angular.module("wapeditorApp").service("serviceCommon",["$window",function(a){var b={};return b.getCssname=function(a){for(var b="",c=0,d=parseInt(a.length);d>c;c++)b+=-1!=a[c].search(/[A-Z]/)?"-"+a[c].toLowerCase():a[c];return b},b.getMaxScopeIndex=function(a){var b=a[a.length-1].property,c=0;for(var d in b)c=c0&&(b.positionStyle.top+=parseInt($(".app-preview").scrollTop())),b.positionStyle.left>200?b.positionStyle.left=10:b.positionStyle.left+=5*f,b.positionStyle.top+=5*f,f>20?f=1:f++,b},e.UcInitStyleParams=function(a){var b={},b=angular.copy(a);return b.baseStyle=$.extend(!1,e.defBaseStyle,a.baseStyle),b.borderStyle=$.extend(!1,e.defBorderStyle,a.borderStyle),b.shadowStyle=$.extend(!1,e.defShadowStyle,a.shadowStyle),b.animationStyle=$.extend(!1,e.defAnimationStyle,a.animationStyle),b.positionStyle=$.extend(!1,e.defPositionStyle,a.positionStyle),$(".app-preview").scrollTop()>0&&(b.positionStyle.top+=parseInt($(".app-preview").scrollTop())),b.positionStyle.left>200?b.positionStyle.left=10:b.positionStyle.left+=5*f,b.positionStyle.top+=5*f-$(".app-usercenter").height(),f>10?f=1:f++,b},e.initSetStyle=function(a){e.setModuleBaseStyle(a.baseStyle),e.setModuleBorderStyle(a.borderStyle),e.setModuleShadowStyle(a.shadowStyle),e.setModulePositionStyle(a.positionStyle),e.setModuleAnimationStyle(a.animationStyle)},e.setModuleBaseStyle=function(b){b=$.extend(!1,e.defBaseStyle,b);var d="";for(var f in b)switch(f){case"fontSize":d+="number"==typeof b[f]?c.getCssname(f)+":"+parseInt(b[f])+"px;":b[f].search(/rem/)?c.getCssname(f)+":14px;":c.getCssname(f)+":"+parseInt(b[f])+"px;";case"paddingTop":case"paddingBottom":d+=c.getCssname(f)+":"+parseInt(b[f])+"px;";break;case"backgroundColor":case"color":case"textAlign":case"lineHeight":d+=c.getCssname(f)+":"+b[f]+";";break;case"opacity":d+=c.getCssname(f)+":"+(100-parseInt(b[f]))/100+";"}a.$broadcast("serviceBase.activeItem.style.update","baseStyle",b,d)},e.setModuleBorderStyle=function(b){b=$.extend(!1,e.defBorderStyle,b);var d=newTransformStyle="";for(var f in b)switch(f){case"borderWidth":case"borderRadius":d+=c.getCssname(f)+":"+parseInt(b[f])+"px;";break;case"borderStyle":case"borderColor":d+=c.getCssname(f)+":"+b[f]+";";break;case"transform":newTransformStyle+="transform: rotateZ("+parseInt(b[f])+"deg);"}a.$broadcast("serviceBase.activeItem.style.update","borderStyle",b,d,newTransformStyle)},e.setModuleShadowStyle=function(b){b=$.extend(!1,e.defShadowStyle,b);var c="",d=shadowY=0;d=-Math.sin(b.shadowDirection*Math.PI/180)*b.shadowSize,shadowY=Math.cos(b.shadowDirection*Math.PI/180)*b.shadowSize,c="box-shadow: "+d+"px "+shadowY+"px "+b.shadowBlur+"px "+b.shadowColor+";",a.$broadcast("serviceBase.activeItem.style.update","shadowStyle",b,c)},e.setModuleAnimationStyle=function(b){b=$.extend(!1,e.defAnimationStyle,b);var c="",d=b.animationName+" "+b.animationDuration+"s "+b.animationTimingFunction+" "+b.animationDelay+"s "+b.animationFillMode;c=e.cssCompatible("animation",d),a.$broadcast("serviceBase.activeItem.style.update","animationStyle",b,c)},e.setModulePositionStyle=function(b){b=$.extend(!1,e.defPositionStyle,b);var c="position:absolute;";for(var d in b)switch(d){case"top":case"left":case"width":case"height":c+=" "+d+": "+b[d]+"px;"}a.$broadcast("serviceBase.activeItem.style.update","positionStyle",b,c)},e.clearModuleStyle=function(b){b.params.baseStyle=b.originParams.baseStyle,b.params.borderStyle=b.originParams.borderStyle,b.params.shadowStyle=b.originParams.shadowStyle,b.params.animationStyle=b.originParams.animationStyle,a.$broadcast("serviceBase.activeItem.update",b)},e.eleAnimationIns=function(d){var e=c.getCssname(d);b(function(){$("."+e).parent().addClass("select").siblings(".select").removeClass("select")},100),a.$broadcast("serviceBase.activeItem.animationName.update",d)},e.savePagePosition=function(b){$(".modules").find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var a=$(this).parent().parent(),c=_.findIndex(b,{index:parseInt(a.attr("index"))}),d=$(this).css("top"),e=$(this).css("left"),f=$(this).css("width"),g=$(this).css("height"),h="position:absolute;top:"+d+";left:"+e+";width:"+f+";height:"+g+";";b[c].params.positionStyle.top=parseInt(d),b[c].params.positionStyle.left=parseInt(e),b[c].params.positionStyle.width=parseInt(f),b[c].params.positionStyle.height=parseInt(g),b[c].positionStyle=h}),a.$broadcast("serviceBase.activeModules.update",b)},e.saveModulePosition=function(b){var c="#module-"+b.index,d=$(c).find("div.ng-scope[ng-controller$='Ctrl']"),e=d.css("top"),f=d.css("left"),g=d.css("width"),h=d.css("height"),i="position:absolute;top:"+e+";left:"+f+";width:"+g+";height:"+h+";";return b.params.positionStyle.top=parseInt(e),b.params.positionStyle.left=parseInt(f),b.params.positionStyle.width=parseInt(g),b.params.positionStyle.height=parseInt(h),b.positionStyle=i,a.$broadcast("serviceBase.activeItem.update",b),b},e.changeTextAlign=function(b,c){b.params.baseStyle.textAlign=c,a.$broadcast("serviceBase.activeItem.update",b)},e.changeBorderWidth=function(a){"adImg"!=a.id&&"cube"!=a.id&&"title"!=a.id&&"textNav"!=a.id&&"link"!=a.id&&"audio"!=a.id||b(function(){var b=e.saveModulePosition(a);b.positionStyle.height+=2*b.borderStyle.borderWidth,"audio"==a.id&&(b.positionStyle.height+=20),e.setModulePositionStyle(b.params.positionStyle)},100)},e.changeInnerHeight=function(a){b(function(){var b=e.saveModulePosition(a),c=b.index,d=$("#module-"+c).find(".inner"),f=parseInt(d.css("height"));f+=2*b.params.borderStyle.borderWidth,b.params.positionStyle.height=f,e.setModulePositionStyle(b.params.positionStyle)},100)},e.changePageLength=function(d,e){var d=parseInt(d),f=!(d>1),g=d;return b(function(){$(".app-content").css("height",568*d+"px")},100),e[c.getHeaderIndex(e)].params.pageLength=d,a.$broadcast("updateScope",{isMultiPage:f,pageLength:g,activeModules:e}),e},e.cssCompatible=function(a,b){var c="";return angular.isString(a)&&angular.isString(b)?c=a+": "+b+";-webkit-"+a+": "+b+";-moz-"+a+": "+b+";-o-"+a+": "+b+";-ms-"+a+": "+b+";":void 0},e}]),angular.module("wapeditorApp").service("serviceSubmit",["serviceBase","serviceCommon",function(a,b){var c={};return c.submit=function(){var c="",d={params:{},html:""},e=$($(".modules").html()),f=a.getBaseData("activeModules");e.find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var a=_.findIndex(f,{index:parseInt($(this).parent().parent().attr("index"))}),d=$(this).find("div[class^='app-']").get(0),e=$(d).attr("style");f[a].params.animate=f[a].params.animateTemp,e+="animation:"+f[a].params.animate+";",$(d).attr("style",e);var g="",h=angular.copy(f[a].params);$(this).find(".js-default-content").remove();var i=$(this).parent().parent().attr("name").toLowerCase();if("UCheader"!=i&&"cardBasic"!=i&&"cardActivity"!=i&&"cardNums"!=i&&"cardTimes"!=i&&"cardRecharge"!=i){var j=$(this).css("top"),k=$(this).css("left"),l=$(this).css("width"),m=$(this).css("height"),n="position:absolute;top:"+j+";left:"+k+";width:"+l+";height:"+m+";";f[a].params.positionStyle.top=parseInt(j),f[a].params.positionStyle.left=parseInt(k),f[a].params.positionStyle.width=parseInt(l),f[a].params.positionStyle.height=parseInt(m),f[a].positionStyle=n}switch(i){case"link":var o=this;angular.forEach(h.items,function(a,c){(a.selectCate.pid||a.selectCate.cid)&&$(o).find(".list-group").children().eq(c).replaceWith("
    "+b.buildDataTagBegin("link",a)+''+b.buildDataTagEnd()+"
    ")});break;case"richtext":f[a]&&(f[a].params.content="")}if(g=$(this).html(),"header"!=i){var n=$(this).attr("style");c+='
    '+g+"
    "}a++});var g=f[0].params.bgColor;return c='
    '+c+"
    ",c=c.replace(/<\!\-\-([^-]*?)\-\->/g,""),c=c.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),c=c.replace(/ ng\-[a-zA-Z]+/g,""),d.html=c,d.params=angular.copy(f),b.stripHaskey(d.params),d},c}]),angular.module("wapeditorApp").service("serviceUpwardCompatible",["$rootScope","$timeout","orderByFilter",function(a,b,c){var d={};return d.compatibility=function(a){var b={};"undefined"!=typeof a[0].params.pageHeight&&(a[0].params.pageLength=Math.ceil(a[0].params.pageHeight/568)),a=c(a,"displayorder");for(var d in a){a[d].params.baseStyle instanceof Array&&(a[d].params.baseStyle={}),a[d].params.borderStyle instanceof Array&&(a[d].params.borderStyle={}),a[d].params.shadowStyle instanceof Array&&(a[d].params.shadowStyle={}),a[d].params.positionStyle instanceof Array&&(a[d].params.positionStyle={});var e=angular.copy(a[d].params);if(a[d].animationStyle="",a[d].params.animationStyle={},a[d].params.animate){var f=a[d].params.animate.match(/(\w+)\s1/);f=f?f[1]:"noEffect",a[d].params.animationStyle.name=f}else a[d].params.animationStyle.name="noEffect";switch(a[d].params.animationStyle={name:a[d].params.animationStyle.name,speed:1,delay:.6},a[d].animationStyle="animation: "+a[d].params.animate+";",a[d].params.positionStyle=_.isEmpty(a[d].params.positionStyle)?{}:a[d].params.positionStyle,a[d].params.baseStyle=_.isEmpty(a[d].params.baseStyle)?{}:a[d].params.baseStyle,a[d].params.borderStyle=_.isEmpty(a[d].params.borderStyle)?{}:a[d].params.borderStyle,a[d].params.shadowStyle=_.isEmpty(a[d].params.shadowStyle)?{}:a[d].params.shadowStyle,a[d].baseStyle="",a[d].borderStyle="",a[d].shadowStyle="",a[d].positionStyle="",a[d].id){case"onlyText":a[d].params.baseStyle.textAlign=e.postype,a[d].params.baseStyle.fontSize=e.baseStyle.fontsize,a[d].params.baseStyle.lineHeight=e.baseStyle.lineheight,a[d].params.positionStyle.left=e.positionStyle.marginleft?e.positionStyle.marginleft:0,a[d].params.positionStyle.width=e.positionStyle.width?e.positionStyle.width:290,a[d].params.positionStyle.height=e.positionStyle.height?e.positionStyle.height:0,a[d].baseStyle="font-size:"+e.baseStyle.fontsize+"px;text-align:"+e.postype+";line-height:"+e.baseStyle.lineheight+";";break;case"image":a[d].params.positionStyle.left=e.positionStyle.marginleft?e.positionStyle.marginleft:0,a[d].params.positionStyle.width=e.positionStyle.width?e.positionStyle.width:0,a[d].params.positionStyle.height=e.positionStyle.height?e.positionStyle.height:0;break;case"shape":a[d].params.positionStyle.left=e.positionStyle.marginleft?e.positionStyle.marginleft:0,a[d].params.positionStyle.width=e.positionStyle.width?e.positionStyle.width:100,a[d].params.positionStyle.height=e.positionStyle.height?e.positionStyle.height:0;break;case"pureLink":case"dial":a[d].params.baseStyle.fontSize=e.baseStyle.fontsize?e.baseStyle.fontsize+"px":"14px",a[d].params.baseStyle.textAlign="center";for(var g in e.items)if(1==e.items[g].active){a[d].params.baseStyle.backgroundColor=e.items[g].discolor,a[d].params.baseStyle.color=e.items[g].color;break}a[d].params.positionStyle.left=e.positionStyle.marginleft?e.positionStyle.marginleft:0,a[d].params.positionStyle.width=e.positionStyle.width?e.positionStyle.width:320-e.positionStyle.marginleft,a[d].params.positionStyle.height=e.positionStyle.height?e.positionStyle.height:35,a[d].params.baseStyle.lineHeight=a[d].params.positionStyle.height+"px",a[d].params.borderStyle.borderWidth=1,a[d].params.borderStyle.borderRadius=8,a[d].params.borderStyle.borderStyle="solid",a[d].params.borderStyle.borderColor="#ADADAD",a[d].baseStyle="font-size:"+a[d].params.baseStyle.fontSize+";text-align:center;background-color:"+e.items[g].discolor+";color:"+e.items[g].color+";line-height:"+a[d].params.baseStyle.lineHeight+";",a[d].borderStyle="border-radius:8px; border-width: 1px;border-style: solid;border-color: #ADADAD;";break;case"good":a[d].params.baseStyle.fontSize=e.baseStyle.fontsize+"px",a[d].params.baseStyle.textAlign="center",a[d].params.baseStyle.color=e.color,a[d].params.baseStyle.backgroundColor="#d15d82",a[d].params.borderStyle.borderRadius=5,a[d].params.positionStyle.left=e.positionStyle.marginleft?e.positionStyle.marginleft:0,a[d].params.positionStyle.width=e.positionStyle.width?e.positionStyle.width:320-e.positionStyle.marginleft,1==e.layoutstyle?a[d].params.positionStyle.height=e.positionStyle.height?e.positionStyle.height:35:a[d].params.positionStyle.height=e.positionStyle.height?e.positionStyle.height:54,a[d].params.baseStyle.lineHeight=a[d].params.positionStyle.height+"px",a[d].baseStyle="font-size:"+a[d].params.baseStyle.fontSize+";text-align:center;background-color:#d15d82;color:"+e.color+";line-height:"+a[d].params.baseStyle.lineHeight+";",a[d].borderStyle="border-radius:5px;";break;case"countDown":a[d].params.baseStyle.fontSize=e.baseStyle.fontsize+"px",a[d].params.baseStyle.textAlign="center",a[d].params.positionStyle.left=e.positionStyle.marginleft?e.positionStyle.marginleft:0,a[d].params.positionStyle.width=e.positionStyle.width?e.positionStyle.width:320,a[d].params.positionStyle.height=e.positionStyle.height?e.positionStyle.height:35,a[d].params.baseStyle.lineHeight=a[d].params.positionStyle.height+"px",a[d].params.borderStyle.borderWidth=1,a[d].params.borderStyle.borderStyle="solid",a[d].params.borderStyle.borderColor="#ccc",a[d].baseStyle="font-size:"+a[d].params.baseStyle.fontSize+";text-align:center;line-height:"+a[d].params.baseStyle.lineHeight+";",a[d].borderStyle="border-width: 1px;border-style: solid;border-color: #ccc;";break;case"title":a[d].params.baseStyle.backgroundColor=e.tradition.bgcolor,a[d].baseStyle="background-color:"+e.tradition.bgcolor+";";case"white":a[d].params.positionStyle.height=a[d].params.height;case"richText":case"adImg":case"cube":case"textNav":case"navImg":case"link":case"line":case"audio":case"notice":"undefined"!=typeof e.positionStyle?a[d].params.positionStyle.left=e.positionStyle.marginleft?e.positionStyle.marginleft:0:a[d].params.positionStyle.left=0,a[d].params.positionStyle.width=320}var h="";heightStyle="",a[d].params.positionStyle.width&&(h="width:"+a[d].params.positionStyle.width+"px;"),a[d].params.positionStyle.height&&(heightStyle="height:"+a[d].params.positionStyle.height+"px;"),a[d].positionStyle="position:relative;left:"+a[d].params.positionStyle.left+"px;"+h+heightStyle,"undefined"!=typeof e.positionStyle?a[d].marginTop=e.positionStyle.margintop?e.positionStyle.margintop:0:a[d].marginTop=0}return b=a},d}]),angular.module("wapeditorApp").controller("AdImgCtrl",["$scope",function(a){a.addItem=function(){require(["fileUploader"],function(b){b.show(function(b){a.activeItem.params.items.push({id:b.id,imgurl:b.url,title:"",url:"",isactive:!1}),$.each(a.activeItem.params.items,function(b,c){a.activeItem.params.items[0].isactive=0==b}),a.$apply("activeItem"),a.changeInnerHeight()},{direct:!0,multiple:!1})})},a.removeItem=function(b){index=$.inArray(b,a.activeItem.params.items),items=_.clone(a.activeItem.params.items),a.activeItem.params.items=[];for(i in items)i!=index&&a.activeItem.params.items.push(items[i]);a.changeInnerHeight()},a.addEmpty=function(){a.activeItem.params.items.push({imgurl:"",title:"",url:""}),a.changeInnerHeight()},a.changeItem=function(b){require(["fileUploader"],function(c){c.init(function(c){var d=$.inArray(b,a.activeItem.params.items);d>-1&&(a.activeItem.params.items[d].id=c.id,a.activeItem.params.items[d].imgurl=c.url,a.$apply())},{direct:!0,multiple:!1})}),a.changeInnerHeight()}}]),angular.module("wapeditorApp").controller("AudioCtrl",["$scope",function(a){a.addAudioItem=function(){require(["fileUploader"],function(b){b.init(function(b){b&&(a.activeItem.params.audio.id=b.id,a.activeItem.params.audio.url=b.attachment,a.$apply(),$(".audio-player-play").click(function(){var b=a.activeItem.params.audio.url;if(b){$("#player").remove();var c=$('
    ');$(document.body).append(c),c.data("control",$(this)),c.jPlayer({playing:function(){$(this).data("control").find("i").removeClass("fa-play").addClass("fa-stop")},pause:function(a){$(this).data("control").find("i").removeClass("fa-stop").addClass("fa-play")},swfPath:"resource/components/jplayer",supplied:"mp3,wma,wav,amr",solution:"html, flash"}),c.jPlayer("setMedia",{mp3:b}).jPlayer("play"),$(this).find("i").hasClass("fa-stop")?c.jPlayer("stop"):c.jPlayer("setMedia",{mp3:b}).jPlayer("play")}}).show())},{direct:!0,multiple:!1,type:"audio"})})},a.addImgItem=function(){require(["fileUploader"],function(b){b.init(function(b){a.activeItem.params.headimg=b.url,a.$apply()},{direct:!0,multiple:!1})})},a.changeInnerHeight=function(){a.changeInnerHeight()}}]),angular.module("wapeditorApp").controller("CountDownCtrl",["$scope","$timeout",function(a,b){a.$watch("activeItem.params.deadtime",function(b,e){if(a.activeItem.params.leftTimeText={day:0,hour:0,min:0,sec:0},b&&"undefined"!=typeof b&&0!=b){var f=b.replace(/:/g,"-");f=f.replace(/ /g,"-");var g=f.split("-");dtime=new Date(Date.UTC(g[0],g[1]-1,g[2],g[3]-8,g[4],g[5])),dtime=parseInt(dtime.getTime()),d=new Date(dtime)}else{var h=2592e6,i=Date.parse(new Date);dtime=parseInt(h+i),d=new Date(dtime)}a.activeItem.params.deadtime=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()+" "+d.getHours()+":"+d.getMinutes()+":"+d.getSeconds(),a.activeItem.params.deadtimeToMin=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()+" "+d.getHours()+":"+d.getMinutes(),c()});var c=function(){var d=Date.parse(new Date),e=dtime-d>0?dtime-d:0;a.activeItem.params.leftTimeText.day=parseInt(e/864e5),a.activeItem.params.leftTimeText.hour=parseInt(e/36e5%24),a.activeItem.params.leftTimeText.min=parseInt(e/6e4%60),a.activeItem.params.leftTimeText.sec=parseInt(e/1e3%60),b(c,1e3)}}]),angular.module("wapeditorApp").controller("CubeCtrl",["$scope",function(a){if(a.activeItem.params&&a.activeItem.params.layout&&_.isEmpty(a.activeItem.params.layout))for(row=0;row<4;row++)for(a.activeItem.params.layout[row]={},col=0;col<4;col++)a.activeItem.params.layout[row][col]={cols:1,rows:1,isempty:!0,imgurl:"",classname:""};$(".layout-table").bind("mouseover",function(a){if("LI"==a.target.tagName){$(".layout-table li").removeClass("selected");var b=$(a.target).attr("data-rows"),c=$(a.target).attr("data-cols");$(".layout-table li").filter(function(a,d){return $(d).attr("data-rows")<=b&&$(d).attr("data-cols")<=c}).addClass("selected")}}),a.activeItem.params.currentLayout={},a.showSelection=function(b,c){a.activeItem.params.currentPos={row:b,col:c},a.activeItem.params.selection={};var d=-1,e=1;for(i=b;i<4;i++){for(y=1,a.activeItem.params.selection[e]={},j=c;j<4;j++)d>=0&&db;b++)for(var c=0;4>c;c++)if(!_.isEmpty(a.activeItem.params.layout[b][c])&&a.activeItem.params.currentLayout.classname==a.activeItem.params.layout[b][c].classname){if(a.activeItem.params.currentLayout.rows>1)for(var d=0;d1)for(var f=0;f1)for(var f=0;f=h?(a.activeItem.params.positionStyle.width=100,a.activeItem.params.positionStyle.height=a.activeItem.params.positionStyle.width*h/w):(a.activeItem.params.positionStyle.height=100,a.activeItem.params.positionStyle.width=a.activeItem.params.positionStyle.height*w/h),a.setModulePositionStyle(a.activeItem.params.positionStyle))}}]),angular.module("wapeditorApp").controller("LineCtrl",["$scope",function(a){}]),angular.module("wapeditorApp").controller("LinkCtrl",["$scope","$http",function(a,b){a.pageSize=_.range(0,30),a.addItem=function(){a.activeItem.params.items.push({title:"",url:"",type:1,selectCate:{name:"",id:0},pageSize:3})},a.removeItem=function(b){index=$.inArray(b,a.activeItem.params.items),items=_.clone(a.activeItem.params.items),a.activeItem.params.items=[];for(i in items)i!=index&&a.activeItem.params.items.push(items[i]);a.changeInnerHeight()},a.showSearchCateList=function(c){a.currentItem=c;var d=$(".js-search-cate-keyword").val();return d="undefined"==typeof d?"":d,b.get("./index.php?c=utility&a=link&do=catelist&keyword="+d).success(function(b,c,d,e){a.searchCateList=[];var f=b.message;for(i in f)a.searchCateList.push({id:f[i].id,name:f[i].name,children:f[i].children});a.modalobj=$("#modal-search-cate-link").modal({show:!0})}),!0},a.selectCateItem=function(b,c,d){return a.currentItem.selectCate={pid:b,cid:c,name:d},a.modalobj.modal("hide"),!0}}]),angular.module("wapeditorApp").controller("NavImgCtrl",["$scope",function(a){a.changeItem=function(b){require(["fileUploader"],function(c){c.show(function(c){b.id=c.id,b.imgurl=c.url,a.$apply()},{direct:!0,multiple:!1})})}}]),angular.module("wapeditorApp").controller("NoticeCtrl",["$scope",function(a){}]),angular.module("wapeditorApp").controller("OnlyTextCtrl",["$scope",function(a){}]),angular.module("wapeditorApp").controller("PureLinkCtrl",["$scope",function(a){a.changeItem=function(b){5==b.id?(a.activeItem.paddingTop=angular.copy(a.activeItem.params.baseStyle.paddingTop),a.activeItem.params.baseStyle.paddingTop=0):a.activeItem.params.baseStyle.paddingTop=a.activeItem.params.baseStyle.paddingTop?a.activeItem.params.baseStyle.paddingTop:a.activeItem.paddingTop,index=$.inArray(b,a.activeItem.params.items);for(i in a.activeItem.params.items)i==index?(a.activeItem.params.items[i].active=1,a.activeItem.params.baseStyle.color=a.activeItem.params.items[i].color,a.activeItem.params.baseStyle.backgroundColor=a.activeItem.params.items[i].discolor):a.activeItem.params.items[i].active=0},a.addImage=function(b){index=$.inArray(b,a.activeItem.params.items);for(i in a.activeItem.params.items)i==index&&require(["fileUploader"],function(b){b.show(function(b){a.saveModulePosition(),a.resetPosition(b),a.activeItem.params.items[i].imgurl=b.url,a.$apply()},{direct:!0,multiple:!1})})},a.resetPosition=function(b){b.width&&b.height&&(a.activeItem.params.positionStyle.width=b.width,a.activeItem.params.positionStyle.height=b.height,a.setModulePositionStyle(a.activeItem.params.positionStyle))}}]),angular.module("wapeditorApp").controller("RewardCtrl",["$scope",function(a){a.changeSize=function(b){switch(a.activeItem.params.fontactive=b,a.activeItem.params.fonttype=b,b){case"big":a.activeItem.params.baseStyle.fontSize="36px";break;case"middle":a.activeItem.params.baseStyle.fontSize="26px";break;case"small":a.activeItem.params.baseStyle.fontSize="16px"}}}]),angular.module("wapeditorApp").controller("RichTextCtrl",["$scope","$sce",function(a,b){a.trustAsHtml=function(a,c){return!a&&c&&(a=c.replace(/\#quot;/g,""")),b.trustAsHtml(a)}}]),angular.module("wapeditorApp").controller("ShapeCtrl",["$scope","$http",function(a,b){a.page={currentPage:1,numPages:1,toPage:"",totalItems:0,pageSize:18},a.addItem=function(){b({method:"GET",url:window.sysinfo.siteroot+"web/resource/images/app/shape/shape.json",cache:!0}).success(function(b){a.sysCategoryList=b.sysCategoryList,a.sysImageTag=b.sysImageTag,a.sysImageList=b.sysImageList,a.activeItem.params.catlistActive=1,a.activeItem.params.imgListActive=4,a.page.numPages=c(),a.pages=e(),d(1),a.currentImageList=g(a.activeItem.params.imgListActive,1),$("#shapeModal").modal("show")})},a.getSysCatAndList=function(b){var f=$.inArray(b,a.sysCategoryList);for(var h in a.sysCategoryList)if(h==f){a.sysCategoryList[h].active=!0,a.activeItem.params.catlistActive=a.sysCategoryList[h].id;var i=1;for(var j in a.sysImageTag)a.sysImageTag[j].parentid==a.sysCategoryList[h].id&&1==i?(a.activeItem.params.imgListActive=a.sysImageTag[j].id,a.sysImageTag[j].active=!0,a.page.numPages=c(),a.pages=e(),d(1),a.currentImageList=g(a.activeItem.params.imgListActive,1),i++):a.sysImageTag[j].active=!1}else a.sysCategoryList[h].active=!1},a.getSysImgByTag=function(b){var f=$.inArray(b,a.sysImageTag);for(var h in a.sysImageTag)h==f?(a.sysImageTag[h].active=!0,a.activeItem.params.imgListActive=a.sysImageTag[h].id,a.page.numPages=c(),a.pages=e(),d(1),a.currentImageList=g(a.activeItem.params.imgListActive,1)):a.sysImageTag[h].active=!1},a.selectSvg=function(c,d){var e=c.target.dataset.url;e=e.split("../"),b({method:"GET",url:window.sysinfo.siteroot+e[1]}).success(function(b){for(var c,d=$(b),e=d.length,f=0;e>f;f++)if("svg"==d[f].tagName){c=d[f];break}a.saveModulePosition();var g=parseFloat($(c).attr("width")),h=parseFloat($(c).attr("height"));g>=h?a.activeItem.params.positionStyle.height=a.activeItem.params.positionStyle.width*h/g:a.activeItem.params.positionStyle.width=a.activeItem.params.positionStyle.height*g/h,a.setModulePositionStyle(a.activeItem.params.positionStyle),a.activeItem.params.svgValue=b,$("#shapeModal").modal("hide")})},a.selectPage=function(b){var b=parseInt(b);b>0&&b<=a.page.numPages&&(a.page.currentPage=b,a.pages=e(),d(b),a.currentImageList=g(a.activeItem.params.imgListActive,b))},a.getImgByPage=function(){var b=parseInt(a.page.toPage);b>0&&b<=a.page.numPages&&(a.page.currentPage=b,a.pages=e(),d(b),a.currentImageList=g(a.activeItem.params.imgListActive,b))};var c=function(){var b=f(a.activeItem.params.imgListActive),c=Math.ceil(b/a.page.pageSize);return c},d=function(b){for(var c in a.pages)b==a.pages[c].number?a.pages[c].active=!0:a.pages[c].active=!1},e=function(){var b=[];if(a.page.numPages<=5)for(var c=1;c<=a.page.numPages;c++)a.page.currentPage==c?b.push({number:c,active:!0}):b.push({number:c,active:!1});else{var d=a.page.currentPage-2,e=a.page.currentPage+2;if(d>0)if(e<=a.page.numPages)b=[{number:d,active:!1},{number:a.page.currentPage-1,active:!1},{number:a.page.currentPage,active:!0},{number:a.page.currentPage+1,active:!1},{number:e,active:!1}];else{var c=a.page.numPages-4;for(c;c<=a.page.numPages;c++)c==a.page.currentPage?b.push({number:c,active:!0}):b.push({number:c,active:!1})}else for(var c=1;5>=c;c++)a.page.currentPage==c?b.push({number:c,active:!0}):b.push({number:c,active:!1})}return b},f=function(b){var c=0;for(var d in a.sysImageList)b==a.sysImageList[d].parentid&&c++;return c},g=function(b,c){var d=[],e=0,c=parseInt(c)>0?parseInt(c):1,f=(c-1)*a.page.pageSize,g=c*a.page.pageSize;for(var h in a.sysImageList)b==a.sysImageList[h].parentid&&(e>=f&&g>e&&d.push(a.sysImageList[h]),e++);return d}}]),angular.module("wapeditorApp").controller("TextNavCtrl",["$scope",function(a){a.addItem=function(){a.activeItem.params.items.push({title:"",url:""}),a.changeInnerHeight()},a.removeItem=function(b){index=$.inArray(b,a.activeItem.params.items),items=_.clone(a.activeItem.params.items),a.activeItem.params.items=[];for(i in items)i!=index&&a.activeItem.params.items.push(items[i]);a.changeInnerHeight()}}]),angular.module("wapeditorApp").controller("TitleCtrl",["$scope",function(a){a.changeNavEnable=function(b){a.activeItem.params.tradition.nav.enable=b}}]),angular.module("wapeditorApp").controller("WhiteCtrl",["$scope",function(a){}]),angular.module("accountApp",["app"]),angular.module("accountApp").controller("AccountDisplay",["$scope","$http","$timeout","config",function(a,b,c,d){a.accountList=d.accountList,a.links=d.links,a.alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","#","全部"],a.activeLetter="",a.searchModule=function(b){a.activeLetter=b,c(function(){$(".button").click()},500)},a.stick=function(c){var d=parseInt(c);b.post(a.links.rank,{id:d}).success(function(a){0==a.message.errno&&location.reload()})}}]),angular.module("accountApp").controller("SystemAccountDisplay",["$scope","config",function(a,b){a.lists=b.lists,a.links=b.links}]),angular.module("accountApp").controller("SystemAccountRecycle",["$scope","config",function(a,b){a.del_accounts=b.del_accounts,a.links=b.links}]),angular.module("accountApp").controller("AccountPostStepOne",["$scope","config",function(a,b){}]),angular.module("accountApp").controller("AccountPostStepTwo",["$scope","config",function(a,b){a.account={},a.uploadMultiImage=function(b){require(["fileUploader"],function(c){c.init(function(c){a.account[b]=c.url,a.$apply(a.account)},{direct:!0,multiple:!1})})},a.delMultiImage=function(b){a.account[b]=""}}]),angular.module("accountApp").controller("AccountPostStepThree",["$scope","$http","config","AccountAppCommon",function(a,b,c,d){a.notify=c.notify,a.owner=c.owner,a.links=c.links,a.selectOwner=function(a){a.preventDefault(),d.selectOwner()},a.changeGroup=function(){var a=$('input[name="uid"]').val();return a?void d.update_package_list($("#groupid").find("option:selected").data("package")):($("#groupid").val(0),util.message("请先选择管理员"),!1)},a.changeText=function(a){var b=$(a)[0].target.text;$(a)[0].target.text="展开"==b?"收起":"展开"},a.addPermission=d.addPermission}]),angular.module("accountApp").controller("AccountPostStepFour",["$scope","config","AccountAppCommon",function(a,b,c){a.account=b.account,a.links=b.links,a.url=b.links.siteroot+"api.php?id="+a.account.acid,a.success=function(a){var a=parseInt(a),b=$(' 复制成功');c.copySuccess(a,b)}}]),angular.module("accountApp").controller("AccountManageBase",["$scope","$http","config","AccountAppCommon",function(a,b,c,d){a.account=c.account,a.uniaccount=c.uniaccount,a.authstate=c.authstate,a.authurl=c.authurl,a.other={headimgsrc:c.headimgsrc,qrcodeimgsrc:c.qrcodeimgsrc,serviceUrl:c.links.siteroot+"api.php?id="+a.account.acid,siteurl:c.links.siteroot,socket_url:c.links.socket_url},a.changeImage=function(b){"headimgsrc"!=b&&"qrcodeimgsrc"!=b||require(["fileUploader"],function(c){c.init(function(c){a.other[b]=c.url,a.$apply(a.other),a.httpChange(b)},{direct:!0,multiple:!1})})},a.success=function(a){var a=parseInt(a),b=$(' 复制成功');d.copySuccess(a,b)},a.editInfo=function(b,c){a.middleAccount={},a.middleAccount[b]=c},a.httpChange=function(e,f){switch(e){case"headimgsrc":case"qrcodeimgsrc":b.post(c.links.basePost,{type:e,imgsrc:a.other[e]}).success(function(b){0==b.message.errno?($(".wechat-img").attr("src",a.other[e]),util.message("修改成功!","","success")):(-1==b.message.errno&&util.message(b.message.message,b.redirect,"error"),1==b.message.errno&&util.message(b.message.message,"","error"),40035==b.message.errno&&util.message(b.message.message,"","error"))});break;case"name":case"account":case"original":case"level":case"key":case"secret":if($("#"+e).modal("hide"),0==a.middleAccount[e].length)return util.message("不可为空!","","error"),!1;b.post(c.links.basePost,{type:e,request_data:a.middleAccount[e]}).success(function(b){0==b.message.errno?(a.account[e]=a.middleAccount[e],util.message("修改成功!","","success")):(1==b.message.errno&&util.message(b.message.message,"","error"),40035==b.message.errno&&util.message(b.message.message,"","error"))});break;case"jointype":if($("#jointype").modal("hide"),1==a.middleAccount.type&&b.post(c.links.basePost,{type:"jointype",request_data:1}).success(function(b){0==b.message.errno?(a.account[e]=a.middleAccount[e],a.account.type=1,util.message("修改成功!","","success")):(1==b.message.errno&&util.message(b.message.message,"","error"),40035==b.message.errno&&util.message(b.message.message,"","error"))}),3==a.middleAccount.type)if(1==c.authurl.errno)util.message(c.authurl.url);else{if(!confirm("必须通过公众号授权登录页面进行授权接入,是否跳转至授权页面..."))return!1;location.href=c.authurl.url}break;case"endtime":$("#endtime").modal("hide");var g=a.middleAccount.endtype,h=$(':text[name="endtime"]').val();b.post(c.links.basePost,{type:e,endtype:g,endtime:h}).success(function(b){0==b.message.errno?(a.account.endtype=g,a.account.end=1==g?"永久":h,util.message("到期时间修改成功!","","success")):(-1==b.message.errno&&util.message(b.message.message,b.redirect,"error"),1==b.message.errno&&util.message(b.message.message,"","error"),40035==b.message.errno&&util.message(b.message.message,"","error"))});break;case"token":if($("#token").modal("hide"),"undefined"==typeof f){if(!confirm("确定要生成新的吗?"))return!1;var i=d.tokenGen()}else{var i=$("#newtoken").val();if(0==i.length)return util.message("不可为空!"),!1;var j=new RegExp(/^[A-Za-z0-9]{3,32}$/);if(!j.test(i))return util.message("必须为英文或者数字,长度为3到32个字符!"),!1}b.post(c.links.basePost,{type:e,request_data:i}).success(function(b){0==b.message.errno?(a.account[e]=i,util.message("修改成功!")):(-1==b.message.errno&&util.message(b.message.message,b.redirect,"error"),1==b.message.errno&&util.message(b.message.message,"","error"),40035==b.message.errno&&util.message(b.message.message,"","error"))});break;case"encodingaeskey":if($("#encodingaeskey").modal("hide"),"undefined"==typeof f){if(!confirm("确定要生成新的吗?"))return!1;var k=d.encodingAESKeyGen()}else{var k=$("#newencodingaeskey").val();if(0==k.length)return util.message("不可为空!"),!1;var j=new RegExp(/^[A-Za-z0-9]{43}$/);if(!j.test(k))return util.message("必须为英文或者数字,长度为43个字符!"),!1}b.post(c.links.basePost,{type:e,request_data:k}).success(function(b){0==b.message.errno?(a.account[e]=k,util.message("修改成功!")):(-1==b.message.errno&&util.message(b.message.message,b.redirect,"error"),1==b.message.errno&&util.message(b.message.message,"","error"),40035==b.message.errno&&util.message(b.message.message,"","error"))})}}}]),angular.module("accountApp").controller("AccountMangeModulesTpl",["$scope","$http","config",function(a,b,c){a.owner=c.owner,a.modules_tpl=c.modules_tpl,a.extend=c.extend,a.changeText=function(a){var b=$(a)[0].target.text;$(a)[0].target.text="展开"==b?"收起":"展开"},a.changeGroup=function(){for(var a=$('input[name="package[]"]'),d=[],e=0;e",e.push($(this).attr("data-name"))}),$("#jurisdiction-add #content-templates").find(".btn-primary").each(function(){d+='",f.push($(this).attr("data-id"))}),a||d?$(".account-package-extra").show():$(".account-package-extra").hide(),$(".account-package-extra .js-extra-modules").append(a),$(".account-package-extra .js-extra-templates").append(d),$("#jurisdiction-add").modal("hide"),b.post(c.links.postModulesTpl,{type:"extend",module:e,tpl:f}).success(function(a){0==a.message.errno?location.reload():40035==a.message.errno&&util.message("参数错误!")})}}]),angular.module("accountApp").controller("AccountManageUsers",["$scope","$http","config",function(a,b,c){a.permissions=c.permissions,a.state=c.state,a.setPermission=function(a){var a=parseInt(a);location.href=c.links.setPermission+"&uid="+a},a.delPermission=function(a){var a=parseInt(a);return confirm("确认删除当前选择的用户?")?void(location.href=c.links["delete"]+"&uid="+a):!1},a.addOwner=function(){$("#owner-modal").modal("hide");var b=$.trim($("#add-owner-username").val());a.requestPost(3,b)},a.changeOwner=function(a){$("#owner-modal").modal("show"),$("#add-owner-username").val(a)},a.addUsername=function(){$("#user-modal").modal("hide");var b=$.trim($("#add-username").val()),c=$(".addtype2").is(":checked");a.requestPost(c?2:1,b)},a.requestPost=function(a,d){if(!d)return util.message("请输入用户名."),!1;var a=parseInt(a);b.post(c.links.addUser,{username:d,addtype:a}).success(function(a){0==a.message.errno?location.reload():(-1==a.message.errno&&util.message("用户不存在或已被删除!"),1==a.message.errno&&util.message("添加失败,请稍候重试!"),2==a.message.errno&&util.message(d+"已经是该公众号的操作员或管理员,请勿重复添加!"),3==a.message.errno&&util.message("用户未通过审核,请联系网站管理员审核通过后再行添加!"),4==a.message.errno&&util.message("管理员不可操作其他管理员!"),5==a.message.errno&&util.message(a.message.message))})}}]),angular.module("accountApp").controller("AccountManageSms",["$scope","$http","config",function(a,b,c){a.notify=c.notify,a.signatures=c.signatures,a.editSms=function(b,c){a.middleSms={},a.middleSms[b]=c},a.httpChange=function(d){switch(d){case"balance":$("#balance").modal("hide"),b.post(c.links.postSms,{type:d,balance:a.middleSms[d]}).success(function(b){0==b.message.errno?(a.notify.sms[d]=b.message.message.num,util.message("修改成功!")):(-1==b.message.errno&&util.message("您现有短信数量为0,请联系服务商购买短信!"),1==b.message.errno&&util.message("修改失败!请稍候重试!"))});break;case"signature":$("#signature").modal("hide"),b.post(c.links.postSms,{type:d,signature:a.middleSms[d]}).success(function(b){0==b.message.errno?(a.notify.sms[d]=a.middleSms[d],util.message("设置成功!")):(40035==b.message.errno&&util.message("参数错误!"),1==b.message.errno&&util.message("修改失败!请稍候重试!"))})}}}]),angular.module("accountApp").controller("SystemPlatform",["$scope","$http","config","AccountAppCommon",function(a,b,c,d){a.platform=c.platform,a.url=c.url,a.success=function(a){var a=parseInt(a),b=$(' 复制成功');d.copySuccess(a,b)},a.httpChange=function(e,f){switch(e){case"authstate":var g=1==a.platform.authstate?0:1;b.post(c.links.platformPost,{authstate:g}).success(function(b){0==b.message.errno?(a.platform.authstate=g,util.message("修改成功!","","success")):1==b.message.errno&&util.message("修改失败,请稍后重试!")});break;case"appid":$("#AppID").modal("hide");var h=$("#newappid").val();b.post(c.links.platformPost,{appid:h}).success(function(b){0==b.message.errno?(a.platform.appid=h,util.message("修改成功!")):1==b.message.errno&&util.message("修改失败,请稍后重试!")});break;case"appsecret":$("#AppSecret").modal("hide");var i=$("#newappsecret").val();b.post(c.links.platformPost,{appsecret:i}).success(function(b){0==b.message.errno?(a.platform.appsecret=i,util.message("修改成功!")):1==b.message.errno&&util.message("修改失败,请稍后重试!")});break;case"token":if("undefined"==typeof f){if(!confirm("确定要生成新的吗?"))return!1;var j=d.tokenGen()}else{var j=$("#newtoken").val();if(0==j.length)return util.message("不可为空!"),!1;var k=new RegExp(/^[A-Za-z0-9]{3,32}$/);if(!k.test(j))return util.message("必须为英文或者数字,长度为3到32个字符!"),!1}b.post(c.links.platformPost,{token:j}).success(function(b){0==b.message.errno?(a.platform.token=j,util.message("修改成功!")):1==b.message.errno&&util.message("修改失败,请稍后重试!")});break;case"encodingaeskey":if("undefined"==typeof f){if(!confirm("确定要生成新的吗?"))return!1;var l=d.encodingAESKeyGen()}else{var l=$("#newencodingaeskey").val();if(0==l.length)return util.message("不可为空!"),!1;var k=new RegExp(/^[A-Za-z0-9]{43}$/);if(!k.test(l))return util.message("必须为英文或者数字,长度为43个字符!"),!1}b.post(c.links.platformPost,{encodingaeskey:l}).success(function(b){0==b.message.errno?(a.platform.encodingaeskey=l,util.message("修改成功!")):1==b.message.errno&&util.message("修改失败,请稍后重试!")})}}}]),angular.module("accountApp").service("AccountAppCommon",["$rootScope","$http","config",function(a,b,c){var d={};return d.addPermission=function(){var a="",b="";$("#jurisdiction-add #content-modules").find(".btn-primary").each(function(){a+=''+$(this).attr("data-title")+''}),$("#jurisdiction-add #content-templates").find(".btn-primary").each(function(){b+=''+$(this).attr("data-title")+''}),a||b?$(".account-package-extra").show():$(".account-package-extra").hide(),$(".account-package-extra .js-extra-modules").html(a),$(".account-package-extra .js-extra-templates").html(b),$("#jurisdiction-add").modal("hide")},d.update_package_list=function(a){$('input[name="package[]"]').prop("checked",!1),$('input[name="package[]"]').prop("disabled",!1);for(i in a)$('input[name="package[]"][value="'+a[i]+'"]').prop("checked",!0),$('input[name="package[]"][value="'+a[i]+'"]').prop("disabled",!0)},d.selectOwner=function(){var a=[];require(["biz"],function(e){e.user.browser(a,function(a){b.post(c.links.userinfo,{uid:a}).success(function(a){a.message.errno&&util.message(a.message.message),$("#manager").val(a.message.message.uid),$("#showname").val(a.message.message.username),$("#groupid").val(a.message.message.group.id),$(".account-package-extra").show(),d.update_package_list(a.message.message["package"])})},{mode:"invisible",direct:!0})})},d.copySuccess=function(a,b){var a=parseInt(a),b=b,c=$("#copy-"+a).next().html();(!c||c.indexOf(' 复制成功')<0)&&$("#copy-"+a).after(b),setTimeout(function(){b.remove()},2e3)},d.tokenGen=function(){for(var a="abcdefghijklmnopqrstuvwxyz0123456789",b="",c=0;32>c;c++){var d=parseInt(32*Math.random());b+=a[d]}return b},d.encodingAESKeyGen=function(){for(var a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",b="",c=0;43>c;c++){var d=parseInt(61*Math.random()+1);b+=a[d]}return b},d}]),angular.module("replyFormApp",["app"]),angular.module("replyFormApp").controller("KeywordReply",["$scope","$http","config",function(a,b,c){a.reply={advanceTrigger:!1,status:!0,showAdvance:!1,keyword:{exact:"",indistinct:"",contain:"",regexp:""},entry:c.replydata},a.reply.entry?(a.reply.entry.istop=a.reply.entry.displayorder>=255?1:0,a.reply.status=1==a.reply.entry.status,a.reply.entry.keywords&&(1==a.reply.entry.reply_type&&angular.forEach(a.reply.entry.keywords,function(a,b){"1"==a.type&&(this.exact+=0==this.exact.length?a.content:","+a.content),"2"==a.type&&(this.contain+=0==this.contain.length?a.content:","+a.content),"3"==a.type&&(this.regexp+=0==this.regexp.length?a.content:","+a.content),"4"==a.type},a.reply.keyword),2==a.reply.entry.reply_type&&angular.forEach(a.reply.entry.keywords,function(b,c){this.exact+=0==this.exact.length?b.content:","+b.content,"2"==b.type&&(a.reply.advanceTrigger=!0)},a.reply.keyword))):a.reply.entry={istop:0,reply_type:2,displayorder:"",id:"",keywords:[],module:"",name:"",status:1,uniacid:c.uniacid},a.changeStatus=function(){a.reply.status=!a.reply.status},a.changeTriggerType=function(){"exact"==a.reply.advanceTrigger&&(a.reply.advanceTrigger=!1),"indistinct"==a.reply.advanceTrigger&&(a.reply.advanceTrigger=!0)},a.changeShowAdvance=function(){a.reply.showAdvance=!a.reply.showAdvance},$.isFunction(window.initReplyController)&&window.initReplyController(a,b),a.submitForm=function(){if(""==$.trim($(':text[name="rulename"]').val()))return util.message("必须输入回复规则名称"),!1;$(':hidden[name="reply_type"]').val(a.reply.entry.reply_type);var c=[];switch(parseInt(a.reply.entry.reply_type)){case 1:var d=a.reply.keyword.exact.replace(",",",").split(",");d=_.union(d),angular.forEach(d,function(a){""!=a&&c.push({type:1,content:a})},c);var e=a.reply.keyword.contain.replace(",",",").split(",");e=_.union(e),angular.forEach(e,function(a){""!=a&&c.push({type:2,content:a})},c);var f=a.reply.keyword.regexp.replace(",",",");""!=f&&c.push({type:3,content:f});break;case 2:if(a.reply.advanceTrigger){var g=a.reply.keyword.exact.replace(",",",").split(",");g=_.union(g),angular.forEach(g,function(a){""!=a&&c.push({type:2,content:a})},c)}else{var d=a.reply.keyword.exact.replace(",",",").split(",");d=_.union(d),angular.forEach(d,function(a){""!=a&&c.push({type:1,content:a})},c)}}if(0==c.length)return util.message("请输入有效的触发关键字."),!1;if(c=angular.toJson(c),$(':hidden[name="keywords"]').val(c),$.isFunction(window.validateReplyForm)){var h=window.validateReplyForm(this,$,_,util,a,b);if(!h)return!1;$(".reply-form-submit").click()}else $(".reply-form-submit").click()},a.initEmotion=function(b){2==a.reply.entry.reply_type?util.emotion($("#keyword-emoji"),$("#keyword-input-exact"),function(b,c,d){a.reply.keyword.exact=$(d).val()}):(util.emotion($("#emoji-exact"),$("#keyword-exact"),function(b,c,d){a.reply.keyword.exact=$(d).val()}),util.emotion($("#emoji-indistinct"),$("#keyword-indistinct"),function(b,c,d){a.reply.keyword.contain=$(d).val()}))},a.checkKeyWord=function(a){var d=$(a.target),e=d.val().trim();if(""==e)return d.parent().next().next().text(""),!1;var f=(d.attr("data-type"),d.index(".keyword-input")),g=!0;return $(".keyword-input").each(function(a){var b=$(this).val().trim();return e==b&&f!=a?(g=!1,!1):void 0}),g===!1?(d.parent().next().next().text(""),util.message("该关键字已重复存在于当前规则中."),!1):void b.post("./index.php?c=platform&a=reply&do=post",{keyword:e}).success(function(a){if(0==a.message.errno){var b=$('input[name="rid"]').val(),e=JSON.parse(a.message.message),f="";for(rule in e)b!=e[rule].id&&(f+=""+e[rule].name+" ");""!=f&&d.parent().next().next().html("该关键字已存在于 "+f+" 规则中.")}else d.parent().next().next().text("")})}}]),angular.module("replyFormApp").controller("ApplyReply",["$scope",function(a){a.alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],a.activeLetter="",a.searchModule=function(b){a.activeLetter=b}}]),angular.module("replyFormApp").controller("KeywordDisplay",["$scope","$http",function(a,b){a.changeStatus=function(a){var c=$("#key-"+a).attr("class");b.post("./index.php?c=platform&a=reply&do=change_keyword_status",{id:a}).success(function(b){0==b.message.errno?(c.match("switchOn")?$("#key-"+a).removeClass("switchOn"):$("#key-"+a).addClass("switchOn"),util.message("修改成功!")):util.message("网络错误,请稍候重试")}).error(function(a){util.message("网络错误,请稍候重试")})}}]),angular.module("replyFormApp").controller("serviceDisplay",["$scope","config","$http",function(a,b,c){a.config=b,a.userapi=b.userapi,a.changeStatus=function(b){a.userapi[b]["switch"]=""==a.userapi[b]["switch"]?"checked":"",c.post(a.config.url,{rid:b,m:"userapi"}).success(function(a){0==a.message.errno?util.message("修改成功!"):util.message("网络错误,请稍候重试")})}}]),angular.module("replyFormApp").controller("SpecialDisplay",["$scope","config","$http",function(a,b,c){a.config=b,a.url=b.url,a.msgtypes={image:a.config.image,voice:a.config.voice,video:a.config.video,shortvideo:a.config.shortvideo,location:a.config.location,trace:a.config.trace,link:a.config.link,merchant_order:a.config.merchant_order,ShakearoundUserShake:a.config.ShakearoundUserShake,ShakearoundLotteryBind:a.config.ShakearoundLotteryBind,WifiConnected:a.config.WifiConnected},a.switch_class=new Array,angular.forEach(a.msgtypes,function(b,c){a.switch_class[c]="module"==b||"keyword"==b?"switch switchOn special_switch":"switch special_switch"}),a.changestatus=function(b){c.post(a.url,{type:b}).success(function(c){0==c.message.errno?(a.switch_class[b]="switch switchOn special_switch"==a.switch_class[b]?"switch special_switch":"switch switchOn special_switch", util.message("修改成功!")):util.message(c.message.message)})}}]),angular.module("replyFormApp").controller("PostCtrl",["$scope","config","$http",function(a,b,c){require(["underscore","util"],function(b,c){window.initReplyController(a)}),a.switch_class=b["class"],a.status="module"==b.status||"keyword"==b.status?b.status:"",a.change=function(b,c){a.status=0==c?1:0,a.switch_class=1==a.status?"switch switchOn special_switch":"switch special_switch"}}]),angular.module("replyFormApp").controller("WelcomeDisplay",["$scope",function(a){$.isFunction(window.initReplyController)&&window.initReplyController(a)}]),angular.module("replyFormApp").controller("DefaultDisplay",["$scope",function(a){$.isFunction(window.initReplyController)&&window.initReplyController(a)}]),angular.module("replyFormApp").directive("ngInvoker",["$parse",function(a){return function(a,b,c){a.$eval(c.ngInvoker)}}]),angular.module("replyFormApp").directive("ngMyEditor",function(){var a={scope:{value:"=ngMyValue"},template:'',link:function(b,c,d){if(!c.data("editor")){var e={autoClearinitialContent:!1,toolbars:[["fullscreen","source","preview","|","bold","italic","underline","strikethrough","forecolor","backcolor","|","justifyleft","justifycenter","justifyright","|","insertorderedlist","insertunorderedlist","blockquote","emotion","link","removeformat","|","rowspacingtop","rowspacingbottom","lineheight","indent","paragraph","fontfamily","fontsize","|","inserttable","deletetable","insertparagraphbeforetable","insertrow","deleterow","insertcol","deletecol","mergecells","mergeright","mergedown","splittocells","splittorows","splittocols","|","anchor","map","print","drafts"]],elementPathEnabled:!1,initialFrameHeight:200,focus:!1,maximumWords:9999999999999,autoFloatEnabled:!1};a=UE.getEditor("editor",e),c.data("editor",a),a.addListener("contentChange",function(){b.value=a.getContent().replace(/\"\;/g,'"'),b.$root.$$phase||b.$apply("value")}),$(c).parents("form").submit(function(){a.queryCommandState("source")&&a.execCommand("source")}),a.addListener("ready",function(){a&&a.getContent()!=b.value&&a.setContent(b.value),b.$watch("value",function(b){a&&a.getContent()!=b&&a.setContent(b?b:"")})})}}};return a}),angular.module("replyFormApp").filter("nl2br",["$sce",function(a){return function(b){return b?a.trustAsHtml(b.replace(/\n/g,"
    ")):""}}]),angular.module("cloudApp",["app"]),angular.module("cloudApp").controller("FileProcessorCtrl",["$scope","$http","config",function(a,b,c){a.files=c.files,a.fails=[];var d=a.files.length,e=1,f="",g=function(){var h=a.files.pop();if(!h)return util.message("文件同步完成,正在处理数据同步......"),void("theme"==c.type?location.href="./index.php?c=cloud&a=process&step=schemas&t="+c.appname+"&is_upgrade="+c.is_upgrade:"webtheme"==c.type?location.href="./index.php?c=cloud&a=process&step=schemas&w="+c.appname+"&is_upgrade="+c.is_upgrade:location.href="./index.php?c=cloud&a=process&step=schemas&m="+c.appname+"&is_upgrade="+c.is_upgrade+"&batch=1&account_type="+c.account_type);a.file=h,a.pragress=e+"/"+d;var i={path:h,type:c.type};b.post(location.href,i).success(function(b){e++,"success"!=b&&(a.fails.push("["+b+"] "+h),f=b),g()}).error(function(){e++,a.fails.push(h),g()})};g()}]).controller("SchemasProcessorCtrl",["$scope","$http","config",function(a,b,c){a.schemas=c.schemas,a.fails=[];var d=c.is_module_install,e=a.schemas.length,f=1,g=function(){util.message("未能成功执行处理数据库, 请联系开发商解决. ")},h=function(){var c=a.schemas.pop();if(!c)return a.fails.length>0?void g():void(1==d?location.href="":location.href="");a.schema=c,a.pragress=f+"/"+e;var i={table:c};b.post(location.href,i).success(function(b){return f++,"success"!=b&&a.fails.push(c),b.message?void util.message(b.message):void h()}).error(function(){f++,a.fails.push(c),h()})};h()}]).controller("CloudDiagnoseCtrl",["$scope","$http","config",function(a,b,c){a.showToken=function(){util.message("Token:"+$("#token").val(),"","info")},$(".js-checkip p").each(function(){var a=$(this);$.getJSON("./index.php?c=cloud&a=diagnose&do=testapi&ip="+a.find("#serverdnsip").html(),function(b){a.find("#checkresult").html(b.message)})}),$.ajax({type:"get",data:{date:c.date,version:c.version,siteurl:c.siteurl},url:"https://v2.addons.we7.cc/web/index.php?c=site&a=diagnose&jsonpcallback=?",dataType:"jsonp",success:function(a){"0"==a.check_time.errno?$("#check-time").html(' 正常'):$("#check-time").html(' 异常,当前时间为:'+a.check_time.message.localtime+"; 服务器时间为:"+a.check_time.message.servertime),"0"==a.check_touch.errno?$("#check-touch").html(' 正常'):$("#check-touch").html(' 异常,'+a.check_touch.message)},error:function(){alert("fail")}})}]),angular.module("fansApp",["app"]).value("config",{running:!1,syncState:"",downloadState:""}).controller("DisplayCtrl",["$scope","$http","config","$q",function(a,b,c,d){a.config=c,a.addTagUrl=c.addTagUrl,a.tag="",a.searchMod=c.searchMod,a.closeValue=0,a.switchSearchMod=function(b){a.searchMod=b,a.$apply(a.searchMod)},a.addTag=function(){b.post(a.addTagUrl,{tag:a.tag}).success(function(a){})},a.downloadFans=function(d,e){e||(e=0),void 0==d&&(d="",util.message("正在下载粉丝数据...")),b.post(c.syncAllUrl,{next_openid:d}).success(function(b){return 0!=b.message.errno?(util.message(b.message.message),!1):(e+=parseInt(b.message.message.count),b.message.message.total<=e||!b.message.message.count&&!b.message.message.next?(a.sync("all"),!1):void a.downloadFans(b.message.message.next,e))})},a.sync=function(e,f){if("all"==e)f||(f={},f.pageindex=0,f.total=0,util.message("粉丝数据下载完成。开始更新粉丝数据...","","success")),f.type="all";else{if(f={type:"check",openids:[]},$(".openid:checked").each(function(){f.openids.push(this.value)}),0==f.openids.length)return util.message("请选择粉丝","","info"),!1;util.message("正在同步粉丝数据请不要关闭浏览器...")}if(f.pageindex>0&&0==a.closeValue){$("#modal-message").modal("hide");var g=util.dialog("更新进度",'
    ',"",{containerName:"link-container"});g.modal("show")}$(".close").click(function(){a.closeValue=1});var h=d.defer(),i=h.promise;i.then(function(){b.post(a.config.syncUrl,f).success(function(b){if(void 0==b.message)return util.message("更新失败!可能是由于你当前网络不稳定,请稍后再试。","","info"),!1;if(0==b.message.errno){if("success"==b.message.message||b.message.message.total==b.message.message.pageindex)return util.message("同步粉丝数据成功",c.msgUrl,"success"),!1;a.sync("all",{pageindex:b.message.message.pageindex,total:b.message.message.total})}else{if(++f.pageindex>f)return util.message("同步粉丝数据成功",c.msgUrl,"success"),!1;a.sync("all",{pageindex:++f.pageindex,total:f.total})}})},function(a){}),1==a.closeValue?a.closeValue=0:h.resolve()}}]).controller("chatsCtrl",["$scope","$http","config",function(a,b,c){send=function(){types=[],types.text=$('[name="reply[reply_basic]"]').val(),types.news=$('[name="reply[reply_news]"]').val(),types.image=$('[name="reply[reply_image]"]').val(),types.music=$('[name="reply[reply_music]"]').val(),types.voice=$('[name="reply[reply_voice]"]').val(),types.video=$('[name="reply[reply_video]"]').val(),types.wxcard=$('[name="reply[reply_wxcard]"]').val();for(type in types)if(""!=types[type]){msg_type=type,msg_content=types[type];break}$.post(c.sendurl,{type:msg_type,content:msg_content},function(b){b=$.parseJSON(b),-1==b.message.errno?util.message("由于粉丝48小时内未与你互动,你不能主动与粉丝聊天","","info"):(a.chatLogs.unshift({createtime:b.message.message.createtime,content:b.message.message.content}),a.$apply())})},a.chatLogs=c.chatLogs,window.onbeforeunload=function(){$.get(c.endurl,{},function(a){})}}]),angular.module("homeApp",["app"]),angular.module("homeApp").controller("WelcomeCtrl",["$scope","$http","config",function(a,b,c){a.notices=c.notices,a.loaderror=0,a.last_modules=null,a.fans_kpi=[],b({method:"POST",url:"./index.php?c=home&a=welcome&do=get_fans_kpi"}).success(function(b){0==b.message.errno&&(a.fans_kpi=b.message.message)}),a.get_last_modules=function(){b.post("./index.php?c=home&a=welcome&do=get_last_modules").success(function(b){0==b.message.errno?a.last_modules=b.message.message:(a.last_modules=null,a.loaderror=1)})},a.get_last_modules()}]),angular.module("massApp",["app"]),angular.module(["massApp"]).controller("MassSend",["$scope","$http","config",function(a,b,c){a.showLog=function(a){var d=parseInt(a),e=$("#"+d);b.post(c.logUrl,{tid:d,type:"mass",module:"task"}).success(function(a){a=angular.toJson(a);var b="";a.message&&0!=a.message.items.length?$.each(a.message.items,function(a,c){b+=""+c.createtime+" "+c.note+""}):b=' 暂无数据',e.popover({html:!0,placement:"left",trigger:"manual",title:"触发日志",content:''+b+"
    "}),e.popover("toggle")})},a.hideLog=function(a){var b=parseInt(a),c=$("#"+b);c.popover("toggle")}}]),angular.module("massApp").controller("MassPost",["$scope","config",function(a,b){a.groups=b.groups,a.massdata=b.massdata,a.clock=b.massdata?b.massdata.clock:"08:00",$.isFunction(window.initReplyController)&&window.initReplyController(a),a.checkSubmit=function(c){var d=$(".mass-group").val();if(""==d)return c.preventDefault(),util.message("请选择群发对象"),!1;if(angular.forEach(a.groups,function(a,b){a.id==d&&$(':hidden[name="group"]').val(angular.toJson(a))}),""==a.clock)return c.preventDefault(),util.message("请选择群发具体时间"),!1;if("0"==b.day){var e=a.clock.split(":"),f=new Date,g=f.getHours(),h=f.getMinutes();if(e[0]"+b.message.message,"","error"):a.days[d].info=""}),!1):!1},a.toEdit=function(a){var a=parseInt(a);window.location.href="./index.php?c=platform&a=mass&do=post&day="+a},a.preview=function(c){var c=parseInt(c);if(!a.days[c].info)return util.message("群发内容错误!"),!1;var d=a.days[c].info.media_id,e=a.days[c].info.msgtype;$("#modal-view").modal("show"),$("#modal-view .btn-view").unbind().click(function(){var a=$.trim($("#modal-view #wxname").val());return a?($("#modal-view").modal("hide"),b.post("./index.php?c=platform&a=mass&do=preview",{media_id:d,wxname:a,type:e}).success(function(a){0!=a.message.errno?util.message(a.message.message):util.message("发送成功","","success")}),!1):(util.message("微信号不能为空","","error"),!1)})}}]),angular.module("materialApp",["app"]),angular.module("materialApp").directive("ngMyEditor",function(){var a={scope:{value:"=ngMyValue"},template:'',link:function(a,b,c){b.data("editor")||util.editor("editor",{allow_upload_video:0,callback:function(c,d){b.data("editor",d),d.addListener("contentChange",function(){a.value=d.getContent(),a.$root.$$phase||a.$apply("value")}),d.addListener("ready",function(){d&&d.getContent()!=a.value&&d.setContent(a.value),a.$watch("value",function(a){d&&d.getContent()!=a&&d.setContent(a?a:"")})})}})}};return a}).controller("materialDisplay",["$scope","$http","config",function(a,b,c){a.materialList=c.materialList,a.groups=c.group,a.config=c,a.group="",a.materialType="",a.materialId="",a.syncNews=c.syncNews,a.hidenbutton=0,a.sync=function(d,e,f,g,h){$(window).bind("beforeunload",function(){return"您输入的内容尚未保存,确定离开此页面吗?"}),void 0==e?util.message("正在同步素材,请勿关闭浏览器..."):util.message("已同步"+parseInt((e-1)/f*100)+"%,请勿关闭浏览器..."),b.post(c.sync_url,{type:d,pageindex:e,total:f,wechat_existid:g,original_newsid:h}).success(function(b){0==b.message.errno?($(window).unbind("beforeunload"),util.message("同步素材成功","./index.php?c=platform&a=material&type="+d,"success")):(sync_info=b.message.message,a.sync(sync_info.type,sync_info.pageindex,sync_info.total,sync_info.wechat_existid,sync_info.original_newsid))})},1==a.syncNews&&a.sync("news"),a.upload=function(a,b,c){fileUploader.init(function(){util.message("上传成功",location.href,"success")},{type:a,direct:!0,multiple:b,isWechat:c})},a.del_material=function(a,d,e){return confirm("删除不可恢复确认删除吗?")?void b.post(c.del_url,{material_id:d,type:a,server:e}).success(function(b){0!=b.message.errno?util.message("删除失败,具体原因:"+b.message.message,"","info"):util.message("删除成功","./index.php?c=platform&a=material&type="+a+("local"==e?"&islocal=true":""),"success")}):!1},a.checkGroup=function(b,c){$("#check-group").modal("show"),a.materialType=b,a.materialId=c,a.group=""},a.transToWechat=function(d,e){util.message("素材转换将在后台运行,成功后后自动刷新页面,请勿关闭浏览器..."),b.post(c.trans_url,{material_id:e}).success(function(b){0!=b.message.errno?util.message("转换失败,具体原因:"+b.message.message,"","info"):a.sync(d)})},a.newsToWechat=function(c){util.message("素材转换将在后台运行,成功后后自动刷新页面,请勿关闭浏览器..."),b.post(a.config.postwechat_url,{material_id:c}).success(function(a){0==a.message.errno?util.message("已保存","./index.php?c=platform&a=material","success"):alert("创建图文失败"+a.message.message)})},a.sendMaterial=function(){b.post(a.config.send_url,{type:a.materialType,id:a.materialId,group:a.group}).success(function(b){1==b.message.errno?util.message(b.message.message,"","info"):util.message("群发成功","./index.php?c=platform&a=material&type="+a.materialType,"success")})}}]).controller("materialAdd",["$scope","material","$http","$timeout",function(a,b,c,d){a.config=b,a.operate=b.operate,a.changeClass=function(){a.hidenbutton=0,angular.forEach(a.materialList,function(b,c){""!=b.content_source_url&&(a.hidenbutton=1),"0"==c?a.materialList[c]["class"]=a.activeIndex==c?"cover-appmsg-item active":"cover-appmsg-item":a.materialList[c]["class"]=a.activeIndex==c?"appmsg-item active":"appmsg-item"}),angular.isObject(a.materialList[a.activeIndex])&&""!=a.materialList[a.activeIndex].content_source_url?(a.hidenbutton=1,$(".nav-tabs > li:first").attr("class",""),$(".nav-tabs > li:last").attr("class","active"),$("#appmsg-edit").attr("class","tab-pane"),$("#appmsg-link").attr("class","tab-pane active")):($(".nav-tabs > li:first").attr("class","active"),$(".nav-tabs > li:last").attr("class",""),$("#appmsg-edit").attr("class","tab-pane active"),$("#appmsg-link").attr("class","tab-pane"))},a.tomedia=function(a){var c="";return $.ajax({url:b.url,async:!1,data:{url:a},success:function(a){var a=$.parseJSON(a);c=a.message.message}}),c},a.changeOrder=function(c,d){b={},"down"==c?(b=a.materialList[d],a.materialList[d]=a.materialList[d+1],a.materialList[d+1]=b):(b=a.materialList[d],a.materialList[d]=a.materialList[d-1],a.materialList[d-1]=b)},a.deleteMaterial=function(b){confirm("确定要删除吗?")&&(a.materialList.splice(b,1),a.activeIndex=a.activeIndex-1)},a.changeIndex=function(b){a.activeIndex=b,a.changeClass()},a.addMaterial=function(){void 0==a.materialList?(a.materialList=[],a.activeIndex=0):a.activeIndex=a.materialList.length,a.materialList.push({id:"",title:"",author:"",thumb:"",media_id:"",displayorder:"0",digest:"",content:"",content_source_url:"",show_cover_pic:0,"class":""}),a.changeClass()},"add"==a.operate&&"reply"!=a.config.type?a.addMaterial():(a.activeIndex=0,a.materialList=[],angular.forEach(b.materialList,function(b,c){b.thumb_url=a.tomedia(b.thumb_url),""!=b.content_source_url&&(a.hidenbutton=1),a.materialList[c]={id:b.id,title:b.title,author:b.author,thumb:b.thumb_url,media_id:b.thumb_media_id,displayorder:c,digest:b.digest,content:b.content,content_source_url:b.content_source_url,url:b.url,show_cover_pic:isNaN(Number(b.show_cover_pic))?0:Number(b.show_cover_pic),"class":""}}),a.changeClass()),a.pickPicture=function(b){isWechat="wechat"==b,fileUploader.init(function(b){a.materialList[a.activeIndex].thumb=b.url,a.materialList[a.activeIndex].media_id=b.media_id,a.$apply()},{type:"image",direct:!0,multiple:!1,isWechat:isWechat,image_limit:a.config.image_limit,voice_limit:a.config.voice_limit,video_limit:a.config.video_limit})},a.updateSelection=function(){a.materialList[a.activeIndex].show_cover_pic=isNaN(Number(!a.materialList[a.activeIndex].show_cover_pic))?0:Number(!a.materialList[a.activeIndex].show_cover_pic)},a.saveNews=function(b){news=[];var d="",e="";if(angular.forEach(a.materialList,function(a,c){""==a.title?(d=c,e="请输入标题后,再点击保存按钮"):""==a.content&&"wechat"==b?(d=c,e="请输入一段正文,再点击保存按钮"):""==a.content&&"wechat"==b?(d=c,e="图文内容中图片上传失败,请重新上传"):(a.displayorder=c+1,news[c]=a)}),""!==d)return a.activeIndex=d,a.changeClass(),alert(e),!1;util.message("正在生成图文消息,请勿关闭浏览器...");var f="add"==a.config.operate?"":a.config.materialList[0].attach_id;c.post(a.config.newsUpload_url,{news:news,operate:a.operate,attach_id:f,type:a.config.type,target:b,news_rid:a.config.news_rid}).success(function(b){0==b.message.errno?util.message("已保存",a.config.msg_url,"success"):alert("创建图文失败"+b.message.message)})}}]),angular.module("memberAPP",["app"]),angular.module("memberAPP").controller("group",["$scope","$http","config",function(a,b,c){a.config=c,a.group_level=a.config.group_level,a.group_person_count=a.config.group_person_count,a.group_list=a.config.group_list,a.default_group=a.config.default_group,a.set_group_detail_info=function(c){a.group_detail={},b.post(a.config.get_group_url,{group_id:c}).success(function(b){1==b.message.errno?util.message(b.message.message,"","error"):a.group_detail=b.message.message}),$("#group_detail").modal("show")},a.change_group_level=function(){b.post(a.config.change_group_level_url,{group_level:a.group_level}).success(function(a){0==a.message.errno?util.modal_message("","设置成功","","success"):util.message("设置失败","","error")})},a.save_group=function(){return""==a.group_detail.title?(util.message("请填写会员组名称","","error"),!1):void b.post(a.config.save_group_url,{group:a.group_detail}).success(function(b){1==b.message.errno&&util.message(b.message.message,"","error"),2==b.message.errno&&($("#group_detail").modal("hide"),a.group_list[a.group_detail.groupid]=a.group_detail,util.message(b.message.message,"","success")),3==b.message.errno&&(groupid=b.message.message.groupid,a.group_list[groupid]=b.message.message,$("#group_detail").modal("hide"),util.message("添加成功","","success"))})},a.set_default=function(c){b.post(a.config.set_default_url,{group_id:c}).success(function(b){0==b.message.errno?(a.group_list[c].isdefault=1,a.group_list[a.default_group.groupid].isdefault=0,a.default_group=a.group_list[c],a.apply(a),util.message("设置成功","","success")):util.message("设置失败","","error")})},a.del_group=function(c){return confirm("确定要删除吗?")?void b.post(a.config.del_group_url,{group_id:c}).success(function(b){0==b.message.errno?(delete a.group_list[c],util.message("删除成功","","success")):util.message("删除失败","","error")}):!1}}]),angular.module("menuApp",["app"]),angular.module("menuApp").controller("menuDisplay",["$scope","config","$http",function(a,b,c){push_url=b.push_url,a.changeStatus=function(a,b,d){b=1==b?2:1,3==d&&(1==b?$(".js-switch-"+a).addClass("switchOn"):2==b&&$(".js-switch-"+a).removeClass("switchOn")),c.post(push_url,{id:a,status:b}).success(function(a){0==a.message.errno?3==d?util.message(a.message.message,a.redirect):util.message(a.message.message,a.redirect):3==d?util.message(a.message.message,"error"):util.message(a.message.message,a.redirect,"error")})}}]),angular.module("menuApp").controller("conditionMenuDesigner",["$scope","config","$http",function(a,b,c){current_menu_url=b.current_menu_url,require(["underscore","jquery.ui","jquery.caret","district"],function(a,b,b,c){b(".tpl-district-container").each(function(){var a={};a.province=b(this).find(".tpl-province")[0],a.city=b(this).find(".tpl-city")[0];var d={};d.province=b(a.province).data("value"),d.city=b(a.city).data("value"),c.render(a,d,{withTitle:!0,wechat:!0})}),b(".designer-y").sortable({items:"dd",axis:"y",cancel:".js-not-sortable"}),b(".designer-x").sortable({items:".js-sortable",axis:"x"})}),a.context={},a.context.group=b.group,b.id>0&&1!=b.type&&1==b.status&&(a.context.group.disabled=1),a.context.group||(a.context.group={title:"",type:b.type,button:[{name:"菜单名称",type:"click",url:"",key:"",media_id:"",sub_button:[]}],matchrule:{sex:0,client_platform_type:0,group_id:-1,country:"",province:"",city:"",language:""}}),a.$watch("context.group.matchrule.province",function(a,b){""==a?$(".tpl-city").hide():$(".tpl-city").show()}),a.context.activeIndex=0,a.context.activeBut=a.context.group.button[a.context.activeIndex],a.context.activeItem=a.context.activeBut,a.context.activeType=1,a.context.remove=function(){return confirm("删除默认菜单会清空所有菜单记录,确定吗?")?(location.href=b.delete_url,!1):!1},a.context.submit=function(){var d=a.context.group;d.button=_.sortBy(d.button,function(a){var b=$(':hidden[data-role="parent"][data-hash="'+a.$$hashKey+'"]');return b.parent().index()}),angular.forEach(d.button,function(a){a.sub_button=_.sortBy(a.sub_button,function(a){var b=$(':hidden[data-role="sub"][data-hash="'+a.$$hashKey+'"]');return b.parent().index()})});$(':hidden[name="menu_media"]').val();if(!$.trim(d.title))return util.message("没有设置菜单组名称","","error"),!1;if(2==b.type&&!(d.matchrule.sex||d.matchrule.client_platform_type||-1!=d.matchrule.group_id||d.matchrule.province||d.matchrule.city))return util.message("没有设置个性化菜单的匹配规则","","error"),!1;if(d.button.length<1)return util.message("没有设置菜单","","error"),!1;var e={name:"",action:""};return angular.forEach(d.button,function(a,b){""==$.trim(a.name)&&(this.name+="第"+(b+1)+"个一级菜单未设置菜单名称
    "),a.sub_button.length>0?angular.forEach(a.sub_button,function(c,d){""==$.trim(c.name)&&(this.name+="第"+(b+1)+"个一级菜单中的第"+(d+1)+"个二级菜单未设置菜单名称
    "),"view"==c.type&&c.url.indexOf("http")<0&&(this.action+="第"+(b+1)+"个一级菜单中的第"+(d+1)+"个二级菜单跳转链接缺少http标识
    "),("view"==c.type&&""==$.trim(c.url)||"click"==c.type&&""==c.media_id&&""==c.key||"view"!=c.type&&"click"!=c.type&&""==$.trim(c.key))&&(this.action+="菜单【"+a.name+"】的子菜单【"+c.name+"】未设置操作选项.
    ")},e):("view"==a.type&&a.url.indexOf("http")<0&&(this.action+="菜单【"+a.name+"】跳转链接缺少http标识.
    "),("view"==a.type&&""==$.trim(a.url)||"click"==a.type&&""==a.media_id&&""==a.key||"view"!=a.type&&"click"!=a.type&&""==$.trim(a.key))&&(this.action+="菜单【"+a.name+"】不存在子菜单并且未设置操作选项.
    "))},e),e.name?void util.message(e.title,"","error"):e.action?void util.message(e.action,"","error"):($("#btn-submit").attr("disabled",!0),void c.post(location.href,{group:d,method:"post"}).success(function(a){0!=a.message.errno?($("#btn-submit").attr("disabled",!1),util.message(a.message.message,"","error")):util.message("创建菜单成功. ",a.redirect,"success")}))},a.context.triggerActiveBut=function(b){var c=$.inArray(b,a.context.group.button);return-1==c?!1:(a.context.activeIndex=c,a.context.activeBut=a.context.group.button[a.context.activeIndex],a.context.activeItem=a.context.activeBut,void(a.context.activeType=1))},a.context.editBut=function(b,d,e){a.context.triggerActiveBut(d),b?(a.context.activeItem=b,a.context.activeType=2):(a.context.activeItem=d,a.context.activeType=1),e&&(a.context.activeItem.material=[],"view"!=a.context.activeItem.type&&"click"!=a.context.activeItem.type&&(a.context.activeItem.key?current_type=a.context.activeItem.key.substr(0,6):current_type="click","module"==current_type?a.context.activeItem.etype="module":a.context.activeItem.etype="click"),c.post(current_menu_url,{current_menu:a.context.activeItem}).success(function(b){0==b.message.errno&&a.context.activeItem.material.push(b.message.message)}))},a.context.addBut=function(){if(!(a.context.group.button.length>=3)){a.context.group.button.push({name:"菜单名称",type:"click",url:"",key:"",media_id:"",sub_button:[]});var b=a.context.group.button[a.context.group.button.length-1];a.context.triggerActiveBut(b),$(".designer-x").sortable({items:".js-sortable",axis:"x"})}},a.context.removeBut=function(b,c){if(1==c){if(!confirm("将同时删除所有子菜单,是否继续"))return!1;a.context.group.button=_.without(a.context.group.button,b),a.context.triggerActiveBut(a.context.group.button[0])}else a.context.activeBut.sub_button=_.without(a.context.activeBut.sub_button,b),a.context.triggerActiveBut(a.context.activeBut)},a.context.addSubBut=function(b){return 1==a.context.group.disabled?!1:(a.context.triggerActiveBut(b),void(a.context.activeBut.sub_button.length>=5||(a.context.activeBut.sub_button.push({name:"子菜单名称",type:"click",url:"",key:"",media_id:""}),$(".designer-y").sortable({items:"dd",axis:"y",cancel:".js-not-sortable"}),a.context.activeItem=a.context.activeBut.sub_button[a.context.activeBut.sub_button.length-1],a.context.activeType=2)))},a.context.selectEmoji=function(){util.emojiBrowser(function(b){var c="::"+b.find("span").text()+"::";$("#title").setCaret(),$("#title").insertAtCaret(c),a.context.activeItem.name=$("#title").val(),a.$digest()})},a.context.select_link=function(){$(this).parent().prev();util.linkBrowser(function(c){var d=b.site_url;return"tel:"==c.substring(0,4)?void util.message("自定义菜单不能设置为一键拨号"):(-1==c.indexOf("http://")&&-1==c.indexOf("https://")&&(c=c.replace("./index.php?","/index.php?"),c=d+"app"+c),a.context.activeItem.url=c,void a.$digest())})},a.context.search=function(){var c=$("#ipt-forward").val();$.post(b.search_key_url,{key_word:c},function(b){var b=$.parseJSON(b),c=b.length,d="";if(c>0)for(var e=0;c>e;e++)d+='
  • '+b[e]+"
  • ";else d+='
  • 没有找到您输入的关键字
  • ';$("#key-result ul").html(d),$('#key-result ul li a[id!="no-result"]').click(function(){$("#ipt-forward").val($(this).html()),a.context.activeItem.key=$(this).html(),$("#key-result").hide()}),$("#key-result").show()})},a.context.select_mediaid=function(b,c){var d={type:b,ignore:{basic:"basic"!==b,wxcard:"wxcard"!==b,image:"image"!==b,music:"music"!==b,news:"news"!==b,video:"video"!==b,voice:"voice"!==b,keyword:"keyword"!==b,module:"module"!==b}};util.material(function(d){a.context.activeItem.key="",a.context.activeItem.media_id=d.media_id,a.context.activeItem.material=[],"keyword"==b?(a.context.activeItem.material.push(d),a.context.activeItem.material[0].type="keyword",a.context.activeItem.key="keyword:"+d.child_items[0].content,a.context.activeItem.media_id="","1"==c&&(a.context.activeItem.material[0].etype="click",a.context.activeItem.material[0].name=d.name,a.context.activeItem.material[0].content=d.child_items[0].content)):"image"==b?a.context.activeItem.material.push(d):"news"==b?a.context.activeItem.material.push(d):"voice"==b?a.context.activeItem.material.push(d):"video"==b?a.context.activeItem.material.push(d):"module"==b&&(a.context.activeItem.key="module:"+d.name,a.context.activeItem.material.push(d),a.context.activeItem.material[0].module_type=a.context.activeItem.material[0].type,a.context.activeItem.material[0].type="module",a.context.activeItem.material[0].etype="module"),a.$digest()},d)},a.context.editBut("",a.context.group.button[0],a.context.group.id)}]),angular.module("moduleApp",["app"]),angular.module("moduleApp").controller("ModuleMoreCtrl",["$scope","config",function(a,b){a.activeLetter="",a.searchModule=function(a){location.href=b.searchurl+"&letter="+a}}]).controller("moduleGroupCtrl",["$scope",function(a){a.changeText=function(a){var b=$(a)[0].target.text;$(a)[0].target.text="展开"==b?"收起":"展开"}}]).controller("moduleGroupPostCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.moduleGroup=null===c.moduleGroup?{title:""}:c.moduleGroup,a.groupHaveModuleApp=0==c.groupHaveModuleApp.length?{}:c.groupHaveModuleApp,a.groupHaveModuleWxapp=0==c.groupHaveModuleWxapp.length?{}:c.groupHaveModuleWxapp,a.groupNotHaveModuleApp=c.groupNotHaveModuleApp,a.groupNotHaveModuleWxapp=c.groupNotHaveModuleWxapp,a.groupHaveTemplate=0==c.groupHaveTemplate.length?{}:c.groupHaveTemplate,a.groupNotHaveTemplate=c.groupNotHaveTemplate,a.selectedModules=[],a.addModule=function(){$("#add_module").modal("show")},a.addModuleWxapp=function(){$("#add_module_wxapp").modal("show")},a.adTemplate=function(){$("#add_template").modal("show")},a.selectModule=function(b,c){a.selectedModules.push(b),"template"!=c?$("#"+c+"-"+b.mid).removeClass("hidden"):$("#"+c+"-"+b.id).removeClass("hidden"),"module"==c&&""!=b.main_module&&void 0!=a.groupNotHaveModuleApp[b.main_module]&&(a.selectedModules.push(a.groupNotHaveModuleApp[b.main_module]),$("#"+c+"-"+a.groupNotHaveModuleApp[b.main_module].mid).removeClass("hidden"))},a.cancleModule=function(b,c){if(have_plugin=!1,angular.forEach(a.selectedModules,function(a){a.main_module==b.name&&(have_plugin=!0)}),1==have_plugin)return!1;"template"!=c?$("#"+c+"-"+b.mid).addClass("hidden"):$("#"+c+"-"+b.id).addClass("hidden");var d=_.indexOf(a.selectedModules,b);d>-1&&(a.selectedModules=_.without(a.selectedModules,a.selectedModules[d]))},a.addHaveModule=function(){angular.forEach(a.selectedModules,function(b,c){delete a.groupNotHaveModuleApp[b.name],a.groupHaveModuleApp[b.name]=b}),a.selectedModules=[],$("#add_module").modal("hide")},a.addHaveModuleWxapp=function(){angular.forEach(a.selectedModules,function(b,c){delete a.groupNotHaveModuleWxapp[b.name],a.groupHaveModuleWxapp[b.name]=b}),a.selectedModules=[],$("#add_module_wxapp").modal("hide")},a.addHaveTemplate=function(){angular.forEach(a.selectedModules,function(b,c){delete a.groupNotHaveTemplate[b.name],a.groupHaveTemplate[b.name]=b}),a.selectedModules=[],$("#add_template").modal("hide")},a.delHaveModule=function(b){delete a.groupHaveModuleApp[b.name],a.groupNotHaveModuleApp[b.name]=b,""!=b.plugin&&angular.forEach(a.groupHaveModuleApp,function(c){c.main_module==b.name&&(delete a.groupHaveModuleApp[c.name],a.groupNotHaveModuleApp[c.name]=c)})},a.delHaveModuleWxapp=function(b){delete a.groupHaveModuleWxapp[b.name],a.groupNotHaveModuleWxapp[b.name]=b},a.delHaveTemplate=function(b){delete a.groupHaveTemplate[b.name],a.groupNotHaveTemplate[b.name]=b},a.saveGroup=function(){return param={id:a.moduleGroup.id,name:a.moduleGroup.name,modules:a.groupHaveModuleApp,wxapp:a.groupHaveModuleWxapp,templates:a.groupHaveTemplate},""===param.name||void 0===param.name?(util.message("请输入套餐名","","info"),!1):void b({method:"POST",url:a.config.url,data:param,beforeSend:function(){$(".loader").show()},complete:function(){$(".loader").hide()}}).success(function(a){return 1==a.message.errno?(util.message(a.message.message,"","info"),!1):void util.message("提交成功",a.message.message,"success")})}}]).controller("installedCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.isFounder=c.isFounder,a.letters=["全部"],angular.forEach(c.letters,function(b){a.letters.push(b)}),a.letter=c.letter,a.module_list=c.module_list,a.allModules=c.allModules,a.moduleinfo={},a.cloudModule=c.cloudModule,a.upgradeInfo={},check_module=[],angular.forEach(a.module_list,function(a,b){check_module.push(b)}),b.post(a.config.checkUpgradeUrl,{module_list:check_module}).success(function(b){0==b.message.errno&&angular.forEach(b.message.message,function(b){a.module_list[b.name].upgrade=b.upgrade,a.module_list[b.name].upgrade_info=b.upgrade_info,a.module_list[b.name].from=b.from})}),a.searchLetter=function(a){$(':hidden[name="letter"]').val(a),$("#search").click()},a.editModule=function(c){$("#module-info").modal("show"),""!=c&&b.post(a.config.editModuleUrl,{mid:c}).success(function(b){a.moduleinfo=b.message.message,a.moduleinfo.logo=a.moduleinfo.logo+"?v="+(new Date).getTime(),a.moduleinfo.preview=a.moduleinfo.preview+"?v="+(new Date).getTime()})},a.changePicture=function(b){fileUploader.init(function(c){a.moduleinfo[b]=c.url, a.$apply(a.moduleinfo)},{type:"image",direct:!0,multiple:!1})},a.delPicture=function(b){a.moduleinfo[b]=""},a.save=function(){b.post(a.config.saveModuleUrl,{moduleinfo:a.moduleinfo}).success(function(b){0==b.message.message&&(a.moduleinfo.logo=a.moduleinfo.logo+"?v="+(new Date).getTime(),a.moduleinfo.preview=a.moduleinfo.preview+"?v="+(new Date).getTime(),a.module_list[a.moduleinfo.name].title=a.moduleinfo.title,a.module_list[a.moduleinfo.name].logo=a.moduleinfo.logo)})},a.setUpgradeInfo=function(c){b.post(a.config.get_upgrade_info_url,{name:c}).success(function(b){0==b.message.errno?(a.upgradeInfo=b.message.message,$("#upgrade-info").modal("show")):1==b.message.errno&&util.message(b.message.message)})},a.upgrade=function(a,b,c){return confirm("本次升级需要花费"+a+"个交易币。确认升级?")?void(location.href="./index.php?c=cloud&a=redirect&do=buybranch&m="+b+"&branch="+c+"&is_upgrade=1"):!1}}]).controller("notInstalledCtrl",["$scope","config",function(a,b){a.letters=["全部"],angular.forEach(b.letters,function(b){a.letters.push(b)}),a.letter=b.letter,a.module_list=b.module_list,a.searchLetter=function(a){$(':hidden[name="letter"]').val(a),$("#search").click()}}]).controller("detailCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.isFounder=c.isFounder,a.receive_ban=c.receive_ban,a.moduleinfo=c.moduleInfo,a.subscribe=2,a.checkupgrade=0,a.show=c.show,a.editType="",b.post(a.config.checkReceiveUrl,{module_name:c.modulename}).success(function(b){0==b.message.errno&&(a.subscribe=1)}),b({method:"POST",url:a.config.checkUpgradeUrl,data:{module_list:{0:c.modulename}},beforeSend:function(){"upgrade"==a.show&&$(".loader").show()},complete:function(){$(".loader").hide()}}).success(function(c){0==c.message.errno&&1==c.message.message[0].upgrade&&(a.checkupgrade=1,"cloud"==c.message.message[0].from?b.post(a.config.get_upgrade_info_url,{name:a.moduleinfo.name}).success(function(b){0==b.message.errno?a.upgradeInfo=b.message.message:1==b.message.errno&&util.message(b.message.message)}):a.upgradeInfo=c.message.message[0])}),a.changeShow=function(b){a.show=b},a.changeSwitch=function(){a.receive_ban=1==a.receive_ban?2:1,b.post(a.config.url,{modulename:a.config.modulename}).success(function(a){0==a.message.errno&&util.message("更新成功!")})},a.editModule=function(b){$("#module-info").modal("show"),a.editType=b},a.changePicture=function(b){fileUploader.init(function(c){a.moduleinfo[b]=c.url,a.$apply(a.moduleinfo)},{type:"image",direct:!0,multiple:!1})},a.delPicture=function(b){a.moduleinfo[b]=""},a.upgrade=function(a,b,c){return confirm("本次升级需要花费"+a+"个交易币。确认升级?")?void(location.href="./index.php?c=cloud&a=redirect&do=buybranch&m="+b+"&branch="+c+"&is_upgrade=1"):!1},a.save=function(){b.post(a.config.saveModuleUrl,{moduleinfo:a.moduleinfo,type:a.editType}).success(function(b){0==b.message.errno&&(util.message("修改成功","","success"),a.moduleinfo.logo=a.moduleinfo.logo+"?v="+(new Date).getTime(),a.moduleinfo.preview=a.moduleinfo.preview+"?v="+(new Date).getTime(),a.$apply(a.moduleinfo))})},change=function(a){clas="wi wi-angle-down"==a.find("i").prop("class")?"wi wi-angle-up":"wi wi-angle-down",text="wi wi-angle-down"==clas?"查看详情":"收起",a.html(text+'')}}]).controller("templateCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.templateList=c.templateList,a.upgradeInfo={},a.checkUpgrade=function(){b.post(a.config.url,{template:a.templateList}).success(function(b){0==b.message.errno&&(a.templateList=b.message.message)})},a.checkUpgrade(),a.setUpgradeInfo=function(c){b.post(a.config.get_upgrade_info_url,{name:c}).success(function(b){0==b.message.errno?(a.upgradeInfo=b.message.message,$("#upgradeInfo").modal("show")):1==b.message.errno&&util.message(b.message.message)})},a.upgrade=function(a){return confirm("本次升级需要花费"+a+"个交易币。确认升级?")}}]),angular.module("paycenterApp",["cfp.hotkeys"]).controller("microPay",["$scope","$timeout","config","$http","hotkeys","servicePaycenterBase",function(a,b,c,d,e,f){card=$.parseJSON(c.card_set_str),e.add({combo:"return+up",description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){a.micro.submit()}}),e.add({combo:"esc",description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){a.micro.reset()}}),e.add({combo:"backspace",description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){a.micro.counter_handler("backspace"),b.preventDefault()}}),e.add({combo:"-",description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){"0"!=a.micro.config.fee?a.micro.mcardPayManage():util.message("请输入金额","","error")}}),e.add({combo:"+",description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){"0"!=a.micro.config.fee?a.micro.wechatPayManage():util.message("请输入金额","","error")}}),nums=["7","8","9","4","5","6","1","2","3","0","."],a.micro=f.paycenterBaseData(card),angular.forEach(nums,function(b,c){e.add({combo:b,description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){a.micro.counter_handler(b.key)}})}),a.micro.mcardPayManage=function(){$("#mcard-pay").on("shown.bs.modal",function(){$(".js-input").focus();var b=2;e.add({combo:"return",description:"Description goes here",allowIn:["INPUT"],callback:function(c,d){input_count=a.micro.input_count(),b>input_count&&a.micro.submit(),$('input[tabindex="'+b+'"]').focus(),b++}}),e.del("backspace"),angular.forEach(nums,function(a,b){e.del(a)})}),$("#mcard-pay").on("hidden.bs.modal",function(){e.del("return"),angular.forEach(nums,function(b,c){e.add({combo:b,description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){a.micro.counter_handler(b.key)}})})}),$("#mcard-pay").modal("show")},a.micro.wechatPayManage=function(){$("#wechat-pay").on("shown.bs.modal",function(){$(".js-input").focus(),e.add({combo:"return",description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){a.micro.submit()}}),e.del("backspace"),angular.forEach(nums,function(a,b){e.del(a)})}),$("#wechat-pay").on("hidden.bs.modal",function(){e.del("return"),angular.forEach(nums,function(b,c){e.add({combo:b,description:"Description goes here",allowIn:["INPUT"],callback:function(b,c){a.micro.counter_handler(b.key)}})})}),$("#wechat-pay").modal("show")},a.micro.num=function(b){a.micro.counter_handler(b)},a.$watch("micro.config.code",function(a,b){a&&a.length>0&&$(".js-pay-warning").html("")}),a.micro.counter_handler=function(b){return b+="","backspace"==b?(current_fee_length=a.micro.config.fee.length,void("1"==current_fee_length?a.micro.config.fee="0":a.micro.config.fee=a.micro.config.fee.substr(0,current_fee_length-1))):"clear"==b?void(a.micro.config.fee="0"):"0"==a.micro.config.fee&&"1"==a.micro.config.fee.length&&"."!=b?void(a.micro.config.fee=b):void(a.micro.config.fee.length>=9||8==a.micro.config.fee.length&&"."==b||a.micro.config.fee.indexOf(".")>-1&&(float=a.micro.config.fee.split("."),float[1]&&float[1].length>=2||"."==b)||(a.micro.config.fee+=b))},a.micro.reset=function(){a.micro.config.fee="0"},a.$watch("micro.config.offset_money",function(b,c){var d=Math.floor(a.micro.config.member.credit1/a.micro.config.card.offset_rate);a.micro.config.offset_money=parseInt(b),b>=d&&(a.micro.config.offset_money=d),b||(a.micro.config.offset_money=0),a.micro.config.credit1=a.micro.config.card.offset_rate*a.micro.config.offset_money,a.micro.checkLast_money()}),a.$watch("micro.config.credit2",function(b,c){reg=/^\d*\.{0,1}\d{0,1}\d{0,1}$/,reg.test(b)||(a.micro.config.credit2=c),b>a.micro.config.member.credit2&&(a.micro.config.credit2=a.micro.config.member.credit2),a.micro.checkLast_money()}),a.$watch("micro.config.last_money",function(b,c){0>b&&(a.config.last_money=0),a.micro.checkLast_money()}),a.micro.checkBasic=function(){var b=$.trim(a.micro.config.body);if(!b)return util.message("商品名称不能为空"),!1;var c=/^(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$/,d=$.trim(a.micro.config.fee);return c.test(d)?void 0:(util.message("支付金额不能少于0.01元"),!1)},a.micro.input_count=function(){return input_count=$("#mcard-pay input.js-input").length,input_count},a.$watch("micro.config.cardsn",function(b,c){11==b.length?a.micro.checkCard():(a.micro.config.member.uid=-1,a.micro.config.credit2=0,b.length>11&&(a.micro.config.card_error="会员卡卡号错误"))}),a.micro.mcardPay=function(b){"0"==a.micro.config.fee?util.message("请输入金额","","error"):(a.micro.config.cardsn="",a.micro.config.member.uid=-1),"1"==b?a.micro.mcardPayManage():"2"==b&&a.micro.wechatPayManage()},a.micro.is_showCode=function(){Math.floor(a.micro.config.member.credit1/a.micro.config.card.offset_rate);a.micro.config.fact_fee<=a.micro.config.member.credit2?a.micro.config.is_showCode=0:a.micro.config.card.offset_rate>0?(max=a.micro.config.fact_fee-a.micro.config.member.credit2-Math.floor(a.micro.config.member.credit1/a.micro.config.card.offset_rate),reg=/^-?[1-9]\d*$/,max>0?a.micro.config.is_showCode=1:0==max?a.micro.config.is_showCode=0:reg.test(max)?a.micro.config.is_showCode=0:a.micro.config.is_showCode=1):(max=a.micro.config.fact_fee-a.micro.config.member.credit2,max>0?a.micro.config.is_showCode=1:a.micro.config.is_showCode=0)},a.micro.checkCard=function(){a.micro.checkBasic();var b=$.trim(a.micro.config.cardsn);return 11!=b.length?(util.message("卡号不足11位","","error"),!1):(a.micro.config.loading="加载中..",a.micro.config.card_error="",d.post(c.card_check_url,{cardsn:b}).success(function(b){if(a.micro.config.loading="",-1!=b.message.errno){a.micro.config.card_error="",a.micro.config.member=b.message.message,a.micro.config.fact_fee=a.micro.config.fee;var c=parseInt(a.micro.config.fee),d=parseInt(a.micro.config.member.discount.condition);return a.micro.config.member.discount_type>0&&a.micro.config.member.discount&&c>=d&&(1==a.micro.config.member.discount_type?(a.micro.config.fact_fee=a.micro.config.fee-a.micro.config.member.discount.discount,a.micro.config.fact_fee=a.micro.config.fact_fee.toFixed(2)):a.micro.config.fact_fee=a.micro.config.fee*a.micro.config.member.discount.discount,a.micro.config.fact_fee<0&&(a.micro.config.fact_fee=0)),a.micro.last_money=a.micro.config.fact_fee,a.micro.checkCredit2(),a.micro.is_showCode(),!1}a.micro.config.card_error=b.message.message}),void 0)},a.micro.checkCredit2=function(){a.micro.checkLast_money(),a.micro.config.credit2=Math.min.apply(null,[a.micro.config.member.credit2,a.micro.last_money]),a.micro.checkLast_money()},a.micro.checkLast_money=function(){var b=a.micro.config.fact_fee-a.micro.config.credit2-a.micro.config.offset_money;0>b&&(a.config.last_money=0),a.micro.last_money=b.toFixed(2)},a.micro.query=function(){return a.micro.uniontid?void d.post("{php echo url('paycenter/wxmicro/query');}",{uniontid:a.micro.uniontid}).success(function(a){0==a.message.errno?(util.message("支付成功","","success"),location.reload()):util.message("支付失败:"+a.message.message,"","error")}):(util.message("系统错误","","error"),!1)},a.micro.checkpay=function(){d.post(c.checkpay_url,{uniontid:a.micro.uniontid}).success(function(d){console.dir(d),"SUCCESS"==d.message.trade_state?util.message("支付成功",c.redirect_url,"error"):"NOTPAY"==d.message.trade_state?util.message("支付失败:用户取消支付",c.redirect_url,"error"):"USERPAYING"==d.message.trade_state?b(function(){a.micro.checkpay()},5e3):util.message(d.message.trade_state_desc,c.redirect_url,"error")})},a.micro.submit=function(){return confirm("确认支付吗?")?(1==a.micro.config.is_showCode||a.micro.config.member.uid<=0)&&!$.trim(a.micro.config.code)?($(".js-pay-warning").html("支付授权码不能为空"),!1):(1==a.micro.config.is_showCode?a.micro.config.cash=a.micro.last_money:a.micro.config.cash=0,a.micro.config.member.uid>0&&(a.micro.checkLast_money(),a.micro.last_money-a.micro.config.cash!=0)?(util.message("支付方式设置的支付金额不等于实际支付金额","","error"),!1):void d.post(c.pay_url,a.micro.config).success(function(c){return 0==c.message.errno?util.message(c.message.message,c.redirect,"success"):-1==c.message.errno?(util.message("支付失败:"+c.message.message,"","error"),$('#form1 :text[name="code"]').val("")):-10==c.message.errno&&($(".js-userpaying").show(),a.micro.uniontid=c.message.uniontid,b(function(){a.micro.checkpay()},5e3)),!1})):!1}}]),angular.module("paycenterApp").filter("credit1_num",["$rootScope",function(a){return function(a){return a=Math.floor(a)}}]),angular.module("paycenterApp").service("servicePaycenterBase",["$rootScope",function(a){var b={},c={config:{body:"刷卡支付收款",fee:"0",cardsn:"",card:"",credit1:0,credit2:0,last_money:0,offset_money:0,is_showCode:0,loading:"",card_error:"",member:{uid:0,credit2:0},nums:[["7","7"],["8","8"],["9","9"],["4","4"],["5","5"],["6","6"],["1","1"],["2","2"],["3","3"],["0","0"],[".","."],["clear","清除"]]}};return b.paycenterBaseData=function(a){return c.config.card=a,c},b}]),angular.module("profileApp",["app"]),angular.module("profileApp").controller("oauthCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.oauthHost=c.oauthHost,a.oauthAccount=c.oauthAccount,a.oauthtitle=c.oauthAccounts[c.oauthAccount],a.jsOauthAccount=c.jsOauth,a.jsOauthtitle=c.jsOauthAccounts[c.jsOauth],a.oauthAccounts=c.oauthAccounts,a.jsOauthAccounts=c.jsOauthAccounts,a.originalHost=a.oauthHost,a.recover=function(){a.oauthHost=a.originalHost},a.saveOauth=function(c){param={},"oauth"==c&&(param={type:"oauth",account:a.oauthAccount,host:a.oauthHost},a.oauthtitle=a.oauthAccounts[a.oauthAccount]),"jsoauth"==c&&(param={type:"jsoauth",account:a.jsOauthAccount},a.jsOauthtitle=a.jsOauthAccounts[a.jsOauthAccount]),b.post(a.config.oauth_url,param).success(function(b){0==b.message.errno&&(a.originalHost=a.oauthHost,$('[data-toggle="modal"]').modal("hide"))})}}]).controller("tplCtrl",["$scope","$http","config",function(a,b,c){a.tplList=c.tplList,a.active="",a.activetpl="",a.changeActive=function(b){a.active=b,a.activetpl=a.tplList[b].tpl},a.saveTpl=function(){original_tpl=a.tplList[a.active].tpl,a.tplList[a.active].tpl=a.activetpl,b.post(c.url,{tpl:a.tplList}).success(function(b){1==b.message.errno?(a.tplList[a.active].tpl=original_tpl,util.message("请填写正确的"+b.message.message+"模板id","","info")):$(".modal").modal("hide")})}}]).controller("emailCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.setting=a.config.setting,a.type=void 0==a.setting.smtp?"163":a.setting.smtp.type,a.changeType=function(a){var b=$(a)[0].target;$(b).attr("type","password")}}]).controller("paymentCtrl",["$scope","$http","config","$timeout",function(a,b,c,d){a.config=c,a.paysetting=c.paysetting,a.aliaccounthelp=!1,a.alipartnerhelp=!1,a.alisecrethelp=!1,a.saveEdit=function(c){if("wechat_facilitator"==c&&a.paysetting.wechat_facilitator["switch"]===!0){if(""==a.paysetting.wechat_facilitator.mchid)return util.message("请填写服务商商户号","","info"),!1;if(""==a.paysetting.wechat_facilitator.signkey)return util.message("请填写服务商商户支付密钥","","info"),!1}if("alipay"==c&&a.paysetting.alipay["switch"]===!0){if(""==a.paysetting.alipay.partner)return util.message("请填写合作者身份","","info"),!1;if(""==a.paysetting.alipay.account)return util.message("请填写收款支付宝账号","","info"),!1;if(""==a.paysetting.alipay.secret)return util.message("请填写校验密钥","","info"),!1}if("wechat"==c){if(1==a.paysetting.wechat["switch"])if(1==a.paysetting.wechat.version){if(""==a.paysetting.wechat.partner)return util.message("请填写商户身份","","info"),!1;if(""==a.paysetting.wechat.key)return util.message("请填写商户秘钥","","info"),!1;if(""==a.paysetting.wechat.signkey)return util.message("请填写通信秘钥","","info"),!1}else{if(""==a.paysetting.wechat.mchid)return util.message("请填写商户号","","info"),!1;if(""==a.paysetting.wechat.apikey)return util.message("请填写支付秘钥","","info"),!1}if(3==a.paysetting.wechat["switch"]){if(""==a.paysetting.wechat.service)return util.message("请选择服务商公众号","","info"),!1;if(""==a.paysetting.wechat.sub_mch_id)return util.message("请填写子商户号","","info"),!1}}if("unionpay"==c){if(1==a.paysetting.unionpay["switch"]){if(""==a.paysetting.unionpay.merid)return util.message("请填写商户号","","info"),!1;if(""==a.paysetting.unionpay.signcertpwd)return util.message("请填写商户私钥证书密码","","info"),!1}return $("#form1").submit(),!1}if("baifubao"==c&&a.paysetting.baifubao["switch"]===!0){if(""==a.paysetting.baifubao.mchid)return util.message("请填写商户号","","info"),!1;if(""==a.paysetting.baifubao.signkey)return util.message("请填写商户支付密钥","","info"),!1}return"line"==c&&a.paysetting.line["switch"]===!0&&""==a.paysetting.line.message?(util.message("请填写账户信息","","info"),!1):void b.post(a.config.saveurl,{type:c,param:a.paysetting[c]}).success(function(b){0==b.message.errno&&("delivery"==c||"credit"==c?a.paysetting[c]["switch"]=a.paysetting[c]["switch"]!==!0:$(".modal").modal("hide"))})},$(".modal").on("hide.bs.modal",function(){b.post(a.config.get_setting_url,{}).success(function(b){a.paysetting=b.message.message})}),a.test_alipay=function(){b.post(a.config.text_alipay_url,{param:a.paysetting.alipay}).success(function(a){return null!==a.message.message?(location.href=a.message.message,!1):void alert("配置失败")})},a.changeSwitch=function(b,c){a.paysetting[b]["switch"]=c},a.changeVersion=function(b){a.paysetting.wechat.version=b},a.tokenGen=function(b){for(var c="abcdefghijklmnopqrstuvwxyz0123456789",d="",e=0;32>e;e++){var f=parseInt(32*Math.random());d+=c[f]}"wechat_facilitator.signkey"==b&&(a.paysetting.wechat_facilitator.signkey=d),"wechat.apikey"==b&&(a.paysetting.wechat.apikey=d)}}]).controller("creditCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.creditSetting=c.creditSetting,a.tactics={activity:c.activity,currency:c.currency},a.creditTitle="",a.activeCredit="",a.activeTacticsType="",a.enabledCredit=c.enabledCredit,a.activeTactics="",a.syncSetting=c.syncSetting,a.changeEnabled=function(c){a.creditSetting[c].enabled=1==a.creditSetting[c].enabled?0:1,b.post(a.config.saveCreditSetting,{credit_setting:a.creditSetting}).success(function(a){})},a.editCreditTactics=function(b){$("#tactics").modal("show"),a.activeTacticsType=b,a.activeTactics=a.tactics[b]},a.editCreditName=function(b){a.activeCredit=b,$("#credit-name").modal("show"),a.creditTitle=a.creditSetting[b].title},a.setCreditName=function(){a.creditSetting[a.activeCredit].title=a.creditTitle,b.post(a.config.saveCreditSetting,{credit_setting:a.creditSetting}).success(function(a){})},a.setCreditTactics=function(){b.post(a.config.saveTacticsSetting,{setting:a.tactics}).success(function(a){})}}]).controller("syncCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.syncSetting=c.syncSetting,a.setSync=function(){a.syncSetting=1==a.syncSetting?0:1,b.post(a.config.saveSyncSetting,{setting:a.syncSetting}).success(function(a){})}}]).controller("ucCtrl",["$scope","$http","config",function(a,b,c){a.config=c,a.uc=c.uc,$("#submit").click(function(){var b=$("#textarea").val(),c=b.split(";"),d=new Array;for(var e in c){var f=c[e].indexOf("UC"),g=c[e].indexOf("', '"),h=c[e].indexOf("')"),i=c[e].substring(f,g),j=c[e].substring(g+4,h);d[i]=j}a.uc.connect=d.UC_CONNECT,a.uc.appid=d.UC_APPID,a.uc.key=d.UC_KEY,a.uc.charset=d.UC_CHARSET,a.uc.dbhost=d.UC_DBHOST,a.uc.dbuser=d.UC_DBUSER,a.uc.dbname=d.UC_DBNAME,a.uc.dbpw=d.UC_DBPW,a.uc.dbcharset=d.UC_DBCHARSET,a.uc.dbtablepre=d.UC_DBTABLEPRE,a.uc.dbconnect=d.UC_DBCONNECT,a.uc.api=d.UC_API,a.uc.ip=d.UC_IP,a.$digest()}),$("#form1").submit(function(){if("1"==$(':radio[name="status"]:checked').val()){if(""==$.trim($(':text[name="title"]').val()))return util.message("必须输入通行证名称.","","error"),!1;var a=parseInt($(':text[name="appid"]').val());if(isNaN(a))return util.message("必须输入UCenter应用的ID.","","error"),!1;if(""==$.trim($(':text[name="key"]').val()))return util.message("必须输入与UCenter的通信密钥.","","error"),!1;if(""==$.trim($(':text[name="charset"]').val()))return util.message("必须输入UCenter的字符集.","","error"),!1;if("mysql"==$(':radio[name="connect"]:checked').val()){if(""==$.trim($(':text[name="dbhost"]').val()))return util.message("必须输入UCenter数据库主机地址.","","error"),!1;if(""==$.trim($(':text[name="dbuser"]').val()))return util.message("必须输入UCenter数据库用户名.","","error"),!1;if(""==$.trim($(':text[name="dbpw"]').val()))return util.message("必须输入UCenter数据库密码.","","error"),!1;if(""==$.trim($(':text[name="dbname"]').val()))return util.message("必须输入UCenter数据库名称.","","error"),!1;if(""==$.trim($(':text[name="dbcharset"]').val()))return util.message("必须输入UCenter数据库字符集.","","error"),!1;if(""==$.trim($(':text[name="dbtablepre"]').val()))return util.message("必须输入UCenter数据表前缀.","","error"),!1}else if("http"==$(':radio[name="connect"]:checked').val()){if(""==$.trim($(':text[name="api"]').val()))return util.message("必须输入UCenter 服务端的URL地址.","","error"),!1;if(""==$.trim($(':text[name="ip"]').val()))return util.message("必须输入UCenter的IP.","","error"),!1}}})}]),angular.module("qrApp",["app"]),angular.module("qrApp").controller("QrDisplay",["$scope",function(a){}]),angular.module("qrApp").controller("QrPost",["$scope","$http","config",function(a,b,c){c.id>0?a.type=0:a.type=1,$(".we7-select").change(function(){var b=$(".we7-select").val();1==b?a.type=1:a.type=2,a.$apply(a.type)}),$.isFunction(window.initReplyController)&&window.initReplyController(a,b),$(".submit").on("click",function(){return!!a.checkSubmit()}),a.checkSubmit=function(){if(""==$(":text[name='scene-name']").val())return util.message("抱歉,二维码名称为必填项,请返回修改!"),!1;if(1==a.type){if(""==$(":text[name='expire-seconds']").val())return util.message("抱歉,临时二维码过期时间为必填项,请返回修改!"),!1;var c=/^\+?[1-9][0-9]*$/;if(!c.test($(":text[name='expire-seconds']").val()))return util.message("抱歉,临时二维码过期时间必须为正整数,请返回修改!"),!1;if(parseInt($(":text[name='expire-seconds']").val())<30||parseInt($(":text[name='expire-seconds']").val())>2592e3)return util.message("抱歉,临时二维码过期时间必须在30-2592000秒之间,请返回修改!"),!1}if(2==a.type){var d=$.trim($("#scene_str").val());if(!d)return util.message("场景值不能为空!"),!1;var e=/^\d+$/g;if(e.test(d))return util.message("场景值不能是数字!"),!1;b.post("{php echo url('platform/qr/check_scene_str')}",{scene_str:d}).success(function(a){return 1==a.message.errno&&"repeat"==a.message.message?(util.message("场景值和现有二维码场景值重复,请修改场景值"),!1):void 0})}return""==$(":hidden[name='reply[reply_keyword]']").val()?(util.message("抱歉,请选择二维码要触发的关键字!"),!1):!0}}]),angular.module("qrApp").controller("UrlToQr",["$scope","$http","config",function(a,b,c){a.copyLink="",a.selectUrl=function(){var a=$("#longurl");util.linkBrowser(function(b){var d=c.site_url;return"tel:"==b.substring(0,4)?(util.message("长链接不能设置为一键拨号"),!1):(-1==b.indexOf("http://")&&-1==b.indexOf("https://")&&(b=b.replace("./index.php?","/index.php?"),b=d+"app"+b),void a.val(b))})},a.transformUrl=function(){var d=$("#longurl").val().trim();if(""==d)return util.message("请输入长链接"),!1;if(-1==d.indexOf("http://")&&-1==d.indexOf("https://")&&-1==d.indexOf("weixin://"))return util.message("请输入有效的长链接"),!1;var e=$("#change"),f=c.img_url;e.html(' 转换中'),b.post(c.transform_url,{longurl:d}).success(function(b){return-1==b.message.errno?(util.message(b.message.message),e.html("立即转换"),!1):($("#shorturl").val(b.message.message.short_url),a.copyLink=b.message.message.short_url,$(".url-short").next().attr({"data-url":b.message.message.short_url}).removeClass("disabled"),$("#qrsrc").attr("src",f+"url="+b.message.message.short_url),$(".qr-img").next().removeClass("disabled"),e.html("立即转换"),void 0)})},a.downQr=function(){var a=$("#shorturl").val(),b=c.down_url;window.location.href=b+"qrlink="+a},a.success=function(a){var a=parseInt(a),b=$(' 复制成功'),c=$("#copy-"+a).next().html();(!c||c.indexOf(' 复制成功')<0)&&$("#copy-"+a).after(b),setTimeout(function(){b.remove()},2e3)}}]),angular.module("quickMenuApp",["wapeditorApp"]),angular.module("quickMenuApp").controller("MainCtrl",["$scope","config","serviceCommon","serviceQuickMenuBase","serviceQuickMenuSubmit",function(a,b,c,d,e){a.submit={},a.activeItem=b.activeItem?b.activeItem:d.initActiveItem(),d.initActiveItem(a.activeItem),a.selectNavStyle=function(){var b=$('input[name="nav_style"]:checked').val();a.activeItem.navStyle=d.selectNavStyle(b)},a.addMenu=function(){a.activeItem.menus=d.addMenu()},a.addSubMenu=function(b){var c=_.findIndex(a.activeItem.menus,b);a.activeItem.menus[c].submenus=d.addSubMenu(b)},a.submit=function(b){a.submit=e.submit(),a.$apply("submit"),$(b.target).parents("form").submit()},a.removeMenu=function(b){a.activeItem.menus=d.removeMenu(b)},a.removeSubMenu=function(b,c){d.removeSubMenu(b,c),a.activeItem.menus[b].submenus=_.without(a.activeItem.menus[b].submenus,c)},a.showSearchModules=function(){a.moduleDialog=$("#shop-modules-modal").modal(),$("#shop-modules-modal .modal-body .btn-primary").html("取消"),$("#shop-modules-modal").find(".modal-footer .btn-primary").unbind("click").click(function(){a.activeItem.ignoreModules={},$("#shop-modules-modal .modal-body .btn-primary").each(function(){a.hasIgnoreModules=!0,a.activeItem.ignoreModules[$(this).attr("js-name")]={name:$(this).attr("js-name"),title:$(this).attr("js-title")}}),a.$apply("activeItem"),a.$apply("hasIgnoreModules"),d.setQuickMenuData("ignoreModules",a.activeItem.ignoreModules)})},$(".js-editor-submit").click(function(b){a.submit(b)}),a.hasIgnoreModules=_.size(a.activeItem.ignoreModules),$(".nav-menu").show(),$(".app-shopNav-edit").show()}]),angular.module("quickMenuApp").service("serviceQuickMenuBase",["$rootScope",function(a){var b={},c={};return b.initActiveItem=function(a){return c=angular.isObject(a)?a:{navStyle:1,bgColor:"#2B2D30",menus:[],extend:[],position:{homepage:!0,usercenter:!0,page:!0,article:!0},ignoreModules:{}}},b.selectNavStyle=function(a){return c.navStyle=a,c.navStyle},b.addMenu=function(){return c.menus.push({title:"标题",url:"",submenus:[],icon:{name:"fa-home",color:"#00ffff"},image:"",hoverimage:"",hovericon:""}),c.menus},b.removeMenu=function(a){var b=$.inArray(a,c.menus),d=angular.copy(c.menus);c.menus=[];for(i in d)i!=b&&c.menus.push(d[i]);return c.menus},b.addSubMenu=function(a){var b=_.findIndex(c.menus,a);return c.menus[b].submenus.push({title:"标题",url:""}),c.menus[b].submenus},b.removeSubMenu=function(a,b){return c.menus[a].submenus=_.without(c.menus[a].submenus,b),c.menus[a].submenus},b.getQuickMenuData=function(a){return angular.isString(a)?c[a]:c},b.setQuickMenuData=function(a,b){angular.isObject(a)?angular.forEach(a,function(a,b){c[b]=a}):c[a]=b},b}]),angular.module("quickMenuApp").service("serviceQuickMenuSubmit",["serviceCommon","serviceQuickMenuBase",function(a,b){var c={};return c.submit=function(){var c={params:{},html:""};c.params=b.getQuickMenuData(),a.stripHaskey(c.params);var d=$(".nav-menu").html();return d=d.replace(/<\!\-\-([^-]*?)\-\->/g,""),d=d.replace(/ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),d=d.replace(/ng\-[a-zA-Z]+/g,""),d=d.replace(/[\t\n\n\r]/g,""),c.html=d,c},c}]),angular.module("wesiteApp",["app"]),angular.module("wesiteApp").controller("WesiteDisplay",["$scope","$http","serviceCommon","config",function(a,b,c,d){a.default_site=d.default_site,a.multis=d.multis,a.links=d.links,angular.forEach(a.multis,function(b,c){b.copyLink=a.links.appHome+"t="+b.id}),a.preview=function(b){var b=parseInt(b),c='',d='',e=util.dialog("预览模板",c,d),f=a.links.appHome+"&t="+b;e.find("iframe").attr("src",f),e.find(".modal-dialog").css({width:"322px"}),e.find(".modal-body").css({padding:"0",height:"480px"}),e.modal("show")},a.switchOn=function(c,d){var e=_.indexOf(a.multis,c),d=parseInt(d);e>-1&&b.post(a.links["switch"],{id:d}).success(function(b){0==b.message.errno&&(a.multis[e].status=1==a.multis[e].status?"0":"1",util.message("修改成功!"))})},a.success=function(a){var a=parseInt(a),b=$(' 复制成功');c.copySuccess(a,b)}}]),angular.module("wesiteApp").controller("WesitePost",["$scope","config","$http","serviceCommon","serviceHomeMenuBase","serviceQuickMenuBase","serviceQuickMenuSubmit",function(a,b,c,d,e,f,g){a.links=b.links,a.attachurl=b.attachurl,a.default_site=b.default_site,a.temtypes=b.temtypes,a.temtype={name:"all",title:"全部"},a.searchedStyleName="",a.multi=b.multi,a.styles=b.styles,a.siteEntrance=a.links.murl+"t="+a.multi.id,a.slideLists=[],a.showSlideSubmit=!1,a.addHomemenuStatus=!1,a.homeMenu=[],a.sections=e.initSections(),a.menuInfo=e.initHomemenuInfo(),a.activeItem={},a.modules={},a.quickMenuStatus=!0,a.hasIgnoreModules=0,a.submit={},a.success=function(a){var a=parseInt(a),b=$(' 复制成功');d.copySuccess(a,b)},a.selectStyle=function(b){a.multi.style=b},a.searchStyle=function(){c.post(a.links.searchStyleLink,{name:a.searchedStyleName}).success(function(b){0==b.message.errno&&(a.styles=b.message.message)})},a.changeMultiStatus=function(){a.multi.status=1==a.multi.status?0:1},a.uploadMultiImage=function(){require(["fileUploader"],function(b){b.init(function(b){a.multi.site_info.thumb=b.url,a.$apply(a.multi.site_info)},{direct:!0,multiple:!1})})},a.delMultiImage=function(){a.multi.site_info.thumb=""},a.loadSlideInfo=function(){c.post(a.links.slideDisplay,{multiid:b.multiid}).success(function(b){0==b.message.errno&&(a.slideLists=b.message.message,_.isEmpty(a.slideLists)||(a.showSlideSubmit=!0))})},a.addSlide=function(){a.slideLists.push({title:"",displayorder:0,thumb:"",url:""}),a.showSlideSubmit=!0},a.delSlide=function(b){var c=_.indexOf(a.slideLists,b);c>-1&&(a.slideLists=_.without(a.slideLists,a.slideLists[c])),_.isEmpty(a.slideLists)&&(a.showSlideSubmit=!1)},a.uploadSlideImage=function(b){var c=_.indexOf(a.slideLists,b);c>-1?require(["fileUploader"],function(b){b.init(function(b){a.slideLists[c].thumb=b.url,a.$apply(a.slideLists)},{direct:!0,multiple:!1})}):util.message("参数错误,请刷新页面重试!")},a.delSlideImage=function(b){var c=_.indexOf(a.slideLists,b);c>-1&&(a.slideLists[c].thumb="")},a.saveSlide=function(){c.post(a.links.slidePost,{slide:a.slideLists,multiid:b.multiid}).success(function(a){0==a.message.errno?util.message(a.message.message):util.message(a.message.message)})},a.loadHomemenuInfo=function(){c.post(a.links.homeMenuDisplay,{multiid:b.multiid},{cache:!1}).success(function(b){0==b.message.errno&&(a.homeMenu=b.message.message,a.addHomemenuStatus=!1)})},a.changeHomemenuStatus=function(b){if(a.addHomemenuStatus=!a.addHomemenuStatus,_.isEmpty(b))a.menuInfo=e.initHomemenuInfo();else{a.menuInfo=b;var c=parseInt(a.menuInfo.section);c=10>=c&&c>=0?c:0,a.menuInfo.section=a.sections[c],_.isEmpty(a.menuInfo.icon)?a.menuInfo.icontype=1:a.menuInfo.icontype=2}},a.updateMenu=function(b,d){var e=parseInt(b.id),f=_.indexOf(a.homeMenu,b);if(f>-1)switch(d){case"del":c.post(a.links.homeMenuDel,{id:e}).success(function(c){0==c.message.errno?(util.message("删除成功!"),a.homeMenu=_.without(a.homeMenu,b)):(-1==c.message.errno&&util.message("本公众号不存在该导航!"),1==c.message.errno&&util.message("删除失败,请稍候重试。"))});break;case"switch":c.post(a.links.homeMenuSwith,{id:e}).success(function(b){0==b.message.errno?a.homeMenu[f].status=!a.homeMenu[f].status:(-1==b.message.errno&&util.message("本公众号不存在该导航!"),1==b.message.errno&&util.message("更新失败,请稍候重试。"))})}},a.uploadHomemenuImage=function(b){require(["fileUploader"],function(b){b.init(function(b){a.menuInfo.icon=b.attachment,a.$apply(a.menuInfo)},{direct:!0,multiple:!1})})},a.delHomemenuImage=function(b){a.menuInfo.icon=""},a.selectHomemenuIcon=function(){util.iconBrowser(function(b){a.menuInfo.css.icon.icon=b,a.$apply(a.menuInfo.css)})},a.saveMenu=function(){c.post(a.links.homeMenuPost,{menu_info:a.menuInfo,multiid:b.multiid}).success(function(b){0==b.message.errno?(util.message("导航菜单保存成功!"),a.loadHomemenuInfo()):(1==b.message.errno&&util.message("保存失败!"),-1==b.message.errno&&util.message("抱歉,请输入导航菜单的名称!"))})},a.successMenu=function(a){var a=parseInt(a),b=$(' 复制成功'); d.copySuccess(a,b)},a.quickMenuSwitch=function(){a.quickMenuStatus=!a.quickMenuStatus},a.loadQuickmenuInfo=function(){c.post(a.links.quickMenuDisplay,{multiid:b.multiid}).success(function(b){0==b.message.errno?(a.activeItem=b.message.message.params,f.initActiveItem(a.activeItem),a.modules=b.message.message.modules,a.quickMenuStatus=b.message.message.status,a.hasIgnoreModules=_.size(a.activeItem.ignoreModules)):util.message("请求错误:微站不存在,请按“Ctrl+F5”刷新重试!")})},a.saveQucikMenu=function(){a.submit=g.submit(),c.post(a.links.quickMenuPost,{multiid:b.multiid,postdata:a.submit,status:a.quickMenuStatus?1:0}).success(function(a){0==a.message.errno&&util.message("保存成功。您可点击“预览刷新”查看效果!")})},a.showSearchModules=function(){a.moduleDialog=$("#shop-modules-modal").modal(),$("#shop-modules-modal .modal-body .btn-primary").html("取消"),$("#shop-modules-modal").find(".modal-footer .btn-primary").unbind("click").click(function(){a.activeItem.ignoreModules={},$("#shop-modules-modal .modal-body .btn-primary").each(function(){a.hasIgnoreModules=!0,a.activeItem.ignoreModules[$(this).attr("js-name")]={name:$(this).attr("js-name"),title:$(this).attr("js-title")}}),a.$apply("activeItem"),a.$apply("hasIgnoreModules"),f.setQuickMenuData("ignoreModules",a.activeItem.ignoreModules)})},a.selectNavStyle=function(){var b=$('#shop-nav-modal .alert input[type="radio"]:checked').val();a.activeItem.navStyle=f.selectNavStyle(b)},a.addMenu=function(){a.activeItem.menus=f.addMenu()},a.addSubMenu=function(b){var c=_.findIndex(a.activeItem.menus,b);a.activeItem.menus[c].submenus=f.addSubMenu(b)},a.removeMenu=function(b){a.activeItem.menus=f.removeMenu(b)},a.removeSubMenu=function(b,c){f.removeSubMenu(b,c),a.activeItem.menus[b].submenus=_.without(a.activeItem.menus[b].submenus,c)}}]),angular.module("wesiteApp").controller("WesiteTplDidplay",["$scope","config",function(a,b){a.stylesResult=b.stylesResult,a.temtypes=b.temtypes,a.type=b.type,a.setting=b.setting,a.links=b.links,a.preview=function(b){var b=parseInt(b),c='',d=' 设为默认模板 设计风格 ',e=util.dialog("预览模板",c,d);e.find("iframe").on("load",function(){$("a",this.contentWindow.document.body).each(function(){var a=$(this).attr("href");if(a&&"#"!=a[0]){var c=a.split(/#/g),d=c[0];"&"!=d.slice(-1)&&(d+="&"),-1!=d.indexOf("?")&&(d+="s="+b),c[1]&&(d+="#"+c[1]),"javascript"!=d.substr(0,10)&&-1!=d.indexOf("?")||(d=d.substr(0,d.lastIndexOf("&"))),$(this).attr("href",d)}})});var f=a.links.home+"&s="+b;e.find("iframe").attr("src",f),e.find(".modal-dialog").css({width:"322px"}),e.find(".modal-body").css({padding:"0",height:"480px"}),e.modal("show")},a.selectDefault=function(b){var c=parseInt(b);location.href=a.links["default"]+"&styleid="+c}}]),angular.module("wesiteApp").controller("WesiteTplPost",["$scope","config",function(a,b){a.style=b.style,a.styles=b.styles?b.styles:{},a.template=b.template,a.systemtags=b.systemtags,a.customStyles=[],angular.forEach(a.styles,function(b,c){-1==_.indexOf(a.systemtags,b.variable)&&a.customStyles.push(b)}),a.addCustomAttribute=function(){$("#customForm").append($("#item-form-html").html())},a.delCustomArrtibute=function(a){$(a.target).parent().parent().remove()},a.uploadImage=function(){require(["fileUploader"],function(b){b.init(function(b){a.styles.indexbgimg={content:b.url},a.$apply(a.styles.indexbgimg.content)},{direct:!0,multiple:!1})})},a.delImage=function(){a.styles.indexbgimg=""},a.checkSubmit=function(a){for(var b=$(':text[name="custom[name][]"]'),c=$(':text[name="custom[desc][]"]'),d=$(':text[name="custom[value][]"]'),e=0;e 复制成功');c.copySuccess(a,b)},a.editArticle=function(a){var a=parseInt(a);location.href="./index.php?c=site&a=article&do=post&id="+a},a.delArticle=function(a){if(confirm("此操作不可恢复,确认吗?")){var a=parseInt(a);location.href="./index.php?c=site&a=article&do=del&id="+a}}}]),angular.module("wesiteApp").controller("WesiteArticlePost",["$scope","config",function(a,b){a.item=b.item,a.keywords=b.keywords,a.id=b.id,a.template=b.template,a.uploadImage=function(){require(["fileUploader"],function(b){b.init(function(b){a.item.thumb=b.url,a.$apply(a.item.thumb)},{direct:!0,multiple:!1})})},a.delImage=function(){a.item.thumb=""}}]),angular.module("wesiteApp").controller("WesiteCategoryPost",["$scope","config",function(a,b){a.id=b.id,a.category=b.category,a.parent=b.parent,a.parentid=b.parentid,a.multis=b.multis,a.site_template=b.site_template,a.styles=b.styles,angular.isUndefined(a.category.enabled)?a.enabled=!0:a.id&&1==a.category.enabled?a.enabled=!0:a.enabled=!1,angular.isUndefined(a.category.icontype)||0==a.category.icontype||1==a.category.icontype?a.icontype=!0:a.icontype=!1,a.selectIcon=function(){util.iconBrowser(function(b){a.category.css.icon.icon=b,a.$apply(a.category.css)})},a.showWesite=function(){$(".js-site-selector").show()},a.hideWesite=function(){$(".js-site-selector").hide()},a.changeStyle=function(b){var c=parseInt(b),d=$(".title-"+c).text(),e=$(".preview-"+c).attr("src");$(".item-style").removeClass("active"),a.category.styleid=c,$("#current-title").text(d),$("#current-preview").attr("src",e),$(".title-"+c).parent().parent().addClass("active"),$("#ListStyle").modal("hide"),a.$apply(a.category.styleid)},a.uploadImage=function(){require(["fileUploader"],function(b){b.init(function(b){a.category.icon=b.url,a.$apply(a.category.icon)},{direct:!0,multiple:!1})})},a.delImage=function(){a.category.icon=""}}]),angular.module("wesiteApp").service("serviceCommon",["$rootScope",function(a){var b={};return b.copySuccess=function(a,b){var a=parseInt(a),b=b,c=$("#copy-"+a).next().html();(!c||c.indexOf(' 复制成功')<0)&&$("#copy-"+a).after(b),setTimeout(function(){b.remove()},2e3)},b}]),angular.module("wesiteApp").service("serviceHomeMenuBase",["$rootScope",function(a){var b={};return b.initHomemenuInfo=function(){var a={css:{icon:{width:"",color:"",icon:""}},name:"",description:"",url:"",status:1,displayorder:0,icon:"",icontype:1,section:0};return a},b.initSections=function(){var a=[{num:0,val:"不设置位置"},{num:1,val:"位置1"},{num:2,val:"位置2"},{num:3,val:"位置3"},{num:4,val:"位置4"},{num:5,val:"位置5"},{num:6,val:"位置6"},{num:7,val:"位置7"},{num:8,val:"位置8"},{num:9,val:"位置9"},{num:10,val:"位置10"}];return a},b}]),angular.module("wesiteApp").service("serviceQuickMenuBase",["$rootScope",function(a){var b={},c={};return b.initActiveItem=function(a){return c=angular.isObject(a)?a:{navStyle:1,bgColor:"#2B2D30",menus:[],extend:[],position:{homepage:!0,usercenter:!0,page:!0,article:!0},ignoreModules:{}}},b.selectNavStyle=function(a){return c.navStyle=a,c.navStyle},b.addMenu=function(){return"undefined"==typeof c.menus&&(c.menus=[]),c.menus.push({title:"标题",url:"",submenus:[],icon:{name:"fa-home",color:"#00ffff"},image:"",hoverimage:"",hovericon:""}),c.menus},b.removeMenu=function(a){var b=$.inArray(a,c.menus),d=angular.copy(c.menus);c.menus=[];for(i in d)i!=b&&c.menus.push(d[i]);return c.menus},b.addSubMenu=function(a){var b=_.findIndex(c.menus,a);return c.menus[b].submenus.push({title:"标题",url:""}),c.menus[b].submenus},b.removeSubMenu=function(a,b){return c.menus[a].submenus=_.without(c.menus[a].submenus,b),c.menus[a].submenus},b.getQuickMenuData=function(a){return angular.isString(a)?c[a]:c},b.setQuickMenuData=function(a,b){angular.isObject(a)?angular.forEach(a,function(a,b){c[b]=a}):c[a]=b},b}]),angular.module("wesiteApp").service("serviceQuickMenuSubmit",["serviceQuickMenuBase",function(a){var b={};return b.stripHaskey=function(a){for(var c in a)"$$hashKey"==c?delete a[c]:"object"==typeof a[c]&&b.stripHaskey(a[c]);return a},b.submit=function(){var c={params:{},html:""};c.params=a.getQuickMenuData(),b.stripHaskey(c.params);var d=$(".nav-menu").html();return d=d.replace(/<\!\-\-([^-]*?)\-\->/g,""),d=d.replace(/ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),d=d.replace(/ng\-[a-zA-Z]+/g,""),d=d.replace(/[\t\n\n\r]/g,""),c.html=d,c},b}]),angular.module("specialApp",["wapeditorApp"]),angular.module("specialApp").controller("MainCtrl",["$scope","$timeout","$uibModal","widget","config","serviceCommon","serviceSetStyle","serviceBase","serviceSpecialBase","serviceSubmit","serviceMultiSubmit","serviceMultiPage","serviceUpwardCompatible","$sanitize",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.modules=[],a.editors=[],a.allPages=e.allPages,a.multipage=e.multipage?e.multipage:[],a.submit={params:{},html:"",multipage:[]},a.isNew=!0,a.allPages&&-1==_.findIndex(a.allPages,{active:!0})&&(a.isNew=!1,a.allPages=[{property:a.allPages,active:!0}]),h.setBaseData("isNew",a.isNew),a.allPages=a.allPages?a.allPages:[{property:[],active:!0}];var o=_.findIndex(a.allPages,{active:!0});a.activeModules=o>-1?h.initActiveModules(a.allPages[o].property):[],a.activePageIndex=o>-1?o:0,i.setBaseData("activePageIndex",a.activePageIndex),a.activeItem={},a.activeIndex=0,a.index=a.activeModules.length?f.getMaxScopeIndex(a.allPages)+1:0,h.setBaseData("index",a.index),a.pageLength=_.isEmpty(a.activeModules)?1:a.activeModules[0].params.pageLength?a.activeModules[0].params.pageLength:1,a.isMultiPage=0==a.index?!0:!(a.activeModules[f.getHeaderIndex(a.activeModules)].params.pageLength>1),a.isLongPage=0==a.index?!0:a.activeModules[f.getHeaderIndex(a.activeModules)].params.pageLength>1||1==a.activeModules[f.getHeaderIndex(a.activeModules)].params.pageLength&&1==a.allPages.length,a.pageLengths={1:1,2:2,3:3,4:4,5:5},a.lineHeights={1:1,1.25:1.25,1.5:1.5,2:2,2.5:2.5},a.fontSizes={12:12,14:14,16:16,18:18,20:20,22:22,24:24,26:26,28:28,30:30,32:32,34:34,36:36,38:38,40:40},i.setBaseData("allPages",a.allPages),i.setBaseData("multipage",a.multipage),h.setBaseData("pageLength",a.pageLength),a.isNew||(a.activeModules=m.compatibility(a.activeModules),"undefined"==typeof a.activeModules[0].params.pageLength&&(a.activeModules[0].params.pageLength=Math.ceil($(".modules").height()/568)),a.activeModules[0].params.pageLength>1&&(a.pageLength=a.activeModules[0].params.pageLength,a.isMultiPage=!1,a.isLongPage=!0,h.setBaseData("pageLength",a.pageLength),b(function(){$(".app-content").css("height",568*a.pageLength+"px")},100)),b(function(){var b=0,c=height="";$(".modules>div").each(function(){var d=parseInt($(this).attr("index"));if(c=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("width"),height=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("height"),d>0){for(var e in a.activeModules)a.activeModules[e].index==d&&(b+=parseInt(a.activeModules[e].marginTop),a.activeModules[e].params.positionStyle.width=parseInt(c),a.activeModules[e].params.positionStyle.height=parseInt(height),a.activeModules[e].params.positionStyle.top=b,a.activeModules[e].positionStyle="position:absolute;width:"+c+";height:"+height+";left:"+a.activeModules[e].params.positionStyle.left+"px;top:"+b+"px;",$(this).find("div[ng-controller]").attr("style",a.activeModules[e].positionStyle));b+=parseInt(height)}e++}),h.setBaseData("activeModules",a.activeModules)},1e3));for(var p in a.activeModules)a.activeModules[p].originParams=angular.copy(a.activeModules[p].params);a.$on("serviceBase.editors.update",function(b,c){a.editors=c}),a.$on("serviceBase.activeItem.update",function(b,c){a.activeItem=c}),a.$on("serviceBase.activeModules.update",function(b,c){a.activeModules=c}),a.$on("serviceBase.activeItem.params.update",function(b,c){a.activeItem.params=c}),a.$on("serviceBase.activeItem.animationName.update",function(b,c){a.activeItem.params.animationStyle.animationName=c}),a.$on("serviceBase.activeItem.style.update",function(b,c,d,e,f){a.activeItem.params[c]=d,a.activeItem[c]=e,"undefined"!=typeof f&&(a.activeItem.transform=f)}),a.$on("updateScope",function(b,c){angular.forEach(c,function(b,c){a[c]=b})}),a.addItem=function(a){h.addItem(a)},a.editItem=function(a){h.editItem(a)},a.deleteItem=function(a){h.deleteItem(a)},a.submit=function(b){a.submit=j.submit(),a.$apply("submit"),$(b.target).parents("form").submit()},a.multiSubmit=function(b){a.submit=k.submit(),a.$apply("submit"),$(b.target).parents("form").submit()},a.init=function(b,c){if(a.modules=h.setModules(b,c),a.activeModules.length>0){var d=[];angular.forEach(a.activeModules,function(a,b){a&&d.push(a.id)})}angular.forEach(a.modules,function(a,b){a.defaultshow&&-1==$.inArray(a.id,d)&&h.addItem(a.id)})},a.setModulePositionStyle=function(a){g.setModulePositionStyle(a)},a.eleAnimationIns=function(a){g.eleAnimationIns(a)},a.savePagePosition=function(){g.savePagePosition(a.activeModules)},a.saveModulePosition=function(){g.saveModulePosition(a.activeItem)},a.changeTextAlign=function(b){g.changeTextAlign(a.activeItem,b)},a.changeBorderWidth=function(){g.changeBorderWidth(a.activeItem)},a.changeInnerHeight=function(){g.changeInnerHeight(a.activeItem)},a.clearModuleStyle=function(){g.clearModuleStyle(a.activeItem)},a.changePageLength=function(b){if(angular.isString(b))if("minus"==b&&a.pageLength>1)b=a.pageLength-1;else{if(!("plus"==b&&a.pageLength<5))return!1;b=a.pageLength+1}var c=g.changePageLength(b,a.activeModules);h.setBaseData("pageLength",parseInt(b)),h.setBaseData("activeModules",c)},a.insertPage=function(){l.insertPage(),a.init(null,["header"])},a.navToPage=function(b){l.navToPage(b),a.activeHeader()},a.removePage=function(b){l.removePage(b),a.activeHeader()},a.copyPage=function(b,c){l.copyPage(b,c),a.activeHeader()},a.changeLock=function(){a.activeItem.params.baseStyle.lock=!a.activeItem.params.baseStyle.lock},a.activeHeader=function(){for(var b in a.activeModules)if("header"==a.activeModules[b].id){a.pageLength=a.activeModules[b].params.pageLength?a.activeModules[b].params.pageLength:1,g.changePageLength(a.pageLength,a.activeModules),h.setBaseData("activeItem",a.activeModules[0]),a.editItem(a.activeModules[b].index);break}},$(".multi-submit").on("click",function(b){a.multiSubmit(b)}),$(".single-submit").on("click",function(b){a.submit(b)}),a.init(null,["header"]),a.activeHeader(),a.$watch("activeItem.params.baseStyle",function(a){a&&g.setModuleBaseStyle(a)},!0),a.$watch("activeItem.params.borderStyle",function(a){a&&g.setModuleBorderStyle(a)},!0),a.$watch("activeItem.params.shadowStyle",function(a){a&&g.setModuleShadowStyle(a)},!0),a.$watch("activeItem.params.animationStyle",function(a){a&&g.setModuleAnimationStyle(a)},!0),a.$watch("activeItem.params.positionStyle",function(a){a&&g.setModulePositionStyle(a)},!0)}]),angular.module("specialApp").controller("SpecialDisplay",["$scope","serviceCopy","config",function(a,b,c){a.pages=c.pages,a.links=c.links,angular.forEach(a.pages,function(b,c){b.copyLink=a.links.appHome+"id="+b.id}),a.success=function(a){var a=parseInt(a),c=$(' 复制成功');b.copySuccess(a,c)}}]),angular.module("specialApp").directive("we7Multipage",function(){return{replace:!0,templateUrl:"directive-multipage-multipage.html"}}),angular.module("specialApp").service("serviceSpecialBase",["$rootScope","serviceBase",function(a,b){var c={},d={activePageIndex:0,isMultiPage:!0,isLongPage:!0,allPages:[],multipage:[]};return c.getBaseData=function(a){return d[a]},c.setBaseData=function(a,b){angular.isObject(a)?angular.forEach(a,function(a,b){d[b]=a}):d[a]=b},c}]),angular.module("specialApp").service("serviceCopy",["$rootScope",function(a){var b={};return b.copySuccess=function(a,b){var a=parseInt(a),b=b,c=$("#copy-"+a).next().html();(!c||c.indexOf(' 复制成功')<0)&&$("#copy-"+a).after(b),setTimeout(function(){b.remove()},2e3)},b}]),angular.module("specialApp").service("serviceMultiPage",["$rootScope","serviceCommon","serviceBase","serviceSpecialBase","$window",function(a,b,c,d,e){var f={};return f.insertPage=function(){f.saveCurPage();var b=d.getBaseData("allPages"),e=d.getBaseData("activePageIndex");b[e].active=!1,b.push({property:[],active:!0}),$(".app-content").css("height","568px"),e=_.findIndex(b,{active:!0}),c.setBaseData({activeModules:[],pageLength:1}),d.setBaseData({allPages:b,isMultiPage:!0,isLongPage:!1,activePageIndex:e}),a.$broadcast("updateScope",{allPages:b,isMultiPage:!0,isLongPage:!1,pageLength:1,activePageIndex:e,activeModules:[]})},f.navToPage=function(b){var e=d.getBaseData("activePageIndex");if(e==b)return!1;f.saveCurPage();var g=d.getBaseData("allPages"),h=g[b].property;g[e].active=!1,g[b].active=!0,e=b,c.setBaseData("activeModules",h),c.setBaseData("activeItem",h[0]),d.setBaseData({allPages:g,activePageIndex:e}),a.$broadcast("updateScope",{allPages:g,activePageIndex:e,activeModules:h})},f.removePage=function(b){var e=[],g=d.getBaseData("allPages"),h=d.getBaseData("multipage");if(1==g.length)return!1;f.saveCurPage(),h.splice(parseInt(b),1);var i=_.clone(g),j=g.length-1,k=j-b;g=[];for(var l in i)if(l!=b)switch(k){case 0:parseInt(l)+1==b?(g.push({property:i[l].property,active:!0}),e=i[l].property):g.push({property:i[l].property,active:!1});break;default:l-1==b?(g.push({property:i[l].property,active:!0}),e=i[l].property):g.push({property:i[l].property,active:!1})}activePageIndex=_.findIndex(g,{active:!0}),1==g.length&&(d.setBaseData({isMultiPage:!0,isLongPage:!0}),a.$broadcast("updateScope",{isMultiPage:!0,isLongPage:!0})),c.setBaseData("activeModules",e),d.setBaseData({allPages:g,activePageIndex:activePageIndex}),a.$broadcast("updateScope",{allPages:g,activePageIndex:activePageIndex,activeModules:e})},f.copyPage=function(b,e){f.saveCurPage();var g=c.getBaseData("index"),h=d.getBaseData("allPages"),i=d.getBaseData("multipage");i.splice(parseInt(b),0,i[b]);var j=angular.copy(h);h=[];for(var k in j)if(k==b){h.push({property:j[k].property,active:!1});var l=angular.copy(j[k].property);for(var m in l)l[m].index=g++;h.push({property:l,active:!0});var n=l}else h.push({property:j[k].property,active:!1});activePageIndex=_.findIndex(h,{active:!0}),c.setBaseData("activeModules",n),c.setBaseData("index",g),d.setBaseData({allPages:h,multipage:i,isMultiPage:!0,isLongPage:!1,activePageIndex:activePageIndex}),e.stopPropagation(),a.$broadcast("updateScope",{allPages:h,isMultiPage:!0,isLongPage:!1,activePageIndex:activePageIndex,activeModules:n})},f.saveCurPage=function(){var e=c.getBaseData("activeModules"),f=c.getBaseData("pageLength"),g=d.getBaseData("allPages"),h=d.getBaseData("multipage"),i=_.findIndex(g,{active:!0}),j="",k=$($(".modules").html());k.find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var a=$(this).parent().parent(),d=_.findIndex(e,{index:parseInt(a.attr("index"))}),g="",h=angular.copy(e[d].params);$(this).find(".js-default-content").remove(),$(this).find(".bar").remove();var i=a.attr("name").toLowerCase();if("header"!=i){var k=$(this).css("top"),l=$(this).css("left"),m=$(this).css("width"),n=$(this).css("height"),o="position:absolute;top:"+k+";left:"+l+";width:"+m+";height:"+n+";";e[d].params.positionStyle.top=parseInt(k),e[d].params.positionStyle.left=parseInt(l),e[d].params.positionStyle.width=parseInt(m),e[d].params.positionStyle.height=parseInt(n),e[d].positionStyle=o}else e[d].params.pageLength=f;switch(i){case"link":var p=this;angular.forEach(h.items,function(a,c){(a.selectCate.pid||a.selectCate.cid)&&$(p).find(".list-group").children().eq(c).replaceWith("
    "+b.buildDataTagBegin("link",a)+''+b.buildDataTagEnd()+"
    ")});break;case"richtext":e[d]&&(e[d].params.content="")}if(g=$(this).html(),!c.getBaseData("isNew")){var q=parseInt(k)-64;$(this).css("top",q+"px")}if("header"!=i){var o=$(this).attr("style");j+='
    '+g+"
    "}}),j=j.replace(/<\!\-\-([^-]*?)\-\->/g,""),j=j.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),j=j.replace(/ ng\-[a-zA-Z]+/g,""),h[i]=j,g[i].property=e,c.setBaseData("activeModules",e),d.setBaseData({allPages:g,multipage:h}),a.$broadcast("updateScope",{activeModules:e,allPages:g,multipage:h})},f}]),angular.module("specialApp").service("serviceMultiSubmit",["serviceCommon","serviceMultiPage","serviceSpecialBase",function(a,b,c){var d={};return d.submit=function(d){b.saveCurPage();var e=c.getBaseData("multipage"),f=c.getBaseData("allPages"),g="",h='
    ';$.each(e,function(a,b){g+=a+1==e.length?1==f.length?'
    '+b+"
    ":'
    '+b+"
    ":1==f.length?'
    '+b+h:'
    '+b+h});for(var i in f)for(var j in f[i].property)delete f[i].property[j].originParams,delete f[i].property[j].marginTop;var k={},l=$(".app-content").css("height");return g='
    '+g+"
    ",g=g.replace(/<\!\-\-([^-]*?)\-\->/g,""),g=g.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),g=g.replace(/ ng\-[a-zA-Z]+/g,""),k.html=g,k.params=angular.copy(f),k.multipage=e,a.stripHaskey(k.params),k},d}]),angular.module("systemApp",["app"]),angular.module("systemApp").controller("UpdateCacheCtrl",["$scope","$http",function(a,b){a.updateCache=function(){b({method:"POST",url:"./index.php?c=system&a=updatecache",data:{submit:"submit"},beforeSend:function(){$(".loader").show()},complete:function(){$(".loader").hide()}}).success(function(a){0==a.message.errno&&util.message(a.message.message)})}}]),angular.module("systemApp").controller("MenuCtrl",["$scope","$http",function(a,b){a.subItemGroup={},a.displayStatus={},a.editItemPanel=function(b){b&&(a.activeItem={},a.activeItem=b,$(".js-edit-panel").modal())},a.editItem=function(){b.post("./index.php?c=system&a=menu&do=post",a.activeItem).success(function(b){b.message.errno?util.message(b.message.message):(a.activeItem.isNew&&a.subItemGroup[a.activeItem.group].push(a.activeItem),util.message("添加菜单成功"),$(".js-edit-panel").modal("hide"))})},a.addSubItem=function(b,c){a.subItemGroup[b]||(a.subItemGroup[b]=[]);var c={title:c.title,url:c.url,permissionName:c.permissionName,icon:c.icon,displayorder:c.displayorder,isDisplay:c.isDisplay,isSystem:!1,group:b,isNew:!0};a.editItemPanel(c)},a.selectMenuIcon=function(){util.iconBrowser(function(b){a.activeItem.icon=b,a.$apply("activeItem")})},a.removeSubItem=function(c,d){c&&confirm("确认删除此菜单?")&&("undefined"==typeof d?b.post("./index.php?c=system&a=menu&do=delete",{permission_name:c}).success(function(a){a.message.errno?util.message(a.message.message):util.message(a.message.message,"refresh")}):a.subItemGroup[c].splice(d,1))},a.changeDisplay=function(c){1==a.displayStatus[c]?status=0:status=1,b.post("./index.php?c=system&a=menu&do=display_status",{status:status,permission_name:c}).success(function(b){a.displayStatus[c]=!!parseInt(status)})}}]),angular.module("userCardApp",["wapeditorApp"]).controller("MainCtrl",["$scope","widget","config","serviceBase","serviceUserCardBase","serviceSubmit","serviceCommon","$sanitize",function(a,b,c,d,e,f,g,h){a.modules=[],a.editors=[],a.activeModules=d.initActiveModules(c.activeModules),a.activeItem={},a.activeIndex=0,a.index=c.activeModules?c.activeModules.length:0,a.submit={params:{},html:""},a.newcard=c.newcard,a.fansFields=c.fansFields,a.$on("serviceBase.editors.update",function(b,c){a.editors=c}),a.$on("serviceBase.activeItem.update",function(b,c){a.activeItem=c}),a.$on("serviceBase.activeModules.update",function(b,c){a.activeModules=c}),a.addItem=function(a){d.addItem(a)},a.editItem=function(a){e.editItem(a)},a.deleteItem=function(a){d.deleteItem(a)},a.init=function(b,c){if(a.modules=d.setModules(b,c),a.activeModules.length>0){var e=[];angular.forEach(a.activeModules,function(a,b){a&&e.push(a.id)})}angular.forEach(a.modules,function(a,b){a.defaultshow&&-1==$.inArray(a.id,e)&&d.addItem(a.id)})},a.url=function(a){return g.url(a)},a.tomedia=function(a){return g.tomedia(a)},a.submit=function(b){a.submit=f.submit(),a.$apply("submit"),$(b.target).parents("form").submit()},a.addFields=function(){e.addFields()},a.removeFields=function(a){e.removeFields(a)},a.addNums=function(){e.addNums()},a.removeNums=function(a){e.removeNums(a)},a.addRecharges=function(){e.addRecharges()},a.removeRecharges=function(a){e.removeRecharges(a)},a.addTimes=function(){e.addTimes()},a.removeTimes=function(a){e.removeTimes(a)},a.selectCoupon=function(){e.selectCoupon()},a.clearCoupon=function(){e.clearCoupon()},a.addThumb=function(a){e.addThumb(a)},a.addBgThumb=function(){e.addBgThumb()},$(".single-submit").on("click",function(b){a.submit(b)}),a.init(null,["cardBasic","cardActivity","cardNums","cardTimes","cardRecharge"]),a.activeModules[1].params.discounts=c.discounts,a.editItem(0)}]),angular.module("userCardApp").service("serviceUserCardBase",["$rootScope","serviceBase",function(a,b){var c={};return c.triggerActiveItem=function(a){$(".app-side .editor").css("marginTop","0"),b.triggerActiveItem(a)},c.editItem=function(a){var c=b.getBaseData("activeModules");"string"==typeof a&&angular.forEach(c,function(b){b.id==a&&(a=b.index)}),b.editItem(a)},c.addFields=function(){var c=b.getBaseData("activeItem");c.params.fields.push({title:"",require:1,bind:"",issystem:0}),b.setBaseData("activeItem",c),a.$broadcast("serviceBase.activeItem.update",c)},c.removeFields=function(c){if("mobile"==c.bind||"realname"==c.bind)return!1;var d=b.getBaseData("activeItem");d.params.fields=_.without(d.params.fields,c),b.setBaseData("activeItem",d),a.$broadcast("serviceBase.activeItem.update",d)},c.addNums=function(){var a=b.getBaseData("activeItem");a.params.nums.push({recharge:"",num:""})},c.removeNums=function(c){var d=b.getBaseData("activeItem");d.params.nums=_.without(d.params.nums,c),b.setBaseData("activeItem",d),a.$broadcast("serviceBase.activeItem.update",d)},c.addRecharges=function(){var c=b.getBaseData("activeItem");c.params.recharges.push({condition:"",back:"",backtype:"0",backunit:"元"}),b.setBaseData("activeItem",c),a.$broadcast("serviceBase.activeItem.update",c)},c.removeRecharges=function(c){var d=b.getBaseData("activeItem");d.params.recharges=_.without(d.params.recharges,c),b.setBaseData("activeItem",d),a.$broadcast("serviceBase.activeItem.update",d)},c.addTimes=function(){var c=b.getBaseData("activeItem");c.params.times.push({recharge:"",time:""}),b.setBaseData("activeItem",c),a.$broadcast("serviceBase.activeItem.update",c)},c.removeTimes=function(c){var d=b.getBaseData("activeItem");d.params.times=_.without(d.params.times,c),b.setBaseData("activeItem",d),a.$broadcast("serviceBase.activeItem.update",d)},c.selectCoupon=function(){var c=b.getBaseData("activeItem");util.coupon(function(d){c.params.grant.coupon=[],angular.forEach(d,function(a){c.params.grant.coupon.push({couponTitle:a.title,coupon:a.id})}),b.setBaseData("activeItem",c),a.$apply(),a.$broadcast("serviceBase.activeItem.update",c)},{multiple:!0})},c.clearCoupon=function(){var c=b.getBaseData("activeItem");c.params.grant.coupon=[],b.setBaseData("activeItem",c),a.$broadcast("serviceBase.activeItem.update",c)},c.addThumb=function(c){var d=b.getBaseData("activeItem");require(["fileUploader"],function(e){e.show(function(e){d.params[c]=e.url,b.setBaseData("activeItem",d),a.$apply(),a.$broadcast("serviceBase.activeItem.update",d)},{direct:!0,multiple:!1})})},c.addBgThumb=function(){var c=b.getBaseData("activeItem");require(["fileUploader"],function(d){d.show(function(d){c.params.background.image=d.url,b.setBaseData("activeItem",c),a.$apply(),a.$broadcast("serviceBase.activeItem.update",c)},{direct:!0,multiple:!1})})},c}]),angular.module("userCardApp").controller("CardActivityCtrl",["$scope",function(a){a.$watch("activeItem.params.grant_rate",function(b,c){b+="",b.match(/^([1-9]\d*(\.(\d)?)?|0(\.(\d)?)?)?$/)?a.activeItem.params.grant_rate=b:a.activeItem.params.grant_rate=c})}]),angular.module("userCardApp").controller("CardBasicCtrl",["$scope","config",function(a,b){a.creditnames=b.creditnames,a.siteroot=b.siteroot,a.recharge_src=a.siteroot+"/app/resource/images/sum-recharge.png",a.scanpay_src=a.siteroot+"/app/resource/images/scan-pay.png"}]),angular.module("userCardApp").controller("CardNumsCtrl",["$scope",function(a){}]),angular.module("userCardApp").controller("CardRechargeCtrl",["$scope",function(a){require(["bootstrap"],function(a){a(".dropdown-toggle").dropdown()})}]),angular.module("userCardApp").controller("CardTimesCtrl",["$scope",function(a){}]),angular.module("userCenterApp",["wapeditorApp"]),angular.module("userCenterApp").controller("MainCtrl",["$scope","$timeout","widget","config","serviceCommon","serviceSetStyle","serviceBase","serviceUcSubmit","serviceUpwardCompatible",function(a,b,c,d,e,f,g,h,i){a.modules=[],a.editors=[],a.activeModules=d.activeModules?d.activeModules:[],a.activeMenus=d.activeMenus?d.activeMenus:[],a.submit={params:{},html:""},a.isNew=!0,a.siteroot=d.siteroot,a.logo_url=a.siteroot+"/app/resource/images/heading.jpg",_.isEmpty(a.activeModules)||1==a.activeModules[0].params.isnew||(a.isNew=!1),a.activeItem={},a.activeIndex=0,a.index=a.activeModules.length?a.activeModules.length:0,g.setBaseData("index",a.index),g.setBaseData("activeModules",a.activeModules),a.pageLength=!_.isEmpty(a.activeModules)&&a.activeModules[0].params.pageLength?a.activeModules[0].params.pageLength:1,a.isLongPage=!0,a.pageLengths={1:1,2:2,3:3,4:4,5:5},a.lineHeights={1:1,1.25:1.25,1.5:1.5,2:2,2.5:2.5},a.fontSizes={12:12,14:14,16:16,18:18,20:20,22:22,24:24,26:26,28:28,30:30,32:32,34:34,36:36,38:38,40:40},a.isNew||(a.activeModules=i.compatibility(a.activeModules),a.activeModules[0].params.isnew=1,"undefined"==typeof a.activeModules[0].params.pageLength&&(a.activeModules[0].params.pageLength=Math.ceil(($(".modules").height()+520)/568)),a.activeModules[0].params.pageLength>1&&(a.pageLength=a.activeModules[0].params.pageLength,g.setBaseData("pageLength",a.pageLength),b(function(){$(".app-content").css("height",568*a.pageLength+"px")},100)),b(function(){var b=0,c=height="";$(".modules>div").each(function(){var d=parseInt($(this).attr("index"));if(c=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("width"),height=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("height"),d>0){for(var e in a.activeModules)a.activeModules[e].index==d&&(b+=parseInt(a.activeModules[e].marginTop),a.activeModules[e].params.positionStyle.width=parseInt(c),a.activeModules[e].params.positionStyle.height=parseInt(height),a.activeModules[e].params.positionStyle.top=b,a.activeModules[e].positionStyle="position:absolute;width:"+c+";height:"+height+";left:"+a.activeModules[e].params.positionStyle.left+"px;top:"+b+"px;",$(this).find("div[ng-controller]").attr("style",a.activeModules[e].positionStyle)); b+=parseInt(height)}e++}),g.setBaseData("activeModules",a.activeModules)},1e3));for(var j in a.activeModules)a.activeModules[j].originParams=angular.copy(a.activeModules[j].params);a.$on("serviceBase.editors.update",function(b,c){a.editors=c}),a.$on("serviceBase.activeItem.update",function(b,c){a.activeItem=c}),a.$on("serviceBase.activeModules.update",function(b,c){a.activeModules=c}),a.$on("serviceBase.activeItem.params.update",function(b,c){a.activeItem.params=c}),a.$on("serviceBase.activeItem.animationName.update",function(b,c){a.activeItem.params.animationStyle.animationName=c}),a.$on("serviceBase.activeItem.style.update",function(b,c,d,e,f){a.activeItem.params[c]=d,a.activeItem[c]=e,"undefined"!=typeof f&&(a.activeItem.transform=f)}),a.$on("updateScope",function(b,c){angular.forEach(c,function(b,c){a[c]=b})}),a.addItem=function(a){g.addItem(a,"uc")},a.editItem=function(a){g.editItem(a)},a.deleteItem=function(a){g.deleteItem(a)},a.submit=function(b){a.submit=h.submit(),a.$apply("submit"),$(b.target).parents("form").submit()},a.init=function(b,c){if(a.modules=g.setModules(b,c),a.activeModules.length>0){var d=[];angular.forEach(a.activeModules,function(a,b){a&&d.push(a.id)})}angular.forEach(a.modules,function(a,b){a.defaultshow&&-1==$.inArray(a.id,d)&&g.addItem(a.id)})},a.setModulePositionStyle=function(a){f.setModulePositionStyle(a)},a.eleAnimationIns=function(a){f.eleAnimationIns(a)},a.savePagePosition=function(){f.savePagePosition(a.activeModules)},a.saveModulePosition=function(){f.saveModulePosition(a.activeItem)},a.changeTextAlign=function(b){f.changeTextAlign(a.activeItem,b)},a.changeBorderWidth=function(){f.changeBorderWidth(a.activeItem)},a.changeInnerHeight=function(){f.changeInnerHeight(a.activeItem)},a.changePageLength=function(b){if(angular.isString(b))if("minus"==b&&a.pageLength>1)b=a.pageLength-1;else{if(!("plus"==b&&a.pageLength<5))return!1;b=a.pageLength+1}var c=f.changePageLength(b,a.activeModules);g.setBaseData({pageLength:parseInt(b),activeModules:c})},a.clearModuleStyle=function(){f.clearModuleStyle(a.activeItem)},a.addThumb=function(b){require(["fileUploader"],function(c){c.show(function(c){a.activeItem.params[b]=c.url,a.$apply("activeItem")},{direct:!0,multiple:!1})})},a.showIconBrowser=function(b){util.iconBrowser(function(c){b.css.icon.icon=c,a.$apply("activeMenus")})},a.addMenu=function(){a.activeMenus.push({icon:"",css:{icon:{icon:"fa fa-external-link"}},name:"",url:""})},a.removeMenu=function(b){a.activeMenus=_.without(a.activeMenus,b)},$(".single-submit").on("click",function(b){a.submit(b)}),a.init(null,["UCheader"]),a.changePageLength(a.pageLength),a.editItem(0),a.$watch("activeItem.params.baseStyle",function(a){a&&f.setModuleBaseStyle(a)},!0),a.$watch("activeItem.params.borderStyle",function(a){a&&f.setModuleBorderStyle(a)},!0),a.$watch("activeItem.params.shadowStyle",function(a){a&&f.setModuleShadowStyle(a)},!0),a.$watch("activeItem.params.animationStyle",function(a){a&&f.setModuleAnimationStyle(a)},!0),a.$watch("activeItem.params.positionStyle",function(a){a&&f.setModulePositionStyle(a)},!0)}]),angular.module("userCenterApp").service("serviceUcSubmit",["serviceBase","serviceCommon",function(a,b){var c={};return c.submit=function(){var c="",d={params:{},html:""},e=$($(".modules").html()),f=a.getBaseData("activeModules"),g=$(".app-usercenter").height(),h=$(".app-content").height(),i=h-g+"px";e.find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var a=_.findIndex(f,{index:parseInt($(this).parent().parent().attr("index"))}),d="",e=angular.copy(f[a].params);$(this).find(".js-default-content").remove();var g=$(this).parent().parent().attr("name").toLowerCase(),h=$(this).css("top"),i=$(this).css("left"),j=$(this).css("width"),k=$(this).css("height"),l="position:absolute;top:"+h+";left:"+i+";width:"+j+";height:"+k+";";switch(f[a].params.positionStyle.top=parseInt(h),f[a].params.positionStyle.left=parseInt(i),f[a].params.positionStyle.width=parseInt(j),f[a].params.positionStyle.height=parseInt(k),f[a].positionStyle=l,g){case"link":var m=this;angular.forEach(e.items,function(a,c){(a.selectCate.pid||a.selectCate.cid)&&$(m).find(".list-group").children().eq(c).replaceWith("
    "+b.buildDataTagBegin("link",a)+''+b.buildDataTagEnd()+"
    ")});break;case"richtext":f[a]&&(f[a].params.content="")}if(d=$(this).html(),"header"!=g){var l=$(this).attr("style");c+='
    '+d+"
    "}a++});var j=f[0].params.bgColor?f[0].params.bgColor:"";return c='
    '+c+"
    ",c=c.replace(/<\!\-\-([^-]*?)\-\->/g,""),c=c.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),c=c.replace(/ ng\-[a-zA-Z]+/g,""),d.html=c,d.params=angular.copy(f),b.stripHaskey(d.params),d},c}]),angular.module("userGroup",["app"]),angular.module("userGroup").controller("UserGroupDisplay",["$scope","config",function(a,b){a.lists=b.lists,a.links=b.links,a.editGroup=function(b){var b=parseInt(b);location.href=a.links.groupPost+"id="+b},a.delGroup=function(b){var b=parseInt(b);location.href=a.links.groupDel+"id="+b}}]),angular.module("userGroup").controller("UserGroupPost",["$scope","config",function(a,b){a.groupInfo=b.groupInfo,a.packages=b.packages,a.changeText=function(a){var b=$(a)[0].target.text;$(a)[0].target.text="展开"==b?"收起":"展开"}}]),angular.module("userManageApp",["app"]),angular.module("userManageApp").controller("UserEditModulesTpl",["$scope","$http","config",function(a,b,c){a.user=c.user,a.profile=c.profile,a.group_info=c.group_info,a.groups=c.groups,a.links=c.links,a.changeGroup=a.user.groupid,a.httpChange=function(c){b.post(a.links.editGroup+"uid="+a.user.uid,{type:c,groupid:a.changeGroup}).success(function(b){2==b.message.errno||(-1==b.message.errno?util.message("抱歉,请求错误,请刷新页面重试!"):1==b.message.errno?util.message("修改失败,请稍候重试!"):(a.group_info=b.message.message,util.message("修改成功!")))})},a.changeText=function(a){var b=$(a)[0].target.text;$(a)[0].target.text="展开"==b?"收起":"展开"}}]),angular.module("userManageApp").controller("UserEditAccount",["$scope","config",function(a,b){a.user=b.user,a.wechats=b.wechats,a.wxapps=b.wxapps,a.profile=b.profile}]),angular.module("userManageApp").controller("UserCreate",["$scope","config",function(a,b){a.groups=b.groups,a.user={username:"",password:"",repassword:"",groupid:0,remark:""},a.changeType=function(a){var b=$(a)[0].target;$(b).attr("type","password")},a.checkSubmit=function(a){return""==$.trim($("#username").val())?(a.preventDefault(),util.message("请输入用户名.","","error"),!1):""==$("#password").val()?(a.preventDefault(),util.message("没有输入密码.","","error"),!1):$("#password").val().length<8?(a.preventDefault(),util.message("密码长度不能小于8个字符.","","error"),!1):$("#password").val()!=$("#repassword").val()?(a.preventDefault(),util.message("两次输入的密码不一致.","","error"),!1):""==$("#groupid").val()||0==$("#groupid").val()?(a.preventDefault(),util.message("请选择所属用户组.","","error"),!1):!0}}]),angular.module("userManageApp").controller("UsersDisplay",["$scope","config",function(a,b){a["do"]=b["do"],a.users=b.users,a.usergroups=b.usergroups,a.links=b.links}]),angular.module("userManageApp").controller("FieldsDisplay",["$scope","config",function(a,b){a.fields=b.fields,a.links=b.links}]),angular.module("userManageApp").controller("FieldsPost",["$scope","config",function(a,b){a.item=b.item,null==a.item?(a.available=!0,a.required=!0,a.unchangeable=!0,a.showinregister=!0):(1==a.item.available?a.available=!0:a.available=!1,1==a.item.required?a.required=!0:a.required=!1,1==a.item.unchangeable?a.unchangeable=!0:a.unchangeable=!1,1==a.item.showinregister?a.showinregister=!0:a.showinregister=!1),a.verifyField=function(){var a=$('input[name="field"]');field_value=a.val(),reg=/^[A-Za-z0-9_]*$/,reg.test(field_value)||(util.message("请使用字母或数字或下划线组合字段名!"),a.val(""))}}]),angular.module("userManageApp").controller("RegistersetCtrl",["$scope","config",function(a,b){a.settings=b.settings,a.groups=b.groups}]),angular.module("userProfile",["app"]),angular.module("userProfile").controller("UserProfileDisplay",["$scope","$window","$http","config",function(a,b,c,d){a.user=d.user,a.profile=d.profile,null==a.profile&&(a.profile={avatar:"",realname:"",births:"",address:"",resides:""}),a.links=d.links,a.changeAvatar=function(){require(["fileUploader"],function(b){b.init(function(b){a.profile.avatar=b.url,a.$apply(a.profile),a.httpChange("avatar")},{direct:!0,multiple:!1})})},a.editInfo=function(b,c){a.userOriginal={},a.userOriginal[b]=c},a.httpChange=function(d){switch(d){case"avatar":c.post(a.links.userPost,{type:d,avatar:a.profile.avatar,uid:a.user.uid}).success(function(a){0==a.message.errno?util.message("修改成功!"):(-1==a.message.errno&&util.message(a.message.message),1==a.message.errno&&util.message(a.message.message),40035==a.message.errno&&util.message(a.message.message))});break;case"username":$(".modal").modal("hide"),c.post(a.links.userPost,{type:d,username:a.userOriginal[d],uid:a.user.uid}).success(function(b){0==b.message.errno?(a.user[d]=a.userOriginal[d],util.message("修改成功!")):(-1==b.message.errno&&util.message(b.message.message),1==b.message.errno&&util.message(b.message.message),2==b.message.errno&&util.message(b.message.message),40035==b.message.errno&&util.message(b.message.message))});break;case"password":if($(".modal").modal("hide"),0==b.sysinfo.isfounder){var e=$(".old-password").val();if(_.isEmpty(e))return util.message("原密码不可为空!"),!1}var f=$(".new-password").val(),g=$(".renew-password").val();if(_.isEmpty(f))return util.message("新密码不可为空!"),!1;if(_.isEmpty(g))return util.message("确认新密码不可为空!"),!1;if(f!=g)return util.message("两次密码不一致!"),!1;c.post(a.links.userPost,{type:d,oldpwd:e,newpwd:f,renewpwd:g,uid:a.user.uid}).success(function(a){0==a.message.errno?util.message("密码修改成功!"):(-1==a.message.errno&&util.message("抱歉,用户不存在或是已经被删除!"),1==a.message.errno&&util.message("密码修改失败,请稍后重试!"),2==a.message.errno&&util.message("两次密码不一致!"),3==a.message.errno&&util.message("原密码不正确!"),40035==a.message.errno&&util.message("不合法的参数!"))});break;case"endtime":$(".modal").modal("hide");var h=a.user.endtype,i=$(':text[name="endtime"]').val();c.post(a.links.userPost,{type:d,endtype:h,endtime:i,uid:a.user.uid}).success(function(b){0==b.message.errno?(a.user.endtype=h,a.user.end=1==h?"永久":i,util.message("到期时间修改成功!")):(-1==b.message.errno&&util.message(b.message.message),1==b.message.errno&&util.message(b.message.message),40035==b.message.errno&&util.message(b.message.message))});break;case"realname":if($(".modal").modal("hide"),_.isEmpty(a.userOriginal.realname))return util.message("真实姓名不可为空!"),!1;c.post(a.links.userPost,{type:d,realname:a.userOriginal.realname,uid:a.user.uid}).success(function(b){0==b.message.errno?(a.profile.realname=a.userOriginal.realname,util.message("真实姓名修改成功!")):(-1==b.message.errno&&util.message(b.message.message),1==b.message.errno&&util.message(b.message.message),40035==b.message.errno&&util.message(b.message.message))});break;case"birth":$(".modal").modal("hide");var j=$(".tpl-year").val(),k=$(".tpl-month").val(),l=$(".tpl-day").val();c.post(a.links.userPost,{type:d,year:j,month:k,day:l,uid:a.user.uid}).success(function(b){0==b.message.errno?(a.profile.births=j+"年"+k+"月"+l+"日",util.message("修改成功!")):(-1==b.message.errno&&util.message(b.message.message),1==b.message.errno&&util.message(b.message.message),40035==b.message.errno&&util.message(b.message.message))});break;case"address":if($(".modal").modal("hide"),_.isEmpty(a.userOriginal.address))return util.message("邮寄地址不可为空!"),!1;c.post(a.links.userPost,{type:d,address:a.userOriginal.address,uid:a.user.uid}).success(function(b){0==b.message.errno?(a.profile.address=a.userOriginal.address,util.message("邮寄地址修改成功!")):(-1==b.message.errno&&util.message(b.message.message),1==b.message.errno&&util.message(b.message.message),40035==b.message.errno&&util.message(b.message.message))});break;case"reside":$(".modal").modal("hide");var m=$(".tpl-province").val(),n=$(".tpl-city").val(),o=$(".tpl-district").val();c.post(a.links.userPost,{type:d,province:m,city:n,district:o,uid:a.user.uid}).success(function(b){0==b.message.errno?(a.profile.resides=m+" "+n+" "+o,util.message("修改成功!")):(-1==b.message.errno&&util.message(b.message.message),1==b.message.errno&&util.message(b.message.message),40035==b.message.errno&&util.message(b.message.message))})}}}]),angular.module("wxApp",["app"]),angular.module("wxApp").controller("MainCtrl",["$scope","$http","config",function(a,b,c){a.apps=[],a.modules=[],a.show_url=[],a.tomodule={},a.type=0,a.createStep=1,a.bottom={bgcolor:"#bebebe",boundary:"#fff",selectedColor:"#0f0",color:"#428bca"},a.menus=[{name:"首页",defaultImage:"./resource/images/bottom-default.png",selectedImage:"./resource/images/bottom-default.png",module:{}},{name:"首页",defaultImage:"./resource/images/bottom-default.png",selectedImage:"./resource/images/bottom-default.png",module:{}}],a.ifShowMenu=!0,a.submit={},a.prevStep=function(){a.createStep<=1?a.createStep=1:a.createStep-=1},a.nextStep=function(){if(a.createStep>4)a.createStep=4;else{var b=a.checkComplete();b&&(a.createStep+=1)}},a.backToStep=function(b){var c=parseInt(b);c=c&&(a.type=0),a.createStep=c)},a.selectType=function(b){a.type=parseInt(b),$(':hidden[name="type"]').val(b)},a.changeType=function(b){a.type=parseInt(b),$(':hidden[name="type"]').val(b)},a.searchTpl=function(){var a=$(':text[id="searchtpl"]').val(),b="默认模版";b.match(a)?($(':hidden[name="template"]').val(1),$(".select-tem-list > ul").show()):($(':hidden[name="template"]').val(""),$(".select-tem-list > ul").hide())},a.selectTpl=function(){$(event.target).parents(".select-tem-item").addClass("active"),$(':hidden[name="template"]').val(1)},a.selectHomeModule=function(b){$(event.target).parents(".to-module").addClass("active").siblings().removeClass("active"),$(':hidden[name="tomodule"]').val(b),a.tomodule=b},a.getLink=function(d){b.post(c.getlink_url,{module:d}).success(function(b){a.show_url=b.message.message})},a.showMenu=function(){a.ifShowMenu=!a.ifShowMenu},a.addMenu=function(){return a.menus.length>=5?!1:void a.menus.push({name:"首页",defaultImage:"./resource/images/bottom-default.png",selectedImage:"./resource/images/bottom-default.png",module:{}})},a.delMenu=function(b){a.menus=_.without(a.menus,a.menus[b])},a.addDefaultImg=function(b){fileUploader.show(function(c){a.menus[b].defaultImage=c.url,a.$apply(a.menus)},{direct:!0,multiple:!1})},a.addSelectedImg=function(b){fileUploader.show(function(c){a.menus[b].selectedImage=c.url,a.$apply(a.menus)},{direct:!0,multiple:!1})},a.checkComplete=function(){var b=a.createStep;switch(b){case 1:var d=$(':text[name="name"]').val().trim(),e=$(".version0").val(),f=$(".version1").val(),g=$(".version2").val(),h=$(':hidden[name="modules"]').val().trim(),i=$(':text[name="account"]').val(),j=$(':text[name="original"]').val(),k=$(':text[name="key"]').val(),l=$(':text[name="secret"]').val();if(!angular.isString(d)||_.isEmpty(d))return util.message("小程序名称不可为空!"),!1;if(!c.uniacid){if(_.isEmpty(i))return util.message("小程序账号不可为空!"),!1;if(_.isEmpty(j))return util.message("原始ID不可为空!"),!1;if(_.isEmpty(k))return util.message("AppId不可为空!"),!1;if(_.isEmpty(l))return util.message("AppSecret不可为空!"),!1}return _.isEmpty(e)?(util.message("版本号第一位有误,需不为空且为数字"),!1):_.isEmpty(f)?(util.message("版本号第二位有误,需不为空且为数字"),!1):_.isEmpty(g)?(util.message("版本号第三位有误,需不为空且为数字"),!1):_.isEmpty(h)?(util.message("请添加并选择至少一个应用!"),!1):(a.modules=modulesVal,a.getLink(a.modules),!0);case 2:var m=parseInt($(':hidden[name="type"]').val());if(2!=m&&3!=m)return util.message("请先选择首页设计类型!"),!1;if(2==m){var n=$(':hidden[name="template"]').val();if(_.isEmpty(n))return util.message("请选择一个模板!"),!1}if(3==m){var n=$(':hidden[name="tomodule"]').val();if(_.isEmpty(n))return util.message("请选择一个应用!"),!1}return!0;case 3:return a.submit={name:$(':text[name="name"]').val(),account:$(':text[name="account"]').val(),original:$(':text[name="original"]').val(),key:$(':text[name="key"]').val(),secret:$(':text[name="secret"]').val(),version0:$(".version0").val(),version1:$(".version1").val(),version2:$(".version2").val(),modules:modulesVal,type:$(':hidden[name="type"]').val(),template:$(':hidden[name="template"]').val(),tomodule:a.tomodule,showmenu:a.ifShowMenu,buttom:a.bottom,menus:a.menus},a.menus.length<2?(util.message("请至少设置两个底部菜单!"),!1):!0;case 4:return!0;default:return!1}},a["package"]=function(){$(':hidden[name="wxappval"]').parents("form").submit()}}]),angular.module("wxApp").controller("WxappEditCtrl",["$scope","$http","config",function(a,b,c){a.uniacid=c.uniacid,a.multiid=c.multiid,a.success_url=c.success_url,a.account_list=[],a.current_module="",a.category={id:"",name:"",displayorder:"",linkurl:""},a.wxapp=c.wxapp,a.slideedit=function(b){a.wxapp="slideedit",a.slideid=b},a.navedit=function(b){a.wxapp="navedit",a.navid=b},a.recommendedit=function(b,c){a.wxapp="recommendedit",a.recommendid=b,a.recommendpid=c},a.showAccount=function(d){a.account_list="",b.post(c.links.accountList,{module:d}).success(function(b){a.account_list=b.message.message,a.current_module=d,console.dir(b)}),$("#show_account").modal("show")},a.selectAccount=function(a,d){b.post(c.links.saveConnection,{module:a,uniacid:d}).success(function(b){0==b.message.errno?($(".js-connection-img-"+a).attr("src",b.message.message.thumb),$(".js-connection-name-"+a).text(b.message.message.name),util.message("修改成功","","success")):util.message(b.message.message,"","error"),$("#show_account").modal("hide")})},a.categoryedit=function(b,c){a.wxapp="categoryedit",a.categoryeditid=b,a.categoryparentid=c},a.get_categorys=function(){b.post(c.links.getCategorys,{uniacid:a.uniacid,multiid:a.multiid}).success(function(b){a.categorys=b.message.message})},a.get_categorys(),a.edit_category=function(){a.categorys.push({name:"",displayorder:"",linkurl:""})},a.del_category=function(d){void 0!=a.categorys[d].id?(b.post(c.links.delCategory,{id:a.categorys[d].id}).success(function(){}),a.get_categorys()):a.categorys.splice(d,1)},a.save_category=function(){return a.name_exist=!1,angular.forEach(a.categorys,function(b){""==b.name&&(util.message("请填写类名"),a.name_exist=!0)}),1==a.name_exist?!1:(b.post(c.links.saveCategory,{post:a.categorys,uniacid:uniacid,multiid:c.multiid}).success(function(a){}),a.get_categorys(),void $("#myModal").modal("hide"))}}]),angular.module("wxApp").directive("we7SelectMore",["$http",function(a){return{restrict:"EA",template:'
  • ',replace:!0,link:function(b){b.selectMore=function(){if($("#modules-Modal").modal("show"),_.isEmpty(b.apps)){var c=$(".modules-content .tab-content .app-allow-list");c.html('
    数据加载中
    ');var d="./index.php?c=wxapp&a=post&do=getapps";a({method:"POST",url:d,cache:!0}).success(function(a,d){b.apps=a.message.message;var e="";angular.forEach(b.apps,function(a,b){e+='
  • '+a.module_title+'

  • '}),c.html(e)}).error(function(a,b){c.html('
    数据加载失败,点此
    ')})}else{var e="",c=$(".modules-content .tab-content .app-allow-list");angular.forEach(b.apps,function(a,b){e+='
  • '+a.module_title+'

  • '}),c.html(e)}}}}}]);