/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)),
void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n});

//----Amit--//
//---Start Show Tab---//
function anchor(e) {
    if (e.ctrlKey) {
        return false;
    }
};


function isAlfa(evt) {
    //debugger
    evt = (evt) ? evt : window.event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
    if (charCode > 31 && (charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122))
    {
        if (charCode == 32)
        {
            return true;
        }
        else{
            return false;
        }
       
    }
    return true;
}

;
function validateEmail(txtemailid) {
    var txtemail = $(txtemailid);
    var semail = txtemail.val();
    var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
    if (semail == "" || filter.test(semail)) {
        removeToolTip(txtemail);
        return true;
    }
    else {
        addToolTip(txtemail, "Please fill correct e-mail address!");
        return false;
    }
}

$('input.numbersOnly').keyup(function () {
    $(this).val($(this).val().replace(/[^0-9\.]/g, ''));
});



function ResetImage(imagenUrl, inputfileid) {
    
    var drEvent = $(inputfileid).dropify();
    drEvent = drEvent.data('dropify');
    drEvent.resetPreview();
    drEvent.clearElement();
    drEvent.settings.defaultFile = imagenUrl;
    drEvent.destroy();
    drEvent.init();
}

function FileExists(urlToFile) {
    var xhr = new XMLHttpRequest();
    xhr.open('HEAD', urlToFile, false);
    xhr.send();

    if (xhr.status == "404") {
        return false;
    }
    else {
        return true;
    }
};

function setScrollPosition(focuselementid, scrollClass) {
    var element = $(focuselementid);
    element.stop().animate({ scrollTop: 0 }, 1000, 'swing', function () {
        if ($(scrollClass) == null || typeof ($(scrollClass)) === 'undefined') {
            $(scrollClass).css("top", "0");
        }
        else {
            $('.slimScrollBar').css("top", "0");
        }
    });
}

function Showtab(id) {
    $('.iframedesign').addClass('iframe-close');
    $('.refresh-box').attr('disabled', true);
    $(id).removeClass('iframe-close');
    $('#btnrefresh' + id.replace('#', '')).removeAttr("disabled");
}

function ReloadBox(id) {
    
    var frameID = id.replace('#', '');
    var tabID = "#btnrefresh" + frameID;
    $(tabID).addClass('fa-spin');

    document.getElementById(id.replace('#', '')).contentDocument.location.reload(true);

    var interval = setInterval(function () {
        if (document.readyState === 'complete') {
            clearInterval(interval);
            $(tabID).removeClass('fa-spin');
        };
    }, 100);
}
//---End Show Tab---//

//---Satrt Close Tab---//
function FindText(string) {   
    if (string == null) return;
    return string.replace(/<(?:.|\n)*?>/gm, '');
}
function FindHtml(string) {
    try{
        if (string == null) return;
        return string.replace(string.replace(/<(?:.|\n)*?>/gm, ''), '');
    }catch(err) {
        return;
    }   
}

function CloseTab(iframid, tabid) {
    

    $(tabid, document).remove();
    $(iframid, document).remove();

    var tablastli = $('.iframe-wrapper-tab li:last-child').attr("id");
    var tablastlianchor = $('.iframe-wrapper-tab li:last-child a').attr("href");

    $('tablastlianchor').removeClass('active');
    $('#' + tablastli).addClass('active');
    Showtab(tablastlianchor);
}
//---End Close Tab---//

function showMsgBox(response,title, text, type, ButtonClass) {
    var msgbox_class = "";
    var msgbox_icon_class = "";
    var returnflag = true;
    switch (response.replace(/"/g, "")) {
        case "-1": /*Duplicate Record found!*/
            swal({
                title: "Duplicate",
                text: "Sorry, Duplicate Record found!",
                type: "warning",
                confirmButtonClass: 'btn-warning',
                timer: 1000,
            });
            returnflag = false;
            try{angular.element(document).scope().hideLoader();}
            catch(ex){}
            
            break;
        case "1": /*Submitted successfully*/
            swal({
                title: "Save",
                text: "Submitted successfully.",
                type: "success",
                confirmButtonClass: 'btn-success',
                timer: 1000,
            });
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            //try{
            //    angular.element(document).scope().ClearOk();
            //}
            //catch(ex){
            //    console.log(ex.message);
            //}
            
            break;
        case "2": /*Updated successfully.*/
            swal({
                title: "Update",
                text: "Updated successfully.",
                type: "success",
                confirmButtonClass: 'btn-success',
                timer: 1000,
            });
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            //try {
            //    angular.element(document).scope().ClearOk();
            //}
            //catch (ex) {
            //    console.log(ex.message);
            //}
            break;
        case "3": /*Deleted successfully.*/
            swal({
                title: "Delete",
                text: "Deleted successfully.",
                type: "success",
                confirmButtonClass: 'btn-success',
                timer: 1000,
            });
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            //try {
            //    angular.element(document).scope().ClearOk();
            //}
            //catch (ex) {
            //    console.log(ex.message);
            //}
            break;
        case "4": /*Cleare successfully.*/
            swal({
                title: "Clear",
                text: "Controls has been cleared.",
                type: "success",
                confirmButtonClass: 'btn-success',
                timer: 1000,
            });
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            //try {
            //    angular.element(document).scope().ClearOk();
            //}
            //catch (ex) {
            //    console.log(ex.message);
            //}
            break;
        case "5": /*Voucher Not Found Message*/
            swal({
                title: "Voucher Not Found",
                text: "Create Voucher First.",
                type: "warning",
                confirmButtonClass: 'btn-warning',
                timer: 1000,
            });
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            //try {
            //    angular.element(document).scope().ClearOk();
            //}
            //catch (ex) {
            //    console.log(ex.message);
            //}
            break;
        case "0":  /*Sorry Record not validate!*/
            swal({
                title: "Validate",
                text: "This is system genrated error! Please contact at helpdesk 0522-4959891,4005977",
                type: "warning",
                confirmButtonClass: 'btn-warning'
            });
            returnflag = false;
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            break;
        case "999":  /*For Title Change*/
            swal({
                title: title,
                text: text,
                type: type,
                confirmButtonClass:  ButtonClass
            });
            returnflag = false;
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            break;
        case "99":  /*For Title Change*/
            swal({
                title: title,
                text: text,
                type: type,
                confirmButtonClass: ButtonClass,
            });
            returnflag = true;
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            break;
        default:  /*Sorry Record not validate!*/
            swal({
                title: "Warning",
                text: response,
                type: "warning",
                confirmButtonClass: 'btn-warning'
            });
            try { angular.element(document).scope().hideLoader(); }
            catch (ex) { }
            returnflag = false;
            break;
    }
    return returnflag;
}

function deleteConfirmbox(confirmText, functions) {
    swal({
        title: "Are you sure?",
        text: "",
        type: "error",
        showCancelButton: true,
        confirmButtonClass: 'btn-danger',
        confirmButtonText: "Yes, delete it!",
        closeOnConfirm: false
    }, functions);
}

function clearConfirmbox(confirmText, functions) {
    swal({
        title: "Are you sure?",
        text: "",
        type: "warning",
        showCancelButton: true,
        confirmButtonClass: 'btn-warning',
        confirmButtonText: "Yes, clear it!",
        closeOnConfirm: false
    },functions);
}

function editConfirmbox(confirmText, functions) {
    swal({
        title: "Are you sure?",
        text: "",
        type: "warning",
        showCancelButton: true,
        confirmButtonClass: 'btn-warning',
        confirmButtonText: "Yes, edit it!",
        closeOnConfirm: false
    }, functions);
}

function submitConfirmbox(confirmText, functions) {
    swal({
        title: "Are you sure?",
        text: "",
        type: "warning",
        showCancelButton: true,
        confirmButtonClass: 'btn-warning',
        confirmButtonText: "Submit",
        closeOnConfirm: false
    },functions);
}

//---End---//

//------Start JS for Clear All Textbox--------------//
function clearControl(flag) {
    $('#btnSave').val("Save");
    $('#btnSavetxt').text("Save");
    $('#Id').text("-1");

    var id1 = $('#collapseinputbox select[id]').each(function () {
        var id = $(this).attr("id");
        document.getElementById(id).selectedIndex = "0";
        return this.id;
    }).get();

    $('input.clear[type="text"]').each(function () {
        $(this).val("");
    });

    $('textarea.clear').each(function () {
        $(this).val("");
    });

    $('input.clear[type="date"]').each(function () {
        $(this).val("");
    });

    $('input.clear[type="checkbox"]').each(function () {
        $(this).prop("checked", false);
    });

    $('select.clear').each(function () {
        $(this).prop('selectedIndex', 0);
    });

    if (flag != 0)
    showMsgBox('4');
}

function defaultValueOnFailure(){
    $('#btnSave').val("Save");
    $('#btnSave').prop('disabled', false);
    $('#btnDelete').prop('disabled', true);
    $('#Id').text("-1");
};
//------End JS for Clear All Textbox--------------//
function checkAllCheckBox(handler, parentDivId, type) {
    if (type == 'checkbox')
        var parentDiv = parentDivId + ' input[type="checkbox"]';

    if (type == "checkbox") {
        if ($(handler).prop('checked'))
            $(parentDiv).prop('checked', true);
        else
            $(parentDiv).prop('checked', false);
    };

    if (type == 'checkbox')
        var findControls = 'input[type = "checkbox"]:checked';

    if ($(parentDivId).find(findControls).length == 0) {
        $(parentDivId).addClass("red-validation");
    }
    else {
        $(parentDivId).removeClass("red-validation");
    }
};

function checkChkAllByJs(handler, parentDivId, type) {
    if (type == 'checkbox')
        var parentDiv = parentDivId + ' input[type="checkbox"]';

    var inputControls = $(parentDiv);
    var flag = true;
    for (var i = 0; i < inputControls.length; i++) {
        if (!$(inputControls[i]).prop('checked'))
            flag = false;
    };
    if (type == "checkbox")
        $(handler).prop('checked', flag);
};
//------Start JS for Fill DropDown List--------------//
function loadSubject(selectedvalue)
{
    var subjectGroupid = $('#ddlSubjectGroup option:selected').val();
    $.ajax({
        url: '../Administrator/SubjectMasterList',
        type: 'POST',
        data: '{sessionId:' + JSON.stringify(sessionId) + ',schoolcode:' + JSON.stringify(schoolCode) + ',branchcode:' + JSON.stringify(branchCode) + ',subjectgroupid:' + JSON.stringify(subjectGroupid) + '}',
        dataType: 'json',
        contentType: 'application/json charset:utf-8',
        success: function (response) {
            fillSubject(response, selectedvalue);
        }
    });
}
function fillSubject(data, selectedvalue) {
    var ddlSubject = $('#ddlSubject');
    var optionfirst = $('<option value="-1">Select Subject</option>');
    ddlSubject.html(optionfirst);
    if ($('#ddlSubjectGroup option:selected').index() > 0) {
        $.each(data, function (i, val) {
            var option = $('<option value=' + val.SubjectId + '>' + val.SubjectName + '</option>');
            ddlSubject.append(option);
        });

        if (selectedvalue != null)
        {
            $('#ddlSubject option').each(function (index) {
                if ($(this).text() == selectedvalue) {
                    $(this).prop("selected", true);
                }
            });
        }

    }
};
function loadSection(selectedvalue)
{
    var classid = $('#ddlClass option:selected').val();
    $.ajax({
        url: '../Administrator/SectionMasterList',
        type: 'POST',
        data: '{sessionId:' + JSON.stringify(sessionId) + ',schoolcode:' + JSON.stringify(schoolCode) + ',branchcode:' + JSON.stringify(branchCode) + ',classid:' + JSON.stringify(classid)+'}',
        dataType: 'json',
        contentType: 'application/json charset:utf-8',
        success: function (response) {
            fillSection(response, selectedvalue);
        }
    });
}
function fillSection(data, selectedvalue) {
    var ddlSection = $('#ddlSection');
    var optionfirst = $('<option value="-1">Select Section</option>');
    ddlSection.html(optionfirst);
    if ($('#ddlClass option:selected').index() > 0) {
        $.each(data, function (i, val) {
            var option = $('<option value=' + val.SectionId + '>' + val.SectionName + '</option>');
            ddlSection.append(option);
        });

        if (selectedvalue != null) {
            $('#ddlSection option').each(function (index) {
                
                if ($(this).text() == selectedvalue) {
                    $(this).prop("selected", true);
                }
                if ($(this).val() == selectedvalue) {
                    $(this).prop("selected", true);
                }
            });
        }
    }
};
function loadCaste(selectedvalue) {
    var categoryid = $('#ddlCategory option:selected').val();
    $.ajax({
        url: '../Administrator/CasteMasterList',
        type: 'POST',
        data: '{categoryid:' + JSON.stringify(categoryid) + ',sessionId:' + JSON.stringify(sessionId) + ',schoolcode:' + JSON.stringify(schoolCode) + ',branchcode:' + JSON.stringify(branchCode) + '}',
        dataType: 'json',
        contentType: 'application/json charset:utf-8',
        success: function (response) {
            fillCaste(response, selectedvalue);
           
        }
    });
}
function fillCaste(data, selectedvalue) {
    var ddlCaste = $('#ddlCaste');
    var optionfirst = $('<option value="-1">Select Caste</option>');
    ddlCaste.html(optionfirst);
    if ($('#ddlCategory option:selected').index() > 0) {
        $.each(data, function (i, val) {
            var option = $('<option value=' + val.CasteId + '>' + val.CasteName + '</option>');
            ddlCaste.append(option);
        });

        if (selectedvalue != null) {
            $('#ddlCaste option').each(function (index) {
                if ($(this).text() == selectedvalue) {
                    $(this).prop("selected", true);
                }
            });
        }
    }
};
function loadState(ddlCountryId, ddlSatateId, selectedvalue) {
    var countryid = $(ddlCountryId + ' option:selected').val();
    $.ajax({
        url: '../Administrator/StateMasterList',
        type: 'POST',
        data: '{countryid:' + JSON.stringify(countryid) + ',}',
        dataType: 'json',
        contentType: 'application/json charset:utf-8',
        success: function (response) {
            fillState(ddlCountryId,ddlSatateId, response, selectedvalue);

        }
    });
}
function fillState(ddlCountryId, ddlSatateId, data, selectedvalue) {
    var ddlState = $(ddlSatateId);
    var optionfirst = $('<option value="-1">Select State</option>');
    ddlState.html(optionfirst);
    if ($(ddlCountryId+' option:selected').index() > 0) {
        $.each(data, function (i, val) {
            var option = $('<option value=' + val.StateId + '>' + val.StateName + '</option>');
            ddlState.append(option);
        });

        if (selectedvalue != null) {
            $(ddlSatateId+' option').each(function (index) {
                if ($(this).text() == selectedvalue) {
                    $(this).prop("selected", true);
                }
            });
        }
    }
};
function loadCity(ddlSatateId, ddlCityId, selectedvalue) {  
    var stateid = $(ddlSatateId + ' option:selected').val();
    $.ajax({
        url: '../Administrator/CityMasterList',
        type: 'POST',
        data: '{stateid:' + JSON.stringify(stateid) + '}',
        dataType: 'json',
        contentType: 'application/json charset:utf-8',
        success: function (response) {
            fillCity(ddlSatateId, ddlCityId, response, selectedvalue);
        }
    });
}
function fillCity(ddlSatateId, ddlCityId, data, selectedvalue) {
    var ddlCity = $(ddlCityId);
    var optionfirst = $('<option value="-1">Select City</option>');
    ddlCity.html(optionfirst);
    if ($(ddlSatateId + ' option:selected').index() > 0) {
        $.each(data, function (i, val) {
            var option = $('<option value=' + val.CityId + '>' + val.CityName + '</option>');
            ddlCity.append(option);
        });

        if (selectedvalue != null) {
            $(ddlCityId + ' option').each(function (index) {
                if ($(this).text() == selectedvalue) {
                    $(this).prop("selected", true);
                }
            });
        }
    }
};
function loadClass(ddlCourseId, ddlClassId, selectedvalue) {

    var courseid = $(ddlCourseId + ' option:selected').val();
    $.ajax({
        url: '../Administrator/ClassMasterList',
        type: 'POST',
        data: '{courseid:' + JSON.stringify(courseid) + ',sessionId:' + JSON.stringify(sessionId) + ',schoolcode:' + JSON.stringify(schoolCode) + ',branchcode:' + JSON.stringify(branchCode) + '}',
        dataType: 'json',
        contentType: 'application/json charset:utf-8',
        success: function (response) {
            //alert(response);
            fillClassusingcourse(ddlCourseId, ddlClassId, response, selectedvalue);
        }
    });
}
function fillClassusingcourse(ddlCourseId, ddlClassId, data, selectedvalue) {
    var ddlClass = $(ddlClassId);
    var optionfirst = $('<option value="-1">Select Class</option>');
    ddlClass.html(optionfirst);
    if ($(ddlCourseId + ' option:selected').index() > 0) {
        $.each(data, function (i, val) {
            var option = $('<option value=' + val.ClassId + '>' + val.ClassName + '</option>');
            ddlClass.append(option);
        });

        if (selectedvalue != null) {
            $(ddlClassId + ' option').each(function (index) {
                if ($(this).text() == selectedvalue) {
                    $(this).prop("selected", true);
                }
            });
        }
    }
};
//------End JS for Fill DropDown List--------------//

//------Start Add ToolTip--------------//
function addToolTip(control, tooltipmesage) {
    control.attr("data-original-title", tooltipmesage);
    control.attr("data-toggle", "tooltip");
    control.tooltip();
    control.focus();
}
//------End Add ToolTip--------------//

//------Start JS for Remove ToolTip--------------//
function removeToolTip(control) {
    control.removeAttr("data-toggle", "tooltip");
    control.removeAttr("data-original-title");
}
//------End JS for Remove ToolTip--------------//

//------Start JS for Validate Control--------------//
$(document).ready(function () {
    $('input.validate').keyup(function () {
        checktextbox($(this));
    });
    $('textarea.validate').keyup(function () {
        checktextarea($(this));
    });
    $('input.validate').blur(function () {
        checktextbox($(this));
    });
    $('select.validate').change(function () {
        checkddl($(this));
    });
    $('select.validate').blur(function () {
        checkddl($(this));
    });
    $('.validate-chk input[type="checkbox"]').change(function () {
        checkchk($(this));
    });
    $('input.numbersOnly').keyup(function () {
        $(this).val($(this).val().replace(/[^0-9\.]/g, ''));
    });
    $('input.time').change(function () {
      
        $(this).attr('maxlength', '5');
        $(this).mask('99:99');
    });
    $('input.prefix').keyup(function () {
        var txtprefixincrementno = $('#txtPrefixIncrementNo');
        var txtprefix = $('#txtPrefix');
        if (txtprefixincrementno.val() > 0 && !Number(txtprefix.val())) {
            txtprefixincrementno.val(0);
            addToolTip(txtprefixincrementno, "Prefix must be numeric vlaue!");
        }
        else {
            removeToolTip(txtprefixincrementno);
        }
    });
    $('input.sufix').keyup(function () {
        var txtsufixincrementno = $('#txtSufixIncrementNo');
        var txtsufix = $('#txtSufix');
        if (txtsufixincrementno.val() > 0 && !Number(txtsufix.val())) {
            txtsufixincrementno.val('0');
            addToolTip(txtsufixincrementno, "Sufix must be numeric vlaue!");
        }
        else {
            removeToolTip(txtsufixincrementno);
        }
    });
    //$('#btnClear').click(function () {
    //    if (confirm('do u want to clear controls?'))
    //        clearControl();
    //});
    //$('#btnSave').click(function () {
    //    if (isValidate())
    //    $(this).prop('disabled', true);
    //});
});

function isValidate(parendiv, validateid) {
    if (validateid == null) {
        validateid = 'validate'
    }
    var modelStateIsvalid = true;
    var firstElement = null;
    if (parendiv != null) {
        var inputelement = parendiv.find('input.' + validateid);
        var textarea = parendiv.find('textarea.' + validateid);
        var ddlelement = parendiv.find('select.' + validateid);

        $.each(inputelement, function (index) {
            if ($(this).val() == "") {
                $(this).addClass("red-validation");
                modelStateIsvalid = false;
                if (firstElement == null)
                    firstElement = $(this);
            }
            else {
                $(this).removeClass("red-validation");
            }
        });

        $.each(textarea, function (index) {
            if ($(this).val() == "") {
                $(this).addClass("red-validation");
                modelStateIsvalid = false;
                if (firstElement == null)
                    firstElement = $(this);
            }
            else {
                $(this).removeClass("red-validation");
            }
        });

        $.each(ddlelement, function (index) {
            if ($(this).children('option:selected').index() == 0) {
                $(this).addClass("red-validation");
                modelStateIsvalid = false;
                if (firstElement == null)
                    firstElement = $(this);
            } else {
                $(this).removeClass("red-validation");
            }
        });
    }
    else {
        $.each($('input.' + validateid), function (index) {
            if ($(this).val() == "") {
                $(this).addClass("red-validation");
                modelStateIsvalid = false;
                if (firstElement == null)
                    firstElement = $(this);
            }
            else {
                $(this).removeClass("red-validation");
            }
        });

        $.each($('textarea.' + validateid), function (index) {
            if ($(this).val() == "") {
                $(this).addClass("red-validation");
                modelStateIsvalid = false;
                if (firstElement == null)
                    firstElement = $(this);
            }
            else {
                $(this).removeClass("red-validation");
            }
        });

        $.each($('select.' + validateid), function (index) {
            
            if ($(this).children('option:selected').index() == 0) {
                $(this).addClass("red-validation");
                modelStateIsvalid = false;
                if (firstElement == null)
                    firstElement = $(this);
            } else {
                $(this).removeClass("red-validation");
            }
        });

        $.each($('.validate-chk'), function (index) {
            if ($(this).find('input[type = "checkbox"]:checked').length == 0) {
                $(this).addClass("red-validation");
                modelStateIsvalid = false;
                if (firstElement == null)
                    firstElement = $(this);
            }
            else {
                $(this).removeClass("red-validation");
            }
        });
    }
    if (firstElement != null)
    {
        firstElement.focus();
    }
    
    return modelStateIsvalid;
}


function checktextbox(txtbox) {
    if (txtbox.val() == "") {
        txtbox.addClass("red-validation");
    }
    else {
        txtbox.removeClass("red-validation");
    }
}
function checktextarea(txtarea) {
    if (txtarea.val() == "") {
        txtarea.addClass("red-validation");
    }
    else {
        txtarea.removeClass("red-validation");
    }
}
function checktextboxhtml(txtboxid) {
    var txtbox = $(txtboxid);
    if (txtbox.val() == "") {
        txtbox.addClass("red-validation");
    }
    else {
        txtbox.removeClass("red-validation");
    }
}
function checkddl(ddl) {
    if (ddl.children('option:selected').index() == 0) {
        ddl.addClass("red-validation");
        var s2id_ddl = $('#s2id_' + ddl.attr('id'));
        if (s2id_ddl != null) {
            s2id_ddl.children().addClass("red-validation");
        }
    }
    else {
        ddl.removeClass("red-validation");
        var s2id_ddl = $('#s2id_' + ddl.attr('id'));
        if (s2id_ddl != null) {
            s2id_ddl.children().removeClass("red-validation");
        }
    }
}
function checkchk(chk) {
    if (chk.parent().parent().find('input[type = "checkbox"]:checked').length == 0) {
        chk.parent().parent().addClass("red-validation");
    }
    else {
        chk.parent().parent().removeClass("red-validation");
    }
}

function confirmEmail(txtemail, txtconfirmemail) {
    if ($(txtemail).val() != $(txtconfirmemail).val()) {
        addToolTip($(txtconfirmemail), "emails don't match!");
        return false;
    }
    else {
        removeToolTip($(txtconfirmemail));
        return true;
    }
}

function validateEmail(txtemailid) {
    var txtemail = $(txtemailid);
    var semail = txtemail.val();
    var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
    if (semail == "" || filter.test(semail)) {
        removeToolTip(txtemail);
        return true;
    }
    else {
        addToolTip(txtemail, "Please fill correct e-mail address!");
        return false;
    }
}
function validatePhoneNo(txtmobilenoid) {
    // 
    var txtmobileno = $(txtmobilenoid);
    var smobileno = txtmobileno.val();
    var filter = /^[0-9]+$/;
    if (smobileno == "" || filter.test(smobileno)) {
        if (smobileno == "" || smobileno.length == 10) {
            removeToolTip(txtmobileno);
            return true;
        }
        else {
            addToolTip(txtmobileno, "Mobile No must be 10 digits!");
            return false;
        }
    }
    else {
        addToolTip(txtmobileno, "Phone number must be 10 digits!");
        return false;
    }
}
function validateNumberOnly(txtfield) {
    var element = $(txtfield);
    var value = element.val();
    var filter = /^[0-9]+$/;
    if (value == "" || filter.test(value)) {
        removeToolTip(element);
        return true;
    }
    else {
        $(txtfield).val("");
        addToolTip(element, "Must be numeric digits!");
        return false;
    }
}
function validateDateOnly(txtfield) {
    var element = $(txtfield);
    var value = element.val();
    var filter = /(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)/;
    if (value == "" || filter.test(value)) {
        removeToolTip(element);
        return true;
    }
    else {
        addToolTip(element, "Enter valid date in dd/MM/yyyy format!");
        return false;
    }
}
function yearValidation(txtfield) {
    var element = $(txtfield);
    var value = element.val();
    var text = /^[0-9]+$/;
    var current_year = new Date().getFullYear();
    if (txtfield != 0) {
        
        if (value < 1916) {
            addToolTip(element, "Year should not be less than 1916");
            return false;
        }
        else if (value > current_year) {
            addToolTip(element, "Year should not be greater than " + current_year);
            return false;
        }
        else if (value.length != 4) {
            addToolTip(element, "Year is not proper. Please check");
            return false;
        }
        else if (value == "" || text.test(value)) {
            removeToolTip(element);
            return true;
        }
        else {
            addToolTip(element, "Must be numeric digits!");
            return false;
        }
    }
}
function validateDecimalNumber(txtfield) {
    var element = $(txtfield);
    var value = element.val();
    var filter = /^\d{0,9}(\.\d{1,2})?$/;
    if (value == "" || filter.test(value)) {
        removeToolTip(element);
        return true;
    }
    else {
        addToolTip(element, "Amount entered is a number with a maximum of 9 integers and two decimals and a minimum of one integer or one decimal. ex. 99.99|99|.99");
        return false;
    }
}
function validateTelephoneNo(contacttext,txtmobilenoid) {
    var txtmobileno = $(txtmobilenoid);
    var smobileno = txtmobileno.val();

    var filter = /^[0-9\+\-\,\s]+$/;
    if (smobileno == "" || filter.test(smobileno)) {
        if (smobileno == "" || smobileno.length >= 10) {
            removeToolTip(txtmobileno);
            return true;
        }
        else {
            addToolTip(txtmobileno, contacttext + " Number Not Valid!");
            return false;
        }
    }
    else {
        addToolTip(txtmobileno, contacttext+" Number Not Valid!");
        return false;
    }
}
//------End JS for Validate Control--------------//
function loadDataTable(tblheader, tblrows, showColumn, imageColumn) {

    var tab = $('<table id="example" class="table compact table-hover table-striped table-bordered nowrap" style="width:100%"></table>');
    var thead = $('<thead></thead>');
    var theadrow = $('<tr></tr>');

    var tfoot = $('<tfoot></tfoot>');
    var tfootrow = $('<tr></tr>');


    var l = tblheader.length;
    for (var i = 0; i < l; i++) {
        var val = tblheader[i]
        var flag = true;
        if (showColumn != null)
        { flag = jQuery.inArray(i, showColumn) == -1 ? false : true; }
        if (flag) {
            if ($('#anchor label').text() != '') {
                if ($('#anchor label').text().indexOf(val.Header) == -1) {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + val.Header + '</label></div>');
                }
            }
            else {
                $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + val.Header + '</label></div>');
            }

        }
        else {
            if ($('#anchor label').text().indexOf(val.Header) == -1) {
                $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + '><label class="">' + val.Header + '</label></div>');
            }
        }
        // Append header here
        theadrow.append('<th>' + val.Header + '</th>');
        // Append footerrow here
        tfootrow.append('<th><input type="text" class="form-control form-control-sm" style="width:' + val.Width + '" placeholder="' + val.Header + '" /></th>');
    }

    thead.append(theadrow);
    tab.append(thead);
    if (JSON.stringify(tblrows).length > 2) {
        var tbody = $('<tbody></tbody>');
        var p = tblrows.length;
        for (var i = 0; i < p; i++) {
            var val = tblrows[i]
            var trow = $('<tr></tr>');
            for (var key in val) {
                if (key == "Id" || key == "#") {
                    trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + val[key] + ' /></td>');
                }
                else {
                    if (imageColumn != null) {
                        var showImage = jQuery.inArray(key, imageColumn) == -1 ? false : true;

                        if (showImage) {
                            trow.append('<td ondblclick="angular.element(this).scope().dbClick();"><img src="../' + (val[key] == null ? '../content/photos/default-user.png' : val[key]) + '" width="50px" height="50px"></td>');
                        }
                        else {
                            trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + val[key] + '</td>');
                        }
                    }
                    else {
                        trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + val[key] + '</td>');
                    }
                }
            };
            tbody.append(trow);
        };
    } else {
        var trow = $('<tr><td style="text-align:center" colspan=' + colspan + '>No Record Found!</td></tr>');
        tbody.append(trow);
    }
    tab.append(tbody);

    tfoot.append(tfootrow);
    tab.append(tfoot);

    $("#UpdatePanel").html(tab);

    var hideColumn = [];
    var m = $('#anchor input[type="checkbox"]');
    for (var i = 0; i < m.length; i++) {

        if (!$(m[i]).prop('checked')) {
            hideColumn.push(i);
        }
    }
    if (JSON.stringify(tblrows).length > 2) {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.append("datatable('" + hideColumn + "')");

        $("#UpdatePanel").append(script);
    }
    angular.element(document).scope().hideLoader();
};
var colIndex = 0;
var colOrder = "desc";

function loadDataUsingPreDefinedColumn(headerColumn, data, displayOrder) {
   
    if (displayOrder != null && displayOrder != '')
    {
        colOrder = displayOrder;
    }
    loadDataTablesUsingPreDefinedColumn(headerColumn, data);
    //else {
    //    var tblRows = [];
    //    var rowObj = { "": "Sorry No Record's Found!" };
    //    tblRows.push(rowObj);

    //    loadDataTablesUsingPreDefinedColumn(headerColumn, tblRows);
    //}
};


function loadDataTablesUsingPreDefinedColumn(tblheader, data) {
    if (JSON.stringify(data).length > 2) {
        var tab = $('<table id="example" class="table compact table-hover table-striped table-bordered nowrap" ></table>');
        var thead = $('<thead></thead>');
        var theadrow = $('<tr></tr>');

        var tfoot = $('<tfoot></tfoot>');
        var tfootrow = $('<tr></tr>');

        var l = tblheader.length;
        for (var i = 0; i < l; i++) {
            
            var val = tblheader[i]
            var headertext = "Sr.No.";
            if (val.HeaderText != "Id") {
                headertext = val.HeaderText;
            }

            if (val.ShowColumn == "Yes") {
                if ($('#anchor label').text() != '') {
                    if ($('#anchor label').text().indexOf(headertext) == -1) {
                        $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label> </div>');
                    }
                }
                else {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label></div>');
                }

            }
            else {
                if ($('#anchor label').text().indexOf(headertext) == -1) {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + '><label class="">' + headertext + '</label></div>');
                }
            }
            if (val.CssClass == 'undefined' || val.CssClass == null)
                theadrow.append('<th>' + headertext + '</th>'); 
            else
                theadrow.append('<th class=' + val.CssClass + '>' + headertext + '</th>');
            // Append footerrow here
            tfootrow.append('<th><input type="text" class="form-control form-control-sm" style="width:' + val.Width + '" placeholder="' + headertext + '" /></th>');
        }

        thead.append(theadrow);

        tab.append(thead);
        var tbody = $('<tbody></tbody>');

        $.each(data, function (i, obj) {
            var trow = $('<tr></tr>');
            $.each(tblheader, function (j, val) {
                var key = val.HeaderValue;

                var value = obj[key];

                if (value == 'undefined' || value == null) { value = "" }
                if (key == "Id" || key == "#") {
                    if (obj[val.Value] == 'undefined' || obj[val.Value] == null)
                        trow.append('<td>' + (i + 1) + '</td>');
                    else
                        trow.append('<td>' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + obj[val.Value] + ' /></td>');
                }
                else if (key == "IsApproved") {
                    trow.append('<td>' + (value == 1 ? "Pending" : value == 2 ? "Approve" : value == 4 ? "Finalize" : value == 5 ? "Suspend" : "Rejected") + '<input type="hidden" id="hd' + key + '" name=' + key + ' value=' + value + ' /></td>');
                }
                else {
                    if (val.ImageColumn == "Yes") {
                        if (obj[val.Value] == 'undefined' || obj[val.Value] == null) {
                            trow.append('<td><img alt=' + obj[val.AltText] + ' src="../' + ((value == null || value == "") ? '../Scripts/SitesBhu/images/Palle-Rama-Rao.png' : value + '?date=' + new Date().toString()) + '" width="50px" height="50px"></td>');
                        }
                        else {
                            trow.append('<td><img alt=' + obj[val.AltText] + ' src="../' + ((value == null || value == "") ? '../Scripts/SitesBhu/images/Palle-Rama-Rao.png' : value + '?date=' + new Date().toString()) + '" width="50px" height="50px"><input type="hidden" id="hd' + key + '" name=' + key + ' value=' + obj[val.Value] + ' /></td>');
                        }
                    }
                    else {

                        if (obj[val.Value] == 'undefined' || obj[val.Value] == null) {
                            if (val.CssClass == 'undefined' || val.CssClass == null)
                                try { trow.append('<td >' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '</td>'); }
                                catch (error) { trow.append('<td >Html format is not supported.</td>'); }
                                
                            else
                                trow.append('<td class=' + val.CssClass + '>' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '</td>');
                        }
                        else {

                            if (val.CssClass == 'undefined' || val.CssClass == null)
                                try { trow.append('<td>' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '<input type="hidden" id="hd' + key + '" name=' + key + ' value=' + obj[val.Value] + ' /></td>'); }
                                catch (error) { trow.append('<td >Html format is not supported.</td>'); }
                                
                            else
                                trow.append('<td class=' + val.CssClass + '>' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '<input type="hidden" id="hd' + key + '" name=' + key + ' value=' + obj[val.Value] + ' /></td>');
                        }

                    }
                }
            });
            tbody.append(trow);
        });

        tab.append(tbody);

        tfoot.append(tfootrow);
        tab.append(tfoot);

        $("#UpdatePanel").html(tab);

        var hideColumn = [];
        var m = $('#anchor input[type="checkbox"]');
        for (var i = 0; i < m.length; i++) {
            if (!$(m[i]).prop('checked')) {
                hideColumn.push(i);
            }
        }
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.append("datatable('" + hideColumn + "')");

        $("#UpdatePanel").append(script);


    }
    else {
        var tab = $('<table id="example" class="table compact table-hover table-striped table-bordered nowrap" ></table>');
        var thead = $('<thead></thead>');
        var theadrow = $('<tr></tr>');

        var l = tblheader.length;
        for (var i = 0; i < l; i++) {
            var val = tblheader[i]
            var headertext = "Sr.No.";
            if (val.HeaderText != "Id") {
                headertext = val.HeaderText;
            }
            if (val.ShowColumn == "Yes") {
                if ($('#anchor label').text() != '') {
                    if ($('#anchor label').text().indexOf(headertext) == -1) {
                        $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label> </div>');
                    }
                }
                else {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label></div>');
                }

            }
            else {
                if ($('#anchor label').text().indexOf(headertext) == -1) {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + '><label class="">' + headertext + '</label></div>');
                }
            }
            if (val.CssClass == 'undefined' || val.CssClass == null)
                // Append header here
                theadrow.append('<th>' + headertext + '</th>');
            else
                theadrow.append('<th class=' + val.CssClass + '>' + headertext + '</th>');
        }

        thead.append(theadrow);

        tab.append(thead);


        var tbody = $('<tbody></tbody>');

        var trow = $('<tr></tr>');
        trow.append("<th colspan=" + tblheader.length + " style='text-align: center;'>No Record Found!</th>");
        tbody.append(trow);

        tab.append(tbody);
        $("#UpdatePanel").html(tab);

    }

    angular.element(document).scope().hideLoader();
};

function loadDataTablesUsingPreDefinedColumnLargeUrl(tblheader, data) {
    if (JSON.stringify(data).length > 2) {
        var tab = $('<table id="example" class="table compact table-hover table-striped table-bordered nowrap" ></table>');
        var thead = $('<thead></thead>');
        var theadrow = $('<tr></tr>');

        var tfoot = $('<tfoot></tfoot>');
        var tfootrow = $('<tr></tr>');

        var l = tblheader.length;
        for (var i = 0; i < l; i++) {
            
            var val = tblheader[i]
            var headertext = "Sr.No.";
            if (val.HeaderText != "Id") {
                headertext = val.HeaderText;
            }

            if (val.ShowColumn == "Yes") {
                if ($('#anchor label').text() != '') {
                    if ($('#anchor label').text().indexOf(headertext) == -1) {
                        $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label> </div>');
                    }
                }
                else {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label></div>');
                }

            }
            else {
                if ($('#anchor label').text().indexOf(headertext) == -1) {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + '><label class="">' + headertext + '</label></div>');
                }
            }
            if (val.CssClass == 'undefined' || val.CssClass == null)
                theadrow.append('<th>' + headertext + '</th>');
            else
                theadrow.append('<th class=' + val.CssClass + '>' + headertext + '</th>');
            // Append footerrow here
            tfootrow.append('<th><input type="text" class="form-control form-control-sm" style="width:' + val.Width + '" placeholder="' + headertext + '" /></th>');
        }

        thead.append(theadrow);

        tab.append(thead);
        var tbody = $('<tbody></tbody>');

        $.each(data, function (i, obj) {
            var trow = $('<tr></tr>');
            $.each(tblheader, function (j, val) {
                var key = val.HeaderValue;

                var value = obj[key];

                if (value == 'undefined' || value == null) { value = "" }
                if (key == "Id" || key == "#") {
                    if (obj[val.Value] == 'undefined' || obj[val.Value] == null)
                        trow.append('<td>' + (i + 1) + '</td>');
                    else
                        trow.append('<td>' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + obj[val.Value] + ' /></td>');
                }
                else if (key == "IsApproved") {
                    trow.append('<td>' + (value == 1 ? "Pending" : value == 2 ? "Approve" : value == 4 ? "Finalize" : value == 5 ? "Suspend" : "Rejected") + '<input type="hidden" id="hd' + key + '" name=' + key + ' value=' + value + ' /></td>');
                }
                else {
                    if (val.ImageColumn == "Yes") {
                        let base64 = value;
                        let buffer = Uint8Array.from(atob(base64), c => c.charCodeAt(0));
                        let blob = new Blob([buffer], { type: "image/jpeg" });
                        let url = URL.createObjectURL(blob);
                        let img = document.createElement("img");
                        img.alt = obj[val.AltText];
                        img.src = url ;
                        img.width = 50;
                        img.hight = 50;
                        if (obj[val.Value] == 'undefined' || obj[val.Value] == null) {
                            var td = $('<td></td>');
                            td.append(img);
                            trow.append(td);
                        }
                        else {
                            var td = $('<td></td>');
                            td.append(img);
                            td.append('<input type="hidden" id="hd' + key + '" name=' + key + ' value=' + obj[val.Value] + ' />');
                            trow.append(td);
                        }
                    }
                    else {

                        if (obj[val.Value] == 'undefined' || obj[val.Value] == null) {
                            if (val.CssClass == 'undefined' || val.CssClass == null)
                                trow.append('<td >' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '</td>');
                            else
                                trow.append('<td class=' + val.CssClass + '>' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '</td>');
                        }
                        else {

                            if (val.CssClass == 'undefined' || val.CssClass == null)
                                trow.append('<td>' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '<input type="hidden" id="hd' + key + '" name=' + key + ' value=' + obj[val.Value] + ' /></td>');
                            else
                                trow.append('<td class=' + val.CssClass + '>' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : value) + '<input type="hidden" id="hd' + key + '" name=' + key + ' value=' + obj[val.Value] + ' /></td>');
                        }

                    }
                }
            });
            tbody.append(trow);
        });

        tab.append(tbody);

        tfoot.append(tfootrow);
        tab.append(tfoot);

        $("#UpdatePanel").html(tab);

        var hideColumn = [];
        var m = $('#anchor input[type="checkbox"]');
        for (var i = 0; i < m.length; i++) {
            if (!$(m[i]).prop('checked')) {
                hideColumn.push(i);
            }
        }
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.append("datatable('" + hideColumn + "')");

        $("#UpdatePanel").append(script);


    }
    else {
        var tab = $('<table id="example" class="table compact table-hover table-striped table-bordered nowrap" ></table>');
        var thead = $('<thead></thead>');
        var theadrow = $('<tr></tr>');

        var l = tblheader.length;
        for (var i = 0; i < l; i++) {
            var val = tblheader[i]
            var headertext = "Sr.No.";
            if (val.HeaderText != "Id") {
                headertext = val.HeaderText;
            }
            if (val.ShowColumn == "Yes") {
                if ($('#anchor label').text() != '') {
                    if ($('#anchor label').text().indexOf(headertext) == -1) {
                        $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label> </div>');
                    }
                }
                else {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="">' + headertext + '</label></div>');
                }

            }
            else {
                if ($('#anchor label').text().indexOf(headertext) == -1) {
                    $("#anchor").append('<div class="checkbox checkbox-success check-box"><input type="checkbox" class="toggle-vis" data-column=' + i + '><label class="">' + headertext + '</label></div>');
                }
            }
            if (val.CssClass == 'undefined' || val.CssClass == null)
                // Append header here
                theadrow.append('<th>' + headertext + '</th>');
            else
                theadrow.append('<th class=' + val.CssClass + '>' + headertext + '</th>');
        }

        thead.append(theadrow);

        tab.append(thead);


        var tbody = $('<tbody></tbody>');

        var trow = $('<tr></tr>');
        trow.append("<th colspan=" + tblheader.length + " style='text-align: center;'>No Record Found!</th>");
        tbody.append(trow);

        tab.append(tbody);
        $("#UpdatePanel").html(tab);

    }

    angular.element(document).scope().hideLoader();
};

function loadDataUsingPreDefinedColumnOnPage(headerColumn, data, displayOrder, displayid, tableid) {
    
        loadDataTablesUsingPreDefinedColumnOnPage(headerColumn, data, displayid, tableid);
};

function Replace(value) {
    var str = value.toString().split('$');
    var returnstring = "";
    var para = $('<p></p>');
    for (var i = 0; i < str.length; i++) {
        para.append('<p>' + str[i] + '</p>');
    }
    return para.html();
};

function loadDataTablesUsingPreDefinedColumnOnPage(tblheader, data, displayid, tableid) {
    if (tableid == null)
    {
        tableid = 'example';
    }
    var tab = $('<table id=' + tableid + ' class="table compact table-hover table-striped table-bordered nowrap" ></table>');
    var thead = $('<thead></thead>');
    var theadrow = $('<tr></tr>');

    var l = tblheader.length;
    var colspan = 0;
    for (var i = 0; i < l; i++) {
        var val = tblheader[i]
        colspan = colspan + 1;
        // Append header here
        theadrow.append('<th>' + val.HeaderText + '</th>');
    }

    thead.append(theadrow);

    tab.append(thead);
    var tbody = $('<tbody></tbody>');
    if (JSON.stringify(data).length > 2) {
        $.each(data, function (i, obj) {
            var trow = $('<tr></tr>');
            $.each(tblheader, function (j, val) {
                var key = val.HeaderValue;
                var value = obj[key];
                if (value == 'undefined' || value == null) { value = "" }
                if (key == "Id" || key == "#") {
                    trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + obj[val.Value] + ' /></td>');
                }
                else {
                    if (val.ImageColumn == "Yes") {
                        trow.append('<td ondblclick="angular.element(this).scope().dbClick();"><img src="../' + ((value == null || value == "") ? '../content/photos/default-user.png' : value) + '" width="50px" height="50px"></td>');
                    }
                    else {
                        trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : Replace(value)) + '</td>');
                    }
                }
            });
            tbody.append(trow);
        });
    }
    else {
        var trow = $('<tr><td style="text-align:center" colspan=' + colspan + '>No Record Found!</td></tr>');
        tbody.append(trow);
    }
    tab.append(tbody);

    if (displayid==null)
        $("#UpdatePanel").html(tab);
    else
        $(displayid).html(tab);

    if (JSON.stringify(data).length > 2) {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.append("BasicDatatable('" + tableid + "')");

        if (displayid == null)
            $("#UpdatePanel").append(script);
        else
            $(displayid).append(script);
    }

    angular.element(document).scope().hideLoader();
};

function BasicDatatable(tableid) {
    if (tableid == null)
    {
        tableid = "example";
    }
    var table = $('#' + tableid).DataTable({
            "paging":   false,
            "ordering": false,
            "info": false,
            "searching": false,
            colReorder: true,
            realtime: true,
            responsive: false,
            "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
            dom: 'lBfrtip',
            buttons: [
        //'pageLength',
            {
                extend: 'copyHtml5',
                exportOptions: {
                    stripHtml: false,
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'csvHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'excelHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'pdfHtml5',
                orientation: 'landscape',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'print',
                exportOptions: {
                    stripHtml: false,
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            }],
            select: true
        });
    
}


function loadDataUsingPreDefinedColumnOnPage1(tblheader, data, displayOrder, displayid, tableid) {
    if (tableid == null) {
        tableid = 'example';
    }
    var tab = $('<table id=' + tableid + ' class="table compact table-hover table-striped table-bordered nowrap" ></table>');
    var thead = $('<thead></thead>');
    var theadrow = $('<tr></tr>');

    var tfoot = $('<tfoot></tfoot>');
    var tfootrow = $('<tr></tr>');

    var l = tblheader.length;
    var colspan = 0;
    for (var i = 0; i < l; i++) {
        var val = tblheader[i]
        colspan = colspan + 1;
        // Append header here
        if (i > 0) {
            theadrow.append('<th class="sum">' + val.HeaderText + '</th>');
        }
        else {
            theadrow.append('<th>' + val.HeaderText + '</th>');
        }           
        // Append footerrow here        
    }

    thead.append(theadrow);

    tab.append(thead);
    var tbody = $('<tbody></tbody>');
    if (JSON.stringify(data).length > 2) {
        $.each(data, function (i, obj) {

            var trow = $('<tr></tr>');
            $.each(tblheader, function (j, val) {
                var key = val.HeaderValue;
                var value = obj[key];
                if (value == 'undefined' || value == null) { value = "" }
                if (key == "Id" || key == "#") {
                    trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + obj[val.Value] + ' /></td>');
                }
                else {
                    if (val.ImageColumn == "Yes") {
                        trow.append('<td ondblclick="angular.element(this).scope().dbClick();"><img src="../' + ((value == null || value == "") ? '../content/photos/default-user.png' : value) + '" width="50px" height="50px"></td>');
                    }
                    else {
                        var cellvalue = (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : Replace(value));
                        if (j > 0) {
                            trow.append('<td class="sum" ondblclick="angular.element(this).scope().dbClick();">' + cellvalue + '</td>');
                        }
                        else {
                            trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + cellvalue + '</td>');
                        }
                    }
                }
            });

            tbody.append(trow);
        });
        //alert($($(tab).html()).find('tbody tr').length)
        
        $.each($(tbody).find('tr'), function () {
            var tatalamount;
            var index = $(this).index();
            var tbodytd = $(this).find('td');
            $.each(tbodytd, function (i, val) {
                var cellvalue = angular.element(val).text();
                if ($.isNumeric(cellvalue)) {
                    if ($.isNumeric(tatalamount))
                        tatalamount = tatalamount + Number(cellvalue);
                    else
                        tatalamount = Number(cellvalue);
                }
            });

            
            if ($.isNumeric(tatalamount)) {
                $(tbody).find('tr:eq(' + (index) + ') td:eq(' + (tbodytd.length - 1) + ')').html('<p style="font-weight:500">' + tatalamount + '</p>');
            }
        });

        $.each($(thead).find('tr th'), function () {
            var tatalamount;
            var index = $(this).index();
            $.each($(tbody).find('tr'), function () {
                var tbodytd = $(this).find('td')[index];
                var cellvalue = angular.element(tbodytd).text();
                if ($.isNumeric(cellvalue)) {
                    if ($.isNumeric(tatalamount))
                        tatalamount = tatalamount + Number(cellvalue);
                    else
                        tatalamount = Number(cellvalue);
                }
            });

            if ($.isNumeric(tatalamount))
                tfootrow.append('<td><p style="font-weight:500">' + tatalamount + '</p></td>');
            else
                tfootrow.append('<td><p style="font-weight:500">Total</p></td>');
        });
    }
    else {
        var trow = $('<tr><td style="text-align:center" colspan=' + colspan + '>No Record Found!</td></tr>');
        tbody.append(trow);
    }
   
    tab.append(tbody);

    tfoot.append(tfootrow);
    tab.append(tfoot);

    

    if (displayid == null)
        $("#UpdatePanel").html(tab);
    else
        $(displayid).html(tab);

    if (JSON.stringify(data).length > 2) {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.append("BasicDatatable1('" + tableid + "')");

        if (displayid == null)
            $("#UpdatePanel").append(script);
        else
            $(displayid).append(script);
    }

    angular.element(document).scope().hideLoader();
};

function BasicDatatable1(tableid) {
    if (tableid == null) {
        tableid = "example";
    }
    var table = $('#' + tableid).DataTable({
        "paging": false,
        "ordering": false,
        "info": false,
        "searching": false,
        colReorder: true,
        realtime: true,
        responsive: false
    });
}

function datatable(hideColumn) {
    //alert(JSON.stringify(hideColumn));
    if (hideColumn != null) {
        hideColumn = hideColumn.split(',');
    };
    if (hideColumn != null && hideColumn.length > 0 && hideColumn[0] != "") {
        var columnDefs = [];
        for (var i = 0; i < hideColumn.length; i++) {
            var val = hideColumn[i]
            columnDefs.push({
                "targets": [Number(val)],
                "visible": false
                //"searchable": false
            })
        }
        //alert(JSON.stringify(columnDefs));
        var table = $('#example').DataTable({
            "order": [[colIndex, colOrder]],
            "columnDefs": columnDefs,
            colReorder: true,
            realtime: true,
            responsive: false,
            dom: 'lBfrtip',
            "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
            buttons: [
        //'pageLength',
            {
                extend: 'copyHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'csvHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'excelHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'pdfHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'print',
                exportOptions: {
                    stripHtml: false,
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            }
            ],
            select: true

        });
    }
    else {
        var table = $('#example').DataTable({
            "order": [[colIndex, colOrder]],
            colReorder: true,
            realtime: true,
            responsive: false,
            "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
            dom: 'lBfrtip',
            buttons: [
        //'pageLength',
            {
                extend: 'copyHtml5',
                exportOptions: {
                    stripHtml: false,
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'csvHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'excelHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'pdfHtml5',
                exportOptions: {
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            },
            {
                extend: 'print',
                exportOptions: {
                    stripHtml: false,
                    columns: function (idx, data, node) {
                        return table.column(idx).visible();
                    }
                }
            }],
            select: true
        });
    }

    if ($('#example thead th').length <= 1) {
        $('#example thead').attr("style", "display: none;");
        $('#example tfoot').attr("style", "display: none;");
    }
    //Apply the search
    table.columns().every(function () {
        var that = this;

        $('input', this.footer()).on('keyup change', function () {
            if (that.search() !== this.value) {
                that
                  .search(this.value)
                  .draw();
            }
        });
    });

    $('input.toggle-vis').on('change', function (e) {

        e.preventDefault();

        //Get the column API object
        var column = table.column($(this).attr('data-column'));

        //Toggle the visibility
        column.visible(!column.visible());
    });

    $('#example thead').on('click', 'th', function (e) {

        e.preventDefault();

        colIndex = $(this).index();

        if (colOrder == "desc") {
            colOrder = "asc"
        }
        else {
            colOrder = "desc"
        }
    });

    //$('#example tbody').on('click', 'td', function (e) {
    //    e.preventDefault();
    //    var tfootinput = $('#example tfoot tr th input');
    //    tfootinput[$(this).index()].focus();
    //});

    $('.refresh-container').fadeOut(2000);
}
//------End JS for DataTable--------------//
//------Start JS for Search DropDownList && Widget--------------//
function a() {
    $(".chzn-select").select2(), $("#destination").mask("99999"), $("#credit").mask("9999-9999-9999-9999"), $("#expiration-date").datetimepicker({
        format: !1
    }), $(".widget").widgster()
}
//------End JS for Search DropDownList && Widget--------------//
function MergeCommonRows(tableid) {
    //alert(table.find('th').length);

    var table = $(tableid);
    var firstColumnBrakes = [];
    // iterate through the columns instead of passing each column as function parameter:
    
    for (var i = 1; i <= table.find('th').length; i++) {
        var previous = null, cellToExtend = null, rowspan = 1;
        table.find("td:nth-child(" + i + ")").each(function (index, e) {
            var jthis = $(this), content = jthis.text();
            // check if current row "break" exist in the array. If not, then extend rowspan:
            if (previous == content && content !== "" && $.inArray(index, firstColumnBrakes) === -1) {
                // hide the row instead of remove(), so the DOM index won't "move" inside loop.
                jthis.addClass('hidden');
                cellToExtend.attr("rowspan", (rowspan = rowspan + 1));
            } else {
                // store row breaks only for the first column:
                if (i === 1) firstColumnBrakes.push(index);
                rowspan = 1;
                previous = content;
                cellToExtend = jthis;
            }
        });
    }
    // now remove hidden td's (or leave them hidden if you wish):
    $('td.hidden').remove();
}

//------Start JS for Virtual table--------------//
function loadPDataTable(tblconid, tblid, tblheader, tblrows, showColumn, imageColumn) {

    var tab = $('<table id=' + tblid + ' class="table table-striped table-bordered nowrap" style="width:100%"></table>');
    var thead = $('<thead></thead>');
    var theadrow = $('<tr></tr>');

    //var tfoot = $('<tfoot></tfoot>');
    //var tfootrow = $('<tr></tr>');

    var l = tblheader.length;
    for (var i = 0; i < l; i++) {
        var val = tblheader[i]
        var flag = true;
        if (showColumn != null)
        { flag = jQuery.inArray(i, showColumn) == -1 ? false : true; }
        if (flag) {
            if ($('#anchor label').text() != '') {
                if ($('#anchor label').text().indexOf(val.Header) == -1) {
                    $("#anchor").append('<input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="lbl-padding-25">' + val.Header + '</label>');
                }
            }
            else {
                $("#anchor").append('<input type="checkbox" class="toggle-vis" data-column=' + i + ' checked><label class="lbl-padding-25">' + val.Header + '</label>');
            }

        }
        else {
            if ($('#anchor label').text().indexOf(val.Header) == -1) {
                $("#anchor").append('<input type="checkbox" class="toggle-vis" data-column=' + i + '><label class="lbl-padding-25">' + val.Header + '</label>');
            }
        }
        // Append header here
        theadrow.append('<th>' + val.Header + '</th>');
        // Append footerrow here
        //tfootrow.append('<th><input type="text" class="form-control form-control-sm" style="width:' + val.Width + '" placeholder="' + val.Header + '" /></th>');
    }

    thead.append(theadrow);
    tab.append(thead);

    var p = tblrows.length;
    for (var i = 0; i < p; i++) {
        var val = tblrows[i]
        var trow = $('<tr></tr>');
        for (var key in val) {
            if (key == "Id" || key == "#") {
                trow.append('<td>' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + val[key] + ' /></td>');
            }
            else {
                if (imageColumn != null) {
                    var showImage = jQuery.inArray(key, imageColumn) == -1 ? false : true;

                    if (showImage) {
                        trow.append('<td><img src="../' + (val[key] == null ? '../content/photos/default-user.png' : val[key]) + '" width="50px" height="50px"></td>');
                    }
                    else {
                        trow.append('<td>' + val[key] + '</td>');
                    }
                }
                else {
                    trow.append('<td>' + val[key] + '</td>');
                }
            }
        };
        tab.append(trow);
    };

    //tfoot.append(tfootrow);
    //tab.append(tfoot);
    $("#" + tblconid).html(tab);


    var hideColumn = [];
    var m = $('#anchor input[type="checkbox"]');
    for (var i = 0; i < m.length; i++) {

        if (!$(m[i]).prop('checked')) {
            hideColumn.push(i);
        }
    }

    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.append("datatable('" + hideColumn + "')");
    $("#" + tblconid).append(script);


    angular.element(document).scope().hideLoader();
};
function loadPSDataTable(tblid, tblrows, showColumn, imageColumn) {
    var p = tblrows.length;
    for (var i = 0; i < p; i++) {
        var val = tblrows[i]
        var trow = $('<tr></tr>');
        for (var key in val) {
            if (key == "Id" || key == "#") {
                trow.append('<td>' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + val[key] + ' /></td>');
            }
            else {
                if (imageColumn != null) {
                    var showImage = jQuery.inArray(key, imageColumn) == -1 ? false : true;

                    if (showImage) {
                        trow.append('<td><img src="../' + (val[key] == null ? '../content/photos/default-user.png' : val[key]) + '" width="50px" height="50px"></td>');
                    }
                    else {
                        trow.append('<td>' + val[key] + '</td>');
                    }
                }
                else {
                    trow.append('<td>' + val[key] + '</td>');
                }
            }
        };
        $("#" + tblid + " tbody").append(trow);
    };

    angular.element(document).scope().hideLoader();
};
function loadVirtualDataTablesUsingPreDefinedColumnOnPage(tblheader, data, displayid, tableid) {
    if (tableid == null) {
        tableid = 'vitual';
    }
    var tab = $('<table id=' + tableid + ' class="table compact table-hover table-striped table-bordered nowrap" ></table>');
    var thead = $('<thead></thead>');
    var theadrow = $('<tr></tr>');

    //var tfoot = $('<tfoot></tfoot>');
    //var tfootrow = $('<tr></tr>');

    var l = tblheader.length;
    for (var i = 0; i < l; i++) {
        var val = tblheader[i]
        // Append header here
        theadrow.append('<th>' + val.HeaderText + '</th>');
        // Append footerrow here
        //tfootrow.append('<th><input type="text" class="form-control form-control-sm" style="width:' + val.Width + '" placeholder="' + val.HeaderText + '" /></th>');
    }

    thead.append(theadrow);

    tab.append(thead);
    var tbody = $('<tbody></tbody>');
    $.each(data, function (i, obj) {
        var trow = $('<tr></tr>');
        $.each(tblheader, function (j, val) {
            var key = val.HeaderValue;
            var value = obj[key];
            if (value == 'undefined' || value == null) { value = "" }
            if (key == "Id" || key == "#") {
                trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + obj[val.Value] + ' /></td>');
            }
            else {
                if (val.ImageColumn == "Yes") {
                    trow.append('<td ondblclick="angular.element(this).scope().dbClick();"><img src="../' + ((value == null || value == "") ? '../content/photos/default-user.png' : value) + '" width="50px" height="50px"></td>');
                }
                else {
                    trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : Replace(value)) + '</td>');
                }
            }
        });
        tbody.append(trow);
    });
    tab.append(tbody);

    //tfoot.append(tfootrow);
    //tab.append(tfoot);
    if (displayid == null)
        $("#VUpdatePanel").html(tab);
    else
        $(displayid).html(tab);

    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.append("BasicDatatable('" + tableid + "')");

    if (displayid == null)
        $("#VUpdatePanel").append(script);
    else
        $(displayid).append(script);

    angular.element(document).scope().hideLoader();
};
//------End JS for Virtual table--------------//
function loadVirtualDataTablesUsingPreDefinedColumnOnPage(tblheader, data, displayid, tableid) {
    if (tableid == null) {
        tableid = 'vitual';
    }
    var tab = $('<table id=' + tableid + ' class="table compact table-hover table-striped table-bordered nowrap" ></table>');
    var thead = $('<thead></thead>');
    var theadrow = $('<tr></tr>');

    //var tfoot = $('<tfoot></tfoot>');
    //var tfootrow = $('<tr></tr>');

    var l = tblheader.length;
    for (var i = 0; i < l; i++) {
        var val = tblheader[i]
        // Append header here
        theadrow.append('<th>' + val.HeaderText + '</th>');
        // Append footerrow here
        //tfootrow.append('<th><input type="text" class="form-control form-control-sm" style="width:' + val.Width + '" placeholder="' + val.HeaderText + '" /></th>');
    }

    thead.append(theadrow);

    tab.append(thead);
    var tbody = $('<tbody></tbody>');
    $.each(data, function (i, obj) {
        var trow = $('<tr></tr>');
        $.each(tblheader, function (j, val) {
            var key = val.HeaderValue;
            var value = obj[key];
            if (value == 'undefined' || value == null) { value = "" }
            if (key == "Id" || key == "#") {
                trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (i + 1) + '<input type="hidden" id="hdId_' + i + '" name="Id" value=' + obj[val.Value] + ' /></td>');
            }
            else {
                if (val.ImageColumn == "Yes") {
                    trow.append('<td ondblclick="angular.element(this).scope().dbClick();"><img src="../' + ((value == null || value == "") ? '../content/photos/default-user.png' : value) + '" width="50px" height="50px"></td>');
                }
                else {
                    trow.append('<td ondblclick="angular.element(this).scope().dbClick();">' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : Replace(value)) + '</td>');
                }
            }
        });
        tbody.append(trow);
    });
    tab.append(tbody);

    //tfoot.append(tfootrow);
    //tab.append(tfoot);
    if (displayid == null)
        $("#VUpdatePanel").html(tab);
    else
        $(displayid).html(tab);

    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.append("BasicDatatable('" + tableid + "')");

    if (displayid == null)
        $("#VUpdatePanel").append(script);
    else
        $(displayid).append(script);

    angular.element(document).scope().hideLoader();
};

function ExpandedAction() 
{
    // 
    if ($('.menu-box .nav > .moremenulist .MoreItemBind.expanded-open').length == 0) {
        $('.menu-box .nav > .moremenulist .MoreItemBind ').addClass('expanded-open');
        $('.menu-box .nav > .moremenulist #ExpandedAction ').addClass('icon-r');
    }
    else {
        $('.menu-box .nav > .moremenulist .MoreItemBind ').removeClass('expanded-open');
        $('.menu-box .nav > .moremenulist #ExpandedAction ').removeClass('icon-r');
    }
} 

 
/*
 AngularJS v1.8.2
 (c) 2010-2020 Google LLC. http://angularjs.org
 License: MIT
*/
(function (z) {
    'use strict'; function ve(a) { if (D(a)) w(a.objectMaxDepth) && (Xb.objectMaxDepth = Yb(a.objectMaxDepth) ? a.objectMaxDepth : NaN), w(a.urlErrorParamsEnabled) && Ga(a.urlErrorParamsEnabled) && (Xb.urlErrorParamsEnabled = a.urlErrorParamsEnabled); else return Xb } function Yb(a) { return X(a) && 0 < a } function F(a, b) {
        b = b || Error; return function () {
            var d = arguments[0], c; c = "[" + (a ? a + ":" : "") + d + "] http://errors.angularjs.org/1.8.2/" + (a ? a + "/" : "") + d; for (d = 1; d < arguments.length; d++) {
                c = c + (1 == d ? "?" : "&") + "p" + (d - 1) + "="; var e = encodeURIComponent,
                    f; f = arguments[d]; f = "function" == typeof f ? f.toString().replace(/ \{[\s\S]*$/, "") : "undefined" == typeof f ? "undefined" : "string" != typeof f ? JSON.stringify(f) : f; c += e(f)
            } return new b(c)
        }
    } function za(a) { if (null == a || $a(a)) return !1; if (H(a) || C(a) || x && a instanceof x) return !0; var b = "length" in Object(a) && a.length; return X(b) && (0 <= b && b - 1 in a || "function" === typeof a.item) } function r(a, b, d) {
        var c, e; if (a) if (B(a)) for (c in a) "prototype" !== c && "length" !== c && "name" !== c && a.hasOwnProperty(c) && b.call(d, a[c], c, a); else if (H(a) ||
            za(a)) { var f = "object" !== typeof a; c = 0; for (e = a.length; c < e; c++)(f || c in a) && b.call(d, a[c], c, a) } else if (a.forEach && a.forEach !== r) a.forEach(b, d, a); else if (Pc(a)) for (c in a) b.call(d, a[c], c, a); else if ("function" === typeof a.hasOwnProperty) for (c in a) a.hasOwnProperty(c) && b.call(d, a[c], c, a); else for (c in a) ta.call(a, c) && b.call(d, a[c], c, a); return a
    } function Qc(a, b, d) { for (var c = Object.keys(a).sort(), e = 0; e < c.length; e++)b.call(d, a[c[e]], c[e]); return c } function Zb(a) { return function (b, d) { a(d, b) } } function we() { return ++qb }
    function $b(a, b, d) { for (var c = a.$$hashKey, e = 0, f = b.length; e < f; ++e) { var g = b[e]; if (D(g) || B(g)) for (var k = Object.keys(g), h = 0, l = k.length; h < l; h++) { var m = k[h], p = g[m]; d && D(p) ? ha(p) ? a[m] = new Date(p.valueOf()) : ab(p) ? a[m] = new RegExp(p) : p.nodeName ? a[m] = p.cloneNode(!0) : ac(p) ? a[m] = p.clone() : "__proto__" !== m && (D(a[m]) || (a[m] = H(p) ? [] : {}), $b(a[m], [p], !0)) : a[m] = p } } c ? a.$$hashKey = c : delete a.$$hashKey; return a } function S(a) { return $b(a, Ha.call(arguments, 1), !1) } function xe(a) { return $b(a, Ha.call(arguments, 1), !0) } function fa(a) {
        return parseInt(a,
            10)
    } function bc(a, b) { return S(Object.create(a), b) } function E() { } function Ta(a) { return a } function ia(a) { return function () { return a } } function cc(a) { return B(a.toString) && a.toString !== la } function A(a) { return "undefined" === typeof a } function w(a) { return "undefined" !== typeof a } function D(a) { return null !== a && "object" === typeof a } function Pc(a) { return null !== a && "object" === typeof a && !Rc(a) } function C(a) { return "string" === typeof a } function X(a) { return "number" === typeof a } function ha(a) { return "[object Date]" === la.call(a) }
    function H(a) { return Array.isArray(a) || a instanceof Array } function dc(a) { switch (la.call(a)) { case "[object Error]": return !0; case "[object Exception]": return !0; case "[object DOMException]": return !0; default: return a instanceof Error } } function B(a) { return "function" === typeof a } function ab(a) { return "[object RegExp]" === la.call(a) } function $a(a) { return a && a.window === a } function bb(a) { return a && a.$evalAsync && a.$watch } function Ga(a) { return "boolean" === typeof a } function ye(a) { return a && X(a.length) && ze.test(la.call(a)) }
    function ac(a) { return !(!a || !(a.nodeName || a.prop && a.attr && a.find)) } function Ae(a) { var b = {}; a = a.split(","); var d; for (d = 0; d < a.length; d++)b[a[d]] = !0; return b } function ua(a) { return K(a.nodeName || a[0] && a[0].nodeName) } function cb(a, b) { var d = a.indexOf(b); 0 <= d && a.splice(d, 1); return d } function Ia(a, b, d) {
        function c(a, b, c) {
            c--; if (0 > c) return "..."; var d = b.$$hashKey, f; if (H(a)) { f = 0; for (var g = a.length; f < g; f++)b.push(e(a[f], c)) } else if (Pc(a)) for (f in a) b[f] = e(a[f], c); else if (a && "function" === typeof a.hasOwnProperty) for (f in a) a.hasOwnProperty(f) &&
                (b[f] = e(a[f], c)); else for (f in a) ta.call(a, f) && (b[f] = e(a[f], c)); d ? b.$$hashKey = d : delete b.$$hashKey; return b
        } function e(a, b) { if (!D(a)) return a; var d = g.indexOf(a); if (-1 !== d) return k[d]; if ($a(a) || bb(a)) throw oa("cpws"); var d = !1, e = f(a); void 0 === e && (e = H(a) ? [] : Object.create(Rc(a)), d = !0); g.push(a); k.push(e); return d ? c(a, e, b) : e } function f(a) {
            switch (la.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),
                    a.byteOffset, a.length); case "[object ArrayBuffer]": if (!a.slice) { var b = new ArrayBuffer(a.byteLength); (new Uint8Array(b)).set(new Uint8Array(a)); return 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]": return b = new RegExp(a.source, a.toString().match(/[^/]*$/)[0]), b.lastIndex = a.lastIndex, b; case "[object Blob]": return new a.constructor([a], { type: a.type })
            }if (B(a.cloneNode)) return a.cloneNode(!0)
        }
        var g = [], k = []; d = Yb(d) ? d : NaN; if (b) { if (ye(b) || "[object ArrayBuffer]" === la.call(b)) throw oa("cpta"); if (a === b) throw oa("cpi"); H(b) ? b.length = 0 : r(b, function (a, c) { "$$hashKey" !== c && delete b[c] }); g.push(a); k.push(b); return c(a, b, d) } return e(a, d)
    } function ec(a, b) { return a === b || a !== a && b !== b } function va(a, b) {
        if (a === b) return !0; if (null === a || null === b) return !1; if (a !== a && b !== b) return !0; var d = typeof a, c; if (d === typeof b && "object" === d) if (H(a)) {
            if (!H(b)) return !1; if ((d = a.length) === b.length) {
                for (c = 0; c < d; c++)if (!va(a[c],
                    b[c])) return !1; return !0
            }
        } else { if (ha(a)) return ha(b) ? ec(a.getTime(), b.getTime()) : !1; if (ab(a)) return ab(b) ? a.toString() === b.toString() : !1; if (bb(a) || bb(b) || $a(a) || $a(b) || H(b) || ha(b) || ab(b)) return !1; d = T(); for (c in a) if ("$" !== c.charAt(0) && !B(a[c])) { if (!va(a[c], b[c])) return !1; d[c] = !0 } for (c in b) if (!(c in d) && "$" !== c.charAt(0) && w(b[c]) && !B(b[c])) return !1; return !0 } return !1
    } function db(a, b, d) { return a.concat(Ha.call(b, d)) } function Va(a, b) {
        var d = 2 < arguments.length ? Ha.call(arguments, 2) : []; return !B(b) || b instanceof
            RegExp ? b : d.length ? function () { return arguments.length ? b.apply(a, db(d, arguments, 0)) : b.apply(a, d) } : function () { return arguments.length ? b.apply(a, arguments) : b.call(a) }
    } function Sc(a, b) { var d = b; "string" === typeof a && "$" === a.charAt(0) && "$" === a.charAt(1) ? d = void 0 : $a(b) ? d = "$WINDOW" : b && z.document === b ? d = "$DOCUMENT" : bb(b) && (d = "$SCOPE"); return d } function eb(a, b) { if (!A(a)) return X(b) || (b = b ? 2 : null), JSON.stringify(a, Sc, b) } function Tc(a) { return C(a) ? JSON.parse(a) : a } function fc(a, b) {
        a = a.replace(Be, ""); var d = Date.parse("Jan 01, 1970 00:00:00 " +
            a) / 6E4; return Y(d) ? b : d
    } function Uc(a, b) { a = new Date(a.getTime()); a.setMinutes(a.getMinutes() + b); return a } function gc(a, b, d) { d = d ? -1 : 1; var c = a.getTimezoneOffset(); b = fc(b, c); return Uc(a, d * (b - c)) } function Aa(a) { a = x(a).clone().empty(); var b = x("<div></div>").append(a).html(); try { return a[0].nodeType === Pa ? K(b) : b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/, function (a, b) { return "<" + K(b) }) } catch (d) { return K(b) } } function Vc(a) { try { return decodeURIComponent(a) } catch (b) { } } function hc(a) {
        var b = {}; r((a || "").split("&"),
            function (a) { var c, e, f; a && (e = a = a.replace(/\+/g, "%20"), c = a.indexOf("="), -1 !== c && (e = a.substring(0, c), f = a.substring(c + 1)), e = Vc(e), w(e) && (f = w(f) ? Vc(f) : !0, ta.call(b, e) ? H(b[e]) ? b[e].push(f) : b[e] = [b[e], f] : b[e] = f)) }); return b
    } function Ce(a) { var b = []; r(a, function (a, c) { H(a) ? r(a, function (a) { b.push(ba(c, !0) + (!0 === a ? "" : "=" + ba(a, !0))) }) : b.push(ba(c, !0) + (!0 === a ? "" : "=" + ba(a, !0))) }); return b.length ? b.join("&") : "" } function ic(a) { return ba(a, !0).replace(/%26/gi, "&").replace(/%3D/gi, "=").replace(/%2B/gi, "+") } function ba(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 De(a, b) { var d, c, e = Qa.length; for (c = 0; c < e; ++c)if (d = Qa[c] + b, C(d = a.getAttribute(d))) return d; return null } function Ee(a, b) {
            var d, c, e = {}; r(Qa, function (b) { b += "app"; !d && a.hasAttribute && a.hasAttribute(b) && (d = a, c = a.getAttribute(b)) }); r(Qa, function (b) { b += "app"; var e; !d && (e = a.querySelector("[" + b.replace(":", "\\:") + "]")) && (d = e, c = e.getAttribute(b)) });
            d && (Fe ? (e.strictDi = null !== De(d, "strict-di"), b(d, c ? [c] : [], e)) : z.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))
        } function Wc(a, b, d) {
            D(d) || (d = {}); d = S({ strictDi: !1 }, d); var c = function () {
                a = x(a); if (a.injector()) { var c = a[0] === z.document ? "document" : Aa(a); throw oa("btstrpd", c.replace(/</, "&lt;").replace(/>/, "&gt;")); } b = b || []; b.unshift(["$provide", function (b) { b.value("$rootElement", a) }]); d.debugInfoEnabled && b.push(["$compileProvider",
                    function (a) { a.debugInfoEnabled(!0) }]); b.unshift("ng"); c = fb(b, d.strictDi); c.invoke(["$rootScope", "$rootElement", "$compile", "$injector", function (a, b, c, d) { a.$apply(function () { b.data("$injector", d); c(b)(a) }) }]); return c
            }, e = /^NG_ENABLE_DEBUG_INFO!/, f = /^NG_DEFER_BOOTSTRAP!/; z && e.test(z.name) && (d.debugInfoEnabled = !0, z.name = z.name.replace(e, "")); if (z && !f.test(z.name)) return c(); z.name = z.name.replace(f, ""); ca.resumeBootstrap = function (a) { r(a, function (a) { b.push(a) }); return c() }; B(ca.resumeDeferredBootstrap) &&
                ca.resumeDeferredBootstrap()
        } function Ge() { z.name = "NG_ENABLE_DEBUG_INFO!" + z.name; z.location.reload() } function He(a) { a = ca.element(a).injector(); if (!a) throw oa("test"); return a.get("$$testability") } function Xc(a, b) { b = b || "_"; return a.replace(Ie, function (a, c) { return (c ? b : "") + a.toLowerCase() }) } function Je() {
            var a; if (!Yc) {
                var b = rb(); (sb = A(b) ? z.jQuery : b ? z[b] : void 0) && sb.fn.on ? (x = sb, S(sb.fn, { scope: Wa.scope, isolateScope: Wa.isolateScope, controller: Wa.controller, injector: Wa.injector, inheritedData: Wa.inheritedData })) :
                    x = U; a = x.cleanData; x.cleanData = function (b) { for (var c, e = 0, f; null != (f = b[e]); e++)(c = (x._data(f) || {}).events) && c.$destroy && x(f).triggerHandler("$destroy"); a(b) }; ca.element = x; Yc = !0
            }
        } function Ke() { U.legacyXHTMLReplacement = !0 } function gb(a, b, d) { if (!a) throw oa("areq", b || "?", d || "required"); return a } function tb(a, b, d) { d && H(a) && (a = a[a.length - 1]); gb(B(a), b, "not a function, got " + (a && "object" === typeof a ? a.constructor.name || "Object" : typeof a)); return a } function Ja(a, b) {
            if ("hasOwnProperty" === a) throw oa("badname",
                b);
        } function Le(a, b, d) { if (!b) return a; b = b.split("."); for (var c, e = a, f = b.length, g = 0; g < f; g++)c = b[g], a && (a = (e = a)[c]); return !d && B(a) ? Va(e, a) : a } function ub(a) { for (var b = a[0], d = a[a.length - 1], c, e = 1; b !== d && (b = b.nextSibling); e++)if (c || a[e] !== b) c || (c = x(Ha.call(a, 0, e))), c.push(b); return c || a } function T() { return Object.create(null) } function jc(a) { if (null == a) return ""; switch (typeof a) { case "string": break; case "number": a = "" + a; break; default: a = !cc(a) || H(a) || ha(a) ? eb(a) : a.toString() }return a } function Me(a) {
            function b(a,
                b, c) { return a[b] || (a[b] = c()) } var d = F("$injector"), c = F("ng"); a = b(a, "angular", Object); a.$$minErr = a.$$minErr || F; return b(a, "module", function () {
                    var a = {}; return function (f, g, k) {
                        var h = {}; if ("hasOwnProperty" === f) throw c("badname", "module"); g && a.hasOwnProperty(f) && (a[f] = null); return b(a, f, function () {
                            function a(b, c, d, f) { f || (f = e); return function () { f[d || "push"]([b, c, arguments]); return t } } function b(a, c, d) { d || (d = e); return function (b, e) { e && B(e) && (e.$$moduleName = f); d.push([a, c, arguments]); return t } } if (!g) throw d("nomod",
                                f); var e = [], n = [], s = [], G = a("$injector", "invoke", "push", n), t = {
                                    _invokeQueue: e, _configBlocks: n, _runBlocks: s, info: function (a) { if (w(a)) { if (!D(a)) throw c("aobj", "value"); h = a; return this } return h }, requires: g, name: f, provider: b("$provide", "provider"), factory: b("$provide", "factory"), service: b("$provide", "service"), value: a("$provide", "value"), constant: a("$provide", "constant", "unshift"), decorator: b("$provide", "decorator", n), animation: b("$animateProvider", "register"), filter: b("$filterProvider", "register"), controller: b("$controllerProvider",
                                        "register"), directive: b("$compileProvider", "directive"), component: b("$compileProvider", "component"), config: G, run: function (a) { s.push(a); return this }
                                }; k && G(k); return t
                        })
                    }
                })
        } function ja(a, b) { if (H(a)) { b = b || []; for (var d = 0, c = a.length; d < c; d++)b[d] = a[d] } else if (D(a)) for (d in b = b || {}, a) if ("$" !== d.charAt(0) || "$" !== d.charAt(1)) b[d] = a[d]; return b || a } function Ne(a, b) { var d = []; Yb(b) && (a = ca.copy(a, null, b)); return JSON.stringify(a, function (a, b) { b = Sc(a, b); if (D(b)) { if (0 <= d.indexOf(b)) return "..."; d.push(b) } return b }) }
    function Oe(a) {
        S(a, { errorHandlingConfig: ve, bootstrap: Wc, copy: Ia, extend: S, merge: xe, equals: va, element: x, forEach: r, injector: fb, noop: E, bind: Va, toJson: eb, fromJson: Tc, identity: Ta, isUndefined: A, isDefined: w, isString: C, isFunction: B, isObject: D, isNumber: X, isElement: ac, isArray: H, version: Pe, isDate: ha, callbacks: { $$counter: 0 }, getTestability: He, reloadWithDebugInfo: Ge, UNSAFE_restoreLegacyJqLiteXHTMLReplacement: Ke, $$minErr: F, $$csp: Ba, $$encodeUriSegment: ic, $$encodeUriQuery: ba, $$lowercase: K, $$stringify: jc, $$uppercase: vb });
        lc = Me(z); lc("ng", ["ngLocale"], ["$provide", function (a) {
            a.provider({ $$sanitizeUri: Qe }); a.provider("$compile", Zc).directive({
                a: Re, input: $c, textarea: $c, form: Se, script: Te, select: Ue, option: Ve, ngBind: We, ngBindHtml: Xe, ngBindTemplate: Ye, ngClass: Ze, ngClassEven: $e, ngClassOdd: af, ngCloak: bf, ngController: cf, ngForm: df, ngHide: ef, ngIf: ff, ngInclude: gf, ngInit: hf, ngNonBindable: jf, ngPluralize: kf, ngRef: lf, ngRepeat: mf, ngShow: nf, ngStyle: of, ngSwitch: pf, ngSwitchWhen: qf, ngSwitchDefault: rf, ngOptions: sf, ngTransclude: tf, ngModel: uf,
                ngList: vf, ngChange: wf, pattern: ad, ngPattern: ad, required: bd, ngRequired: bd, minlength: cd, ngMinlength: cd, maxlength: dd, ngMaxlength: dd, ngValue: xf, ngModelOptions: yf
            }).directive({ ngInclude: zf, input: Af }).directive(wb).directive(ed); a.provider({
                $anchorScroll: Bf, $animate: Cf, $animateCss: Df, $$animateJs: Ef, $$animateQueue: Ff, $$AnimateRunner: Gf, $$animateAsyncRun: Hf, $browser: If, $cacheFactory: Jf, $controller: Kf, $document: Lf, $$isDocumentHidden: Mf, $exceptionHandler: Nf, $filter: fd, $$forceReflow: Of, $interpolate: Pf, $interval: Qf,
                $$intervalFactory: Rf, $http: Sf, $httpParamSerializer: Tf, $httpParamSerializerJQLike: Uf, $httpBackend: Vf, $xhrFactory: Wf, $jsonpCallbacks: Xf, $location: Yf, $log: Zf, $parse: $f, $rootScope: ag, $q: bg, $$q: cg, $sce: dg, $sceDelegate: eg, $sniffer: fg, $$taskTrackerFactory: gg, $templateCache: hg, $templateRequest: ig, $$testability: jg, $timeout: kg, $window: lg, $$rAF: mg, $$jqLite: ng, $$Map: og, $$cookieReader: pg
            })
        }]).info({ angularVersion: "1.8.2" })
    } function xb(a, b) { return b.toUpperCase() } function yb(a) { return a.replace(qg, xb) } function mc(a) {
        a =
        a.nodeType; return 1 === a || !a || 9 === a
    } function gd(a, b) {
        var d, c, e, f = b.createDocumentFragment(), g = [], k; if (nc.test(a)) { d = f.appendChild(b.createElement("div")); c = (rg.exec(a) || ["", ""])[1].toLowerCase(); e = U.legacyXHTMLReplacement ? a.replace(sg, "<$1></$2>") : a; if (10 > wa) for (c = hb[c] || hb._default, d.innerHTML = c[1] + e + c[2], k = c[0]; k--;)d = d.firstChild; else { c = qa[c] || []; for (k = c.length; -1 < --k;)d.appendChild(z.document.createElement(c[k])), d = d.firstChild; d.innerHTML = e } g = db(g, d.childNodes); d = f.firstChild; d.textContent = "" } else g.push(b.createTextNode(a));
        f.textContent = ""; f.innerHTML = ""; r(g, function (a) { f.appendChild(a) }); return f
    } function U(a) { if (a instanceof U) return a; var b; C(a) && (a = V(a), b = !0); if (!(this instanceof U)) { if (b && "<" !== a.charAt(0)) throw oc("nosel"); return new U(a) } if (b) { b = z.document; var d; a = (d = tg.exec(a)) ? [b.createElement(d[1])] : (d = gd(a, b)) ? d.childNodes : []; pc(this, a) } else B(a) ? hd(a) : pc(this, a) } function qc(a) { return a.cloneNode(!0) } function zb(a, b) { !b && mc(a) && x.cleanData([a]); a.querySelectorAll && x.cleanData(a.querySelectorAll("*")) } function id(a) {
        for (var b in a) return !1;
        return !0
    } function jd(a) { var b = a.ng339, d = b && Ka[b], c = d && d.events, d = d && d.data; d && !id(d) || c && !id(c) || (delete Ka[b], a.ng339 = void 0) } function kd(a, b, d, c) { if (w(c)) throw oc("offargs"); var e = (c = Ab(a)) && c.events, f = c && c.handle; if (f) { if (b) { var g = function (b) { var c = e[b]; w(d) && cb(c || [], d); w(d) && c && 0 < c.length || (a.removeEventListener(b, f), delete e[b]) }; r(b.split(" "), function (a) { g(a); Bb[a] && g(Bb[a]) }) } else for (b in e) "$destroy" !== b && a.removeEventListener(b, f), delete e[b]; jd(a) } } function rc(a, b) {
        var d = a.ng339; if (d =
            d && Ka[d]) b ? delete d.data[b] : d.data = {}, jd(a)
    } function Ab(a, b) { var d = a.ng339, d = d && Ka[d]; b && !d && (a.ng339 = d = ++ug, d = Ka[d] = { events: {}, data: {}, handle: void 0 }); return d } function sc(a, b, d) { if (mc(a)) { var c, e = w(d), f = !e && b && !D(b), g = !b; a = (a = Ab(a, !f)) && a.data; if (e) a[yb(b)] = d; else { if (g) return a; if (f) return a && a[yb(b)]; for (c in b) a[yb(c)] = b[c] } } } function Cb(a, b) { return a.getAttribute ? -1 < (" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ").indexOf(" " + b + " ") : !1 } function Db(a, b) {
        if (b && a.setAttribute) {
            var d =
                (" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " "), c = d; r(b.split(" "), function (a) { a = V(a); c = c.replace(" " + a + " ", " ") }); c !== d && a.setAttribute("class", V(c))
        }
    } function Eb(a, b) { if (b && a.setAttribute) { var d = (" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " "), c = d; r(b.split(" "), function (a) { a = V(a); -1 === c.indexOf(" " + a + " ") && (c += a + " ") }); c !== d && a.setAttribute("class", V(c)) } } function pc(a, b) {
        if (b) if (b.nodeType) a[a.length++] = b; else {
            var d = b.length; if ("number" === typeof d && b.window !== b) {
                if (d) for (var c =
                    0; c < d; c++)a[a.length++] = b[c]
            } else a[a.length++] = b
        }
    } function ld(a, b) { return Fb(a, "$" + (b || "ngController") + "Controller") } function Fb(a, b, d) { 9 === a.nodeType && (a = a.documentElement); for (b = H(b) ? b : [b]; a;) { for (var c = 0, e = b.length; c < e; c++)if (w(d = x.data(a, b[c]))) return d; a = a.parentNode || 11 === a.nodeType && a.host } } function md(a) { for (zb(a, !0); a.firstChild;)a.removeChild(a.firstChild) } function Gb(a, b) { b || zb(a); var d = a.parentNode; d && d.removeChild(a) } function vg(a, b) {
        b = b || z; if ("complete" === b.document.readyState) b.setTimeout(a);
        else x(b).on("load", a)
    } function hd(a) { function b() { z.document.removeEventListener("DOMContentLoaded", b); z.removeEventListener("load", b); a() } "complete" === z.document.readyState ? z.setTimeout(a) : (z.document.addEventListener("DOMContentLoaded", b), z.addEventListener("load", b)) } function nd(a, b) { var d = Hb[b.toLowerCase()]; return d && od[ua(a)] && d } function wg(a, b) {
        var d = function (c, d) {
            c.isDefaultPrevented = function () { return c.defaultPrevented }; var f = b[d || c.type], g = f ? f.length : 0; if (g) {
                if (A(c.immediatePropagationStopped)) {
                    var k =
                        c.stopImmediatePropagation; c.stopImmediatePropagation = function () { c.immediatePropagationStopped = !0; c.stopPropagation && c.stopPropagation(); k && k.call(c) }
                } c.isImmediatePropagationStopped = function () { return !0 === c.immediatePropagationStopped }; var h = f.specialHandlerWrapper || xg; 1 < g && (f = ja(f)); for (var l = 0; l < g; l++)c.isImmediatePropagationStopped() || h(a, c, f[l])
            }
        }; d.elem = a; return d
    } function xg(a, b, d) { d.call(a, b) } function yg(a, b, d) { var c = b.relatedTarget; c && (c === a || zg.call(a, c)) || d.call(a, b) } function ng() {
        this.$get =
        function () { return S(U, { hasClass: function (a, b) { a.attr && (a = a[0]); return Cb(a, b) }, addClass: function (a, b) { a.attr && (a = a[0]); return Eb(a, b) }, removeClass: function (a, b) { a.attr && (a = a[0]); return Db(a, b) } }) }
    } function La(a, b) { var d = a && a.$$hashKey; if (d) return "function" === typeof d && (d = a.$$hashKey()), d; d = typeof a; return d = "function" === d || "object" === d && null !== a ? a.$$hashKey = d + ":" + (b || we)() : d + ":" + a } function pd() { this._keys = []; this._values = []; this._lastKey = NaN; this._lastIndex = -1 } function qd(a) {
        a = Function.prototype.toString.call(a).replace(Ag,
            ""); return a.match(Bg) || a.match(Cg)
    } function Dg(a) { return (a = qd(a)) ? "function(" + (a[1] || "").replace(/[\s\r\n]+/, " ") + ")" : "fn" } function fb(a, b) {
        function d(a) { return function (b, c) { if (D(b)) r(b, Zb(a)); else return a(b, c) } } function c(a, b) { Ja(a, "service"); if (B(b) || H(b)) b = n.instantiate(b); if (!b.$get) throw Ca("pget", a); return p[a + "Provider"] = b } function e(a, b) { return function () { var c = t.invoke(b, this); if (A(c)) throw Ca("undef", a); return c } } function f(a, b, d) { return c(a, { $get: !1 !== d ? e(a, b) : b }) } function g(a) {
            gb(A(a) ||
                H(a), "modulesToLoad", "not an array"); var b = [], c; r(a, function (a) {
                    function d(a) { var b, c; b = 0; for (c = a.length; b < c; b++) { var e = a[b], f = n.get(e[0]); f[e[1]].apply(f, e[2]) } } if (!m.get(a)) {
                        m.set(a, !0); try { C(a) ? (c = lc(a), t.modules[a] = c, b = b.concat(g(c.requires)).concat(c._runBlocks), d(c._invokeQueue), d(c._configBlocks)) : B(a) ? b.push(n.invoke(a)) : H(a) ? b.push(n.invoke(a)) : tb(a, "module") } catch (e) {
                            throw H(a) && (a = a[a.length - 1]), e.message && e.stack && -1 === e.stack.indexOf(e.message) && (e = e.message + "\n" + e.stack), Ca("modulerr",
                                a, e.stack || e.message || e);
                        }
                    }
                }); return b
        } function k(a, c) {
            function d(b, e) { if (a.hasOwnProperty(b)) { if (a[b] === h) throw Ca("cdep", b + " <- " + l.join(" <- ")); return a[b] } try { return l.unshift(b), a[b] = h, a[b] = c(b, e), a[b] } catch (f) { throw a[b] === h && delete a[b], f; } finally { l.shift() } } function e(a, c, f) { var g = []; a = fb.$$annotate(a, b, f); for (var h = 0, k = a.length; h < k; h++) { var l = a[h]; if ("string" !== typeof l) throw Ca("itkn", l); g.push(c && c.hasOwnProperty(l) ? c[l] : d(l, f)) } return g } return {
                invoke: function (a, b, c, d) {
                    "string" === typeof c &&
                    (d = c, c = null); c = e(a, c, d); H(a) && (a = a[a.length - 1]); d = a; if (wa || "function" !== typeof d) d = !1; else { var f = d.$$ngIsClass; Ga(f) || (f = d.$$ngIsClass = /^class\b/.test(Function.prototype.toString.call(d))); d = f } return d ? (c.unshift(null), new (Function.prototype.bind.apply(a, c))) : a.apply(b, c)
                }, instantiate: function (a, b, c) { var d = H(a) ? a[a.length - 1] : a; a = e(a, b, c); a.unshift(null); return new (Function.prototype.bind.apply(d, a)) }, get: d, annotate: fb.$$annotate, has: function (b) { return p.hasOwnProperty(b + "Provider") || a.hasOwnProperty(b) }
            }
        }
        b = !0 === b; var h = {}, l = [], m = new Ib, p = { $provide: { provider: d(c), factory: d(f), service: d(function (a, b) { return f(a, ["$injector", function (a) { return a.instantiate(b) }]) }), value: d(function (a, b) { return f(a, ia(b), !1) }), constant: d(function (a, b) { Ja(a, "constant"); p[a] = b; s[a] = b }), decorator: function (a, b) { var c = n.get(a + "Provider"), d = c.$get; c.$get = function () { var a = t.invoke(d, c); return t.invoke(b, null, { $delegate: a }) } } } }, n = p.$injector = k(p, function (a, b) { ca.isString(b) && l.push(b); throw Ca("unpr", l.join(" <- ")); }), s = {},
            G = k(s, function (a, b) { var c = n.get(a + "Provider", b); return t.invoke(c.$get, c, void 0, a) }), t = G; p.$injectorProvider = { $get: ia(G) }; t.modules = n.modules = T(); var N = g(a), t = G.get("$injector"); t.strictDi = b; r(N, function (a) { a && t.invoke(a) }); t.loadNewModules = function (a) { r(g(a), function (a) { a && t.invoke(a) }) }; return t
    } function Bf() {
        var a = !0; this.disableAutoScrolling = function () { a = !1 }; this.$get = ["$window", "$location", "$rootScope", function (b, d, c) {
            function e(a) {
                var b = null; Array.prototype.some.call(a, function (a) {
                    if ("a" ===
                        ua(a)) return b = a, !0
                }); return b
            } function f(a) { if (a) { a.scrollIntoView(); var c; c = g.yOffset; B(c) ? c = c() : ac(c) ? (c = c[0], c = "fixed" !== b.getComputedStyle(c).position ? 0 : c.getBoundingClientRect().bottom) : X(c) || (c = 0); c && (a = a.getBoundingClientRect().top, b.scrollBy(0, a - c)) } else b.scrollTo(0, 0) } function g(a) { a = C(a) ? a : X(a) ? a.toString() : d.hash(); var b; a ? (b = k.getElementById(a)) ? f(b) : (b = e(k.getElementsByName(a))) ? f(b) : "top" === a && f(null) : f(null) } var k = b.document; a && c.$watch(function () { return d.hash() }, function (a, b) {
                a ===
                b && "" === a || vg(function () { c.$evalAsync(g) })
            }); return g
        }]
    } function ib(a, b) { if (!a && !b) return ""; if (!a) return b; if (!b) return a; H(a) && (a = a.join(" ")); H(b) && (b = b.join(" ")); return a + " " + b } function Eg(a) { C(a) && (a = a.split(" ")); var b = T(); r(a, function (a) { a.length && (b[a] = !0) }); return b } function ra(a) { return D(a) ? a : {} } function Fg(a, b, d, c, e) {
        function f() { pa = null; k() } function g() { t = y(); t = A(t) ? null : t; va(t, P) && (t = P); N = P = t } function k() { var a = N; g(); if (v !== h.url() || a !== t) v = h.url(), N = t, r(J, function (a) { a(h.url(), t) }) }
        var h = this, l = a.location, m = a.history, p = a.setTimeout, n = a.clearTimeout, s = {}, G = e(d); h.isMock = !1; h.$$completeOutstandingRequest = G.completeTask; h.$$incOutstandingRequestCount = G.incTaskCount; h.notifyWhenNoOutstandingRequests = G.notifyWhenNoPendingTasks; var t, N, v = l.href, kc = b.find("base"), pa = null, y = c.history ? function () { try { return m.state } catch (a) { } } : E; g(); h.url = function (b, d, e) {
            A(e) && (e = null); l !== a.location && (l = a.location); m !== a.history && (m = a.history); if (b) {
                var f = N === e; b = ga(b).href; if (v === b && (!c.history || f)) return h;
                var k = v && Da(v) === Da(b); v = b; N = e; !c.history || k && f ? (k || (pa = b), d ? l.replace(b) : k ? (d = l, e = b, f = e.indexOf("#"), e = -1 === f ? "" : e.substr(f), d.hash = e) : l.href = b, l.href !== b && (pa = b)) : (m[d ? "replaceState" : "pushState"](e, "", b), g()); pa && (pa = b); return h
            } return (pa || l.href).replace(/#$/, "")
        }; h.state = function () { return t }; var J = [], I = !1, P = null; h.onUrlChange = function (b) { if (!I) { if (c.history) x(a).on("popstate", f); x(a).on("hashchange", f); I = !0 } J.push(b); return b }; h.$$applicationDestroyed = function () {
            x(a).off("hashchange popstate",
                f)
        }; h.$$checkUrlChange = k; h.baseHref = function () { var a = kc.attr("href"); return a ? a.replace(/^(https?:)?\/\/[^/]*/, "") : "" }; h.defer = function (a, b, c) { var d; b = b || 0; c = c || G.DEFAULT_TASK_TYPE; G.incTaskCount(c); d = p(function () { delete s[d]; G.completeTask(a, c) }, b); s[d] = c; return d }; h.defer.cancel = function (a) { if (s.hasOwnProperty(a)) { var b = s[a]; delete s[a]; n(a); G.completeTask(E, b); return !0 } return !1 }
    } function If() {
        this.$get = ["$window", "$log", "$sniffer", "$document", "$$taskTrackerFactory", function (a, b, d, c, e) {
            return new Fg(a,
                c, b, d, e)
        }]
    } function Jf() {
        this.$get = function () {
            function a(a, c) {
                function e(a) { a !== p && (n ? n === a && (n = a.n) : n = a, f(a.n, a.p), f(a, p), p = a, p.n = null) } function f(a, b) { a !== b && (a && (a.p = b), b && (b.n = a)) } if (a in b) throw F("$cacheFactory")("iid", a); var g = 0, k = S({}, c, { id: a }), h = T(), l = c && c.capacity || Number.MAX_VALUE, m = T(), p = null, n = null; return b[a] = {
                    put: function (a, b) { if (!A(b)) { if (l < Number.MAX_VALUE) { var c = m[a] || (m[a] = { key: a }); e(c) } a in h || g++; h[a] = b; g > l && this.remove(n.key); return b } }, get: function (a) {
                        if (l < Number.MAX_VALUE) {
                            var b =
                                m[a]; if (!b) return; e(b)
                        } return h[a]
                    }, remove: function (a) { if (l < Number.MAX_VALUE) { var b = m[a]; if (!b) return; b === p && (p = b.p); b === n && (n = b.n); f(b.n, b.p); delete m[a] } a in h && (delete h[a], g--) }, removeAll: function () { h = T(); g = 0; m = T(); p = n = null }, destroy: function () { m = k = h = null; delete b[a] }, info: function () { return S({}, k, { size: g }) }
                }
            } var b = {}; a.info = function () { var a = {}; r(b, function (b, e) { a[e] = b.info() }); return a }; a.get = function (a) { return b[a] }; return a
        }
    } function hg() { this.$get = ["$cacheFactory", function (a) { return a("templates") }] }
    function Zc(a, b) {
        function d(a, b, c) { var d = /^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/, e = T(); r(a, function (a, f) { a = a.trim(); if (a in p) e[f] = p[a]; else { var g = a.match(d); if (!g) throw $("iscp", b, f, a, c ? "controller bindings definition" : "isolate scope definition"); e[f] = { mode: g[1][0], collection: "*" === g[2], optional: "?" === g[3], attrName: g[4] || f }; g[4] && (p[a] = e[f]) } }); return e } function c(a) { var b = a.charAt(0); if (!b || b !== K(b)) throw $("baddir", a); if (a !== a.trim()) throw $("baddir", a); } function e(a) {
            var b = a.require || a.controller &&
                a.name; !H(b) && D(b) && r(b, function (a, c) { var d = a.match(l); a.substring(d[0].length) || (b[c] = d[0] + c) }); return b
        } var f = {}, g = /^\s*directive:\s*([\w-]+)\s+(.*)$/, k = /(([\w-]+)(?::([^;]+))?;?)/, h = Ae("ngSrc,ngSrcset,src,srcset"), l = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/, m = /^(on[a-z]+|formaction)$/, p = T(); this.directive = function pa(b, d) {
            gb(b, "name"); Ja(b, "directive"); C(b) ? (c(b), gb(d, "directiveFactory"), f.hasOwnProperty(b) || (f[b] = [], a.factory(b + "Directive", ["$injector", "$exceptionHandler", function (a, c) {
                var d = []; r(f[b], function (f,
                    g) { try { var h = a.invoke(f); B(h) ? h = { compile: ia(h) } : !h.compile && h.link && (h.compile = ia(h.link)); h.priority = h.priority || 0; h.index = g; h.name = h.name || b; h.require = e(h); var k = h, l = h.restrict; if (l && (!C(l) || !/[EACM]/.test(l))) throw $("badrestrict", l, b); k.restrict = l || "EA"; h.$$moduleName = f.$$moduleName; d.push(h) } catch (m) { c(m) } }); return d
            }])), f[b].push(d)) : r(b, Zb(pa)); return this
        }; this.component = function y(a, b) {
            function c(a) {
                function e(b) {
                    return B(b) || H(b) ? function (c, d) { return a.invoke(b, this, { $element: c, $attrs: d }) } :
                        b
                } var f = b.template || b.templateUrl ? b.template : "", g = { controller: d, controllerAs: Gg(b.controller) || b.controllerAs || "$ctrl", template: e(f), templateUrl: e(b.templateUrl), transclude: b.transclude, scope: {}, bindToController: b.bindings || {}, restrict: "E", require: b.require }; r(b, function (a, b) { "$" === b.charAt(0) && (g[b] = a) }); return g
            } if (!C(a)) return r(a, Zb(Va(this, y))), this; var d = b.controller || function () { }; r(b, function (a, b) { "$" === b.charAt(0) && (c[b] = a, B(d) && (d[b] = a)) }); c.$inject = ["$injector"]; return this.directive(a,
                c)
        }; this.aHrefSanitizationTrustedUrlList = function (a) { return w(a) ? (b.aHrefSanitizationTrustedUrlList(a), this) : b.aHrefSanitizationTrustedUrlList() }; Object.defineProperty(this, "aHrefSanitizationWhitelist", { get: function () { return this.aHrefSanitizationTrustedUrlList }, set: function (a) { this.aHrefSanitizationTrustedUrlList = a } }); this.imgSrcSanitizationTrustedUrlList = function (a) { return w(a) ? (b.imgSrcSanitizationTrustedUrlList(a), this) : b.imgSrcSanitizationTrustedUrlList() }; Object.defineProperty(this, "imgSrcSanitizationWhitelist",
            { get: function () { return this.imgSrcSanitizationTrustedUrlList }, set: function (a) { this.imgSrcSanitizationTrustedUrlList = a } }); var n = !0; this.debugInfoEnabled = function (a) { return w(a) ? (n = a, this) : n }; var s = !1; this.strictComponentBindingsEnabled = function (a) { return w(a) ? (s = a, this) : s }; var G = 10; this.onChangesTtl = function (a) { return arguments.length ? (G = a, this) : G }; var t = !0; this.commentDirectivesEnabled = function (a) { return arguments.length ? (t = a, this) : t }; var N = !0; this.cssClassDirectivesEnabled = function (a) {
                return arguments.length ?
                    (N = a, this) : N
            }; var v = T(); this.addPropertySecurityContext = function (a, b, c) { var d = a.toLowerCase() + "|" + b.toLowerCase(); if (d in v && v[d] !== c) throw $("ctxoverride", a, b, v[d], c); v[d] = c; return this }; (function () {
                function a(b, c) { r(c, function (a) { v[a.toLowerCase()] = b }) } a(W.HTML, ["iframe|srcdoc", "*|innerHTML", "*|outerHTML"]); a(W.CSS, ["*|style"]); a(W.URL, "area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" ")); a(W.MEDIA_URL, "audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" "));
                a(W.RESOURCE_URL, "*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))
            })(); this.$get = ["$injector", "$interpolate", "$exceptionHandler", "$templateRequest", "$parse", "$controller", "$rootScope", "$sce", "$animate", function (a, b, c, e, p, M, L, u, R) {
                function q() {
                    try {
                        if (!--Ja) throw Ua = void 0, $("infchng", G); L.$apply(function () {
                            for (var a = 0, b = Ua.length; a < b; ++a)try { Ua[a]() } catch (d) { c(d) } Ua =
                                void 0
                        })
                    } finally { Ja++ }
                } function ma(a, b) { if (!a) return a; if (!C(a)) throw $("srcset", b, a.toString()); for (var c = "", d = V(a), e = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/, e = /\s/.test(d) ? e : /(,)/, d = d.split(e), e = Math.floor(d.length / 2), f = 0; f < e; f++)var g = 2 * f, c = c + u.getTrustedMediaUrl(V(d[g])), c = c + (" " + V(d[g + 1])); d = V(d[2 * f]).split(/\s/); c += u.getTrustedMediaUrl(V(d[0])); 2 === d.length && (c += " " + V(d[1])); return c } function w(a, b) {
                    if (b) { var c = Object.keys(b), d, e, f; d = 0; for (e = c.length; d < e; d++)f = c[d], this[f] = b[f] } else this.$attr =
                        {}; this.$$element = a
                } function O(a, b, c) { Fa.innerHTML = "<span " + b + ">"; b = Fa.firstChild.attributes; var d = b[0]; b.removeNamedItem(d.name); d.value = c; a.attributes.setNamedItem(d) } function sa(a, b) { try { a.addClass(b) } catch (c) { } } function da(a, b, c, d, e) {
                    a instanceof x || (a = x(a)); var f = Xa(a, b, a, c, d, e); da.$$addScopeClass(a); var g = null; return function (b, c, d) {
                        if (!a) throw $("multilink"); gb(b, "scope"); e && e.needsNewScope && (b = b.$parent.$new()); d = d || {}; var h = d.parentBoundTranscludeFn, k = d.transcludeControllers; d = d.futureParentElement;
                        h && h.$$boundTransclude && (h = h.$$boundTransclude); g || (g = (d = d && d[0]) ? "foreignobject" !== ua(d) && la.call(d).match(/SVG/) ? "svg" : "html" : "html"); d = "html" !== g ? x(ja(g, x("<div></div>").append(a).html())) : c ? Wa.clone.call(a) : a; if (k) for (var l in k) d.data("$" + l + "Controller", k[l].instance); da.$$addScopeInfo(d, b); c && c(d, b); f && f(b, d, d, h); c || (a = f = null); return d
                    }
                } function Xa(a, b, c, d, e, f) {
                    function g(a, c, d, e) {
                        var f, k, l, m, p, I, t; if (n) for (t = Array(c.length), m = 0; m < h.length; m += 3)f = h[m], t[f] = c[f]; else t = c; m = 0; for (p = h.length; m <
                            p;)k = t[h[m++]], c = h[m++], f = h[m++], c ? (c.scope ? (l = a.$new(), da.$$addScopeInfo(x(k), l)) : l = a, I = c.transcludeOnThisElement ? ka(a, c.transclude, e) : !c.templateOnThisElement && e ? e : !e && b ? ka(a, b) : null, c(f, l, k, d, I)) : f && f(a, k.childNodes, void 0, e)
                    } for (var h = [], k = H(a) || a instanceof x, l, m, p, I, n, t = 0; t < a.length; t++) {
                        l = new w; 11 === wa && jb(a, t, k); m = tc(a[t], [], l, 0 === t ? d : void 0, e); (f = m.length ? aa(m, a[t], l, b, c, null, [], [], f) : null) && f.scope && da.$$addScopeClass(l.$$element); l = f && f.terminal || !(p = a[t].childNodes) || !p.length ? null : Xa(p,
                            f ? (f.transcludeOnThisElement || !f.templateOnThisElement) && f.transclude : b); if (f || l) h.push(t, f, l), I = !0, n = n || f; f = null
                    } return I ? g : null
                } function jb(a, b, c) { var d = a[b], e = d.parentNode, f; if (d.nodeType === Pa) for (; ;) { f = e ? d.nextSibling : a[b + 1]; if (!f || f.nodeType !== Pa) break; d.nodeValue += f.nodeValue; f.parentNode && f.parentNode.removeChild(f); c && f === a[b + 1] && a.splice(b + 1, 1) } } function ka(a, b, c) {
                    function d(e, f, g, h, k) {
                        e || (e = a.$new(!1, k), e.$$transcluded = !0); return b(e, f, {
                            parentBoundTranscludeFn: c, transcludeControllers: g,
                            futureParentElement: h
                        })
                    } var e = d.$$slots = T(), f; for (f in b.$$slots) e[f] = b.$$slots[f] ? ka(a, b.$$slots[f], c) : null; return d
                } function tc(a, b, d, e, f) {
                    var g = d.$attr, h; switch (a.nodeType) {
                        case 1: h = ua(a); Y(b, xa(h), "E", e, f); for (var l, m, n, t, J, s = a.attributes, v = 0, G = s && s.length; v < G; v++) {
                            var P = !1, N = !1, r = !1, y = !1, u = !1, M; l = s[v]; m = l.name; t = l.value; n = xa(m.toLowerCase()); (J = n.match(Ra)) ? (r = "Attr" === J[1], y = "Prop" === J[1], u = "On" === J[1], m = m.replace(rd, "").toLowerCase().substr(4 + J[1].length).replace(/_(.)/g, function (a, b) { return b.toUpperCase() })) :
                                (M = n.match(Sa)) && ca(M[1]) && (P = m, N = m.substr(0, m.length - 5) + "end", m = m.substr(0, m.length - 6)); if (y || u) d[n] = t, g[n] = l.name, y ? Ea(a, b, n, m) : b.push(sd(p, L, c, n, m, !1)); else { n = xa(m.toLowerCase()); g[n] = m; if (r || !d.hasOwnProperty(n)) d[n] = t, nd(a, n) && (d[n] = !0); Ia(a, b, t, n, r); Y(b, n, "A", e, f, P, N) }
                        } "input" === h && "hidden" === a.getAttribute("type") && a.setAttribute("autocomplete", "off"); if (!Qa) break; g = a.className; D(g) && (g = g.animVal); if (C(g) && "" !== g) for (; a = k.exec(g);)n = xa(a[2]), Y(b, n, "C", e, f) && (d[n] = V(a[3])), g = g.substr(a.index +
                            a[0].length); break; case Pa: na(b, a.nodeValue); break; case 8: if (!Oa) break; F(a, b, d, e, f)
                    }b.sort(ia); return b
                } function F(a, b, c, d, e) { try { var f = g.exec(a.nodeValue); if (f) { var h = xa(f[1]); Y(b, h, "M", d, e) && (c[h] = V(f[2])) } } catch (k) { } } function U(a, b, c) { var d = [], e = 0; if (b && a.hasAttribute && a.hasAttribute(b)) { do { if (!a) throw $("uterdir", b, c); 1 === a.nodeType && (a.hasAttribute(b) && e++, a.hasAttribute(c) && e--); d.push(a); a = a.nextSibling } while (0 < e) } else d.push(a); return x(d) } function W(a, b, c) {
                    return function (d, e, f, g, h) {
                        e = U(e[0],
                            b, c); return a(d, e, f, g, h)
                    }
                } function Z(a, b, c, d, e, f) { var g; return a ? da(b, c, d, e, f) : function () { g || (g = da(b, c, d, e, f), b = c = f = null); return g.apply(this, arguments) } } function aa(a, b, d, e, f, g, h, k, l) {
                    function m(a, b, c, d) { if (a) { c && (a = W(a, c, d)); a.require = u.require; a.directiveName = Q; if (s === u || u.$$isolateScope) a = Ba(a, { isolateScope: !0 }); h.push(a) } if (b) { c && (b = W(b, c, d)); b.require = u.require; b.directiveName = Q; if (s === u || u.$$isolateScope) b = Ba(b, { isolateScope: !0 }); k.push(b) } } function p(a, e, f, g, l) {
                        function m(a, b, c, d) {
                            var e; bb(a) ||
                                (d = c, c = b, b = a, a = void 0); N && (e = P); c || (c = N ? Q.parent() : Q); if (d) { var f = l.$$slots[d]; if (f) return f(a, b, e, c, R); if (A(f)) throw $("noslot", d, Aa(Q)); } else return l(a, b, e, c, R)
                        } var n, u, L, y, G, P, M, Q; b === f ? (g = d, Q = d.$$element) : (Q = x(f), g = new w(Q, d)); G = e; s ? y = e.$new(!0) : t && (G = e.$parent); l && (M = m, M.$$boundTransclude = l, M.isSlotFilled = function (a) { return !!l.$$slots[a] }); J && (P = ea(Q, g, M, J, y, e, s)); s && (da.$$addScopeInfo(Q, y, !0, !(v && (v === s || v === s.$$originalDirective))), da.$$addScopeClass(Q, !0), y.$$isolateBindings = s.$$isolateBindings,
                            u = Da(e, g, y, y.$$isolateBindings, s), u.removeWatches && y.$on("$destroy", u.removeWatches)); for (n in P) { u = J[n]; L = P[n]; var Hg = u.$$bindings.bindToController; L.instance = L(); Q.data("$" + u.name + "Controller", L.instance); L.bindingInfo = Da(G, g, L.instance, Hg, u) } r(J, function (a, b) { var c = a.require; a.bindToController && !H(c) && D(c) && S(P[b].instance, X(b, c, Q, P)) }); r(P, function (a) {
                                var b = a.instance; if (B(b.$onChanges)) try { b.$onChanges(a.bindingInfo.initialChanges) } catch (d) { c(d) } if (B(b.$onInit)) try { b.$onInit() } catch (e) { c(e) } B(b.$doCheck) &&
                                    (G.$watch(function () { b.$doCheck() }), b.$doCheck()); B(b.$onDestroy) && G.$on("$destroy", function () { b.$onDestroy() })
                            }); n = 0; for (u = h.length; n < u; n++)L = h[n], Ca(L, L.isolateScope ? y : e, Q, g, L.require && X(L.directiveName, L.require, Q, P), M); var R = e; s && (s.template || null === s.templateUrl) && (R = y); a && a(R, f.childNodes, void 0, l); for (n = k.length - 1; 0 <= n; n--)L = k[n], Ca(L, L.isolateScope ? y : e, Q, g, L.require && X(L.directiveName, L.require, Q, P), M); r(P, function (a) { a = a.instance; B(a.$postLink) && a.$postLink() })
                    } l = l || {}; for (var n = -Number.MAX_VALUE,
                        t = l.newScopeDirective, J = l.controllerDirectives, s = l.newIsolateScopeDirective, v = l.templateDirective, L = l.nonTlbTranscludeDirective, G = !1, P = !1, N = l.hasElementTranscludeDirective, y = d.$$element = x(b), u, Q, M, R = e, q, ma = !1, Jb = !1, O, sa = 0, C = a.length; sa < C; sa++) {
                            u = a[sa]; var E = u.$$start, jb = u.$$end; E && (y = U(b, E, jb)); M = void 0; if (n > u.priority) break; if (O = u.scope) u.templateUrl || (D(O) ? (ba("new/isolated scope", s || t, u, y), s = u) : ba("new/isolated scope", s, u, y)), t = t || u; Q = u.name; if (!ma && (u.replace && (u.templateUrl || u.template) || u.transclude &&
                                !u.$$tlb)) { for (O = sa + 1; ma = a[O++];)if (ma.transclude && !ma.$$tlb || ma.replace && (ma.templateUrl || ma.template)) { Jb = !0; break } ma = !0 } !u.templateUrl && u.controller && (J = J || T(), ba("'" + Q + "' controller", J[Q], u, y), J[Q] = u); if (O = u.transclude) if (G = !0, u.$$tlb || (ba("transclusion", L, u, y), L = u), "element" === O) N = !0, n = u.priority, M = y, y = d.$$element = x(da.$$createComment(Q, d[Q])), b = y[0], oa(f, Ha.call(M, 0), b), R = Z(Jb, M, e, n, g && g.name, { nonTlbTranscludeDirective: L }); else {
                                    var ka = T(); if (D(O)) {
                                        M = z.document.createDocumentFragment(); var Xa =
                                            T(), F = T(); r(O, function (a, b) { var c = "?" === a.charAt(0); a = c ? a.substring(1) : a; Xa[a] = b; ka[b] = null; F[b] = c }); r(y.contents(), function (a) { var b = Xa[xa(ua(a))]; b ? (F[b] = !0, ka[b] = ka[b] || z.document.createDocumentFragment(), ka[b].appendChild(a)) : M.appendChild(a) }); r(F, function (a, b) { if (!a) throw $("reqslot", b); }); for (var K in ka) ka[K] && (R = x(ka[K].childNodes), ka[K] = Z(Jb, R, e)); M = x(M.childNodes)
                                    } else M = x(qc(b)).contents(); y.empty(); R = Z(Jb, M, e, void 0, void 0, { needsNewScope: u.$$isolateScope || u.$$newScope }); R.$$slots = ka
                                } if (u.template) if (P =
                                    !0, ba("template", v, u, y), v = u, O = B(u.template) ? u.template(y, d) : u.template, O = Na(O), u.replace) { g = u; M = nc.test(O) ? td(ja(u.templateNamespace, V(O))) : []; b = M[0]; if (1 !== M.length || 1 !== b.nodeType) throw $("tplrt", Q, ""); oa(f, y, b); C = { $attr: {} }; O = tc(b, [], C); var Ig = a.splice(sa + 1, a.length - (sa + 1)); (s || t) && fa(O, s, t); a = a.concat(O).concat(Ig); ga(d, C); C = a.length } else y.html(O); if (u.templateUrl) P = !0, ba("template", v, u, y), v = u, u.replace && (g = u), p = ha(a.splice(sa, a.length - sa), y, d, f, G && R, h, k, {
                                        controllerDirectives: J, newScopeDirective: t !==
                                            u && t, newIsolateScopeDirective: s, templateDirective: v, nonTlbTranscludeDirective: L
                                    }), C = a.length; else if (u.compile) try { q = u.compile(y, d, R); var Y = u.$$originalDirective || u; B(q) ? m(null, Va(Y, q), E, jb) : q && m(Va(Y, q.pre), Va(Y, q.post), E, jb) } catch (ca) { c(ca, Aa(y)) } u.terminal && (p.terminal = !0, n = Math.max(n, u.priority))
                    } p.scope = t && !0 === t.scope; p.transcludeOnThisElement = G; p.templateOnThisElement = P; p.transclude = R; l.hasElementTranscludeDirective = N; return p
                } function X(a, b, c, d) {
                    var e; if (C(b)) {
                        var f = b.match(l); b = b.substring(f[0].length);
                        var g = f[1] || f[3], f = "?" === f[2]; "^^" === g ? c = c.parent() : e = (e = d && d[b]) && e.instance; if (!e) { var h = "$" + b + "Controller"; e = "^^" === g && c[0] && 9 === c[0].nodeType ? null : g ? c.inheritedData(h) : c.data(h) } if (!e && !f) throw $("ctreq", b, a);
                    } else if (H(b)) for (e = [], g = 0, f = b.length; g < f; g++)e[g] = X(a, b[g], c, d); else D(b) && (e = {}, r(b, function (b, f) { e[f] = X(a, b, c, d) })); return e || null
                } function ea(a, b, c, d, e, f, g) {
                    var h = T(), k; for (k in d) {
                        var l = d[k], m = { $scope: l === g || l.$$isolateScope ? e : f, $element: a, $attrs: b, $transclude: c }, p = l.controller; "@" ===
                            p && (p = b[l.name]); m = M(p, m, !0, l.controllerAs); h[l.name] = m; a.data("$" + l.name + "Controller", m.instance)
                    } return h
                } function fa(a, b, c) { for (var d = 0, e = a.length; d < e; d++)a[d] = bc(a[d], { $$isolateScope: b, $$newScope: c }) } function Y(b, c, e, g, h, k, l) {
                    if (c === h) return null; var m = null; if (f.hasOwnProperty(c)) {
                        h = a.get(c + "Directive"); for (var p = 0, n = h.length; p < n; p++)if (c = h[p], (A(g) || g > c.priority) && -1 !== c.restrict.indexOf(e)) {
                            k && (c = bc(c, { $$start: k, $$end: l })); if (!c.$$bindings) {
                                var I = m = c, t = c.name, u = { isolateScope: null, bindToController: null };
                                D(I.scope) && (!0 === I.bindToController ? (u.bindToController = d(I.scope, t, !0), u.isolateScope = {}) : u.isolateScope = d(I.scope, t, !1)); D(I.bindToController) && (u.bindToController = d(I.bindToController, t, !0)); if (u.bindToController && !I.controller) throw $("noctrl", t); m = m.$$bindings = u; D(m.isolateScope) && (c.$$isolateBindings = m.isolateScope)
                            } b.push(c); m = c
                        }
                    } return m
                } function ca(b) { if (f.hasOwnProperty(b)) for (var c = a.get(b + "Directive"), d = 0, e = c.length; d < e; d++)if (b = c[d], b.multiElement) return !0; return !1 } function ga(a, b) {
                    var c =
                        b.$attr, d = a.$attr; r(a, function (d, e) { "$" !== e.charAt(0) && (b[e] && b[e] !== d && (d = d.length ? d + (("style" === e ? ";" : " ") + b[e]) : b[e]), a.$set(e, d, !0, c[e])) }); r(b, function (b, e) { a.hasOwnProperty(e) || "$" === e.charAt(0) || (a[e] = b, "class" !== e && "style" !== e && (d[e] = c[e])) })
                } function ha(a, b, d, f, g, h, k, l) {
                    var m = [], p, n, t = b[0], u = a.shift(), J = bc(u, { templateUrl: null, transclude: null, replace: null, $$originalDirective: u }), s = B(u.templateUrl) ? u.templateUrl(b, d) : u.templateUrl, L = u.templateNamespace; b.empty(); e(s).then(function (c) {
                        var e,
                        I; c = Na(c); if (u.replace) { c = nc.test(c) ? td(ja(L, V(c))) : []; e = c[0]; if (1 !== c.length || 1 !== e.nodeType) throw $("tplrt", u.name, s); c = { $attr: {} }; oa(f, b, e); var v = tc(e, [], c); D(u.scope) && fa(v, !0); a = v.concat(a); ga(d, c) } else e = t, b.html(c); a.unshift(J); p = aa(a, e, d, g, b, u, h, k, l); r(f, function (a, c) { a === e && (f[c] = b[0]) }); for (n = Xa(b[0].childNodes, g); m.length;) {
                            c = m.shift(); I = m.shift(); var y = m.shift(), P = m.shift(), v = b[0]; if (!c.$$destroyed) {
                                if (I !== t) {
                                    var G = I.className; l.hasElementTranscludeDirective && u.replace || (v = qc(e)); oa(y,
                                        x(I), v); sa(x(v), G)
                                } I = p.transcludeOnThisElement ? ka(c, p.transclude, P) : P; p(n, c, v, f, I)
                            }
                        } m = null
                    }).catch(function (a) { dc(a) && c(a) }); return function (a, b, c, d, e) { a = e; b.$$destroyed || (m ? m.push(b, c, d, a) : (p.transcludeOnThisElement && (a = ka(b, p.transclude, e)), p(n, b, c, d, a))) }
                } function ia(a, b) { var c = b.priority - a.priority; return 0 !== c ? c : a.name !== b.name ? a.name < b.name ? -1 : 1 : a.index - b.index } function ba(a, b, c, d) {
                    function e(a) { return a ? " (module: " + a + ")" : "" } if (b) throw $("multidir", b.name, e(b.$$moduleName), c.name, e(c.$$moduleName),
                        a, Aa(d));
                } function na(a, c) { var d = b(c, !0); d && a.push({ priority: 0, compile: function (a) { a = a.parent(); var b = !!a.length; b && da.$$addBindingClass(a); return function (a, c) { var e = c.parent(); b || da.$$addBindingClass(e); da.$$addBindingInfo(e, d.expressions); a.$watch(d, function (a) { c[0].nodeValue = a }) } } }) } function ja(a, b) { a = K(a || "html"); switch (a) { case "svg": case "math": var c = z.document.createElement("div"); c.innerHTML = "<" + a + ">" + b + "</" + a + ">"; return c.childNodes[0].childNodes; default: return b } } function qa(a, b) {
                    if ("srcdoc" ===
                        b) return u.HTML; if ("src" === b || "ngSrc" === b) return -1 === ["img", "video", "audio", "source", "track"].indexOf(a) ? u.RESOURCE_URL : u.MEDIA_URL; if ("xlinkHref" === b) return "image" === a ? u.MEDIA_URL : "a" === a ? u.URL : u.RESOURCE_URL; if ("form" === a && "action" === b || "base" === a && "href" === b || "link" === a && "href" === b) return u.RESOURCE_URL; if ("a" === a && ("href" === b || "ngHref" === b)) return u.URL
                } function ya(a, b) { var c = b.toLowerCase(); return v[a + "|" + c] || v["*|" + c] } function za(a) { return ma(u.valueOf(a), "ng-prop-srcset") } function Ea(a, b, c,
                    d) { if (m.test(d)) throw $("nodomevents"); a = ua(a); var e = ya(a, d), f = Ta; "srcset" !== d || "img" !== a && "source" !== a ? e && (f = u.getTrusted.bind(u, e)) : f = za; b.push({ priority: 100, compile: function (a, b) { var e = p(b[c]), g = p(b[c], function (a) { return u.valueOf(a) }); return { pre: function (a, b) { function c() { var g = e(a); b[0][d] = f(g) } c(); a.$watch(g, c) } } } }) } function Ia(a, c, d, e, f) {
                        var g = ua(a), k = qa(g, e), l = h[e] || f, p = b(d, !f, k, l); if (p) {
                            if ("multiple" === e && "select" === g) throw $("selmulti", Aa(a)); if (m.test(e)) throw $("nodomevents"); c.push({
                                priority: 100,
                                compile: function () { return { pre: function (a, c, f) { c = f.$$observers || (f.$$observers = T()); var g = f[e]; g !== d && (p = g && b(g, !0, k, l), d = g); p && (f[e] = p(a), (c[e] || (c[e] = [])).$$inter = !0, (f.$$observers && f.$$observers[e].$$scope || a).$watch(p, function (a, b) { "class" === e && a !== b ? f.$updateClass(a, b) : f.$set(e, a) })) } } }
                            })
                        }
                    } function oa(a, b, c) {
                        var d = b[0], e = b.length, f = d.parentNode, g, h; if (a) for (g = 0, h = a.length; g < h; g++)if (a[g] === d) {
                            a[g++] = c; h = g + e - 1; for (var k = a.length; g < k; g++, h++)h < k ? a[g] = a[h] : delete a[g]; a.length -= e - 1; a.context === d &&
                                (a.context = c); break
                        } f && f.replaceChild(c, d); a = z.document.createDocumentFragment(); for (g = 0; g < e; g++)a.appendChild(b[g]); x.hasData(d) && (x.data(c, x.data(d)), x(d).off("$destroy")); x.cleanData(a.querySelectorAll("*")); for (g = 1; g < e; g++)delete b[g]; b[0] = c; b.length = 1
                    } function Ba(a, b) { return S(function () { return a.apply(null, arguments) }, a, b) } function Ca(a, b, d, e, f, g) { try { a(b, d, e, f, g) } catch (h) { c(h, Aa(d)) } } function ra(a, b) { if (s) throw $("missingattr", a, b); } function Da(a, c, d, e, f) {
                        function g(b, c, e) {
                            B(d.$onChanges) &&
                            !ec(c, e) && (Ua || (a.$$postDigest(q), Ua = []), m || (m = {}, Ua.push(h)), m[b] && (e = m[b].previousValue), m[b] = new Kb(e, c))
                        } function h() { d.$onChanges(m); m = void 0 } var k = [], l = {}, m; r(e, function (e, h) {
                            var m = e.attrName, n = e.optional, I, t, u, s; switch (e.mode) {
                                case "@": n || ta.call(c, m) || (ra(m, f.name), d[h] = c[m] = void 0); n = c.$observe(m, function (a) { if (C(a) || Ga(a)) g(h, a, d[h]), d[h] = a }); c.$$observers[m].$$scope = a; I = c[m]; C(I) ? d[h] = b(I)(a) : Ga(I) && (d[h] = I); l[h] = new Kb(uc, d[h]); k.push(n); break; case "=": if (!ta.call(c, m)) {
                                    if (n) break; ra(m,
                                        f.name); c[m] = void 0
                                } if (n && !c[m]) break; t = p(c[m]); s = t.literal ? va : ec; u = t.assign || function () { I = d[h] = t(a); throw $("nonassign", c[m], m, f.name); }; I = d[h] = t(a); n = function (b) { s(b, d[h]) || (s(b, I) ? u(a, b = d[h]) : d[h] = b); return I = b }; n.$stateful = !0; n = e.collection ? a.$watchCollection(c[m], n) : a.$watch(p(c[m], n), null, t.literal); k.push(n); break; case "<": if (!ta.call(c, m)) { if (n) break; ra(m, f.name); c[m] = void 0 } if (n && !c[m]) break; t = p(c[m]); var v = t.literal, L = d[h] = t(a); l[h] = new Kb(uc, d[h]); n = a[e.collection ? "$watchCollection" : "$watch"](t,
                                    function (a, b) { if (b === a) { if (b === L || v && va(b, L)) return; b = L } g(h, a, b); d[h] = a }); k.push(n); break; case "&": n || ta.call(c, m) || ra(m, f.name); t = c.hasOwnProperty(m) ? p(c[m]) : E; if (t === E && n) break; d[h] = function (b) { return t(a, b) }
                            }
                        }); return { initialChanges: l, removeWatches: k.length && function () { for (var a = 0, b = k.length; a < b; ++a)k[a]() } }
                    } var Ma = /^\w/, Fa = z.document.createElement("div"), Oa = t, Qa = N, Ja = G, Ua; w.prototype = {
                        $normalize: xa, $addClass: function (a) { a && 0 < a.length && R.addClass(this.$$element, a) }, $removeClass: function (a) {
                            a &&
                            0 < a.length && R.removeClass(this.$$element, a)
                        }, $updateClass: function (a, b) { var c = ud(a, b); c && c.length && R.addClass(this.$$element, c); (c = ud(b, a)) && c.length && R.removeClass(this.$$element, c) }, $set: function (a, b, d, e) {
                            var f = nd(this.$$element[0], a), g = vd[a], h = a; f ? (this.$$element.prop(a, b), e = f) : g && (this[g] = b, h = g); this[a] = b; e ? this.$attr[a] = e : (e = this.$attr[a]) || (this.$attr[a] = e = Xc(a, "-")); "img" === ua(this.$$element) && "srcset" === a && (this[a] = b = ma(b, "$set('srcset', value)")); !1 !== d && (null === b || A(b) ? this.$$element.removeAttr(e) :
                                Ma.test(e) ? f && !1 === b ? this.$$element.removeAttr(e) : this.$$element.attr(e, b) : O(this.$$element[0], e, b)); (a = this.$$observers) && r(a[h], function (a) { try { a(b) } catch (d) { c(d) } })
                        }, $observe: function (a, b) { var c = this, d = c.$$observers || (c.$$observers = T()), e = d[a] || (d[a] = []); e.push(b); L.$evalAsync(function () { e.$$inter || !c.hasOwnProperty(a) || A(c[a]) || b(c[a]) }); return function () { cb(e, b) } }
                    }; var Ka = b.startSymbol(), La = b.endSymbol(), Na = "{{" === Ka && "}}" === La ? Ta : function (a) { return a.replace(/\{\{/g, Ka).replace(/}}/g, La) }, Ra =
                        /^ng(Attr|Prop|On)([A-Z].*)$/, Sa = /^(.+)Start$/; da.$$addBindingInfo = n ? function (a, b) { var c = a.data("$binding") || []; H(b) ? c = c.concat(b) : c.push(b); a.data("$binding", c) } : E; da.$$addBindingClass = n ? function (a) { sa(a, "ng-binding") } : E; da.$$addScopeInfo = n ? function (a, b, c, d) { a.data(c ? d ? "$isolateScopeNoTemplate" : "$isolateScope" : "$scope", b) } : E; da.$$addScopeClass = n ? function (a, b) { sa(a, b ? "ng-isolate-scope" : "ng-scope") } : E; da.$$createComment = function (a, b) { var c = ""; n && (c = " " + (a || "") + ": ", b && (c += b + " ")); return z.document.createComment(c) };
                return da
            }]
    } function Kb(a, b) { this.previousValue = a; this.currentValue = b } function xa(a) { return a.replace(rd, "").replace(Jg, function (a, d, c) { return c ? d.toUpperCase() : d }) } function ud(a, b) { var d = "", c = a.split(/\s+/), e = b.split(/\s+/), f = 0; a: for (; f < c.length; f++) { for (var g = c[f], k = 0; k < e.length; k++)if (g === e[k]) continue a; d += (0 < d.length ? " " : "") + g } return d } function td(a) { a = x(a); var b = a.length; if (1 >= b) return a; for (; b--;) { var d = a[b]; (8 === d.nodeType || d.nodeType === Pa && "" === d.nodeValue.trim()) && Kg.call(a, b, 1) } return a }
    function Gg(a, b) { if (b && C(b)) return b; if (C(a)) { var d = wd.exec(a); if (d) return d[3] } } function Kf() {
        var a = {}; this.has = function (b) { return a.hasOwnProperty(b) }; this.register = function (b, d) { Ja(b, "controller"); D(b) ? S(a, b) : a[b] = d }; this.$get = ["$injector", function (b) {
            function d(a, b, d, g) { if (!a || !D(a.$scope)) throw F("$controller")("noscp", g, b); a.$scope[b] = d } return function (c, e, f, g) {
                var k, h, l; f = !0 === f; g && C(g) && (l = g); if (C(c)) {
                    g = c.match(wd); if (!g) throw xd("ctrlfmt", c); h = g[1]; l = l || g[3]; c = a.hasOwnProperty(h) ? a[h] : Le(e.$scope,
                        h, !0); if (!c) throw xd("ctrlreg", h); tb(c, h, !0)
                } if (f) return f = (H(c) ? c[c.length - 1] : c).prototype, k = Object.create(f || null), l && d(e, l, k, h || c.name), S(function () { var a = b.invoke(c, k, e, h); a !== k && (D(a) || B(a)) && (k = a, l && d(e, l, k, h || c.name)); return k }, { instance: k, identifier: l }); k = b.instantiate(c, e, h); l && d(e, l, k, h || c.name); return k
            }
        }]
    } function Lf() { this.$get = ["$window", function (a) { return x(a.document) }] } function Mf() {
        this.$get = ["$document", "$rootScope", function (a, b) {
            function d() { e = c.hidden } var c = a[0], e = c && c.hidden;
            a.on("visibilitychange", d); b.$on("$destroy", function () { a.off("visibilitychange", d) }); return function () { return e }
        }]
    } function Nf() { this.$get = ["$log", function (a) { return function (b, d) { a.error.apply(a, arguments) } }] } function vc(a) { return D(a) ? ha(a) ? a.toISOString() : eb(a) : a } function Tf() { this.$get = function () { return function (a) { if (!a) return ""; var b = []; Qc(a, function (a, c) { null === a || A(a) || B(a) || (H(a) ? r(a, function (a) { b.push(ba(c) + "=" + ba(vc(a))) }) : b.push(ba(c) + "=" + ba(vc(a)))) }); return b.join("&") } } } function Uf() {
        this.$get =
        function () { return function (a) { function b(a, e, f) { H(a) ? r(a, function (a, c) { b(a, e + "[" + (D(a) ? c : "") + "]") }) : D(a) && !ha(a) ? Qc(a, function (a, c) { b(a, e + (f ? "" : "[") + c + (f ? "" : "]")) }) : (B(a) && (a = a()), d.push(ba(e) + "=" + (null == a ? "" : ba(vc(a))))) } if (!a) return ""; var d = []; b(a, "", !0); return d.join("&") } }
    } function wc(a, b) { if (C(a)) { var d = a.replace(Lg, "").trim(); if (d) { var c = b("Content-Type"), c = c && 0 === c.indexOf(yd), e; (e = c) || (e = (e = d.match(Mg)) && Ng[e[0]].test(d)); if (e) try { a = Tc(d) } catch (f) { if (!c) return a; throw Lb("baddata", a, f); } } } return a }
    function zd(a) { var b = T(), d; C(a) ? r(a.split("\n"), function (a) { d = a.indexOf(":"); var e = K(V(a.substr(0, d))); a = V(a.substr(d + 1)); e && (b[e] = b[e] ? b[e] + ", " + a : a) }) : D(a) && r(a, function (a, d) { var f = K(d), g = V(a); f && (b[f] = b[f] ? b[f] + ", " + g : g) }); return b } function Ad(a) { var b; return function (d) { b || (b = zd(a)); return d ? (d = b[K(d)], void 0 === d && (d = null), d) : b } } function Bd(a, b, d, c) { if (B(c)) return c(a, b, d); r(c, function (c) { a = c(a, b, d) }); return a } function Sf() {
        var a = this.defaults = {
            transformResponse: [wc], transformRequest: [function (a) {
                return D(a) &&
                    "[object File]" !== la.call(a) && "[object Blob]" !== la.call(a) && "[object FormData]" !== la.call(a) ? eb(a) : a
            }], headers: { common: { Accept: "application/json, text/plain, */*" }, post: ja(xc), put: ja(xc), patch: ja(xc) }, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", paramSerializer: "$httpParamSerializer", jsonpCallbackParam: "callback"
        }, b = !1; this.useApplyAsync = function (a) { return w(a) ? (b = !!a, this) : b }; var d = this.interceptors = [], c = this.xsrfTrustedOrigins = []; Object.defineProperty(this, "xsrfWhitelistedOrigins",
            { get: function () { return this.xsrfTrustedOrigins }, set: function (a) { this.xsrfTrustedOrigins = a } }); this.$get = ["$browser", "$httpBackend", "$$cookieReader", "$cacheFactory", "$rootScope", "$q", "$injector", "$sce", function (e, f, g, k, h, l, m, p) {
                function n(b) {
                    function c(a, b) { for (var d = 0, e = b.length; d < e;) { var f = b[d++], g = b[d++]; a = a.then(f, g) } b.length = 0; return a } function d(a, b) { var c, e = {}; r(a, function (a, d) { B(a) ? (c = a(b), null != c && (e[d] = c)) : e[d] = a }); return e } function f(a) {
                        var b = S({}, a); b.data = Bd(a.data, a.headers, a.status, g.transformResponse);
                        a = a.status; return 200 <= a && 300 > a ? b : l.reject(b)
                    } if (!D(b)) throw F("$http")("badreq", b); if (!C(p.valueOf(b.url))) throw F("$http")("badreq", b.url); var g = S({ method: "get", transformRequest: a.transformRequest, transformResponse: a.transformResponse, paramSerializer: a.paramSerializer, jsonpCallbackParam: a.jsonpCallbackParam }, b); g.headers = function (b) { var c = a.headers, e = S({}, b.headers), f, g, h, c = S({}, c.common, c[K(b.method)]); a: for (f in c) { g = K(f); for (h in e) if (K(h) === g) continue a; e[f] = c[f] } return d(e, ja(b)) }(b); g.method =
                        vb(g.method); g.paramSerializer = C(g.paramSerializer) ? m.get(g.paramSerializer) : g.paramSerializer; e.$$incOutstandingRequestCount("$http"); var h = [], k = []; b = l.resolve(g); r(v, function (a) { (a.request || a.requestError) && h.unshift(a.request, a.requestError); (a.response || a.responseError) && k.push(a.response, a.responseError) }); b = c(b, h); b = b.then(function (b) {
                            var c = b.headers, d = Bd(b.data, Ad(c), void 0, b.transformRequest); A(d) && r(c, function (a, b) { "content-type" === K(b) && delete c[b] }); A(b.withCredentials) && !A(a.withCredentials) &&
                                (b.withCredentials = a.withCredentials); return s(b, d).then(f, f)
                        }); b = c(b, k); return b = b.finally(function () { e.$$completeOutstandingRequest(E, "$http") })
                } function s(c, d) {
                    function e(a) { if (a) { var c = {}; r(a, function (a, d) { c[d] = function (c) { function d() { a(c) } b ? h.$applyAsync(d) : h.$$phase ? d() : h.$apply(d) } }); return c } } function k(a, c, d, e, f) { function g() { m(c, a, d, e, f) } R && (200 <= a && 300 > a ? R.put(O, [a, c, zd(d), e, f]) : R.remove(O)); b ? h.$applyAsync(g) : (g(), h.$$phase || h.$apply()) } function m(a, b, d, e, f) {
                        b = -1 <= b ? b : 0; (200 <= b && 300 >
                            b ? L.resolve : L.reject)({ data: a, status: b, headers: Ad(d), config: c, statusText: e, xhrStatus: f })
                    } function s(a) { m(a.data, a.status, ja(a.headers()), a.statusText, a.xhrStatus) } function v() { var a = n.pendingRequests.indexOf(c); -1 !== a && n.pendingRequests.splice(a, 1) } var L = l.defer(), u = L.promise, R, q, ma = c.headers, x = "jsonp" === K(c.method), O = c.url; x ? O = p.getTrustedResourceUrl(O) : C(O) || (O = p.valueOf(O)); O = G(O, c.paramSerializer(c.params)); x && (O = t(O, c.jsonpCallbackParam)); n.pendingRequests.push(c); u.then(v, v); !c.cache && !a.cache ||
                        !1 === c.cache || "GET" !== c.method && "JSONP" !== c.method || (R = D(c.cache) ? c.cache : D(a.cache) ? a.cache : N); R && (q = R.get(O), w(q) ? q && B(q.then) ? q.then(s, s) : H(q) ? m(q[1], q[0], ja(q[2]), q[3], q[4]) : m(q, 200, {}, "OK", "complete") : R.put(O, u)); A(q) && ((q = kc(c.url) ? g()[c.xsrfCookieName || a.xsrfCookieName] : void 0) && (ma[c.xsrfHeaderName || a.xsrfHeaderName] = q), f(c.method, O, d, k, ma, c.timeout, c.withCredentials, c.responseType, e(c.eventHandlers), e(c.uploadEventHandlers))); return u
                } function G(a, b) {
                    0 < b.length && (a += (-1 === a.indexOf("?") ?
                        "?" : "&") + b); return a
                } function t(a, b) { var c = a.split("?"); if (2 < c.length) throw Lb("badjsonp", a); c = hc(c[1]); r(c, function (c, d) { if ("JSON_CALLBACK" === c) throw Lb("badjsonp", a); if (d === b) throw Lb("badjsonp", b, a); }); return a += (-1 === a.indexOf("?") ? "?" : "&") + b + "=JSON_CALLBACK" } var N = k("$http"); a.paramSerializer = C(a.paramSerializer) ? m.get(a.paramSerializer) : a.paramSerializer; var v = []; r(d, function (a) { v.unshift(C(a) ? m.get(a) : m.invoke(a)) }); var kc = Og(c); n.pendingRequests = []; (function (a) {
                    r(arguments, function (a) {
                        n[a] =
                        function (b, c) { return n(S({}, c || {}, { method: a, url: b })) }
                    })
                })("get", "delete", "head", "jsonp"); (function (a) { r(arguments, function (a) { n[a] = function (b, c, d) { return n(S({}, d || {}, { method: a, url: b, data: c })) } }) })("post", "put", "patch"); n.defaults = a; return n
            }]
    } function Wf() { this.$get = function () { return function () { return new z.XMLHttpRequest } } } function Vf() { this.$get = ["$browser", "$jsonpCallbacks", "$document", "$xhrFactory", function (a, b, d, c) { return Pg(a, c, a.defer, b, d[0]) }] } function Pg(a, b, d, c, e) {
        function f(a, b, d) {
            a = a.replace("JSON_CALLBACK",
                b); var f = e.createElement("script"), m = null; f.type = "text/javascript"; f.src = a; f.async = !0; m = function (a) { f.removeEventListener("load", m); f.removeEventListener("error", m); e.body.removeChild(f); f = null; var g = -1, s = "unknown"; a && ("load" !== a.type || c.wasCalled(b) || (a = { type: "error" }), s = a.type, g = "error" === a.type ? 404 : 200); d && d(g, s) }; f.addEventListener("load", m); f.addEventListener("error", m); e.body.appendChild(f); return m
        } return function (e, k, h, l, m, p, n, s, G, t) {
            function N(a) { J = "timeout" === a; pa && pa(); y && y.abort() } function v(a,
                b, c, e, f, g) { w(P) && d.cancel(P); pa = y = null; a(b, c, e, f, g) } k = k || a.url(); if ("jsonp" === K(e)) var q = c.createCallback(k), pa = f(k, q, function (a, b) { var d = 200 === a && c.getResponse(q); v(l, a, d, "", b, "complete"); c.removeCallback(q) }); else {
                    var y = b(e, k), J = !1; y.open(e, k, !0); r(m, function (a, b) { w(a) && y.setRequestHeader(b, a) }); y.onload = function () { var a = y.statusText || "", b = "response" in y ? y.response : y.responseText, c = 1223 === y.status ? 204 : y.status; 0 === c && (c = b ? 200 : "file" === ga(k).protocol ? 404 : 0); v(l, c, b, y.getAllResponseHeaders(), a, "complete") };
                    y.onerror = function () { v(l, -1, null, null, "", "error") }; y.ontimeout = function () { v(l, -1, null, null, "", "timeout") }; y.onabort = function () { v(l, -1, null, null, "", J ? "timeout" : "abort") }; r(G, function (a, b) { y.addEventListener(b, a) }); r(t, function (a, b) { y.upload.addEventListener(b, a) }); n && (y.withCredentials = !0); if (s) try { y.responseType = s } catch (I) { if ("json" !== s) throw I; } y.send(A(h) ? null : h)
                } if (0 < p) var P = d(function () { N("timeout") }, p); else p && B(p.then) && p.then(function () { N(w(p.$$timeoutId) ? "timeout" : "abort") })
        }
    } function Pf() {
        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 (d, c, e) {
                function f(a) { return "\\\\\\" + a } function g(c) { return c.replace(p, a).replace(n, b) } function k(a, b, c, d) { var e = a.$watch(function (a) { e(); return d(a) }, b, c); return e } function h(f, h, n, p) {
                    function v(a) { try { return a = n && !r ? e.getTrusted(n, a) : e.valueOf(a), p && !w(a) ? a : jc(a) } catch (b) { c(Ma.interr(f, b)) } } var r = n === e.URL || n === e.MEDIA_URL; if (!f.length ||
                        -1 === f.indexOf(a)) { if (h) return; h = g(f); r && (h = e.getTrusted(n, h)); h = ia(h); h.exp = f; h.expressions = []; h.$$watchDelegate = k; return h } p = !!p; for (var q, y, J = 0, I = [], P, Q = f.length, M = [], L = [], u; J < Q;)if (-1 !== (q = f.indexOf(a, J)) && -1 !== (y = f.indexOf(b, q + l))) J !== q && M.push(g(f.substring(J, q))), J = f.substring(q + l, y), I.push(J), J = y + m, L.push(M.length), M.push(""); else { J !== Q && M.push(g(f.substring(J))); break } u = 1 === M.length && 1 === L.length; var R = r && u ? void 0 : v; P = I.map(function (a) { return d(a, R) }); if (!h || I.length) {
                            var x = function (a) {
                                for (var b =
                                    0, c = I.length; b < c; b++) { if (p && A(a[b])) return; M[L[b]] = a[b] } if (r) return e.getTrusted(n, u ? M[0] : M.join("")); n && 1 < M.length && Ma.throwNoconcat(f); return M.join("")
                            }; return S(function (a) { var b = 0, d = I.length, e = Array(d); try { for (; b < d; b++)e[b] = P[b](a); return x(e) } catch (g) { c(Ma.interr(f, g)) } }, { exp: f, expressions: I, $$watchDelegate: function (a, b) { var c; return a.$watchGroup(P, function (d, e) { var f = x(d); b.call(this, f, d !== e ? c : f, a); c = f }) } })
                        }
                } var l = a.length, m = b.length, p = new RegExp(a.replace(/./g, f), "g"), n = new RegExp(b.replace(/./g,
                    f), "g"); h.startSymbol = function () { return a }; h.endSymbol = function () { return b }; return h
            }]
    } function Qf() {
        this.$get = ["$$intervalFactory", "$window", function (a, b) {
            var d = {}, c = function (a) { b.clearInterval(a); delete d[a] }, e = a(function (a, c, e) { a = b.setInterval(a, c); d[a] = e; return a }, c); e.cancel = function (a) {
                if (!a) return !1; if (!a.hasOwnProperty("$$intervalId")) throw Qg("badprom"); if (!d.hasOwnProperty(a.$$intervalId)) return !1; a = a.$$intervalId; var b = d[a], e = b.promise; e.$$state && (e.$$state.pur = !0); b.reject("canceled");
                c(a); return !0
            }; return e
        }]
    } function Rf() { this.$get = ["$browser", "$q", "$$q", "$rootScope", function (a, b, d, c) { return function (e, f) { return function (g, k, h, l) { function m() { p ? g.apply(null, n) : g(s) } var p = 4 < arguments.length, n = p ? Ha.call(arguments, 4) : [], s = 0, G = w(l) && !l, t = (G ? d : b).defer(), r = t.promise; h = w(h) ? h : 0; r.$$intervalId = e(function () { G ? a.defer(m) : c.$evalAsync(m); t.notify(s++); 0 < h && s >= h && (t.resolve(s), f(r.$$intervalId)); G || c.$apply() }, k, t, G); return r } } }] } function Cd(a, b) {
        var d = ga(a); b.$$protocol = d.protocol; b.$$host =
            d.hostname; b.$$port = fa(d.port) || Rg[d.protocol] || null
    } function Dd(a, b, d) { if (Sg.test(a)) throw kb("badpath", a); var c = "/" !== a.charAt(0); c && (a = "/" + a); a = ga(a); for (var c = (c && "/" === a.pathname.charAt(0) ? a.pathname.substring(1) : a.pathname).split("/"), e = c.length; e--;)c[e] = decodeURIComponent(c[e]), d && (c[e] = c[e].replace(/\//g, "%2F")); d = c.join("/"); b.$$path = d; b.$$search = hc(a.search); b.$$hash = decodeURIComponent(a.hash); b.$$path && "/" !== b.$$path.charAt(0) && (b.$$path = "/" + b.$$path) } function yc(a, b) {
        return a.slice(0,
            b.length) === b
    } function ya(a, b) { if (yc(b, a)) return b.substr(a.length) } function Da(a) { var b = a.indexOf("#"); return -1 === b ? a : a.substr(0, b) } function zc(a, b, d) {
        this.$$html5 = !0; d = d || ""; Cd(a, this); this.$$parse = function (a) { var d = ya(b, a); if (!C(d)) throw kb("ipthprfx", a, b); Dd(d, this, !0); this.$$path || (this.$$path = "/"); this.$$compose() }; this.$$normalizeUrl = function (a) { return b + a.substr(1) }; this.$$parseLinkUrl = function (c, e) {
            if (e && "#" === e[0]) return this.hash(e.slice(1)), !0; var f, g; w(f = ya(a, c)) ? (g = f, g = d && w(f = ya(d, f)) ?
                b + (ya("/", f) || f) : a + g) : w(f = ya(b, c)) ? g = b + f : b === c + "/" && (g = b); g && this.$$parse(g); return !!g
        }
    } function Ac(a, b, d) {
        Cd(a, this); this.$$parse = function (c) { var e = ya(a, c) || ya(b, c), f; A(e) || "#" !== e.charAt(0) ? this.$$html5 ? f = e : (f = "", A(e) && (a = c, this.replace())) : (f = ya(d, e), A(f) && (f = e)); Dd(f, this, !1); c = this.$$path; var e = a, g = /^\/[A-Z]:(\/.*)/; yc(f, e) && (f = f.replace(e, "")); g.exec(f) || (c = (f = g.exec(c)) ? f[1] : c); this.$$path = c; this.$$compose() }; this.$$normalizeUrl = function (b) { return a + (b ? d + b : "") }; this.$$parseLinkUrl = function (b,
            d) { return Da(a) === Da(b) ? (this.$$parse(b), !0) : !1 }
    } function Ed(a, b, d) { this.$$html5 = !0; Ac.apply(this, arguments); this.$$parseLinkUrl = function (c, e) { if (e && "#" === e[0]) return this.hash(e.slice(1)), !0; var f, g; a === Da(c) ? f = c : (g = ya(b, c)) ? f = a + d + g : b === c + "/" && (f = b); f && this.$$parse(f); return !!f }; this.$$normalizeUrl = function (b) { return a + d + b } } function Mb(a) { return function () { return this[a] } } function Fd(a, b) { return function (d) { if (A(d)) return this[a]; this[a] = b(d); this.$$compose(); return this } } function Yf() {
        var a = "!",
        b = { enabled: !1, requireBase: !0, rewriteLinks: !0 }; this.hashPrefix = function (b) { return w(b) ? (a = b, this) : a }; this.html5Mode = function (a) { if (Ga(a)) return b.enabled = a, this; if (D(a)) { Ga(a.enabled) && (b.enabled = a.enabled); Ga(a.requireBase) && (b.requireBase = a.requireBase); if (Ga(a.rewriteLinks) || C(a.rewriteLinks)) b.rewriteLinks = a.rewriteLinks; return this } return b }; this.$get = ["$rootScope", "$browser", "$sniffer", "$rootElement", "$window", function (d, c, e, f, g) {
            function k(a, b) { return a === b || ga(a).href === ga(b).href } function h(a,
                b, d) { var e = m.url(), f = m.$$state; try { c.url(a, b, d), m.$$state = c.state() } catch (g) { throw m.url(e), m.$$state = f, g; } } function l(a, b) { d.$broadcast("$locationChangeSuccess", m.absUrl(), a, m.$$state, b) } var m, p; p = c.baseHref(); var n = c.url(), s; if (b.enabled) { if (!p && b.requireBase) throw kb("nobase"); s = n.substring(0, n.indexOf("/", n.indexOf("//") + 2)) + (p || "/"); p = e.history ? zc : Ed } else s = Da(n), p = Ac; var r = s.substr(0, Da(s).lastIndexOf("/") + 1); m = new p(s, r, "#" + a); m.$$parseLinkUrl(n, n); m.$$state = c.state(); var t = /^\s*(javascript|mailto):/i;
            f.on("click", function (a) { var e = b.rewriteLinks; if (e && !a.ctrlKey && !a.metaKey && !a.shiftKey && 2 !== a.which && 2 !== a.button) { for (var g = x(a.target); "a" !== ua(g[0]);)if (g[0] === f[0] || !(g = g.parent())[0]) return; if (!C(e) || !A(g.attr(e))) { var e = g.prop("href"), h = g.attr("href") || g.attr("xlink:href"); D(e) && "[object SVGAnimatedString]" === e.toString() && (e = ga(e.animVal).href); t.test(e) || !e || g.attr("target") || a.isDefaultPrevented() || !m.$$parseLinkUrl(e, h) || (a.preventDefault(), m.absUrl() !== c.url() && d.$apply()) } } }); m.absUrl() !==
                n && c.url(m.absUrl(), !0); var N = !0; c.onUrlChange(function (a, b) { yc(a, r) ? (d.$evalAsync(function () { var c = m.absUrl(), e = m.$$state, f; m.$$parse(a); m.$$state = b; f = d.$broadcast("$locationChangeStart", a, c, b, e).defaultPrevented; m.absUrl() === a && (f ? (m.$$parse(c), m.$$state = e, h(c, !1, e)) : (N = !1, l(c, e))) }), d.$$phase || d.$digest()) : g.location.href = a }); d.$watch(function () {
                    if (N || m.$$urlUpdatedByLocation) {
                        m.$$urlUpdatedByLocation = !1; var a = c.url(), b = m.absUrl(), f = c.state(), g = m.$$replace, n = !k(a, b) || m.$$html5 && e.history && f !==
                            m.$$state; if (N || n) N = !1, d.$evalAsync(function () { var b = m.absUrl(), c = d.$broadcast("$locationChangeStart", b, a, m.$$state, f).defaultPrevented; m.absUrl() === b && (c ? (m.$$parse(a), m.$$state = f) : (n && h(b, g, f === m.$$state ? null : m.$$state), l(a, f))) })
                    } m.$$replace = !1
                }); return m
        }]
    } function Zf() {
        var a = !0, b = this; this.debugEnabled = function (b) { return w(b) ? (a = b, this) : a }; this.$get = ["$window", function (d) {
            function c(a) {
                dc(a) && (a.stack && f ? 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)); return a
            } function e(a) { var b = d.console || {}, e = b[a] || b.log || E; return function () { var a = []; r(arguments, function (b) { a.push(c(b)) }); return Function.prototype.apply.call(e, b, a) } } var f = wa || /\bEdge\//.test(d.navigator && d.navigator.userAgent); return { log: e("log"), info: e("info"), warn: e("warn"), error: e("error"), debug: function () { var c = e("debug"); return function () { a && c.apply(b, arguments) } }() }
        }]
    } function Tg(a) { return a + "" } function Ug(a, b) {
        return "undefined" !== typeof a ? a :
            b
    } function Gd(a, b) { return "undefined" === typeof a ? b : "undefined" === typeof b ? a : a + b } function Vg(a, b) { switch (a.type) { case q.MemberExpression: if (a.computed) return !1; break; case q.UnaryExpression: return 1; case q.BinaryExpression: return "+" !== a.operator ? 1 : !1; case q.CallExpression: return !1 }return void 0 === b ? Hd : b } function Z(a, b, d) {
        var c, e, f = a.isPure = Vg(a, d); switch (a.type) {
            case q.Program: c = !0; r(a.body, function (a) { Z(a.expression, b, f); c = c && a.expression.constant }); a.constant = c; break; case q.Literal: a.constant = !0; a.toWatch =
                []; break; case q.UnaryExpression: Z(a.argument, b, f); a.constant = a.argument.constant; a.toWatch = a.argument.toWatch; break; case q.BinaryExpression: Z(a.left, b, f); Z(a.right, b, f); a.constant = a.left.constant && a.right.constant; a.toWatch = a.left.toWatch.concat(a.right.toWatch); break; case q.LogicalExpression: Z(a.left, b, f); Z(a.right, b, f); a.constant = a.left.constant && a.right.constant; a.toWatch = a.constant ? [] : [a]; break; case q.ConditionalExpression: Z(a.test, b, f); Z(a.alternate, b, f); Z(a.consequent, b, f); a.constant = a.test.constant &&
                    a.alternate.constant && a.consequent.constant; a.toWatch = a.constant ? [] : [a]; break; case q.Identifier: a.constant = !1; a.toWatch = [a]; break; case q.MemberExpression: Z(a.object, b, f); a.computed && Z(a.property, b, f); a.constant = a.object.constant && (!a.computed || a.property.constant); a.toWatch = a.constant ? [] : [a]; break; case q.CallExpression: c = d = a.filter ? !b(a.callee.name).$stateful : !1; e = []; r(a.arguments, function (a) { Z(a, b, f); c = c && a.constant; e.push.apply(e, a.toWatch) }); a.constant = c; a.toWatch = d ? e : [a]; break; case q.AssignmentExpression: Z(a.left,
                        b, f); Z(a.right, b, f); a.constant = a.left.constant && a.right.constant; a.toWatch = [a]; break; case q.ArrayExpression: c = !0; e = []; r(a.elements, function (a) { Z(a, b, f); c = c && a.constant; e.push.apply(e, a.toWatch) }); a.constant = c; a.toWatch = e; break; case q.ObjectExpression: c = !0; e = []; r(a.properties, function (a) { Z(a.value, b, f); c = c && a.value.constant; e.push.apply(e, a.value.toWatch); a.computed && (Z(a.key, b, !1), c = c && a.key.constant, e.push.apply(e, a.key.toWatch)) }); a.constant = c; a.toWatch = e; break; case q.ThisExpression: a.constant =
                            !1; a.toWatch = []; break; case q.LocalsExpression: a.constant = !1, a.toWatch = []
        }
    } function Id(a) { if (1 === a.length) { a = a[0].expression; var b = a.toWatch; return 1 !== b.length ? b : b[0] !== a ? b : void 0 } } function Jd(a) { return a.type === q.Identifier || a.type === q.MemberExpression } function Kd(a) { if (1 === a.body.length && Jd(a.body[0].expression)) return { type: q.AssignmentExpression, left: a.body[0].expression, right: { type: q.NGValueParameter }, operator: "=" } } function Ld(a) { this.$filter = a } function Md(a) { this.$filter = a } function Nb(a, b, d) {
        this.ast =
        new q(a, d); this.astCompiler = d.csp ? new Md(b) : new Ld(b)
    } function Bc(a) { return B(a.valueOf) ? a.valueOf() : Wg.call(a) } function $f() {
        var a = T(), b = { "true": !0, "false": !1, "null": null, undefined: void 0 }, d, c; this.addLiteral = function (a, c) { b[a] = c }; this.setIdentifierFns = function (a, b) { d = a; c = b; return this }; this.$get = ["$filter", function (e) {
            function f(b, c) {
                var d, f; switch (typeof b) {
                    case "string": return f = b = b.trim(), d = a[f], d || (d = new Ob(G), d = (new Nb(d, e, G)).parse(b), a[f] = p(d)), s(d, c); case "function": return s(b, c); default: return s(E,
                        c)
                }
            } function g(a, b, c) { return null == a || null == b ? a === b : "object" !== typeof a || (a = Bc(a), "object" !== typeof a || c) ? a === b || a !== a && b !== b : !1 } function k(a, b, c, d, e) {
                var f = d.inputs, h; if (1 === f.length) { var k = g, f = f[0]; return a.$watch(function (a) { var b = f(a); g(b, k, f.isPure) || (h = d(a, void 0, void 0, [b]), k = b && Bc(b)); return h }, b, c, e) } for (var l = [], m = [], n = 0, p = f.length; n < p; n++)l[n] = g, m[n] = null; return a.$watch(function (a) {
                    for (var b = !1, c = 0, e = f.length; c < e; c++) { var k = f[c](a); if (b || (b = !g(k, l[c], f[c].isPure))) m[c] = k, l[c] = k && Bc(k) } b &&
                        (h = d(a, void 0, void 0, m)); return h
                }, b, c, e)
            } function h(a, b, c, d, e) { function f() { h(m) && k() } function g(a, b, c, d) { m = u && d ? d[0] : n(a, b, c, d); h(m) && a.$$postDigest(f); return s(m) } var h = d.literal ? l : w, k, m, n = d.$$intercepted || d, s = d.$$interceptor || Ta, u = d.inputs && !n.inputs; g.literal = d.literal; g.constant = d.constant; g.inputs = d.inputs; p(g); return k = a.$watch(g, b, c, e) } function l(a) { var b = !0; r(a, function (a) { w(a) || (b = !1) }); return b } function m(a, b, c, d) { var e = a.$watch(function (a) { e(); return d(a) }, b, c); return e } function p(a) {
                a.constant ?
                a.$$watchDelegate = m : a.oneTime ? a.$$watchDelegate = h : a.inputs && (a.$$watchDelegate = k); return a
            } function n(a, b) { function c(d) { return b(a(d)) } c.$stateful = a.$stateful || b.$stateful; c.$$pure = a.$$pure && b.$$pure; return c } function s(a, b) {
                if (!b) return a; a.$$interceptor && (b = n(a.$$interceptor, b), a = a.$$intercepted); var c = !1, d = function (d, e, f, g) { d = c && g ? g[0] : a(d, e, f, g); return b(d) }; d.$$intercepted = a; d.$$interceptor = b; d.literal = a.literal; d.oneTime = a.oneTime; d.constant = a.constant; b.$stateful || (c = !a.inputs, d.inputs = a.inputs ?
                    a.inputs : [a], b.$$pure || (d.inputs = d.inputs.map(function (a) { return a.isPure === Hd ? function (b) { return a(b) } : a }))); return p(d)
            } var G = { csp: Ba().noUnsafeEval, literals: Ia(b), isIdentifierStart: B(d) && d, isIdentifierContinue: B(c) && c }; f.$$getAst = function (a) { var b = new Ob(G); return (new Nb(b, e, G)).getAst(a).ast }; return f
        }]
    } function bg() {
        var a = !0; this.$get = ["$rootScope", "$exceptionHandler", function (b, d) { return Nd(function (a) { b.$evalAsync(a) }, d, a) }]; this.errorOnUnhandledRejections = function (b) {
            return w(b) ? (a = b, this) :
                a
        }
    } function cg() { var a = !0; this.$get = ["$browser", "$exceptionHandler", function (b, d) { return Nd(function (a) { b.defer(a) }, d, a) }]; this.errorOnUnhandledRejections = function (b) { return w(b) ? (a = b, this) : a } } function Nd(a, b, d) {
        function c() { return new e } function e() { var a = this.promise = new f; this.resolve = function (b) { h(a, b) }; this.reject = function (b) { m(a, b) }; this.notify = function (b) { n(a, b) } } function f() { this.$$state = { status: 0 } } function g() {
            for (; !w && x.length;) {
                var a = x.shift(); if (!a.pur) {
                    a.pur = !0; var c = a.value, c = "Possibly unhandled rejection: " +
                        ("function" === typeof c ? c.toString().replace(/ \{[\s\S]*$/, "") : A(c) ? "undefined" : "string" !== typeof c ? Ne(c, void 0) : c); dc(a.value) ? b(a.value, c) : b(c)
                }
            }
        } function k(c) {
            !d || c.pending || 2 !== c.status || c.pur || (0 === w && 0 === x.length && a(g), x.push(c)); !c.processScheduled && c.pending && (c.processScheduled = !0, ++w, a(function () {
                var e, f, k; k = c.pending; c.processScheduled = !1; c.pending = void 0; try {
                    for (var l = 0, n = k.length; l < n; ++l) {
                        c.pur = !0; f = k[l][0]; e = k[l][c.status]; try { B(e) ? h(f, e(c.value)) : 1 === c.status ? h(f, c.value) : m(f, c.value) } catch (p) {
                            m(f,
                                p), p && !0 === p.$$passToExceptionHandler && b(p)
                        }
                    }
                } finally { --w, d && 0 === w && a(g) }
            }))
        } function h(a, b) { a.$$state.status || (b === a ? p(a, v("qcycle", b)) : l(a, b)) } function l(a, b) { function c(b) { g || (g = !0, l(a, b)) } function d(b) { g || (g = !0, p(a, b)) } function e(b) { n(a, b) } var f, g = !1; try { if (D(b) || B(b)) f = b.then; B(f) ? (a.$$state.status = -1, f.call(b, c, d, e)) : (a.$$state.value = b, a.$$state.status = 1, k(a.$$state)) } catch (h) { d(h) } } function m(a, b) { a.$$state.status || p(a, b) } function p(a, b) { a.$$state.value = b; a.$$state.status = 2; k(a.$$state) } function n(c,
            d) { var e = c.$$state.pending; 0 >= c.$$state.status && e && e.length && a(function () { for (var a, c, f = 0, g = e.length; f < g; f++) { c = e[f][0]; a = e[f][3]; try { n(c, B(a) ? a(d) : d) } catch (h) { b(h) } } }) } function s(a) { var b = new f; m(b, a); return b } function G(a, b, c) { var d = null; try { B(c) && (d = c()) } catch (e) { return s(e) } return d && B(d.then) ? d.then(function () { return b(a) }, s) : b(a) } function t(a, b, c, d) { var e = new f; h(e, a); return e.then(b, c, d) } function q(a) { if (!B(a)) throw v("norslvr", a); var b = new f; a(function (a) { h(b, a) }, function (a) { m(b, a) }); return b }
        var v = F("$q", TypeError), w = 0, x = []; S(f.prototype, { then: function (a, b, c) { if (A(a) && A(b) && A(c)) return this; var d = new f; this.$$state.pending = this.$$state.pending || []; this.$$state.pending.push([d, a, b, c]); 0 < this.$$state.status && k(this.$$state); return d }, "catch": function (a) { return this.then(null, a) }, "finally": function (a, b) { return this.then(function (b) { return G(b, y, a) }, function (b) { return G(b, s, a) }, b) } }); var y = t; q.prototype = f.prototype; q.defer = c; q.reject = s; q.when = t; q.resolve = y; q.all = function (a) {
            var b = new f, c =
                0, d = H(a) ? [] : {}; r(a, function (a, e) { c++; t(a).then(function (a) { d[e] = a; --c || h(b, d) }, function (a) { m(b, a) }) }); 0 === c && h(b, d); return b
        }; q.race = function (a) { var b = c(); r(a, function (a) { t(a).then(b.resolve, b.reject) }); return b.promise }; return q
    } function mg() {
        this.$get = ["$window", "$timeout", function (a, b) {
            var d = a.requestAnimationFrame || a.webkitRequestAnimationFrame, c = a.cancelAnimationFrame || a.webkitCancelAnimationFrame || a.webkitCancelRequestAnimationFrame, e = !!d, f = e ? function (a) { var b = d(a); return function () { c(b) } } :
                function (a) { var c = b(a, 16.66, !1); return function () { b.cancel(c) } }; f.supported = e; return f
        }]
    } function ag() {
        function a(a) { function b() { this.$$watchers = this.$$nextSibling = this.$$childHead = this.$$childTail = null; this.$$listeners = {}; this.$$listenerCount = {}; this.$$watchersCount = 0; this.$id = ++qb; this.$$ChildScope = null; this.$$suspended = !1 } b.prototype = a; return b } var b = 10, d = F("$rootScope"), c = null, e = null; this.digestTtl = function (a) { arguments.length && (b = a); return b }; this.$get = ["$exceptionHandler", "$parse", "$browser",
            function (f, g, k) {
                function h(a) { a.currentScope.$$destroyed = !0 } function l(a) { 9 === wa && (a.$$childHead && l(a.$$childHead), a.$$nextSibling && l(a.$$nextSibling)); a.$parent = a.$$nextSibling = a.$$prevSibling = a.$$childHead = a.$$childTail = a.$root = a.$$watchers = null } function m() {
                    this.$id = ++qb; this.$$phase = this.$parent = this.$$watchers = this.$$nextSibling = this.$$prevSibling = this.$$childHead = this.$$childTail = null; this.$root = this; this.$$suspended = this.$$destroyed = !1; this.$$listeners = {}; this.$$listenerCount = {}; this.$$watchersCount =
                        0; this.$$isolateBindings = null
                } function p(a) { if (v.$$phase) throw d("inprog", v.$$phase); v.$$phase = a } function n(a, b) { do a.$$watchersCount += b; while (a = a.$parent) } function s(a, b, c) { do a.$$listenerCount[c] -= b, 0 === a.$$listenerCount[c] && delete a.$$listenerCount[c]; while (a = a.$parent) } function G() { } function t() { for (; y.length;)try { y.shift()() } catch (a) { f(a) } e = null } function q() { null === e && (e = k.defer(function () { v.$apply(t) }, null, "$applyAsync")) } m.prototype = {
                    constructor: m, $new: function (b, c) {
                        var d; c = c || this; b ? (d = new m,
                            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", h); return d
                    }, $watch: function (a, b, d, e) {
                        var f = g(a); b = B(b) ? b : E; if (f.$$watchDelegate) return f.$$watchDelegate(this, b, d, f, a); var h = this, k = h.$$watchers, l = { fn: b, last: G, get: f, exp: e || a, eq: !!d }; c = null; k || (k = h.$$watchers = [], k.$$digestWatchIndex = -1); k.unshift(l);
                        k.$$digestWatchIndex++; n(this, 1); return function () { var a = cb(k, l); 0 <= a && (n(h, -1), a < k.$$digestWatchIndex && k.$$digestWatchIndex--); c = null }
                    }, $watchGroup: function (a, b) {
                        function c() { h = !1; try { k ? (k = !1, b(e, e, g)) : b(e, d, g) } finally { for (var f = 0; f < a.length; f++)d[f] = e[f] } } var d = Array(a.length), e = Array(a.length), f = [], g = this, h = !1, k = !0; if (!a.length) { var l = !0; g.$evalAsync(function () { l && b(e, e, g) }); return function () { l = !1 } } if (1 === a.length) return this.$watch(a[0], function (a, c, f) { e[0] = a; d[0] = c; b(e, a === c ? e : d, f) }); r(a, function (a,
                            b) { var d = g.$watch(a, function (a) { e[b] = a; h || (h = !0, g.$evalAsync(c)) }); f.push(d) }); return function () { for (; f.length;)f.shift()() }
                    }, $watchCollection: function (a, b) {
                        function c(a) {
                            e = a; var b, d, g, h; if (!A(e)) {
                                if (D(e)) if (za(e)) for (f !== n && (f = n, t = f.length = 0, l++), a = e.length, t !== a && (l++, f.length = t = a), b = 0; b < a; b++)h = f[b], g = e[b], d = h !== h && g !== g, d || h === g || (l++, f[b] = g); else {
                                    f !== p && (f = p = {}, t = 0, l++); a = 0; for (b in e) ta.call(e, b) && (a++, g = e[b], h = f[b], b in f ? (d = h !== h && g !== g, d || h === g || (l++, f[b] = g)) : (t++, f[b] = g, l++)); if (t > a) for (b in l++,
                                        f) ta.call(e, b) || (t--, delete f[b])
                                } else f !== e && (f = e, l++); return l
                            }
                        } c.$$pure = g(a).literal; c.$stateful = !c.$$pure; var d = this, e, f, h, k = 1 < b.length, l = 0, m = g(a, c), n = [], p = {}, s = !0, t = 0; return this.$watch(m, function () { s ? (s = !1, b(e, e, d)) : b(e, h, d); if (k) if (D(e)) if (za(e)) { h = Array(e.length); for (var a = 0; a < e.length; a++)h[a] = e[a] } else for (a in h = {}, e) ta.call(e, a) && (h[a] = e[a]); else h = e })
                    }, $digest: function () {
                        var a, g, h, l, m, n, s, r = b, q, y = w.length ? v : this, N = [], A, z; p("$digest"); k.$$checkUrlChange(); this === v && null !== e && (k.defer.cancel(e),
                            t()); c = null; do {
                                s = !1; q = y; for (n = 0; n < w.length; n++) { try { z = w[n], l = z.fn, l(z.scope, z.locals) } catch (C) { f(C) } c = null } w.length = 0; a: do {
                                    if (n = !q.$$suspended && q.$$watchers) for (n.$$digestWatchIndex = n.length; n.$$digestWatchIndex--;)try {
                                        if (a = n[n.$$digestWatchIndex]) if (m = a.get, (g = m(q)) !== (h = a.last) && !(a.eq ? va(g, h) : Y(g) && Y(h))) s = !0, c = a, a.last = a.eq ? Ia(g, null) : g, l = a.fn, l(g, h === G ? g : h, q), 5 > r && (A = 4 - r, N[A] || (N[A] = []), N[A].push({ msg: B(a.exp) ? "fn: " + (a.exp.name || a.exp.toString()) : a.exp, newVal: g, oldVal: h })); else if (a === c) {
                                            s =
                                            !1; break a
                                        }
                                    } catch (E) { f(E) } if (!(n = !q.$$suspended && q.$$watchersCount && q.$$childHead || q !== y && q.$$nextSibling)) for (; q !== y && !(n = q.$$nextSibling);)q = q.$parent
                                } while (q = n); if ((s || w.length) && !r--) throw v.$$phase = null, d("infdig", b, N);
                            } while (s || w.length); for (v.$$phase = null; J < x.length;)try { x[J++]() } catch (D) { f(D) } x.length = J = 0; k.$$checkUrlChange()
                    }, $suspend: function () { this.$$suspended = !0 }, $isSuspended: function () { return this.$$suspended }, $resume: function () { this.$$suspended = !1 }, $destroy: function () {
                        if (!this.$$destroyed) {
                            var a =
                                this.$parent; this.$broadcast("$destroy"); this.$$destroyed = !0; this === v && k.$$applicationDestroyed(); n(this, -this.$$watchersCount); for (var b in this.$$listenerCount) s(this, this.$$listenerCount[b], b); a && a.$$childHead === this && (a.$$childHead = this.$$nextSibling); a && a.$$childTail === this && (a.$$childTail = this.$$prevSibling); this.$$prevSibling && (this.$$prevSibling.$$nextSibling = this.$$nextSibling); this.$$nextSibling && (this.$$nextSibling.$$prevSibling = this.$$prevSibling); this.$destroy = this.$digest = this.$apply =
                                    this.$evalAsync = this.$applyAsync = E; this.$on = this.$watch = this.$watchGroup = function () { return E }; this.$$listeners = {}; this.$$nextSibling = null; l(this)
                        }
                    }, $eval: function (a, b) { return g(a)(this, b) }, $evalAsync: function (a, b) { v.$$phase || w.length || k.defer(function () { w.length && v.$digest() }, null, "$evalAsync"); w.push({ scope: this, fn: g(a), locals: b }) }, $$postDigest: function (a) { x.push(a) }, $apply: function (a) {
                        try { p("$apply"); try { return this.$eval(a) } finally { v.$$phase = null } } catch (b) { f(b) } finally {
                            try { v.$digest() } catch (c) {
                                throw f(c),
                                c;
                            }
                        }
                    }, $applyAsync: function (a) { function b() { c.$eval(a) } var c = this; a && y.push(b); a = g(a); q() }, $on: function (a, b) { var c = this.$$listeners[a]; c || (this.$$listeners[a] = c = []); c.push(b); var d = this; do d.$$listenerCount[a] || (d.$$listenerCount[a] = 0), d.$$listenerCount[a]++; while (d = d.$parent); var e = this; return function () { var d = c.indexOf(b); -1 !== d && (delete c[d], s(e, 1, a)) } }, $emit: function (a, b) {
                        var c = [], d, e = this, g = !1, h = {
                            name: a, targetScope: e, stopPropagation: function () { g = !0 }, preventDefault: function () {
                                h.defaultPrevented =
                                !0
                            }, defaultPrevented: !1
                        }, k = db([h], arguments, 1), l, m; do { d = e.$$listeners[a] || c; h.currentScope = e; l = 0; for (m = d.length; l < m; l++)if (d[l]) try { d[l].apply(null, k) } catch (n) { f(n) } else d.splice(l, 1), l--, m--; if (g) break; e = e.$parent } while (e); h.currentScope = null; return h
                    }, $broadcast: function (a, b) {
                        var c = this, d = this, e = { name: a, targetScope: this, preventDefault: function () { e.defaultPrevented = !0 }, defaultPrevented: !1 }; if (!this.$$listenerCount[a]) return e; for (var g = db([e], arguments, 1), h, k; c = d;) {
                            e.currentScope = c; d = c.$$listeners[a] ||
                                []; h = 0; for (k = d.length; h < k; h++)if (d[h]) try { d[h].apply(null, g) } catch (l) { f(l) } else d.splice(h, 1), h--, k--; if (!(d = c.$$listenerCount[a] && c.$$childHead || c !== this && c.$$nextSibling)) for (; c !== this && !(d = c.$$nextSibling);)c = c.$parent
                        } e.currentScope = null; return e
                    }
                }; var v = new m, w = v.$$asyncQueue = [], x = v.$$postDigestQueue = [], y = v.$$applyAsyncQueue = [], J = 0; return v
            }]
    } function Qe() {
        var a = /^\s*(https?|s?ftp|mailto|tel|file):/, b = /^\s*((https?|ftp|file|blob):|data:image\/)/; this.aHrefSanitizationTrustedUrlList = function (b) {
            return w(b) ?
                (a = b, this) : a
        }; this.imgSrcSanitizationTrustedUrlList = function (a) { return w(a) ? (b = a, this) : b }; this.$get = function () { return function (d, c) { var e = c ? b : a, f = ga(d && d.trim()).href; return "" === f || f.match(e) ? d : "unsafe:" + f } }
    } function Xg(a) { if ("self" === a) return a; if (C(a)) { if (-1 < a.indexOf("***")) throw Ea("iwcard", a); a = Od(a).replace(/\\\*\\\*/g, ".*").replace(/\\\*/g, "[^:/.?&;]*"); return new RegExp("^" + a + "$") } if (ab(a)) return new RegExp("^" + a.source + "$"); throw Ea("imatcher"); } function Pd(a) {
        var b = []; w(a) && r(a, function (a) { b.push(Xg(a)) });
        return b
    } function eg() {
        this.SCE_CONTEXTS = W; var a = ["self"], b = []; this.trustedResourceUrlList = function (b) { arguments.length && (a = Pd(b)); return a }; Object.defineProperty(this, "resourceUrlWhitelist", { get: function () { return this.trustedResourceUrlList }, set: function (a) { this.trustedResourceUrlList = a } }); this.bannedResourceUrlList = function (a) { arguments.length && (b = Pd(a)); return b }; Object.defineProperty(this, "resourceUrlBlacklist", {
            get: function () { return this.bannedResourceUrlList }, set: function (a) {
                this.bannedResourceUrlList =
                a
            }
        }); this.$get = ["$injector", "$$sanitizeUri", function (d, c) {
            function e(a, b) { var c; "self" === a ? (c = Cc(b, Qd)) || (z.document.baseURI ? c = z.document.baseURI : (Na || (Na = z.document.createElement("a"), Na.href = ".", Na = Na.cloneNode(!1)), c = Na.href), c = Cc(b, c)) : c = !!a.exec(b.href); return c } function f(a) {
                var b = function (a) { this.$$unwrapTrustedValue = function () { return a } }; a && (b.prototype = new a); b.prototype.valueOf = function () { return this.$$unwrapTrustedValue() }; b.prototype.toString = function () { return this.$$unwrapTrustedValue().toString() };
                return b
            } var g = function (a) { throw Ea("unsafe"); }; d.has("$sanitize") && (g = d.get("$sanitize")); var k = f(), h = {}; h[W.HTML] = f(k); h[W.CSS] = f(k); h[W.MEDIA_URL] = f(k); h[W.URL] = f(h[W.MEDIA_URL]); h[W.JS] = f(k); h[W.RESOURCE_URL] = f(h[W.URL]); return {
                trustAs: function (a, b) { var c = h.hasOwnProperty(a) ? h[a] : null; if (!c) throw Ea("icontext", a, b); if (null === b || A(b) || "" === b) return b; if ("string" !== typeof b) throw Ea("itype", a); return new c(b) }, getTrusted: function (d, f) {
                    if (null === f || A(f) || "" === f) return f; var k = h.hasOwnProperty(d) ?
                        h[d] : null; if (k && f instanceof k) return f.$$unwrapTrustedValue(); B(f.$$unwrapTrustedValue) && (f = f.$$unwrapTrustedValue()); if (d === W.MEDIA_URL || d === W.URL) return c(f.toString(), d === W.MEDIA_URL); if (d === W.RESOURCE_URL) { var k = ga(f.toString()), n, s, r = !1; n = 0; for (s = a.length; n < s; n++)if (e(a[n], k)) { r = !0; break } if (r) for (n = 0, s = b.length; n < s; n++)if (e(b[n], k)) { r = !1; break } if (r) return f; throw Ea("insecurl", f.toString()); } if (d === W.HTML) return g(f); throw Ea("unsafe");
                }, valueOf: function (a) {
                    return a instanceof k ? a.$$unwrapTrustedValue() :
                        a
                }
            }
        }]
    } function dg() {
        var a = !0; this.enabled = function (b) { arguments.length && (a = !!b); return a }; this.$get = ["$parse", "$sceDelegate", function (b, d) {
            if (a && 8 > wa) throw Ea("iequirks"); var c = ja(W); c.isEnabled = function () { return a }; c.trustAs = d.trustAs; c.getTrusted = d.getTrusted; c.valueOf = d.valueOf; a || (c.trustAs = c.getTrusted = function (a, b) { return b }, c.valueOf = Ta); c.parseAs = function (a, d) { var e = b(d); return e.literal && e.constant ? e : b(d, function (b) { return c.getTrusted(a, b) }) }; var e = c.parseAs, f = c.getTrusted, g = c.trustAs; r(W,
                function (a, b) { var d = K(b); c[("parse_as_" + d).replace(Dc, xb)] = function (b) { return e(a, b) }; c[("get_trusted_" + d).replace(Dc, xb)] = function (b) { return f(a, b) }; c[("trust_as_" + d).replace(Dc, xb)] = function (b) { return g(a, b) } }); return c
        }]
    } function fg() {
        this.$get = ["$window", "$document", function (a, b) {
            var d = {}, c = !((!a.nw || !a.nw.process) && a.chrome && (a.chrome.app && a.chrome.app.runtime || !a.chrome.app && a.chrome.runtime && a.chrome.runtime.id)) && a.history && a.history.pushState, e = fa((/android (\d+)/.exec(K((a.navigator || {}).userAgent)) ||
                [])[1]), f = /Boxee/i.test((a.navigator || {}).userAgent), g = b[0] || {}, k = g.body && g.body.style, h = !1, l = !1; k && (h = !!("transition" in k || "webkitTransition" in k), l = !!("animation" in k || "webkitAnimation" in k)); return { history: !(!c || 4 > e || f), hasEvent: function (a) { if ("input" === a && wa) return !1; if (A(d[a])) { var b = g.createElement("div"); d[a] = "on" + a in b } return d[a] }, csp: Ba(), transitions: h, animations: l, android: e }
        }]
    } function gg() { this.$get = ia(function (a) { return new Yg(a) }) } function Yg(a) {
        function b() {
            var a = e.pop(); return a &&
                a.cb
        } function d(a) { for (var b = e.length - 1; 0 <= b; --b) { var c = e[b]; if (c.type === a) return e.splice(b, 1), c.cb } } var c = {}, e = [], f = this.ALL_TASKS_TYPE = "$$all$$", g = this.DEFAULT_TASK_TYPE = "$$default$$"; this.completeTask = function (e, h) { h = h || g; try { e() } finally { var l; l = h || g; c[l] && (c[l]--, c[f]--); l = c[h]; var m = c[f]; if (!m || !l) for (l = m ? d : b; m = l(h);)try { m() } catch (p) { a.error(p) } } }; this.incTaskCount = function (a) { a = a || g; c[a] = (c[a] || 0) + 1; c[f] = (c[f] || 0) + 1 }; this.notifyWhenNoPendingTasks = function (a, b) {
            b = b || f; c[b] ? e.push({ type: b, cb: a }) :
                a()
        }
    } function ig() {
        var a; this.httpOptions = function (b) { return b ? (a = b, this) : a }; this.$get = ["$exceptionHandler", "$templateCache", "$http", "$q", "$sce", function (b, d, c, e, f) {
            function g(k, h) {
                g.totalPendingRequests++; if (!C(k) || A(d.get(k))) k = f.getTrustedResourceUrl(k); var l = c.defaults && c.defaults.transformResponse; H(l) ? l = l.filter(function (a) { return a !== wc }) : l === wc && (l = null); return c.get(k, S({ cache: d, transformResponse: l }, a)).finally(function () { g.totalPendingRequests-- }).then(function (a) { return d.put(k, a.data) },
                    function (a) { h || (a = Zg("tpload", k, a.status, a.statusText), b(a)); return e.reject(a) })
            } g.totalPendingRequests = 0; return g
        }]
    } function jg() {
        this.$get = ["$rootScope", "$browser", "$location", function (a, b, d) {
            return {
                findBindings: function (a, b, d) { a = a.getElementsByClassName("ng-binding"); var g = []; r(a, function (a) { var c = ca.element(a).data("$binding"); c && r(c, function (c) { d ? (new RegExp("(^|\\s)" + Od(b) + "(\\s|\\||$)")).test(c) && g.push(a) : -1 !== c.indexOf(b) && g.push(a) }) }); return g }, findModels: function (a, b, d) {
                    for (var g = ["ng-",
                        "data-ng-", "ng\\:"], k = 0; k < g.length; ++k) { var h = a.querySelectorAll("[" + g[k] + "model" + (d ? "=" : "*=") + '"' + b + '"]'); if (h.length) return h }
                }, getLocation: function () { return d.url() }, setLocation: function (b) { b !== d.url() && (d.url(b), a.$digest()) }, whenStable: function (a) { b.notifyWhenNoOutstandingRequests(a) }
            }
        }]
    } function kg() {
        this.$get = ["$rootScope", "$browser", "$q", "$$q", "$exceptionHandler", function (a, b, d, c, e) {
            function f(f, h, l) {
                B(f) || (l = h, h = f, f = E); var m = Ha.call(arguments, 3), p = w(l) && !l, n = (p ? c : d).defer(), s = n.promise, r;
                r = b.defer(function () { try { n.resolve(f.apply(null, m)) } catch (b) { n.reject(b), e(b) } finally { delete g[s.$$timeoutId] } p || a.$apply() }, h, "$timeout"); s.$$timeoutId = r; g[r] = n; return s
            } var g = {}; f.cancel = function (a) { if (!a) return !1; if (!a.hasOwnProperty("$$timeoutId")) throw $g("badprom"); if (!g.hasOwnProperty(a.$$timeoutId)) return !1; a = a.$$timeoutId; var c = g[a], d = c.promise; d.$$state && (d.$$state.pur = !0); c.reject("canceled"); delete g[a]; return b.defer.cancel(a) }; return f
        }]
    } function ga(a) {
        if (!C(a)) return a; wa && (aa.setAttribute("href",
            a), a = aa.href); aa.setAttribute("href", a); a = aa.hostname; !ah && -1 < a.indexOf(":") && (a = "[" + a + "]"); return { href: aa.href, protocol: aa.protocol ? aa.protocol.replace(/:$/, "") : "", host: aa.host, search: aa.search ? aa.search.replace(/^\?/, "") : "", hash: aa.hash ? aa.hash.replace(/^#/, "") : "", hostname: a, port: aa.port, pathname: "/" === aa.pathname.charAt(0) ? aa.pathname : "/" + aa.pathname }
    } function Og(a) { var b = [Qd].concat(a.map(ga)); return function (a) { a = ga(a); return b.some(Cc.bind(null, a)) } } function Cc(a, b) {
        a = ga(a); b = ga(b); return a.protocol ===
            b.protocol && a.host === b.host
    } function lg() { this.$get = ia(z) } function Rd(a) { function b(a) { try { return decodeURIComponent(a) } catch (b) { return a } } var d = a[0] || {}, c = {}, e = ""; return function () { var a, g, k, h, l; try { a = d.cookie || "" } catch (m) { a = "" } if (a !== e) for (e = a, a = e.split("; "), c = {}, k = 0; k < a.length; k++)g = a[k], h = g.indexOf("="), 0 < h && (l = b(g.substring(0, h)), A(c[l]) && (c[l] = b(g.substring(h + 1)))); return c } } function pg() { this.$get = Rd } function fd(a) {
        function b(d, c) {
            if (D(d)) { var e = {}; r(d, function (a, c) { e[c] = b(c, a) }); return e } return a.factory(d +
                "Filter", c)
        } this.register = b; this.$get = ["$injector", function (a) { return function (b) { return a.get(b + "Filter") } }]; b("currency", Sd); b("date", Td); b("filter", bh); b("json", ch); b("limitTo", dh); b("lowercase", eh); b("number", Ud); b("orderBy", Vd); b("uppercase", fh)
    } function bh() {
        return function (a, b, d, c) {
            if (!za(a)) { if (null == a) return a; throw F("filter")("notarray", a); } c = c || "$"; var e; switch (Ec(b)) { case "function": break; case "boolean": case "null": case "number": case "string": e = !0; case "object": b = gh(b, d, c, e); break; default: return a }return Array.prototype.filter.call(a,
                b)
        }
    } function gh(a, b, d, c) { var e = D(a) && d in a; !0 === b ? b = va : B(b) || (b = function (a, b) { if (A(a)) return !1; if (null === a || null === b) return a === b; if (D(b) || D(a) && !cc(a)) return !1; a = K("" + a); b = K("" + b); return -1 !== a.indexOf(b) }); return function (f) { return e && !D(f) ? Fa(f, a[d], b, d, !1) : Fa(f, a, b, d, c) } } function Fa(a, b, d, c, e, f) {
        var g = Ec(a), k = Ec(b); if ("string" === k && "!" === b.charAt(0)) return !Fa(a, b.substring(1), d, c, e); if (H(a)) return a.some(function (a) { return Fa(a, b, d, c, e) }); switch (g) {
            case "object": var h; if (e) {
                for (h in a) if (h.charAt &&
                    "$" !== h.charAt(0) && Fa(a[h], b, d, c, !0)) return !0; return f ? !1 : Fa(a, b, d, c, !1)
            } if ("object" === k) { for (h in b) if (f = b[h], !B(f) && !A(f) && (g = h === c, !Fa(g ? a : a[h], f, d, c, g, g))) return !1; return !0 } return d(a, b); case "function": return !1; default: return d(a, b)
        }
    } function Ec(a) { return null === a ? "null" : typeof a } function Sd(a) {
        var b = a.NUMBER_FORMATS; return function (a, c, e) {
            A(c) && (c = b.CURRENCY_SYM); A(e) && (e = b.PATTERNS[1].maxFrac); var f = c ? /\u00A4/g : /\s*\u00A4\s*/g; return null == a ? a : Wd(a, b.PATTERNS[1], b.GROUP_SEP, b.DECIMAL_SEP, e).replace(f,
                c)
        }
    } function Ud(a) { var b = a.NUMBER_FORMATS; return function (a, c) { return null == a ? a : Wd(a, b.PATTERNS[0], b.GROUP_SEP, b.DECIMAL_SEP, c) } } function hh(a) { var b = 0, d, c, e, f, g; -1 < (c = a.indexOf(Xd)) && (a = a.replace(Xd, "")); 0 < (e = a.search(/e/i)) ? (0 > c && (c = e), c += +a.slice(e + 1), a = a.substring(0, e)) : 0 > c && (c = a.length); for (e = 0; a.charAt(e) === Fc; e++); if (e === (g = a.length)) d = [0], c = 1; else { for (g--; a.charAt(g) === Fc;)g--; c -= e; d = []; for (f = 0; e <= g; e++, f++)d[f] = +a.charAt(e) } c > Yd && (d = d.splice(0, Yd - 1), b = c - 1, c = 1); return { d: d, e: b, i: c } } function ih(a,
        b, d, c) { var e = a.d, f = e.length - a.i; b = A(b) ? Math.min(Math.max(d, f), c) : +b; d = b + a.i; c = e[d]; if (0 < d) { e.splice(Math.max(a.i, d)); for (var g = d; g < e.length; g++)e[g] = 0 } else for (f = Math.max(0, f), a.i = 1, e.length = Math.max(1, d = b + 1), e[0] = 0, g = 1; g < d; g++)e[g] = 0; if (5 <= c) if (0 > d - 1) { for (c = 0; c > d; c--)e.unshift(0), a.i++; e.unshift(1); a.i++ } else e[d - 1]++; for (; f < Math.max(0, b); f++)e.push(0); if (b = e.reduceRight(function (a, b, c, d) { b += a; d[c] = b % 10; return Math.floor(b / 10) }, 0)) e.unshift(b), a.i++ } function Wd(a, b, d, c, e) {
            if (!C(a) && !X(a) || isNaN(a)) return "";
            var f = !isFinite(a), g = !1, k = Math.abs(a) + "", h = ""; if (f) h = "\u221e"; else { g = hh(k); ih(g, e, b.minFrac, b.maxFrac); h = g.d; k = g.i; e = g.e; f = []; for (g = h.reduce(function (a, b) { return a && !b }, !0); 0 > k;)h.unshift(0), k++; 0 < k ? f = h.splice(k, h.length) : (f = h, h = [0]); k = []; for (h.length >= b.lgSize && k.unshift(h.splice(-b.lgSize, h.length).join("")); h.length > b.gSize;)k.unshift(h.splice(-b.gSize, h.length).join("")); h.length && k.unshift(h.join("")); h = k.join(d); f.length && (h += c + f.join("")); e && (h += "e+" + e) } return 0 > a && !g ? b.negPre + h + b.negSuf : b.posPre +
                h + b.posSuf
        } function Pb(a, b, d, c) { var e = ""; if (0 > a || c && 0 >= a) c ? a = -a + 1 : (a = -a, e = "-"); for (a = "" + a; a.length < b;)a = Fc + a; d && (a = a.substr(a.length - b)); return e + a } function ea(a, b, d, c, e) { d = d || 0; return function (f) { f = f["get" + a](); if (0 < d || f > -d) f += d; 0 === f && -12 === d && (f = 12); return Pb(f, b, c, e) } } function lb(a, b, d) { return function (c, e) { var f = c["get" + a](), g = vb((d ? "STANDALONE" : "") + (b ? "SHORT" : "") + a); return e[g][f] } } function Zd(a) { var b = (new Date(a, 0, 1)).getDay(); return new Date(a, 0, (4 >= b ? 5 : 12) - b) } function $d(a) {
            return function (b) {
                var d =
                    Zd(b.getFullYear()); b = +new Date(b.getFullYear(), b.getMonth(), b.getDate() + (4 - b.getDay())) - +d; b = 1 + Math.round(b / 6048E5); return Pb(b, a)
            }
        } function Gc(a, b) { return 0 >= a.getFullYear() ? b.ERAS[0] : b.ERAS[1] } function Td(a) {
            function b(a) {
                var b; if (b = a.match(d)) {
                    a = new Date(0); var f = 0, g = 0, k = b[8] ? a.setUTCFullYear : a.setFullYear, h = b[8] ? a.setUTCHours : a.setHours; b[9] && (f = fa(b[9] + b[10]), g = fa(b[9] + b[11])); k.call(a, fa(b[1]), fa(b[2]) - 1, fa(b[3])); f = fa(b[4] || 0) - f; g = fa(b[5] || 0) - g; k = fa(b[6] || 0); b = Math.round(1E3 * parseFloat("0." +
                        (b[7] || 0))); h.call(a, f, g, k, b)
                } return a
            } var d = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; return function (c, d, f) {
                var g = "", k = [], h, l; d = d || "mediumDate"; d = a.DATETIME_FORMATS[d] || d; C(c) && (c = jh.test(c) ? fa(c) : b(c)); X(c) && (c = new Date(c)); if (!ha(c) || !isFinite(c.getTime())) return c; for (; d;)(l = kh.exec(d)) ? (k = db(k, l, 1), d = k.pop()) : (k.push(d), d = null); var m = c.getTimezoneOffset(); f && (m = fc(f, m), c = gc(c, f, !0)); r(k, function (b) {
                    h = lh[b]; g += h ? h(c, a.DATETIME_FORMATS,
                        m) : "''" === b ? "'" : b.replace(/(^'|'$)/g, "").replace(/''/g, "'")
                }); return g
            }
        } function ch() { return function (a, b) { A(b) && (b = 2); return eb(a, b) } } function dh() { return function (a, b, d) { b = Infinity === Math.abs(Number(b)) ? Number(b) : fa(b); if (Y(b)) return a; X(a) && (a = a.toString()); if (!za(a)) return a; d = !d || isNaN(d) ? 0 : fa(d); d = 0 > d ? Math.max(0, a.length + d) : d; return 0 <= b ? Hc(a, d, d + b) : 0 === d ? Hc(a, b, a.length) : Hc(a, Math.max(0, d + b), d) } } function Hc(a, b, d) { return C(a) ? a.slice(b, d) : Ha.call(a, b, d) } function Vd(a) {
            function b(b) {
                return b.map(function (b) {
                    var c =
                        1, d = Ta; if (B(b)) d = b; else if (C(b)) { if ("+" === b.charAt(0) || "-" === b.charAt(0)) c = "-" === b.charAt(0) ? -1 : 1, b = b.substring(1); if ("" !== b && (d = a(b), d.constant)) var e = d(), d = function (a) { return a[e] } } return { get: d, descending: c }
                })
            } function d(a) { switch (typeof a) { case "number": case "boolean": case "string": return !0; default: return !1 } } function c(a, b) {
                var c = 0, d = a.type, h = b.type; if (d === h) {
                    var h = a.value, l = b.value; "string" === d ? (h = h.toLowerCase(), l = l.toLowerCase()) : "object" === d && (D(h) && (h = a.index), D(l) && (l = b.index)); h !== l && (c =
                        h < l ? -1 : 1)
                } else c = "undefined" === d ? 1 : "undefined" === h ? -1 : "null" === d ? 1 : "null" === h ? -1 : d < h ? -1 : 1; return c
            } return function (a, f, g, k) {
                if (null == a) return a; if (!za(a)) throw F("orderBy")("notarray", a); H(f) || (f = [f]); 0 === f.length && (f = ["+"]); var h = b(f), l = g ? -1 : 1, m = B(k) ? k : c; a = Array.prototype.map.call(a, function (a, b) {
                    return {
                        value: a, tieBreaker: { value: b, type: "number", index: b }, predicateValues: h.map(function (c) {
                            var e = c.get(a); c = typeof e; if (null === e) c = "null"; else if ("object" === c) a: {
                                if (B(e.valueOf) && (e = e.valueOf(), d(e))) break a;
                                cc(e) && (e = e.toString(), d(e))
                            } return { value: e, type: c, index: b }
                        })
                    }
                }); a.sort(function (a, b) { for (var d = 0, e = h.length; d < e; d++) { var f = m(a.predicateValues[d], b.predicateValues[d]); if (f) return f * h[d].descending * l } return (m(a.tieBreaker, b.tieBreaker) || c(a.tieBreaker, b.tieBreaker)) * l }); return a = a.map(function (a) { return a.value })
            }
        } function Ra(a) { B(a) && (a = { link: a }); a.restrict = a.restrict || "AC"; return ia(a) } function Qb(a, b, d, c, e) {
            this.$$controls = []; this.$error = {}; this.$$success = {}; this.$pending = void 0; this.$name = e(b.name ||
                b.ngForm || "")(d); this.$dirty = !1; this.$valid = this.$pristine = !0; this.$submitted = this.$invalid = !1; this.$$parentForm = mb; this.$$element = a; this.$$animate = c; ae(this)
        } function ae(a) { a.$$classCache = {}; a.$$classCache[be] = !(a.$$classCache[nb] = a.$$element.hasClass(nb)) } function ce(a) {
            function b(a, b, c) { c && !a.$$classCache[b] ? (a.$$animate.addClass(a.$$element, b), a.$$classCache[b] = !0) : !c && a.$$classCache[b] && (a.$$animate.removeClass(a.$$element, b), a.$$classCache[b] = !1) } function d(a, c, d) {
                c = c ? "-" + Xc(c, "-") : ""; b(a, nb +
                    c, !0 === d); b(a, be + c, !1 === d)
            } var c = a.set, e = a.unset; a.clazz.prototype.$setValidity = function (a, g, k) {
                A(g) ? (this.$pending || (this.$pending = {}), c(this.$pending, a, k)) : (this.$pending && e(this.$pending, a, k), de(this.$pending) && (this.$pending = void 0)); Ga(g) ? g ? (e(this.$error, a, k), c(this.$$success, a, k)) : (c(this.$error, a, k), e(this.$$success, a, k)) : (e(this.$error, a, k), e(this.$$success, a, k)); this.$pending ? (b(this, "ng-pending", !0), this.$valid = this.$invalid = void 0, d(this, "", null)) : (b(this, "ng-pending", !1), this.$valid =
                    de(this.$error), this.$invalid = !this.$valid, d(this, "", this.$valid)); g = this.$pending && this.$pending[a] ? void 0 : this.$error[a] ? !1 : this.$$success[a] ? !0 : null; d(this, a, g); this.$$parentForm.$setValidity(a, g, this)
            }
        } function de(a) { if (a) for (var b in a) if (a.hasOwnProperty(b)) return !1; return !0 } function Ic(a) { a.$formatters.push(function (b) { return a.$isEmpty(b) ? b : b.toString() }) } function Sa(a, b, d, c, e, f) {
            var g = K(b[0].type); if (!e.android) {
                var k = !1; b.on("compositionstart", function () { k = !0 }); b.on("compositionupdate",
                    function (a) { if (A(a.data) || "" === a.data) k = !1 }); b.on("compositionend", function () { k = !1; l() })
            } var h, l = function (a) { h && (f.defer.cancel(h), h = null); if (!k) { var e = b.val(); a = a && a.type; "password" === g || d.ngTrim && "false" === d.ngTrim || (e = V(e)); (c.$viewValue !== e || "" === e && c.$$hasNativeValidators) && c.$setViewValue(e, a) } }; if (e.hasEvent("input")) b.on("input", l); else {
                var m = function (a, b, c) { h || (h = f.defer(function () { h = null; b && b.value === c || l(a) })) }; b.on("keydown", function (a) {
                    var b = a.keyCode; 91 === b || 15 < b && 19 > b || 37 <= b && 40 >= b ||
                        m(a, this, this.value)
                }); if (e.hasEvent("paste")) b.on("paste cut drop", m)
            } b.on("change", l); if (ee[g] && c.$$hasNativeValidators && g === d.type) b.on("keydown wheel mousedown", function (a) { if (!h) { var b = this.validity, c = b.badInput, d = b.typeMismatch; h = f.defer(function () { h = null; b.badInput === c && b.typeMismatch === d || l(a) }) } }); c.$render = function () { var a = c.$isEmpty(c.$viewValue) ? "" : c.$viewValue; b.val() !== a && b.val(a) }
        } function Rb(a, b) {
            return function (d, c) {
                var e, f; if (ha(d)) return d; if (C(d)) {
                    '"' === d.charAt(0) && '"' === d.charAt(d.length -
                        1) && (d = d.substring(1, d.length - 1)); if (mh.test(d)) return new Date(d); a.lastIndex = 0; if (e = a.exec(d)) return e.shift(), f = c ? { yyyy: c.getFullYear(), MM: c.getMonth() + 1, dd: c.getDate(), HH: c.getHours(), mm: c.getMinutes(), ss: c.getSeconds(), sss: c.getMilliseconds() / 1E3 } : { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 }, r(e, function (a, c) { c < b.length && (f[b[c]] = +a) }), e = new Date(f.yyyy, f.MM - 1, f.dd, f.HH, f.mm, f.ss || 0, 1E3 * f.sss || 0), 100 > f.yyyy && e.setFullYear(f.yyyy), e
                } return NaN
            }
        } function ob(a, b, d, c) {
            return function (e, f, g, k, h, l, m,
                p) {
                    function n(a) { return a && !(a.getTime && a.getTime() !== a.getTime()) } function s(a) { return w(a) && !ha(a) ? r(a) || void 0 : a } function r(a, b) { var c = k.$options.getOption("timezone"); v && v !== c && (b = Uc(b, fc(v))); var e = d(a, b); !isNaN(e) && c && (e = gc(e, c)); return e } Jc(e, f, g, k, a); Sa(e, f, g, k, h, l); var t = "time" === a || "datetimelocal" === a, q, v; k.$parsers.push(function (c) { if (k.$isEmpty(c)) return null; if (b.test(c)) return r(c, q); k.$$parserName = a }); k.$formatters.push(function (a) {
                        if (a && !ha(a)) throw pb("datefmt", a); if (n(a)) {
                            q = a; var b =
                                k.$options.getOption("timezone"); b && (v = b, q = gc(q, b, !0)); var d = c; t && C(k.$options.getOption("timeSecondsFormat")) && (d = c.replace("ss.sss", k.$options.getOption("timeSecondsFormat")).replace(/:$/, "")); a = m("date")(a, d, b); t && k.$options.getOption("timeStripZeroSeconds") && (a = a.replace(/(?::00)?(?:\.000)?$/, "")); return a
                        } v = q = null; return ""
                    }); if (w(g.min) || g.ngMin) { var x = g.min || p(g.ngMin)(e), z = s(x); k.$validators.min = function (a) { return !n(a) || A(z) || d(a) >= z }; g.$observe("min", function (a) { a !== x && (z = s(a), x = a, k.$validate()) }) } if (w(g.max) ||
                        g.ngMax) { var y = g.max || p(g.ngMax)(e), J = s(y); k.$validators.max = function (a) { return !n(a) || A(J) || d(a) <= J }; g.$observe("max", function (a) { a !== y && (J = s(a), y = a, k.$validate()) }) }
            }
        } function Jc(a, b, d, c, e) { (c.$$hasNativeValidators = D(b[0].validity)) && c.$parsers.push(function (a) { var d = b.prop("validity") || {}; if (d.badInput || d.typeMismatch) c.$$parserName = e; else return a }) } function fe(a) {
            a.$parsers.push(function (b) { if (a.$isEmpty(b)) return null; if (nh.test(b)) return parseFloat(b); a.$$parserName = "number" }); a.$formatters.push(function (b) {
                if (!a.$isEmpty(b)) {
                    if (!X(b)) throw pb("numfmt",
                        b); b = b.toString()
                } return b
            })
        } function na(a) { w(a) && !X(a) && (a = parseFloat(a)); return Y(a) ? void 0 : a } function Kc(a) { var b = a.toString(), d = b.indexOf("."); return -1 === d ? -1 < a && 1 > a && (a = /e-(\d+)$/.exec(b)) ? Number(a[1]) : 0 : b.length - d - 1 } function ge(a, b, d) { a = Number(a); var c = (a | 0) !== a, e = (b | 0) !== b, f = (d | 0) !== d; if (c || e || f) { var g = c ? Kc(a) : 0, k = e ? Kc(b) : 0, h = f ? Kc(d) : 0, g = Math.max(g, k, h), g = Math.pow(10, g); a *= g; b *= g; d *= g; c && (a = Math.round(a)); e && (b = Math.round(b)); f && (d = Math.round(d)) } return 0 === (a - b) % d } function he(a, b, d, c, e) {
            if (w(c)) {
                a =
                a(c); if (!a.constant) throw pb("constexpr", d, c); return a(b)
            } return e
        } function Lc(a, b) {
            function d(a, b) { if (!a || !a.length) return []; if (!b || !b.length) return a; var c = [], d = 0; a: for (; d < a.length; d++) { for (var e = a[d], m = 0; m < b.length; m++)if (e === b[m]) continue a; c.push(e) } return c } function c(a) { if (!a) return a; var b = a; H(a) ? b = a.map(c).join(" ") : D(a) ? b = Object.keys(a).filter(function (b) { return a[b] }).join(" ") : C(a) || (b = a + ""); return b } a = "ngClass" + a; var e; return ["$parse", function (f) {
                return {
                    restrict: "AC", link: function (g,
                        k, h) {
                            function l(a, b) { var c = []; r(a, function (a) { if (0 < b || p[a]) p[a] = (p[a] || 0) + b, p[a] === +(0 < b) && c.push(a) }); return c.join(" ") } function m(a) { if (a === b) { var c = s, c = l(c && c.split(" "), 1); h.$addClass(c) } else c = s, c = l(c && c.split(" "), -1), h.$removeClass(c); n = a } var p = k.data("$classCounts"), n = !0, s; p || (p = T(), k.data("$classCounts", p)); "ngClass" !== a && (e || (e = f("$index", function (a) { return a & 1 })), g.$watch(e, m)); g.$watch(f(h[a], c), function (a) {
                                if (n === b) {
                                    var c = s && s.split(" "), e = a && a.split(" "), f = d(c, e), c = d(e, c), f = l(f, -1),
                                    c = l(c, 1); h.$addClass(c); h.$removeClass(f)
                                } s = a
                            })
                    }
                }
            }]
        } function sd(a, b, d, c, e, f) { return { restrict: "A", compile: function (g, k) { var h = a(k[c]); return function (a, c) { c.on(e, function (c) { var e = function () { h(a, { $event: c }) }; if (b.$$phase) if (f) a.$evalAsync(e); else try { e() } catch (g) { d(g) } else a.$apply(e) }) } } } } function Sb(a, b, d, c, e, f, g, k, h) {
            this.$modelValue = this.$viewValue = 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 = h(d.name || "", !1)(a); this.$$parentForm = mb; this.$options = Tb; this.$$updateEvents = ""; this.$$updateEventHandler = this.$$updateEventHandler.bind(this); this.$$parsedNgModel = e(d.ngModel); this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; this.$$ngModelGet = this.$$parsedNgModel; this.$$ngModelSet = this.$$parsedNgModelAssign; this.$$pendingDebounce =
                    null; this.$$parserValid = void 0; this.$$parserName = "parse"; this.$$currentValidationRunId = 0; this.$$scope = a; this.$$rootScope = a.$root; this.$$attr = d; this.$$element = c; this.$$animate = f; this.$$timeout = g; this.$$parse = e; this.$$q = k; this.$$exceptionHandler = b; ae(this); oh(this)
        } function oh(a) { a.$$scope.$watch(function (b) { b = a.$$ngModelGet(b); b === a.$modelValue || a.$modelValue !== a.$modelValue && b !== b || a.$$setModelValue(b); return b }) } function Mc(a) { this.$$options = a } function ie(a, b) { r(b, function (b, c) { w(a[c]) || (a[c] = b) }) }
    function Oa(a, b) { a.prop("selected", b); a.attr("selected", b) } function je(a, b, d) { if (a) { C(a) && (a = new RegExp("^" + a + "$")); if (!a.test) throw F("ngPattern")("noregexp", b, a, Aa(d)); return a } } function Ub(a) { a = fa(a); return Y(a) ? -1 : a } var Xb = { objectMaxDepth: 5, urlErrorParamsEnabled: !0 }, ke = /^\/(.+)\/([a-z]*)$/, ta = Object.prototype.hasOwnProperty, K = function (a) { return C(a) ? a.toLowerCase() : a }, vb = function (a) { return C(a) ? a.toUpperCase() : a }, wa, x, sb, Ha = [].slice, Kg = [].splice, ph = [].push, la = Object.prototype.toString, Rc = Object.getPrototypeOf,
        oa = F("ng"), ca = z.angular || (z.angular = {}), lc, qb = 0; wa = z.document.documentMode; var Y = Number.isNaN || function (a) { return a !== a }; E.$inject = []; Ta.$inject = []; var ze = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/, V = function (a) { return C(a) ? a.trim() : a }, Od = function (a) { return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08") }, Ba = function () {
            if (!w(Ba.rules)) {
                var a = z.document.querySelector("[ng-csp]") || z.document.querySelector("[data-ng-csp]"); if (a) {
                    var b =
                        a.getAttribute("ng-csp") || a.getAttribute("data-ng-csp"); Ba.rules = { noUnsafeEval: !b || -1 !== b.indexOf("no-unsafe-eval"), noInlineStyle: !b || -1 !== b.indexOf("no-inline-style") }
                } else { a = Ba; try { new Function(""), b = !1 } catch (d) { b = !0 } a.rules = { noUnsafeEval: b, noInlineStyle: !1 } }
            } return Ba.rules
        }, rb = function () { if (w(rb.name_)) return rb.name_; var a, b, d = Qa.length, c, e; for (b = 0; b < d; ++b)if (c = Qa[b], a = z.document.querySelector("[" + c.replace(":", "\\:") + "jq]")) { e = a.getAttribute(c + "jq"); break } return rb.name_ = e }, Be = /:/g, Qa = ["ng-",
            "data-ng-", "ng:", "x-ng-"], Fe = function (a) { var b = a.currentScript; if (!b) return !0; if (!(b instanceof z.HTMLScriptElement || b instanceof z.SVGScriptElement)) return !1; b = b.attributes; return [b.getNamedItem("src"), b.getNamedItem("href"), b.getNamedItem("xlink:href")].every(function (b) { if (!b) return !0; if (!b.value) return !1; var c = a.createElement("a"); c.href = b.value; if (a.location.origin === c.origin) return !0; switch (c.protocol) { case "http:": case "https:": case "ftp:": case "blob:": case "file:": case "data:": return !0; default: return !1 } }) }(z.document),
            Ie = /[A-Z]/g, Yc = !1, Pa = 3, Pe = { full: "1.8.2", major: 1, minor: 8, dot: 2, codeName: "meteoric-mining" }; U.expando = "ng339"; var Ka = U.cache = {}, ug = 1; U._data = function (a) { return this.cache[a[this.expando]] || {} }; var qg = /-([a-z])/g, qh = /^-ms-/, Bb = { mouseleave: "mouseout", mouseenter: "mouseover" }, oc = F("jqLite"), tg = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, nc = /<|&#?\w+;/, rg = /<([\w:-]+)/, sg = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, qa = {
                thead: ["table"], col: ["colgroup", "table"], tr: ["tbody", "table"], td: ["tr",
                    "tbody", "table"]
            }; qa.tbody = qa.tfoot = qa.colgroup = qa.caption = qa.thead; qa.th = qa.td; var hb = { option: [1, '<select multiple="multiple">', "</select>"], _default: [0, "", ""] }, Nc; for (Nc in qa) { var le = qa[Nc], me = le.slice().reverse(); hb[Nc] = [me.length, "<" + me.join("><") + ">", "</" + le.join("></") + ">"] } hb.optgroup = hb.option; var zg = z.Node.prototype.contains || function (a) { return !!(this.compareDocumentPosition(a) & 16) }, Wa = U.prototype = {
                ready: hd, toString: function () {
                    var a = []; r(this, function (b) { a.push("" + b) }); return "[" + a.join(", ") +
                        "]"
                }, eq: function (a) { return 0 <= a ? x(this[a]) : x(this[this.length + a]) }, length: 0, push: ph, sort: [].sort, splice: [].splice
            }, Hb = {}; r("multiple selected checked disabled readOnly required open".split(" "), function (a) { Hb[K(a)] = a }); var od = {}; r("input select option textarea button form details".split(" "), function (a) { od[a] = !0 }); var vd = { ngMinlength: "minlength", ngMaxlength: "maxlength", ngMin: "min", ngMax: "max", ngPattern: "pattern", ngStep: "step" }; r({
                data: sc, removeData: rc, hasData: function (a) {
                    for (var b in Ka[a.ng339]) return !0;
                    return !1
                }, cleanData: function (a) { for (var b = 0, d = a.length; b < d; b++)rc(a[b]), kd(a[b]) }
            }, function (a, b) { U[b] = a }); r({
                data: sc, inheritedData: Fb, scope: function (a) { return x.data(a, "$scope") || Fb(a.parentNode || a, ["$isolateScope", "$scope"]) }, isolateScope: function (a) { return x.data(a, "$isolateScope") || x.data(a, "$isolateScopeNoTemplate") }, controller: ld, injector: function (a) { return Fb(a, "$injector") }, removeAttr: function (a, b) { a.removeAttribute(b) }, hasClass: Cb, css: function (a, b, d) {
                    b = yb(b.replace(qh, "ms-")); if (w(d)) a.style[b] =
                        d; else return a.style[b]
                }, attr: function (a, b, d) { var c = a.nodeType; if (c !== Pa && 2 !== c && 8 !== c && a.getAttribute) { var c = K(b), e = Hb[c]; if (w(d)) null === d || !1 === d && e ? a.removeAttribute(b) : a.setAttribute(b, e ? c : d); else return a = a.getAttribute(b), e && null !== a && (a = c), null === a ? void 0 : a } }, prop: function (a, b, d) { if (w(d)) a[b] = d; else return a[b] }, text: function () { function a(a, d) { if (A(d)) { var c = a.nodeType; return 1 === c || c === Pa ? a.textContent : "" } a.textContent = d } a.$dv = ""; return a }(), val: function (a, b) {
                    if (A(b)) {
                        if (a.multiple && "select" ===
                            ua(a)) { var d = []; r(a.options, function (a) { a.selected && d.push(a.value || a.text) }); return d } return a.value
                    } a.value = b
                }, html: function (a, b) { if (A(b)) return a.innerHTML; zb(a, !0); a.innerHTML = b }, empty: md
            }, function (a, b) {
                U.prototype[b] = function (b, c) {
                    var e, f, g = this.length; if (a !== md && A(2 === a.length && a !== Cb && a !== ld ? b : c)) { if (D(b)) { for (e = 0; e < g; e++)if (a === sc) a(this[e], b); else for (f in b) a(this[e], f, b[f]); return this } e = a.$dv; g = A(e) ? Math.min(g, 1) : g; for (f = 0; f < g; f++) { var k = a(this[f], b, c); e = e ? e + k : k } return e } for (e = 0; e < g; e++)a(this[e],
                        b, c); return this
                }
            }); r({
                removeData: rc, on: function (a, b, d, c) { if (w(c)) throw oc("onargs"); if (mc(a)) { c = Ab(a, !0); var e = c.events, f = c.handle; f || (f = c.handle = wg(a, e)); c = 0 <= b.indexOf(" ") ? b.split(" ") : [b]; for (var g = c.length, k = function (b, c, g) { var k = e[b]; k || (k = e[b] = [], k.specialHandlerWrapper = c, "$destroy" === b || g || a.addEventListener(b, f)); k.push(d) }; g--;)b = c[g], Bb[b] ? (k(Bb[b], yg), k(b, void 0, !0)) : k(b) } }, off: kd, one: function (a, b, d) { a = x(a); a.on(b, function e() { a.off(b, d); a.off(b, e) }); a.on(b, d) }, replaceWith: function (a,
                    b) { var d, c = a.parentNode; zb(a); r(new U(b), function (b) { d ? c.insertBefore(b, d.nextSibling) : c.replaceChild(b, a); d = b }) }, children: function (a) { var b = []; r(a.childNodes, function (a) { 1 === a.nodeType && b.push(a) }); return b }, contents: function (a) { return a.contentDocument || a.childNodes || [] }, append: function (a, b) { var d = a.nodeType; if (1 === d || 11 === d) { b = new U(b); for (var d = 0, c = b.length; d < c; d++)a.appendChild(b[d]) } }, prepend: function (a, b) { if (1 === a.nodeType) { var d = a.firstChild; r(new U(b), function (b) { a.insertBefore(b, d) }) } },
                wrap: function (a, b) { var d = x(b).eq(0).clone()[0], c = a.parentNode; c && c.replaceChild(d, a); d.appendChild(a) }, remove: Gb, detach: function (a) { Gb(a, !0) }, after: function (a, b) { var d = a, c = a.parentNode; if (c) { b = new U(b); for (var e = 0, f = b.length; e < f; e++) { var g = b[e]; c.insertBefore(g, d.nextSibling); d = g } } }, addClass: Eb, removeClass: Db, toggleClass: function (a, b, d) { b && r(b.split(" "), function (b) { var e = d; A(e) && (e = !Cb(a, b)); (e ? Eb : Db)(a, b) }) }, parent: function (a) { return (a = a.parentNode) && 11 !== a.nodeType ? a : null }, next: function (a) { return a.nextElementSibling },
                find: function (a, b) { return a.getElementsByTagName ? a.getElementsByTagName(b) : [] }, clone: qc, triggerHandler: function (a, b, d) {
                    var c, e, f = b.type || b, g = Ab(a); if (g = (g = g && g.events) && g[f]) c = { preventDefault: function () { this.defaultPrevented = !0 }, isDefaultPrevented: function () { return !0 === this.defaultPrevented }, stopImmediatePropagation: function () { this.immediatePropagationStopped = !0 }, isImmediatePropagationStopped: function () { return !0 === this.immediatePropagationStopped }, stopPropagation: E, type: f, target: a }, b.type && (c = S(c,
                        b)), b = ja(g), e = d ? [c].concat(d) : [c], r(b, function (b) { c.isImmediatePropagationStopped() || b.apply(a, e) })
                }
            }, function (a, b) { U.prototype[b] = function (b, c, e) { for (var f, g = 0, k = this.length; g < k; g++)A(f) ? (f = a(this[g], b, c, e), w(f) && (f = x(f))) : pc(f, a(this[g], b, c, e)); return w(f) ? f : this } }); U.prototype.bind = U.prototype.on; U.prototype.unbind = U.prototype.off; var rh = Object.create(null); pd.prototype = {
                _idx: function (a) { a !== this._lastKey && (this._lastKey = a, this._lastIndex = this._keys.indexOf(a)); return this._lastIndex }, _transformKey: function (a) {
                    return Y(a) ?
                        rh : a
                }, get: function (a) { a = this._transformKey(a); a = this._idx(a); if (-1 !== a) return this._values[a] }, has: function (a) { a = this._transformKey(a); return -1 !== this._idx(a) }, set: function (a, b) { a = this._transformKey(a); var d = this._idx(a); -1 === d && (d = this._lastIndex = this._keys.length); this._keys[d] = a; this._values[d] = b }, delete: function (a) { a = this._transformKey(a); a = this._idx(a); if (-1 === a) return !1; this._keys.splice(a, 1); this._values.splice(a, 1); this._lastKey = NaN; this._lastIndex = -1; return !0 }
            }; var Ib = pd, og = [function () {
                this.$get =
                [function () { return Ib }]
            }], Bg = /^([^(]+?)=>/, Cg = /^[^(]*\(\s*([^)]*)\)/m, sh = /,/, th = /^\s*(_?)(\S+?)\1\s*$/, Ag = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg, Ca = F("$injector"); fb.$$annotate = function (a, b, d) { var c; if ("function" === typeof a) { if (!(c = a.$inject)) { c = []; if (a.length) { if (b) throw C(d) && d || (d = a.name || Dg(a)), Ca("strictdi", d); b = qd(a); r(b[1].split(sh), function (a) { a.replace(th, function (a, b, d) { c.push(d) }) }) } a.$inject = c } } else H(a) ? (b = a.length - 1, tb(a[b], "fn"), c = a.slice(0, b)) : tb(a, "fn", !0); return c }; var ne = F("$animate"),
                Ef = function () { this.$get = E }, Ff = function () {
                    var a = new Ib, b = []; this.$get = ["$$AnimateRunner", "$rootScope", function (d, c) {
                        function e(a, b, c) { var d = !1; b && (b = C(b) ? b.split(" ") : H(b) ? b : [], r(b, function (b) { b && (d = !0, a[b] = c) })); return d } function f() { r(b, function (b) { var c = a.get(b); if (c) { var d = Eg(b.attr("class")), e = "", f = ""; r(c, function (a, b) { a !== !!d[b] && (a ? e += (e.length ? " " : "") + b : f += (f.length ? " " : "") + b) }); r(b, function (a) { e && Eb(a, e); f && Db(a, f) }); a.delete(b) } }); b.length = 0 } return {
                            enabled: E, on: E, off: E, pin: E, push: function (g,
                                k, h, l) { l && l(); h = h || {}; h.from && g.css(h.from); h.to && g.css(h.to); if (h.addClass || h.removeClass) if (k = h.addClass, l = h.removeClass, h = a.get(g) || {}, k = e(h, k, !0), l = e(h, l, !1), k || l) a.set(g, h), b.push(g), 1 === b.length && c.$$postDigest(f); g = new d; g.complete(); return g }
                        }
                    }]
                }, Cf = ["$provide", function (a) {
                    var b = this, d = null, c = null; this.$$registeredAnimations = Object.create(null); this.register = function (c, d) {
                        if (c && "." !== c.charAt(0)) throw ne("notcsel", c); var g = c + "-animation"; b.$$registeredAnimations[c.substr(1)] = g; a.factory(g,
                            d)
                    }; this.customFilter = function (a) { 1 === arguments.length && (c = B(a) ? a : null); return c }; this.classNameFilter = function (a) { if (1 === arguments.length && (d = a instanceof RegExp ? a : null) && /[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString())) throw d = null, ne("nongcls", "ng-animate"); return d }; this.$get = ["$$animateQueue", function (a) {
                        function b(a, c, d) { if (d) { var e; a: { for (e = 0; e < d.length; e++) { var f = d[e]; if (1 === f.nodeType) { e = f; break a } } e = void 0 } !e || e.parentNode || e.previousElementSibling || (d = null) } d ? d.after(a) : c.prepend(a) } return {
                            on: a.on,
                            off: a.off, pin: a.pin, enabled: a.enabled, cancel: function (a) { a.cancel && a.cancel() }, enter: function (c, d, h, l) { d = d && x(d); h = h && x(h); d = d || h.parent(); b(c, d, h); return a.push(c, "enter", ra(l)) }, move: function (c, d, h, l) { d = d && x(d); h = h && x(h); d = d || h.parent(); b(c, d, h); return a.push(c, "move", ra(l)) }, leave: function (b, c) { return a.push(b, "leave", ra(c), function () { b.remove() }) }, addClass: function (b, c, d) { d = ra(d); d.addClass = ib(d.addclass, c); return a.push(b, "addClass", d) }, removeClass: function (b, c, d) {
                                d = ra(d); d.removeClass = ib(d.removeClass,
                                    c); return a.push(b, "removeClass", d)
                            }, setClass: function (b, c, d, f) { f = ra(f); f.addClass = ib(f.addClass, c); f.removeClass = ib(f.removeClass, d); return a.push(b, "setClass", f) }, animate: function (b, c, d, f, m) { m = ra(m); m.from = m.from ? S(m.from, c) : c; m.to = m.to ? S(m.to, d) : d; m.tempClasses = ib(m.tempClasses, f || "ng-inline-animate"); return a.push(b, "animate", m) }
                        }
                    }]
                }], Hf = function () {
                    this.$get = ["$$rAF", function (a) {
                        function b(b) { d.push(b); 1 < d.length || a(function () { for (var a = 0; a < d.length; a++)d[a](); d = [] }) } var d = []; return function () {
                            var a =
                                !1; b(function () { a = !0 }); return function (d) { a ? d() : b(d) }
                        }
                    }]
                }, Gf = function () {
                    this.$get = ["$q", "$sniffer", "$$animateAsyncRun", "$$isDocumentHidden", "$timeout", function (a, b, d, c, e) {
                        function f(a) { this.setHost(a); var b = d(); this._doneCallbacks = []; this._tick = function (a) { c() ? e(a, 0, !1) : b(a) }; this._state = 0 } f.chain = function (a, b) { function c() { if (d === a.length) b(!0); else a[d](function (a) { !1 === a ? b(!1) : (d++, c()) }) } var d = 0; c() }; f.all = function (a, b) { function c(f) { e = e && f; ++d === a.length && b(e) } var d = 0, e = !0; r(a, function (a) { a.done(c) }) };
                        f.prototype = {
                            setHost: function (a) { this.host = a || {} }, done: function (a) { 2 === this._state ? a() : this._doneCallbacks.push(a) }, progress: E, getPromise: function () { if (!this.promise) { var b = this; this.promise = a(function (a, c) { b.done(function (b) { !1 === b ? c() : a() }) }) } return this.promise }, then: function (a, b) { return this.getPromise().then(a, b) }, "catch": function (a) { return this.getPromise()["catch"](a) }, "finally": function (a) { return this.getPromise()["finally"](a) }, pause: function () { this.host.pause && this.host.pause() }, resume: function () {
                                this.host.resume &&
                                this.host.resume()
                            }, end: function () { this.host.end && this.host.end(); this._resolve(!0) }, cancel: function () { this.host.cancel && this.host.cancel(); this._resolve(!1) }, complete: function (a) { var b = this; 0 === b._state && (b._state = 1, b._tick(function () { b._resolve(a) })) }, _resolve: function (a) { 2 !== this._state && (r(this._doneCallbacks, function (b) { b(a) }), this._doneCallbacks.length = 0, this._state = 2) }
                        }; return f
                    }]
                }, Df = function () {
                    this.$get = ["$$rAF", "$q", "$$AnimateRunner", function (a, b, d) {
                        return function (b, e) {
                            function f() {
                                a(function () {
                                    g.addClass &&
                                    (b.addClass(g.addClass), g.addClass = null); g.removeClass && (b.removeClass(g.removeClass), g.removeClass = null); g.to && (b.css(g.to), g.to = null); k || h.complete(); k = !0
                                }); return h
                            } var g = e || {}; g.$$prepared || (g = Ia(g)); g.cleanupStyles && (g.from = g.to = null); g.from && (b.css(g.from), g.from = null); var k, h = new d; return { start: f, end: f }
                        }
                    }]
                }, $ = F("$compile"), uc = new function () { }; Zc.$inject = ["$provide", "$$sanitizeUriProvider"]; Kb.prototype.isFirstChange = function () { return this.previousValue === uc }; var rd = /^((?:x|data)[:\-_])/i, Jg =
                    /[:\-_]+(.)/g, xd = F("$controller"), wd = /^(\S+)(\s+as\s+([\w$]+))?$/, Of = function () { this.$get = ["$document", function (a) { return function (b) { b ? !b.nodeType && b instanceof x && (b = b[0]) : b = a[0].body; return b.offsetWidth + 1 } }] }, yd = "application/json", xc = { "Content-Type": yd + ";charset=utf-8" }, Mg = /^\[|^\{(?!\{)/, Ng = { "[": /]$/, "{": /}$/ }, Lg = /^\)]\}',?\n/, Lb = F("$http"), Ma = ca.$interpolateMinErr = F("$interpolate"); Ma.throwNoconcat = function (a) { throw Ma("noconcat", a); }; Ma.interr = function (a, b) { return Ma("interr", a, b.toString()) };
    var Qg = F("$interval"), Xf = function () { this.$get = function () { function a(a) { var b = function (a) { b.data = a; b.called = !0 }; b.id = a; return b } var b = ca.callbacks, d = {}; return { createCallback: function (c) { c = "_" + (b.$$counter++).toString(36); var e = "angular.callbacks." + c, f = a(c); d[e] = b[c] = f; return e }, wasCalled: function (a) { return d[a].called }, getResponse: function (a) { return d[a].data }, removeCallback: function (a) { delete b[d[a].id]; delete d[a] } } } }, uh = /^([^?#]*)(\?([^#]*))?(#(.*))?$/, Rg = { http: 80, https: 443, ftp: 21 }, kb = F("$location"),
        Sg = /^\s*[\\/]{2,}/, vh = {
            $$absUrl: "", $$html5: !1, $$replace: !1, $$compose: function () { for (var a = this.$$path, b = this.$$hash, d = Ce(this.$$search), b = b ? "#" + ic(b) : "", a = a.split("/"), c = a.length; c--;)a[c] = ic(a[c].replace(/%2F/g, "/")); this.$$url = a.join("/") + (d ? "?" + d : "") + b; this.$$absUrl = this.$$normalizeUrl(this.$$url); this.$$urlUpdatedByLocation = !0 }, absUrl: Mb("$$absUrl"), url: function (a) {
                if (A(a)) return this.$$url; var b = uh.exec(a); (b[1] || "" === a) && this.path(decodeURIComponent(b[1])); (b[2] || b[1] || "" === a) && this.search(b[3] ||
                    ""); this.hash(b[5] || ""); return this
            }, protocol: Mb("$$protocol"), host: Mb("$$host"), port: Mb("$$port"), path: Fd("$$path", function (a) { a = null !== a ? a.toString() : ""; return "/" === a.charAt(0) ? a : "/" + a }), search: function (a, b) {
                switch (arguments.length) { case 0: return this.$$search; case 1: if (C(a) || X(a)) a = a.toString(), this.$$search = hc(a); else if (D(a)) a = Ia(a, {}), r(a, function (b, c) { null == b && delete a[c] }), this.$$search = a; else throw kb("isrcharg"); break; default: A(b) || null === b ? delete this.$$search[a] : this.$$search[a] = b }this.$$compose();
                return this
            }, hash: Fd("$$hash", function (a) { return null !== a ? a.toString() : "" }), replace: function () { this.$$replace = !0; return this }
        }; r([Ed, Ac, zc], function (a) { a.prototype = Object.create(vh); a.prototype.state = function (b) { if (!arguments.length) return this.$$state; if (a !== zc || !this.$$html5) throw kb("nostate"); this.$$state = A(b) ? null : b; this.$$urlUpdatedByLocation = !0; return this } }); var Ya = F("$parse"), Wg = {}.constructor.prototype.valueOf, Vb = T(); r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "), function (a) {
            Vb[a] =
            !0
        }); var wh = { n: "\n", f: "\f", r: "\r", t: "\t", v: "\v", "'": "'", '"': '"' }, Ob = function (a) { this.options = a }; Ob.prototype = {
            constructor: Ob, lex: function (a) {
                this.text = a; this.index = 0; for (this.tokens = []; this.index < this.text.length;)if (a = this.text.charAt(this.index), '"' === a || "'" === a) this.readString(a); else if (this.isNumber(a) || "." === a && this.isNumber(this.peek())) this.readNumber(); else if (this.isIdentifierStart(this.peekMultichar())) this.readIdent(); else if (this.is(a, "(){}[].,;:?")) this.tokens.push({
                    index: this.index,
                    text: a
                }), this.index++; else if (this.isWhitespace(a)) this.index++; else { var b = a + this.peek(), d = b + this.peek(2), c = Vb[b], e = Vb[d]; Vb[a] || c || e ? (a = e ? d : c ? b : a, this.tokens.push({ index: this.index, text: a, operator: !0 }), this.index += a.length) : this.throwError("Unexpected next character ", this.index, this.index + 1) } return this.tokens
            }, is: function (a, b) { return -1 !== b.indexOf(a) }, peek: function (a) { a = a || 1; return this.index + a < this.text.length ? this.text.charAt(this.index + a) : !1 }, isNumber: function (a) {
                return "0" <= a && "9" >= a && "string" ===
                    typeof a
            }, isWhitespace: function (a) { return " " === a || "\r" === a || "\t" === a || "\n" === a || "\v" === a || "\u00a0" === 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 d = a.charCodeAt(0), c = b.charCodeAt(0); return 55296 <= d && 56319 >= d && 56320 <= c && 57343 >= c ? a + b : a }, isExpOperator: function (a) { return "-" === a || "+" === a || this.isNumber(a) }, throwError: function (a, b, d) {
                d = d || this.index; b =
                    w(b) ? "s " + b + "-" + this.index + " [" + this.text.substring(b, d) + "]" : " " + d; throw Ya("lexerr", a, b, this.text);
            }, readNumber: function () {
                for (var a = "", b = this.index; this.index < this.text.length;) { var d = K(this.text.charAt(this.index)); if ("." === d || this.isNumber(d)) a += d; else { var c = this.peek(); if ("e" === d && this.isExpOperator(c)) a += d; else if (this.isExpOperator(d) && c && this.isNumber(c) && "e" === a.charAt(a.length - 1)) a += d; else if (!this.isExpOperator(d) || c && this.isNumber(c) || "e" !== a.charAt(a.length - 1)) break; else this.throwError("Invalid exponent") } this.index++ } this.tokens.push({
                    index: b,
                    text: a, constant: !0, value: Number(a)
                })
            }, readIdent: function () { var a = this.index; for (this.index += this.peekMultichar().length; this.index < this.text.length;) { var b = this.peekMultichar(); if (!this.isIdentifierContinue(b)) break; this.index += b.length } this.tokens.push({ index: a, text: this.text.slice(a, this.index), identifier: !0 }) }, readString: function (a) {
                var b = this.index; this.index++; for (var d = "", c = a, e = !1; this.index < this.text.length;) {
                    var f = this.text.charAt(this.index), c = c + f; if (e) "u" === f ? (e = this.text.substring(this.index +
                        1, this.index + 5), e.match(/[\da-f]{4}/i) || this.throwError("Invalid unicode escape [\\u" + e + "]"), this.index += 4, d += String.fromCharCode(parseInt(e, 16))) : d += wh[f] || f, e = !1; else if ("\\" === f) e = !0; else { if (f === a) { this.index++; this.tokens.push({ index: b, text: c, constant: !0, value: d }); return } d += f } this.index++
                } this.throwError("Unterminated quote", b)
            }
        }; var q = function (a, b) { this.lexer = a; this.options = b }; q.Program = "Program"; q.ExpressionStatement = "ExpressionStatement"; q.AssignmentExpression = "AssignmentExpression"; q.ConditionalExpression =
            "ConditionalExpression"; q.LogicalExpression = "LogicalExpression"; q.BinaryExpression = "BinaryExpression"; q.UnaryExpression = "UnaryExpression"; q.CallExpression = "CallExpression"; q.MemberExpression = "MemberExpression"; q.Identifier = "Identifier"; q.Literal = "Literal"; q.ArrayExpression = "ArrayExpression"; q.Property = "Property"; q.ObjectExpression = "ObjectExpression"; q.ThisExpression = "ThisExpression"; q.LocalsExpression = "LocalsExpression"; q.NGValueParameter = "NGValueParameter"; q.prototype = {
                ast: function (a) {
                    this.text =
                    a; this.tokens = this.lexer.lex(a); a = this.program(); 0 !== this.tokens.length && this.throwError("is an unexpected token", this.tokens[0]); return a
                }, program: function () { for (var a = []; ;)if (0 < this.tokens.length && !this.peek("}", ")", ";", "]") && a.push(this.expressionStatement()), !this.expect(";")) return { type: q.Program, body: a } }, expressionStatement: function () { return { type: q.ExpressionStatement, expression: this.filterChain() } }, filterChain: function () { for (var a = this.expression(); this.expect("|");)a = this.filter(a); return a },
                expression: function () { return this.assignment() }, assignment: function () { var a = this.ternary(); if (this.expect("=")) { if (!Jd(a)) throw Ya("lval"); a = { type: q.AssignmentExpression, left: a, right: this.assignment(), operator: "=" } } return a }, ternary: function () { var a = this.logicalOR(), b, d; return this.expect("?") && (b = this.expression(), this.consume(":")) ? (d = this.expression(), { type: q.ConditionalExpression, test: a, alternate: b, consequent: d }) : a }, logicalOR: function () {
                    for (var a = this.logicalAND(); this.expect("||");)a = {
                        type: q.LogicalExpression,
                        operator: "||", left: a, right: this.logicalAND()
                    }; return a
                }, logicalAND: function () { for (var a = this.equality(); this.expect("&&");)a = { type: q.LogicalExpression, operator: "&&", left: a, right: this.equality() }; return a }, equality: function () { for (var a = this.relational(), b; b = this.expect("==", "!=", "===", "!==");)a = { type: q.BinaryExpression, operator: b.text, left: a, right: this.relational() }; return a }, relational: function () {
                    for (var a = this.additive(), b; b = this.expect("<", ">", "<=", ">=");)a = {
                        type: q.BinaryExpression, operator: b.text,
                        left: a, right: this.additive()
                    }; return a
                }, additive: function () { for (var a = this.multiplicative(), b; b = this.expect("+", "-");)a = { type: q.BinaryExpression, operator: b.text, left: a, right: this.multiplicative() }; return a }, multiplicative: function () { for (var a = this.unary(), b; b = this.expect("*", "/", "%");)a = { type: q.BinaryExpression, operator: b.text, left: a, right: this.unary() }; return a }, unary: function () { var a; return (a = this.expect("+", "-", "!")) ? { type: q.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 = Ia(this.selfReferential[this.consume().text]) : this.options.literals.hasOwnProperty(this.peek().text) ? a = { type: q.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: q.CallExpression, callee: a, arguments: this.parseArguments() }, this.consume(")")) : "[" === b.text ? (a = { type: q.MemberExpression, object: a, property: this.expression(), computed: !0 }, this.consume("]")) : "." === b.text ? a = { type: q.MemberExpression, object: a, property: this.identifier(), computed: !1 } : this.throwError("IMPOSSIBLE"); return a
                }, filter: function (a) {
                    a = [a]; for (var b = { type: q.CallExpression, callee: this.identifier(), arguments: a, filter: !0 }; this.expect(":");)a.push(this.expression());
                    return b
                }, parseArguments: function () { var a = []; if (")" !== this.peekToken().text) { do a.push(this.filterChain()); while (this.expect(",")) } return a }, identifier: function () { var a = this.consume(); a.identifier || this.throwError("is not a valid identifier", a); return { type: q.Identifier, name: a.text } }, constant: function () { return { type: q.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(",")) } this.consume("]");
                    return { type: q.ArrayExpression, elements: a }
                }, object: function () {
                    var a = [], b; if ("}" !== this.peekToken().text) {
                        do {
                            if (this.peek("}")) break; b = { type: q.Property, kind: "init" }; this.peek().constant ? (b.key = this.constant(), b.computed = !1, this.consume(":"), b.value = this.expression()) : this.peek().identifier ? (b.key = this.identifier(), b.computed = !1, this.peek(":") ? (this.consume(":"), b.value = this.expression()) : b.value = b.key) : this.peek("[") ? (this.consume("["), b.key = this.expression(), this.consume("]"), b.computed = !0, this.consume(":"),
                                b.value = this.expression()) : this.throwError("invalid key", this.peek()); a.push(b)
                        } while (this.expect(","))
                    } this.consume("}"); return { type: q.ObjectExpression, properties: a }
                }, throwError: function (a, b) { throw Ya("syntax", b.text, a, b.index + 1, this.text, this.text.substring(b.index)); }, consume: function (a) { if (0 === this.tokens.length) throw Ya("ueoe", this.text); var b = this.expect(a); b || this.throwError("is unexpected, expecting [" + a + "]", this.peek()); return b }, peekToken: function () {
                    if (0 === this.tokens.length) throw Ya("ueoe",
                        this.text); return this.tokens[0]
                }, peek: function (a, b, d, c) { return this.peekAhead(0, a, b, d, c) }, peekAhead: function (a, b, d, c, e) { if (this.tokens.length > a) { a = this.tokens[a]; var f = a.text; if (f === b || f === d || f === c || f === e || !(b || d || c || e)) return a } return !1 }, expect: function (a, b, d, c) { return (a = this.peek(a, b, d, c)) ? (this.tokens.shift(), a) : !1 }, selfReferential: { "this": { type: q.ThisExpression }, $locals: { type: q.LocalsExpression } }
            }; var Hd = 2; Ld.prototype = {
                compile: function (a) {
                    var b = this; this.state = {
                        nextId: 0, filters: {}, fn: {
                            vars: [],
                            body: [], own: {}
                        }, assign: { vars: [], body: [], own: {} }, inputs: []
                    }; Z(a, b.$filter); var d = "", c; this.stage = "assign"; if (c = Kd(a)) this.state.computing = "assign", d = this.nextId(), this.recurse(c, d), this.return_(d), d = "fn.assign=" + this.generateFunction("assign", "s,v,l"); c = Id(a.body); b.stage = "inputs"; r(c, function (a, c) { var d = "fn" + c; b.state[d] = { vars: [], body: [], own: {} }; b.state.computing = d; var k = b.nextId(); b.recurse(a, k); b.return_(k); b.state.inputs.push({ name: d, isPure: a.isPure }); a.watchId = c }); this.state.computing = "fn"; this.stage =
                        "main"; this.recurse(a); a = '"' + this.USE + " " + this.STRICT + '";\n' + this.filterPrefix() + "var fn=" + this.generateFunction("fn", "s,l,a,i") + d + this.watchFns() + "return fn;"; a = (new Function("$filter", "getStringValue", "ifDefined", "plus", a))(this.$filter, Tg, Ug, Gd); this.state = this.stage = void 0; return a
                }, USE: "use", STRICT: "strict", watchFns: function () {
                    var a = [], b = this.state.inputs, d = this; r(b, function (b) {
                        a.push("var " + b.name + "=" + d.generateFunction(b.name, "s")); b.isPure && a.push(b.name, ".isPure=" + JSON.stringify(b.isPure) +
                            ";")
                    }); b.length && a.push("fn.inputs=[" + b.map(function (a) { return a.name }).join(",") + "];"); return a.join("")
                }, generateFunction: function (a, b) { return "function(" + b + "){" + this.varsPrefix(a) + this.body(a) + "};" }, filterPrefix: function () { var a = [], b = this; r(this.state.filters, function (d, c) { a.push(d + "=$filter(" + b.escape(c) + ")") }); return 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, d, c, e, f) {
                    var g, k, h = this, l, m, p; c = c || E; if (!f && w(a.watchId)) b = b || this.nextId(), this.if_("i", this.lazyAssign(b, this.computedMember("i", a.watchId)), this.lazyRecurse(a, b, d, c, e, !0)); else switch (a.type) {
                        case q.Program: r(a.body, function (b, c) { h.recurse(b.expression, void 0, void 0, function (a) { k = a }); c !== a.body.length - 1 ? h.current().body.push(k, ";") : h.return_(k) }); break; case q.Literal: m = this.escape(a.value); this.assign(b, m); c(b || m); break; case q.UnaryExpression: this.recurse(a.argument, void 0,
                            void 0, function (a) { k = a }); m = a.operator + "(" + this.ifDefined(k, 0) + ")"; this.assign(b, m); c(m); break; case q.BinaryExpression: this.recurse(a.left, void 0, void 0, function (a) { g = a }); this.recurse(a.right, void 0, void 0, function (a) { k = a }); m = "+" === a.operator ? this.plus(g, k) : "-" === a.operator ? this.ifDefined(g, 0) + a.operator + this.ifDefined(k, 0) : "(" + g + ")" + a.operator + "(" + k + ")"; this.assign(b, m); c(m); break; case q.LogicalExpression: b = b || this.nextId(); h.recurse(a.left, b); h.if_("&&" === a.operator ? b : h.not(b), h.lazyRecurse(a.right,
                                b)); c(b); break; case q.ConditionalExpression: b = b || this.nextId(); h.recurse(a.test, b); h.if_(b, h.lazyRecurse(a.alternate, b), h.lazyRecurse(a.consequent, b)); c(b); break; case q.Identifier: b = b || this.nextId(); d && (d.context = "inputs" === h.stage ? "s" : this.assign(this.nextId(), this.getHasOwnProperty("l", a.name) + "?l:s"), d.computed = !1, d.name = a.name); h.if_("inputs" === h.stage || h.not(h.getHasOwnProperty("l", a.name)), function () {
                                    h.if_("inputs" === h.stage || "s", function () {
                                        e && 1 !== e && h.if_(h.isNull(h.nonComputedMember("s", a.name)),
                                            h.lazyAssign(h.nonComputedMember("s", a.name), "{}")); h.assign(b, h.nonComputedMember("s", a.name))
                                    })
                                }, b && h.lazyAssign(b, h.nonComputedMember("l", a.name))); c(b); break; case q.MemberExpression: g = d && (d.context = this.nextId()) || this.nextId(); b = b || this.nextId(); h.recurse(a.object, g, void 0, function () {
                                    h.if_(h.notNull(g), function () {
                                        a.computed ? (k = h.nextId(), h.recurse(a.property, k), h.getStringValue(k), e && 1 !== e && h.if_(h.not(h.computedMember(g, k)), h.lazyAssign(h.computedMember(g, k), "{}")), m = h.computedMember(g, k), h.assign(b,
                                            m), d && (d.computed = !0, d.name = k)) : (e && 1 !== e && h.if_(h.isNull(h.nonComputedMember(g, a.property.name)), h.lazyAssign(h.nonComputedMember(g, a.property.name), "{}")), m = h.nonComputedMember(g, a.property.name), h.assign(b, m), d && (d.computed = !1, d.name = a.property.name))
                                    }, function () { h.assign(b, "undefined") }); c(b)
                                }, !!e); break; case q.CallExpression: b = b || this.nextId(); a.filter ? (k = h.filter(a.callee.name), l = [], r(a.arguments, function (a) { var b = h.nextId(); h.recurse(a, b); l.push(b) }), m = k + "(" + l.join(",") + ")", h.assign(b, m), c(b)) :
                                    (k = h.nextId(), g = {}, l = [], h.recurse(a.callee, k, g, function () { h.if_(h.notNull(k), function () { r(a.arguments, function (b) { h.recurse(b, a.constant ? void 0 : h.nextId(), void 0, function (a) { l.push(a) }) }); m = g.name ? h.member(g.context, g.name, g.computed) + "(" + l.join(",") + ")" : k + "(" + l.join(",") + ")"; h.assign(b, m) }, function () { h.assign(b, "undefined") }); c(b) })); break; case q.AssignmentExpression: k = this.nextId(); g = {}; this.recurse(a.left, void 0, g, function () {
                                        h.if_(h.notNull(g.context), function () {
                                            h.recurse(a.right, k); m = h.member(g.context,
                                                g.name, g.computed) + a.operator + k; h.assign(b, m); c(b || m)
                                        })
                                    }, 1); break; case q.ArrayExpression: l = []; r(a.elements, function (b) { h.recurse(b, a.constant ? void 0 : h.nextId(), void 0, function (a) { l.push(a) }) }); m = "[" + l.join(",") + "]"; this.assign(b, m); c(b || m); break; case q.ObjectExpression: l = []; p = !1; r(a.properties, function (a) { a.computed && (p = !0) }); p ? (b = b || this.nextId(), this.assign(b, "{}"), r(a.properties, function (a) {
                                        a.computed ? (g = h.nextId(), h.recurse(a.key, g)) : g = a.key.type === q.Identifier ? a.key.name : "" + a.key.value; k = h.nextId();
                                        h.recurse(a.value, k); h.assign(h.member(b, g, a.computed), k)
                                    })) : (r(a.properties, function (b) { h.recurse(b.value, a.constant ? void 0 : h.nextId(), void 0, function (a) { l.push(h.escape(b.key.type === q.Identifier ? b.key.name : "" + b.key.value) + ":" + a) }) }), m = "{" + l.join(",") + "}", this.assign(b, m)); c(b || m); break; case q.ThisExpression: this.assign(b, "s"); c(b || "s"); break; case q.LocalsExpression: this.assign(b, "l"); c(b || "l"); break; case q.NGValueParameter: this.assign(b, "v"), c(b || "v")
                    }
                }, getHasOwnProperty: function (a, b) {
                    var d = a + "." +
                        b, c = this.current().own; c.hasOwnProperty(d) || (c[d] = this.nextId(!1, a + "&&(" + this.escape(b) + " in " + a + ")")); return c[d]
                }, assign: function (a, b) { if (a) return this.current().body.push(a, "=", b, ";"), a }, filter: function (a) { this.state.filters.hasOwnProperty(a) || (this.state.filters[a] = this.nextId(!0)); return 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, d) { if (!0 === a) b(); else { var c = this.current().body; c.push("if(", a, "){"); b(); c.push("}"); d && (c.push("else{"), d(), c.push("}")) } }, not: function (a) { return "!(" + a + ")" }, isNull: function (a) { return a + "==null" }, notNull: function (a) { return a + "!=null" }, nonComputedMember: function (a, b) { var d = /[^$_a-zA-Z0-9]/g; return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b) ? a + "." + b : a + '["' + b.replace(d, this.stringEscapeFn) + '"]' }, computedMember: function (a, b) { return a + "[" + b + "]" }, member: function (a, b, d) {
                        return d ? this.computedMember(a, b) : this.nonComputedMember(a,
                            b)
                    }, getStringValue: function (a) { this.assign(a, "getStringValue(" + a + ")") }, lazyRecurse: function (a, b, d, c, e, f) { var g = this; return function () { g.recurse(a, b, d, c, e, f) } }, lazyAssign: function (a, b) { var d = this; return function () { d.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 (C(a)) return "'" + a.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'"; if (X(a)) return a.toString(); if (!0 === a) return "true"; if (!1 ===
                            a) return "false"; if (null === a) return "null"; if ("undefined" === typeof a) return "undefined"; throw Ya("esc");
                    }, nextId: function (a, b) { var d = "v" + this.state.nextId++; a || this.current().vars.push(d + (b ? "=" + b : "")); return d }, current: function () { return this.state[this.state.computing] }
            }; Md.prototype = {
                compile: function (a) {
                    var b = this; Z(a, b.$filter); var d, c; if (d = Kd(a)) c = this.recurse(d); d = Id(a.body); var e; d && (e = [], r(d, function (a, c) { var d = b.recurse(a); d.isPure = a.isPure; a.input = d; e.push(d); a.watchId = c })); var f = []; r(a.body,
                        function (a) { f.push(b.recurse(a.expression)) }); a = 0 === a.body.length ? E : 1 === a.body.length ? f[0] : function (a, b) { var c; r(f, function (d) { c = d(a, b) }); return c }; c && (a.assign = function (a, b, d) { return c(a, d, b) }); e && (a.inputs = e); return a
                }, recurse: function (a, b, d) {
                    var c, e, f = this, g; if (a.input) return this.inputs(a.input, a.watchId); switch (a.type) {
                        case q.Literal: return this.value(a.value, b); case q.UnaryExpression: return e = this.recurse(a.argument), this["unary" + a.operator](e, b); case q.BinaryExpression: return c = this.recurse(a.left),
                            e = this.recurse(a.right), this["binary" + a.operator](c, e, b); case q.LogicalExpression: return c = this.recurse(a.left), e = this.recurse(a.right), this["binary" + a.operator](c, e, b); case q.ConditionalExpression: return this["ternary?:"](this.recurse(a.test), this.recurse(a.alternate), this.recurse(a.consequent), b); case q.Identifier: return f.identifier(a.name, b, d); case q.MemberExpression: return c = this.recurse(a.object, !1, !!d), a.computed || (e = a.property.name), a.computed && (e = this.recurse(a.property)), a.computed ? this.computedMember(c,
                                e, b, d) : this.nonComputedMember(c, e, b, d); case q.CallExpression: return g = [], r(a.arguments, function (a) { g.push(f.recurse(a)) }), a.filter && (e = this.$filter(a.callee.name)), a.filter || (e = this.recurse(a.callee, !0)), a.filter ? function (a, c, d, f) { for (var p = [], n = 0; n < g.length; ++n)p.push(g[n](a, c, d, f)); a = e.apply(void 0, p, f); return b ? { context: void 0, name: void 0, value: a } : a } : function (a, c, d, f) {
                                    var p = e(a, c, d, f), n; if (null != p.value) { n = []; for (var s = 0; s < g.length; ++s)n.push(g[s](a, c, d, f)); n = p.value.apply(p.context, n) } return b ?
                                        { value: n } : n
                                }; case q.AssignmentExpression: return c = this.recurse(a.left, !0, 1), e = this.recurse(a.right), function (a, d, f, g) { var p = c(a, d, f, g); a = e(a, d, f, g); p.context[p.name] = a; return b ? { value: a } : a }; case q.ArrayExpression: return g = [], r(a.elements, function (a) { g.push(f.recurse(a)) }), function (a, c, d, e) { for (var f = [], n = 0; n < g.length; ++n)f.push(g[n](a, c, d, e)); return b ? { value: f } : f }; case q.ObjectExpression: return g = [], r(a.properties, function (a) {
                                    a.computed ? g.push({ key: f.recurse(a.key), computed: !0, value: f.recurse(a.value) }) :
                                    g.push({ key: a.key.type === q.Identifier ? a.key.name : "" + a.key.value, computed: !1, value: f.recurse(a.value) })
                                }), function (a, c, d, e) { for (var f = {}, n = 0; n < g.length; ++n)g[n].computed ? f[g[n].key(a, c, d, e)] = g[n].value(a, c, d, e) : f[g[n].key] = g[n].value(a, c, d, e); return b ? { value: f } : f }; case q.ThisExpression: return function (a) { return b ? { value: a } : a }; case q.LocalsExpression: return function (a, c) { return b ? { value: c } : c }; case q.NGValueParameter: return function (a, c, d) { return b ? { value: d } : d }
                    }
                }, "unary+": function (a, b) {
                    return function (d,
                        c, e, f) { d = a(d, c, e, f); d = w(d) ? +d : 0; return b ? { value: d } : d }
                }, "unary-": function (a, b) { return function (d, c, e, f) { d = a(d, c, e, f); d = w(d) ? -d : -0; return b ? { value: d } : d } }, "unary!": function (a, b) { return function (d, c, e, f) { d = !a(d, c, e, f); return b ? { value: d } : d } }, "binary+": function (a, b, d) { return function (c, e, f, g) { var k = a(c, e, f, g); c = b(c, e, f, g); k = Gd(k, c); return d ? { value: k } : k } }, "binary-": function (a, b, d) { return function (c, e, f, g) { var k = a(c, e, f, g); c = b(c, e, f, g); k = (w(k) ? k : 0) - (w(c) ? c : 0); return d ? { value: k } : k } }, "binary*": function (a, b,
                    d) { return function (c, e, f, g) { c = a(c, e, f, g) * b(c, e, f, g); return d ? { value: c } : c } }, "binary/": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) / b(c, e, f, g); return d ? { value: c } : c } }, "binary%": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) % b(c, e, f, g); return d ? { value: c } : c } }, "binary===": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) === b(c, e, f, g); return d ? { value: c } : c } }, "binary!==": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) !== b(c, e, f, g); return d ? { value: c } : c } }, "binary==": function (a, b, d) {
                        return function (c,
                            e, f, g) { c = a(c, e, f, g) == b(c, e, f, g); return d ? { value: c } : c }
                    }, "binary!=": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) != b(c, e, f, g); return d ? { value: c } : c } }, "binary<": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) < b(c, e, f, g); return d ? { value: c } : c } }, "binary>": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) > b(c, e, f, g); return d ? { value: c } : c } }, "binary<=": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) <= b(c, e, f, g); return d ? { value: c } : c } }, "binary>=": function (a, b, d) {
                        return function (c, e, f, g) {
                            c =
                            a(c, e, f, g) >= b(c, e, f, g); return d ? { value: c } : c
                        }
                    }, "binary&&": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) && b(c, e, f, g); return d ? { value: c } : c } }, "binary||": function (a, b, d) { return function (c, e, f, g) { c = a(c, e, f, g) || b(c, e, f, g); return d ? { value: c } : c } }, "ternary?:": function (a, b, d, c) { return function (e, f, g, k) { e = a(e, f, g, k) ? b(e, f, g, k) : d(e, f, g, k); return c ? { value: e } : e } }, value: function (a, b) { return function () { return b ? { context: void 0, name: void 0, value: a } : a } }, identifier: function (a, b, d) {
                        return function (c, e, f, g) {
                            c =
                            e && a in e ? e : c; d && 1 !== d && c && null == c[a] && (c[a] = {}); e = c ? c[a] : void 0; return b ? { context: c, name: a, value: e } : e
                        }
                    }, computedMember: function (a, b, d, c) { return function (e, f, g, k) { var h = a(e, f, g, k), l, m; null != h && (l = b(e, f, g, k), l += "", c && 1 !== c && h && !h[l] && (h[l] = {}), m = h[l]); return d ? { context: h, name: l, value: m } : m } }, nonComputedMember: function (a, b, d, c) { return function (e, f, g, k) { e = a(e, f, g, k); c && 1 !== c && e && null == e[b] && (e[b] = {}); f = null != e ? e[b] : void 0; return d ? { context: e, name: b, value: f } : f } }, inputs: function (a, b) {
                        return function (d,
                            c, e, f) { return f ? f[b] : a(d, c, e) }
                    }
            }; Nb.prototype = {
                constructor: Nb, parse: function (a) { a = this.getAst(a); var b = this.astCompiler.compile(a.ast), d = a.ast; b.literal = 0 === d.body.length || 1 === d.body.length && (d.body[0].expression.type === q.Literal || d.body[0].expression.type === q.ArrayExpression || d.body[0].expression.type === q.ObjectExpression); b.constant = a.ast.constant; b.oneTime = a.oneTime; return b }, getAst: function (a) {
                    var b = !1; a = a.trim(); ":" === a.charAt(0) && ":" === a.charAt(1) && (b = !0, a = a.substring(2)); return {
                        ast: this.ast.ast(a),
                        oneTime: b
                    }
                }
            }; var Ea = F("$sce"), W = { HTML: "html", CSS: "css", MEDIA_URL: "mediaUrl", URL: "url", RESOURCE_URL: "resourceUrl", JS: "js" }, Dc = /_([a-z])/g, Zg = F("$templateRequest"), $g = F("$timeout"), aa = z.document.createElement("a"), Qd = ga(z.location.href), Na; aa.href = "http://[::1]"; var ah = "[::1]" === aa.hostname; Rd.$inject = ["$document"]; fd.$inject = ["$provide"]; var Yd = 22, Xd = ".", Fc = "0"; Sd.$inject = ["$locale"]; Ud.$inject = ["$locale"]; var lh = {
                yyyy: ea("FullYear", 4, 0, !1, !0), yy: ea("FullYear", 2, 0, !0, !0), y: ea("FullYear", 1, 0, !1, !0),
                MMMM: lb("Month"), MMM: lb("Month", !0), MM: ea("Month", 2, 1), M: ea("Month", 1, 1), LLLL: lb("Month", !1, !0), dd: ea("Date", 2), d: ea("Date", 1), HH: ea("Hours", 2), H: ea("Hours", 1), hh: ea("Hours", 2, -12), h: ea("Hours", 1, -12), mm: ea("Minutes", 2), m: ea("Minutes", 1), ss: ea("Seconds", 2), s: ea("Seconds", 1), sss: ea("Milliseconds", 3), EEEE: lb("Day"), EEE: lb("Day", !0), a: function (a, b) { return 12 > a.getHours() ? b.AMPMS[0] : b.AMPMS[1] }, Z: function (a, b, d) { a = -1 * d; return a = (0 <= a ? "+" : "") + (Pb(Math[0 < a ? "floor" : "ceil"](a / 60), 2) + Pb(Math.abs(a % 60), 2)) },
                ww: $d(2), w: $d(1), G: Gc, GG: Gc, GGG: Gc, GGGG: function (a, b) { return 0 >= a.getFullYear() ? b.ERANAMES[0] : b.ERANAMES[1] }
            }, kh = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/, jh = /^-?\d+$/; Td.$inject = ["$locale"]; var eh = ia(K), fh = ia(vb); Vd.$inject = ["$parse"]; var Re = ia({
                restrict: "E", compile: function (a, b) {
                    if (!b.href && !b.xlinkHref) return function (a, b) {
                        if ("a" === b[0].nodeName.toLowerCase()) {
                            var e = "[object SVGAnimatedString]" === la.call(b.prop("href")) ? "xlink:href" : "href";
                            b.on("click", function (a) { b.attr(e) || a.preventDefault() })
                        }
                    }
                }
            }), wb = {}; r(Hb, function (a, b) { function d(a, d, e) { a.$watch(e[c], function (a) { e.$set(b, !!a) }) } if ("multiple" !== a) { var c = xa("ng-" + b), e = d; "checked" === a && (e = function (a, b, e) { e.ngModel !== e[c] && d(a, b, e) }); wb[c] = function () { return { restrict: "A", priority: 100, link: e } } } }); r(vd, function (a, b) {
                wb[b] = function () {
                    return {
                        priority: 100, link: function (a, c, e) {
                            if ("ngPattern" === b && "/" === e.ngPattern.charAt(0) && (c = e.ngPattern.match(ke))) {
                                e.$set("ngPattern", new RegExp(c[1],
                                    c[2])); return
                            } a.$watch(e[b], function (a) { e.$set(b, a) })
                        }
                    }
                }
            }); r(["src", "srcset", "href"], function (a) { var b = xa("ng-" + a); wb[b] = ["$sce", function (d) { return { priority: 99, link: function (c, e, f) { var g = a, k = a; "href" === a && "[object SVGAnimatedString]" === la.call(e.prop("href")) && (k = "xlinkHref", f.$attr[k] = "xlink:href", g = null); f.$set(b, d.getTrustedMediaUrl(f[b])); f.$observe(b, function (b) { b ? (f.$set(k, b), wa && g && e.prop(g, f[k])) : "href" === a && f.$set(k, null) }) } } }] }); var mb = {
                $addControl: E, $getControls: ia([]), $$renameControl: function (a,
                    b) { a.$name = b }, $removeControl: E, $setValidity: E, $setDirty: E, $setPristine: E, $setSubmitted: E, $$setSubmitted: E
            }; Qb.$inject = ["$element", "$attrs", "$scope", "$animate", "$interpolate"]; Qb.prototype = {
                $rollbackViewValue: function () { r(this.$$controls, function (a) { a.$rollbackViewValue() }) }, $commitViewValue: function () { r(this.$$controls, function (a) { a.$commitViewValue() }) }, $addControl: function (a) { Ja(a.$name, "input"); this.$$controls.push(a); a.$name && (this[a.$name] = a); a.$$parentForm = this }, $getControls: function () { return ja(this.$$controls) },
                $$renameControl: function (a, b) { var d = a.$name; this[d] === a && delete this[d]; this[b] = a; a.$name = b }, $removeControl: function (a) { a.$name && this[a.$name] === a && delete this[a.$name]; r(this.$pending, function (b, d) { this.$setValidity(d, null, a) }, this); r(this.$error, function (b, d) { this.$setValidity(d, null, a) }, this); r(this.$$success, function (b, d) { this.$setValidity(d, null, a) }, this); cb(this.$$controls, a); a.$$parentForm = mb }, $setDirty: function () {
                    this.$$animate.removeClass(this.$$element, Za); this.$$animate.addClass(this.$$element,
                        Wb); this.$dirty = !0; this.$pristine = !1; this.$$parentForm.$setDirty()
                }, $setPristine: function () { this.$$animate.setClass(this.$$element, Za, Wb + " ng-submitted"); this.$dirty = !1; this.$pristine = !0; this.$submitted = !1; r(this.$$controls, function (a) { a.$setPristine() }) }, $setUntouched: function () { r(this.$$controls, function (a) { a.$setUntouched() }) }, $setSubmitted: function () { for (var a = this; a.$$parentForm && a.$$parentForm !== mb;)a = a.$$parentForm; a.$$setSubmitted() }, $$setSubmitted: function () {
                    this.$$animate.addClass(this.$$element,
                        "ng-submitted"); this.$submitted = !0; r(this.$$controls, function (a) { a.$$setSubmitted && a.$$setSubmitted() })
                }
            }; ce({ clazz: Qb, set: function (a, b, d) { var c = a[b]; c ? -1 === c.indexOf(d) && c.push(d) : a[b] = [d] }, unset: function (a, b, d) { var c = a[b]; c && (cb(c, d), 0 === c.length && delete a[b]) } }); var oe = function (a) {
                return ["$timeout", "$parse", function (b, d) {
                    function c(a) { return "" === a ? d('this[""]').assign : d(a).assign || E } return {
                        name: "form", restrict: a ? "EAC" : "E", require: ["form", "^^?form"], controller: Qb, compile: function (d, f) {
                            d.addClass(Za).addClass(nb);
                            var g = f.name ? "name" : a && f.ngForm ? "ngForm" : !1; return {
                                pre: function (a, d, e, f) {
                                    var p = f[0]; if (!("action" in e)) { var n = function (b) { a.$apply(function () { p.$commitViewValue(); p.$setSubmitted() }); b.preventDefault() }; d[0].addEventListener("submit", n); d.on("$destroy", function () { b(function () { d[0].removeEventListener("submit", n) }, 0, !1) }) } (f[1] || p.$$parentForm).$addControl(p); var s = g ? c(p.$name) : E; g && (s(a, p), e.$observe(g, function (b) { p.$name !== b && (s(a, void 0), p.$$parentForm.$$renameControl(p, b), s = c(p.$name), s(a, p)) }));
                                    d.on("$destroy", function () { p.$$parentForm.$removeControl(p); s(a, void 0); S(p, mb) })
                                }
                            }
                        }
                    }
                }]
            }, Se = oe(), df = oe(!0), mh = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/, xh = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i, yh = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,
                nh = /^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/, pe = /^(\d{4,})-(\d{2})-(\d{2})$/, qe = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, Oc = /^(\d{4,})-W(\d\d)$/, re = /^(\d{4,})-(\d\d)$/, se = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, ee = T(); r(["date", "datetime-local", "month", "time", "week"], function (a) { ee[a] = !0 }); var te = {
                    text: function (a, b, d, c, e, f) { Sa(a, b, d, c, e, f); Ic(c) }, date: ob("date", pe, Rb(pe, ["yyyy", "MM", "dd"]), "yyyy-MM-dd"), "datetime-local": ob("datetimelocal", qe, Rb(qe, "yyyy MM dd HH mm ss sss".split(" ")),
                        "yyyy-MM-ddTHH:mm:ss.sss"), time: ob("time", se, Rb(se, ["HH", "mm", "ss", "sss"]), "HH:mm:ss.sss"), week: ob("week", Oc, function (a, b) { if (ha(a)) return a; if (C(a)) { Oc.lastIndex = 0; var d = Oc.exec(a); if (d) { var c = +d[1], e = +d[2], f = d = 0, g = 0, k = 0, h = Zd(c), e = 7 * (e - 1); b && (d = b.getHours(), f = b.getMinutes(), g = b.getSeconds(), k = b.getMilliseconds()); return new Date(c, 0, h.getDate() + e, d, f, g, k) } } return NaN }, "yyyy-Www"), month: ob("month", re, Rb(re, ["yyyy", "MM"]), "yyyy-MM"), number: function (a, b, d, c, e, f, g, k) {
                            Jc(a, b, d, c, "number"); fe(c); Sa(a,
                                b, d, c, e, f); var h; if (w(d.min) || d.ngMin) { var l = d.min || k(d.ngMin)(a); h = na(l); c.$validators.min = function (a, b) { return c.$isEmpty(b) || A(h) || b >= h }; d.$observe("min", function (a) { a !== l && (h = na(a), l = a, c.$validate()) }) } if (w(d.max) || d.ngMax) { var m = d.max || k(d.ngMax)(a), p = na(m); c.$validators.max = function (a, b) { return c.$isEmpty(b) || A(p) || b <= p }; d.$observe("max", function (a) { a !== m && (p = na(a), m = a, c.$validate()) }) } if (w(d.step) || d.ngStep) {
                                    var n = d.step || k(d.ngStep)(a), s = na(n); c.$validators.step = function (a, b) {
                                        return c.$isEmpty(b) ||
                                            A(s) || ge(b, h || 0, s)
                                    }; d.$observe("step", function (a) { a !== n && (s = na(a), n = a, c.$validate()) })
                                }
                        }, url: function (a, b, d, c, e, f) { Sa(a, b, d, c, e, f); Ic(c); c.$validators.url = function (a, b) { var d = a || b; return c.$isEmpty(d) || xh.test(d) } }, email: function (a, b, d, c, e, f) { Sa(a, b, d, c, e, f); Ic(c); c.$validators.email = function (a, b) { var d = a || b; return c.$isEmpty(d) || yh.test(d) } }, radio: function (a, b, d, c) {
                            var e = !d.ngTrim || "false" !== V(d.ngTrim); A(d.name) && b.attr("name", ++qb); b.on("change", function (a) {
                                var g; b[0].checked && (g = d.value, e && (g =
                                    V(g)), c.$setViewValue(g, a && a.type))
                            }); c.$render = function () { var a = d.value; e && (a = V(a)); b[0].checked = a === c.$viewValue }; d.$observe("value", c.$render)
                        }, range: function (a, b, d, c, e, f) {
                            function g(a, c) { b.attr(a, d[a]); var e = d[a]; d.$observe(a, function (a) { a !== e && (e = a, c(a)) }) } function k(a) { p = na(a); Y(c.$modelValue) || (m ? (a = b.val(), p > a && (a = p, b.val(a)), c.$setViewValue(a)) : c.$validate()) } function h(a) { n = na(a); Y(c.$modelValue) || (m ? (a = b.val(), n < a && (b.val(n), a = n < p ? p : n), c.$setViewValue(a)) : c.$validate()) } function l(a) {
                                s =
                                na(a); Y(c.$modelValue) || (m ? c.$viewValue !== b.val() && c.$setViewValue(b.val()) : c.$validate())
                            } Jc(a, b, d, c, "range"); fe(c); Sa(a, b, d, c, e, f); var m = c.$$hasNativeValidators && "range" === b[0].type, p = m ? 0 : void 0, n = m ? 100 : void 0, s = m ? 1 : void 0, r = b[0].validity; a = w(d.min); e = w(d.max); f = w(d.step); var q = c.$render; c.$render = m && w(r.rangeUnderflow) && w(r.rangeOverflow) ? function () { q(); c.$setViewValue(b.val()) } : q; a && (p = na(d.min), c.$validators.min = m ? function () { return !0 } : function (a, b) { return c.$isEmpty(b) || A(p) || b >= p }, g("min", k));
                            e && (n = na(d.max), c.$validators.max = m ? function () { return !0 } : function (a, b) { return c.$isEmpty(b) || A(n) || b <= n }, g("max", h)); f && (s = na(d.step), c.$validators.step = m ? function () { return !r.stepMismatch } : function (a, b) { return c.$isEmpty(b) || A(s) || ge(b, p || 0, s) }, g("step", l))
                        }, checkbox: function (a, b, d, c, e, f, g, k) {
                            var h = he(k, a, "ngTrueValue", d.ngTrueValue, !0), l = he(k, a, "ngFalseValue", d.ngFalseValue, !1); b.on("change", function (a) { c.$setViewValue(b[0].checked, a && a.type) }); c.$render = function () { b[0].checked = c.$viewValue }; c.$isEmpty =
                                function (a) { return !1 === a }; c.$formatters.push(function (a) { return va(a, h) }); c.$parsers.push(function (a) { return a ? h : l })
                        }, hidden: E, button: E, submit: E, reset: E, file: E
                }, $c = ["$browser", "$sniffer", "$filter", "$parse", function (a, b, d, c) { return { restrict: "E", require: ["?ngModel"], link: { pre: function (e, f, g, k) { k[0] && (te[K(g.type)] || te.text)(e, f, g, k[0], b, a, d, c) } } } }], Af = function () {
                    var a = { configurable: !0, enumerable: !1, get: function () { return this.getAttribute("value") || "" }, set: function (a) { this.setAttribute("value", a) } };
                    return { restrict: "E", priority: 200, compile: function (b, d) { if ("hidden" === K(d.type)) return { pre: function (b, d, f, g) { b = d[0]; b.parentNode && b.parentNode.insertBefore(b, b.nextSibling); Object.defineProperty && Object.defineProperty(b, "value", a) } } } }
                }, zh = /^(true|false|\d+)$/, xf = function () {
                    function a(a, d, c) { var e = w(c) ? c : 9 === wa ? "" : null; a.prop("value", e); d.$set("value", c) } return {
                        restrict: "A", priority: 100, compile: function (b, d) {
                            return zh.test(d.ngValue) ? function (b, d, f) { b = b.$eval(f.ngValue); a(d, f, b) } : function (b, d, f) {
                                b.$watch(f.ngValue,
                                    function (b) { a(d, f, b) })
                            }
                        }
                    }
                }, We = ["$compile", function (a) { return { restrict: "AC", compile: function (b) { a.$$addBindingClass(b); return function (b, c, e) { a.$$addBindingInfo(c, e.ngBind); c = c[0]; b.$watch(e.ngBind, function (a) { c.textContent = jc(a) }) } } } }], Ye = ["$interpolate", "$compile", function (a, b) { return { compile: function (d) { b.$$addBindingClass(d); return function (c, d, f) { c = a(d.attr(f.$attr.ngBindTemplate)); b.$$addBindingInfo(d, c.expressions); d = d[0]; f.$observe("ngBindTemplate", function (a) { d.textContent = A(a) ? "" : a }) } } } }],
                    Xe = ["$sce", "$parse", "$compile", function (a, b, d) { return { restrict: "A", compile: function (c, e) { var f = b(e.ngBindHtml), g = b(e.ngBindHtml, function (b) { return a.valueOf(b) }); d.$$addBindingClass(c); return function (b, c, e) { d.$$addBindingInfo(c, e.ngBindHtml); b.$watch(g, function () { var d = f(b); c.html(a.getTrustedHtml(d) || "") }) } } } }], wf = ia({ restrict: "A", require: "ngModel", link: function (a, b, d, c) { c.$viewChangeListeners.push(function () { a.$eval(d.ngChange) }) } }), Ze = Lc("", !0), af = Lc("Odd", 0), $e = Lc("Even", 1), bf = Ra({
                        compile: function (a,
                            b) { b.$set("ngCloak", void 0); a.removeClass("ng-cloak") }
                    }), cf = [function () { return { restrict: "A", scope: !0, controller: "@", priority: 500 } }], ed = {}, Ah = { blur: !0, focus: !0 }; r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), function (a) { var b = xa("ng-" + a); ed[b] = ["$parse", "$rootScope", "$exceptionHandler", function (d, c, e) { return sd(d, c, e, b, a, Ah[a]) }] }); var ff = ["$animate", "$compile", function (a, b) {
                        return {
                            multiElement: !0,
                            transclude: "element", priority: 600, terminal: !0, restrict: "A", $$tlb: !0, link: function (d, c, e, f, g) { var k, h, l; d.$watch(e.ngIf, function (d) { d ? h || g(function (d, f) { h = f; d[d.length++] = b.$$createComment("end ngIf", e.ngIf); k = { clone: d }; a.enter(d, c.parent(), c) }) : (l && (l.remove(), l = null), h && (h.$destroy(), h = null), k && (l = ub(k.clone), a.leave(l).done(function (a) { !1 !== a && (l = null) }), k = null)) }) }
                        }
                    }], gf = ["$templateRequest", "$anchorScroll", "$animate", function (a, b, d) {
                        return {
                            restrict: "ECA", priority: 400, terminal: !0, transclude: "element",
                            controller: ca.noop, compile: function (c, e) {
                                var f = e.ngInclude || e.src, g = e.onload || "", k = e.autoscroll; return function (c, e, m, p, n) {
                                    var r = 0, q, t, x, v = function () { t && (t.remove(), t = null); q && (q.$destroy(), q = null); x && (d.leave(x).done(function (a) { !1 !== a && (t = null) }), t = x, x = null) }; c.$watch(f, function (f) {
                                        var m = function (a) { !1 === a || !w(k) || k && !c.$eval(k) || b() }, t = ++r; f ? (a(f, !0).then(function (a) {
                                            if (!c.$$destroyed && t === r) {
                                                var b = c.$new(); p.template = a; a = n(b, function (a) { v(); d.enter(a, null, e).done(m) }); q = b; x = a; q.$emit("$includeContentLoaded",
                                                    f); c.$eval(g)
                                            }
                                        }, function () { c.$$destroyed || t !== r || (v(), c.$emit("$includeContentError", f)) }), c.$emit("$includeContentRequested", f)) : (v(), p.template = null)
                                    })
                                }
                            }
                        }
                    }], zf = ["$compile", function (a) { return { restrict: "ECA", priority: -400, require: "ngInclude", link: function (b, d, c, e) { la.call(d[0]).match(/SVG/) ? (d.empty(), a(gd(e.template, z.document).childNodes)(b, function (a) { d.append(a) }, { futureParentElement: d })) : (d.html(e.template), a(d.contents())(b)) } } }], hf = Ra({
                        priority: 450, compile: function () {
                            return {
                                pre: function (a,
                                    b, d) { a.$eval(d.ngInit) }
                            }
                        }
                    }), vf = function () { return { restrict: "A", priority: 100, require: "ngModel", link: function (a, b, d, c) { var e = d.ngList || ", ", f = "false" !== d.ngTrim, g = f ? V(e) : e; c.$parsers.push(function (a) { if (!A(a)) { var b = []; a && r(a.split(g), function (a) { a && b.push(f ? V(a) : a) }); return b } }); c.$formatters.push(function (a) { if (H(a)) return a.join(e) }); c.$isEmpty = function (a) { return !a || !a.length } } } }, nb = "ng-valid", be = "ng-invalid", Za = "ng-pristine", Wb = "ng-dirty", pb = F("ngModel"); Sb.$inject = "$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");
    Sb.prototype = {
        $$initGetterSetters: function () { if (this.$options.getOption("getterSetter")) { var a = this.$$parse(this.$$attr.ngModel + "()"), b = this.$$parse(this.$$attr.ngModel + "($$$p)"); this.$$ngModelGet = function (b) { var c = this.$$parsedNgModel(b); B(c) && (c = a(b)); return c }; this.$$ngModelSet = function (a, c) { B(this.$$parsedNgModel(a)) ? b(a, { $$$p: c }) : this.$$parsedNgModelAssign(a, c) } } else if (!this.$$parsedNgModel.assign) throw pb("nonassign", this.$$attr.ngModel, Aa(this.$$element)); }, $render: E, $isEmpty: function (a) {
            return A(a) ||
                "" === a || null === a || a !== a
        }, $$updateEmptyClasses: function (a) { this.$isEmpty(a) ? (this.$$animate.removeClass(this.$$element, "ng-not-empty"), this.$$animate.addClass(this.$$element, "ng-empty")) : (this.$$animate.removeClass(this.$$element, "ng-empty"), this.$$animate.addClass(this.$$element, "ng-not-empty")) }, $setPristine: function () { this.$dirty = !1; this.$pristine = !0; this.$$animate.removeClass(this.$$element, Wb); this.$$animate.addClass(this.$$element, Za) }, $setDirty: function () {
            this.$dirty = !0; this.$pristine = !1; this.$$animate.removeClass(this.$$element,
                Za); this.$$animate.addClass(this.$$element, Wb); this.$$parentForm.$setDirty()
        }, $setUntouched: function () { this.$touched = !1; this.$untouched = !0; this.$$animate.setClass(this.$$element, "ng-untouched", "ng-touched") }, $setTouched: function () { this.$touched = !0; this.$untouched = !1; this.$$animate.setClass(this.$$element, "ng-touched", "ng-untouched") }, $rollbackViewValue: function () { this.$$timeout.cancel(this.$$pendingDebounce); this.$viewValue = this.$$lastCommittedViewValue; this.$render() }, $validate: function () {
            if (!Y(this.$modelValue)) {
                var a =
                    this.$$lastCommittedViewValue, b = this.$$rawModelValue, d = this.$valid, c = this.$modelValue, e = this.$options.getOption("allowInvalid"), f = this; this.$$runValidators(b, a, function (a) { e || d === a || (f.$modelValue = a ? b : void 0, f.$modelValue !== c && f.$$writeModelToScope()) })
            }
        }, $$runValidators: function (a, b, d) {
            function c() { var c = !0; r(h.$validators, function (d, e) { var g = Boolean(d(a, b)); c = c && g; f(e, g) }); return c ? !0 : (r(h.$asyncValidators, function (a, b) { f(b, null) }), !1) } function e() {
                var c = [], d = !0; r(h.$asyncValidators, function (e,
                    g) { var h = e(a, b); if (!h || !B(h.then)) throw pb("nopromise", h); f(g, void 0); c.push(h.then(function () { f(g, !0) }, function () { d = !1; f(g, !1) })) }); c.length ? h.$$q.all(c).then(function () { g(d) }, E) : g(!0)
            } function f(a, b) { k === h.$$currentValidationRunId && h.$setValidity(a, b) } function g(a) { k === h.$$currentValidationRunId && d(a) } this.$$currentValidationRunId++; var k = this.$$currentValidationRunId, h = this; (function () {
                var a = h.$$parserName; if (A(h.$$parserValid)) f(a, null); else return h.$$parserValid || (r(h.$validators, function (a,
                    b) { f(b, null) }), r(h.$asyncValidators, function (a, b) { f(b, null) })), f(a, h.$$parserValid), h.$$parserValid; return !0
            })() ? c() ? e() : g(!1) : g(!1)
        }, $commitViewValue: function () { var a = this.$viewValue; this.$$timeout.cancel(this.$$pendingDebounce); if (this.$$lastCommittedViewValue !== a || "" === a && this.$$hasNativeValidators) this.$$updateEmptyClasses(a), this.$$lastCommittedViewValue = a, this.$pristine && this.$setDirty(), this.$$parseAndValidate() }, $$parseAndValidate: function () {
            var a = this.$$lastCommittedViewValue, b = this; this.$$parserValid =
                A(a) ? void 0 : !0; this.$setValidity(this.$$parserName, null); this.$$parserName = "parse"; if (this.$$parserValid) for (var d = 0; d < this.$parsers.length; d++)if (a = this.$parsers[d](a), A(a)) { this.$$parserValid = !1; break } Y(this.$modelValue) && (this.$modelValue = this.$$ngModelGet(this.$$scope)); var c = this.$modelValue, e = this.$options.getOption("allowInvalid"); this.$$rawModelValue = a; e && (this.$modelValue = a, b.$modelValue !== c && b.$$writeModelToScope()); this.$$runValidators(a, this.$$lastCommittedViewValue, function (d) {
                    e || (b.$modelValue =
                        d ? a : void 0, b.$modelValue !== c && b.$$writeModelToScope())
                })
        }, $$writeModelToScope: function () { this.$$ngModelSet(this.$$scope, this.$modelValue); r(this.$viewChangeListeners, function (a) { try { a() } catch (b) { this.$$exceptionHandler(b) } }, this) }, $setViewValue: function (a, b) { this.$viewValue = a; this.$options.getOption("updateOnDefault") && this.$$debounceViewValueCommit(b) }, $$debounceViewValueCommit: function (a) {
            var b = this.$options.getOption("debounce"); X(b[a]) ? b = b[a] : X(b["default"]) && -1 === this.$options.getOption("updateOn").indexOf(a) ?
                b = b["default"] : X(b["*"]) && (b = b["*"]); this.$$timeout.cancel(this.$$pendingDebounce); var d = this; 0 < b ? this.$$pendingDebounce = this.$$timeout(function () { d.$commitViewValue() }, b) : this.$$rootScope.$$phase ? this.$commitViewValue() : this.$$scope.$apply(function () { d.$commitViewValue() })
        }, $overrideModelOptions: function (a) { this.$options = this.$options.createChild(a); this.$$setUpdateOnEvents() }, $processModelValue: function () {
            var a = this.$$format(); this.$viewValue !== a && (this.$$updateEmptyClasses(a), this.$viewValue = this.$$lastCommittedViewValue =
                a, this.$render(), this.$$runValidators(this.$modelValue, this.$viewValue, E))
        }, $$format: function () { for (var a = this.$formatters, b = a.length, d = this.$modelValue; b--;)d = a[b](d); return d }, $$setModelValue: function (a) { this.$modelValue = this.$$rawModelValue = a; this.$$parserValid = void 0; this.$processModelValue() }, $$setUpdateOnEvents: function () {
            this.$$updateEvents && this.$$element.off(this.$$updateEvents, this.$$updateEventHandler); if (this.$$updateEvents = this.$options.getOption("updateOn")) this.$$element.on(this.$$updateEvents,
                this.$$updateEventHandler)
        }, $$updateEventHandler: function (a) { this.$$debounceViewValueCommit(a && a.type) }
    }; ce({ clazz: Sb, set: function (a, b) { a[b] = !0 }, unset: function (a, b) { delete a[b] } }); var uf = ["$rootScope", function (a) {
        return {
            restrict: "A", require: ["ngModel", "^?form", "^?ngModelOptions"], controller: Sb, priority: 1, compile: function (b) {
                b.addClass(Za).addClass("ng-untouched").addClass(nb); return {
                    pre: function (a, b, e, f) {
                        var g = f[0]; b = f[1] || g.$$parentForm; if (f = f[2]) g.$options = f.$options; g.$$initGetterSetters(); b.$addControl(g);
                        e.$observe("name", function (a) { g.$name !== a && g.$$parentForm.$$renameControl(g, a) }); a.$on("$destroy", function () { g.$$parentForm.$removeControl(g) })
                    }, post: function (b, c, e, f) { function g() { k.$setTouched() } var k = f[0]; k.$$setUpdateOnEvents(); c.on("blur", function () { k.$touched || (a.$$phase ? b.$evalAsync(g) : b.$apply(g)) }) }
                }
            }
        }
    }], Tb, Bh = /(\s+|^)default(\s+|$)/; Mc.prototype = {
        getOption: function (a) { return this.$$options[a] }, createChild: function (a) {
            var b = !1; a = S({}, a); r(a, function (d, c) {
                "$inherit" === d ? "*" === c ? b = !0 : (a[c] =
                    this.$$options[c], "updateOn" === c && (a.updateOnDefault = this.$$options.updateOnDefault)) : "updateOn" === c && (a.updateOnDefault = !1, a[c] = V(d.replace(Bh, function () { a.updateOnDefault = !0; return " " })))
            }, this); b && (delete a["*"], ie(a, this.$$options)); ie(a, Tb.$$options); return new Mc(a)
        }
    }; Tb = new Mc({ updateOn: "", updateOnDefault: !0, debounce: 0, getterSetter: !1, allowInvalid: !1, timezone: null }); var yf = function () {
        function a(a, d) { this.$$attrs = a; this.$$scope = d } a.$inject = ["$attrs", "$scope"]; a.prototype = {
            $onInit: function () {
                var a =
                    this.parentCtrl ? this.parentCtrl.$options : Tb, d = this.$$scope.$eval(this.$$attrs.ngModelOptions); this.$options = a.createChild(d)
            }
        }; return { restrict: "A", priority: 10, require: { parentCtrl: "?^^ngModelOptions" }, bindToController: !0, controller: a }
    }, jf = Ra({ terminal: !0, priority: 1E3 }), Ch = F("ngOptions"), Dh = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
        sf = ["$compile", "$document", "$parse", function (a, b, d) {
            function c(a, b, c) {
                function e(a, b, c, d, f) { this.selectValue = a; this.viewValue = b; this.label = c; this.group = d; this.disabled = f } function f(a) { var b; if (!r && za(a)) b = a; else { b = []; for (var c in a) a.hasOwnProperty(c) && "$" !== c.charAt(0) && b.push(c) } return b } var p = a.match(Dh); if (!p) throw Ch("iexp", a, Aa(b)); var n = p[5] || p[7], r = p[6]; a = / as /.test(p[0]) && p[1]; var q = p[9]; b = d(p[2] ? p[1] : n); var t = a && d(a) || b, w = q && d(q), v = q ? function (a, b) { return w(c, b) } : function (a) { return La(a) },
                    x = function (a, b) { return v(a, B(a, b)) }, A = d(p[2] || p[1]), y = d(p[3] || ""), J = d(p[4] || ""), I = d(p[8]), z = {}, B = r ? function (a, b) { z[r] = b; z[n] = a; return z } : function (a) { z[n] = a; return z }; return {
                        trackBy: q, getTrackByValue: x, getWatchables: d(I, function (a) { var b = []; a = a || []; for (var d = f(a), e = d.length, g = 0; g < e; g++) { var k = a === d ? g : d[g], l = a[k], k = B(l, k), l = v(l, k); b.push(l); if (p[2] || p[1]) l = A(c, k), b.push(l); p[4] && (k = J(c, k), b.push(k)) } return b }), getOptions: function () {
                            for (var a = [], b = {}, d = I(c) || [], g = f(d), k = g.length, n = 0; n < k; n++) {
                                var p = d ===
                                    g ? n : g[n], r = B(d[p], p), s = t(c, r), p = v(s, r), w = A(c, r), z = y(c, r), r = J(c, r), s = new e(p, s, w, z, r); a.push(s); b[p] = s
                            } return { items: a, selectValueMap: b, getOptionFromViewValue: function (a) { return b[x(a)] }, getViewValueFromOption: function (a) { return q ? Ia(a.viewValue) : a.viewValue } }
                        }
                    }
            } var e = z.document.createElement("option"), f = z.document.createElement("optgroup"); return {
                restrict: "A", terminal: !0, require: ["select", "ngModel"], link: {
                    pre: function (a, b, c, d) { d[0].registerOption = E }, post: function (d, k, h, l) {
                        function m(a) {
                            var b = (a = v.getOptionFromViewValue(a)) &&
                                a.element; b && !b.selected && (b.selected = !0); return a
                        } function p(a, b) { a.element = b; b.disabled = a.disabled; a.label !== b.label && (b.label = a.label, b.textContent = a.label); b.value = a.selectValue } var n = l[0], q = l[1], A = h.multiple; l = 0; for (var t = k.children(), z = t.length; l < z; l++)if ("" === t[l].value) { n.hasEmptyOption = !0; n.emptyOption = t.eq(l); break } k.empty(); l = !!n.emptyOption; x(e.cloneNode(!1)).val("?"); var v, B = c(h.ngOptions, k, d), C = b[0].createDocumentFragment(); n.generateUnknownOptionValue = function (a) { return "?" }; A ? (n.writeValue =
                            function (a) { if (v) { var b = a && a.map(m) || []; v.items.forEach(function (a) { a.element.selected && -1 === Array.prototype.indexOf.call(b, a) && (a.element.selected = !1) }) } }, n.readValue = function () { var a = k.val() || [], b = []; r(a, function (a) { (a = v.selectValueMap[a]) && !a.disabled && b.push(v.getViewValueFromOption(a)) }); return b }, B.trackBy && d.$watchCollection(function () { if (H(q.$viewValue)) return q.$viewValue.map(function (a) { return B.getTrackByValue(a) }) }, function () { q.$render() })) : (n.writeValue = function (a) {
                                if (v) {
                                    var b = k[0].options[k[0].selectedIndex],
                                    c = v.getOptionFromViewValue(a); b && b.removeAttribute("selected"); c ? (k[0].value !== c.selectValue && (n.removeUnknownOption(), k[0].value = c.selectValue, c.element.selected = !0), c.element.setAttribute("selected", "selected")) : n.selectUnknownOrEmptyOption(a)
                                }
                            }, n.readValue = function () { var a = v.selectValueMap[k.val()]; return a && !a.disabled ? (n.unselectEmptyOption(), n.removeUnknownOption(), v.getViewValueFromOption(a)) : null }, B.trackBy && d.$watch(function () { return B.getTrackByValue(q.$viewValue) }, function () { q.$render() }));
                        l && (a(n.emptyOption)(d), k.prepend(n.emptyOption), 8 === n.emptyOption[0].nodeType ? (n.hasEmptyOption = !1, n.registerOption = function (a, b) { "" === b.val() && (n.hasEmptyOption = !0, n.emptyOption = b, n.emptyOption.removeClass("ng-scope"), q.$render(), b.on("$destroy", function () { var a = n.$isEmptyOptionSelected(); n.hasEmptyOption = !1; n.emptyOption = void 0; a && q.$render() })) }) : n.emptyOption.removeClass("ng-scope")); d.$watchCollection(B.getWatchables, function () {
                            var a = v && n.readValue(); if (v) for (var b = v.items.length - 1; 0 <= b; b--) {
                                var c =
                                    v.items[b]; w(c.group) ? Gb(c.element.parentNode) : Gb(c.element)
                            } v = B.getOptions(); var d = {}; v.items.forEach(function (a) { var b; if (w(a.group)) { b = d[a.group]; b || (b = f.cloneNode(!1), C.appendChild(b), b.label = null === a.group ? "null" : a.group, d[a.group] = b); var c = e.cloneNode(!1); b.appendChild(c); p(a, c) } else b = e.cloneNode(!1), C.appendChild(b), p(a, b) }); k[0].appendChild(C); q.$render(); q.$isEmpty(a) || (b = n.readValue(), (B.trackBy || A ? va(a, b) : a === b) || (q.$setViewValue(b), q.$render()))
                        })
                    }
                }
            }
        }], kf = ["$locale", "$interpolate", "$log",
            function (a, b, d) {
                var c = /{}/g, e = /^when(Minus)?(.+)$/; return {
                    link: function (f, g, k) {
                        function h(a) { g.text(a || "") } var l = k.count, m = k.$attr.when && g.attr(k.$attr.when), p = k.offset || 0, n = f.$eval(m) || {}, q = {}, w = b.startSymbol(), t = b.endSymbol(), x = w + l + "-" + p + t, v = ca.noop, z; r(k, function (a, b) { var c = e.exec(b); c && (c = (c[1] ? "-" : "") + K(c[2]), n[c] = g.attr(k.$attr[b])) }); r(n, function (a, d) { q[d] = b(a.replace(c, x)) }); f.$watch(l, function (b) {
                            var c = parseFloat(b), e = Y(c); e || c in n || (c = a.pluralCat(c - p)); c === z || e && Y(z) || (v(), e = q[c], A(e) ?
                                (null != b && d.debug("ngPluralize: no rule defined for '" + c + "' in " + m), v = E, h()) : v = f.$watch(e, h), z = c)
                        })
                    }
                }
            }], ue = F("ngRef"), lf = ["$parse", function (a) {
                return {
                    priority: -1, restrict: "A", compile: function (b, d) {
                        var c = xa(ua(b)), e = a(d.ngRef), f = e.assign || function () { throw ue("nonassign", d.ngRef); }; return function (a, b, h) {
                            var l; if (h.hasOwnProperty("ngRefRead")) if ("$element" === h.ngRefRead) l = b; else { if (l = b.data("$" + h.ngRefRead + "Controller"), !l) throw ue("noctrl", h.ngRefRead, d.ngRef); } else l = b.data("$" + c + "Controller"); l =
                                l || b; f(a, l); b.on("$destroy", function () { e(a) === l && f(a, null) })
                        }
                    }
                }
            }], mf = ["$parse", "$animate", "$compile", function (a, b, d) {
                var c = F("ngRepeat"), e = 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 === (b & 1)) }, f = function (a, b, c) { return La(c) }, g = function (a, b) { return b }; return {
                    restrict: "A", multiElement: !0, transclude: "element", priority: 1E3, terminal: !0, $$tlb: !0, compile: function (k, h) {
                        var l = h.ngRepeat, m = d.$$createComment("end ngRepeat",
                            l), p = l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); if (!p) throw c("iexp", l); var n = p[1], q = p[2], w = p[3], t = p[4], p = n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/); if (!p) throw c("iidexp", n); var x = p[3] || p[1], v = p[2]; if (w && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w) || /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w))) throw c("badident", w); var A; if (t) {
                                var z = { $id: La }, y = a(t); A = function (a, b, c, d) {
                                    v &&
                                    (z[v] = b); z[x] = c; z.$index = d; return y(a, z)
                                }
                            } return function (a, d, h, k, n) {
                                var p = T(); a.$watchCollection(q, function (h) {
                                    var k, q, t = d[0], s, y = T(), B, C, E, D, H, F, K; w && (a[w] = h); if (za(h)) H = h, q = A || f; else for (K in q = A || g, H = [], h) ta.call(h, K) && "$" !== K.charAt(0) && H.push(K); B = H.length; K = Array(B); for (k = 0; k < B; k++)if (C = h === H ? k : H[k], E = h[C], D = q(a, C, E, k), p[D]) F = p[D], delete p[D], y[D] = F, K[k] = F; else { if (y[D]) throw r(K, function (a) { a && a.scope && (p[a.id] = a) }), c("dupes", l, D, E); K[k] = { id: D, scope: void 0, clone: void 0 }; y[D] = !0 } z && (z[x] = void 0);
                                    for (s in p) { F = p[s]; D = ub(F.clone); b.leave(D); if (D[0].parentNode) for (k = 0, q = D.length; k < q; k++)D[k].$$NG_REMOVED = !0; F.scope.$destroy() } for (k = 0; k < B; k++)if (C = h === H ? k : H[k], E = h[C], F = K[k], F.scope) { s = t; do s = s.nextSibling; while (s && s.$$NG_REMOVED); F.clone[0] !== s && b.move(ub(F.clone), null, t); t = F.clone[F.clone.length - 1]; e(F.scope, k, x, E, v, C, B) } else n(function (a, c) { F.scope = c; var d = m.cloneNode(!1); a[a.length++] = d; b.enter(a, null, t); t = d; F.clone = a; y[F.id] = F; e(F.scope, k, x, E, v, C, B) }); p = y
                                })
                            }
                    }
                }
            }], nf = ["$animate", function (a) {
                return {
                    restrict: "A",
                    multiElement: !0, link: function (b, d, c) { b.$watch(c.ngShow, function (b) { a[b ? "removeClass" : "addClass"](d, "ng-hide", { tempClasses: "ng-hide-animate" }) }) }
                }
            }], ef = ["$animate", function (a) { return { restrict: "A", multiElement: !0, link: function (b, d, c) { b.$watch(c.ngHide, function (b) { a[b ? "addClass" : "removeClass"](d, "ng-hide", { tempClasses: "ng-hide-animate" }) }) } } }], of = Ra(function (a, b, d) { a.$watchCollection(d.ngStyle, function (a, d) { d && a !== d && r(d, function (a, c) { b.css(c, "") }); a && b.css(a) }) }), pf = ["$animate", "$compile", function (a,
                b) {
                    return {
                        require: "ngSwitch", controller: ["$scope", function () { this.cases = {} }], link: function (d, c, e, f) {
                            var g = [], k = [], h = [], l = [], m = function (a, b) { return function (c) { !1 !== c && a.splice(b, 1) } }; d.$watch(e.ngSwitch || e.on, function (c) {
                                for (var d, e; h.length;)a.cancel(h.pop()); d = 0; for (e = l.length; d < e; ++d) { var q = ub(k[d].clone); l[d].$destroy(); (h[d] = a.leave(q)).done(m(h, d)) } k.length = 0; l.length = 0; (g = f.cases["!" + c] || f.cases["?"]) && r(g, function (c) {
                                    c.transclude(function (d, e) {
                                        l.push(e); var f = c.element; d[d.length++] = b.$$createComment("end ngSwitchWhen");
                                        k.push({ clone: d }); a.enter(d, f.parent(), f)
                                    })
                                })
                            })
                        }
                    }
            }], qf = Ra({ transclude: "element", priority: 1200, require: "^ngSwitch", multiElement: !0, link: function (a, b, d, c, e) { a = d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function (a, b, c) { return c[b - 1] !== a }); r(a, function (a) { c.cases["!" + a] = c.cases["!" + a] || []; c.cases["!" + a].push({ transclude: e, element: b }) }) } }), rf = Ra({
                transclude: "element", priority: 1200, require: "^ngSwitch", multiElement: !0, link: function (a, b, d, c, e) {
                    c.cases["?"] = c.cases["?"] || []; c.cases["?"].push({
                        transclude: e,
                        element: b
                    })
                }
            }), Eh = F("ngTransclude"), tf = ["$compile", function (a) {
                return {
                    restrict: "EAC", compile: function (b) {
                        var d = a(b.contents()); b.empty(); return function (a, b, f, g, k) {
                            function h() { d(a, function (a) { b.append(a) }) } if (!k) throw Eh("orphan", Aa(b)); f.ngTransclude === f.$attr.ngTransclude && (f.ngTransclude = ""); f = f.ngTransclude || f.ngTranscludeSlot; k(function (a, c) { var d; if (d = a.length) a: { d = 0; for (var f = a.length; d < f; d++) { var g = a[d]; if (g.nodeType !== Pa || g.nodeValue.trim()) { d = !0; break a } } d = void 0 } d ? b.append(a) : (h(), c.$destroy()) },
                                null, f); f && !k.isSlotFilled(f) && h()
                        }
                    }
                }
            }], Te = ["$templateCache", function (a) { return { restrict: "E", terminal: !0, compile: function (b, d) { "text/ng-template" === d.type && a.put(d.id, b[0].text) } } }], Fh = { $setViewValue: E, $render: E }, Gh = ["$element", "$scope", function (a, b) {
                function d() { g || (g = !0, b.$$postDigest(function () { g = !1; e.ngModelCtrl.$render() })) } function c(a) { k || (k = !0, b.$$postDigest(function () { b.$$destroyed || (k = !1, e.ngModelCtrl.$setViewValue(e.readValue()), a && e.ngModelCtrl.$render()) })) } var e = this, f = new Ib; e.selectValueMap =
                    {}; e.ngModelCtrl = Fh; e.multiple = !1; e.unknownOption = x(z.document.createElement("option")); e.hasEmptyOption = !1; e.emptyOption = void 0; e.renderUnknownOption = function (b) { b = e.generateUnknownOptionValue(b); e.unknownOption.val(b); a.prepend(e.unknownOption); Oa(e.unknownOption, !0); a.val(b) }; e.updateUnknownOption = function (b) { b = e.generateUnknownOptionValue(b); e.unknownOption.val(b); Oa(e.unknownOption, !0); a.val(b) }; e.generateUnknownOptionValue = function (a) { return "? " + La(a) + " ?" }; e.removeUnknownOption = function () {
                        e.unknownOption.parent() &&
                        e.unknownOption.remove()
                    }; e.selectEmptyOption = function () { e.emptyOption && (a.val(""), Oa(e.emptyOption, !0)) }; e.unselectEmptyOption = function () { e.hasEmptyOption && Oa(e.emptyOption, !1) }; b.$on("$destroy", function () { e.renderUnknownOption = E }); e.readValue = function () { var b = a.val(), b = b in e.selectValueMap ? e.selectValueMap[b] : b; return e.hasOption(b) ? b : null }; e.writeValue = function (b) {
                        var c = a[0].options[a[0].selectedIndex]; c && Oa(x(c), !1); e.hasOption(b) ? (e.removeUnknownOption(), c = La(b), a.val(c in e.selectValueMap ?
                            c : b), Oa(x(a[0].options[a[0].selectedIndex]), !0)) : e.selectUnknownOrEmptyOption(b)
                    }; e.addOption = function (a, b) { if (8 !== b[0].nodeType) { Ja(a, '"option value"'); "" === a && (e.hasEmptyOption = !0, e.emptyOption = b); var c = f.get(a) || 0; f.set(a, c + 1); d() } }; e.removeOption = function (a) { var b = f.get(a); b && (1 === b ? (f.delete(a), "" === a && (e.hasEmptyOption = !1, e.emptyOption = void 0)) : f.set(a, b - 1)) }; e.hasOption = function (a) { return !!f.get(a) }; e.$hasEmptyOption = function () { return e.hasEmptyOption }; e.$isUnknownOptionSelected = function () {
                        return a[0].options[0] ===
                            e.unknownOption[0]
                    }; e.$isEmptyOptionSelected = function () { return e.hasEmptyOption && a[0].options[a[0].selectedIndex] === e.emptyOption[0] }; e.selectUnknownOrEmptyOption = function (a) { null == a && e.emptyOption ? (e.removeUnknownOption(), e.selectEmptyOption()) : e.unknownOption.parent().length ? e.updateUnknownOption(a) : e.renderUnknownOption(a) }; var g = !1, k = !1; e.registerOption = function (a, b, f, g, k) {
                        if (f.$attr.ngValue) {
                            var q, r; f.$observe("value", function (a) {
                                var d, f = b.prop("selected"); w(r) && (e.removeOption(q), delete e.selectValueMap[r],
                                    d = !0); r = La(a); q = a; e.selectValueMap[r] = a; e.addOption(a, b); b.attr("value", r); d && f && c()
                            })
                        } else g ? f.$observe("value", function (a) { e.readValue(); var d, f = b.prop("selected"); w(q) && (e.removeOption(q), d = !0); q = a; e.addOption(a, b); d && f && c() }) : k ? a.$watch(k, function (a, d) { f.$set("value", a); var g = b.prop("selected"); d !== a && e.removeOption(d); e.addOption(a, b); d && g && c() }) : e.addOption(f.value, b); f.$observe("disabled", function (a) { if ("true" === a || a && b.prop("selected")) e.multiple ? c(!0) : (e.ngModelCtrl.$setViewValue(null), e.ngModelCtrl.$render()) });
                        b.on("$destroy", function () { var a = e.readValue(), b = f.value; e.removeOption(b); d(); (e.multiple && a && -1 !== a.indexOf(b) || a === b) && c(!0) })
                    }
            }], Ue = function () {
                return {
                    restrict: "E", require: ["select", "?ngModel"], controller: Gh, priority: 1, link: {
                        pre: function (a, b, d, c) {
                            var e = c[0], f = c[1]; if (f) {
                                if (e.ngModelCtrl = f, b.on("change", function () { e.removeUnknownOption(); a.$apply(function () { f.$setViewValue(e.readValue()) }) }), d.multiple) {
                                    e.multiple = !0; e.readValue = function () {
                                        var a = []; r(b.find("option"), function (b) {
                                            b.selected && !b.disabled &&
                                            (b = b.value, a.push(b in e.selectValueMap ? e.selectValueMap[b] : b))
                                        }); return a
                                    }; e.writeValue = function (a) { r(b.find("option"), function (b) { var c = !!a && (-1 !== Array.prototype.indexOf.call(a, b.value) || -1 !== Array.prototype.indexOf.call(a, e.selectValueMap[b.value])); c !== b.selected && Oa(x(b), c) }) }; var g, k = NaN; a.$watch(function () { k !== f.$viewValue || va(g, f.$viewValue) || (g = ja(f.$viewValue), f.$render()); k = f.$viewValue }); f.$isEmpty = function (a) { return !a || 0 === a.length }
                                }
                            } else e.registerOption = E
                        }, post: function (a, b, d, c) {
                            var e =
                                c[1]; if (e) { var f = c[0]; e.$render = function () { f.writeValue(e.$viewValue) } }
                        }
                    }
                }
            }, Ve = ["$interpolate", function (a) { return { restrict: "E", priority: 100, compile: function (b, d) { var c, e; w(d.ngValue) || (w(d.value) ? c = a(d.value, !0) : (e = a(b.text(), !0)) || d.$set("value", b.text())); return function (a, b, d) { var h = b.parent(); (h = h.data("$selectController") || h.parent().data("$selectController")) && h.registerOption(a, b, d, c, e) } } } }], bd = ["$parse", function (a) {
                return {
                    restrict: "A", require: "?ngModel", link: function (b, d, c, e) {
                        if (e) {
                            var f =
                                c.hasOwnProperty("required") || a(c.ngRequired)(b); c.ngRequired || (c.required = !0); e.$validators.required = function (a, b) { return !f || !e.$isEmpty(b) }; c.$observe("required", function (a) { f !== a && (f = a, e.$validate()) })
                        }
                    }
                }
            }], ad = ["$parse", function (a) {
                return {
                    restrict: "A", require: "?ngModel", compile: function (b, d) {
                        var c, e; d.ngPattern && (c = d.ngPattern, e = "/" === d.ngPattern.charAt(0) && ke.test(d.ngPattern) ? function () { return d.ngPattern } : a(d.ngPattern)); return function (a, b, d, h) {
                            if (h) {
                                var l = d.pattern; d.ngPattern ? l = e(a) : c = d.pattern;
                                var m = je(l, c, b); d.$observe("pattern", function (a) { var d = m; m = je(a, c, b); (d && d.toString()) !== (m && m.toString()) && h.$validate() }); h.$validators.pattern = function (a, b) { return h.$isEmpty(b) || A(m) || m.test(b) }
                            }
                        }
                    }
                }
            }], dd = ["$parse", function (a) { return { restrict: "A", require: "?ngModel", link: function (b, d, c, e) { if (e) { var f = c.maxlength || a(c.ngMaxlength)(b), g = Ub(f); c.$observe("maxlength", function (a) { f !== a && (g = Ub(a), f = a, e.$validate()) }); e.$validators.maxlength = function (a, b) { return 0 > g || e.$isEmpty(b) || b.length <= g } } } } }], cd =
            ["$parse", function (a) { return { restrict: "A", require: "?ngModel", link: function (b, d, c, e) { if (e) { var f = c.minlength || a(c.ngMinlength)(b), g = Ub(f) || -1; c.$observe("minlength", function (a) { f !== a && (g = Ub(a) || -1, f = a, e.$validate()) }); e.$validators.minlength = function (a, b) { return e.$isEmpty(b) || b.length >= g } } } } }]; z.angular.bootstrap ? z.console && console.log("WARNING: Tried to load AngularJS more than once.") : (Je(), Oe(ca), ca.module("ngLocale", [], ["$provide", function (a) {
                function b(a) {
                    a += ""; var b = a.indexOf("."); return -1 ==
                        b ? 0 : a.length - b - 1
                } a.value("$locale", {
                    DATETIME_FORMATS: {
                        AMPMS: ["AM", "PM"], DAY: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), ERANAMES: ["Before Christ", "Anno Domini"], ERAS: ["BC", "AD"], FIRSTDAYOFWEEK: 6, MONTH: "January February March April May June July August September October November December".split(" "), SHORTDAY: "Sun Mon Tue Wed Thu Fri Sat".split(" "), SHORTMONTH: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), STANDALONEMONTH: "January February March April May June July August September October November December".split(" "),
                        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: "-\u00a4", negSuf: "", posPre: "\u00a4", posSuf: "" }] }, id: "en-us", localeID: "en_US", pluralCat: function (a,
                        c) { var e = a | 0, f = c; void 0 === f && (f = Math.min(b(a), 3)); Math.pow(10, f); return 1 == e && 0 == f ? "one" : "other" }
                })
            }]), x(function () { Ee(z.document, Wc) }))
})(window); !window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element("<style>").text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}'));
//# sourceMappingURL=angular.min.js.map
//var app = angular.module('myApp', ['ngAnimate']);
var app = angular.module('myApp', ['ui.bootstrap']).config(['$compileProvider', function ($compileProvider) {
    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|javascript|data):/);

     
}]);

//app.directive('date', function (dateFilter) {
//    var link = function (scope, element, attrs) {
//        var modelName = attrs['date'];

//        $(element).on('change', function () {
//            scope[modelName] = new Date(2020, 12, 29);
//            alert(new Date(2020, 12, 29))
//            scope.$applyAsync();
//        });
//    };
//    return {
//        require: 'ngModel',
//        restrict: 'A',
//        link: link
//    }
//});

app.directive('ngTarget', function () {
    return function (scope, element, attrs) {
        if (attrs.ngTarget=="A")
            element.attr("target", "_blank");
        else
            element.attr("target", "_self");
    };
});

app.directive('uploadFiles', function () {
    return {
        scope: true,        //create a new scope  
        link: function (scope, el, attrs) {
            el.bind('change', function (event) {
                var files = event.target.files;
                //iterate files since 'multiple' may be specified on the element  
                for (var i = 0; i < files.length; i++) {
                    //emit event upward  
                    scope.$emit("seletedFile", { file: files[i] });
                }
            });
        }
    };
});

app.directive('repeatDone', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('onetime');
            });
        }
    };
});
app.directive('repeatAnnouncementDone', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('AnnouncementDone');
            });
        }
    };
});

app.directive('repeatDoneHideLoader', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('HideLoader');
            });
        }
    };
});

app.filter('customSplitString', function () {
    return function (input) {
        var arr = "";
        if (input!=null && input.length > 0)
        var arr = input.split(',');
        return arr;
    };
});
//app.directive('datepick', function ($timeout) {
//    return function (scope) {
//        if (scope.$last) {
//            $timeout(function () {
//                scope.$emit('datepick');
//            });
//        }
//    };
//});
app.directive('findBodyHeight', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('findBodyHeightRun');
            });
        }
    };
});
app.directive('tagsInput', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('tagsInputRun');
            });
        }
    };
});
app.directive('menurepeatDone', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('menurepeatDoneResponsive');
            });
        }
    };
});
app.directive('footerResponsive', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('footerResponsiveList');
            });
        }
    };
});

app.directive('yearpick', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('yearpick');
            });
        }
    };
});

app.directive('datePicker', function () {
    var link = function (scope, element, attrs) {
        var modelName = attrs['datePicker'];
        //var actualDate = new Date();
        //var newDate = new Date(actualDate.getFullYear(), actualDate.getMonth(), actualDate.getDate() - 0);
        $(element).datepicker({
            format: 'dd-M-yyyy'
        });
        //,
        //minDate: newDate
        $(element).on('change', function () {

            scope[modelName] = $(this).val();

            scope.$applyAsync();
        });
    };
    return {
        require: 'ngModel',
        restrict: 'A',
        link: link
    }
});

app.directive('timePicker', function () {
    var link = function (scope, element, attrs) {
        var modelName = attrs['timePicker'];
        $(element).timepicker();
        $(element).on('change', function () {
            scope[modelName] = $(this).val();
            scope.$apply();
        });
    };
    return {
        require: 'ngModel',
        restrict: 'A',
        link: link
    }
});

app.directive('accordion', function () {
    return function (scope) {
        if (scope.$last) {
            setTimeout(function () {
                scope.$emit('accordianRepeatdone');
            });
        }
    };
});

app.directive('pagging', function () {
    var link = function (scope, element, attrs) {
        var modelName = attrs['pagging'];
        $(element).on('click', function () {
            var begin = ((scope[modelName] - 1) * scope.numPerPage)
            , end = begin + scope.numPerPage;
            var modelsname = modelName.replace('CurrentPage', '');
            scope.$applyAsync(function () {
                scope[modelsname] = scope.ToDoListItems.slice(begin, end);
            });
        });
    };
    return {
        require: 'ngModel',
        restrict: 'A',
        link: link
    }
});

app.directive('repeatDoneContentApproval', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit(scope.hideLoader());
            });
        }
    };
});

app.directive('repeatDoneYouMayBeInterestedIn', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('InterestedSlider');
            });
        }
    };
});
app.directive('repeatDoneStoriesIn', function ($timeout) {
    return function (scope) {
        if (scope.$last) {
            $timeout(function () {
                scope.$emit('StoriesSlider');
            });
        }
    };
});


app.directive('focusMe', function ($timeout) {
    return {
        scope: { trigger: '@focusMe' },
        link: function (scope, element) {
            scope.$watch('trigger', function (value) {
                if (value === "true") {
                    // console.log('trigger',value);
                    $timeout(function () {
                        element[0].focus();
                    });
                }
            });
        }
    };
});
//Alumni A-Z listing Filter
app.filter('startsWithLetter', function () {
    return function (items, letter) {

        var filtered = [];
        var letterMatch = new RegExp(letter, 'i');
        for (var i = 0; i < items.length; i++) {
            var item = items[i];
            //FullName is search field of database
            if (letterMatch.test(item.FullName.substring(0, letter.length > 1 ? letter.length : 1))) {
                filtered.push(item);
            }
        }
        return filtered;
    };
});

app.directive('numberOnly', function () {
    var link = function (scope, element, attrs, modelCtrl) {
        $(element).on('keyup', function () {
            modelCtrl.$setViewValue($(this).val().replace(/[^0-9\.]/g, ''));
            modelCtrl.$render();
        });
    };
    return {
        require: 'ngModel',
        restrict: 'A',
        link: link
    }
});
app.controller('myController', function ($scope, $element, $sce, $timeout, $interval, $filter, myService, $http, $q) {

    $scope.UnitTitle = "";
    $scope.UnitLogoPath = "";
    $scope.NavModules = [];
    $scope.NavMenus = [];
    $scope.NavSubMenus = [];
    $scope.SearchDiv = true;
    $scope.RefUnitName = "";

    var UnitId = window.location.pathname.split('_')[1];

    $scope.disableDelete = true;
    $scope.disablePrint = true;
    $scope.alert = "";

    var userid = sessionStorage.getItem("userid");
    var usertypeid = sessionStorage.getItem("usertype");
    var username = sessionStorage.getItem("username");

    $scope.validateEmail = function (value, alertid) {
        $scope.alert = "";
        $('#' + alertid).attr('style', 'display:block;float:left;padding-top:10px;');

        //var filter = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
        var filter = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
        // var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
        if (value == "" || filter.test(value)) {
            return value;
        }
        else {
            $scope.alert = "Email-Id not in correct format.";
            $timeout(function () {
                $('#' + alertid).attr('style', 'display:none;');
            }, 1000)
            return "";
        }
    }

    $scope.validatePhoneNo = function (value, alertid) {
        $scope.alert = "";
        $('#' + alertid).attr('style', 'display:block;float:left;padding-top:10px;');
        var filter = /^[0-9]+$/;
        if (value == "" || filter.test(value)) {
            if (value == "" || value.length == 10) {
                return value;
            }
            else {
                $scope.alert = "Contact number must be 10 digits!";
                $timeout(function () {
                    $('#' + alertid).attr('style', 'display:none;');
                }, 1000)
                return "";
            }
        }
        else {
            $scope.alert = "Contact number must be 10 digits!";
            $timeout(function () {
                $('#' + alertid).attr('style', 'display:none;');
            }, 1000)
            return "";
        }
    }

    $scope.GetDashBoardUrl = function () {
        $scope.UserName = username;
        var collectionobj = {};
        collectionobj.UserTypeId = usertype;
        collectionobj.UserId = userid;
        var getData = myService.methode('POST', "/DashBoard/GetDashBoardUrl", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            if (usertype == "1") {
                $scope.NavModules = response.data.Table;
                $scope.NavMenus = response.data.Table1;
                $scope.NavSubMenus = response.data.Table2;
            }
            else {
                $scope.NavModules = response.data.Table
                $scope.NavModules = $filter('filter')($scope.NavModules, { 'ischk': 1 });
                $scope.NavMenus = $filter('filter')(response.data.Table1, { 'ischk': 1 });
                $scope.NavSubMenus = $filter('filter')(response.data.Table2, { 'ischk': 1 });
            }
        });
    };

    String.prototype.replaceAt = function (index, replacement) {
        return this.substr(0, index) + replacement + this.substr(index + replacement.length);
    }

    $scope.SwitchtoTab = function (id, nextid, descid1, descid2) {
        var currenttab = $(id);
        currenttab.addClass('resp-tab-active')
        var nexttab = $(nextid);
        nexttab.removeClass('resp-tab-active')

        var currentdiv = $(descid1);
        currentdiv.addClass('resp-tab-content-active')
        currentdiv.show();
        var nextdiv = $(descid2);
        nextdiv.removeClass('resp-tab-content-active')
        nextdiv.hide();
    }

    
    $scope.ContactUsPage = true;
    $scope.ChangeLanguage = function () {

        var absuri = window.location.href;
        if (absuri.split('/').length > 5) {
            var ids = absuri.split('/')[5];
            var lan = ids.split('_')[0];
            var UnitId = ids.split('_')[1];

            var host = '../' + absuri.split('/')[4]

            if (lan == "1") {
                $scope.Language = "हिंदी संस्करण";
                $scope.Alumni = "We the BHU people";
                $scope.ContactUs = "Contact Us";
                host = host + '/' + ids.replaceAt(0, "2");
                $scope.URL = $sce.trustAsHtml(host)
                $scope.$applyAsync();
            }
            else if (lan == "2") {
                $scope.Language = 'English Version';
                $scope.Alumni = "हम बीएचयू के लोग";
                $scope.ContactUs = "संपर्क करें";
                host = host + '/' + ids.replaceAt(0, "1");
                $scope.URL = $sce.trustAsHtml(host);
                $scope.$applyAsync();
            }

            if (UnitId == '2')
                $scope.ContactUsPage = false;
            else
                $scope.ContactUsPage = true;
        }
    }

    $scope.ChangeLanguage();

    $scope.showLoader = function () {
        $('#cover-spin').show(0);
    };

    $scope.hideLoader = function () {
        $('#cover-spin').hide();
    };
    
    $scope.$on('AnnouncementDone', function () {
        setTimeout(function () {
            $('#AnnouncementList').marquee({
                //speed in milliseconds of the marquee
                duration: 15000,
                //gap in pixels between the tickers
                gap: 50,
                //time in milliseconds before the marquee will start animating
                delayBeforeStart: 0,
                //'left' or 'right'
                direction: 'left',
                //true or false - should the marquee be duplicated to show an effect of continues flow
                duplicated: false,
                pauseOnHover: true,
            });
        }, 2000);
    });
    $scope.$on('onetime', function () {

        $('.one-time').slick({
            dots: true,
            infinite: true,
            autoplay: true,
            autoplaySpeed: 3000,
            slidesToShow: 1,
            adaptiveHeight: true
        });
    });
    $scope.$on('HideLoader', function () {
        $scope.hideLoader();
    });

    $scope.$on('datepick', function () {

        $('.datepick').datepicker({
            format: "dd-M-yyyy",
            autoclose: true,
            todayHighlight: true
        });
    });
    $scope.$on('findBodyHeightRun', function () {

        var InH = $("#IframeBodyHeight").parent().height();
        var ele = parent.document.body.querySelectorAll('.iframedesign');
        ele[0].style.height = InH + 'px';
        ele[0].style.minHeight = (screen.height - 200) + 'px';

        $(window).on('resize', function () {

            var InH = $("#IframeBodyHeight").parent().height();
            var ele = parent.document.body.querySelectorAll('.iframedesign');
            ele[0].style.height = InH + 'px';
            ele[0].style.minHeight = (screen.height - 200) + 'px';
        });
    });

    $scope.$on('tagsInputRun', function () {

        //$('#programefind').tagsinput('add', 'some tag');
        //$('#programefind').tagsinput({
        //    typeahead: {
        //        source: ['Amsterdam', 'Washington', 'Sydney', 'Beijing', 'Cairo']
        //    }
        //});
        $('#programefind').tagsinput({
            typeahead: {
                source: function (query) {
                    return $.get('http://someservice.com');
                }
            }
        });
        $('.tagsinputrun').tagsinput({
            allowDuplicates: true
        });
        $(".tagsinputrun").keypress(function (event)
        { 
                if (event.keyCode == 13) {
                    event.preventDefault();
                    return false;
                } 
        });
        $(".bootstrap-tagsinput").keypress(function (event) {
            if (event.keyCode >= 48 && event.keyCode <= 57) {
                if (event.keyCode == 13) {
                    event.preventDefault();
                    return false;
                }
            }
            else {  
                var self = this;

                $('.tag', self.$container).remove();
                $('option', self.$element).remove();

                while(self.itemsArray.length > 0)
                    self.itemsArray.pop();

                self.pushVal();
            } 
        });

    });


   
    $scope.$on('menurepeatDoneResponsive', function () {

        //alert($(window).width());
        if ($(window).width() > 970) {
            setTimeout(function () {
                var MenuContainer = $('#menu-container').width();
                var FullCoverMenuContainer = $('.f-cover-mc').width();
                var LogoBox = $('.logo-box').width();
                var MenuBox = $('.menu-box').width();
                var FinalMenuBox = MenuContainer - LogoBox;

                var x, i;
                x = document.querySelectorAll(".menu-box .nav > li");

                var LastTab;
                for (i = 0; i < x.length; i++) {
                    if (MenuBox > FinalMenuBox) {
                        //alert($('.menu-box .nav li.moremenulist').length)
                        if ($('.menu-box .nav li.moremenulist').length == 0) {
                            $(".menu-box .nav").append("<li class='moremenulist'><button id='ExpandedAction' type='Submit' onclick='ExpandedAction();'  class='expanded-action '><span>More</span><span class='MoreIcon'>&darr;</span></button><ul class='MoreItemBind'></ul></li>");
                            LastTab = $('.menu-box .nav > li:nth-last-child(2)').get(0).outerHTML;
                            $(".menu-box .nav > li .MoreItemBind").prepend(LastTab);
                            $('.menu-box .nav > li:nth-last-child(2)').remove();
                            MenuBox = $('.menu-box').width();
                        }
                        else {
                            LastTab = $('.menu-box .nav > li:nth-last-child(2)').get(0).outerHTML;
                            $(".menu-box .nav > li .MoreItemBind").prepend(LastTab);
                            $('.menu-box .nav > li:nth-last-child(2)').remove();
                            MenuBox = $('.menu-box').width();
                        }
                    }
                 
                }

            }, 500);
        }
        else {

            var navmaxheight = $(window).height() - 120;
            $(".menu-box #nav").css({ "max-height": navmaxheight });
        }
    });

    $scope.$on('footerResponsiveList', function () {

        setTimeout(function () {

            // init Isotope
            var $grid = $('.f-flex-box').isotope({
                itemSelector: '.f-flex-3',
                percentPosition: true,
                transitionDuration: '0.2s',
                //layoutMode: 'fitRows',
                masonry: {
                    columnWidth: '.f-flex-3',
                }
            });
        }, 1000);
    });

    $scope.$on('yearpick', function () {

        $('.yearpick').datepicker({
            format: "yyyy",
            autoclose: true,
            minViewMode: 2
        });
    });

    $scope.$on('accordianRepeatdone', function () {

        $('.accordian li h5').click(function () {
            if (!$(this).next().is(':visible')) {
                $('.drop').slideUp(400);
                $('.accordian li').removeClass('active');
                $(this).next().slideDown(400);
                $(this).parent().addClass('active');
            }
            else {
                $('.drop').slideUp(400);
                $('.accordian li').removeClass('active');
            }
            return false;
        });
    });
    $scope.$on('InterestedSlider', function () {

        $(".InterestedSlider").owlCarousel({
            pagination: false,
            navigation: true,
            navigationText: false,
            slideSpeed: 1000,
            stopOnHover: true,
            autoPlay: true,
            items: 4,
            itemsDesktopSmall: [1024, 3],
            itemsTablet: [600, 2],
            itemsMobile: [479, 1]
        });
    });
    $scope.$on('StoriesSlider', function () {

        $(".StoriesSlider").owlCarousel({
            pagination: false,
            navigation: true,
            navigationText: false,
            slideSpeed: 1000,
            stopOnHover: true,
            autoPlay: true,
            items: 4,
            itemsDesktopSmall: [1024, 3],
            itemsTablet: [600, 2],
            itemsMobile: [479, 1]
        });
    });
    $scope.Menus = [];
    $scope.SubMenus = [];
    $scope.chkAll = [];
    $scope.chk = [];

    

    $scope.checktextbox = function (txtbox) {
        if (txtbox.val() == "") {
            txtbox.addClass("red-validation");
        }
        else {
            txtbox.removeClass("red-validation");
        }
    };
    angular.element($('input.validate')).on('keyup', function () {
        $scope.checktextbox($(this));
    });
    $scope.isValidate = function (parendiv, validateid) {
         
        if (validateid == null) {
            validateid = 'validate'
        }
        var modelStateIsvalid = true;
        var firstElement = null;
        if (parendiv != null) {
            var inputelement = parendiv.find('input.' + validateid);
            var textarea = parendiv.find('textarea.' + validateid);
            var ddlelement = parendiv.find('select.' + validateid);

            $.each(inputelement, function (index) {
                if ($(this).val() == "") {
                    $(this).addClass("red-validation");
                    modelStateIsvalid = false;
                    if (firstElement == null)
                        firstElement = $(this);
                }
                else {
                    $(this).removeClass("red-validation");
                }
            });

            $.each(textarea, function (index) {
                if ($(this).val() == "") {
                    $(this).addClass("red-validation");
                    modelStateIsvalid = false;
                    if (firstElement == null)
                        firstElement = $(this);
                }
                else {
                    $(this).removeClass("red-validation");
                }
            });

            $.each(ddlelement, function (index) {
                if ($(this).children('option:selected').index() == 0) {
                    $(this).addClass("red-validation");
                    modelStateIsvalid = false;
                    if (firstElement == null)
                        firstElement = $(this);
                } else {
                    $(this).removeClass("red-validation");
                }
            });
        }
        else {
            $.each($('input.' + validateid), function (index) {

                if ($(this).val() == "") {
                    $(this).addClass("red-validation");
                    modelStateIsvalid = false;
                    if (firstElement == null)
                        firstElement = $(this);
                }
                else {
                    $(this).removeClass("red-validation");
                }
            });

            $.each($('textarea.' + validateid), function (index) {
                if ($(this).val() == "") {
                    $(this).addClass("red-validation");
                    modelStateIsvalid = false;
                    if (firstElement == null)
                        firstElement = $(this);
                }
                else {
                    $(this).removeClass("red-validation");
                }
            });
            if (typeof (CKEDITOR) !== "undefined")
                $.each(CKEDITOR.instances, function (instance) {

                    if ($("#" + instance).hasClass('ck-validate')) {

                        var messageLength = CKEDITOR.instances[instance].getData().replace(/<[^>]*>/gi, '').length;
                        if (!messageLength) {
                            $('#cke_' + instance).addClass("red-validation");
                            modelStateIsvalid = false;
                            if (firstElement == null)
                                firstElement = CKEDITOR.instances[instance];
                        }
                        else {
                            $('#cke_' + instance).removeClass("red-validation");
                        }
                    }
                });

            $.each($('select.' + validateid), function (index) {
                if ($(this).children('option:selected').index() == 0) {
                    $(this).addClass("red-validation");
                    modelStateIsvalid = false;
                    if (firstElement == null)
                        firstElement = $(this);
                } else {
                    $(this).removeClass("red-validation");
                }
            });

            $.each($('.validate-chk'), function (index) {
                if ($(this).find('input[type = "checkbox"]:checked').length == 0) {
                    $(this).addClass("red-validation");
                    modelStateIsvalid = false;
                    if (firstElement == null)
                        firstElement = $(this);
                }
                else {
                    $(this).removeClass("red-validation");
                }
            });
        }

        if (firstElement != null) {
            firstElement.focus();
        }

        return modelStateIsvalid;
    }

    $scope.SetFocus = function (id, checkvalidation) {
        $timeout(function () {
            $(id).focus();
            if (checkvalidation === true) {
                isValidate();
                $scope.hideLoader();
            }
        }, 1100);
    };
    var changeFontSize = function (increaseFont) {
        var fontTargets = new Array('html', 'div', 'p', 'li', 'section', 'h1', 'h2', 'h3', 'h4', 'h5', '.btn', 'span');

        fontTargets.forEach(function (element) {
            var $element = $(element);
            var newFontSize;
            var currentFontSize = $element.css('font-size');
            var currentFontSizeNum = parseFloat(currentFontSize, 15);

            if (increaseFont) {
                $element.css('font-size', 0);

                newFontSize = currentFontSizeNum + 2;
            } else {
                newFontSize = currentFontSizeNum - 1;
            }

            if (newFontSize >= 12 && newFontSize <= 21) {
                $element.css('font-size', newFontSize);
            } else {
                $element.css('font-size', currentFontSizeNum);
            }
            if (increaseFont == "10px") {
                $element.css('font-size', increaseFont);
            }
        });

    };

    $(document).ready(function () {

       

        var originalSize = $('div').css('font-size');
        // reset        
        $(".resetMe").click(function () {
            $('div').css('font-size', originalSize);
        });

        // Increase Font Size          
        $(".increase").click(function () {
            var currentSize = $('div').css('font-size');
            var currentSize = parseFloat(currentSize) * 1.2;
            $('div').css('font-size', currentSize);
            return false;
        });

        // Decrease Font Size       
        $(".decrease").click(function () {
            var currentFontSize = $('div').css('font-size');
            var currentSize = $('div').css('font-size');
            var currentSize = parseFloat(currentSize) * 0.8;
            $('div').css('font-size', currentSize);
            return false;
        });
    });

    $scope.GetNotableAlumni = function () {
        var getData = myService.methode('GET', "/Masters/Client_GetNotableAlumni", '[]');
        getData.then(function (response) {
            if (response.data.Table.length > 0)
                $scope.NotableAlumniList = response.data.Table;
            if (response.data.Table1.length > 0)
                $scope.TotalNotableAlumni = response.data.Table1[0].Total;
        });
    };



    $scope.GetVisitorCount = function () {
        debugger;
        var url = window.location.pathname;
        var splits = url.split('/');
        var splitsids = [];
        if (splits.length > 3) {
            splitsids = splits[3].split('_');
        }
        var UnitId = splitsids.length > 0 ? splitsids[1] : 0;
        var collectionobj = {};
        if (UnitId == '3318') {
            if (sessionStorage.getItem('BKB') != '02') {
                sessionStorage.setItem('BKB', '02');
                collectionobj.Action = 6;
                collectionobj.UnitId = '3318';
            }
            else {
                collectionobj.UnitId = '3318';
                collectionobj.Action = 7;
            }
        }
        else {
            if (sessionStorage.getItem("Visitor") != '02') {
                sessionStorage.setItem('Visitor', '02');
                collectionobj.Action = 6;
            }
            else { collectionobj.Action = 7; }
        }

        var getData = myService.methode('POST', "/Homepage/GetVisitorCount", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            if (response.data.length > 0) { $scope.Visitor = response.data[0].VisitorCount; }

        });
    };



    $scope.FetchNavMenu = async function() {
        return $q(async function (resolve, reject) {
            var collectionobj = {};
            var url = window.location.pathname;
            var splits = url.split('/');
            var splitsids = [];
            if (splits.length > 3) {
                splitsids = splits[3].split('_');
                if (splitsids.length > 0)
                    collectionobj.Language = splitsids[0];
            }
            var menuData = new Object();
            var UnitId = (typeof (UnitId) === 'undefined' ? (splitsids.length > 0 ? splitsids[1] : undefined) : UnitId);
            collectionobj.UnitId = UnitId;
            var getData = myService.methode('POST', "/Homepage/GetNavMenu", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
            await getData.then(function successCallback(response) {
                menuData = new Object();
                menuData.MainTabs = response.data.MainTabs;
                menuData.MainMenus = response.data.MainMenus;
                menuData.MainSubMenus = response.data.MainSubMenus;
                resolve(menuData);
            }, function errorCallback(response) {
                    reject(menuData)
            });
        });
    }

    $scope.LoadNavMenu = async function () {
        $scope.GetVisitorCount();
        $scope.MainTabs = [];
        $scope.MainMenus = [];
        $scope.MainSubMenus = [];

        if (sessionStorage.getItem('menuData') == "undefined" || sessionStorage.getItem('menuData') == null || sessionStorage.getItem('menuData') == "{}") {
            // 
            await $scope.FetchNavMenu().then(function (NavMenuDataList) {
                sessionStorage.setItem('menuData', JSON.stringify(NavMenuDataList));
            });
            
        }
        // 
        $scope.MainTabs = JSON.parse(sessionStorage.getItem('menuData')).MainTabs;
        $scope.MainMenus = JSON.parse(sessionStorage.getItem('menuData')).MainMenus;
        $scope.MainSubMenus = JSON.parse(sessionStorage.getItem('menuData')).MainSubMenus;

        $scope.Tabs = $filter('filter')($scope.MainTabs, { UnitId: Number(UnitId) }, true);

        $.each($scope.Tabs, function (index, tabdata) {
            $scope.Menus[index] = $filter('filter')($scope.MainMenus, { TabId: Number(tabdata.TabId) }, true);
        })

        $.each($scope.MainMenus, function (index, submenudata) {
            $scope.SubMenus[submenudata.MenuId] = $filter('filter')($scope.MainSubMenus, { MenuId: Number(submenudata.MenuId) }, true);
        })

        if ($scope.Tabs.length > 0) {
            $scope.FacebookLink = $scope.Tabs[0]['FacebookLink'];
            $scope.TwitterLink = $scope.Tabs[0]['TwitterLink'];
            $scope.YoutubeLink = $scope.Tabs[0]['YoutubeLink'];
            $scope.HomeVideoLink = $scope.Tabs[0]['VideoLink'];
        }
    }

    $scope.GetTab = function (UnitId) {
        $scope.GetVisitorCount();
        var collectionobj = {};
        var url = window.location.pathname;
        var splits = url.split('/');
        var splitsids = [];
        if (splits.length > 3) {
            splitsids = splits[3].split('_');
            if (splitsids.length > 0)
                collectionobj.Language = splitsids[0];
        }

        collectionobj.Action = 3;

        collectionobj.UnitId = (typeof (UnitId) === 'undefined' ? (splitsids.length > 0 ? splitsids[1] : undefined) : UnitId);

        var getData = myService.methode('POST', "/Homepage/GetTabMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.Tabs = response.data;
            if (response.data.length > 0) {
                $scope.FacebookLink = response.data[0]['FacebookLink'];
                $scope.TwitterLink = response.data[0]['TwitterLink'];
                $scope.YoutubeLink = response.data[0]['YoutubeLink'];
                $scope.HomeVideoLink = response.data[0]['VideoLink'];
            }
        });
    };

    $scope.GetTabAfterLogin = function (UnitId) {
        var collectionobj = {};
        var url = window.location.pathname;
        var splits = url.split('/');
        var splitsids = [];
        if (splits.length > 3) {
            splitsids = splits[3].split('_');
            if (splitsids.length > 0)
                collectionobj.Language = splitsids[0];
        }

        collectionobj.Action = 6;

        if (usertypeid == 1)
            collectionobj.UnitId = (typeof (UnitId) === 'undefined' ? (splitsids.length > 0 ? splitsids[1] : undefined) : UnitId);
        else
            collectionobj.UnitId = UnitId;

        var getData = myService.methode('POST', "/Homepage/GetTabMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.Tabs = response.data;
            if (response.data.length > 0) {
                $scope.FacebookLink = response.data[0]['FacebookLink'];
                $scope.TwitterLink = response.data[0]['TwitterLink'];
                $scope.YoutubeLink = response.data[0]['YoutubeLink'];
                $scope.HomeVideoLink = response.data[0]['VideoLink'];
            }
        });
    };

    $scope.GetMenu = function (TabId, index) {
        var url = window.location.pathname;
        var splits = url.split('/');
        var collectionobj = {};
        if (splits.length > 3) {
            var laststring = splits[3];
            var splitsids = splits[3].split('_');
            if (splitsids.length > 0)
                collectionobj.Language = splitsids[0];
        }

        collectionobj.Action = 3;
        collectionobj.TabId = JSON.stringify(TabId);
        var getData = myService.methode('POST', "/Homepage/GetMenuMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.Menus[index] = response.data;
        });
    };
    $scope.GetddlMenu = function (TabId) {
        var collectionobj = {};
        collectionobj.Action = 3;
        collectionobj.TabId = TabId;
        var getData = myService.methode('POST', "../Homepage/GetMenuMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.Menus = response.data;
        });
    };
    $scope.GetSubMenu = function (MenuId, index) {

        var url = window.location.pathname;
        var splits = url.split('/');
        var collectionobj = {};
        if (splits.length > 3) {
            var laststring = splits[3];
            var splitsids = splits[3].split('_');
            if (splitsids.length > 0)
                collectionobj.Language = splitsids[0];
        }
        collectionobj.Action = 3;
        collectionobj.MenuId = JSON.stringify(MenuId);
        var getData = myService.methode('POST', "/Homepage/GetSubMenuMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.SubMenus[MenuId] = response.data;
        });
    };
    $scope.GetddlSubMenu = function (MenuId) {
        var collectionobj = {};
        collectionobj.Action = 3;
        collectionobj.MenuId = MenuId;
        var getData = myService.methode('POST', "/Homepage/GetSubMenuMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.SubMenus = response.data;
        });
    };




    $scope.GetDetailBySubMenuId = function (SubMenuId) {
        var collectionobj = {};
        collectionobj.Action = 2;
        collectionobj.SubMenuId = SubMenuId;
        var getData = myService.methode('POST', "/Homepage/GetSubMenuMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.DetailBySubMenuId = response.data;
        });
    };
    $scope.getAlumniUnitId = function () {
        var collectionobj = {};
        collectionobj.Action = 8;
        var getData = myService.methode('POST', "/Homepage/GetUnitMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {

            $scope.AlumniUnitId = "../AlumniHome/1_" + response.data[0]['UnitId'];

        });
    };
    $scope.GetUnitType1 = function () {
        var collectionobj = {};
        collectionobj.Action = 1;
        var getData = myService.methode('POST', "/Homepage/GetUnitTypeMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetUnitTypes = response.data;
        });
    };
    $scope.GetUnitlist = [];


    $scope.GetUnit = function (UnitTypeId, index) {
        var collectionobj = {};
        collectionobj.Action = 3;
        collectionobj.UnitTypeId = UnitTypeId;
        collectionobj.UserId = userid;
        var getData = myService.methode('POST', "/Homepage/GetUnitMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            if (index != null) { $scope.GetUnitlist[index] = response.data; }
            else {
                $scope.GetUnits = response.data;
                if ($scope.GetUnits.length > 0)
                    if (usertypeid == '1') {
                        $scope.UnitId = $scope.GetUnits[0].UnitId.toString();
                    };
            }

        });
    };

    $scope.GetUnitTypePerm = function () {
        var collectionobj = {};
        if (usertypeid == '1')
            collectionobj.Action = 3;
        else
            collectionobj.Action = 4;

        collectionobj.UnitId = $scope.UnitId;
        collectionobj.UserId = userid;
        var getData = myService.methode('POST', "/Masters/GetUnitTypeMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetUnitTypePerms = response.data;
            if ($scope.GetUnitTypePerms.length > 0)
                if (usertypeid == '1') {
                    $scope.UnitTypeId = $scope.GetUnitTypePerms[0].UnitTypeId.toString();
                    $scope.GetUnitPerm($scope.UnitTypeId);
                }
                else {
                    $scope.UnitTypeId = $scope.GetUnitTypePerms[0].UnitTypeId.toString();
                    $scope.GetUnitPerm($scope.UnitTypeId);
                }
        });
    };
    $scope.GetUnitPerm = function (defaultselection) {
        var collectionobj = {};
        if (usertypeid == '1')
            collectionobj.Action = 3;
        else
            collectionobj.Action = 5;
        collectionobj.UnitTypeId = $scope.UnitTypeId;
        collectionobj.UserId = userid;
        var getData = myService.methode('POST', "/Homepage/GetUnitMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {

            $scope.GetUnitPerms = response.data;
            if ($scope.GetUnitPerms.length > 0)
                if (usertypeid == '1') {
                    if (defaultselection == '1')
                        $scope.UnitId = $scope.GetUnitPerms[0].UnitId.toString();
                    //if (IsFunctionDefined('GetTab'))
                    $scope.GetTab($scope.UnitId);
                    //if (IsFunctionDefined('fnApproved'))
                    if ($scope.fnApproved != undefined)
                        $scope.fnApproved($scope.UnitId);
                }
                else {
                    $scope.UnitId = $scope.GetUnitPerms[0].UnitId.toString();
                    //if (IsFunctionDefined('GetTab'))
                    $scope.GetTab($scope.UnitId);
                    //if (IsFunctionDefined('fnApproved'))
                    if ($scope.fnApproved != undefined)
                        $scope.fnApproved($scope.UnitId);
                }
            setTimeout(function () {
                $scope.GetAllUnit($scope.UnitId);
            }, 100)
        });
    };
    //-----------------------For Last Update
    $scope.GetLastUpdateDate = function (UnitId, MenuId, SubMenuId, TabId, FacultyId, Action) {
         
        var collectionobj = {};

        var url = window.location.pathname;
        var splits = url.split('/');
        var splitsids = [];
        if (splits.length > 3) {
            splitsids = splits[3].split('_'); 
        }
        collectionobj.UnitId = splitsids[1];
        collectionobj.Action = Action;
        collectionobj.FacultyId = FacultyId;
        //collectionobj.MenuId = splitsids[3];
        //collectionobj.SubMenuId = splitsids[4];
        collectionobj.TabId = splitsids[2]; 
        var getData = myService.methode('POST', "/Homepage/GetLastDate", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            if (response.data.length > 0)
                $scope.LastUpdateDate = response.data[0].LastUpdateDate;
        });
    };

    //-----------------------End Last Update


   $scope.GetAllUnit = function () {
        setTimeout(
            function () {
                var collectionobj = {};
                collectionobj.Action = 1;
                var url = window.location.pathname;
                var splits = url.split('/');
                var splitsids = [];
                var splitsidsLast = [];
                if (splits.length > 3) {
                    splitsids = splits[3].split('_');
                    splitsidsLast = splitsids[0].split('-');
                    $scope.UnitId = splitsidsLast[0];
                }
                //collectionobj.UnitId = sessionStorage.getItem("UnitId");
                if (typeof ($scope.UnitId) === 'undefined') {
                    collectionobj.UnitId = 2;
                }
                else {
                    collectionobj.UnitId = $scope.UnitId;
                }

                var getData = myService.methode('POST', "/Homepage/GetUnitMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
                getData.then(function (response) {
                    $scope.GetAllUnits = response.data;
                });
        }, 500);
    };
   
    $scope.GetAllCount = function () {
        var collectionobj = {};
        collectionobj.Action = 9;
        var getData = myService.methode('POST', "/Homepage/GetUnitMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {

            $scope.facultyCounts = response.data[0].facultyCount;
            $scope.instCounts = response.data[0].instCount;
            $scope.deptCounts = response.data[0].deptCount;
        });
    };
    //Alumni A-Z listing
    var str = "abcdefghijklmnopqrstuvwxyz";
    $scope.alphabet = str.toUpperCase().split("");
    $scope.activeLetter = '';
    $scope.activateLetter = function (letter) {
        $scope.activeLetter = letter;
        $scope.SearchName = "";
        $scope.GetAllUnitAtoZ(letter);
    }
    $scope.activateAlumniLetter = function (letter) {
        $scope.activeLetter = letter;
        $scope.SearchName = "";
        $scope.SearchAlumniList(letter);
    }
    $scope.activateTextLetter = function (letter) {
        $scope.activeLetter = letter;
    }
    $scope.SearchAlumniList = function (alphabet) {
        var collectionobj = {};
        collectionobj.Action = 8;
        collectionobj.FullName = alphabet;
        collectionobj.AlumniRegiId = localStorage.getItem("AlumniId");
        var getData = myService.methode('POST', "/Masters/GetAlumniList", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.AlumniSearchList = response.data;
            $scope.$applyAsync();
        });
    };
    $scope.GetAllUnitAtoZ = function (alphabet) {
        var collectionobj = {};
        collectionobj.Action = 6;
        collectionobj.UnitName = alphabet;
        var getData = myService.methode('POST', "/Homepage/GetUnitMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetAllUnitsAtoZ = response.data;

            $scope.$applyAsync();
        });
    };
    //Alumni A-Z listing

    $scope.GetUserTypeMaster = function () {
        var collectionobj = {};
        collectionobj.Action = 1;
        var getData = myService.methode('POST', "../Masters/GetUserTypeMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetUserTypeMasters = response.data;
        });
    };
    $scope.GetUserMaster = function (UserTypeId) {
        var collectionobj = {};
        collectionobj.Action = 3;
        collectionobj.UserTypeId = UserTypeId;
        var getData = myService.methode('POST', "../Masters/GetUserMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetUserMasters = response.data;
        });
    };
    $scope.GetUser = function () {
        var collectionobj = {};
        collectionobj.Action = 1;
        var getData = myService.methode('POST', "../Masters/GetUserMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetUsers = response.data;
        });
    };
    $scope.GetTotalUseratDashBoard = function () {
        var collectionobj = {};
        collectionobj.UnitId = sessionStorage.getItem("UnitId");
        var getData = myService.methode('POST', "/Masters/GetTotalUseratDashBoard", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {

            $scope.AllUsersList = response.data;
            $.each($scope.AllUsersList, function (i, val) {
                if (val.UserType == 'Alumni')
                    $scope.TotalAlumniUsers = $scope.TotalAlumniUsers + Number(val.total)
                else
                    $scope.TotalUsers = $scope.TotalUsers + Number(val.total)
            });
        });
    };
    $scope.GetApprovalRequests = function () {
        var collectionobj = {};
        collectionobj.UnitId = sessionStorage.getItem("UnitId");
        var getData = myService.methode('POST', "/Masters/GetApprovalRequests", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {

            $scope.ApprovalRequestsList = response.data;
            $.each($scope.ApprovalRequestsList, function (i, val) {
                $scope.TotalApprovalRequests = $scope.TotalApprovalRequests + Number(val.total)
            });
        });
    };
    $scope.GetUserMasterPerm = function (Id) {
        var collectionobj = {};
        collectionobj.Action = 4;
        collectionobj.Id = Id;
        var getData = myService.methode('POST', "/Masters/GetUserMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetUserMasterPerms = response.data;
        });
    };

    $scope.GetBanner = function (UnitId) {
        debugger;
        var url = window.location.pathname;
        var splits = url.split('/');
        var collectionobj = {};
        if (splits.length > 3) {
            var laststring = splits[3];
            var splitsids = splits[3].split('_');
            if (splitsids.length > 0)
                collectionobj.Language = splitsids[0];
        }

        collectionobj.Action = 3;
        collectionobj.UnitId = (typeof (UnitId) === 'undefined' ? splitsids[1] : UnitId);
        collectionobj.TabId = splitsids[2];
        var getData = myService.methode('POST', "/Homepage/GetBanner", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            if (response.data.length > 0) {
                $scope.GetBanners = response.data;
                $scope.SubMenuName = response.data[0].SubMenuNameEng;
            }

            $scope.$applyAsync();
        });
    };
    $scope.GetLayoutMaster = function () {
        var collectionobj = {};
        collectionobj.Action = 1;
        var getData = myService.methode('POST', "/Masters/GetLayoutMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetLayouts = response.data;
        });
    };
    $scope.GetLayoutPart = function (LayoutId) {
        var collectionobj = {};
        collectionobj.Action = 4;
        collectionobj.LayoutId = $scope.LayoutId;
        collectionobj.UserId = userid;
        var getData = myService.methode('POST', "/Masters/GetLayoutPart", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetLayoutParts = response.data;
        });
    };
    $scope.SetURLType = function () {
        if ($scope.URLType == "T") {
            $scope.TargetUnitDiv = false;
            $scope.URLDiv = true;
            $scope.fileInputDiv = true;
        }
        else if ($scope.URLType == "U") {
            $scope.URLDiv = false;
            $scope.TargetUnitDiv = true;
            $scope.fileInputDiv = true;
        }
        else if ($scope.URLType == "A") {
            $scope.fileInputDiv = false;
            $scope.TargetUnitDiv = true;
            $scope.URLDiv = true;

        }
        else {
            $scope.URLDiv = true;
            $scope.TargetUnitDiv = true;
            $scope.fileInputDiv = true;
        }
    }
    $scope.SetContentURLType = function () {

        if ($scope.URLContentType == "T") {
            $scope.TargetUnitDiv = false;
            $scope.URLDiv = true;
            $scope.fileInputDiv = true;
            $scope.ddlContentDiv = true;
        }
        else if ($scope.URLContentType == "U") {
            $scope.URLDiv = false;
            $scope.TargetUnitDiv = true;
            $scope.fileInputDiv = true;
            $scope.ddlContentDiv = true;
        }
        else if ($scope.URLContentType == "A") {
            $scope.fileInputDiv = false;
            $scope.TargetUnitDiv = true;
            $scope.URLDiv = true;
            $scope.ddlContentDiv = true;
        }
        else if ($scope.URLContentType == "P") {
            $scope.fileInputDiv = true;
            $scope.TargetUnitDiv = false;
            $scope.URLDiv = true;
            $scope.ddlContentDiv = false;
        }
        else {
            $scope.URLDiv = true;
            $scope.TargetUnitDiv = true;
            $scope.fileInputDiv = true;
            $scope.ddlContentDiv = true;
        }
    }
    $scope.trustAsHtml = function (html) {
        return $sce.trustAsHtml(html);
    }
    $scope.Url = function (val) {
        return $sce.trustAsResourceUrl(val);
    };
    $scope.GetUnitTitle = function () {
        var collectionobj = {};
        collectionobj.Action = 2;
        collectionobj.UnitId = UnitId;
        var getData = myService.methode('POST', "/Homepage/GetUnitMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            if (response.data.length > 0) {
                $scope.UnitTitle = response.data[0].UnitTitle;
                $scope.UnitLogoPath = response.data[0].logopath;
            }
        });
    };

    $scope.GetUnitTitle();
    $scope.GetFacultyList = function () {
        $scope.Lang = window.location.pathname.split('/')[3].split('_')[0];
        var collectionobj = {};
        collectionobj.Action = 3;
        collectionobj.FacultyId = UnitId;
        var getData = myService.methode('POST', "/Homepage/GetFaculty", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.FacultyList = response.data.Table;
            $scope.RefFacultyList = response.data.Table1;
        });
    };

    $scope.GetFacultyProfile = function () {
        var FacultyId = "";
        var values = window.location.href.split('?');
        if (values.length > 1)
            FacultyId = values[1].split('#')[0];
        else
            FacultyId = "";
        $scope.GetLastUpdateDate($scope.hfUnitId, $scope.hfMenuId, $scope.hfSubMenuId, $scope.hfTabId, FacultyId, 5);
        var collectionobj = {};
        collectionobj.Action = 2;
        collectionobj.FacultyId = FacultyId;
        var getData = myService.methode('POST', "/Homepage/GetFaculty", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.FacultyBasicDetails = response.data.Table;
            $scope.FacultyBasicDetails[0].PhotoPath = '../' + $scope.FacultyBasicDetails[0].PhotoPath + '?' + new Date().toDateString();
            $scope.FacultyEducation = response.data.Table1;

            if (typeof (response.data.Table2) !== 'undefined')
                $scope.FacultyAcademicPositions = response.data.Table2;

            if (typeof (response.data.Table3) !== 'undefined')
                $scope.FacultyAdministrativePositions = response.data.Table3;

            if (typeof (response.data.Table4) !== 'undefined')
                $scope.FacultyCourses = response.data.Table4;

            if (typeof (response.data.Table5) !== 'undefined')
                $scope.FacultyResearchInterests = response.data.Table5;

            if (typeof (response.data.Table6) !== 'undefined')
                $scope.FacultyResearchProjects = response.data.Table6;

            if (typeof (response.data.Table7) !== 'undefined')
                $scope.FacultyRecentPublications = response.data.Table7;

            if (typeof (response.data.Table8) !== 'undefined')
                $scope.FacultyThesisSupervision = response.data.Table8;

            if (typeof (response.data.Table9) !== 'undefined')
                $scope.FacultyAcademicAwards = response.data.Table9;

            if (typeof (response.data.Table10) !== 'undefined')
                $scope.FacultyProfessionalMemberships = response.data.Table10;

            if (typeof (response.data.Table11) !== 'undefined')
                $scope.FacultyNewsandNotice = response.data.Table11;

            if (typeof (response.data.Table12) !== 'undefined')
                $scope.FacultyConsultancy = response.data.Table12;

            if (typeof (response.data.Table13) !== 'undefined')
                $scope.FacultyAttendancelist = response.data.Table13;
        });
    };
    $scope.PrintPanel = function (elementid, title) {
        var panel = document.getElementById(elementid);
        var printWindow = window.open('', '', '');
        printWindow.document.write('<html><head><title>' + title + '</title><link href="../../Content/plugins/assets/css/print/print-bootstrap.min.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/print/print-main.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/font-icons/icofont.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/font-icons/font-awesome.min.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/font-icons/materialdesignicons.min.css" media="all" rel="stylesheet" /><link href="../../Scripts/SitesBhu/css/style.css" rel="stylesheet"/>');
        printWindow.document.write('</head><body >');
        printWindow.document.write($scope.PrintMasterHeader().html() + panel.innerHTML);
        printWindow.document.write('</body></html>');
        printWindow.document.close();
        setTimeout(function () {
            printWindow.print();
            printWindow.close();
        }, 500);
        return false;
    };

    $scope.ContactUsTab = function () {
        if (window.location.pathname.split('/').length > 3) {
            var Language = window.location.pathname.split('/')[3].split('_')[0];
            var UnitId = window.location.pathname.split('/')[3].split('_')[1].split('?')[0];
            if (UnitId == '2')
                $scope.ContactUsPage = false;
            else
                $scope.ContactUsPage = true;
        } else {
            $scope.ContactUsPage = false;
        }
    };

    $scope.ContactUs_Click = function () {
        var UnitId = window.location.pathname.split('/')[3].split('_')[1].split('?')[0];
        var Language = window.location.pathname.split('/')[3].split('_')[0];
        if (UnitId == '2')
            $scope.ContactUsPage = false;
        else
            $scope.ContactUsPage = true;

        window.open('../../Site/ContactPage/' + Language + '_' + UnitId, '_blank');
    };

    $scope.PrintMaster = function (tblheader, data, title) {

        var tab = $('<table id="example" class="table compact table-hover table-striped table-bordered nowrap" ></table>');
        var thead = $('<thead></thead>');
        var theadrow = $('<tr></tr>');

        var l = tblheader.length;
        for (var i = 0; i < l; i++) {
            var val = tblheader[i]
            // Append header here
            theadrow.append('<th>' + val.HeaderText + '</th>');
        }

        thead.append(theadrow);

        tab.append(thead);
        var tbody = $('<tbody></tbody>');
        $.each(data, function (i, obj) {
            var trow = $('<tr></tr>');
            $.each(tblheader, function (j, val) {
                var key = val.HeaderValue;
                var value = obj[key];
                if (value == 'undefined' || value == null) { value = "" }
                if (key == "Id" || key == "#") {
                    trow.append('<td>' + (i + 1) + '</td>');
                }
                else {
                    if (val.ImageColumn == "Yes") {
                        trow.append('<td><img src="../' + ((value == null || value == "") ? '../content/photos/default-user.png' : value) + '" width="50px" height="50px"></td>');
                    }
                    else {
                        trow.append('<td>' + (typeof (value) == 'boolean' ? (value == true ? "Yes" : "No") : Replace(value)) + '</td>');
                    }
                }
            });
            tbody.append(trow);
        });
        tab.append(tbody);
        var div = $('<div class="col-lg-12"></div>');
        var h1 = $('<table class="table p-table "><tr><td><h4>' + title + '<h4></td></tr></table>');
        div.append(h1);
        div.append(tab);
        var popupWin = window.open('', '_blank');
        popupWin.document.open();
        var table = div.html();
        var head = '<html><head><title>' + title + '</title><meta charset="utf-8" /><link href="../../Content/plugins/assets/css/print/print-bootstrap.min.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/print/print-main.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/font-icons/icofont.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/font-icons/font-awesome.min.css" media="all" rel="stylesheet" /><link href="../../Content/plugins/assets/css/font-icons/materialdesignicons.min.css" media="all" rel="stylesheet" /></head><body onload="window.print()">' + $scope.PrintMasterHeader().html() + '' + table + '</body></html>';
        popupWin.document.write(head);
        popupWin.document.close();
    };

    $scope.PrintMasterHeader = function () {
        var div = $('<div></div>');
        var tab = $('<table class="table p-table header-bg1"> </table>');
        var tbody = $('<tbody></tbody>');
        var trow = $('<tr></tr>');
        trow.append('<td class="no-b"> <div class="detail-box"> <div class="school-name">Banaras Hindu University</div><div class="school-address"><i class="icofont-bank-alt"></i>Address : Varanasi -221005,U.P.,India</div><div class="school-contact"><i class="icofont-telephone"></i>Phone : (542) 2208413, 2206638</div><div class="school-email"> <i class="icofont-envelope"></i>Email : info@bhu.ac.in</div></div></td>');
        trow.append('<td width="115px" class="no-b"> <div class="logo-box"> <img src="../../Scripts/SitesBhu/images/logo.png" /> </div></td>');
        tbody.append(trow);
        tab.append(tbody);
        div.append(tab);
        return div;
    }

    $scope.GetProgrammeForAlumni = function () {
        var collectionobj = {};
        collectionobj.Action = 5;
        var getData = myService.methode('POST', "../Masters/GetProgrammeMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.ProgrammeMasterList = response.data;
        });
    };
    //Publication
    $scope.ToDoListItems = [];
    $scope.listItem = 0;
    $scope.numPerPage = 10;
    $scope.maxSize = 10;

    //$scope.CreateFooterPage = function (data) {
    //    $scope.listItem = data.length;
    //    $scope.$applyAsync();
    //}

    $scope.GetPurpose = function (data) {
        var collectionobj = {};
        collectionobj.Action = 2;
        var getData = myService.methode('POST', "/Masters/GetPurpose", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetPurposeList = response.data
        });
    }

    $scope.radiochk = [];
    $scope.selectedUnitId = "";
    $scope.SearchBox1 = "";

    $scope.ShowDiv = function () {
        if ($scope.SearchBox.length > 0)
            $scope.SearchDiv = false;
        else
            $scope.SearchDiv = true;
    }
    $scope.ShowDonfocusiv = function () {
        $scope.SearchDiv = false;
    }

    $scope.GetCategory = function () {
        var collectionobj = {};
        collectionobj.Action = 3;
        var getData = myService.methode('POST', "/Masters/GetCategoryMaster", '{obj:' + JSON.stringify(collectionobj) + '}', $scope.antiForgeryToken);
        getData.then(function (response) {
            $scope.GetAllCategory = response.data;
        });
    };


    $scope.chk_click = function (UnitName, index, UnitId) {
        for (var i = 0; i < $scope.radiochk.length; i++) {
            if (i == index)
                $scope.radiochk[i] = UnitId;
            else
                $scope.radiochk[i] = false;
        }

        $scope.selectedUnitId = UnitId;
        $scope.RefUnitName = UnitName;

        //$scope.SearchDiv = true;
    }

    //$(document).click(function (e) {
    //    if ($(e.target).closest(".search2").length == 0) {
    //        $scope.SearchDiv = true;
    //        $scope.SearchBox = $scope.RefUnitName;
    //        $scope.$applyAsync();
    //    }       
    //});

    $scope.Redirect = function (actionname, controllername) {
        var ids = window.location.href.split('/')[5];
        window.open('../../' + controllername + '/' + actionname + '/' + ids, '_self');
    }

    $scope.RedirectUsingId = function (actionname, controllername, id) {
        var ids = window.location.href.split('/')[5].split('?')[0];
        window.open('../../' + controllername + '/' + actionname + '/' + ids + '?' + id, '_self');
    }
    $scope.titletextclick = function (element1, element2, index, CommonSlider) {
        element1 = element1 + index
        element2 = element2 + index
        if (!$('#' + element1).is(':visible')) {

            $('#' + element1).slideDown(400);
            $('#' + element1).addClass('active');

            $('#' + element2).slideUp(400);
            $('#' + element2).removeClass('active');
        }
        else {
            $('#' + element1).slideUp(400);
            $('#' + element1).removeClass('active');
        }
        $.each($scope[CommonSlider], function (index1, val) {
            element1 = 'hin' + index1
            element2 = 'eng' + index1

            if (index1 !== index) {
                $('#' + element1).slideUp(400);
                $('#' + element1).removeClass('active');

                $('#' + element2).slideUp(400);
                $('#' + element2).removeClass('active');
            }
        })


        //$('#' + element).addClass('active');
        //$('#' + element).slideDown(400);
        return false;
    };
    if (IsFunctionDefined('app.UnitTypeMasterController')) {
        app.UnitTypeMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.TabMasterController')) {
        app.TabMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.MenuMasterController')) {
        app.MenuMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.SubMenuMasterController')) {
        app.SubMenuMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.UnitMasterController')) {
        app.UnitMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.UserMasterController')) {
        app.UserMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.BannerMasterController')) {
        app.BannerMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.LayoutMasterController')) {
        app.LayoutMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.LayoutPartController')) {
        app.LayoutPartController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.BodyContentController')) {
        app.BodyContentController($scope, $element, $filter, $sce, myService);
    }
    if (IsFunctionDefined('app.UnitMenuDetailConroller')) {
        app.UnitMenuDetailConroller($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.LoginController')) {
        app.LoginController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.MainHomeController')) {
        app.MainHomeController($scope, $element, $filter, $sce, myService);
    }
    if (IsFunctionDefined('app.FooterController')) {
        app.FooterController($scope, $element, $filter, $sce, myService);
    }
    if (IsFunctionDefined('app.FooterHeaderMasterController')) {
        app.FooterHeaderMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.QuickLinksController')) {
        app.QuickLinksController($scope, $element, $filter, $sce, myService);
    }
    if (IsFunctionDefined('app.QuickLinksHeaderMasterController')) {
        app.QuickLinksHeaderMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.NoticeController')) {
        app.NoticeController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.AcademicEventsController')) {
        app.AcademicEventsController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PermissionController')) {
        app.PermissionController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.CreatePasswordController')) {
        app.CreatePasswordController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.FacultyController')) {
        app.FacultyController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.NotableAlumniController')) {
        app.NotableAlumniController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.NewsController')) {
        app.NewsController($scope, $element, $filter, myService);
    }

    if (IsFunctionDefined('app.ProgrammeTypeMasterController')) {
        app.ProgrammeTypeMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.DisciplineMasterController')) {
        app.DisciplineMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.DurationMasterController')) {
        app.DurationMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.SubjectMasterController')) {
        app.SubjectMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.ProgrammeMasterController')) {
        app.ProgrammeMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.ContactUsController')) {
        app.ContactUsController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.SubjectDetailsMasterController')) {
        app.SubjectDetailsMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PublicationMasterController')) {
        app.PublicationMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.AlumniRegController')) {
        app.AlumniRegController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.CampaignPurposeController')) {
        app.CampaignPurposeController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.CampaignController')) {
        app.CampaignController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.DonationController')) {
        app.DonationController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.ProgrammeNatureMasterController')) {
        app.ProgrammeNatureMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PlacementController')) {
        app.PlacementController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PlacementRegistrationController')) {
        app.PlacementRegistrationController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.FacultyAttendanceController')) {
        app.FacultyAttendanceController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.FacultyNoticesController')) {
        app.FacultyNoticesController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PhotoUploadingController')) {
        app.PhotoUploadingController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PhotoGalleryController')) {
        app.PhotoGalleryController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PhotoAlbumController')) {
        app.PhotoAlbumController($scope, $element, $sce, $filter, myService);
    }
    if (IsFunctionDefined('app.CampaignUpdatesController')) {
        app.CampaignUpdatesController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.UnitMappingController')) {
        app.UnitMappingController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.CategoryMasterController')) {
        app.CategoryMasterController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.CategoryPostController')) {
        app.CategoryPostController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.FriendController')) {
        app.FriendController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.AuditTrailReportController')) {
        app.AuditTrailReportController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.ForumThreadController')) {
        app.ForumThreadController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.ForumCommentsController')) {
        app.ForumCommentsController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.TempVacancyController')) {
        app.TempVacancyController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.TenderCategoryController')) {
        app.TenderCategoryController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.TenderController')) {
        app.TenderController($scope, $element, $sce, $filter, myService);
    }
    if (IsFunctionDefined('app.MailCredentialController')) {
        app.MailCredentialController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.GazetteController')) {
        app.GazetteController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.GazettePriorityController')) {
        app.GazettePriorityController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.AnnouncementController')) {
        app.AnnouncementController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PasswordHandedoverController')) {
        app.PasswordHandedoverController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.PasswordHandedoverReportController')) {
        app.PasswordHandedoverReportController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.SetFacultyPriorityController')) {
        app.SetFacultyPriorityController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.ApplicationFormController')) {
        app.ApplicationFormController($scope, $element, $filter, myService);
    }

    if (IsFunctionDefined('app.ApplicationFormDisplayController')) {
        app.ApplicationFormDisplayController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.ViewAFormController')) {
        app.ViewAFormController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.FeedBackFormController')) {
        app.FeedBackFormController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.WebInformationManagerController')) {
        app.WebInformationManagerController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.GiftUsContributionController')) {
        app.GiftUsContributionController($scope, $element, $filter, myService);
    } 
    if (IsFunctionDefined('app.PaymentConfirmationController')) {
        app.PaymentConfirmationController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.DonationReportController')) {
        app.DonationReportController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.GrievanceController')) {
        app.GrievanceController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.UserFeedBackReportController')) {
        app.UserFeedBackReportController($scope, $element, $filter, myService);
    }
    if (IsFunctionDefined('app.HDFCGatewayResponseController')) {
        app.HDFCGatewayResponseController($scope, $element, $filter, myService);
    }
});

function IsFunctionDefined(functionName) {
    if (eval("typeof(" + functionName + ") == typeof(Function)")) {
        return true;
    }
}







app.service("myService", function ($http) {
    this.methode = function (methodType, virtualUrl, dataList,requestToken) {

        var response = $http({
            method: methodType,
            url: virtualUrl,
            data: dataList,
            contentType: 'application/json; charset=utf-8',
            datatype: 'json',
            headers: {
                'X-Requested-With': 'XMLHttpRequest',
                'RequestVerificationToken': requestToken
            }
        });

        return response;
    };
    this.methode1 = function (methodType, virtualUrl, dataList, requestToken) {

        var response = $http({
            method: methodType,
            async:false,
            url: virtualUrl,
            data: dataList,
            contentType: 'application/json; charset=utf-8',
            datatype: 'json',
            headers: {
                'X-Requested-With': 'XMLHttpRequest',
                'RequestVerificationToken': requestToken
            }
        });

        return response;
    };

    this.postmethode = function (methodType, virtualUrl, dataList, files, requestToken) {

        var response = $http({
            method: methodType,
            url: virtualUrl,
            headers: { 'Content-Type': undefined },
            data: { model: dataList, filesmodel: files },
            transformRequest: function (data) {
                var formData = new FormData();

                formData.append("model", angular.toJson(data.model));
                for (var i = 0; i < data.filesmodel.length; i++) {
                    formData.append("file" + i, data.filesmodel[i]);
                    console.log("file" + i, data.filesmodel[i]);
                }
                for (var i of formData)
                console.log(i);

                return formData;
            },
            datatype: 'json',
            headers: {
                'X-Requested-With': 'XMLHttpRequest',
                'RequestVerificationToken': requestToken
            }
        });

        return response;
    };    
});

