PageSourceSearch

https://www.servsafe.com/access/bundles/ss/surge?v=ADuJXXKIdjw86ZkzTolmaFW1oBP0nBXHXGkRMGLG--s1

js servsafe.com collected 2026-10-01 10:13:08 UTC 578,492 bytes, 8,655 lines download raw bytes

1/* Minification failed. Returning unminified contents.
2(226,317-324): run-time error JS1019: Can't have 'break' outside of loop: break a
3 */
4//----------------------------------------
5//This file contains jQuery-related fixes
6//----------------------------------------
7
8$(function () {
9    //------------------------------------
10    //Replace Admin Products link
11    //------------------------------------
12    $("a[href='/Administrators/Administrator-Products']").removeAttr("href").addClass("atest21");
13    $(".pod-container.multiple-two-container.four-column").attr("id", "admin-products");
14    $(".atest21").click(function () {
15        $('html, body').animate({
16            scrollTop: $("#admin-products").offset().top - 170
17        }, 400);
18    });
19
20    //------------------------------------
21    //Toggle show hide for Get Certified page
22    //------------------------------------
23    $('.seeMore2Toggle').hide();
24    $('#steps-link').click(function (ev) {
25        var t = ev.target
26        $('#info' + $(this).attr('target')).toggle(500, function () {
27            console.log(ev.target)
28            $(t).html($(this).is(':visible') ? 'Hide' : 'See more')
29        });
30        return false;
31    });
32    $('.seeMore2Toggle').hide();
33    $('#steps-link2').click(function (ev) {
34        var t = ev.target
35        $('#infu' + $(this).attr('target')).toggle(500, function () {
36            console.log(ev.target)
37            $(t).html($(this).is(':visible') ? 'Hide' : 'See more')
38        });
39        return false;
40    });
41});
42;
vendor: 58,851 bytes, line 43
43!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function _(){return H.apply(null,arguments)}function y(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function g(e){return void 0===e}function w(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Wt(e,t,n,s,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){var t,n,s=e._d&&!isNaN(e._d.getTime());return s&&(t=p(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict)&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function I(e){var t=l(NaN);return null!=e?E(p(t),e):p(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=_.momentProperties=[],z=!1;function q(e,t){var n,s,i,r=Z.length;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=p(t)),g(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)g(i=t[s=Z[n]])||(e[s]=i);return e}function $(e){q(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,_.updateOffset(this),z=!1)}function k(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function B(e){!1===_.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=_.deprecationHandler&&_.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=_.deprecationHandler&&_.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function a(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=a(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function o(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=o(n))&&(s[t]=e[n]);return s}var le={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var de=/\d/,t=/\d\d/,he=/\d{3}/,ce=/\d{4}/,fe=/[+-]?\d{6}/,n=/\d\d?/,me=/\d\d\d\d?/,_e=/\d\d\d\d\d\d?/,ye=/\d{1,3}/,ge=/\d{1,4}/,we=/[+-]?\d{1,6}/,pe=/\d+/,ke=/[+-]?\d+/,Me=/Z|[+-]\d\d:?\d\d/gi,ve=/Z|[+-]\d\d(?::?\d\d)?/gi,i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,u=/^[1-9]\d?/,d=/^([1-9]\d|\d)/;function h(e,n,s){Ye[e]=a(n)?n:function(e,t){return e&&s?s:n}}function De(e,t){return c(Ye,e)?Ye[e](t._strict,t._locale):new RegExp(f(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function f(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function m(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?m(e):t}var Ye={},Se={};function v(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),w(n)&&(i=function(e,t){t[n]=M(e)}),s=e.length,t=0;t<s;t++)Se[e[t]]=i}function Oe(e,i){v(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}function be(e){return e%4==0&&e%100!=0||e%400==0}var D=0,Y=1,S=2,O=3,b=4,T=5,Te=6,xe=7,Ne=8;function We(e){return be(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),h("Y",ke),h("YY",n,t),h("YYYY",ge,ce),h("YYYYY",we,fe),h("YYYYYY",we,fe),v(["YYYYY","YYYYYY"],D),v("YYYY",function(e,t){t[D]=2===e.length?_.parseTwoDigitYear(e):M(e)}),v("YY",function(e,t){t[D]=_.parseTwoDigitYear(e)}),v("Y",function(e,t){t[D]=parseInt(e,10)}),_.parseTwoDigitYear=function(e){return M(e)+(68<M(e)?1900:2e3)};var x,Pe=Re("FullYear",!0);function Re(t,n){return function(e){return null!=e?(Ue(this,t,e),_.updateOffset(this,n),this):Ce(this,t)}}function Ce(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ue(e,t,n){var s,i,r;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return i?s.setUTCMilliseconds(n):s.setMilliseconds(n);case"Seconds":return i?s.setUTCSeconds(n):s.setSeconds(n);case"Minutes":return i?s.setUTCMinutes(n):s.setMinutes(n);case"Hours":return i?s.setUTCHours(n):s.setHours(n);case"Date":return i?s.setUTCDate(n):s.setDate(n);case"FullYear":break;default:return}t=n,r=e.month(),e=29!==(e=e.date())||1!==r||be(t)?e:28,i?s.setUTCFullYear(t,r,e):s.setFullYear(t,r,e)}}function He(e,t){var n;return isNaN(e)||isNaN(t)?NaN:(n=(t%(n=12)+n)%n,e+=(t-n)/12,1==n?be(e)?29:28:31-n%7%2)}x=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),h("M",n,u),h("MM",n,t),h("MMM",function(e,t){return t.monthsShortRegex(e)}),h("MMMM",function(e,t){return t.monthsRegex(e)}),v(["M","MM"],function(e,t){t[Y]=M(e)-1}),v(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[Y]=s:p(n).invalidMonth=e});var Fe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Le="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ve=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ge=i,Ee=i;function Ae(e,t){if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(!w(t=e.localeData().monthsParse(t)))return;var n=(n=e.date())<29?n:Math.min(n,He(e.year(),t));e._isUTC?e._d.setUTCMonth(t,n):e._d.setMonth(t,n)}}function Ie(e){return null!=e?(Ae(this,e),_.updateOffset(this,!0),this):Ce(this,"Month")}function je(){function e(e,t){return t.length-e.length}for(var t,n,s=[],i=[],r=[],a=0;a<12;a++)n=l([2e3,a]),t=f(this.monthsShort(n,"")),n=f(this.months(n,"")),s.push(t),i.push(n),r.push(n),r.push(t);s.sort(e),i.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function qe(e,t,n){n=7+t-n;return n-(7+ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+qe(e,s,i),n=t<=0?We(r=e-1)+t:t>We(e)?(r=e+1,t-We(e)):(r=e,t);return{year:r,dayOfYear:n}}function Be(e,t,n){var s,i,r=qe(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+N(i=e.year()-1,t,n):r>N(e.year(),t,n)?(s=r-N(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function N(e,t,n){var s=qe(e,t,n),t=qe(e+1,t,n);return(We(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),h("w",n,u),h("ww",n,t),h("W",n,u),h("WW",n,t),Oe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=M(e)});function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),h("d",n),h("e",n),h("E",n),h("dd",function(e,t){return t.weekdaysMinRegex(e)}),h("ddd",function(e,t){return t.weekdaysShortRegex(e)}),h("dddd",function(e,t){return t.weekdaysRegex(e)}),Oe(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Oe(["d","e","E"],function(e,t,n,s){t[s]=M(e)});var Qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),et=i,tt=i,nt=i;function st(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=f(this.weekdaysMin(s,"")),n=f(this.weekdaysShort(s,"")),s=f(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function it(){return this.hours()%12||12}function rt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,it),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),rt("a",!0),rt("A",!1),h("a",at),h("A",at),h("H",n,d),h("h",n,u),h("k",n,u),h("HH",n,t),h("hh",n,t),h("kk",n,t),h("hmm",me),h("hmmss",_e),h("Hmm",me),h("Hmmss",_e),v(["H","HH"],O),v(["k","kk"],function(e,t,n){e=M(e);t[O]=24===e?0:e}),v(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),v(["h","hh"],function(e,t,n){t[O]=M(e),p(n).bigHour=!0}),v("hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s)),p(n).bigHour=!0}),v("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i)),p(n).bigHour=!0}),v("Hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s))}),v("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i))});i=Re("Hours",!0);var ot,ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Fe,monthsShort:Le,week:{dow:0,doy:6},weekdays:Qe,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},W={},lt={};function dt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=dt(e[r]).split("-")).length,n=(n=dt(e[r+1]))?n.split("-"):null;0<t;){if(s=ct(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return ot}function ct(t){var e,n;if(void 0===W[t]&&"undefined"!=typeof module&&module&&module.exports&&(n=t)&&n.match("^[^/\\\\]*$"))try{e=ot._abbr,require("./locale/"+t),ft(e)}catch(e){W[t]=null}return W[t]}function ft(e,t){return e&&((t=g(t)?P(e):mt(e,t))?ot=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function mt(e,t){if(null===t)return delete W[e],null;var n,s=ut;if(t.abbr=e,null!=W[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=W[e]._config;else if(null!=t.parentLocale)if(null!=W[t.parentLocale])s=W[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return W[e]=new K(X(s,t)),lt[e]&&lt[e].forEach(function(e){mt(e.name,e.config)}),ft(e),W[e]}function P(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ot;if(!y(e)){if(t=ct(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[Y]<0||11<t[Y]?Y:t[S]<1||t[S]>He(t[D],t[Y])?S:t[O]<0||24<t[O]||24===t[O]&&(0!==t[b]||0!==t[T]||0!==t[Te])?O:t[b]<0||59<t[b]?b:t[T]<0||59<t[T]?T:t[Te]<0||999<t[Te]?Te:-1,p(e)._overflowDayOfYear&&(t<D||S<t)&&(t=S),p(e)._overflowWeeks&&-1===t&&(t=xe),p(e)._overflowWeekday&&-1===t&&(t=Ne),p(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mt=/^\/?Date\((-?\d+)/i,vt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yt(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(p(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),xt(e)}else e._isValid=!1}}else e._isValid=!1}function St(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Le.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s=vt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(t=St(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,t,n){if(!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay())return 1;p(n).weekdayMismatch=!0,n._isValid=!1}(s[1],t,e)&&(e._a=t,e._tzm=(t=s[8],n=s[9],s=s[10],t?Dt[t]:n?0:60*(((t=parseInt(s,10))-(n=t%100))/100)+n),e._d=ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,s,i,r,a,o,u,l,d,h,c=[];if(!e._d){for(s=e,i=new Date(_.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[S]&&null==e._a[Y]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[D],Be(R(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(d=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,h=Be(R(),u,l),r=bt(i.gg,s._a[D],h.year),a=bt(i.w,h.week),null!=i.d?((o=i.d)<0||6<o)&&(d=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(d=!0)):o=u),a<1||a>N(r,u,l)?p(s)._overflowWeeks=!0:null!=d?p(s)._overflowWeekday=!0:(h=$e(r,a,o,u,l),s._a[D]=h.year,s._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[D],n[D]),(e._dayOfYear>We(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),d=ze(i,0,e._dayOfYear),e._a[Y]=d.getUTCMonth(),e._a[S]=d.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[O]&&0===e._a[b]&&0===e._a[T]&&0===e._a[Te]&&(e._nextDay=!0,e._a[O]=0),e._d=(e._useUTC?ze:Ze).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[O]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function xt(e){if(e._f===_.ISO_8601)Yt(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],d=l.length,h=0;h<d;h++)n=l[h],(t=(a.match(De(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?p(e).empty=!1:p(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(Se,s)&&Se[s](i,r._a,r,s)):e._strict&&!t&&p(e).unusedTokens.push(n);p(e).charsLeftOver=o-u,0<a.length&&p(e).unusedInput.push(a),e._a[O]<=12&&!0===p(e).bigHour&&0<e._a[O]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[O]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[O],e._meridiem),null!==(o=p(e).era)&&(e._a[D]=e._locale.erasConvertYear(o,e._a[D])),Tt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||P(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),k(i))return new $(_t(i));if(V(i))e._d=i;else if(y(r)){var a,o,u,l,d,h,c=e,f=!1,m=c._f.length;if(0===m)p(c).invalidFormat=!0,c._d=new Date(NaN);else{for(l=0;l<m;l++)d=0,h=!1,a=q({},c),null!=c._useUTC&&(a._useUTC=c._useUTC),a._f=c._f[l],xt(a),A(a)&&(h=!0),d=(d+=p(a).charsLeftOver)+10*p(a).unusedTokens.length,p(a).score=d,f?d<u&&(u=d,o=a):(null==u||d<u||h)&&(u=d,o=a,h)&&(f=!0);E(c,o||a)}}else if(r)xt(e);else if(g(r=(i=e)._i))i._d=new Date(_.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=Mt.exec(n._i))?n._d=new Date(+t[1]):(Yt(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid)&&(delete n._isValid,n._strict?n._isValid=!1:_.createFromInputFallback(n)))):y(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),Tt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),Tt(t)):w(r)?i._d=new Date(r):_.createFromInputFallback(i);return A(e)||(e._d=null),e}function Wt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||y(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new $(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function R(e,t,n,s){return Wt(e,t,n,s,!1)}_.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),_.ISO_8601=function(){},_.RFC_2822=function(){};me=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),_e=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Pt(e,t){var n,s;if(!(t=1===t.length&&y(t[0])?t[0]:t).length)return R();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Rt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Rt.length;for(t in e)if(c(e,t)&&(-1===x.call(Rt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Rt[n]]){if(s)return!1;parseFloat(e[Rt[n]])!==M(e[Rt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=P(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),h("Z",ve),h("ZZ",ve),v(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(ve,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+M(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(k(e)||V(e)?e:R(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),_.updateOffset(t,!1),t):R(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}_.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:w(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(t=It.exec(e))?(n="-"===t[1]?-1:1,s={y:0,d:M(t[S])*n,h:M(t[O])*n,m:M(t[b])*n,s:M(t[T])*n,ms:M(Ht(1e3*t[Te]))*n}):(t=jt.exec(e))?(n="-"===t[1]?-1:1,s={y:Zt(t[2],n),M:Zt(t[3],n),w:Zt(t[4],n),d:Zt(t[5],n),h:Zt(t[6],n),m:Zt(t[7],n),s:Zt(t[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(R(s.from),R(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),n=new Ct(s),Ut(e)&&c(e,"_locale")&&(n._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(n._isValid=e._isValid),n}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,C(e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ae(e,Ce(e,"Month")+t*n),r&&Ue(e,"Date",Ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s)&&_.updateOffset(e,r||t)}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Fe=qt(1,"add"),Qe=qt(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return k(e)||V(e)||Bt(e)||w(e)||function(t){var e=y(t),n=!1;e&&(n=0===t.filter(function(e){return!w(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){var n,s;return e.date()<t.date()?-Qt(t,e):-((n=12*(t.year()-e.year())+(t.month()-e.month()))+(t-(s=e.clone().add(n,"months"))<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s)))||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=P(e))&&(this._locale=e),this)}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Ke=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e,t,n,s=[],i=[],r=[],a=[],o=this.eras(),u=0,l=o.length;u<l;++u)e=f(o[u].name),t=f(o[u].abbr),n=f(o[u].narrow),i.push(e),s.push(t),r.push(n),a.push(e),a.push(t),a.push(n);this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?Be(this,s,i).year:(r=N(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),h("N",rn),h("NN",rn),h("NNN",rn),h("NNNN",function(e,t){return t.erasNameRegex(e)}),h("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),v(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?p(n).era=s:p(n).invalidEra=e}),h("y",pe),h("yy",pe),h("yyy",pe),h("yyyy",pe),h("yo",function(e,t){return t._eraYearOrdinalRegex||pe}),v(["y","yy","yyy","yyyy"],D),v(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[D]=n._locale.eraYearOrdinalParse(e,i):t[D]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),h("G",ke),h("g",ke),h("GG",n,t),h("gg",n,t),h("GGGG",ge,ce),h("gggg",ge,ce),h("GGGGG",we,fe),h("ggggg",we,fe),Oe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=M(e)}),Oe(["gg","GG"],function(e,t,n,s){t[s]=_.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),h("Q",de),v("Q",function(e,t){t[Y]=3*(M(e)-1)}),s("D",["DD",2],"Do","date"),h("D",n,u),h("DD",n,t),h("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),v(["D","DD"],S),v("Do",function(e,t){t[S]=M(e.match(n)[0])});ge=Re("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),h("DDD",ye),h("DDDD",he),v(["DDD","DDDD"],function(e,t,n){n._dayOfYear=M(e)}),s("m",["mm",2],0,"minute"),h("m",n,d),h("mm",n,t),v(["m","mm"],b);var ln,ce=Re("Minutes",!1),we=(s("s",["ss",2],0,"second"),h("s",n,d),h("ss",n,t),v(["s","ss"],T),Re("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),h("S",ye,de),h("SS",ye,t),h("SSS",ye,he),ln="SSSS";ln.length<=9;ln+="S")h(ln,pe);function dn(e,t){t[Te]=M(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")v(ln,dn);fe=Re("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");u=$.prototype;function hn(e){return e}u.add=Fe,u.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||R(),n=Gt(e,this).startOf("day"),n=_.calendarFormat(this,n)||"sameElse",t=t&&(a(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,R(e)))},u.clone=function(){return new $(this)},u.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=o(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:m(r)},u.endOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1;break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.format=function(e){return e=e||(this.isUtc()?_.defaultFormatUtc:_.defaultFormat),e=re(this,e),this.localeData().postformat(e)},u.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.fromNow=function(e){return this.from(R(),e)},u.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.toNow=function(e){return this.to(R(),e)},u.get=function(e){return a(this[e=o(e)])?this[e]():this},u.invalidAt=function(){return p(this).overflow},u.isAfter=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},u.isBefore=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},u.isBetween=function(e,t,n,s){return e=k(e)?e:R(e),t=k(t)?t:R(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},u.isSame=function(e,t){var e=k(e)?e:R(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},u.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},u.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},u.isValid=function(){return A(this)},u.lang=Ke,u.locale=Xt,u.localeData=Kt,u.max=_e,u.min=me,u.parsingFlags=function(){return E({},p(this))},u.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(a(this[e=o(e)]))return this[e](t);return this},u.startOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3);break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.subtract=Qe,u.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},u.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(e){var t;return this.isValid()?(t=(e=!0!==e)?this.clone().utc():this).year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):a(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ"):null},u.inspect=function(){var e,t,n;return this.isValid()?(t="moment",e="",this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z"),t="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+n+"-MM-DD[T]HH:mm:ss.SSS"+(e+'[")]'))):"moment.invalid(/* "+this._i+" */)"},"undefined"!=typeof Symbol&&null!=Symbol.for&&(u[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},u.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},u.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},u.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-_(n[s].since).year())*e+n[s].offset;return this.year()},u.year=Pe,u.isLeapYear=function(){return be(this.year())},u.weekYear=function(e){return un.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},u.month=Ie,u.daysInMonth=function(){return He(this.year(),this.month())},u.week=u.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},u.isoWeek=u.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},u.weeksInYear=function(){var e=this.localeData()._week;return N(this.year(),e.dow,e.doy)},u.weeksInWeekYear=function(){var e=this.localeData()._week;return N(this.weekYear(),e.dow,e.doy)},u.isoWeeksInYear=function(){return N(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return N(this.isoWeekYear(),1,4)},u.date=ge,u.day=u.days=function(e){var t,n,s;return this.isValid()?(t=Ce(this,"Day"),null!=e?(n=e,s=this.localeData(),e="string"!=typeof n?n:isNaN(n)?"number"==typeof(n=s.weekdaysParse(n))?n:null:parseInt(n,10),this.add(e-t,"d")):t):null!=e?this:NaN},u.weekday=function(e){var t;return this.isValid()?(t=(this.day()+7-this.localeData()._week.dow)%7,null==e?t:this.add(e-t,"d")):null!=e?this:NaN},u.isoWeekday=function(e){var t,n;return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN},u.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},u.hour=u.hours=i,u.minute=u.minutes=ce,u.second=u.seconds=we,u.millisecond=u.milliseconds=fe,u.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(e){return this.utcOffset(0,e)},u.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Et(this),"m"),this},u.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Me,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?R(e).utcOffset():0,(this.utcOffset()-e)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",ge),u.months=e("months accessor is deprecated. Use month instead",Ie),u.years=e("years accessor is deprecated. Use year instead",Pe),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&M(e[a])!==M(t[a]))&&r++;return r+i}(e._a,t.toArray())):this._isDSTShifted=!1),this._isDSTShifted});d=K.prototype;function cn(e,t,n,s){var i=P(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(w(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?w(t)&&(n=t,t=void 0):(t=e,e=!1,w(n=t)&&(n=t,t=void 0)),t||"");var i,r=P(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}d.calendar=function(e,t,n){return a(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},d.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},d.invalidDate=function(){return this._invalidDate},d.ordinal=function(e){return this._ordinal.replace("%d",e)},d.preparse=hn,d.postformat=hn,d.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return a(i)?i(e,t,n,s):i.replace(/%d/i,e)},d.pastFuture=function(e,t){return a(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},d.set=function(e){var t,n;for(n in e)c(e,n)&&(a(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},d.eras=function(e,t){for(var n,s=this._eras||P("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=_(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=_(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},d.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},d.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?_(e.since).year():_(e.since).year()+(t-e.offset)*n},d.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},d.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},d.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},d.months=function(e,t){return e?(y(this._months)?this._months:this._months[(this._months.isFormat||Ve).test(t)?"format":"standalone"])[e.month()]:y(this._months)?this._months:this._months.standalone},d.monthsShort=function(e,t){return e?(y(this._monthsShort)?this._monthsShort:this._monthsShort[Ve.test(t)?"format":"standalone"])[e.month()]:y(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},d.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))||-1!==(i=x.call(this._longMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))||-1!==(i=x.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},d.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},d.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Ge),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},d.week=function(e){return Be(e,this._week.dow,this._week.doy).week},d.firstDayOfYear=function(){return this._week.doy},d.firstDayOfWeek=function(){return this._week.dow},d.weekdays=function(e,t){return t=y(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Je(t,this._week.dow):e?t[e.day()]:t},d.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},d.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},d.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},d.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},d.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},d.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},d.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},d.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ft("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===M(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),_.lang=e("moment.lang is deprecated. Use moment.locale instead.",ft),_.langData=e("moment.langData is deprecated. Use moment.localeData instead.",P);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}de=kn("ms"),t=kn("s"),ye=kn("m"),he=kn("h"),Fe=kn("d"),_e=kn("w"),me=kn("M"),Qe=kn("Q"),i=kn("y"),ce=de;function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var we=Mn("milliseconds"),fe=Mn("seconds"),ge=Mn("minutes"),Pe=Mn("hours"),d=Mn("days"),vn=Mn("months"),Dn=Mn("years");var Yn=Math.round,Sn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function On(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),d=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||(a<=1?["m"]:a<n.m&&["mm",a])||(o<=1?["h"]:o<n.h&&["hh",o])||(u<=1?["d"]:u<n.d&&["dd",u]);return(r=(r=null!=n.w?r||(d<=1?["w"]:d<n.w&&["ww",d]):r)||(l<=1?["M"]:l<n.M&&["MM",l])||(i<=1?["y"]:["yy",i]))[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var bn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function xn(){var e,t,n,s,i,r,a,o,u,l,d;return this.isValid()?(e=bn(this._milliseconds)/1e3,t=bn(this._days),n=bn(this._months),(o=this.asSeconds())?(s=m(e/60),i=m(s/60),e%=60,s%=60,r=m(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=Tn(this._months)!==Tn(o)?"-":"",l=Tn(this._days)!==Tn(o)?"-":"",d=Tn(this._milliseconds)!==Tn(o)?"-":"",(o<0?"-":"")+"P"+(r?u+r+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(i||s||e?"T":"")+(i?d+i+"H":"")+(s?d+s+"M":"")+(e?d+a+"S":"")):"P0D"):this.localeData().invalidDate()}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=o(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=de,U.asSeconds=t,U.asMinutes=ye,U.asHours=he,U.asDays=Fe,U.asWeeks=_e,U.asMonths=me,U.asQuarters=Qe,U.asYears=i,U.valueOf=ce,U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=m(e/1e3),s.seconds=e%60,e=m(e/60),s.minutes=e%60,e=m(e/60),s.hours=e%24,t+=m(e/24),n+=e=m(wn(t)),t-=gn(pn(e)),e=m(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=o(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=we,U.seconds=fe,U.minutes=ge,U.hours=Pe,U.days=d,U.weeks=function(){return m(this.days()/7)},U.months=vn,U.years=Dn,U.humanize=function(e,t){var n,s;return this.isValid()?(n=!1,s=Sn,"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},Sn,t),null!=t.s)&&null==t.ss&&(s.ss=t.s-1),e=this.localeData(),t=On(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)):this.localeData().invalidDate()},U.toISOString=xn,U.toString=xn,U.toJSON=xn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xn),U.lang=Ke,s("X",0,0,"unix"),s("x",0,0,"valueOf"),h("x",ke),h("X",/[+-]?\d+(\.\d{1,3})?/),v("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),v("x",function(e,t,n){n._d=new Date(M(e))}),_.version="2.30.1",H=R,_.fn=u,_.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},_.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},_.now=function(){return Date.now?Date.now():+new Date},_.utc=l,_.unix=function(e){return R(1e3*e)},_.months=function(e,t){return fn(e,t,"months")},_.isDate=V,_.locale=ft,_.invalid=I,_.duration=C,_.isMoment=k,_.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},_.parseZone=function(){return R.apply(null,arguments).parseZone()},_.localeData=P,_.isDuration=Ut,_.monthsShort=function(e,t){return fn(e,t,"monthsShort")},_.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},_.defineLocale=mt,_.updateLocale=function(e,t){var n,s;return null!=t?(s=ut,null!=W[e]&&null!=W[e].parentLocale?W[e].set(X(W[e]._config,t)):(t=X(s=null!=(n=ct(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=W[e],W[e]=s),ft(e)):null!=W[e]&&(null!=W[e].parentLocale?(W[e]=W[e].parentLocale,e===ft()&&ft(e)):null!=W[e]&&delete W[e]),W[e]},_.locales=function(){return ee(W)},_.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},_.normalizeUnits=o,_.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},_.relativeTimeThreshold=function(e,t){return void 0!==Sn[e]&&(void 0===t?Sn[e]:(Sn[e]=t,"s"===e&&(Sn.ss=t-1),!0))},_.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},_.prototype=u,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},_});
43
44//# sourceMappingURL=moment.min.js.map;
vendor: 37,970 bytes, line 45
45!function(e){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],e);else if("object"==typeof exports)module.exports=e(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";e(jQuery,moment)}}(function($,_){"use strict";if(!_)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");function i(i,p){function a(){return void 0!==_.tz&&void 0!==p.timeZone&&null!==p.timeZone&&""!==p.timeZone}function c(e){var t;return t=null==e?_():_.isDate(e)||_.isMoment(e)?_(e):a()?_.tz(e,B,p.useStrict,p.timeZone):_(e,B,p.useStrict),a()&&t.tz(p.timeZone),t}function d(e){if("string"!=typeof e||1<e.length)throw new TypeError("isEnabled expects a single character string parameter");switch(e){case"y":return-1!==q.indexOf("Y");case"M":return-1!==q.indexOf("M");case"d":return-1!==q.toLowerCase().indexOf("d");case"h":case"H":return-1!==q.toLowerCase().indexOf("h");case"m":return-1!==q.indexOf("m");case"s":return-1!==q.indexOf("s");default:return!1}}function l(){return d("h")||d("m")||d("s")}function u(){return d("y")||d("M")||d("d")}function f(){var e,t,a,n=$("<div>").addClass("timepicker-hours").append($("<table>").addClass("table-condensed")),r=$("<div>").addClass("timepicker-minutes").append($("<table>").addClass("table-condensed")),i=$("<div>").addClass("timepicker-seconds").append($("<table>").addClass("table-condensed")),o=[(e=$("<tr>"),t=$("<tr>"),a=$("<tr>"),d("h")&&(e.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append($("<span>").addClass(p.icons.up)))),t.append($("<td>").append($("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:p.tooltips.pickHour}).attr("data-action","showHours"))),a.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append($("<span>").addClass(p.icons.down))))),d("m")&&(d("h")&&(e.append($("<td>").addClass("separator")),t.append($("<td>").addClass("separator").html(":")),a.append($("<td>").addClass("separator"))),e.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append($("<span>").addClass(p.icons.up)))),t.append($("<td>").append($("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:p.tooltips.pickMinute}).attr("data-action","showMinutes"))),a.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append($("<span>").addClass(p.icons.down))))),d("s")&&(d("m")&&(e.append($("<td>").addClass("separator")),t.append($("<td>").addClass("separator").html(":")),a.append($("<td>").addClass("separator"))),e.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append($("<span>").addClass(p.icons.up)))),t.append($("<td>").append($("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:p.tooltips.pickSecond}).attr("data-action","showSeconds"))),a.append($("<td>").append($("<a>").attr({href:"#",tabindex:"-1",title:p.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append($("<span>").addClass(p.icons.down))))),Y||(e.append($("<td>").addClass("separator")),t.append($("<td>").append($("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:p.tooltips.togglePeriod}))),a.append($("<td>").addClass("separator"))),$("<div>").addClass("timepicker-picker").append($("<table>").addClass("table-condensed").append([e,t,a])))];return d("h")&&o.push(n),d("m")&&o.push(r),d("s")&&o.push(i),o}function t(){var e,t,a,n=$("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),r=$("<div>").addClass("datepicker").append((t=$("<thead>").append($("<tr>").append($("<th>").addClass("prev").attr("data-action","previous").append($("<span>").addClass(p.icons.previous))).append($("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",p.calendarWeeks?"6":"5")).append($("<th>").addClass("next").attr("data-action","next").append($("<span>").addClass(p.icons.next)))),a=$("<tbody>").append($("<tr>").append($("<td>").attr("colspan",p.calendarWeeks?"8":"7"))),[$("<div>").addClass("datepicker-days").append($("<table>").addClass("table-condensed").append(t).append($("<tbody>"))),$("<div>").addClass("datepicker-months").append($("<table>").addClass("table-condensed").append(t.clone()).append(a.clone())),$("<div>").addClass("datepicker-years").append($("<table>").addClass("table-condensed").append(t.clone()).append(a.clone())),$("<div>").addClass("datepicker-decades").append($("<table>").addClass("table-condensed").append(t.clone()).append(a.clone()))])),i=$("<div>").addClass("timepicker").append(f()),o=$("<ul>").addClass("list-unstyled"),s=$("<li>").addClass("picker-switch"+(p.collapse?" accordion-toggle":"")).append((e=[],p.showTodayButton&&e.push($("<td>").append($("<a>").attr({"data-action":"today",title:p.tooltips.today}).append($("<span>").addClass(p.icons.today)))),!p.sideBySide&&u()&&l()&&e.push($("<td>").append($("<a>").attr({"data-action":"togglePicker",title:p.tooltips.selectTime}).append($("<span>").addClass(p.icons.time)))),p.showClear&&e.push($("<td>").append($("<a>").attr({"data-action":"clear",title:p.tooltips.clear}).append($("<span>").addClass(p.icons.clear)))),p.showClose&&e.push($("<td>").append($("<a>").attr({"data-action":"close",title:p.tooltips.close}).append($("<span>").addClass(p.icons.close)))),$("<table>").addClass("table-condensed").append($("<tbody>").append($("<tr>").append(e)))));return p.inline&&n.removeClass("dropdown-menu"),Y&&n.addClass("usetwentyfour"),d("s")&&!Y&&n.addClass("wider"),p.sideBySide&&u()&&l()?(n.addClass("timepicker-sbs"),"top"===p.toolbarPlacement&&n.append(s),n.append($("<div>").addClass("row").append(r.addClass("col-md-6")).append(i.addClass("col-md-6"))),"bottom"===p.toolbarPlacement&&n.append(s),n):("top"===p.toolbarPlacement&&o.append(s),u()&&o.append($("<li>").addClass(p.collapse&&l()?"collapse in":"").append(r)),"default"===p.toolbarPlacement&&o.append(s),l()&&o.append($("<li>").addClass(p.collapse&&u()?"collapse":"").append(i)),"bottom"===p.toolbarPlacement&&o.append(s),n.append(o))}function n(){var e,t=(z||i).position(),a=(z||i).offset(),n=p.widgetPositioning.vertical,r=p.widgetPositioning.horizontal;if(p.widgetParent)e=p.widgetParent.append(N);else if(i.is("input"))e=i.after(N).parent();else{if(p.inline)return void(e=i.append(N));(e=i).children().first().after(N)}if("auto"===n&&(n=a.top+1.5*N.height()>=$(window).height()+$(window).scrollTop()&&N.height()+i.outerHeight()<a.top?"top":"bottom"),"auto"===r&&(r=e.width()<a.left+N.outerWidth()/2&&a.left+N.outerWidth()>$(window).width()?"right":"left"),"top"===n?N.addClass("top").removeClass("bottom"):N.addClass("bottom").removeClass("top"),"right"===r?N.addClass("pull-right"):N.removeClass("pull-right"),"static"===e.css("position")&&(e=e.parents().filter(function(){return"static"!==$(this).css("position")}).first()),0===e.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");N.css({top:"top"===n?"auto":t.top+i.outerHeight(),bottom:"top"===n?e.outerHeight()-(e===i?0:t.top):"auto",left:"left"===r?e===i?0:t.left:"auto",right:"left"===r?"auto":e.outerWidth()-i.outerWidth()-(e===i?0:t.left)})}function h(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||i.trigger(e)}function r(e){"y"===e&&(e="YYYY"),h({type:"dp.update",change:e,viewDate:H.clone()})}function o(e){N&&(e&&(j=Math.max(V,Math.min(3,j+e))),N.find(".datepicker > div").hide().filter(".datepicker-"+Z[j].clsName).show())}function m(e,t){var a,n,r,i;if(e.isValid()&&!(p.disabledDates&&"d"===t&&(a=e,!0===p.disabledDates[a.format("YYYY-MM-DD")])||p.enabledDates&&"d"===t&&(n=e,!0!==p.enabledDates[n.format("YYYY-MM-DD")])||p.minDate&&e.isBefore(p.minDate,t)||p.maxDate&&e.isAfter(p.maxDate,t)||p.daysOfWeekDisabled&&"d"===t&&-1!==p.daysOfWeekDisabled.indexOf(e.day())||p.disabledHours&&("h"===t||"m"===t||"s"===t)&&(r=e,!0===p.disabledHours[r.format("H")])||p.enabledHours&&("h"===t||"m"===t||"s"===t)&&(i=e,!0!==p.enabledHours[i.format("H")]))){if(p.disabledTimeIntervals&&("h"===t||"m"===t||"s"===t)){var o=!1;if($.each(p.disabledTimeIntervals,function(){if(e.isBetween(this[0],this[1]))return!(o=!0)}),o)return}return 1}}function s(){var e,t,a,n=N.find(".datepicker-days"),r=n.find("th"),i=[],o=[];if(u()){for(r.eq(0).find("span").attr("title",p.tooltips.prevMonth),r.eq(1).attr("title",p.tooltips.selectMonth),r.eq(2).find("span").attr("title",p.tooltips.nextMonth),n.find(".disabled").removeClass("disabled"),r.eq(1).text(H.format(p.dayViewHeaderFormat)),m(H.clone().subtract(1,"M"),"M")||r.eq(0).addClass("disabled"),m(H.clone().add(1,"M"),"M")||r.eq(2).addClass("disabled"),e=H.clone().startOf("M").startOf("w").startOf("d"),a=0;a<42;a++)0===e.weekday()&&(t=$("<tr>"),p.calendarWeeks&&t.append('<td class="cw">'+e.week()+"</td>"),i.push(t)),o=["day"],e.isBefore(H,"M")&&o.push("old"),e.isAfter(H,"M")&&o.push("new"),e.isSame(E,"d")&&!W&&o.push("active"),m(e,"d")||o.push("disabled"),e.isSame(c(),"d")&&o.push("today"),0!==e.day()&&6!==e.day()||o.push("weekend"),h({type:"dp.classify",date:e,classNames:o}),t.append('<td data-action="selectDay" data-day="'+e.format("L")+'" class="'+o.join(" ")+'">'+e.date()+"</td>"),e.add(1,"d");var s,d,l;n.find("tbody").empty().append(i),s=N.find(".datepicker-months"),d=s.find("th"),l=s.find("tbody").find("span"),d.eq(0).find("span").attr("title",p.tooltips.prevYear),d.eq(1).attr("title",p.tooltips.selectYear),d.eq(2).find("span").attr("title",p.tooltips.nextYear),s.find(".disabled").removeClass("disabled"),m(H.clone().subtract(1,"y"),"y")||d.eq(0).addClass("disabled"),d.eq(1).text(H.year()),m(H.clone().add(1,"y"),"y")||d.eq(2).addClass("disabled"),l.removeClass("active"),E.isSame(H,"y")&&!W&&l.eq(E.month()).addClass("active"),l.each(function(e){m(H.clone().month(e),"M")||$(this).addClass("disabled")}),function(){var e=N.find(".datepicker-years"),t=e.find("th"),a=H.clone().subtract(5,"y"),n=H.clone().add(6,"y"),r="";for(t.eq(0).find("span").attr("title",p.tooltips.prevDecade),t.eq(1).attr("title",p.tooltips.selectDecade),t.eq(2).find("span").attr("title",p.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),p.minDate&&p.minDate.isAfter(a,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(a.year()+"-"+n.year()),p.maxDate&&p.maxDate.isBefore(n,"y")&&t.eq(2).addClass("disabled");!a.isAfter(n,"y");)r+='<span data-action="selectYear" class="year'+(a.isSame(E,"y")&&!W?" active":"")+(m(a,"y")?"":" disabled")+'">'+a.year()+"</span>",a.add(1,"y");e.find("td").html(r)}(),function(){var e,t=N.find(".datepicker-decades"),a=t.find("th"),n=_({y:H.year()-H.year()%100-1}),r=n.clone().add(100,"y"),i=n.clone(),o=!1,s=!1,d="";for(a.eq(0).find("span").attr("title",p.tooltips.prevCentury),a.eq(2).find("span").attr("title",p.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(n.isSame(_({y:1900}))||p.minDate&&p.minDate.isAfter(n,"y"))&&a.eq(0).addClass("disabled"),a.eq(1).text(n.year()+"-"+r.year()),(n.isSame(_({y:2e3}))||p.maxDate&&p.maxDate.isBefore(r,"y"))&&a.eq(2).addClass("disabled");!n.isAfter(r,"y");)e=n.year()+12,o=p.minDate&&p.minDate.isAfter(n,"y")&&p.minDate.year()<=e,s=p.maxDate&&p.maxDate.isAfter(n,"y")&&p.maxDate.year()<=e,d+='<span data-action="selectDecade" class="decade'+(E.isAfter(n)&&E.year()<=e?" active":"")+(m(n,"y")||o||s?"":" disabled")+'" data-selection="'+(n.year()+6)+'">'+(n.year()+1)+" - "+(n.year()+12)+"</span>",n.add(12,"y");d+="<span></span><span></span><span></span>",t.find("td").html(d),a.eq(1).text(i.year()+1+"-"+n.year())}()}}function e(){var e,t,a=N.find(".timepicker span[data-time-component]");Y||(e=N.find(".timepicker [data-action=togglePeriod]"),t=E.clone().add(12<=E.hours()?-12:12,"h"),e.text(E.format("A")),m(t,"h")?e.removeClass("disabled"):e.addClass("disabled")),a.filter("[data-time-component=hours]").text(E.format(Y?"HH":"hh")),a.filter("[data-time-component=minutes]").text(E.format("mm")),a.filter("[data-time-component=seconds]").text(E.format("ss")),function(){var e=N.find(".timepicker-hours table"),t=H.clone().startOf("d"),a=[],n=$("<tr>");for(11<H.hour()&&!Y&&t.hour(12);t.isSame(H,"d")&&(Y||H.hour()<12&&t.hour()<12||11<H.hour());)t.hour()%4==0&&(n=$("<tr>"),a.push(n)),n.append('<td data-action="selectHour" class="hour'+(m(t,"h")?"":" disabled")+'">'+t.format(Y?"HH":"hh")+"</td>"),t.add(1,"h");e.empty().append(a)}(),function(){for(var e=N.find(".timepicker-minutes table"),t=H.clone().startOf("h"),a=[],n=$("<tr>"),r=1===p.stepping?5:p.stepping;H.isSame(t,"h");)t.minute()%(4*r)==0&&(n=$("<tr>"),a.push(n)),n.append('<td data-action="selectMinute" class="minute'+(m(t,"m")?"":" disabled")+'">'+t.format("mm")+"</td>"),t.add(r,"m");e.empty().append(a)}(),function(){for(var e=N.find(".timepicker-seconds table"),t=H.clone().startOf("m"),a=[],n=$("<tr>");H.isSame(t,"m");)t.second()%20==0&&(n=$("<tr>"),a.push(n)),n.append('<td data-action="selectSecond" class="second'+(m(t,"s")?"":" disabled")+'">'+t.format("ss")+"</td>"),t.add(5,"s");e.empty().append(a)}()}function y(){N&&(s(),e())}function g(e){var t=W?null:E;if(!e)return W=!0,I.val(""),i.data("date",""),h({type:"dp.change",date:!1,oldDate:t}),void y();if(e=e.clone().locale(p.locale),a()&&e.tz(p.timeZone),1!==p.stepping)for(e.minutes(Math.round(e.minutes()/p.stepping)*p.stepping).seconds(0);p.minDate&&e.isBefore(p.minDate);)e.add(p.stepping,"minutes");m(e)?(H=(E=e).clone(),I.val(E.format(q)),i.data("date",E.format(q)),W=!1,y(),h({type:"dp.change",date:E.clone(),oldDate:t})):(p.keepInvalid?h({type:"dp.change",date:e,oldDate:t}):I.val(W?"":E.format(q)),h({type:"dp.error",date:e,oldDate:t}))}function b(){var t=!1;return N?(N.find(".collapse").each(function(){var e=$(this).data("collapse");return!e||!e.transitioning||!(t=!0)}),t||(z&&z.hasClass("btn")&&z.toggleClass("active"),N.hide(),$(window).off("resize",n),N.off("click","[data-action]"),N.off("mousedown",!1),N.remove(),N=!1,h({type:"dp.hide",date:E.clone()}),I.blur(),H=E.clone()),L):L}function w(){g(null)}function v(e){return void 0===p.parseInputDate?(!_.isMoment(e)||e instanceof Date)&&(e=c(e)):e=p.parseInputDate(e),e}function k(e){return $(e.currentTarget).is(".disabled")||X[$(e.currentTarget).data("action")].apply(L,arguments),!1}function D(){var e;return I.prop("disabled")||!p.ignoreReadonly&&I.prop("readonly")||N||(void 0!==I.val()&&0!==I.val().trim().length?g(v(I.val().trim())):W&&p.useCurrent&&(p.inline||I.is("input")&&0===I.val().trim().length)&&(e=c(),"string"==typeof p.useCurrent&&(e={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[p.useCurrent](e)),g(e)),N=t(),function(){var e=$("<tr>"),t=H.clone().startOf("w").startOf("d");for(!0===p.calendarWeeks&&e.append($("<th>").addClass("cw").text("#"));t.isBefore(H.clone().endOf("w"));)e.append($("<th>").addClass("dow").text(t.format("dd"))),t.add(1,"d");N.find(".datepicker-days thead").append(e)}(),function(){for(var e=[],t=H.clone().startOf("y").startOf("d");t.isSame(H,"y");)e.push($("<span>").attr("data-action","selectMonth").addClass("month").text(t.format("MMM"))),t.add(1,"M");N.find(".datepicker-months td").empty().append(e)}(),N.find(".timepicker-hours").hide(),N.find(".timepicker-minutes").hide(),N.find(".timepicker-seconds").hide(),y(),o(),$(window).on("resize",n),N.on("click","[data-action]",k),N.on("mousedown",!1),z&&z.hasClass("btn")&&z.toggleClass("active"),n(),N.show(),p.focusOnShow&&!I.is(":focus")&&I.focus(),h({type:"dp.show"})),L}function C(){return(N?b:D)()}function x(e){var t,a,n,r,i=null,o=[],s={},d=e.which;for(t in K[d]="p",K)K.hasOwnProperty(t)&&"p"===K[t]&&(o.push(t),parseInt(t,10)!==d&&(s[t]=!0));for(t in p.keyBinds)if(p.keyBinds.hasOwnProperty(t)&&"function"==typeof p.keyBinds[t]&&(n=t.split(" ")).length===o.length&&J[d]===n[n.length-1]){for(r=!0,a=n.length-2;0<=a;a--)if(!(J[n[a]]in s)){r=!1;break}if(r){i=p.keyBinds[t];break}}i&&(i.call(L,N),e.stopPropagation(),e.preventDefault())}function T(e){K[e.which]="r",e.stopPropagation(),e.preventDefault()}function M(e){var t=$(e.target).val().trim(),a=t?v(t):null;return g(a),e.stopImmediatePropagation(),!1}function S(e){var t={};return $.each(e,function(){var e=v(this);e.isValid()&&(t[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(t).length&&t}function O(e){var t={};return $.each(e,function(){t[this]=!0}),!!Object.keys(t).length&&t}function P(){var e=p.format||"L LT";q=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(E.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return E.localeData().longDateFormat(e)||e})}),(B=p.extraFormats?p.extraFormats.slice():[]).indexOf(e)<0&&B.indexOf(q)<0&&B.push(q),Y=q.toLowerCase().indexOf("a")<1&&q.replace(/\[.*?\]/g,"").indexOf("h")<1,d("y")&&(V=2),d("M")&&(V=1),d("d")&&(V=0),j=Math.max(V,j),W||g(E)}var E,H,I,Y,q,B,j,A,F,L={},W=!0,z=!1,N=!1,V=0,Z=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],R=["days","months","years","decades"],Q=["top","bottom","auto"],U=["left","right","auto"],G=["default","top","bottom"],J={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},K={},X={next:function(){var e=Z[j].navFnc;H.add(Z[j].navStep,e),s(),r(e)},previous:function(){var e=Z[j].navFnc;H.subtract(Z[j].navStep,e),s(),r(e)},pickerSwitch:function(){o(1)},selectMonth:function(e){var t=$(e.target).closest("tbody").find("span").index($(e.target));H.month(t),j===V?(g(E.clone().year(H.year()).month(H.month())),p.inline||b()):(o(-1),s()),r("M")},selectYear:function(e){var t=parseInt($(e.target).text(),10)||0;H.year(t),j===V?(g(E.clone().year(H.year())),p.inline||b()):(o(-1),s()),r("YYYY")},selectDecade:function(e){var t=parseInt($(e.target).data("selection"),10)||0;H.year(t),j===V?(g(E.clone().year(H.year())),p.inline||b()):(o(-1),s()),r("YYYY")},selectDay:function(e){var t=H.clone();$(e.target).is(".old")&&t.subtract(1,"M"),$(e.target).is(".new")&&t.add(1,"M"),g(t.date(parseInt($(e.target).text(),10))),l()||p.keepOpen||p.inline||b()},incrementHours:function(){var e=E.clone().add(1,"h");m(e,"h")&&g(e)},incrementMinutes:function(){var e=E.clone().add(p.stepping,"m");m(e,"m")&&g(e)},incrementSeconds:function(){var e=E.clone().add(1,"s");m(e,"s")&&g(e)},decrementHours:function(){var e=E.clone().subtract(1,"h");m(e,"h")&&g(e)},decrementMinutes:function(){var e=E.clone().subtract(p.stepping,"m");m(e,"m")&&g(e)},decrementSeconds:function(){var e=E.clone().subtract(1,"s");m(e,"s")&&g(e)},togglePeriod:function(){g(E.clone().add(12<=E.hours()?-12:12,"h"))},togglePicker:function(e){var t,a=$(e.target),n=a.closest("ul"),r=n.find(".in"),i=n.find(".collapse:not(.in)");if(r&&r.length){if((t=r.data("collapse"))&&t.transitioning)return;r.collapse?(r.collapse("hide"),i.collapse("show")):(r.removeClass("in"),i.addClass("in")),a.is("span")?a.toggleClass(p.icons.time+" "+p.icons.date):a.find("span").toggleClass(p.icons.time+" "+p.icons.date)}},showPicker:function(){N.find(".timepicker > div:not(.timepicker-picker)").hide(),N.find(".timepicker .timepicker-picker").show()},showHours:function(){N.find(".timepicker .timepicker-picker").hide(),N.find(".timepicker .timepicker-hours").show()},showMinutes:function(){N.find(".timepicker .timepicker-picker").hide(),N.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){N.find(".timepicker .timepicker-picker").hide(),N.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var t=parseInt($(e.target).text(),10);Y||(12<=E.hours()?12!==t&&(t+=12):12===t&&(t=0)),g(E.clone().hours(t)),X.showPicker.call(L)},selectMinute:function(e){g(E.clone().minutes(parseInt($(e.target).text(),10))),X.showPicker.call(L)},selectSecond:function(e){g(E.clone().seconds(parseInt($(e.target).text(),10))),X.showPicker.call(L)},clear:w,today:function(){var e=c();m(e,"d")&&g(e)},close:b};if(L.destroy=function(){b(),I.off({change:M,blur:blur,keydown:x,keyup:T,focus:p.allowInputToggle?b:""}),i.is("input")?I.off({focus:D}):z&&(z.off("click",C),z.off("mousedown",!1)),i.removeData("DateTimePicker"),i.removeData("date")},L.toggle=C,L.show=D,L.hide=b,L.disable=function(){return b(),z&&z.hasClass("btn")&&z.addClass("disabled"),I.prop("disabled",!0),L},L.enable=function(){return z&&z.hasClass("btn")&&z.removeClass("disabled"),I.prop("disabled",!1),L},L.ignoreReadonly=function(e){if(0===arguments.length)return p.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return p.ignoreReadonly=e,L},L.options=function(e){if(0===arguments.length)return $.extend(!0,{},p);if(!(e instanceof Object))throw new TypeError("options() options parameter should be an object");return $.extend(!0,p,e),$.each(p,function(e,t){if(void 0===L[e])throw new TypeError("option "+e+" is not recognized!");L[e](t)}),L},L.date=function(e){if(0===arguments.length)return W?null:E.clone();if(!(null===e||"string"==typeof e||_.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return g(null===e?null:v(e)),L},L.format=function(e){if(0===arguments.length)return p.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return p.format=e,q&&P(),L},L.timeZone=function(e){if(0===arguments.length)return p.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return p.timeZone=e,L},L.dayViewHeaderFormat=function(e){if(0===arguments.length)return p.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return p.dayViewHeaderFormat=e,L},L.extraFormats=function(e){if(0===arguments.length)return p.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return p.extraFormats=e,B&&P(),L},L.disabledDates=function(e){if(0===arguments.length)return p.disabledDates?$.extend({},p.disabledDates):p.disabledDates;if(!e)return p.disabledDates=!1,y(),L;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return p.disabledDates=S(e),p.enabledDates=!1,y(),L},L.enabledDates=function(e){if(0===arguments.length)return p.enabledDates?$.extend({},p.enabledDates):p.enabledDates;if(!e)return p.enabledDates=!1,y(),L;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return p.enabledDates=S(e),p.disabledDates=!1,y(),L},L.daysOfWeekDisabled=function(e){if(0===arguments.length)return p.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return p.daysOfWeekDisabled=!1,y(),L;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(p.daysOfWeekDisabled=e.reduce(function(e,t){return 6<(t=parseInt(t,10))||t<0||isNaN(t)||-1===e.indexOf(t)&&e.push(t),e},[]).sort(),p.useCurrent&&!p.keepInvalid){for(var t=0;!m(E,"d");){if(E.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}g(E)}return y(),L},L.maxDate=function(e){if(0===arguments.length)return p.maxDate?p.maxDate.clone():p.maxDate;if("boolean"==typeof e&&!1===e)return p.maxDate=!1,y(),L;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=c()));var t=v(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(p.minDate&&t.isBefore(p.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(q));return p.maxDate=t,p.useCurrent&&!p.keepInvalid&&E.isAfter(e)&&g(p.maxDate),H.isAfter(t)&&(H=t.clone().subtract(p.stepping,"m")),y(),L},L.minDate=function(e){if(0===arguments.length)return p.minDate?p.minDate.clone():p.minDate;if("boolean"==typeof e&&!1===e)return p.minDate=!1,y(),L;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=c()));var t=v(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(p.maxDate&&t.isAfter(p.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(q));return p.minDate=t,p.useCurrent&&!p.keepInvalid&&E.isBefore(e)&&g(p.minDate),H.isBefore(t)&&(H=t.clone().add(p.stepping,"m")),y(),L},L.defaultDate=function(e){if(0===arguments.length)return p.defaultDate?p.defaultDate.clone():p.defaultDate;if(!e)return p.defaultDate=!1,L;"string"==typeof e&&(e="now"===e||"moment"===e?c():c(e));var t=v(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!m(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return p.defaultDate=t,(p.defaultDate&&p.inline||""===I.val().trim())&&g(p.defaultDate),L},L.locale=function(e){if(0===arguments.length)return p.locale;if(!_.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return p.locale=e,E.locale(p.locale),H.locale(p.locale),q&&P(),N&&(b(),D()),L},L.stepping=function(e){return 0===arguments.length?p.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),p.stepping=e,L)},L.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return p.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return p.useCurrent=e,L},L.collapse=function(e){if(0===arguments.length)return p.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return p.collapse===e||(p.collapse=e,N&&(b(),D())),L},L.icons=function(e){if(0===arguments.length)return $.extend({},p.icons);if(!(e instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return $.extend(p.icons,e),N&&(b(),D()),L},L.tooltips=function(e){if(0===arguments.length)return $.extend({},p.tooltips);if(!(e instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return $.extend(p.tooltips,e),N&&(b(),D()),L},L.useStrict=function(e){if(0===arguments.length)return p.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return p.useStrict=e,L},L.sideBySide=function(e){if(0===arguments.length)return p.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return p.sideBySide=e,N&&(b(),D()),L},L.viewMode=function(e){if(0===arguments.length)return p.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===R.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+R.join(", ")+") value");return p.viewMode=e,j=Math.max(R.indexOf(e),V),o(),L},L.toolbarPlacement=function(e){if(0===arguments.length)return p.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===G.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+G.join(", ")+") value");return p.toolbarPlacement=e,N&&(b(),D()),L},L.widgetPositioning=function(e){if(0===arguments.length)return $.extend({},p.widgetPositioning);if("[object Object]"!=={}.toString.call(e))throw new TypeError("widgetPositioning() expects an object variable");if(e.horizontal){if("string"!=typeof e.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(e.horizontal=e.horizontal.toLowerCase(),-1===U.indexOf(e.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+U.join(", ")+")");p.widgetPositioning.horizontal=e.horizontal}if(e.vertical){if("string"!=typeof e.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(e.vertical=e.vertical.toLowerCase(),-1===Q.indexOf(e.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+Q.join(", ")+")");p.widgetPositioning.vertical=e.vertical}return y(),L},L.calendarWeeks=function(e){if(0===arguments.length)return p.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return p.calendarWeeks=e,y(),L},L.showTodayButton=function(e){if(0===arguments.length)return p.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return p.showTodayButton=e,N&&(b(),D()),L},L.showClear=function(e){if(0===arguments.length)return p.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return p.showClear=e,N&&(b(),D()),L},L.widgetParent=function(e){if(0===arguments.length)return p.widgetParent;if("string"==typeof e&&(e=$(e)),null!==e&&"string"!=typeof e&&!(e instanceof $))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return p.widgetParent=e,N&&(b(),D()),L},L.keepOpen=function(e){if(0===arguments.length)return p.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return p.keepOpen=e,L},L.focusOnShow=function(e){if(0===arguments.length)return p.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return p.focusOnShow=e,L},L.inline=function(e){if(0===arguments.length)return p.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return p.inline=e,L},L.clear=function(){return w(),L},L.keyBinds=function(e){return 0===arguments.length?p.keyBinds:(p.keyBinds=e,L)},L.getMoment=function(e){return c(e)},L.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return p.debug=e,L},L.allowInputToggle=function(e){if(0===arguments.length)return p.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return p.allowInputToggle=e,L},L.showClose=function(e){if(0===arguments.length)return p.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return p.showClose=e,L},L.keepInvalid=function(e){if(0===arguments.length)return p.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return p.keepInvalid=e,L},L.datepickerInput=function(e){if(0===arguments.length)return p.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return p.datepickerInput=e,L},L.parseInputDate=function(e){if(0===arguments.length)return p.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return p.parseInputDate=e,L},L.disabledTimeIntervals=function(e){if(0===arguments.length)return p.disabledTimeIntervals?$.extend({},p.disabledTimeIntervals):p.disabledTimeIntervals;if(!e)return p.disabledTimeIntervals=!1,y(),L;if(!(e instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return p.disabledTimeIntervals=e,y(),L},L.disabledHours=function(e){if(0===arguments.length)return p.disabledHours?$.extend({},p.disabledHours):p.disabledHours;if(!e)return p.disabledHours=!1,y(),L;if(!(e instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(p.disabledHours=O(e),p.enabledHours=!1,p.useCurrent&&!p.keepInvalid){for(var t=0;!m(E,"h");){if(E.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}g(E)}return y(),L},L.enabledHours=function(e){if(0===arguments.length)return p.enabledHours?$.extend({},p.enabledHours):p.enabledHours;if(!e)return p.enabledHours=!1,y(),L;if(!(e instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(p.enabledHours=O(e),p.disabledHours=!1,p.useCurrent&&!p.keepInvalid){for(var t=0;!m(E,"h");){if(E.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}g(E)}return y(),L},L.viewDate=function(e){if(0===arguments.length)return H.clone();if(!e)return H=E.clone(),L;if(!("string"==typeof e||_.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return H=v(e),r(),L},i.is("input"))I=i;else if(0===(I=i.find(p.datepickerInput)).length)I=i.find("input");else if(!I.is("input"))throw new Error('CSS class "'+p.datepickerInput+'" cannot be applied to non input element');if(i.hasClass("input-group")&&(z=0===i.find(".datepickerbutton").length?i.find(".input-group-addon"):i.find(".datepickerbutton")),!p.inline&&!I.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return E=c(),H=E.clone(),$.extend(!0,p,(F={},(A=i.is("input")||p.inline?i.data():i.find("input").data()).dateOptions&&A.dateOptions instanceof Object&&(F=$.extend(!0,F,A.dateOptions)),$.each(p,function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==A[t]&&(F[e]=A[t])}),F)),L.options(p),P(),I.on({change:M,blur:p.debug?"":b,keydown:x,keyup:T,focus:p.allowInputToggle?D:""}),i.is("input")?I.on({focus:D}):z&&(z.on("click",C),z.on("mousedown",!1)),I.prop("disabled")&&L.disable(),I.is("input")&&0!==I.val().trim().length?g(v(I.val().trim())):p.defaultDate&&void 0===I.attr("placeholder")&&g(p.defaultDate),p.inline&&D(),L}return $.fn.datetimepicker=function(a){a=a||{};var t,n=Array.prototype.slice.call(arguments,1),r=!0;if("object"==typeof a)return this.each(function(){var e,t=$(this);t.data("DateTimePicker")||(e=$.extend(!0,{},$.fn.datetimepicker.defaults,a),t.data("DateTimePicker",i(t,e)))});if("string"==typeof a)return this.each(function(){var e=$(this).data("DateTimePicker");if(!e)throw new Error('bootstrap-datetimepicker("'+a+'") method was called on an element that is not using DateTimePicker');t=e[a].apply(e,n),r=t===e}),r||-1<$.inArray(a,["destroy","hide","show","toggle"])?this:t;throw new TypeError("Invalid arguments for DateTimePicker: "+a)},$.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:_.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(7,"d")):this.date(t.clone().add(this.stepping(),"m"))}},down:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(7,"d")):this.date(t.clone().subtract(this.stepping(),"m"))}else this.show()},"control up":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(1,"y")):this.date(t.clone().add(1,"h"))}},"control down":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(1,"y")):this.date(t.clone().subtract(1,"h"))}},left:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"d"))}},right:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"d"))}},pageUp:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"M"))}},pageDown:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(e){e&&e.find(".timepicker").is(":visible")&&e.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},$.fn.datetimepicker});
vendor: 1,212 bytes, lines 45-53
45;
46/*
47 AngularJS v1.7.8
48 (c) 2010-2018 Google, Inc. http://angularjs.org
49 License: MIT
50*/
51(function(C){'use strict';function re(a){if(D(a))w(a.objectMaxDepth)&&(Wb.objectMaxDepth=Xb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Wb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Wb}function Xb(a){return W(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.7.8/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent,
52f;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 ya(a){if(null==a||$a(a))return!1;if(H(a)||A(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return W(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)||
53ya(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)}
vendor: 1,568 bytes, lines 53-56
53else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Nc(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 Oc(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 Yb(a){return function(b,d){a(d,b)}}function se(){return++pb}
54function Zb(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):$b(p)?a[m]=p.clone():(D(a[m])||(a[m]=H(p)?[]:{}),Zb(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return Zb(a,Ha.call(arguments,1),!1)}function te(a){return Zb(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a,
5510)}function ac(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function bc(a){return B(a.toString)&&a.toString!==la}function z(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Nc(a){return null!==a&&"object"===typeof a&&!Pc(a)}function A(a){return"string"===typeof a}function W(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)}
56function H(a){return Array.isArray(a)||a instanceof Array}function cc(a){switch(la.call(a)){case "[object Error]":return!0;
vendor: 173,817 bytes, lines 56-396
56case "[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 ue(a){return a&&W(a.length)&&ve.test(la.call(a))}
57function $b(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function we(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(Nc(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)&&
58(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 pa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Pc(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),
59a.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)}
60var g=[],k=[];d=Xb(d)?d:NaN;if(b){if(ue(b)||"[object ArrayBuffer]"===la.call(b))throw pa("cpta");if(a===b)throw pa("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 dc(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],
61b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?dc(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
62RegExp?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 Qc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&C.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!z(a))return W(b)||(b=b?2:null),JSON.stringify(a,Qc,b)}function Rc(a){return A(a)?JSON.parse(a):a}function ec(a,b){a=a.replace(xe,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+
63a)/6E4;return X(d)?b:d}function Sc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function fc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=ec(b,c);return Sc(a,d*(b-c))}function za(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 Tc(a){try{return decodeURIComponent(a)}catch(b){}}function gc(a){var b={};r((a||"").split("&"),
64function(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=Tc(e),w(e)&&(f=w(f)?Tc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function ye(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 hc(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,
65b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ze(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,A(d=a.getAttribute(d)))return d;return null}function Ae(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))});
66d&&(Be?(e.strictDi=null!==ze(d,"strict-di"),b(d,c?[c]:[],e)):C.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Uc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===C.document?"document":za(a);throw pa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",
67function(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!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&&
68ca.resumeDeferredBootstrap()}function Ce(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function De(a){a=ca.element(a).injector();if(!a)throw pa("test");return a.get("$$testability")}function Vc(a,b){b=b||"_";return a.replace(Ee,function(a,c){return(c?b:"")+a.toLowerCase()})}function Fe(){var a;if(!Wc){var b=qb();(rb=z(b)?C.jQuery:b?C[b]:void 0)&&rb.fn.on?(x=rb,S(rb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})):
69x=Y;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;Wc=!0}}function gb(a,b,d){if(!a)throw pa("areq",b||"?",d||"required");return a}function sb(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 pa("badname",b);}function Ge(a,b,d){if(!b)return a;b=b.split(".");
70for(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 tb(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 ic(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!bc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function He(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=F("$injector"),
71c=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",
72"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",
73"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 Ie(a,b){var d=[];Xb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Qc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})}function Je(a){S(a,{errorHandlingConfig:re,
74bootstrap:Uc,copy:Ia,extend:S,merge:te,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Rc,identity:Ta,isUndefined:z,isDefined:w,isString:A,isFunction:B,isObject:D,isNumber:W,isElement:$b,isArray:H,version:Ke,isDate:ha,callbacks:{$$counter:0},getTestability:De,reloadWithDebugInfo:Ce,$$minErr:F,$$csp:Aa,$$encodeUriSegment:hc,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:ic,$$uppercase:ub});kc=He(C);kc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Le});
75a.provider("$compile",Xc).directive({a:Me,input:Yc,textarea:Yc,form:Ne,script:Oe,select:Pe,option:Qe,ngBind:Re,ngBindHtml:Se,ngBindTemplate:Te,ngClass:Ue,ngClassEven:Ve,ngClassOdd:We,ngCloak:Xe,ngController:Ye,ngForm:Ze,ngHide:$e,ngIf:af,ngInclude:bf,ngInit:cf,ngNonBindable:df,ngPluralize:ef,ngRef:ff,ngRepeat:gf,ngShow:hf,ngStyle:jf,ngSwitch:kf,ngSwitchWhen:lf,ngSwitchDefault:mf,ngOptions:nf,ngTransclude:of,ngModel:pf,ngList:qf,ngChange:rf,pattern:Zc,ngPattern:Zc,required:$c,ngRequired:$c,minlength:ad,
76ngMinlength:ad,maxlength:bd,ngMaxlength:bd,ngValue:sf,ngModelOptions:tf}).directive({ngInclude:uf,input:vf}).directive(vb).directive(cd);a.provider({$anchorScroll:wf,$animate:xf,$animateCss:yf,$$animateJs:zf,$$animateQueue:Af,$$AnimateRunner:Bf,$$animateAsyncRun:Cf,$browser:Df,$cacheFactory:Ef,$controller:Ff,$document:Gf,$$isDocumentHidden:Hf,$exceptionHandler:If,$filter:dd,$$forceReflow:Jf,$interpolate:Kf,$interval:Lf,$$intervalFactory:Mf,$http:Nf,$httpParamSerializer:Of,$httpParamSerializerJQLike:Pf,
77$httpBackend:Qf,$xhrFactory:Rf,$jsonpCallbacks:Sf,$location:Tf,$log:Uf,$parse:Vf,$rootScope:Wf,$q:Xf,$$q:Yf,$sce:Zf,$sceDelegate:$f,$sniffer:ag,$$taskTrackerFactory:bg,$templateCache:cg,$templateRequest:dg,$$testability:eg,$timeout:fg,$window:gg,$$rAF:hg,$$jqLite:ig,$$Map:jg,$$cookieReader:kg})}]).info({angularVersion:"1.7.8"})}function wb(a,b){return b.toUpperCase()}function xb(a){return a.replace(lg,wb)}function lc(a){a=a.nodeType;return 1===a||!a||9===a}function ed(a,b){var d,c,e=b.createDocumentFragment(),
78f=[];if(mc.test(a)){d=e.appendChild(b.createElement("div"));c=(mg.exec(a)||["",""])[1].toLowerCase();c=oa[c]||oa._default;d.innerHTML=c[1]+a.replace(ng,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";r(f,function(a){e.appendChild(a)});return e}function Y(a){if(a instanceof Y)return a;var b;A(a)&&(a=U(a),b=!0);if(!(this instanceof Y)){if(b&&"<"!==a.charAt(0))throw nc("nosel");return new Y(a)}if(b){b=
79C.document;var d;a=(d=og.exec(a))?[b.createElement(d[1])]:(d=ed(a,b))?d.childNodes:[];oc(this,a)}else B(a)?fd(a):oc(this,a)}function pc(a){return a.cloneNode(!0)}function yb(a,b){!b&&lc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function gd(a){for(var b in a)return!1;return!0}function hd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!gd(d)||c&&!gd(c)||(delete Ka[b],a.ng339=void 0)}function id(a,b,d,c){if(w(c))throw nc("offargs");var e=(c=zb(a))&&c.events,
80f=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);Ab[a]&&g(Ab[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];hd(a)}}function qc(a,b){var d=a.ng339;if(d=d&&Ka[d])b?delete d.data[b]:d.data={},hd(a)}function zb(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++pg,d=Ka[d]={events:{},data:{},handle:void 0});return d}function rc(a,b,d){if(lc(a)){var c,e=w(d),
81f=!e&&b&&!D(b),g=!b;a=(a=zb(a,!f))&&a.data;if(e)a[xb(b)]=d;else{if(g)return a;if(f)return a&&a[xb(b)];for(c in b)a[xb(c)]=b[c]}}}function Bb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Cb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",U(c))}}function Db(a,b){if(b&&a.setAttribute){var d=
82(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",U(c))}}function oc(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 jd(a,b){return Eb(a,"$"+(b||"ngController")+"Controller")}function Eb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=
830,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 kd(a){for(yb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Fb(a,b){b||yb(a);var d=a.parentNode;d&&d.removeChild(a)}function qg(a,b){b=b||C;if("complete"===b.document.readyState)b.setTimeout(a);else x(b).on("load",a)}function fd(a){function b(){C.document.removeEventListener("DOMContentLoaded",b);C.removeEventListener("load",b);a()}"complete"===C.document.readyState?C.setTimeout(a):(C.document.addEventListener("DOMContentLoaded",
84b),C.addEventListener("load",b))}function ld(a,b){var d=Gb[b.toLowerCase()];return d&&md[ua(a)]&&d}function rg(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(z(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};
85var h=f.specialHandlerWrapper||sg;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 sg(a,b,d){d.call(a,b)}function tg(a,b,d){var c=b.relatedTarget;c&&(c===a||ug.call(a,c))||d.call(a,b)}function ig(){this.$get=function(){return S(Y,{hasClass:function(a,b){a.attr&&(a=a[0]);return Bb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;
86if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||se)():d+":"+a}function nd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function od(a){a=Function.prototype.toString.call(a).replace(vg,"");return a.match(wg)||a.match(xg)}function yg(a){return(a=od(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,Yb(a));else return a(b,
87c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ba("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(z(c))throw Ba("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(z(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{A(a)?(c=kc(a),
88t.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)):sb(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),Ba("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 Ba("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),
89a[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 Ba("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(Ca||"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?
90(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 Hb,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,
91ia(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 Ba("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,
92function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function wf(){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():$b(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):W(c)||
93(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=A(a)?a:W(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||qg(function(){c.$evalAsync(g)})});return g}]}function hb(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 zg(a){A(a)&&
94(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 Ag(a,b,d,c,e){function f(){qa=null;k()}function g(){t=y();t=z(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=
95G.notifyWhenNoPendingTasks;var t,N,v=l.href,jc=b.find("base"),qa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){z(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||(qa=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&&(qa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());
96qa&&(qa=b);return h}return(qa||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=jc.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];
97G.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 Df(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Ag(a,c,b,d,e)}]}function Ef(){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",
98a);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(!z(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();
99p=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 cg(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Xc(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":
100"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=we("ngSrc,ngSrcset,src,srcset"),
101l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function qa(b,d){gb(b,"name");Ja(b,"directive");A(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&&(!A(l)||!/[EACM]/.test(l)))throw $("badrestrict",
102l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Yb(qa));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:Bg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",
103require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!A(a))return r(a,Yb(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.aHrefSanitizationWhitelist=function(a){return w(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};
104var 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();
105if(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(V.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(V.CSS,["*|style"]);a(V.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(V.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" "));a(V.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(" "))})();
106this.$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(!A(a))throw $("srcset",b,a.toString());for(var c="",d=U(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/
1072),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(U(d[g])),c=c+(" "+U(d[g+1]));d=U(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(U(d[0]));2===d.length&&(c+=" "+U(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){}}
108function 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):
109a;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,
110void 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===Ca&&ib(a,t,k);m=sc(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 ib(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:
111a[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 sc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);X(b,wa(h),"E",e,f);for(var l,m,
112n,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=wa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(pd,"").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(qd(p,L,c,n,m,!1));else{n=wa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=
113t,ld(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);X(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(A(g)&&""!==g)for(;a=k.exec(g);)n=wa(a[2]),X(b,n,"C",e,f)&&(d[n]=U(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=wa(f[1]);X(b,h,"M",d,e)&&(c[h]=U(f[2]))}}catch(k){}}
114function V(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 Y(a,b,c){return function(d,e,f,g,h){e=V(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=
115Y(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Aa(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=Y(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Aa(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(z(f))throw $("noslot",d,za(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=
116x(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 Cg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);
117L.bindingInfo=Da(G,g,L.instance,Cg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,W(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],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(L.directiveName,
118L.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],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(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,
119M,R=e,q,ma=!1,Ib=!1,O,sa=0,A=a.length;sa<A;sa++){u=a[sa];var E=u.$$start,ib=u.$$end;E&&(y=V(b,E,ib));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)){Ib=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",
120J[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],pa(f,Ha.call(M,0),b),R=Z(Ib,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=C.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[wa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||C.document.createDocumentFragment(),
121ka[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(Ib,R,e));M=x(M.childNodes)}else M=x(pc(b)).contents();y.empty();R=Z(Ib,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=mc.test(O)?rd(ja(u.templateNamespace,U(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",
122Q,"");pa(f,y,b);A={$attr:{}};O=sc(b,[],A);var Dg=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Dg);ga(d,A);A=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}),A=a.length;else if(u.compile)try{q=u.compile(y,d,R);var X=u.$$originalDirective||u;B(q)?m(null,Va(X,q),E,ib):
123q&&m(Va(X,q.pre),Va(X,q.post),E,ib)}catch(ca){c(ca,za(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 W(a,b,c,d){var e;if(A(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&&
124!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=W(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=W(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]=ac(a[d],{$$isolateScope:b,
125$$newScope:c})}function X(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],(z(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=ac(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,
126t,!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)||
127"$"===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=ac(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=mc.test(c)?rd(ja(L,U(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};pa(f,b,e);var v=sc(e,[],c);D(u.scope)&&fa(v,!0);a=
128v.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=pc(e));pa(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){cc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,
129c,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,za(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();
130b||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=C.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function oa(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:
131"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 xa(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function ya(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=xa(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=ya;b.push({priority:100,compile:function(a,b){var e=
132p(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=oa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",za(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&&
133f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function pa(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=C.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("*"));
134for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Aa(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ba(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,za(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)&&!dc(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Jb(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,
135I,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(A(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];A(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Jb(tc,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:dc;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=
136b};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 Jb(tc,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,
137b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=C.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:wa,$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=sd(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=sd(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=
138ld(this.$$element[0],a),g=td[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=Vc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||z(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,
139d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||z(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,
140"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 C.document.createComment(c)};return da}]}function Jb(a,b){this.previousValue=a;this.currentValue=b}function wa(a){return a.replace(pd,"").replace(Eg,function(a,d,c){return c?d.toUpperCase():d})}function sd(a,b){var d=
141"",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 rd(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())&&Fg.call(a,b,1)}return a}function Bg(a,b){if(b&&A(b))return b;if(A(a)){var d=ud.exec(a);if(d)return d[3]}}function Ff(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,
142"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&&A(g)&&(l=g);if(A(c)){g=c.match(ud);if(!g)throw vd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Ge(e.$scope,h,!0);if(!c)throw vd("ctrlreg",h);sb(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);
143a!==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 Gf(){this.$get=["$window",function(a){return x(a.document)}]}function Hf(){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 If(){this.$get=["$log",function(a){return function(b,
144d){a.error.apply(a,arguments)}}]}function uc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Of(){this.$get=function(){return function(a){if(!a)return"";var b=[];Oc(a,function(a,c){null===a||z(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(uc(a)))}):b.push(ba(c)+"="+ba(uc(a))))});return b.join("&")}}}function Pf(){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)?Oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):
145(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(uc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function vc(a,b){if(A(a)){var d=a.replace(Gg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(wd),e;(e=c)||(e=(e=d.match(Hg))&&Ig[e[0]].test(d));if(e)try{a=Rc(d)}catch(f){if(!c)return a;throw Kb("baddata",a,f);}}}return a}function xd(a){var b=T(),d;A(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(U(a.substr(0,d)));a=U(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&
146r(a,function(a,d){var f=K(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function yd(a){var b;return function(d){b||(b=xd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function zd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Nf(){var a=this.defaults={transformResponse:[vc],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, */*"},
147post:ja(wc),put:ja(wc),patch:ja(wc)},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.xsrfWhitelistedOrigins=[];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++];
148a=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=zd(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(!A(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},
149b);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=ub(g.method);g.paramSerializer=A(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)});
150b=c(b,h);b=b.then(function(b){var c=b.headers,d=zd(b.data,yd(c),void 0,b.transformRequest);z(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});z(b.withCredentials)&&!z(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,
151c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,xd(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:yd(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),
152O=c.url;x?O=p.getTrustedResourceUrl(O):A(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));z(q)&&((q=jc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=
153q),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 Kb("badjsonp",a);c=gc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Kb("badjsonp",a);if(d===b)throw Kb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=A(a.paramSerializer)?m.get(a.paramSerializer):
154a.paramSerializer;var v=[];r(d,function(a){v.unshift(A(a)?m.get(a):m.invoke(a))});var jc=Jg(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 Rf(){this.$get=function(){return function(){return new C.XMLHttpRequest}}}function Qf(){this.$get=
155["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Kg(a,c,a.defer,b,d[0])}]}function Kg(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",
156m);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;qa&&qa();y&&y.abort()}function v(a,b,c,e,f,g){w(P)&&d.cancel(P);qa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),qa=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||
157"",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"!==
158s)throw I;}y.send(z(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 Kf(){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}
159function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:ic(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),
160M.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&&z(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,
161b){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 Lf(){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 Lg("badprom");
162if(!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 Mf(){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++);
1630<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Ad(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=fa(d.port)||Mg[d.protocol]||null}function Bd(a,b,d){if(Ng.test(a))throw jb("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=gc(a.search);
164b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function xc(a,b){return a.slice(0,b.length)===b}function xa(a,b){if(xc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function yc(a,b,d){this.$$html5=!0;d=d||"";Ad(a,this);this.$$parse=function(a){var d=xa(b,a);if(!A(d))throw jb("ipthprfx",a,b);Bd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};
165this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=xa(a,c))?(g=f,g=d&&w(f=xa(d,f))?b+(xa("/",f)||f):a+g):w(f=xa(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function zc(a,b,d){Ad(a,this);this.$$parse=function(c){var e=xa(a,c)||xa(b,c),f;z(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",z(e)&&(a=c,this.replace())):(f=xa(d,e),z(f)&&(f=e));Bd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;xc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?
166f[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 Cd(a,b,d){this.$$html5=!0;zc.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=xa(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 Lb(a){return function(){return this[a]}}function Dd(a,
167b){return function(d){if(z(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Tf(){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)||A(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer",
168"$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 jb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?yc:Cd}else s=Da(n),p=zc;var r=s.substr(0,
169Da(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(!A(e)||!z(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")||
170a.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){xc(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=
171!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 Uf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){cc(a)&&(a.stack&&
172f?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=Ca||/\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,
173arguments)}}()}}]}function Og(a){return a+""}function Pg(a,b){return"undefined"!==typeof a?a:b}function Ed(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Qg(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?Fd:b}function Z(a,b,d){var c,e,f=a.isPure=Qg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,
174b,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,
175b,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,
176a.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,
177a.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 Gd(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 Hd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Id(a){if(1===a.body.length&&Hd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}
178function Jd(a){this.$filter=a}function Kd(a){this.$filter=a}function Mb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Kd(b):new Jd(b)}function Ac(a){return B(a.valueOf)?a.valueOf():Rg.call(a)}function Vf(){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 Nb(G),
179d=(new Mb(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=Ac(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&&Ac(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=
180!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&&Ac(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}
181function 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=
182b;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===Fd?function(b){return a(b)}:a})));return p(d)}var G={csp:Aa().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Nb(G);return(new Mb(b,e,G)).getAst(a).ast};return f}]}function Xf(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Ld(function(a){b.$evalAsync(a)},
183d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Yf(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Ld(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Ld(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&&
184x.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]*$/,""):z(c)?"undefined":"string"!==typeof c?Ie(c,void 0):c);cc(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=
185!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,
186b){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,
187d)}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(z(a)&&z(b)&&z(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)},
188b)}});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 hg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
189a.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 Wf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++pb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=
190function(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===Ca&&(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=++pb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=
191this;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)},
192null,"$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=
193{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=
194!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(!z(e)){if(D(e))if(ya(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,
195b)&&(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(ya(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,
196g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],z,A;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{A=w[n],l=A.fn,l(A.scope,A.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):X(g)&&X(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&&(z=4-r,N[z]||
197(N[z]=[]),N[z].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},
198$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=
199this.$$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=
200null}}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=
201!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,
2021),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 Le(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;
203this.aHrefSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=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 Sg(a){if("self"===a)return a;if(A(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Md(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");
204}function Nd(a){var b=[];w(a)&&r(a,function(a){b.push(Sg(a))});return b}function $f(){this.SCE_CONTEXTS=V;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=Nd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=Nd(a));return b};this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Bc(b,Od))||(C.document.baseURI?c=C.document.baseURI:(Na||(Na=C.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),
205c=Bc(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[V.HTML]=f(k);h[V.CSS]=f(k);h[V.MEDIA_URL]=f(k);h[V.URL]=f(h[V.MEDIA_URL]);h[V.JS]=f(k);h[V.RESOURCE_URL]=
206f(h[V.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||z(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||z(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===V.MEDIA_URL||d===V.URL)return c(f.toString(),d===V.MEDIA_URL);if(d===V.RESOURCE_URL){var k=
207ga(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===V.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue():a}}}]}function Zf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ca)throw Ea("iequirks");var c=ja(V);c.isEnabled=function(){return a};
208c.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(V,function(a,b){var d=K(b);c[("parse_as_"+d).replace(Cc,wb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Cc,wb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Cc,wb)]=function(b){return g(a,b)}});
209return c}]}function ag(){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||
2104>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(z(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Aa(),transitions:h,animations:l,android:e}}]}function bg(){this.$get=ia(function(a){return new Tg(a)})}function Tg(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,
211h){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 dg(){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(!A(k)||
212z(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==vc}):l===vc&&(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=Ug("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function eg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,
213b,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)"+Md(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())},
214whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function fg(){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 Vg("badprom");
215if(!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(!A(a))return a;Ca&&(aa.setAttribute("href",a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!Wg&&-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(/^#/,
216""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Jg(a){var b=[Od].concat(a.map(ga));return function(a){a=ga(a);return b.some(Bc.bind(null,a))}}function Bc(a,b){a=ga(a);b=ga(b);return a.protocol===b.protocol&&a.host===b.host}function gg(){this.$get=ia(C)}function Pd(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=
217e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),z(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function kg(){this.$get=Pd}function dd(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",Qd);b("date",Rd);b("filter",Xg);b("json",Yg);b("limitTo",Zg);b("lowercase",$g);b("number",Sd);b("orderBy",
218Td);b("uppercase",ah)}function Xg(){return function(a,b,d,c){if(!ya(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Dc(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=bh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,b)}}function bh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(z(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!bc(a))return!1;a=K(""+a);b=K(""+
219b);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=Dc(a),k=Dc(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)&&!z(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,
220b);case "function":return!1;default:return d(a,b)}}function Dc(a){return null===a?"null":typeof a}function Qd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){z(c)&&(c=b.CURRENCY_SYM);z(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Ud(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f,c)}}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Ud(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function ch(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Vd))&&
221(a=a.replace(Vd,""));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)===Ec;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Ec;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Wd&&(d=d.splice(0,Wd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function dh(a,b,d,c){var e=a.d,f=e.length-a.i;b=z(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=
2221,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 Ud(a,b,d,c,e){if(!A(a)&&!W(a)||isNaN(a))return"";var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=ch(k);dh(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},
223!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 Ob(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=Ec+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,
224b,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 Ob(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Xd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Yd(a){return function(b){var d=Xd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ob(b,a)}}function Fc(a,b){return 0>=
225a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Rd(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,
226d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;A(c)&&(c=eh.test(c)?fa(c):b(c));W(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=fh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=ec(f,m),c=fc(c,f,!0));r(k,function(b){h=gh[b];g+=h?h(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Yg(){return function(a,b){z(b)&&(b=2);return eb(a,b)}}function Zg(){return function(a,
227b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(X(b))return a;W(a)&&(a=a.toString());if(!ya(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Gc(a,d,d+b):0===d?Gc(a,b,a.length):Gc(a,Math.max(0,d+b),d)}}function Gc(a,b,d){return A(a)?a.slice(b,d):Ha.call(a,b,d)}function Td(a){function b(b){return b.map(function(b){var c=1,d=Ta;if(B(b))d=b;else if(A(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=
228d(),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(!ya(a))throw F("orderBy")("notarray",
229a);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;bc(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*
230h[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 Pb(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=lb;this.$$element=a;this.$$animate=c;Zd(this)}function Zd(a){a.$$classCache=
231{};a.$$classCache[$d]=!(a.$$classCache[mb]=a.$$element.hasClass(mb))}function ae(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?"-"+Vc(c,"-"):"";b(a,mb+c,!0===d);b(a,$d+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){z(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,
232a,k),be(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=be(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,
233g,this)}}function be(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Hc(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(z(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&&
234"false"===d.ngTrim||(e=U(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(ce[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,
235c=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 Qb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(A(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(hh.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(),
236ss: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 nb(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=Sc(b,ec(v)));var e=d(a,
237b);!isNaN(e)&&c&&(e=fc(e,c));return e}Ic(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 ob("datefmt",a);if(n(a)){q=a;var b=k.$options.getOption("timezone");b&&(v=b,q=fc(q,b,!0));var d=c;t&&A(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,
238d,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),B=s(x);k.$validators.min=function(a){return!n(a)||z(B)||d(a)>=B};g.$observe("min",function(a){a!==x&&(B=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)||z(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Ic(a,b,d,
239c,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 de(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(ih.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!W(b))throw ob("numfmt",b);b=b.toString()}return b})}function na(a){w(a)&&!W(a)&&(a=parseFloat(a));return X(a)?void 0:a}function Jc(a){var b=a.toString(),
240d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ee(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?Jc(a):0,k=e?Jc(b):0,h=f?Jc(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 fe(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw ob("constexpr",d,c);return a(b)}return e}function Kc(a,b){function d(a,b){if(!a||!a.length)return[];
241if(!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(" "):A(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===
242b){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 qd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,
243c){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 Rb(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=
244void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=lb;this.$options=Sb;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;
245this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;Zd(this);jh(this)}function jh(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 Lc(a){this.$$options=a}function ge(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 he(a,b,d){if(a){A(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",
246b,a,za(d));return a}}function Tb(a){a=fa(a);return X(a)?-1:a}var Wb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ie=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return A(a)?a.toLowerCase():a},ub=function(a){return A(a)?a.toUpperCase():a},Ca,x,rb,Ha=[].slice,Fg=[].splice,kh=[].push,la=Object.prototype.toString,Pc=Object.getPrototypeOf,pa=F("ng"),ca=C.angular||(C.angular={}),kc,pb=0;Ca=C.document.documentMode;var X=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=
247[];var ve=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,U=function(a){return A(a)?a.trim():a},Md=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Aa=function(){if(!w(Aa.rules)){var a=C.document.querySelector("[ng-csp]")||C.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Aa.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==
248b.indexOf("no-inline-style")}}else{a=Aa;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Aa.rules},qb=function(){if(w(qb.name_))return qb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=C.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return qb.name_=e},xe=/:/g,Qa=["ng-","data-ng-","ng:","x-ng-"],Be=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof C.HTMLScriptElement||b instanceof C.SVGScriptElement))return!1;
249b=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}})}(C.document),Ee=/[A-Z]/g,Wc=!1,Pa=3,Ke={full:"1.7.8",major:1,minor:7,dot:8,codeName:"enthusiastic-oblation"};Y.expando="ng339";var Ka=Y.cache=
250{},pg=1;Y._data=function(a){return this.cache[a[this.expando]]||{}};var lg=/-([a-z])/g,lh=/^-ms-/,Ab={mouseleave:"mouseout",mouseenter:"mouseover"},nc=F("jqLite"),og=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,mc=/<|&#?\w+;/,mg=/<([\w:-]+)/,ng=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,oa={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>",
251"</tr></tbody></table>"],_default:[0,"",""]};oa.optgroup=oa.option;oa.tbody=oa.tfoot=oa.colgroup=oa.caption=oa.thead;oa.th=oa.td;var ug=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=Y.prototype={ready:fd,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:kh,sort:[].sort,splice:[].splice},Gb={};r("multiple selected checked disabled readOnly required open".split(" "),
252function(a){Gb[K(a)]=a});var md={};r("input select option textarea button form details".split(" "),function(a){md[a]=!0});var td={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:rc,removeData:qc,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++)qc(a[b]),id(a[b])}},function(a,b){Y[b]=a});r({data:rc,inheritedData:Eb,scope:function(a){return x.data(a,"$scope")||Eb(a.parentNode||
253a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:jd,injector:function(a){return Eb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Bb,css:function(a,b,d){b=xb(b.replace(lh,"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=Gb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,
254e?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(z(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(z(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(z(b))return a.innerHTML;yb(a,!0);a.innerHTML=b},
255empty:kd},function(a,b){Y.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==kd&&z(2===a.length&&a!==Bb&&a!==jd?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===rc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=z(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:qc,on:function(a,b,d,c){if(w(c))throw nc("onargs");if(lc(a)){c=zb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=rg(a,e));c=0<=b.indexOf(" ")?
256b.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],Ab[b]?(k(Ab[b],tg),k(b,void 0,!0)):k(b)}},off:id,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;yb(a);r(new Y(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===
257a.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 Y(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 Y(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:Fb,detach:function(a){Fb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;
258if(c){b=new Y(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Db,removeClass:Cb,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;z(e)&&(e=!Bb(a,b));(e?Db:Cb)(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:pc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=zb(a);if(g=(g=g&&g.events)&&
259g[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){Y.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<
260k;g++)z(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):oc(f,a(this[g],b,c,e));return w(f)?f:this}});Y.prototype.bind=Y.prototype.on;Y.prototype.unbind=Y.prototype.off;var mh=Object.create(null);nd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return X(a)?mh: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)},
261set: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 Hb=nd,jg=[function(){this.$get=[function(){return Hb}]}],wg=/^([^(]+?)=>/,xg=/^[^(]*\(\s*([^)]*)\)/m,nh=/,/,oh=/^\s*(_?)(\S+?)\1\s*$/,vg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=F("$injector");
262fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw A(d)&&d||(d=a.name||yg(a)),Ba("strictdi",d);b=od(a);r(b[1].split(nh),function(a){a.replace(oh,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,sb(a[b],"fn"),c=a.slice(0,b)):sb(a,"fn",!0);return c};var je=F("$animate"),zf=function(){this.$get=E},Af=function(){var a=new Hb,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=A(b)?b.split(" "):
263H(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=zg(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&&Db(a,e);f&&Cb(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),
264k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},xf=["$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 je("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?
265a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,je("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,
266"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=hb(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=hb(d.removeClass,c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=hb(f.addClass,c);f.removeClass=hb(f.removeClass,d);return a.push(b,"setClass",
267f)},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=hb(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Cf=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)}}}]},Bf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,
268b,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=
269this;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)},
270complete: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}]},yf=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||
271h.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"),tc=new function(){};Xc.$inject=["$provide","$$sanitizeUriProvider"];Jb.prototype.isFirstChange=function(){return this.previousValue===tc};var pd=/^((?:x|data)[:\-_])/i,Eg=/[:\-_]+(.)/g,vd=F("$controller"),ud=/^(\S+)(\s+as\s+([\w$]+))?$/,Jf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&
272b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},wd="application/json",wc={"Content-Type":wd+";charset=utf-8"},Hg=/^\[|^\{(?!\{)/,Ig={"[":/]$/,"{":/}$/},Gg=/^\)]\}',?\n/,Kb=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 Lg=F("$interval"),Sf=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,
273d={};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]}}}},ph=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Mg={http:80,https:443,ftp:21},jb=F("$location"),Ng=/^\s*[\\/]{2,}/,qh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=ye(this.$$search),b=b?
274"#"+hc(b):"",a=a.split("/"),c=a.length;c--;)a[c]=hc(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Lb("$$absUrl"),url:function(a){if(z(a))return this.$$url;var b=ph.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:Lb("$$protocol"),host:Lb("$$host"),port:Lb("$$port"),path:Dd("$$path",function(a){a=null!==
275a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(A(a)||W(a))a=a.toString(),this.$$search=gc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw jb("isrcharg");break;default:z(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:Dd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};
276r([Cd,zc,yc],function(a){a.prototype=Object.create(qh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==yc||!this.$$html5)throw jb("nostate");this.$$state=z(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Rg={}.constructor.prototype.valueOf,Ub=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var rh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Nb=function(a){this.options=a};Nb.prototype={constructor:Nb,
277lex: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=Ub[b],e=Ub[d];Ub[a]||
278c||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?
279this.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):
280(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<
281this.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<
282this.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,
28316))):d+=rh[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";
284q.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},
285program: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(!Hd(a))throw Ya("lval");
286a={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=
287{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,
288operator: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("{")?
289a=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(")")):
290"["===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(","))
291}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;
292b={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("}");
293return{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,
294e){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 Fd=2;Jd.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=Id(a))this.state.computing=
295"assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Gd(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")+
296d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Og,Pg,Ed);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,
297b){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,
298this.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,
299void 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,
300b));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",
301a.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,
302a.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?
303void 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,
304a.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:
305h.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,
306b){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("}"))}},
307not: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=
308this;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(A(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(W(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,
309b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Kd.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Id(a))c=this.recurse(d);d=Gd(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=
310d(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),
311this["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))}),
312a.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=
313c(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,
314c,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,
315e,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=Ed(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,
316e,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,
317e,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=
318a(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}:
319e}},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)}}};Mb.prototype={constructor:Mb,parse:function(a){a=this.getAst(a);var b=
320this.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"),V={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",
321JS:"js"},Cc=/_([a-z])/g,Ug=F("$templateRequest"),Vg=F("$timeout"),aa=C.document.createElement("a"),Od=ga(C.location.href),Na;aa.href="http://[::1]";var Wg="[::1]"===aa.hostname;Pd.$inject=["$document"];dd.$inject=["$provide"];var Wd=22,Vd=".",Ec="0";Qd.$inject=["$locale"];Sd.$inject=["$locale"];var gh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:kb("Month",!1,!0),dd:ea("Date",2),
322d: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:kb("Day"),EEE:kb("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?"+":"")+(Ob(Math[0<a?"floor":"ceil"](a/60),2)+Ob(Math.abs(a%60),2))},ww:Yd(2),w:Yd(1),G:Fc,GG:Fc,GGG:Fc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},
323fh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,eh=/^-?\d+$/;Rd.$inject=["$locale"];var $g=ia(K),ah=ia(ub);Td.$inject=["$parse"];var Me=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()})}}}}),vb={};r(Gb,function(a,b){function d(a,d,e){a.$watch(e[c],
324function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=wa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(td,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ie))){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=wa("ng-"+a);vb[b]=
325["$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),Ca&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var lb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Pb.$inject=
326["$element","$attrs","$scope","$animate","$interpolate"];Pb.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&&
327this[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=lb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,
328Za,Vb+" 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!==lb;)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()})}};ae({clazz:Pb,set:function(a,
329b,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 ke=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:Pb,compile:function(d,f){d.addClass(Za).addClass(mb);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();
330p.$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,lb)})}}}}}]},Ne=ke(),Ze=ke(!0),hh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,
331sh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,th=/^(?=.{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])?)*$/,ih=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,le=/^(\d{4,})-(\d{2})-(\d{2})$/,me=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mc=/^(\d{4,})-W(\d\d)$/,ne=/^(\d{4,})-(\d\d)$/,
332oe=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=T();r(["date","datetime-local","month","time","week"],function(a){ce[a]=!0});var pe={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c)},date:nb("date",le,Qb(le,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":nb("datetimelocal",me,Qb(me,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:nb("time",oe,Qb(oe,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:nb("week",Mc,function(a,b){if(ha(a))return a;if(A(a)){Mc.lastIndex=0;var d=Mc.exec(a);
333if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Xd(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:nb("month",ne,Qb(ne,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Ic(a,b,d,c,"number");de(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)||z(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),
334l=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)||z(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)||z(s)||ee(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);Hc(c);c.$validators.url=function(a,b){var d=
335a||b;return c.$isEmpty(d)||sh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||th.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==U(d.ngTrim);z(d.name)&&b.attr("name",++pb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=U(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=U(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,
336c){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);X(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);X(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);X(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Ic(a,b,d,c,"range");de(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?
3370: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)||z(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)||z(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:
338function(a,b){return c.$isEmpty(b)||z(s)||ee(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=fe(k,a,"ngTrueValue",d.ngTrueValue,!0),l=fe(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},Yc=["$browser","$sniffer",
339"$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(pe[K(g.type)]||pe.text)(e,f,g,k[0],b,a,d,c)}}}}],vf=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&&
340Object.defineProperty(b,"value",a)}}}}},uh=/^(true|false|\d+)$/,sf=function(){function a(a,d,c){var e=w(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return uh.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)})}}}},Re=["$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];
341b.$watch(e.ngBind,function(a){c.textContent=ic(a)})}}}}],Te=["$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=z(a)?"":a})}}}}],Se=["$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);
342return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],rf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ue=Kc("",!0),We=Kc("Odd",0),Ve=Kc("Even",1),Xe=Ra({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ye=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],cd={},vh={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
343function(a){var b=wa("ng-"+a);cd[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return qd(d,c,e,b,a,vh[a])}]});var af=["$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=tb(k.clone),
344a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],bf=["$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===
345a||!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)})}}}}],uf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?
346(d.empty(),a(ed(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],cf=Ra({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),qf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!z(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});
347c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",$d="ng-invalid",Za="ng-pristine",Vb="ng-dirty",ob=F("ngModel");Rb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");Rb.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=
348function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw ob("nonassign",this.$$attr.ngModel,za(this.$$element));},$render:E,$isEmpty:function(a){return z(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,
349"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);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,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=
350!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(!X(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!==
351c&&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 ob("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&&
352h.$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(z(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!==
353a||""===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=z(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),z(a)){this.$$parserValid=!1;break}X(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));
354var 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=
355a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");W(b[a])?b=b[a]:W(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)?b=b["default"]:W(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()})},
356$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=
357void 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)}};ae({clazz:Rb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var pf=["$rootScope",function(a){return{restrict:"A",require:["ngModel",
358"^?form","^?ngModelOptions"],controller:Rb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(mb);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",
359function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Sb,wh=/(\s+|^)default(\s+|$)/;Lc.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]=U(d.replace(wh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ge(a,this.$$options));ge(a,Sb.$$options);
360return new Lc(a)}};Sb=new Lc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var tf=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:Sb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},df=Ra({terminal:!0,
361priority:1E3}),xh=F("ngOptions"),yh=/^\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]+?))?$/,nf=["$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&&ya(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&
362"$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(yh);if(!p)throw xh("iexp",a,za(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,A(a,b))},z=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),B={},A=r?function(a,b){B[r]=b;B[n]=a;return B}:function(a){B[n]=a;return B};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=
363f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=A(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=z(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=A(d[p],p),s=t(c,r),p=v(s,r),w=z(c,r),B=y(c,r),r=J(c,r),s=new e(p,s,w,B,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}}}}}
364var e=C.document.createElement("option"),f=C.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],z=h.multiple;l=0;for(var t=k.children(),
365B=t.length;l<B;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,A=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};z?(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])&&
366!a.disabled&&b.push(v.getViewValueFromOption(a))});return b},A.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return A.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)}},
367n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},A.trackBy&&d.$watch(function(){return A.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",
368function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(A.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)?Fb(c.element.parentNode):Fb(c.element)}v=A.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);
369var 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(),(A.trackBy||z?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],ef=["$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+"-"+
370p+t,v=ca.noop,A;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=X(c);e||c in n||(c=a.pluralCat(c-p));c===A||e&&X(A)||(v(),e=q[c],z(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),A=c)})}}}],qe=F("ngRef"),ff=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=wa(ua(b)),e=a(d.ngRef),f=e.assign||
371function(){throw qe("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 qe("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)})}}}}],gf=["$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||
372a.$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",
373n);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 z;if(t){var A={$id:La},y=a(t);z=function(a,b,c,d){v&&(A[v]=b);A[x]=c;A.$index=d;return y(a,A)}}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(ya(h))H=h,q=z||f;else for(K in q=z||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);
374B=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}A&&(A[x]=void 0);for(s in p){F=p[s];D=tb(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]!==
375s&&b.move(tb(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})}}}}],hf=["$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"})})}}}],$e=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,
376d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],jf=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&(a||(a={}),r(d,function(b,d){null==a[d]&&(a[d]="")}));a&&b.css(a)})}),kf=["$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||
377e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=tb(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)})})})}}}],lf=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,
378b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),mf=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})}}),zh=F("ngTransclude"),of=["$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 zh("orphan",
379za(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()}}}}],Oe=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Ah={$setViewValue:E,$render:E},Bh=["$element",
380"$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 Hb;e.selectValueMap={};e.ngModelCtrl=Ah;e.multiple=!1;e.unknownOption=x(C.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);
381a.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",
382function(){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=
383b);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==
384a&&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");
385w(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)})}}],Pe=function(){return{restrict:"E",
386require:["select","?ngModel"],controller:Bh,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,
387b.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)}}}}}},Qe=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||
388(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)}}}}],$c=["$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=
389a,e.$validate())})}}}}],Zc=["$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)&&ie.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=he(l,c,b);d.$observe("pattern",function(a){var d=m;m=he(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||
390z(m)||m.test(b)}}}}}}],bd=["$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=Tb(f);c.$observe("maxlength",function(a){f!==a&&(g=Tb(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],ad=["$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=Tb(f)||-1;c.$observe("minlength",function(a){f!==
391a&&(g=Tb(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];C.angular.bootstrap?C.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Fe(),Je(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"],
392ERAS:["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",
393"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(){Ae(C.document,
394Uc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@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;}</style>');
395//# sourceMappingURL=angular.min.js.map
396;
397/**
398 * State-based routing for AngularJS
399 * @version v0.4.2
400 * @link http://angular-ui.github.com/
401 * @license MIT License, http://www.opensource.org/licenses/MIT
402 */
403"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return T(new(T(function(){},{prototype:a})),b)}function e(a){return S(arguments,function(b){b!==a&&S(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return S(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=d<0?Math.ceil(d):Math.floor(d),d<0&&(d+=c);d<c;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return T({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return S(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return S(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)h(c,d)==-1&&(b[d]=a[d]);return b}function n(a,b){var c=R(a),d=c?[]:{};return S(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=R(a)?[]:{};return S(a,function(a,d){c[d]=b(a,d)}),c}function p(a){return a.then(c,function(){})&&a}function q(a,b){var d=1,f=2,i={},j=[],k=i,l=T(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(t[c]!==f){if(s.push(c),t[c]===d)throw s.splice(0,h(s,c)),new Error("Cyclic dependency: "+s.join(" -> "));if(t[c]=d,P(a))r.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);S(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),r.push(c,a,e)}s.pop(),t[c]=f}}function o(a){return Q(a)&&a.then&&a.$$promises}if(!Q(i))throw new Error("'invocables' must be an object");var q=g(i||{}),r=[],s=[],t={};return S(i,n),i=s=t=null,function(d,f,g){function h(){--v||(w||e(u,f.$$values),s.$$values=u,s.$$promises=s.$$promises||!0,delete s.$$inheritedValues,n.resolve(u))}function i(a){s.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!N(s.$$failure))try{l.resolve(b.invoke(e,g,u)),l.promise.then(function(a){u[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;S(f,function(a){t.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,t[a].then(function(b){u[a]=b,--m||k()},j))}),m||k(),t[c]=p(l.promise)}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!Q(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),s=p(n.promise),t=s.$$promises={},u=T({},d),v=1+r.length/3,w=!1;if(p(s),N(f.$$failure))return i(f.$$failure),s;f.$$inheritedValues&&e(u,m(f.$$inheritedValues,q)),T(t,f.$$promises),f.$$values?(w=e(u,m(f.$$values,q)),s.$$inheritedValues=m(f.$$values,q),h()):(f.$$inheritedValues&&(s.$$inheritedValues=m(f.$$inheritedValues,q)),f.then(h,i));for(var x=0,y=r.length;x<y;x+=3)d.hasOwnProperty(r[x])?h():j(r[x],r[x+1],r[x+2]);return s}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function r(){var a=b.version.minor<3;this.shouldUnsafelyUseHttp=function(b){a=!!b},this.$get=["$http","$templateCache","$injector",function(b,c,d){return new s(b,c,d,a)}]}function s(a,b,c,d){this.fromConfig=function(a,b,c){return N(a.template)?this.fromString(a.template,b):N(a.templateUrl)?this.fromUrl(a.templateUrl,b):N(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return O(a)?a(b):a},this.fromUrl=function(e,f){return O(e)&&(e=e(f)),null==e?null:d?a.get(e,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data}):c.get("$templateRequest")(e)},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function t(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new W.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=W.type(h)||d(W.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=T({params:{}},Q(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new W.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function u(a){T(this,a)}function v(){function a(a){return null!=a?a.toString().replace(/(~|\/)/g,function(a){return{"~":"~~","/":"~2F"}[a]}):a}function e(a){return null!=a?a.toString().replace(/(~~|~2F)/g,function(a){return{"~~":"~","~2F":"/"}[a]}):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return O(a)||R(a)&&O(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(r[a.name],l.invoke(a.def))}}function k(a){T(this,a||{})}W=this;var l,m=!1,p=!0,q=!1,r={},s=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!N(a)||"string"==typeof a},pattern:/[^\/]*/},int:{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return a!==c&&null!==a&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c}
403,decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};v.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return N(a)&&(m=a),m},this.strictMode=function(a){return N(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!N(a))return q;if(a!==!0&&a!==!1&&!P(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new t(a,T(f(),b))},this.isMatcher=function(a){if(!Q(a))return!1;var b=!0;return S(t.prototype,function(c,d){O(c)&&(b=b&&N(a[d])&&O(a[d]))}),b},this.type=function(a,b,c){if(!N(b))return r[a];if(r.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return r[a]=new u(T({name:a},b)),c&&(w.push({name:a,def:c}),s||j()),this},S(x,function(a,b){r[b]=new u(T({name:b},a))}),r=d(r,{}),this.$get=["$injector",function(a){return l=a,s=!1,j(),S(x,function(a,b){r[b]||(r[b]=new u(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=Q(a)?g(a):[],c=h(b,"value")===-1&&h(b,"type")===-1&&h(b,"squash")===-1&&h(b,"array")===-1;return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?r[c.type]:c.type instanceof u?c.type:new u(c.type):"config"===e?r.any:r.string}function m(){var b={array:"search"===f&&"auto"},c=a.match(/\[\]$/)?{array:!0}:{};return T(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!N(c)||null==c)return q;if(c===!0||P(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function s(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=R(a.replace)?a.replace:[],P(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return h(g,a.from)===-1}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),N(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=s(e,y,z,A);T(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,T(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),S(b,function(b){S(g(b),function(b){h(a,b)===-1&&h(d,b)===-1&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return S(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return S(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function w(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return!N(d)||d}function h(d,e,f,g,h){function m(a,b,c){return"/"===q?a:b?q.slice(0,-1)+a:c?q.slice(1)+a:a}function n(a){function b(a){var b=a(f,d);return!!b&&(P(b)&&d.replace().url(b),!0)}if(!a||!a.defaultPrevented){p&&d.url()===p;p=c;var e,g=j.length;for(e=0;e<g;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}
403var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!O(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(P(a)){var b=a;a=function(){return b}}else if(!O(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=P(b);if(P(a)&&(a=d.compile(a)),!h&&!O(b)&&!R(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),T(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:P(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),T(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function x(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=P(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;i<j;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=A[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){B[a]||(B[a]=[]),B[a].push(b)}function q(a){for(var b=B[a]||[];b.length;)r(b.shift())}function r(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!P(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(A.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=c.indexOf(".")!==-1?c.substring(0,c.lastIndexOf(".")):P(b.parent)?b.parent:Q(b.parent)&&P(b.parent.name)?b.parent.name:"";if(e&&!A[e])return n(e,b.self);for(var f in D)O(D[f])&&(b[f]=D[f](b,D.$delegates[f]));return A[c]=b,!b[C]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){z.$current.navigable==b&&j(a,c)||z.transitionTo(b,a,{inherit:!0,location:!1})}]),q(c),b}function s(a){return a.indexOf("*")>-1}function t(a){for(var b=a.split("."),c=z.$current.name.split("."),d=0,e=b.length;d<e;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length==c.length&&c.join("")===b.join("")}function u(a,b){return P(a)&&!N(b)?D[a]:O(b)&&P(a)?(D[a]&&!D.$delegates[a]&&(D.$delegates[a]=D[a]),D[a]=b,this):this}function v(a,b){return Q(a)?b=a:b.name=a,r(b),this}function w(a,e,f,h,j,l,n,q,r){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return n.update(),E;if(!g.retry)return null;if(f.$retry)return n.update(),F;var h=z.transition=e.when(g.retry);return h.then(function(){return h!==z.transition?(a.$broadcast("$stateChangeCancel",b.to,b.toParams,c,d),B):(b.options.$retry=!0,z.transitionTo(b.to,b.toParams,b.options))},function(){return E}),n.update(),h}function v(a,c,d,g,i,l){function m(){var c=[];return S(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:l.notify})||""}],c.push(j.resolve(g,i.globals,i.resolve,a).then(function(c){if(O(d.controllerProvider)||R(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,c.$$resolveAs=d.resolveAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=j.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var w=new Error("transition superseded"),B=p(e.reject(w)),D=p(e.reject(new Error("transition prevented"))),E=p(e.reject(new Error("transition aborted"))),F=p(e.reject(new Error("transition failed")));return y.locals={resolve:null,globals:{$stateParams:{}}},z={params:{},current:y.self,$current:y,transition:null},z.reload=function(a){return z.transitionTo(z.current,l,{reload:a||!0,inherit:!1,notify:!0})},z.go=function(a,b,c){return z.transitionTo(a,b,T({inherit:!0,relative:z.$current},c))},z.transitionTo=function(b,c,f){c=c||{},f=T({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=z.$current,o=z.params,q=j.path,r=m(b,f.relative),s=c["#"];if(!N(r)){var t={to:b,toParams:c,options:f},A=u(t,j.self,o,f);
403if(A)return A;if(b=t.to,c=t.toParams,f=t.options,r=m(b,f.relative),!N(r)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(r[C])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(l,c||{},z.$current,r)),!r.params.$$validates(c))return F;c=r.params.$$values(c),b=r;var E=b.path,G=0,H=E[G],I=y.locals,J=[];if(f.reload){if(P(f.reload)||Q(f.reload)){if(Q(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var K=f.reload===!0?q[0]:m(f.reload);if(f.reload&&!K)throw new Error("No such reload state '"+(P(f.reload)?f.reload:f.reload.name)+"'");for(;H&&H===q[G]&&H!==K;)I=J[G]=H.locals,G++,H=E[G]}}else for(;H&&H===q[G]&&H.ownParams.$$equals(c,o);)I=J[G]=H.locals,G++,H=E[G];if(x(b,c,j,o,I,f))return s&&(c["#"]=s),z.params=c,U(z.params,l),U(k(b.params.$$keys(),l),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(n.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),n.update(!0)),z.transition=null,e.when(z.current);if(c=k(b.params.$$keys(),c||{}),s&&(c["#"]=s),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,o,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),null==z.transition&&n.update(),D;for(var L=e.when(I),M=G;M<E.length;M++,H=E[M])I=J[M]=d(I),L=v(H,c,H===b,L,I,f);var O=z.transition=L.then(function(){var d,e,g;if(z.transition!==O)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),B;for(d=q.length-1;d>=G;d--)g=q[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=G;d<E.length;d++)e=E[d],e.locals=J[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return z.transition!==O?(a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),B):(z.$current=b,z.current=b.self,z.params=c,U(z.params,l),z.transition=null,f.location&&b.navigable&&n.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,o),n.update(!0),z.current)}).then(null,function(d){return d===w?B:z.transition!==O?(a.$broadcast("$stateChangeCancel",b.self,c,j.self,o),B):(z.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,o,d),g.defaultPrevented||n.update(),e.reject(d))});return p(O),O},z.is=function(a,b,d){d=T({relative:z.$current},d||{});var e=m(a,d.relative);return N(e)?z.$current===e&&(!b||g(b).reduce(function(a,c){var d=e.params[c];return a&&!d||d.type.equals(l[c],b[c])},!0)):c},z.includes=function(a,b,d){if(d=T({relative:z.$current},d||{}),P(a)&&s(a)){if(!t(a))return!1;a=z.$current.name}var e=m(a,d.relative);if(!N(e))return c;if(!N(z.$current.includes[e.name]))return!1;if(!b)return!0;for(var f=g(b),h=0;h<f.length;h++){var i=f[h],j=e.params[i];if(j&&!j.type.equals(l[i],b[i]))return!1}return g(b).reduce(function(a,c){var d=e.params[c];return a&&!d||d.type.equals(l[c],b[c])},!0)},z.href=function(a,b,d){d=T({lossy:!0,inherit:!0,absolute:!1,relative:z.$current},d||{});var e=m(a,d.relative);if(!N(e))return null;d.inherit&&(b=i(l,b||{},z.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?n.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},z.get=function(a,b){if(0===arguments.length)return o(g(A),function(a){return A[a].self});var c=m(a,b||z.$current);return c&&c.self?c.self:null},z}function x(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({}
403,[a.params].concat(e)),g=new W.ParamSet(f);return g.$$equals(b,c)}if(!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b)))return!0}var y,z,A={},B={},C="abstract",D={parent:function(a){if(N(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):y},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=d(a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(P(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||y).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new W.ParamSet;return S(a.params||{},function(a,c){b[c]||(b[c]=new W.Param(c,null,a,"config"))}),b},params:function(a){var b=l(a.ownParams,a.ownParams.$$keys());return a.parent&&a.parent.params?T(a.parent.params.$$new(),b):new W.ParamSet},views:function(a){var b={};return S(N(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),c.resolveAs=c.resolveAs||a.resolveAs||"$resolve",b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?T({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};y=r({name:"",url:"^",views:null,abstract:!0}),y.navigable=null,this.decorator=u,this.state=v,this.$get=w,w.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function y(){function a(a,b){return{load:function(a,c){var d,e={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return c=T(e,c),c.view&&(d=b.fromConfig(c.view,c.params,c.locals)),d}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function z(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function A(a,c,d,e,f){function g(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(a){return null}}}function h(a,c){var d=function(){return{enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}}};if(k)return{enter:function(a,c,d){b.version.minor>2?k.enter(a,null,c).then(d):k.enter(a,null,c,d)},leave:function(a,c){b.version.minor>2?k.leave(a).then(c):k.leave(a,c)}};if(j){var e=j&&j(c,a);return{enter:function(a,b,c){e.enter(a,null,b),c()},leave:function(a,b){e.leave(a),b()}}}return d()}var i=g(),j=i("$animator"),k=i("$animate"),l={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,g,i){return function(c,g,j){function k(){if(m&&(m.remove(),m=null),o&&(o.$destroy(),o=null),n){var a=n.data("$uiViewAnim");s.leave(n,function(){a.$$animLeave.resolve(),m=null}),m=n,n=null}}function l(h){var l,m=C(c,j,g,e),t=m&&a.$current&&a.$current.locals[m];if(h||t!==p){l=c.$new(),p=a.$current.locals[m],l.$emit("$viewContentLoading",m);var u=i(l,function(a){var e=f.defer(),h=f.defer(),i={$animEnter:e.promise,$animLeave:h.promise,$$animLeave:h};a.data("$uiViewAnim",i),s.enter(a,g,function(){e.resolve(),o&&o.$emit("$viewContentAnimationEnded"),(b.isDefined(r)&&!r||c.$eval(r))&&d(a)}),k()});n=u,o=l,o.$emit("$viewContentLoaded",m),o.$eval(q)}}var m,n,o,p,q=j.onload||"",r=j.autoscroll,s=h(j,c);g.inheritedData("$uiView");c.$on("$stateChangeSuccess",function(){l(!1)}),l(!0)}}};return l}function B(a,c,d,e){return{restrict:"ECA",priority:-400,compile:function(f){var g=f.html();return f.empty?f.empty():f[0].innerHTML=null,function(f,h,i){var j=d.$current,k=C(f,i,h,e),l=j&&j.locals[k];if(!l)return h.html(g),void a(h.contents())(f);h.data("$uiView",{name:k,state:l.$$state}),h.html(l.$template?l.$template:g);var m=b.extend({},l);f[l.$$resolveAs]=m;var n=a(h.contents());if(l.$$controller){l.$scope=f,l.$element=h;var o=c(l.$$controller,l);l.$$controllerAs&&(f[l.$$controllerAs]=o,f[l.$$controllerAs][l.$$resolveAs]=m),O(o.$onInit)&&o.$onInit(),h.data("$ngControllerController",o),h.children().data("$ngControllerController",o)}n(f)}}}}function C(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function D(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function E(a){var b=a.parent().inheritedData("$uiView");if(b&&b.state&&b.state.name)return b.state}function F(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function G(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function H(a,b){return{relative:E(a)||b.$current,inherit:!0}}function I(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h,i=D(f.uiSref,a.current.name),j={state:i.state,href:null,params:null},k=F(e),l=g[1]||g[0],m=null;j.options=T(H(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var n=function(c){c&&(j.params=b.copy(c)),j.href=a.href(i.state,j.params,j.options),m&&m(),l&&(m=l.$$addStateInfo(i.state,j.params)),null!==j.href&&f.$set(k.attr,j.href)};i.paramExpr&&(d.$watch(i.paramExpr,function(a){a!==j.params&&n(a)},!0),j.params=b.copy(d.$eval(i.paramExpr))),n(),k.clickable&&(h=G(e,a,c,k,function(){return j}),e[e.on?"on":"bind"]("click",h),d.$on("$destroy",function(){e[e.off?"off":"unbind"]("click",h)}))}}}function J(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){m.state=b[0],m.params=b[1],m.options=b[2],m.href=a.href(m.state,m.params,m.options),n&&n(),j&&(n=j.$$addStateInfo(m.state,m.params)),m.href&&e.$set(i.attr,m.href)}var h,i=F(d),j=f[1]||f[0],k=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],l="["+k.map(function(a){return a||"null"}).join(", ")+"]",m={state:null,params:null,options:null,href:null},n=null;c.$watch(l,g,!0),g(c.$eval(l)),i.clickable&&(h=G(d,a,b,i,function(){return m}),d[d.on?"on":"bind"]("click",h),c.$on("$destroy",function(){d[d.off?"off":"unbind"]("click",h)}))}}}function K(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,E(d)),g=h(b,c),i={state:f||{name:b},params:c,hash:g};return p.push(i),q[g]=e,function(){var a=p.indexOf(i);a!==-1&&p.splice(a,1)}}function h(a,c){if(!P(a))throw new Error("state should be a string");return Q(c)?a+V(c):(c=b.$eval(c),Q(c)?a+V(c):a)}function i(){for(var a=0;a<p.length;a++)l(p[a].state,p[a].params)?j(d,q[p[a].hash]):k(d,q[p[a].hash]),m(p[a].state,p[a].params)?j(d,n):k(d,n)}function j(a,b){f(function(){a.addClass(b)})}function k(a,b){a.removeClass(b)}function l(b,c){return a.includes(b.name,c)}function m(b,c){return a.is(b.name,c)}var n,o,p=[],q={};n=c(e.uiSrefActiveEq||"",!1)(b);try{o=b.$eval(e.uiSrefActive)}catch(a){}o=o||c(e.uiSrefActive||"",!1)(b),Q(o)&&S(o,function(c,d){if(P(c)){var e=D(c,a.current.name);g(e.state,b.$eval(e.paramExpr),d)}}),this.$$addStateInfo=function(a,b){if(!(Q(o)&&p.length>0)){var c=g(a,b,o);return i(),c}},b.$on("$stateChangeSuccess",i),i()}]}}function L(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function M(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}
403var N=b.isDefined,O=b.isFunction,P=b.isString,Q=b.isObject,R=b.isArray,S=b.forEach,T=b.extend,U=b.copy,V=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),q.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",q),b.module("ui.router.util").provider("$templateFactory",r);var W;t.prototype.concat=function(a,b){var c={caseInsensitive:W.caseInsensitive(),strict:W.strictMode(),squash:W.defaultSquashPolicy()};return new t(this.sourcePath+a+this.sourceSearch,T(c,b),this)},t.prototype.toString=function(){return this.source},t.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;e<j;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),N(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}for(;e<i;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);N(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}return k},t.prototype.parameters=function(a){return N(a)?this.params[a]||null:this.$$paramNames},t.prototype.validates=function(a){return this.params.$$validates(a)},t.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCo
403deAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;f<i;f++){var k=f<h,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=!!p&&m.squash,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=R(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else P(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(R(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},u.prototype.is=function(a,b){return!0},u.prototype.encode=function(a,b){return a},u.prototype.decode=function(a,b){return a},u.prototype.equals=function(a,b){return a==b},u.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},u.prototype.pattern=/.*/,u.prototype.toString=function(){return"{Type:"+this.name+"}"},u.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},u.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return R(a)?a:N(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(R(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;
404for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",v),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),w.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",w),x.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").factory("$stateParams",function(){return{}}).constant("$state.runtime",{autoinject:!0}).provider("$state",x).run(["$injector",function(a){a.get("$state.runtime").autoinject&&a.get("$state")}]),y.$inject=[],b.module("ui.router.state").provider("$view",y),b.module("ui.router.state").provider("$uiViewScroll",z),A.$inject=["$state","$injector","$uiViewScroll","$interpolate","$q"],B.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",A),b.module("ui.router.state").directive("uiView",B),I.$inject=["$state","$timeout"],J.$inject=["$state","$timeout"],K.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",I).directive("uiSrefActive",K).directive("uiSrefActiveEq",K).directive("uiState",J),L.$inject=["$state"],M.$inject=["$state"],b.module("ui.router.state").filter("isState",L).filter("includedByState",M)}(window,window.angular);;
405/**
406 * @license AngularJS v1.7.8
407 * (c) 2010-2018 Google, Inc. http://angularjs.org
408 * License: MIT
409 */
410(function(window, angular) {
411
412'use strict';
413
414/* global routeToRegExp: true */
415
416/**
417 * @param {string} path - The path to parse. (It is assumed to have query and hash stripped off.)
418 * @param {Object} opts - Options.
419 * @return {Object} - An object containing an array of path parameter names (`keys`) and a regular
420 *     expression (`regexp`) that can be used to identify a matching URL and extract the path
421 *     parameter values.
422 *
423 * @description
424 * Parses the given path, extracting path parameter names and a regular expression to match URLs.
425 *
426 * Originally inspired by `pathRexp` in `visionmedia/express/lib/utils.js`.
427 */
428function routeToRegExp(path, opts) {
429  var keys = [];
430
431  var pattern = path
432    .replace(/([().])/g, '\\$1')
433    .replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) {
434      var optional = option === '?' || option === '*?';
435      var star = option === '*' || option === '*?';
436      keys.push({name: key, optional: optional});
437      slash = slash || '';
438      return (
439        (optional ? '(?:' + slash : slash + '(?:') +
440        (star ? '(.+?)' : '([^/]+)') +
441        (optional ? '?)?' : ')')
442      );
443    })
444    .replace(/([/$*])/g, '\\$1');
445
446  if (opts.ignoreTrailingSlashes) {
447    pattern = pattern.replace(/\/+$/, '') + '/*';
448  }
449
450  return {
451    keys: keys,
452    regexp: new RegExp(
453      '^' + pattern + '(?:[?#]|$)',
454      opts.caseInsensitiveMatch ? 'i' : ''
455    )
456  };
457}
458
459'use strict';
460
461/* global routeToRegExp: false */
462
463/**
464 * @ngdoc object
465 * @name angular.mock
466 * @description
467 *
468 * Namespace from 'angular-mocks.js' which contains testing related code.
469 *
470 */
471angular.mock = {};
472
473/**
474 * ! This is a private undocumented service !
475 *
476 * @name $browser
477 *
478 * @description
479 * This service is a mock implementation of {@link ng.$browser}. It provides fake
480 * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
481 * cookies, etc.
482 *
483 * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
484 * that there are several helper methods available which can be used in tests.
485 */
486angular.mock.$BrowserProvider = function() {
487  this.$get = [
488    '$log', '$$taskTrackerFactory',
489    function($log, $$taskTrackerFactory) {
490      return new angular.mock.$Browser($log, $$taskTrackerFactory);
491    }
492  ];
493};
494
495angular.mock.$Browser = function($log, $$taskTrackerFactory) {
496  var self = this;
497  var taskTracker = $$taskTrackerFactory($log);
498
499  this.isMock = true;
500  self.$$url = 'http://server/';
501  self.$$lastUrl = self.$$url; // used by url polling fn
502  self.pollFns = [];
503
504  // Task-tracking API
505  self.$$completeOutstandingRequest = taskTracker.completeTask;
506  self.$$incOutstandingRequestCount = taskTracker.incTaskCount;
507  self.notifyWhenNoOutstandingRequests = taskTracker.notifyWhenNoPendingTasks;
508
509  // register url polling fn
510
511  self.onUrlChange = function(listener) {
512    self.pollFns.push(
513      function() {
514        if (self.$$lastUrl !== self.$$url || self.$$state !== self.$$lastState) {
515          self.$$lastUrl = self.$$url;
516          self.$$lastState = self.$$state;
517          listener(self.$$url, self.$$state);
518        }
519      }
520    );
521
522    return listener;
523  };
524
525  self.$$applicationDestroyed = angular.noop;
526  self.$$checkUrlChange = angular.noop;
527
528  self.deferredFns = [];
529  self.deferredNextId = 0;
530
531  self.defer = function(fn, delay, taskType) {
532    var timeoutId = self.deferredNextId++;
533
534    delay = delay || 0;
535    taskType = taskType || taskTracker.DEFAULT_TASK_TYPE;
536
537    taskTracker.incTaskCount(taskType);
538    self.deferredFns.push({
539      id: timeoutId,
540      type: taskType,
541      time: (self.defer.now + delay),
542      fn: fn
543    });
544    self.deferredFns.sort(function(a, b) { return a.time - b.time; });
545
546    return timeoutId;
547  };
548
549
550  /**
551   * @name $browser#defer.now
552   *
553   * @description
554   * Current milliseconds mock time.
555   */
556  self.defer.now = 0;
557
558
559  self.defer.cancel = function(deferId) {
560    var taskIndex;
561
562    angular.forEach(self.deferredFns, function(task, index) {
563      if (task.id === deferId) taskIndex = index;
564    });
565
566    if (angular.isDefined(taskIndex)) {
567      var task = self.deferredFns.splice(taskIndex, 1)[0];
568      taskTracker.completeTask(angular.noop, task.type);
569      return true;
570    }
571
572    return false;
573  };
574
575
576  /**
577   * @name $browser#defer.flush
578   *
579   * @description
580   * Flushes all pending requests and executes the defer callbacks.
581   *
582   * See {@link ngMock.$flushPendingsTasks} for more info.
583   *
584   * @param {number=} number of milliseconds to flush. See {@link #defer.now}
585   */
586  self.defer.flush = function(delay) {
587    var nextTime;
588
589    if (angular.isDefined(delay)) {
590      // A delay was passed so compute the next time
591      nextTime = self.defer.now + delay;
592    } else if (self.deferredFns.length) {
593      // No delay was passed so set the next time so that it clears the deferred queue
594      nextTime = self.deferredFns[self.deferredFns.length - 1].time;
595    } else {
596      // No delay passed, but there are no deferred tasks so flush - indicates an error!
597      throw new Error('No deferred tasks to be flushed');
598    }
599
600    while (self.deferredFns.length && self.deferredFns[0].time <= nextTime) {
601      // Increment the time and call the next deferred function
602      self.defer.now = self.deferredFns[0].time;
603      var task = self.deferredFns.shift();
604      taskTracker.completeTask(task.fn, task.type);
605    }
606
607    // Ensure that the current time is correct
608    self.defer.now = nextTime;
609  };
610
611  /**
612   * @name $browser#defer.getPendingTasks
613   *
614   * @description
615   * Returns the currently pending tasks that need to be flushed.
616   * You can request a specific type of tasks only, by specifying a `taskType`.
617   *
618   * @param {string=} taskType - The type tasks to return.
619   */
620  self.defer.getPendingTasks = function(taskType) {
621    return !taskType
622        ? self.deferredFns
623        : self.deferredFns.filter(function(task) { return task.type === taskType; });
624  };
625
626  /**
627   * @name $browser#defer.formatPendingTasks
628   *
629   * @description
630   * Formats each task in a list of pending tasks as a string, suitable for use in error messages.
631   *
632   * @param {Array<Object>} pendingTasks - A list of task objects.
633   * @return {Array<string>} A list of stringified tasks.
634   */
635  self.defer.formatPendingTasks = function(pendingTasks) {
636    return pendingTasks.map(function(task) {
637      return '{id: ' + task.id + ', type: ' + task.type + ', time: ' + task.time + '}';
638    });
639  };
640
641  /**
642   * @name $browser#defer.verifyNoPendingTasks
643   *
644   * @description
645   * Verifies that there are no pending tasks that need to be flushed.
646   * You can check for a specific type of tasks only, by specifying a `taskType`.
647   *
648   * See {@link $verifyNoPendingTasks} for more info.
649   *
650   * @param {string=} taskType - The type tasks to check for.
651   */
652  self.defer.verifyNoPendingTasks = function(taskType) {
653    var pendingTasks = self.defer.getPendingTasks(taskType);
654
655    if (pendingTasks.length) {
656      var formattedTasks = self.defer.formatPendingTasks(pendingTasks).join('\n  ');
657      throw new Error('Deferred tasks to flush (' + pendingTasks.length + '):\n  ' +
658          formattedTasks);
659    }
660  };
661
662  self.$$baseHref = '/';
663  self.baseHref = function() {
664    return this.$$baseHref;
665  };
666};
667angular.mock.$Browser.prototype = {
668
669  /**
670   * @name $browser#poll
671   *
672   * @description
673   * run all fns in pollFns
674   */
675  poll: function poll() {
676    angular.forEach(this.pollFns, function(pollFn) {
677      pollFn();
678    });
679  },
680
681  url: function(url, replace, state) {
682    if (angular.isUndefined(state)) {
683      state = null;
684    }
685    if (url) {
686      // The `$browser` service trims empty hashes; simulate it.
687      this.$$url = url.replace(/#$/, '');
688      // Native pushState serializes & copies the object; simulate it.
689      this.$$state = angular.copy(state);
690      return this;
691    }
692
693    return this.$$url;
694  },
695
696  state: function() {
697    return this.$$state;
698  }
699};
700
701/**
702 * @ngdoc service
703 * @name $flushPendingTasks
704 *
705 * @description
706 * Flushes all currently pending tasks and executes the corresponding callbacks.
707 *
708 * Optionally, you can also pass a `delay` argument to only flush tasks that are scheduled to be
709 * executed within `delay` milliseconds. Currently, `delay` only applies to timeouts, since all
710 * other tasks have a delay of 0 (i.e. they are scheduled to be executed as soon as possible, but
711 * still asynchronously).
712 *
713 * If no delay is specified, it uses a delay such that all currently pending tasks are flushed.
714 *
715 * The types of tasks that are flushed include:
716 *
717 * - Pending timeouts (via {@link $timeout}).
718 * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync $applyAsync}.
719 * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
720 *   These include tasks scheduled via `$evalAsync()` indirectly (such as {@link $q} promises).
721 *
722 * <div class="alert alert-info">
723 *   Periodic tasks scheduled via {@link $interval} use a different queue and are not flushed by
724 *   `$flushPendingTasks()`. Use {@link ngMock.$interval#flush $interval.flush(millis)} instead.
725 * </div>
726 *
727 * @param {number=} delay - The number of milliseconds to flush.
728 */
729angular.mock.$FlushPendingTasksProvider = function() {
730  this.$get = [
731    '$browser',
732    function($browser) {
733      return function $flushPendingTasks(delay) {
734        return $browser.defer.flush(delay);
735      };
736    }
737  ];
738};
739
740/**
741 * @ngdoc service
742 * @name $verifyNoPendingTasks
743 *
744 * @description
745 * Verifies that there are no pending tasks that need to be flushed. It throws an error if there are
746 * still pending tasks.
747 *
748 * You can check for a specific type of tasks only, by specifying a `taskType`.
749 *
750 * Available task types:
751 *
752 * - `$timeout`: Pending timeouts (via {@link $timeout}).
753 * - `$http`: Pending HTTP requests (via {@link $http}).
754 * - `$route`: In-progress route transitions (via {@link $route}).
755 * - `$applyAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync $applyAsync}.
756 * - `$evalAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
757 *   These include tasks scheduled via `$evalAsync()` indirectly (such as {@link $q} promises).
758 *
759 * <div class="alert alert-info">
760 *   Periodic tasks scheduled via {@link $interval} use a different queue and are not taken into
761 *   account by `$verifyNoPendingTasks()`. There is currently no way to verify that there are no
762 *   pending {@link $interval} tasks.
763 * </div>
764 *
765 * @param {string=} taskType - The type of tasks to check for.
766 */
767angular.mock.$VerifyNoPendingTasksProvider = function() {
768  this.$get = [
769    '$browser',
770    function($browser) {
771      return function $verifyNoPendingTasks(taskType) {
772        return $browser.defer.verifyNoPendingTasks(taskType);
773      };
774    }
775  ];
776};
777
778/**
779 * @ngdoc provider
780 * @name $exceptionHandlerProvider
781 *
782 * @description
783 * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors
784 * passed to the `$exceptionHandler`.
785 */
786
787/**
788 * @ngdoc service
789 * @name $exceptionHandler
790 *
791 * @description
792 * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
793 * to it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
794 * information.
795 *
796 *
797 * ```js
798 *   describe('$exceptionHandlerProvider', function() {
799 *
800 *     it('should capture log messages and exceptions', function() {
801 *
802 *       module(function($exceptionHandlerProvider) {
803 *         $exceptionHandlerProvider.mode('log');
804 *       });
805 *
806 *       inject(function($log, $exceptionHandler, $timeout) {
807 *         $timeout(function() { $log.log(1); });
808 *         $timeout(function() { $log.log(2); throw 'banana peel'; });
809 *         $timeout(function() { $log.log(3); });
810 *         expect($exceptionHandler.errors).toEqual([]);
811 *         expect($log.assertEmpty());
812 *         $timeout.flush();
813 *         expect($exceptionHandler.errors).toEqual(['banana peel']);
814 *         expect($log.log.logs).toEqual([[1], [2], [3]]);
815 *       });
816 *     });
817 *   });
818 * ```
819 */
820
821angular.mock.$ExceptionHandlerProvider = function() {
822  var handler;
823
824  /**
825   * @ngdoc method
826   * @name $exceptionHandlerProvider#mode
827   *
828   * @description
829   * Sets the logging mode.
830   *
831   * @param {string} mode Mode of operation, defaults to `rethrow`.
832   *
833   *   - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log`
834   *     mode stores an array of errors in `$exceptionHandler.errors`, to allow later assertion of
835   *     them. See {@link ngMock.$log#assertEmpty assertEmpty()} and
836   *     {@link ngMock.$log#reset reset()}.
837   *   - `rethrow`: If any errors are passed to the handler in tests, it typically means that there
838   *     is a bug in the application or test, so this mock will make these tests fail. For any
839   *     implementations that expect exceptions to be thrown, the `rethrow` mode will also maintain
840   *     a log of thrown errors in `$exceptionHandler.errors`.
841   */
842  this.mode = function(mode) {
843
844    switch (mode) {
845      case 'log':
846      case 'rethrow':
847        var errors = [];
848        handler = function(e) {
849          if (arguments.length === 1) {
850            errors.push(e);
851          } else {
852            errors.push([].slice.call(arguments, 0));
853          }
854          if (mode === 'rethrow') {
855            throw e;
856          }
857        };
858        handler.errors = errors;
859        break;
860      default:
861        throw new Error('Unknown mode \'' + mode + '\', only \'log\'/\'rethrow\' modes are allowed!');
862    }
863  };
864
865  this.$get = function() {
866    return handler;
867  };
868
869  this.mode('rethrow');
870};
871
872
873/**
874 * @ngdoc service
875 * @name $log
876 *
877 * @description
878 * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
879 * (one array per logging level). These arrays are exposed as `logs` property of each of the
880 * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
881 *
882 */
883angular.mock.$LogProvider = function() {
884  var debug = true;
885
886  function concat(array1, array2, index) {
887    return array1.concat(Array.prototype.slice.call(array2, index));
888  }
889
890  this.debugEnabled = function(flag) {
891    if (angular.isDefined(flag)) {
892      debug = flag;
893      return this;
894    } else {
895      return debug;
896    }
897  };
898
899  this.$get = function() {
900    var $log = {
901      log: function() { $log.log.logs.push(concat([], arguments, 0)); },
902      warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
903      info: function() { $log.info.logs.push(concat([], arguments, 0)); },
904      error: function() { $log.error.logs.push(concat([], arguments, 0)); },
905      debug: function() {
906        if (debug) {
907          $log.debug.logs.push(concat([], arguments, 0));
908        }
909      }
910    };
911
912    /**
913     * @ngdoc method
914     * @name $log#reset
915     *
916     * @description
917     * Reset all of the logging arrays to empty.
918     */
919    $log.reset = function() {
920      /**
921       * @ngdoc property
922       * @name $log#log.logs
923       *
924       * @description
925       * Array of messages logged using {@link ng.$log#log `log()`}.
926       *
927       * @example
928       * ```js
929       * $log.log('Some Log');
930       * var first = $log.log.logs.unshift();
931       * ```
932       */
933      $log.log.logs = [];
934      /**
935       * @ngdoc property
936       * @name $log#info.logs
937       *
938       * @description
939       * Array of messages logged using {@link ng.$log#info `info()`}.
940       *
941       * @example
942       * ```js
943       * $log.info('Some Info');
944       * var first = $log.info.logs.unshift();
945       * ```
946       */
947      $log.info.logs = [];
948      /**
949       * @ngdoc property
950       * @name $log#warn.logs
951       *
952       * @description
953       * Array of messages logged using {@link ng.$log#warn `warn()`}.
954       *
955       * @example
956       * ```js
957       * $log.warn('Some Warning');
958       * var first = $log.warn.logs.unshift();
959       * ```
960       */
961      $log.warn.logs = [];
962      /**
963       * @ngdoc property
964       * @name $log#error.logs
965       *
966       * @description
967       * Array of messages logged using {@link ng.$log#error `error()`}.
968       *
969       * @example
970       * ```js
971       * $log.error('Some Error');
972       * var first = $log.error.logs.unshift();
973       * ```
974       */
975      $log.error.logs = [];
976        /**
977       * @ngdoc property
978       * @name $log#debug.logs
979       *
980       * @description
981       * Array of messages logged using {@link ng.$log#debug `debug()`}.
982       *
983       * @example
984       * ```js
985       * $log.debug('Some Error');
986       * var first = $log.debug.logs.unshift();
987       * ```
988       */
989      $log.debug.logs = [];
990    };
991
992    /**
993     * @ngdoc method
994     * @name $log#assertEmpty
995     *
996     * @description
997     * Assert that all of the logging methods have no logged messages. If any messages are present,
998     * an exception is thrown.
999     */
1000    $log.assertEmpty = function() {
1001      var errors = [];
1002      angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) {
1003        angular.forEach($log[logLevel].logs, function(log) {
1004          angular.forEach(log, function(logItem) {
1005            errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' +
1006                        (logItem.stack || ''));
1007          });
1008        });
1009      });
1010      if (errors.length) {
1011        errors.unshift('Expected $log to be empty! Either a message was logged unexpectedly, or ' +
1012          'an expected log message was not checked and removed:');
1013        errors.push('');
1014        throw new Error(errors.join('\n---------\n'));
1015      }
1016    };
1017
1018    $log.reset();
1019    return $log;
1020  };
1021};
1022
1023
1024/**
1025 * @ngdoc service
1026 * @name $interval
1027 *
1028 * @description
1029 * Mock implementation of the $interval service.
1030 *
1031 * Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
1032 * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
1033 * time.
1034 *
1035 * @param {function()} fn A function that should be called repeatedly.
1036 * @param {number} delay Number of milliseconds between each function call.
1037 * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
1038 *   indefinitely.
1039 * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
1040 *   will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
1041 * @param {...*=} Pass additional parameters to the executed function.
1042 * @returns {promise} A promise which will be notified on each iteration.
1043 */
1044angular.mock.$IntervalProvider = function() {
1045  this.$get = ['$browser', '$$intervalFactory',
1046       function($browser,   $$intervalFactory) {
1047    var repeatFns = [],
1048        nextRepeatId = 0,
1049        now = 0,
1050        setIntervalFn = function(tick, delay, deferred, skipApply) {
1051          var id = nextRepeatId++;
1052          var fn = !skipApply ? tick : function() {
1053            tick();
1054            $browser.defer.flush();
1055          };
1056
1057          repeatFns.push({
1058            nextTime: (now + (delay || 0)),
1059            delay: delay || 1,
1060            fn: fn,
1061            id: id,
1062            deferred: deferred
1063          });
1064          repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime; });
1065
1066          return id;
1067        },
1068        clearIntervalFn = function(id) {
1069          for (var fnIndex = repeatFns.length - 1; fnIndex >= 0; fnIndex--) {
1070            if (repeatFns[fnIndex].id === id) {
1071              repeatFns.splice(fnIndex, 1);
1072              break;
1073            }
1074          }
1075        };
1076
1077    var $interval = $$intervalFactory(setIntervalFn, clearIntervalFn);
1078
1079    /**
1080     * @ngdoc method
1081     * @name $interval#cancel
1082     *
1083     * @description
1084     * Cancels a task associated with the `promise`.
1085     *
1086     * @param {promise} promise A promise from calling the `$interval` function.
1087     * @returns {boolean} Returns `true` if the task was successfully cancelled.
1088     */
1089    $interval.cancel = function(promise) {
1090      if (!promise) return false;
1091
1092      for (var fnIndex = repeatFns.length - 1; fnIndex >= 0; fnIndex--) {
1093        if (repeatFns[fnIndex].id === promise.$$intervalId) {
1094          var deferred = repeatFns[fnIndex].deferred;
1095          deferred.promise.then(undefined, function() {});
1096          deferred.reject('canceled');
1097          repeatFns.splice(fnIndex, 1);
1098          return true;
1099        }
1100      }
1101
1102      return false;
1103    };
1104
1105    /**
1106     * @ngdoc method
1107     * @name $interval#flush
1108     * @description
1109     *
1110     * Runs interval tasks scheduled to be run in the next `millis` milliseconds.
1111     *
1112     * @param {number} millis maximum timeout amount to flush up until.
1113     *
1114     * @return {number} The amount of time moved forward.
1115     */
1116    $interval.flush = function(millis) {
1117      var before = now;
1118      now += millis;
1119      while (repeatFns.length && repeatFns[0].nextTime <= now) {
1120        var task = repeatFns[0];
1121        task.fn();
1122        if (task.nextTime === before) {
1123          // this can only happen the first time
1124          // a zero-delay interval gets triggered
1125          task.nextTime++;
1126        }
1127        task.nextTime += task.delay;
1128        repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;});
1129      }
1130      return millis;
1131    };
1132
1133    return $interval;
1134  }];
1135};
1136
1137
1138function jsonStringToDate(string) {
1139  // The R_ISO8061_STR regex is never going to fit into the 100 char limit!
1140  // eslit-disable-next-line max-len
1141  var R_ISO8061_STR = /^(-?\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
1142
1143  var match;
1144  if ((match = string.match(R_ISO8061_STR))) {
1145    var date = new Date(0),
1146        tzHour = 0,
1147        tzMin  = 0;
1148    if (match[9]) {
1149      tzHour = toInt(match[9] + match[10]);
1150      tzMin = toInt(match[9] + match[11]);
1151    }
1152    date.setUTCFullYear(toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));
1153    date.setUTCHours(toInt(match[4] || 0) - tzHour,
1154                     toInt(match[5] || 0) - tzMin,
1155                     toInt(match[6] || 0),
1156                     toInt(match[7] || 0));
1157    return date;
1158  }
1159  return string;
1160}
1161
1162function toInt(str) {
1163  return parseInt(str, 10);
1164}
1165
1166function padNumberInMock(num, digits, trim) {
1167  var neg = '';
1168  if (num < 0) {
1169    neg =  '-';
1170    num = -num;
1171  }
1172  num = '' + num;
1173  while (num.length < digits) num = '0' + num;
1174  if (trim) {
1175    num = num.substr(num.length - digits);
1176  }
1177  return neg + num;
1178}
1179
1180
1181/**
1182 * @ngdoc type
1183 * @name angular.mock.TzDate
1184 * @description
1185 *
1186 * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
1187 *
1188 * Mock of the Date type which has its timezone specified via constructor arg.
1189 *
1190 * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
1191 * offset, so that we can test code that depends on local timezone settings without dependency on
1192 * the time zone settings of the machine where the code is running.
1193 *
1194 * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
1195 * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
1196 *
1197 * @example
1198 * !!!! WARNING !!!!!
1199 * This is not a complete Date object so only methods that were implemented can be called safely.
1200 * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
1201 *
1202 * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
1203 * incomplete we might be missing some non-standard methods. This can result in errors like:
1204 * "Date.prototype.foo called on incompatible Object".
1205 *
1206 * ```js
1207 * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
1208 * newYearInBratislava.getTimezoneOffset() => -60;
1209 * newYearInBratislava.getFullYear() => 2010;
1210 * newYearInBratislava.getMonth() => 0;
1211 * newYearInBratislava.getDate() => 1;
1212 * newYearInBratislava.getHours() => 0;
1213 * newYearInBratislava.getMinutes() => 0;
1214 * newYearInBratislava.getSeconds() => 0;
1215 * ```
1216 *
1217 */
1218angular.mock.TzDate = function(offset, timestamp) {
1219  var self = new Date(0);
1220  if (angular.isString(timestamp)) {
1221    var tsStr = timestamp;
1222
1223    self.origDate = jsonStringToDate(timestamp);
1224
1225    timestamp = self.origDate.getTime();
1226    if (isNaN(timestamp)) {
1227      // eslint-disable-next-line no-throw-literal
1228      throw {
1229        name: 'Illegal Argument',
1230        message: 'Arg \'' + tsStr + '\' passed into TzDate constructor is not a valid date string'
1231      };
1232    }
1233  } else {
1234    self.origDate = new Date(timestamp);
1235  }
1236
1237  var localOffset = new Date(timestamp).getTimezoneOffset();
1238  self.offsetDiff = localOffset * 60 * 1000 - offset * 1000 * 60 * 60;
1239  self.date = new Date(timestamp + self.offsetDiff);
1240
1241  self.getTime = function() {
1242    return self.date.getTime() - self.offsetDiff;
1243  };
1244
1245  self.toLocaleDateString = function() {
1246    return self.date.toLocaleDateString();
1247  };
1248
1249  self.getFullYear = function() {
1250    return self.date.getFullYear();
1251  };
1252
1253  self.getMonth = function() {
1254    return self.date.getMonth();
1255  };
1256
1257  self.getDate = function() {
1258    return self.date.getDate();
1259  };
1260
1261  self.getHours = function() {
1262    return self.date.getHours();
1263  };
1264
1265  self.getMinutes = function() {
1266    return self.date.getMinutes();
1267  };
1268
1269  self.getSeconds = function() {
1270    return self.date.getSeconds();
1271  };
1272
1273  self.getMilliseconds = function() {
1274    return self.date.getMilliseconds();
1275  };
1276
1277  self.getTimezoneOffset = function() {
1278    return offset * 60;
1279  };
1280
1281  self.getUTCFullYear = function() {
1282    return self.origDate.getUTCFullYear();
1283  };
1284
1285  self.getUTCMonth = function() {
1286    return self.origDate.getUTCMonth();
1287  };
1288
1289  self.getUTCDate = function() {
1290    return self.origDate.getUTCDate();
1291  };
1292
1293  self.getUTCHours = function() {
1294    return self.origDate.getUTCHours();
1295  };
1296
1297  self.getUTCMinutes = function() {
1298    return self.origDate.getUTCMinutes();
1299  };
1300
1301  self.getUTCSeconds = function() {
1302    return self.origDate.getUTCSeconds();
1303  };
1304
1305  self.getUTCMilliseconds = function() {
1306    return self.origDate.getUTCMilliseconds();
1307  };
1308
1309  self.getDay = function() {
1310    return self.date.getDay();
1311  };
1312
1313  // provide this method only on browsers that already have it
1314  if (self.toISOString) {
1315    self.toISOString = function() {
1316      return padNumberInMock(self.origDate.getUTCFullYear(), 4) + '-' +
1317            padNumberInMock(self.origDate.getUTCMonth() + 1, 2) + '-' +
1318            padNumberInMock(self.origDate.getUTCDate(), 2) + 'T' +
1319            padNumberInMock(self.origDate.getUTCHours(), 2) + ':' +
1320            padNumberInMock(self.origDate.getUTCMinutes(), 2) + ':' +
1321            padNumberInMock(self.origDate.getUTCSeconds(), 2) + '.' +
1322            padNumberInMock(self.origDate.getUTCMilliseconds(), 3) + 'Z';
1323    };
1324  }
1325
1326  //hide all methods not implemented in this mock that the Date prototype exposes
1327  var unimplementedMethods = ['getUTCDay',
1328      'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
1329      'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
1330      'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
1331      'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleStr
1331ing',
1332      'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
1333
1334  angular.forEach(unimplementedMethods, function(methodName) {
1335    self[methodName] = function() {
1336      throw new Error('Method \'' + methodName + '\' is not implemented in the TzDate mock');
1337    };
1338  });
1339
1340  return self;
1341};
1342
1343//make "tzDateInstance instanceof Date" return true
1344angular.mock.TzDate.prototype = Date.prototype;
1345
1346
1347/**
1348 * @ngdoc service
1349 * @name $animate
1350 *
1351 * @description
1352 * Mock implementation of the {@link ng.$animate `$animate`} service. Exposes two additional methods
1353 * for testing animations.
1354 *
1355 * You need to require the `ngAnimateMock` module in your test suite for instance `beforeEach(module('ngAnimateMock'))`
1356 */
1357angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
1358  .info({ angularVersion: '1.7.8' })
1359
1360  .config(['$provide', function($provide) {
1361
1362    $provide.factory('$$forceReflow', function() {
1363      function reflowFn() {
1364        reflowFn.totalReflows++;
1365      }
1366      reflowFn.totalReflows = 0;
1367      return reflowFn;
1368    });
1369
1370    $provide.factory('$$animateAsyncRun', function() {
1371      var queue = [];
1372      var queueFn = function() {
1373        return function(fn) {
1374          queue.push(fn);
1375        };
1376      };
1377      queueFn.flush = function() {
1378        if (queue.length === 0) return false;
1379
1380        for (var i = 0; i < queue.length; i++) {
1381          queue[i]();
1382        }
1383        queue = [];
1384
1385        return true;
1386      };
1387      return queueFn;
1388    });
1389
1390    $provide.decorator('$$animateJs', ['$delegate', function($delegate) {
1391      var runners = [];
1392
1393      var animateJsConstructor = function() {
1394        var animator = $delegate.apply($delegate, arguments);
1395        // If no javascript animation is found, animator is undefined
1396        if (animator) {
1397          runners.push(animator);
1398        }
1399        return animator;
1400      };
1401
1402      animateJsConstructor.$closeAndFlush = function() {
1403        runners.forEach(function(runner) {
1404          runner.end();
1405        });
1406        runners = [];
1407      };
1408
1409      return animateJsConstructor;
1410    }]);
1411
1412    $provide.decorator('$animateCss', ['$delegate', function($delegate) {
1413      var runners = [];
1414
1415      var animateCssConstructor = function(element, options) {
1416        var animator = $delegate(element, options);
1417        runners.push(animator);
1418        return animator;
1419      };
1420
1421      animateCssConstructor.$closeAndFlush = function() {
1422        runners.forEach(function(runner) {
1423          runner.end();
1424        });
1425        runners = [];
1426      };
1427
1428      return animateCssConstructor;
1429    }]);
1430
1431    $provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF', '$animateCss', '$$animateJs',
1432                                    '$$forceReflow', '$$animateAsyncRun', '$rootScope',
1433                            function($delegate,   $timeout,   $browser,   $$rAF,   $animateCss,   $$animateJs,
1434                                     $$forceReflow,   $$animateAsyncRun,  $rootScope) {
1435      var animate = {
1436        queue: [],
1437        cancel: $delegate.cancel,
1438        on: $delegate.on,
1439        off: $delegate.off,
1440        pin: $delegate.pin,
1441        get reflows() {
1442          return $$forceReflow.totalReflows;
1443        },
1444        enabled: $delegate.enabled,
1445        /**
1446         * @ngdoc method
1447         * @name $animate#closeAndFlush
1448         * @description
1449         *
1450         * This method will close all pending animations (both {@link ngAnimate#javascript-based-animations Javascript}
1451         * and {@link ngAnimate.$animateCss CSS}) and it will also flush any remaining animation frames and/or callbacks.
1452         */
1453        closeAndFlush: function() {
1454          // we allow the flush command to swallow the errors
1455          // because depending on whether CSS or JS animations are
1456          // used, there may not be a RAF flush. The primary flush
1457          // at the end of this function must throw an exception
1458          // because it will track if there were pending animations
1459          this.flush(true);
1460          $animateCss.$closeAndFlush();
1461          $$animateJs.$closeAndFlush();
1462          this.flush();
1463        },
1464        /**
1465         * @ngdoc method
1466         * @name $animate#flush
1467         * @description
1468         *
1469         * This method is used to flush the pending callbacks and animation frames to either start
1470         * an animation or conclude an animation. Note that this will not actually close an
1471         * actively running animation (see {@link ngMock.$animate#closeAndFlush `closeAndFlush()`} for that).
1472         */
1473        flush: function(hideErrors) {
1474          $rootScope.$digest();
1475
1476          var doNextRun, somethingFlushed = false;
1477          do {
1478            doNextRun = false;
1479
1480            if ($$rAF.queue.length) {
1481              $$rAF.flush();
1482              doNextRun = somethingFlushed = true;
1483            }
1484
1485            if ($$animateAsyncRun.flush()) {
1486              doNextRun = somethingFlushed = true;
1487            }
1488          } while (doNextRun);
1489
1490          if (!somethingFlushed && !hideErrors) {
1491            throw new Error('No pending animations ready to be closed or flushed');
1492          }
1493
1494          $rootScope.$digest();
1495        }
1496      };
1497
1498      angular.forEach(
1499        ['animate','enter','leave','move','addClass','removeClass','setClass'], function(method) {
1500        animate[method] = function() {
1501          animate.queue.push({
1502            event: method,
1503            element: arguments[0],
1504            options: arguments[arguments.length - 1],
1505            args: arguments
1506          });
1507          return $delegate[method].apply($delegate, arguments);
1508        };
1509      });
1510
1511      return animate;
1512    }]);
1513
1514  }]);
1515
1516
1517/**
1518 * @ngdoc function
1519 * @name angular.mock.dump
1520 * @description
1521 *
1522 * *NOTE*: This is not an injectable instance, just a globally available function.
1523 *
1524 * Method for serializing common AngularJS objects (scope, elements, etc..) into strings.
1525 * It is useful for logging objects to the console when debugging.
1526 *
1527 * @param {*} object - any object to turn into string.
1528 * @return {string} a serialized string of the argument
1529 */
1530angular.mock.dump = function(object) {
1531  return serialize(object);
1532
1533  function serialize(object) {
1534    var out;
1535
1536    if (angular.isElement(object)) {
1537      object = angular.element(object);
1538      out = angular.element('<div></div>');
1539      angular.forEach(object, function(element) {
1540        out.append(angular.element(element).clone());
1541      });
1542      out = out.html();
1543    } else if (angular.isArray(object)) {
1544      out = [];
1545      angular.forEach(object, function(o) {
1546        out.push(serialize(o));
1547      });
1548      out = '[ ' + out.join(', ') + ' ]';
1549    } else if (angular.isObject(object)) {
1550      if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
1551        out = serializeScope(object);
1552      } else if (object instanceof Error) {
1553        out = object.stack || ('' + object.name + ': ' + object.message);
1554      } else {
1555        // TODO(i): this prevents methods being logged,
1556        // we should have a better way to serialize objects
1557        out = angular.toJson(object, true);
1558      }
1559    } else {
1560      out = String(object);
1561    }
1562
1563    return out;
1564  }
1565
1566  function serializeScope(scope, offset) {
1567    offset = offset ||  '  ';
1568    var log = [offset + 'Scope(' + scope.$id + '): {'];
1569    for (var key in scope) {
1570      if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
1571        log.push('  ' + key + ': ' + angular.toJson(scope[key]));
1572      }
1573    }
1574    var child = scope.$$childHead;
1575    while (child) {
1576      log.push(serializeScope(child, offset + '  '));
1577      child = child.$$nextSibling;
1578    }
1579    log.push('}');
1580    return log.join('\n' + offset);
1581  }
1582};
1583
1584/**
1585 * @ngdoc service
1586 * @name $httpBackend
1587 * @description
1588 * Fake HTTP backend implementation suitable for unit testing applications that use the
1589 * {@link ng.$http $http service}.
1590 *
1591 * <div class="alert alert-info">
1592 * **Note**: For fake HTTP backend implementation suitable for end-to-e
1592nd testing or backend-less
1593 * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
1594 * </div>
1595 *
1596 * During unit testing, we want our unit tests to run quickly and have no external dependencies so
1597 * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or
1598 * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is
1599 * to verify whether a certain request has been sent or not, or alternatively just let the
1600 * application make requests, respond with pre-trained responses and assert that the end result is
1601 * what we expect it to be.
1602 *
1603 * This mock implementation can be used to respond with static or dynamic responses via the
1604 * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
1605 *
1606 * When an AngularJS application needs some data from a server, it calls the $http service, which
1607 * sends the request to a real server using $httpBackend service. With dependency injection, it is
1608 * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
1609 * the requests and respond with some testing data without sending a request to a real server.
1610 *
1611 * There are two ways to specify what test data should be returned as http responses by the mock
1612 * backend when the code under test makes http requests:
1613 *
1614 * - `$httpBackend.expect` - specifies a request expectation
1615 * - `$httpBackend.when` - specifies a backend definition
1616 *
1617 *
1618 * ## Request Expectations vs Backend Definitions
1619 *
1620 * Request expectations provide a way to make assertions about requests made by the application and
1621 * to define responses for those requests. The test will fail if the expected requests are not made
1622 * or they are made in the wrong order.
1623 *
1624 * Backend definitions allow you to define a fake backend for your application which doesn't assert
1625 * if a particular request was made or not, it just returns a trained response if a request is made.
1626 * The test will pass whether or not the request gets made during testing.
1627 *
1628 *
1629 * <table class="table">
1630 *   <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr>
1631 *   <tr>
1632 *     <th>Syntax</th>
1633 *     <td>.expect(...).respond(...)</td>
1634 *     <td>.when(...).respond(...)</td>
1635 *   </tr>
1636 *   <tr>
1637 *     <th>Typical usage</th>
1638 *     <td>strict unit tests</td>
1639 *     <td>loose (black-box) unit testing</td>
1640 *   </tr>
1641 *   <tr>
1642 *     <th>Fulfills multiple requests</th>
1643 *     <td>NO</td>
1644 *     <td>YES</td>
1645 *   </tr>
1646 *   <tr>
1647 *     <th>Order of requests matters</th>
1648 *     <td>YES</td>
1649 *     <td>NO</td>
1650 *   </tr>
1651 *   <tr>
1652 *     <th>Request required</th>
1653 *     <td>YES</td>
1654 *     <td>NO</td>
1655 *   </tr>
1656 *   <tr>
1657 *     <th>Response required</th>
1658 *     <td>optional (see below)</td>
1659 *     <td>YES</td>
1660 *   </tr>
1661 * </table>
1662 *
1663 * In cases where both backend definitions and request expectations are specified during unit
1664 * testing, the request expectations are evaluated first.
1665 *
1666 * If a request expectation has no response specified, the algorithm will search your backend
1667 * definitions for an appropriate response.
1668 *
1669 * If a request didn't match any expectation or if the expectation doesn't have the response
1670 * defined, the backend definitions are evaluated in sequential order to see if any of them match
1671 * the request. The response from the first matched definition is returned.
1672 *
1673 *
1674 * ## Flushing HTTP requests
1675 *
1676 * The $httpBackend used in production always responds to requests asynchronously. If we preserved
1677 * this behavior in unit testing, we'd have to create async unit tests, which are hard to write,
1678 * to follow and to maintain. But neither can the testing mock respond synchronously; that would
1679 * change the execution of the code under test. For this reason, the mock $httpBackend has a
1680 * `flush()` method, which allows the test to explicitly flush pending requests. This preserves
1681 * the async api of the backend, while allowing the test to execute synchronously.
1682 *
1683 *
1684 * ## Unit testing with mock $httpBackend
1685 * The following code shows how to setup and use the mock backend when unit testing a controller.
1686 * First we create the controller under test:
1687 *
1688  ```js
1689  // The module code
1690  angular
1691    .module('MyApp', [])
1692    .controller('MyController', MyController);
1693
1694  // The controller code
1695  function MyController($scope, $http) {
1696    var authToken;
1697
1698    $http.get('/auth.py').then(function(response) {
1699      authToken = response.headers('A-Token');
1700      $scope.user = response.data;
1701    }).catch(function() {
1702      $scope.status = 'Failed...';
1703    });
1704
1705    $scope.saveMessage = function(message) {
1706      var headers = { 'Authorization': authToken };
1707      $scope.status = 'Saving...';
1708
1709      $http.post('/add-msg.py', message, { headers: headers } ).then(function(response) {
1710        $scope.status = '';
1711      }).catch(function() {
1712        $scope.status = 'Failed...';
1713      });
1714    };
1715  }
1716  ```
1717 *
1718 * Now we setup the mock backend and create the test specs:
1719 *
1720  ```js
1721    // testing controller
1722    describe('MyController', function() {
1723       var $httpBackend, $rootScope, createController, authRequestHandler;
1724
1725       // Set up the module
1726       beforeEach(module('MyApp'));
1727
1728       beforeEach(inject(function($injector) {
1729         // Set up the mock http service responses
1730         $httpBackend = $injector.get('$httpBackend');
1731         // backend definition common for all tests
1732         authRequestHandler = $httpBackend.when('GET', '/auth.py')
1733                                .respond({userId: 'userX'}, {'A-Token': 'xxx'});
1734
1735         // Get hold of a scope (i.e. the root scope)
1736         $rootScope = $injector.get('$rootScope');
1737         // The $controller service is used to create instances of controllers
1738         var $controller = $injector.get('$controller');
1739
1740         createController = function() {
1741           return $controller('MyController', {'$scope' : $rootScope });
1742         };
1743       }));
1744
1745
1746       afterEach(function() {
1747         $httpBackend.verifyNoOutstandingExpectation();
1748         $httpBackend.verifyNoOutstandingRequest();
1749       });
1750
1751
1752       it('should fetch authentication token', function() {
1753         $httpBackend.expectGET('/auth.py');
1754         var controller = createController();
1755         $httpBackend.flush();
1756       });
1757
1758
1759       it('should fail authentication', function() {
1760
1761         // Notice how you can change the response even after it was set
1762         authRequestHandler.respond(401, '');
1763
1764         $httpBackend.expectGET('/auth.py');
1765         var controller = createController();
1766         $httpBackend.flush();
1767         expect($rootScope.status).toBe('Failed...');
1768       });
1769
1770
1771       it('should send msg to server', function() {
1772         var controller = createController();
1773         $httpBackend.flush();
1774
1775         // now you don’t care about the authentication, but
1776         // the controller will still send the request and
1777         // $httpBackend will respond without you having to
1778         // specify the expectation and response for this request
1779
1780         $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
1781         $rootScope.saveMessage('message content');
1782         expect($rootScope.status).toBe('Saving...');
1783         $httpBackend.flush();
1784         expect($rootScope.status).toBe('');
1785       });
1786
1787
1788       it('should send auth header', function() {
1789         var controller = createController();
1790         $httpBackend.flush();
1791
1792         $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
1793           // check if the header was sent, if it wasn't the expectation won't
1794           // match the request and the test will fail
1795           return headers['Authorization'] === 'xxx';
1796         }).respond(201, '');
1797
1798         $rootScope.saveMessage('whatever');
1799         $httpBackend.flush();
1800       });
1801    });
1802  ```
1803 *
1804 * ## Dynamic responses
1805 *
1806 * You define a response to a request by chaining a call to `respond()` onto a definition or expectation.
1807 * If you provide a **callback** as the first parameter to `respond(callback)` then you can dynamically generate
1808 * a response based on the properties of the request.
1809 *
1810 * The `callback` function should be of the form `function(method, url, data, headers, params)`.
1811 *
1812 * ### Query parameters
1813 *
1814 * By default, query parameters on request URLs are parsed into the `params` object. So a request URL
1815 * of `/list?q=searchstr&orderby=-name` would set `params` to be `{q: 'searchstr', orderby: '-name'}`.
1816 *
1817 * ### Regex parameter matching
1818 *
1819 * If an expectation or definition uses a **regex** to match the URL, you can provide an array of **keys** via a
1820 * `params` argument. The index of each **key** in the array will match the index of a **group** in the
1821 * **regex**.
1822 *
1823 * The `params` object in the **callback** will now have properties with these keys, which hold the value of the
1824 * corresponding **group** in the **regex**.
1825 *
1826 * This also applies to the `when` and `expect` shortcut methods.
1827 *
1828 *
1829 * ```js
1830 *   $httpBackend.expect('GET', /\/user\/(.+)/, undefined, undefined, ['id'])
1831 *     .respond(function(method, url, data, headers, params) {
1832 *       // for requested url of '/user/1234' params is {id: '1234'}
1833 *     });
1834 *
1835 *   $httpBackend.whenPATCH(/\/user\/(.+)\/article\/(.+)/, undefined, undefined, ['user', 'article'])
1836 *     .respond(function(method, url, data, headers, params) {
1837 *       // for url of '/user/1234/article/567' params is {user: '1234', article: '567'}
1838 *     });
1839 * ```
1840 *
1841 * ## Matching route requests
1842 *
1843 * For extra convenience, `whenRoute` and `expectRoute` shortcuts are available. These methods offer colon
1844 * delimited matching of the url path, ignoring the query string and trailing slashes. This allows declarations
1845 * similar to how application routes are configured with `$routeProvider`. Because these methods convert
1846 * the definition url to regex, declaration order is important. Combined with query parameter parsing,
1847 * the following is possible:
1848 *
1849  ```js
1850    $httpBackend.whenRoute('GET', '/users/:id')
1851      .respond(function(method, url, data, headers, params) {
1852        return [200, MockUserList[Number(params.id)]];
1853      });
1854
1855    $httpBackend.whenRoute('GET', '/users')
1856      .respond(function(method, url, data, headers, params) {
1857        var userList = angular.copy(MockUserList),
1858          defaultSort = 'lastName',
1859          count, pages, isPrevious, isNext;
1860
1861        // paged api response '/v1/users?page=2'
1862        params.page = Number(params.page) || 1;
1863
1864        // query for last names '/v1/users?q=Archer'
1865        if (params.q) {
1866          userList = $filter('filter')({lastName: params.q});
1867        }
1868
1869        pages = Math.ceil(userList.length / pagingLength);
1870        isPrevious = params.page > 1;
1871        isNext = params.page < pages;
1872
1873        return [200, {
1874          count:    userList.length,
1875          previous: isPrevious,
1876          next:     isNext,
1877          // sort field -> '/v1/users?sortBy=firstName'
1878          results:  $filter('orderBy')(userList, params.sortBy || defaultSort)
1879                      .splice((params.page - 1) * pagingLength, pagingLength)
1880        }];
1881      });
1882  ```
1883 */
1884angular.mock.$httpBackendDecorator =
1885  ['$rootScope', '$timeout', '$delegate', createHttpBackendMock];
1886
1887/**
1888 * General factory function for $httpBackend mock.
1889 * Returns instance for unit testing (when no arguments specified):
1890 *   - passing through is disabled
1891 *   - auto flushing is disabled
1892 *
1893 * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
1894 *   - passing through (delegating request to real backend) is enabled
1895 *   - auto flushing is enabled
1896 *
1897 * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
1898 * @param {Object=} $browser Auto-flushing enabled if specified
1899 * @return {Object} Instance of $httpBackend mock
1900 */
1901function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
1902  var definitions = [],
1903      expectations = [],
1904      matchLatestDefinition = false,
1905      responses = [],
1906      responsesPush = angular.bind(responses, responses.push),
1907      copy = angular.copy,
1908      // We cache the original backend so that if both ngMock and ngMockE2E override the
1909      // service the ngMockE2E version can pass through to the real backend
1910      originalHttpBackend = $delegate.$$originalHttpBackend || $delegate;
1911
1912  function createResponse(status, data, headers, statusText) {
1913    if (angular.isFunction(status)) return status;
1914
1915    return function() {
1916      return angular.isNumber(status)
1917          ? [status, data, headers, statusText, 'complete']
1918          : [200, status, data, headers, 'complete'];
1919    };
1920  }
1921
1922  // TODO(vojta): change params to: method, url, data, headers, callback
1923  function $httpBackend(method, url, data, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers) {
1924
1925    var xhr = new MockXhr(),
1926        expectation = expectations[0],
1927        wasExpected = false;
1928
1929    xhr.$$events = eventHandlers;
1930    xhr.upload.$$events = uploadEventHandlers;
1931
1932    function prettyPrint(data) {
1933      return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
1934          ? data
1935          : angular.toJson(data);
1936    }
1937
1938    function wrapResponse(wrapped) {
1939      if (!$browser && timeout) {
1940        if (timeout.then) {
1941          timeout.then(function() {
1942            handlePrematureEnd(angular.isDefined(timeout.$$timeoutId) ? 'timeout' : 'abort');
1943          });
1944        } else {
1945          $timeout(function() {
1946            handlePrematureEnd('timeout');
1947          }, timeout);
1948        }
1949      }
1950
1951      handleResponse.description = method + ' ' + url;
1952      return handleResponse;
1953
1954      function handleResponse() {
1955        var response = wrapped.response(method, url, data, headers, wrapped.params(url));
1956        xhr.$$respHeaders = response[2];
1957        callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(),
1958                 copy(response[3] || ''), copy(response[4]));
1959      }
1960
1961      function handlePrematureEnd(reason) {
1962        for (var i = 0, ii = responses.length; i < ii; i++) {
1963          if (responses[i] === handleResponse) {
1964            responses.splice(i, 1);
1965            callback(-1, undefined, '', undefined, reason);
1966            break;
1967          }
1968        }
1969      }
1970    }
1971
1972    function createFatalError(message) {
1973      var error = new Error(message);
1974      // In addition to being converted to a rejection, these errors also need to be passed to
1975      // the $exceptionHandler and be rethrown (so that the test fails).
1976      error.$$passToExceptionHandler = true;
1977      return error;
1978    }
1979
1980    if (expectation && expectation.match(method, url)) {
1981      if (!expectation.matchData(data)) {
1982        throw createFatalError('Expected ' + expectation + ' with different data\n' +
1983          'EXPECTED: ' + prettyPrint(expectation.data) + '\n' +
1984          'GOT:      ' + data);
1985      }
1986
1987      if (!expectation.matchHeaders(headers)) {
1988        throw createFatalError('Expected ' + expectation + ' with different headers\n' +
1989          'EXPECTED: ' + prettyPrint(expectation.headers) + '\n' +
1990          'GOT:      ' + prettyPrint(headers));
1991      }
1992
1993      expectations.shift();
1994
1995      if (expectation.response) {
1996        responses.push(wrapResponse(expectation));
1997        return;
1998      }
1999      wasExpected = true;
2000    }
2001
2002    var i = matchLatestDefinition ? definitions.length : -1, definition;
2003
2004    while ((definition = definitions[matchLatestDefinition ? --i : ++i])) {
2005      if (definition.match(method, url, data, headers || {})) {
2006        if (definition.response) {
2007          // if $browser specified, we do auto flush all requests
2008          ($browser ? $browser.defer : responsesPush)(wrapResponse(definition));
2009        } else if (definition.passThrough) {
2010          originalHttpBackend(method, url, data, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers);
2011        } else throw createFatalError('No response defined !');
2012        return;
2013      }
2014    }
2015
2016    if (wasExpected) {
2017      throw createFatalError('No response defined !');
2018    }
2019
2020    throw createFatalError('Unexpected request: ' + method + ' ' + url + '\n' +
2021      (expectation ? 'Expected ' + expectation : 'No more request expected'));
2022  }
2023
2024  /**
2025   * @ngdoc method
2026   * @name $httpBackend#when
2027   * @description
2028   * Creates a new backend definition.
2029   *
2030   * @param {string} method HTTP method.
2031   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2032   *   and returns true if the url matches the current definition.
2033   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
2034   *   data string and returns true if the data is as expected.
2035   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2036   *   object and returns true if the headers match the current definition.
2037   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2038   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2039   *   request is handled. You can save this object for later use and invoke `respond` again in
2040   *   order to change how a matched request is handled.
2041   *
2042   *  - respond –
2043   *      ```js
2044   *      {function([status,] data[, headers, statusText])
2045   *      | function(function(method, url, data, headers, params)}
2046   *      ```
2047   *    – The respond method takes a set of static data to be returned or a function that can
2048   *    return an array containing response status (number), response data (Array|Object|string),
2049   *    response headers (Object), HTTP status text (string), and XMLHttpRequest status (string:
2050   *    `complete`, `error`, `timeout` or `abort`). The respond method returns the `requestHandler`
2051   *    object for possible overrides.
2052   */
2053  $httpBackend.when = function(method, url, data, headers, keys) {
2054
2055    assertArgDefined(arguments, 1, 'url');
2056
2057    var definition = new MockHttpExpectation(method, url, data, headers, keys),
2058        chain = {
2059          respond: function(status, data, headers, statusText) {
2060            definition.passThrough = undefined;
2061            definition.response = createResponse(status, data, headers, statusText);
2062            return chain;
2063          }
2064        };
2065
2066    if ($browser) {
2067      chain.passThrough = function() {
2068        definition.response = undefined;
2069        definition.passThrough = true;
2070        return chain;
2071      };
2072    }
2073
2074    definitions.push(definition);
2075    return chain;
2076  };
2077
2078  /**
2079   * @ngdoc method
2080   * @name  $httpBackend#matchLatestDefinitionEnabled
2081   * @description
2082   * This method can be used to change which mocked responses `$httpBackend` returns, when defining
2083   * them with {@link ngMock.$httpBackend#when $httpBackend.when()} (and shortcut methods).
2084   * By default, `$httpBackend` returns the first definition that matches. When setting
2085   * `$http.matchLatestDefinitionEnabled(true)`, it will use the last response that matches, i.e. the
2086   * one that was added last.
2087   *
2088   * ```js
2089   * hb.when('GET', '/url1').respond(200, 'content', {});
2090   * hb.when('GET', '/url1').respond(201, 'another', {});
2091   * hb('GET', '/url1'); // receives "content"
2092   *
2093   * $http.matchLatestDefinitionEnabled(true)
2094   * hb('GET', '/url1'); // receives "another"
2095   *
2096   * hb.when('GET', '/url1').respond(201, 'onemore', {});
2097   * hb('GET', '/url1'); // receives "onemore"
2098   * ```
2099   *
2100   * This is useful if a you have a default response that is overriden inside specific tests.
2101   *
2102   * Note that different from config methods on providers, `matchLatestDefinitionEnabled()` can be changed
2103   * even when the application is already running.
2104   *
2105   * @param  {Boolean=} value value to set, either `true` or `false`. Default is `false`.
2106   *                          If omitted, it will return the current value.
2107   * @return {$httpBackend|Boolean} self when used as a setter, and the current value when used
2108   *                                as a getter
2109   */
2110  $httpBackend.matchLatestDefinitionEnabled = function(value) {
2111    if (angular.isDefined(value)) {
2112      matchLatestDefinition = value;
2113      return this;
2114    } else {
2115      return matchLatestDefinition;
2116    }
2117  };
2118
2119  /**
2120   * @ngdoc method
2121   * @name $httpBackend#whenGET
2122   * @description
2123   * Creates a new backend definition for GET requests. For more info see `when()`.
2124   *
2125   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2126   *   and returns true if the url matches the current definition.
2127   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2128   *   object and returns true if the headers match the current definition.
2129   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2130   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2131   * request is handled. You can save this object for later use and invoke `respond` again in
2132   * order to change how a matched request is handled.
2133   */
2134
2135  /**
2136   * @ngdoc method
2137   * @name $httpBackend#whenHEAD
2138   * @description
2139   * Creates a new backend definition for HEAD requests. For more info see `when()`.
2140   *
2141   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2142   *   and returns true if the url matches the current definition.
2143   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2144   *   object and returns true if the headers match the current definition.
2145   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2146   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2147   * request is handled. You can save this object for later use and invoke `respond` again in
2148   * order to change how a matched request is handled.
2149   */
2150
2151  /**
2152   * @ngdoc method
2153   * @name $httpBackend#whenDELETE
2154   * @description
2155   * Creates a new backend definition for DELETE requests. For more info see `when()`.
2156   *
2157   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2158   *   and returns true if the url matches the current definition.
2159   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2160   *   object and returns true if the headers match the current definition.
2161   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2162   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2163   * request is handled. You can save this object for later use and invoke `respond` again in
2164   * order to change how a matched request is handled.
2165   */
2166
2167  /**
2168   * @ngdoc method
2169   * @name $httpBackend#whenPOST
2170   * @description
2171   * Creates a new backend definition for POST requests. For more info see `when()`.
2172   *
2173   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2174   *   and returns true if the url matches the current definition.
2175   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
2176   *   data string and returns true if the data is as expected.
2177   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2178   *   object and returns true if the headers match the current definition.
2179   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2180   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2181   * request is handled. You can save this object for later use and invoke `respond` again in
2182   * order to change how a matched request is handled.
2183   */
2184
2185  /**
2186   * @ngdoc method
2187   * @name $httpBackend#whenPUT
2188   * @description
2189   * Creates a new backend definition for PUT requests.  For more info see `when()`.
2190   *
2191   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2192   *   and returns true if the url matches the current definition.
2193   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
2194   *   data string and returns true if the data is as expected.
2195   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2196   *   object and returns true if the headers match the current definition.
2197   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2198   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2199   * request is handled. You can save this object for later use and invoke `respond` again in
2200   * order to change how a matched request is handled.
2201   */
2202
2203  /**
2204   * @ngdoc method
2205   * @name $httpBackend#whenJSONP
2206   * @description
2207   * Creates a new backend definition for JSONP requests. For more info see `when()`.
2208   *
2209   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2210   *   and returns true if the url matches the current definition.
2211   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2212   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2213   * request is handled. You can save this object for later use and invoke `respond` again in
2214   * order to change how a matched request is handled.
2215   */
2216  createShortMethods('when');
2217
2218  /**
2219   * @ngdoc method
2220   * @name $httpBackend#whenRoute
2221   * @description
2222   * Creates a new backend definition that compares only with the requested route.
2223   *
2224   * @param {string} method HTTP method.
2225   * @param {string} url HTTP url string that supports colon param matching.
2226   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2227   * request is handled. You can save this object for later use and invoke `respond` again in
2228   * order to change how a matched request is handled.
2229   * See {@link ngMock.$httpBackend#when `when`} for more info.
2230   */
2231  $httpBackend.whenRoute = function(method, url) {
2232    var parsed = parseRouteUrl(url);
2233    return $httpBackend.when(method, parsed.regexp, undefined, undefined, parsed.keys);
2234  };
2235
2236  /**
2237   * @ngdoc method
2238   * @name $httpBackend#expect
2239   * @description
2240   * Creates a new request expectation.
2241   *
2242   * @param {string} method HTTP method.
2243   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2244   *   and returns true if the url matches the current definition.
2245   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
2246   *  receives data string and returns true if the data is as expected, or Object if request body
2247   *  is in JSON format.
2248   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2249   *   object and returns true if the headers match the current expectation.
2250   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2251   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2252   *  request is handled. You can save this object for later use and invoke `respond` again in
2253   *  order to change how a matched request is handled.
2254   *
2255   *  - respond –
2256   *      ```js
2257   *      {function([status,] data[, headers, statusText])
2258   *      | function(function(method, url, data, headers, params)}
2259   *      ```
2260   *    – The respond method takes a set of static data to be returned or a function that can
2261   *    return an array containing response status (number), response data (Array|Object|string),
2262   *    response headers (Object), HTTP status text (string), and XMLHttpRequest status (string:
2263   *    `complete`, `error`, `timeout` or `abort`). The respond method returns the `requestHandler`
2264   *    object for possible overrides.
2265   */
2266  $httpBackend.expect = function(method, url, data, headers, keys) {
2267
2268    assertArgDefined(arguments, 1, 'url');
2269
2270    var expectation = new MockHttpExpectation(method, url, data, headers, keys),
2271        chain = {
2272          respond: function(status, data, headers, statusText) {
2273            expectation.response = createResponse(status, data, headers, statusText);
2274            return chain;
2275          }
2276        };
2277
2278    expectations.push(expectation);
2279    return chain;
2280  };
2281
2282  /**
2283   * @ngdoc method
2284   * @name $httpBackend#expectGET
2285   * @description
2286   * Creates a new request expectation for GET requests. For more info see `expect()`.
2287   *
2288   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2289   *   and returns true if the url matches the current expectation.
2290   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2291   *   object and returns true if the headers match the current expectation.
2292   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2293   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2294   * request is handled. You can save this object for later use and invoke `respond` again in
2295   * order to change how a matched request is handled. See #expect for more info.
2296   */
2297
2298  /**
2299   * @ngdoc method
2300   * @name $httpBackend#expectHEAD
2301   * @description
2302   * Creates a new request expectation for HEAD requests. For more info see `expect()`.
2303   *
2304   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2305   *   and returns true if the url matches the current expectation.
2306   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2307   *   object and returns true if the headers match the current expectation.
2308   * @param {(Arr
2308ay)=} keys Array of keys to assign to regex matches in request url described above.
2309   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2310   *   request is handled. You can save this object for later use and invoke `respond` again in
2311   *   order to change how a matched request is handled.
2312   */
2313
2314  /**
2315   * @ngdoc method
2316   * @name $httpBackend#expectDELETE
2317   * @description
2318   * Creates a new request expectation for DELETE requests. For more info see `expect()`.
2319   *
2320   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2321   *   and returns true if the url matches the current expectation.
2322   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2323   *   object and returns true if the headers match the current expectation.
2324   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2325   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2326   *   request is handled. You can save this object for later use and invoke `respond` again in
2327   *   order to change how a matched request is handled.
2328   */
2329
2330  /**
2331   * @ngdoc method
2332   * @name $httpBackend#expectPOST
2333   * @description
2334   * Creates a new request expectation for POST requests. For more info see `expect()`.
2335   *
2336   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2337   *   and returns true if the url matches the current expectation.
2338   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
2339   *  receives data string and returns true if the data is as expected, or Object if request body
2340   *  is in JSON format.
2341   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2342   *   object and returns true if the headers match the current expectation.
2343   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2344   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2345   *   request is handled. You can save this object for later use and invoke `respond` again in
2346   *   order to change how a matched request is handled.
2347   */
2348
2349  /**
2350   * @ngdoc method
2351   * @name $httpBackend#expectPUT
2352   * @description
2353   * Creates a new request expectation for PUT requests. For more info see `expect()`.
2354   *
2355   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2356   *   and returns true if the url matches the current expectation.
2357   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
2358   *  receives data string and returns true if the data is as expected, or Object if request body
2359   *  is in JSON format.
2360   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2361   *   object and returns true if the headers match the current expectation.
2362   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2363   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2364   *   request is handled. You can save this object for later use and invoke `respond` again in
2365   *   order to change how a matched request is handled.
2366   */
2367
2368  /**
2369   * @ngdoc method
2370   * @name $httpBackend#expectPATCH
2371   * @description
2372   * Creates a new request expectation for PATCH requests. For more info see `expect()`.
2373   *
2374   * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
2375   *   and returns true if the url matches the current expectation.
2376   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
2377   *  receives data string and returns true if the data is as expected, or Object if request body
2378   *  is in JSON format.
2379   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
2380   *   object and returns true if the headers match the current expectation.
2381   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2382   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2383   *   request is handled. You can save this object for later use and invoke `respond` again in
2384   *   order to change how a matched request is handled.
2385   */
2386
2387  /**
2388   * @ngdoc method
2389   * @name $httpBackend#expectJSONP
2390   * @description
2391   * Creates a new request expectation for JSONP requests. For more info see `expect()`.
2392   *
2393   * @param {string|RegExp|function(string)=} url HTTP url or function that receives an url
2394   *   and returns true if the url matches the current expectation.
2395   * @param {(Array)=} keys Array of keys to assign to regex matches in request url described above.
2396   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2397   *   request is handled. You can save this object for later use and invoke `respond` again in
2398   *   order to change how a matched request is handled.
2399   */
2400  createShortMethods('expect');
2401
2402  /**
2403   * @ngdoc method
2404   * @name $httpBackend#expectRoute
2405   * @description
2406   * Creates a new request expectation that compares only with the requested route.
2407   *
2408   * @param {string} method HTTP method.
2409   * @param {string} url HTTP url string that supports colon param matching.
2410   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
2411   * request is handled. You can save this object for later use and invoke `respond` again in
2412   * order to change how a matched request is handled.
2413   * See {@link ngMock.$httpBackend#expect `expect`} for more info.
2414   */
2415  $httpBackend.expectRoute = function(method, url) {
2416    var parsed = parseRouteUrl(url);
2417    return $httpBackend.expect(method, parsed.regexp, undefined, undefined, parsed.keys);
2418  };
2419
2420
2421  /**
2422   * @ngdoc method
2423   * @name $httpBackend#flush
2424   * @description
2425   * Flushes pending requests using the trained responses. Requests are flushed in the order they
2426   * were made, but it is also possible to skip one or more requests (for example to have them
2427   * flushed later). This is useful for simulating scenarios where responses arrive from the server
2428   * in any order.
2429   *
2430   * If there are no pending requests to flush when the method is called, an exception is thrown (as
2431   * this is typically a sign of programming error).
2432   *
2433   * @param {number=} count - Number of responses to flush. If undefined/null, all pending requests
2434   *     (starting after `skip`) will be flushed.
2435   * @param {number=} [skip=0] - Number of pending requests to skip. For example, a value of `5`
2436   *     would skip the first 5 pending requests and start flushing from the 6th onwards.
2437   */
2438  $httpBackend.flush = function(count, skip, digest) {
2439    if (digest !== false) $rootScope.$digest();
2440
2441    skip = skip || 0;
2442    if (skip >= responses.length) throw new Error('No pending request to flush !');
2443
2444    if (angular.isDefined(count) && count !== null) {
2445      while (count--) {
2446        var part = responses.splice(skip, 1);
2447        if (!part.length) throw new Error('No more pending request to flush !');
2448        part[0]();
2449      }
2450    } else {
2451      while (responses.length > skip) {
2452        responses.splice(skip, 1)[0]();
2453      }
2454    }
2455    $httpBackend.verifyNoOutstandingExpectation(digest);
2456  };
2457
2458
2459  /**
2460   * @ngdoc method
2461   * @name $httpBackend#verifyNoOutstandingExpectation
2462   * @description
2463   * Verifies that all of the requests defined via the `expect` api were made. If any of the
2464   * requests were not made, verifyNoOutstandingExpectation throws an exception.
2465   *
2466   * Typically, you would call this method following each test case that asserts requests using an
2467   * "afterEach" clause.
2468   *
2469   * ```js
2470   *   afterEach($httpBackend.verifyNoOutstandingExpectation);
2471   * ```
2472   */
2473  $httpBackend.verifyNoOutstandingExpectation = function(digest) {
2474    if (digest !== false) $rootScope.$digest();
2475    if (expectations.length) {
2476      throw new Error('Unsatisfied requests: ' + expectations.join(', '));
2477    }
2478  };
2479
2480
2481  /**
2482   * @ngdoc method
2483   * @name $httpBackend#verifyNoOutstandingRequest
2484   * @description
2485   * Verifies that there are no outstanding requests that need to be flushed.
2486   *
2487   * Typically, you would call this method following each test case that asserts requests using an
2488   * "afterEach" clause.
2489   *
2490   * ```js
2491   *   afterEach($httpBackend.verifyNoOutstandingRequest);
2492   * ```
2493   */
2494  $httpBackend.verifyNoOutstandingRequest = function(digest) {
2495    if (digest !== false) $rootScope.$digest();
2496    if (responses.length) {
2497      var unflushedDescriptions = responses.map(function(res) { return res.description; });
2498      throw new Error('Unflushed requests: ' + responses.length + '\n  ' +
2499                      unflushedDescriptions.join('\n  '));
2500    }
2501  };
2502
2503
2504  /**
2505   * @ngdoc method
2506   * @name $httpBackend#resetExpectations
2507   * @description
2508   * Resets all request expectations, but preserves all backend definitions. Typically, you would
2509   * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
2510   * $httpBackend mock.
2511   */
2512  $httpBackend.resetExpectations = function() {
2513    expectations.length = 0;
2514    responses.length = 0;
2515  };
2516
2517  $httpBackend.$$originalHttpBackend = originalHttpBackend;
2518
2519  return $httpBackend;
2520
2521
2522  function createShortMethods(prefix) {
2523    angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) {
2524     $httpBackend[prefix + method] = function(url, headers, keys) {
2525        assertArgDefined(arguments, 0, 'url');
2526
2527        // Change url to `null` if `undefined` to stop it throwing an exception further down
2528        if (angular.isUndefined(url)) url = null;
2529
2530       return $httpBackend[prefix](method, url, undefined, headers, keys);
2531     };
2532    });
2533
2534    angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
2535      $httpBackend[prefix + method] = function(url, data, headers, keys) {
2536        assertArgDefined(arguments, 0, 'url');
2537
2538        // Change url to `null` if `undefined` to stop it throwing an exception further down
2539        if (angular.isUndefined(url)) url = null;
2540
2541        return $httpBackend[prefix](method, url, data, headers, keys);
2542      };
2543    });
2544  }
2545
2546  function parseRouteUrl(url) {
2547    var strippedUrl = stripQueryAndHash(url);
2548    var parseOptions = {caseInsensitiveMatch: true, ignoreTrailingSlashes: true};
2549    return routeToRegExp(strippedUrl, parseOptions);
2550  }
2551}
2552
2553function assertArgDefined(args, index, name) {
2554  if (args.length > index && angular.isUndefined(args[index])) {
2555    throw new Error('Undefined argument `' + name + '`; the argument is provided but not defined');
2556  }
2557}
2558
2559function stripQueryAndHash(url) {
2560  return url.replace(/[?#].*$/, '');
2561}
2562
2563function MockHttpExpectation(expectedMethod, expectedUrl, expectedData, expectedHeaders,
2564                             expectedKeys) {
2565
2566  this.data = expectedData;
2567  this.headers = expectedHeaders;
2568
2569  this.match = function(method, url, data, headers) {
2570    if (expectedMethod !== method) return false;
2571    if (!this.matchUrl(url)) return false;
2572    if (angular.isDefined(data) && !this.matchData(data)) return false;
2573    if (angular.isDefined(headers) && !this.matchHeaders(headers)) return false;
2574    return true;
2575  };
2576
2577  this.matchUrl = function(url) {
2578    if (!expectedUrl) return true;
2579    if (angular.isFunction(expectedUrl.test)) return expectedUrl.test(url);
2580    if (angular.isFunction(expectedUrl)) return expectedUrl(url);
2581    return (expectedUrl === url || compareUrlWithQuery(url));
2582  };
2583
2584  this.matchHeaders = function(headers) {
2585    if (angular.isUndefined(expectedHeaders)) return true;
2586    if (angular.isFunction(expectedHeaders)) return expectedHeaders(headers);
2587    return angular.equals(expectedHeaders, headers);
2588  };
2589
2590  this.matchData = function(data) {
2591    if (angular.isUndefined(expectedData)) return true;
2592    if (expectedData && angular.isFunction(expectedData.test)) return expectedData.test(data);
2593    if (expectedData && angular.isFunction(expectedData)) return expectedData(data);
2594    if (expectedData && !angular.isString(expectedData)) {
2595      return angular.equals(angular.fromJson(angular.toJson(expectedData)), angular.fromJson(data));
2596    }
2597    // eslint-disable-next-line eqeqeq
2598    return expectedData == data;
2599  };
2600
2601  this.toString = function() {
2602    return expectedMethod + ' ' + expectedUrl;
2603  };
2604
2605  this.params = function(url) {
2606    var queryStr = url.indexOf('?') === -1 ? '' : url.substring(url.indexOf('?') + 1);
2607    var strippedUrl = stripQueryAndHash(url);
2608
2609    return angular.extend(extractParamsFromQuery(queryStr), extractParamsFromPath(strippedUrl));
2610  };
2611
2612  function compareUrlWithQuery(url) {
2613    var urlWithQueryRe = /^([^?]*)\?(.*)$/;
2614
2615    var expectedMatch = urlWithQueryRe.exec(expectedUrl);
2616    var actualMatch = urlWithQueryRe.exec(url);
2617
2618    return !!(expectedMatch && actualMatch) &&
2619      (expectedMatch[1] === actualMatch[1]) &&
2620      (normalizeQuery(expectedMatch[2]) === normalizeQuery(actualMatch[2]));
2621  }
2622
2623  function normalizeQuery(queryStr) {
2624    return queryStr.split('&').sort().join('&');
2625  }
2626
2627  function extractParamsFromPath(strippedUrl) {
2628    var keyObj = {};
2629
2630    if (!expectedUrl || !angular.isFunction(expectedUrl.test) ||
2631        !expectedKeys || !expectedKeys.length) return keyObj;
2632
2633    var match = expectedUrl.exec(strippedUrl);
2634    if (!match) return keyObj;
2635
2636    for (var i = 1, len = match.length; i < len; ++i) {
2637      var key = expectedKeys[i - 1];
2638      var val = match[i];
2639      if (key && val) {
2640        keyObj[key.name || key] = val;
2641      }
2642    }
2643
2644    return keyObj;
2645  }
2646
2647  function extractParamsFromQuery(queryStr) {
2648    var obj = {},
2649        keyValuePairs = queryStr.split('&').
2650            filter(angular.identity).  // Ignore empty segments.
2651            map(function(keyValue) { return keyValue.replace(/\+/g, '%20').split('='); });
2652
2653    angular.forEach(keyValuePairs, function(pair) {
2654      var key = tryDecodeURIComponent(pair[0]);
2655      if (angular.isDefined(key)) {
2656        var val = angular.isDefined(pair[1]) ? tryDecodeURIComponent(pair[1]) : true;
2657        if (!hasOwnProperty.call(obj, key)) {
2658          obj[key] = val;
2659        } else if (angular.isArray(obj[key])) {
2660          obj[key].push(val);
2661        } else {
2662          obj[key] = [obj[key], val];
2663        }
2664      }
2665    });
2666
2667    return obj;
2668  }
2669
2670  function tryDecodeURIComponent(value) {
2671    try {
2672      return decodeURIComponent(value);
2673    } catch (e) {
2674      // Ignore any invalid uri component
2675    }
2676  }
2677}
2678
2679function createMockXhr() {
2680  return new MockXhr();
2681}
2682
2683function MockXhr() {
2684
2685  // hack for testing $http, $httpBackend
2686  MockXhr.$$lastInstance = this;
2687
2688  this.open = function(method, url, async) {
2689    this.$$method = method;
2690    this.$$url = url;
2691    this.$$async = async;
2692    this.$$reqHeaders = {};
2693    this.$$respHeaders = {};
2694  };
2695
2696  this.send = function(data) {
2697    this.$$data = data;
2698  };
2699
2700  this.setRequestHeader = function(key, value) {
2701    this.$$reqHeaders[key] = value;
2702  };
2703
2704  this.getResponseHeader = function(name) {
2705    // the lookup must be case insensitive,
2706    // that's why we try two quick lookups first and full scan last
2707    var header = this.$$respHeaders[name];
2708    if (header) return header;
2709
2710    name = angular.$$lowercase(name);
2711    header = this.$$respHeaders[name];
2712    if (header) return header;
2713
2714    header = undefined;
2715    angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
2716      if (!header && angular.$$lowercase(headerName) === name) header = headerVal;
2717    });
2718    return header;
2719  };
2720
2721  this.getAllResponseHeaders = function() {
2722    var lines = [];
2723
2724    angular.forEach(this.$$respHeaders, function(value, key) {
2725      lines.push(key + ': ' + value);
2726    });
2727    return lines.join('\n');
2728  };
2729
2730  this.abort = function() {
2731    if (isFunction(this.onabort)) {
2732      this.onabort();
2733    }
2734  };
2735
2736  // This section simulates the events on a real XHR object (and the upload object)
2737  // When we are testing $httpBackend (inside the AngularJS project) we make partial use of this
2738  // but store the events directly ourselves on `$$events`, instead of going through the `addEventListener`
2739  this.$$events = {};
2740  this.addEventListener = function(name, listener) {
2741    if (angular.isUndefined(this.$$events[name])) this.$$events[name] = [];
2742    this.$$events[name].push(listener);
2743  };
2744
2745  this.upload = {
2746    $$events: {},
2747    addEventListener: this.addEventListener
2748  };
2749}
2750
2751
2752/**
2753 * @ngdoc service
2754 * @name $timeout
2755 * @description
2756 *
2757 * This service is just a simple decorator for {@link ng.$timeout $timeout} service
2758 * that adds a "flush" and "verifyNoPendingTasks" methods.
2759 */
2760
2761angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $browser) {
2762
2763  /**
2764   * @ngdoc method
2765   * @name $timeout#flush
2766   *
2767   * @deprecated
2768   * sinceVersion="1.7.3"
2769   *
2770   * This method flushes all types of tasks (not only timeouts), which is unintuitive.
2771   * It is recommended to use {@link ngMock.$flushPendingTasks} instead.
2772   *
2773   * @description
2774   *
2775   * Flushes the queue of pending tasks.
2776   *
2777   * _This method is essentially an alias of {@link ngMock.$flushPendingTasks}._
2778   *
2779   * <div class="alert alert-warning">
2780   *   For historical reasons, this method will also flush non-`$timeout` pending tasks, such as
2781   *   {@link $q} promises and tasks scheduled via
2782   *   {@link ng.$rootScope.Scope#$applyAsync $applyAsync} and
2783   *   {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
2784   * </div>
2785   *
2786   * @param {number=} delay maximum timeout amount to flush up until
2787   */
2788  $delegate.flush = function(delay) {
2789    // For historical reasons, `$timeout.flush()` flushes all types of pending tasks.
2790    // Keep the same behavior for backwards compatibility (and because it doesn't make sense to
2791    // selectively flush scheduled events out of order).
2792    $browser.defer.flush(delay);
2793  };
2794
2795  /**
2796   * @ngdoc method
2797   * @name $timeout#verifyNoPendingTasks
2798   *
2799   * @deprecated
2800   * sinceVersion="1.7.3"
2801   *
2802   * This method takes all types of tasks (not only timeouts) into account, which is unintuitive.
2803   * It is recommended to use {@link ngMock.$verifyNoPendingTasks} instead, which additionally
2804   * allows checking for timeouts only (with `$verifyNoPendingTasks('$timeout')`).
2805   *
2806   * @description
2807   *
2808   * Verifies that there are no pending tasks that need to be flushed. It throws an error if there
2809   * are still pending tasks.
2810   *
2811   * _This method is essentially an alias of {@link ngMock.$verifyNoPendingTasks} (called with no
2812   * arguments)._
2813   *
2814   * <div class="alert alert-warning">
2815   *   <p>
2816   *     For historical reasons, this method will also verify non-`$timeout` pending tasks, such as
2817   *     pending {@link $http} requests, in-progress {@link $route} transitions, unresolved
2818   *     {@link $q} promises and tasks scheduled via
2819   *     {@link ng.$rootScope.Scope#$applyAsync $applyAsync} and
2820   *     {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
2821   *   </p>
2822   *   <p>
2823   *     It is recommended to use {@link ngMock.$verifyNoPendingTasks} instead, which additionally
2824   *     supports verifying a specific type of tasks. For example, you can verify there are no
2825   *     pending timeouts with `$verifyNoPendingTasks('$timeout')`.
2826   *   </p>
2827   * </div>
2828   */
2829  $delegate.verifyNoPendingTasks = function() {
2830    // For historical reasons, `$timeout.verifyNoPendingTasks()` takes all types of pending tasks
2831    // into account. Keep the same behavior for backwards compatibility.
2832    var pendingTasks = $browser.defer.getPendingTasks();
2833
2834    if (pendingTasks.length) {
2835      var formattedTasks = $browser.defer.formatPendingTasks(pendingTasks).join('\n  ');
2836      var hasPendingTimeout = pendingTasks.some(function(task) { return task.type === '$timeout'; });
2837      var extraMessage = hasPendingTimeout ? '' : '\n\nNone of the pending tasks are timeouts. ' +
2838          'If you only want to verify pending timeouts, use ' +
2839          '`$verifyNoPendingTasks(\'$timeout\')` instead.';
2840
2841      throw new Error('Deferred tasks to flush (' + pendingTasks.length + '):\n  ' +
2842          formattedTasks + extraMessage);
2843    }
2844  };
2845
2846  return $delegate;
2847}];
2848
2849angular.mock.$RAFDecorator = ['$delegate', function($delegate) {
2850  var rafFn = function(fn) {
2851    var index = rafFn.queue.length;
2852    rafFn.queue.push(fn);
2853    return function() {
2854      rafFn.queue.splice(index, 1);
2855    };
2856  };
2857
2858  rafFn.queue = [];
2859  rafFn.supported = $delegate.supported;
2860
2861  rafFn.flush = function() {
2862    if (rafFn.queue.length === 0) {
2863      throw new Error('No rAF callbacks present');
2864    }
2865
2866    var length = rafFn.queue.length;
2867    for (var i = 0; i < length; i++) {
2868      rafFn.queue[i]();
2869    }
2870
2871    rafFn.queue = rafFn.queue.slice(i);
2872  };
2873
2874  return rafFn;
2875}];
2876
2877/**
2878 *
2879 */
2880var originalRootElement;
2881angular.mock.$RootElementProvider = function() {
2882  this.$get = ['$injector', function($injector) {
2883    originalRootElement = angular.element('<div ng-app></div>').data('$injector', $injector);
2884    return originalRootElement;
2885  }];
2886};
2887
2888/**
2889 * @ngdoc service
2890 * @name $controller
2891 * @description
2892 * A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing
2893 * controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}.
2894 *
2895 * ## Example
2896 *
2897 * ```js
2898 *
2899 * // Directive definition ...
2900 *
2901 * myMod.directive('myDirective', {
2902 *   controller: 'MyDirectiveController',
2903 *   bindToController: {
2904 *     name: '@'
2905 *   }
2906 * });
2907 *
2908 *
2909 * // Controller definition ...
2910 *
2911 * myMod.controller('MyDirectiveController', ['$log', function($log) {
2912 *   this.log = function() {
2913 *     $log.info(this.name);
2914 *   };
2915 * }]);
2916 *
2917 *
2918 * // In a test ...
2919 *
2920 * describe('myDirectiveController', function() {
2921 *   describe('log()', function() {
2922 *     it('should write the bound name to the log', inject(function($controller, $log) {
2923 *       var ctrl = $controller('MyDirectiveController', { /* no locals &#42;/ }, { name: 'Clark Kent' });
2924 *       ctrl.log();
2925 *
2926 *       expect(ctrl.name).toEqual('Clark Kent');
2927 *       expect($log.info.logs).toEqual(['Clark Kent']);
2928 *     }));
2929 *   });
2930 * });
2931 *
2932 * ```
2933 *
2934 * @param {Function|string} constructor If called with a function then it's considered to be the
2935 *    controller constructor function. Otherwise it's considered to be a string which is used
2936 *    to retrieve the controller constructor using the following steps:
2937 *
2938 *    * check if a controller with given name is registered via `$controllerProvider`
2939 *    * check if evaluating the string on the current scope returns a constructor
2940 *
2941 *    The string can use the `controller as property` syntax, where the controller instance is published
2942 *    as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
2943 *    to work correctly.
2944 *
2945 * @param {Object} locals Injection locals for Controller.
2946 * @param {Object=} bindings Properties to add to the controller instance. This is used to simulate
2947 *                           the `bindToController` feature and simplify certain kinds of tests.
2948 * @return {Object} Instance of given controller.
2949 */
2950function createControllerDecorator() {
2951  angular.mock.$ControllerDecorator = ['$delegate', function($delegate) {
2952    return function(expression, locals, later, ident) {
2953      if (later && typeof later === 'object') {
2954        var instantiate = $delegate(expression, locals, true, ident);
2955        var instance = instantiate();
2956        angular.extend(instance, later);
2957        return instance;
2958      }
2959      return $delegate(expression, locals, later, ident);
2960    };
2961  }];
2962
2963  return angular.mock.$ControllerDecorator;
2964}
2965
2966/**
2967 * @ngdoc service
2968 * @name $componentController
2969 * @description
2970 * A service that can be used to create instances of component controllers. Useful for unit-testing.
2971 *
2972 * Be aware that the controller will be instantiated and attached to the scope as specified in
2973 * the component definition object. If you do not provide a `$scope` object in the `locals` param
2974 * then the helper will create a new isolated scope as a child of `$rootScope`.
2975 *
2976 * If you are using `$element` or `$attrs` in the controller, make sure to provide them as `locals`.
2977 * The `$element` must be a jqLite-wrapped DOM element, and `$attrs` should be an object that
2978 * has all properties / functions that you are using in the controller. If this is getting too complex,
2979 * you should compile the component instead and access the component's controller via the
2980 * {@link angular.element#methods `controller`} function.
2981 *
2982 * See also the section on {@link guide/component#unit-testing-component-controllers unit-testing component controllers}
2983 * in the guide.
2984 *
2985 * @param {string} componentName the name of the component whose controller we want to instantiate
2986 * @param {Object} locals Injection locals for Controller.
2987 * @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used
2988 *                           to simulate the `bindToController` feature and simplify certain kinds of tests.
2989 * @param {string=} ident Override the property name to use when attaching the controller to the scope.
2990 * @return {Object} Instance of requested controller.
2991 */
2992angular.mock.$ComponentControllerProvider = ['$compileProvider',
2993    function ComponentControllerProvider($compileProvider) {
2994  this.$get = ['$controller','$injector', '$rootScope', function($controller, $injector, $rootScope) {
2995    return function $componentController(componentName, locals, bindings, ident) {
2996      // get all directives associated to the component name
2997      var directives = $injector.get(componentName + 'Directive');
2998      // look for those directives that are components
2999      var candidateDirectives = directives.filter(function(directiveInfo) {
3000        // components have controller, controllerAs and restrict:'E'
3001        return directiveInfo.controller && directiveInfo.controllerAs && directiveInfo.restrict === 'E';
3002      });
3003      // check if valid directives found
3004      if (candidateDirectives.length === 0) {
3005        throw new Error('No component found');
3006      }
3007      if (candidateDirectives.length > 1) {
3008        throw new Error('Too many components found');
3009      }
3010      // get the info of the component
3011      var directiveInfo = candidateDirectives[0];
3012      // create a scope if needed
3013      locals = locals || {};
3014      locals.$scope = locals.$scope || $rootScope.$new(true);
3015      return $controller(directiveInfo.controller, locals, bindings, ident || directiveInfo.controllerAs);
3016    };
3017  }];
3018}];
3019
3020
3021/**
3022 * @ngdoc module
3023 * @name ngMock
3024 * @packageName angular-mocks
3025 * @description
3026 *
3027 * The `ngMock` module provides support to inject and mock AngularJS services into unit tests.
3028 * In addition, ngMock also extends various core AngularJS services such that they can be
3029 * inspected and controlled in a synchronous manner within test c
3029ode.
3030 *
3031 * @installation
3032 *
3033 *  First, download the file:
3034 *  * [Google CDN](https://developers.google.com/speed/libraries/devguide#angularjs) e.g.
3035 *    `"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js"`
3036 *  * [NPM](https://www.npmjs.com/) e.g. `npm install [email protected]`
3037 *  * [Yarn](https://yarnpkg.com) e.g. `yarn add [email protected]`
3038 *  * [Bower](http://bower.io) e.g. `bower install angular-mocks#X.Y.Z`
3039 *  * [code.angularjs.org](https://code.angularjs.org/) (discouraged for production use)  e.g.
3040 *    `"//code.angularjs.org/X.Y.Z/angular-mocks.js"`
3041 *
3042 * where X.Y.Z is the AngularJS version you are running.
3043 *
3044 * Then, configure your test runner to load `angular-mocks.js` after `angular.js`.
3045 * This example uses <a href="http://karma-runner.github.io/">Karma</a>:
3046 *
3047 * ```
3048 * config.set({
3049 *   files: [
3050 *     'build/angular.js', // and other module files you need
3051 *     'build/angular-mocks.js',
3052 *     '<path/to/application/files>',
3053 *     '<path/to/spec/files>'
3054 *   ]
3055 * });
3056 * ```
3057 *
3058 * Including the `angular-mocks.js` file automatically adds the `ngMock` module, so your tests
3059 *  are ready to go!
3060 */
3061angular.module('ngMock', ['ng']).provider({
3062  $browser: angular.mock.$BrowserProvider,
3063  $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
3064  $log: angular.mock.$LogProvider,
3065  $interval: angular.mock.$IntervalProvider,
3066  $rootElement: angular.mock.$RootElementProvider,
3067  $componentController: angular.mock.$ComponentControllerProvider,
3068  $flushPendingTasks: angular.mock.$FlushPendingTasksProvider,
3069  $verifyNoPendingTasks: angular.mock.$VerifyNoPendingTasksProvider
3070}).config(['$provide', '$compileProvider', function($provide, $compileProvider) {
3071  $provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
3072  $provide.decorator('$$rAF', angular.mock.$RAFDecorator);
3073  $provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
3074  $provide.decorator('$controller', createControllerDecorator($compileProvider));
3075  $provide.decorator('$httpBackend', angular.mock.$httpBackendDecorator);
3076}]).info({ angularVersion: '1.7.8' });
3077
3078/**
3079 * @ngdoc module
3080 * @name ngMockE2E
3081 * @module ngMockE2E
3082 * @packageName angular-mocks
3083 * @description
3084 *
3085 * The `ngMockE2E` is an AngularJS module which contains mocks suitable for end-to-end testing.
3086 * Currently there is only one mock present in this module -
3087 * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
3088 */
3089angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
3090  $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
3091}]).info({ angularVersion: '1.7.8' });
3092
3093/**
3094 * @ngdoc service
3095 * @name $httpBackend
3096 * @module ngMockE2E
3097 * @description
3098 * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
3099 * applications that use the {@link ng.$http $http service}.
3100 *
3101 * <div class="alert alert-info">
3102 * **Note**: For fake http backend implementation suitable for unit testing please see
3103 * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
3104 * </div>
3105 *
3106 * This implementation can be used to respond with static or dynamic responses via the `when` api
3107 * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
3108 * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
3109 * templates from a webserver).
3110 *
3111 * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
3112 * is being developed with the real backend api replaced with a mock, it is often desirable for
3113 * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
3114 * templates or static files from the webserver). To configure the backend with this behavior
3115 * use the `passThrough` request handler of `when` instead of `respond`.
3116 *
3117 * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
3118 * testing. For this reason the e2e $httpBackend flushes mocked out requests
3119 * automatically, closely simulating the behavior of the XMLHttpRequest object.
3120 *
3121 * To setup the application to run with this http backend, you have to create a module that depends
3122 * on the `ngMockE2E` and your application modules and defines the fake backend:
3123 *
3124 * ```js
3125 *   var myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
3126 *   myAppDev.run(function($httpBackend) {
3127 *     var phones = [{name: 'phone1'}, {name: 'phone2'}];
3128 *
3129 *     // returns the current list of phones
3130 *     $httpBackend.whenGET('/phones').respond(phones);
3131 *
3132 *     // adds a new phone to the phones array
3133 *     $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
3134 *       var phone = angular.fromJson(data);
3135 *       phones.push(phone);
3136 *       return [200, phone, {}];
3137 *     });
3138 *     $httpBackend.whenGET(/^\/templates\//).passThrough(); // Requests for templates are handled by the real server
3139 *     //...
3140 *   });
3141 * ```
3142 *
3143 * Afterwards, bootstrap your app with this new module.
3144 *
3145 * @example
3146 * <example name="httpbackend-e2e-testing" module="myAppE2E" deps="angular-mocks.js">
3147 * <file name="app.js">
3148 *   var myApp = angular.module('myApp', []);
3149 *
3150 *   myApp.controller('MainCtrl', function MainCtrl($http) {
3151 *     var ctrl = this;
3152 *
3153 *     ctrl.phones = [];
3154 *     ctrl.newPhone = {
3155 *       name: ''
3156 *     };
3157 *
3158 *     ctrl.getPhones = function() {
3159 *       $http.get('/phones').then(function(response) {
3160 *         ctrl.phones = response.data;
3161 *       });
3162 *     };
3163 *
3164 *     ctrl.addPhone = function(phone) {
3165 *       $http.post('/phones', phone).then(function() {
3166 *         ctrl.newPhone = {name: ''};
3167 *         return ctrl.getPhones();
3168 *       });
3169 *     };
3170 *
3171 *     ctrl.getPhones();
3172 *   });
3173 * </file>
3174 * <file name="e2e.js">
3175 *   var myAppDev = angular.module('myAppE2E', ['myApp', 'ngMockE2E']);
3176 *
3177 *   myAppDev.run(function($httpBackend) {
3178 *     var phones = [{name: 'phone1'}, {name: 'phone2'}];
3179 *
3180 *     // returns the current list of phones
3181 *     $httpBackend.whenGET('/phones').respond(phones);
3182 *
3183 *     // adds a new phone to the phones array
3184 *     $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
3185 *       var phone = angular.fromJson(data);
3186 *       phones.push(phone);
3187 *       return [200, phone, {}];
3188 *     });
3189 *   });
3190 * </file>
3191 * <file name="index.html">
3192 *   <div ng-controller="MainCtrl as $ctrl">
3193 *   <form name="newPhoneForm" ng-submit="$ctrl.addPhone($ctrl.newPhone)">
3194 *     <input type="text" ng-model="$ctrl.newPhone.name">
3195 *     <input type="submit" value="Add Phone">
3196 *   </form>
3197 *   <h1>Phones</h1>
3198 *   <ul>
3199 *     <li ng-repeat="phone in $ctrl.phones">{{phone.name}}</li>
3200 *   </ul>
3201 *   </div>
3202 * </file>
3203 * </example>
3204 *
3205 *
3206 */
3207
3208/**
3209 * @ngdoc method
3210 * @name $httpBackend#when
3211 * @module ngMockE2E
3212 * @description
3213 * Creates a new backend definition.
3214 *
3215 * @param {string} method HTTP method.
3216 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3217 *   and returns true if the url matches the current definition.
3218 * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
3219 *   data string and returns true if the data is as expected.
3220 * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
3221 *   object and returns true if the headers match the current definition.
3222 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3223 *   {@link ngMock.$httpBackend $httpBackend mock}.
3224 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3225 *   control how a matched request is handled. You can save this object for later use and invoke
3226 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3227 *
3228 *  - respond –
3229 *    ```
3230 *    { function([status,] data[, headers, statusText])
3231 *    | function(function(method, url, data, headers, params)}
3232 *    ```
3233 *    – The respond method takes a set of static data to be returned or a function that can return
3234 *    an array containing response status (number), response data (Array|Object|string), response
3235 *    headers (Object), and the text for the status (string).
3236 *  - passThrough – `{function()}` – Any request matching a backend definition with
3237 *    `passThrough` handler will be passed through to the real backend (an XHR request will be made
3238 *    to the server.)
3239 *  - Both methods return the `requestHandler` object for possible overrides.
3240 */
3241
3242/**
3243 * @ngdoc method
3244 * @name $httpBackend#whenGET
3245 * @module ngMockE2E
3246 * @description
3247 * Creates a new backend definition for GET requests. For more info see `when()`.
3248 *
3249 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3250 *   and returns true if the url matches the current definition.
3251 * @param {(Object|function(Object))=} headers HTTP headers.
3252 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3253 *   {@link ngMock.$httpBackend $httpBackend mock}.
3254 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3255 *   control how a matched request is handled. You can save this object for later use and invoke
3256 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3257 */
3258
3259/**
3260 * @ngdoc method
3261 * @name $httpBackend#whenHEAD
3262 * @module ngMockE2E
3263 * @description
3264 * Creates a new backend definition for HEAD requests. For more info see `when()`.
3265 *
3266 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3267 *   and returns true if the url matches the current definition.
3268 * @param {(Object|function(Object))=} headers HTTP headers.
3269 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3270 *   {@link ngMock.$httpBackend $httpBackend mock}.
3271 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3272 *   control how a matched request is handled. You can save this object for later use and invoke
3273 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3274 */
3275
3276/**
3277 * @ngdoc method
3278 * @name $httpBackend#whenDELETE
3279 * @module ngMockE2E
3280 * @description
3281 * Creates a new backend definition for DELETE requests. For more info see `when()`.
3282 *
3283 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3284 *   and returns true if the url matches the current definition.
3285 * @param {(Object|function(Object))=} headers HTTP headers.
3286 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3287 *   {@link ngMock.$httpBackend $httpBackend mock}.
3288 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3289 *   control how a matched request is handled. You can save this object for later use and invoke
3290 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3291 */
3292
3293/**
3294 * @ngdoc method
3295 * @name $httpBackend#whenPOST
3296 * @module ngMockE2E
3297 * @description
3298 * Creates a new backend definition for POST requests. For more info see `when()`.
3299 *
3300 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3301 *   and returns true if the url matches the current definition.
3302 * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
3303 *   data string and returns true if the data is as expected.
3304 * @param {(Object|function(Object))=} headers HTTP headers.
3305 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3306 *   {@link ngMock.$httpBackend $httpBackend mock}.
3307 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3308 *   control how a matched request is handled. You can save this object for later use and invoke
3309 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3310 */
3311
3312/**
3313 * @ngdoc method
3314 * @name $httpBackend#whenPUT
3315 * @module ngMockE2E
3316 * @description
3317 * Creates a new backend definition for PUT requests.  For more info see `when()`.
3318 *
3319 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3320 *   and returns true if the url matches the current definition.
3321 * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
3322 *   data string and returns true if the data is as expected.
3323 * @param {(Object|function(Object))=} headers HTTP headers.
3324 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3325 *   {@link ngMock.$httpBackend $httpBackend mock}.
3326 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3327 *   control how a matched request is handled. You can save this object for later use and invoke
3328 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3329 */
3330
3331/**
3332 * @ngdoc method
3333 * @name $httpBackend#whenPATCH
3334 * @module ngMockE2E
3335 * @description
3336 * Creates a new backend definition for PATCH requests.  For more info see `when()`.
3337 *
3338 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3339 *   and returns true if the url matches the current definition.
3340 * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
3341 *   data string and returns true if the data is as expected.
3342 * @param {(Object|function(Object))=} headers HTTP headers.
3343 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3344 *   {@link ngMock.$httpBackend $httpBackend mock}.
3345 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3346 *   control how a matched request is handled. You can save this object for later use and invoke
3347 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3348 */
3349
3350/**
3351 * @ngdoc method
3352 * @name $httpBackend#whenJSONP
3353 * @module ngMockE2E
3354 * @description
3355 * Creates a new backend definition for JSONP requests. For more info see `when()`.
3356 *
3357 * @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
3358 *   and returns true if the url matches the current definition.
3359 * @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
3360 *   {@link ngMock.$httpBackend $httpBackend mock}.
3361 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3362 *   control how a matched request is handled. You can save this object for later use and invoke
3363 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3364 */
3365/**
3366 * @ngdoc method
3367 * @name $httpBackend#whenRoute
3368 * @module ngMockE2E
3369 * @description
3370 * Creates a new backend definition that compares only with the requested route.
3371 *
3372 * @param {string} method HTTP method.
3373 * @param {string} url HTTP url string that supports colon param matching.
3374 * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
3375 *   control how a matched request is handled. You can save this object for later use and invoke
3376 *   `respond` or `passThrough` again in order to change how a matched request is handled.
3377 */
3378/**
3379 * @ngdoc method
3380 * @name  $httpBackend#matchLatestDefinitionEnabled
3381 * @module ngMockE2E
3382 * @description
3383 * This method can be used to change which mocked responses `$httpBackend` returns, when defining
3384 * them with {@link ngMock.$httpBackend#when $httpBackend.when()} (and shortcut methods).
3385 * By default, `$httpBackend` returns the first definition that matches. When setting
3386 * `$http.matchLatestDefinitionEnabled(true)`, it will use the last response that matches, i.e. the
3387 * one that was added last.
3388 *
3389 * ```js
3390 * hb.when('GET', '/url1').respond(200, 'content', {});
3391 * hb.when('GET', '/url1').respond(201, 'another', {});
3392 * hb('GET', '/url1'); // receives "content"
3393 *
3394 * $http.matchLat
3394estDefinitionEnabled(true)
3395 * hb('GET', '/url1'); // receives "another"
3396 *
3397 * hb.when('GET', '/url1').respond(201, 'onemore', {});
3398 * hb('GET', '/url1'); // receives "onemore"
3399 * ```
3400 *
3401 * This is useful if a you have a default response that is overriden inside specific tests.
3402 *
3403 * Note that different from config methods on providers, `matchLatestDefinitionEnabled()` can be changed
3404 * even when the application is already running.
3405 *
3406 * @param  {Boolean=} value value to set, either `true` or `false`. Default is `false`.
3407 *                          If omitted, it will return the current value.
3408 * @return {$httpBackend|Boolean} self when used as a setter, and the current value when used
3409 *                                as a getter
3410 */
3411angular.mock.e2e = {};
3412angular.mock.e2e.$httpBackendDecorator =
3413  ['$rootScope', '$timeout', '$delegate', '$browser', createHttpBackendMock];
3414
3415
3416/**
3417 * @ngdoc type
3418 * @name $rootScope.Scope
3419 * @module ngMock
3420 * @description
3421 * {@link ng.$rootScope.Scope Scope} type decorated with helper methods useful for testing. These
3422 * methods are automatically available on any {@link ng.$rootScope.Scope Scope} instance when
3423 * `ngMock` module is loaded.
3424 *
3425 * In addition to all the regular `Scope` methods, the following helper methods are available:
3426 */
3427angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
3428
3429  var $rootScopePrototype = Object.getPrototypeOf($delegate);
3430
3431  $rootScopePrototype.$countChildScopes = countChildScopes;
3432  $rootScopePrototype.$countWatchers = countWatchers;
3433
3434  return $delegate;
3435
3436  // ------------------------------------------------------------------------------------------ //
3437
3438  /**
3439   * @ngdoc method
3440   * @name $rootScope.Scope#$countChildScopes
3441   * @module ngMock
3442   * @this $rootScope.Scope
3443   * @description
3444   * Counts all the direct and indirect child scopes of the current scope.
3445   *
3446   * The current scope is excluded from the count. The count includes all isolate child scopes.
3447   *
3448   * @returns {number} Total number of child scopes.
3449   */
3450  function countChildScopes() {
3451    var count = 0; // exclude the current scope
3452    var pendingChildHeads = [this.$$childHead];
3453    var currentScope;
3454
3455    while (pendingChildHeads.length) {
3456      currentScope = pendingChildHeads.shift();
3457
3458      while (currentScope) {
3459        count += 1;
3460        pendingChildHeads.push(currentScope.$$childHead);
3461        currentScope = currentScope.$$nextSibling;
3462      }
3463    }
3464
3465    return count;
3466  }
3467
3468
3469  /**
3470   * @ngdoc method
3471   * @name $rootScope.Scope#$countWatchers
3472   * @this $rootScope.Scope
3473   * @module ngMock
3474   * @description
3475   * Counts all the watchers of direct and indirect child scopes of the current scope.
3476   *
3477   * The watchers of the current scope are included in the count and so are all the watchers of
3478   * isolate child scopes.
3479   *
3480   * @returns {number} Total number of watchers.
3481   */
3482  function countWatchers() {
3483    var count = this.$$watchers ? this.$$watchers.length : 0; // include the current scope
3484    var pendingChildHeads = [this.$$childHead];
3485    var currentScope;
3486
3487    while (pendingChildHeads.length) {
3488      currentScope = pendingChildHeads.shift();
3489
3490      while (currentScope) {
3491        count += currentScope.$$watchers ? currentScope.$$watchers.length : 0;
3492        pendingChildHeads.push(currentScope.$$childHead);
3493        currentScope = currentScope.$$nextSibling;
3494      }
3495    }
3496
3497    return count;
3498  }
3499}];
3500
3501
3502(function(jasmineOrMocha) {
3503
3504  if (!jasmineOrMocha) {
3505    return;
3506  }
3507
3508  var currentSpec = null,
3509      injectorState = new InjectorState(),
3510      annotatedFunctions = [],
3511      wasInjectorCreated = function() {
3512        return !!currentSpec;
3513      };
3514
3515  angular.mock.$$annotate = angular.injector.$$annotate;
3516  angular.injector.$$annotate = function(fn) {
3517    if (typeof fn === 'function' && !fn.$inject) {
3518      annotatedFunctions.push(fn);
3519    }
3520    return angular.mock.$$annotate.apply(this, arguments);
3521  };
3522
3523  /**
3524   * @ngdoc function
3525   * @name angular.mock.module
3526   * @description
3527   *
3528   * *NOTE*: This function is also published on window for easy access.<br>
3529   * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
3530   *
3531   * This function registers a module configuration code. It collects the configuration information
3532   * which will be used when the injector is created by {@link angular.mock.inject inject}.
3533   *
3534   * See {@link angular.mock.inject inject} for usage example
3535   *
3536   * @param {...(string|Function|Object)} fns any number of modules which are represented as string
3537   *        aliases or as anonymous module initialization functions. The modules are used to
3538   *        configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
3539   *        object literal is passed each key-value pair will be registered on the module via
3540   *        {@link auto.$provide $provide}.value, the key being the string name (or token) to associate
3541   *        with the value on the injector.
3542   */
3543  var module = window.module = angular.mock.module = function() {
3544    var moduleFns = Array.prototype.slice.call(arguments, 0);
3545    return wasInjectorCreated() ? workFn() : workFn;
3546    /////////////////////
3547    function workFn() {
3548      if (currentSpec.$injector) {
3549        throw new Error('Injector already created, can not register a module!');
3550      } else {
3551        var fn, modules = currentSpec.$modules || (currentSpec.$modules = []);
3552        angular.forEach(moduleFns, function(module) {
3553          if (angular.isObject(module) && !angular.isArray(module)) {
3554            fn = ['$provide', function($provide) {
3555              angular.forEach(module, function(value, key) {
3556                $provide.value(key, value);
3557              });
3558            }];
3559          } else {
3560            fn = module;
3561          }
3562          if (currentSpec.$providerInjector) {
3563            currentSpec.$providerInjector.invoke(fn);
3564          } else {
3565            modules.push(fn);
3566          }
3567        });
3568      }
3569    }
3570  };
3571
3572  module.$$beforeAllHook = (window.before || window.beforeAll);
3573  module.$$afterAllHook = (window.after || window.afterAll);
3574
3575  // purely for testing ngMock itself
3576  module.$$currentSpec = function(to) {
3577    if (arguments.length === 0) return to;
3578    currentSpec = to;
3579  };
3580
3581  /**
3582   * @ngdoc function
3583   * @name angular.mock.module.sharedInjector
3584   * @description
3585   *
3586   * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
3587   *
3588   * This function ensures a single injector will be used for all tests in a given describe context.
3589   * This contrasts with the default behaviour where a new injector is created per test case.
3590   *
3591   * Use sharedInjector when you want to take advantage of Jasmine's `beforeAll()`, or mocha's
3592   * `before()` methods. Call `module.sharedInjector()` before you setup any other hooks that
3593   * will create (i.e call `module()`) or use (i.e call `inject()`) the injector.
3594   *
3595   * You cannot call `sharedInjector()` from within a context already using `sharedInjector()`.
3596   *
3597   * ## Example
3598   *
3599   * Typically beforeAll is used to make many assertions about a single operation. This can
3600   * cut down test run-time as the test setup doesn't need to be re-run, and enabling focussed
3601   * tests each with a single assertion.
3602   *
3603   * ```js
3604   * describe("Deep Thought", function() {
3605   *
3606   *   module.sharedInjector();
3607   *
3608   *   beforeAll(module("UltimateQuestion"));
3609   *
3610   *   beforeAll(inject(function(DeepThought) {
3611   *     expect(DeepThought.answer).toBeUndefined();
3612   *     DeepThought.generateAnswer();
3613   *   }));
3614   *
3615   *   it("has calculated the answer correctly", inject(function(DeepThought) {
3616   *     // Because of sharedInjector, we have access to the instance of the DeepThought service
3617   *     // that was provided to the beforeAll() hook. Therefore we can test the generated answer
3618   *     expect(DeepThought.answer).toBe(42);
3619   *   }));
3620   *
3621   *   it("has calculated the answer within the expected time", inject(function(DeepThought) {
3622   *     expect(DeepThought.runTimeMillennia).toBeLessThan(8000);
3623   *   }));
3624   *
3625   *   it("has double checked the answer", inject(function(DeepThought) {
3626   *     expect(DeepThought.absolutelySureItIsTheRightAnswer).toBe(true);
3627   *   }));
3628   *
3629   * });
3630   *
3631   * ```
3632   */
3633  module.sharedInjector = function() {
3634    if (!(module.$$beforeAllHook && module.$$afterAllHook)) {
3635      throw Error('sharedInjector() cannot be used unless your test runner defines beforeAll/afterAll');
3636    }
3637
3638    var initialized = false;
3639
3640    module.$$beforeAllHook(/** @this */ function() {
3641      if (injectorState.shared) {
3642        injectorState.sharedError = Error('sharedInjector() cannot be called inside a context that has already called sharedInjector()');
3643        throw injectorState.sharedError;
3644      }
3645      initialized = true;
3646      currentSpec = this;
3647      injectorState.shared = true;
3648    });
3649
3650    module.$$afterAllHook(function() {
3651      if (initialized) {
3652        injectorState = new InjectorState();
3653        module.$$cleanup();
3654      } else {
3655        injectorState.sharedError = null;
3656      }
3657    });
3658  };
3659
3660  module.$$beforeEach = function() {
3661    if (injectorState.shared && currentSpec && currentSpec !== this) {
3662      var state = currentSpec;
3663      currentSpec = this;
3664      angular.forEach(['$injector','$modules','$providerInjector', '$injectorStrict'], function(k) {
3665        currentSpec[k] = state[k];
3666        state[k] = null;
3667      });
3668    } else {
3669      currentSpec = this;
3670      originalRootElement = null;
3671      annotatedFunctions = [];
3672    }
3673  };
3674
3675  module.$$afterEach = function() {
3676    if (injectorState.cleanupAfterEach()) {
3677      module.$$cleanup();
3678    }
3679  };
3680
3681  module.$$cleanup = function() {
3682    var injector = currentSpec.$injector;
3683
3684    annotatedFunctions.forEach(function(fn) {
3685      delete fn.$inject;
3686    });
3687
3688    currentSpec.$injector = null;
3689    currentSpec.$modules = null;
3690    currentSpec.$providerInjector = null;
3691    currentSpec = null;
3692
3693    if (injector) {
3694      // Ensure `$rootElement` is instantiated, before checking `originalRootElement`
3695      var $rootElement = injector.get('$rootElement');
3696      var rootNode = $rootElement && $rootElement[0];
3697      var cleanUpNodes = !originalRootElement ? [] : [originalRootElement[0]];
3698      if (rootNode && (!originalRootElement || rootNode !== originalRootElement[0])) {
3699        cleanUpNodes.push(rootNode);
3700      }
3701      angular.element.cleanData(cleanUpNodes);
3702
3703      // Ensure `$destroy()` is available, before calling it
3704      // (a mocked `$rootScope` might not implement it (or not even be an object at all))
3705      var $rootScope = injector.get('$rootScope');
3706      if ($rootScope && $rootScope.$destroy) $rootScope.$destroy();
3707    }
3708
3709    // clean up jquery's fragment cache
3710    angular.forEach(angular.element.fragments, function(val, key) {
3711      delete angular.element.fragments[key];
3712    });
3713
3714    MockXhr.$$lastInstance = null;
3715
3716    angular.forEach(angular.callbacks, function(val, key) {
3717      delete angular.callbacks[key];
3718    });
3719    angular.callbacks.$$counter = 0;
3720  };
3721
3722  (window.beforeEach || window.setup)(module.$$beforeEach);
3723  (window.afterEach || window.teardown)(module.$$afterEach);
3724
3725  /**
3726   * @ngdoc function
3727   * @name angular.mock.inject
3728   * @description
3729   *
3730   * *NOTE*: This function is also published on window for easy access.<br>
3731   * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
3732   *
3733   * The inject function wraps a function into an injectable function. The inject() creates new
3734   * instance of {@link auto.$injector $injector} per test, which is then used for
3735   * resolving references.
3736   *
3737   *
3738   * ## Resolving References (Underscore Wrapping)
3739   * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this
3740   * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable
3741   * that is declared in the scope of the `describe()` block. Since we would, most likely, want
3742   * the variable to have the same name of the reference we have a problem, since the parameter
3743   * to the `inject()` function would hide the outer variable.
3744   *
3745   * To help with this, the injected parameters can, optionally, be enclosed with underscores.
3746   * These are ignored by the injector when the reference name is resolved.
3747   *
3748   * For example, the parameter `_myService_` would be resolved as the reference `myService`.
3749   * Since it is available in the function body as `_myService_`, we can then assign it to a variable
3750   * defined in an outer scope.
3751   *
3752   * ```
3753   * // Defined out reference variable outside
3754   * var myService;
3755   *
3756   * // Wrap the parameter in underscores
3757   * beforeEach( inject( function(_myService_){
3758   *   myService = _myService_;
3759   * }));
3760   *
3761   * // Use myService in a series of tests.
3762   * it('makes use of myService', function() {
3763   *   myService.doStuff();
3764   * });
3765   *
3766   * ```
3767   *
3768   * See also {@link angular.mock.module angular.mock.module}
3769   *
3770   * ## Example
3771   * Example of what a typical jasmine tests looks like with the inject method.
3772   * ```js
3773   *
3774   *   angular.module('myApplicationModule', [])
3775   *       .value('mode', 'app')
3776   *       .value('version', 'v1.0.1');
3777   *
3778   *
3779   *   describe('MyApp', function() {
3780   *
3781   *     // You need to load modules that you want to test,
3782   *     // it loads only the "ng" module by default.
3783   *     beforeEach(module('myApplicationModule'));
3784   *
3785   *
3786   *     // inject() is used to inject arguments of all given functions
3787   *     it('should provide a version', inject(function(mode, version) {
3788   *       expect(version).toEqual('v1.0.1');
3789   *       expect(mode).toEqual('app');
3790   *     }));
3791   *
3792   *
3793   *     // The inject and module method can also be used inside of the it or beforeEach
3794   *     it('should override a version and test the new version is injected', function() {
3795   *       // module() takes functions or strings (module aliases)
3796   *       module(function($provide) {
3797   *         $provide.value('version', 'overridden'); // override version here
3798   *       });
3799   *
3800   *       inject(function(version) {
3801   *         expect(version).toEqual('overridden');
3802   *       });
3803   *     });
3804   *   });
3805   *
3806   * ```
3807   *
3808   * @param {...Function} fns any number of functions which will be injected using the injector.
3809   */
3810
3811
3812
3813  var ErrorAddingDeclarationLocationStack = function ErrorAddingDeclarationLocationStack(e, errorForStack) {
3814    this.message = e.message;
3815    this.name = e.name;
3816    if (e.line) this.line = e.line;
3817    if (e.sourceId) this.sourceId = e.sourceId;
3818    if (e.stack && errorForStack)
3819      this.stack = e.stack + '\n' + errorForStack.stack;
3820    if (e.stackArray) this.stackArray = e.stackArray;
3821  };
3822  ErrorAddingDeclarationLocationStack.prototype = Error.prototype;
3823
3824  window.inject = angular.mock.inject = function() {
3825    var blockFns = Array.prototype.slice.call(arguments, 0);
3826    var errorForStack = new Error('Declaration Location');
3827    // IE10+ and PhanthomJS do not set stack trace information, until the error is thrown
3828    if (!errorForStack.stack) {
3829      try {
3830        throw errorForStack;
3831      } catch (e) { /* empty */ }
3832    }
3833    return wasInjectorCreated() ? WorkFn.call(currentSpec) : WorkFn;
3834    /////////////////////
3835    function WorkFn() {
3836      var modules = currentSpec.$modules || [];
3837      var strictDi = !!currentSpec.$injectorStrict;
3838      modules.unshift(['$injector', function($injector) {
3839        currentSpec.$providerInjector = $injector;
3840      }]);
3841      modules.unshift('ngMock');
3842      modules.unshift('ng');
3843      var injector = currentSpec.$injector;
3844      if (!injector) {
3845        if (strictDi) {
3846          // If strictDi is enabled, annotate the providerInjector blocks
3847          angular.forEach(modules, function(moduleFn) {
3848            if (typeof moduleFn === 'function') {
3849              angular.injector.$$annotate(moduleFn);
3850            }
3851          });
3852        }
3853        injector = currentSpec.$injector = angular.injector(modules, strictDi);
3854        currentSpec.$injectorStrict = strictDi;
3855      }
3856      for (var i = 0, ii = blockFns.length; i < ii; i++) {
3857        if (currentSpec.$injectorStrict) {
3858          // If the injector is strict / strictDi, and the spec wants to inject using automatic
3859          // annotation, then annotate the function here.
3860          injector.annotate(blockFns[i]);
3861        }
3862        try {
3863          injector.invoke(blockFns[i] || angular.noop, this);
3864        } catch (e) {
3865          if (e.stack && errorForStack) {
3866            throw new ErrorAddingDeclarationLocationStack(e, errorForStack);
3867          }
3868          throw e;
3869        } finally {
3870          errorForStack = null;
3871        }
3872      }
3873    }
3874  };
3875
3876
3877  angular.mock.inject.strictDi = function(value) {
3878    value = arguments.length ? !!value : true;
3879    return wasInjectorCreated() ? workFn() : workFn;
3880
3881    function workFn() {
3882      if (value !== currentSpec.$injectorStrict) {
3883        if (currentSpec.$injector) {
3884          throw new Error('Injector already created, can not modify strict annotations');
3885        } else {
3886          currentSpec.$injectorStrict = value;
3887        }
3888      }
3889    }
3890  };
3891
3892  function InjectorState() {
3893    this.shared = false;
3894    this.sharedError = null;
3895
3896    this.cleanupAfterEach = function() {
3897      return !this.shared || this.sharedError;
3898    };
3899  }
3900})(window.jasmine || window.mocha);
3901
3902'use strict';
3903
3904(function() {
3905  /**
3906   * @ngdoc function
3907   * @name browserTrigger
3908   * @description
3909   *
3910   * This is a global (window) function that is only available when the {@link ngMock} module is
3911   * included.
3912   *
3913   * It can be used to trigger a native browser event on an element, which is useful for unit testing.
3914   *
3915   *
3916   * @param {Object} element Either a wrapped jQuery/jqLite node or a DOMElement
3917   * @param {string=} eventType Optional event type. If none is specified, the function tries
3918   *                            to determine the right event type for the element, e.g. `change` for
3919   *                            `input[text]`.
3920   * @param {Object=} eventData An optional object which contains additional event data that is used
3921   *                            when creating the event:
3922   *
3923   *  - `bubbles`: [Event.bubbles](https://developer.mozilla.org/docs/Web/API/Event/bubbles).
3924   *    Not applicable to all events.
3925   *
3926   *  - `cancelable`: [Event.cancelable](https://developer.mozilla.org/docs/Web/API/Event/cancelable).
3927   *    Not applicable to all events.
3928   *
3929   *  - `charcode`: [charCode](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/ch
3929arcode)
3930   *    for keyboard events (keydown, keypress, and keyup).
3931   *
3932   *  - `data`: [data](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/data) for
3933   *    [CompositionEvents](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent).
3934   *
3935   *  - `elapsedTime`: the elapsedTime for
3936   *    [TransitionEvent](https://developer.mozilla.org/docs/Web/API/TransitionEvent)
3937   *    and [AnimationEvent](https://developer.mozilla.org/docs/Web/API/AnimationEvent).
3938   *
3939   *  - `keycode`: [keyCode](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/keycode)
3940   *    for keyboard events (keydown, keypress, and keyup).
3941   *
3942   *  - `keys`: an array of possible modifier keys (ctrl, alt, shift, meta) for
3943   *    [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent) and
3944   *    keyboard events (keydown, keypress, and keyup).
3945   *
3946   *  - `relatedTarget`: the
3947   *    [relatedTarget](https://developer.mozilla.org/docs/Web/API/MouseEvent/relatedTarget)
3948   *    for [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent).
3949   *
3950   *  - `which`: [which](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/which)
3951   *    for keyboard events (keydown, keypress, and keyup).
3952   *
3953   *  - `x`: x-coordinates for [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent)
3954   *    and [TouchEvent](https://developer.mozilla.org/docs/Web/API/TouchEvent).
3955   *
3956   *  - `y`: y-coordinates for [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent)
3957   *    and [TouchEvent](https://developer.mozilla.org/docs/Web/API/TouchEvent).
3958   *
3959   */
3960  window.browserTrigger = function browserTrigger(element, eventType, eventData) {
3961    if (element && !element.nodeName) element = element[0];
3962    if (!element) return;
3963
3964    eventData = eventData || {};
3965    var relatedTarget = eventData.relatedTarget || element;
3966    var keys = eventData.keys;
3967    var x = eventData.x;
3968    var y = eventData.y;
3969
3970    var inputType = (element.type) ? element.type.toLowerCase() : null,
3971        nodeName = element.nodeName.toLowerCase();
3972    if (!eventType) {
3973      eventType = {
3974        'text':            'change',
3975        'textarea':        'change',
3976        'hidden':          'change',
3977        'password':        'change',
3978        'button':          'click',
3979        'submit':          'click',
3980        'reset':           'click',
3981        'image':           'click',
3982        'checkbox':        'click',
3983        'radio':           'click',
3984        'select-one':      'change',
3985        'select-multiple': 'change',
3986        '_default_':       'click'
3987      }[inputType || '_default_'];
3988    }
3989
3990    if (nodeName === 'option') {
3991      element.parentNode.value = element.value;
3992      element = element.parentNode;
3993      eventType = 'change';
3994    }
3995
3996    keys = keys || [];
3997    function pressed(key) {
3998      return keys.indexOf(key) !== -1;
3999    }
4000
4001    var evnt;
4002    if (/transitionend/.test(eventType)) {
4003      if (window.WebKitTransitionEvent) {
4004        evnt = new window.WebKitTransitionEvent(eventType, eventData);
4005        evnt.initEvent(eventType, eventData.bubbles, true);
4006      } else {
4007        try {
4008          evnt = new window.TransitionEvent(eventType, eventData);
4009        } catch (e) {
4010          evnt = window.document.createEvent('TransitionEvent');
4011          evnt.initTransitionEvent(eventType, eventData.bubbles, null, null, eventData.elapsedTime || 0);
4012        }
4013      }
4014    } else if (/animationend/.test(eventType)) {
4015      if (window.WebKitAnimationEvent) {
4016        evnt = new window.WebKitAnimationEvent(eventType, eventData);
4017        evnt.initEvent(eventType, eventData.bubbles, true);
4018      } else {
4019        try {
4020          evnt = new window.AnimationEvent(eventType, eventData);
4021        } catch (e) {
4022          evnt = window.document.createEvent('AnimationEvent');
4023          evnt.initAnimationEvent(eventType, eventData.bubbles, null, null, eventData.elapsedTime || 0);
4024        }
4025      }
4026    } else if (/touch/.test(eventType) && supportsTouchEvents()) {
4027      evnt = createTouchEvent(element, eventType, x, y);
4028    } else if (/key/.test(eventType)) {
4029      evnt = window.document.createEvent('Events');
4030      evnt.initEvent(eventType, eventData.bubbles, eventData.cancelable);
4031      evnt.view = window;
4032      evnt.ctrlKey = pressed('ctrl');
4033      evnt.altKey = pressed('alt');
4034      evnt.shiftKey = pressed('shift');
4035      evnt.metaKey = pressed('meta');
4036      evnt.keyCode = eventData.keyCode;
4037      evnt.charCode = eventData.charCode;
4038      evnt.which = eventData.which;
4039    } else if (/composition/.test(eventType)) {
4040      try {
4041        evnt = new window.CompositionEvent(eventType, {
4042          data: eventData.data
4043        });
4044      } catch (e) {
4045        // Support: IE9+
4046        evnt = window.document.createEvent('CompositionEvent', {});
4047        evnt.initCompositionEvent(
4048          eventType,
4049          eventData.bubbles,
4050          eventData.cancelable,
4051          window,
4052          eventData.data,
4053          null
4054        );
4055      }
4056
4057    } else {
4058      evnt = window.document.createEvent('MouseEvents');
4059      x = x || 0;
4060      y = y || 0;
4061      evnt.initMouseEvent(eventType, true, true, window, 0, x, y, x, y, pressed('ctrl'),
4062          pressed('alt'), pressed('shift'), pressed('meta'), 0, relatedTarget);
4063    }
4064
4065    /* we're unable to change the timeStamp value directly so this
4066     * is only here to allow for testing where the timeStamp value is
4067     * read */
4068    evnt.$manualTimeStamp = eventData.timeStamp;
4069
4070    if (!evnt) return;
4071
4072    if (!eventData.bubbles || supportsEventBubblingInDetachedTree() || isAttachedToDocument(element)) {
4073      return element.dispatchEvent(evnt);
4074    } else {
4075      triggerForPath(element, evnt);
4076    }
4077  };
4078
4079  function supportsTouchEvents() {
4080    if ('_cached' in supportsTouchEvents) {
4081      return supportsTouchEvents._cached;
4082    }
4083    if (!window.document.createTouch || !window.document.createTouchList) {
4084      supportsTouchEvents._cached = false;
4085      return false;
4086    }
4087    try {
4088      window.document.createEvent('TouchEvent');
4089    } catch (e) {
4090      supportsTouchEvents._cached = false;
4091      return false;
4092    }
4093    supportsTouchEvents._cached = true;
4094    return true;
4095  }
4096
4097  function createTouchEvent(element, eventType, x, y) {
4098    var evnt = new window.Event(eventType);
4099    x = x || 0;
4100    y = y || 0;
4101
4102    var touch = window.document.createTouch(window, element, Date.now(), x, y, x, y);
4103    var touches = window.document.createTouchList(touch);
4104
4105    evnt.touches = touches;
4106
4107    return evnt;
4108  }
4109
4110  function supportsEventBubblingInDetachedTree() {
4111    if ('_cached' in supportsEventBubblingInDetachedTree) {
4112      return supportsEventBubblingInDetachedTree._cached;
4113    }
4114    supportsEventBubblingInDetachedTree._cached = false;
4115    var doc = window.document;
4116    if (doc) {
4117      var parent = doc.createElement('div'),
4118          child = parent.cloneNode();
4119      parent.appendChild(child);
4120      parent.addEventListener('e', function() {
4121        supportsEventBubblingInDetachedTree._cached = true;
4122      });
4123      var evnt = window.document.createEvent('Events');
4124      evnt.initEvent('e', true, true);
4125      child.dispatchEvent(evnt);
4126    }
4127    return supportsEventBubblingInDetachedTree._cached;
4128  }
4129
4130  function triggerForPath(element, evnt) {
4131    var stop = false;
4132
4133    var _stopPropagation = evnt.stopPropagation;
4134    evnt.stopPropagation = function() {
4135      stop = true;
4136      _stopPropagation.apply(evnt, arguments);
4137    };
4138    patchEventTargetForBubbling(evnt, element);
4139    do {
4140      element.dispatchEvent(evnt);
4141      // eslint-disable-next-line no-unmodified-loop-condition
4142    } while (!stop && (element = element.parentNode));
4143  }
4144
4145  function patchEventTargetForBubbling(event, target) {
4146    event._target = target;
4147    Object.defineProperty(event, 'target', {get: function() { return this._target;}});
4148  }
4149
4150  function isAttachedToDocument(element) {
4151    while ((element = element.parentNode)) {
4152        if (element === window) {
4153            return true;
4154        }
4155    }
4156    return false;
4157  }
4158})();
4159
4160
4161})(window, window.angular);
4162;
4163    
4164$(function() { 
4165    "use strict";
4166	// Multipurpose Modals
4167    
4168    $('.foundry_modal[modal-link]').remove();
4169
4170    // Capture Body elements in the content wrapper
4171
4172    // Any child element div inside the wrapper
4173    var wrapperEl = $("div.wrapper > div");
4174    // Header Element
4175    var headerEl = $('#masthead');
4176    // Main Element
4177    var mainEl = $('#content');
4178
4179    if ((!wrapperEl.attr("aria-hidden")) || (wrapperEl.attr("aria-hidden") !== 'true')) {
4180        wrapperEl.attr("aria-hidden", 'false');
4181    }
4182    if ((!headerEl.attr("aria-hidden")) || (headerEl.attr("aria-hidden") !== 'true')) {
4183        headerEl.attr("aria-hidden", 'false');
4184    }
4185    if ((!mainEl.attr("aria-hidden")) || (mainEl.attr("aria-hidden") !== 'true')) {
4186        mainEl.attr("aria-hidden", 'false');
4187    }
4188
4189    if($('.foundry_modal').length && (!$('.modal-screen').length)){
4190        // Add a div.modal-screen if there isn't already one there.
4191        var modalScreen = $('<div />').addClass('modal-screen').appendTo('body');
4192        (wrapperEl.attr('aria-hidden') == 'true') ? wrapperEl.attr('aria-hidden', 'false') : wrapperEl.attr('aria-hidden', 'true');
4193        (headerEl.attr('aria-hidden') == 'true') ? headerEl.attr('aria-hidden', 'false') : headerEl.attr('aria-hidden', 'true');
4194        (mainEl.attr('aria-hidden') == 'true') ? mainEl.attr('aria-hidden', 'false') : mainEl.attr('aria-hidden', 'true');
4195
4196    }
4197
4198    $('.foundry_modal').click(function(){
4199        $(this).addClass('modal-acknowledged');
4200    });
4201    
4202    $('.modal-container:not([modal-link])').each(function(index) {
4203        if($(this).find('iframe[src]').length){
4204        	$(this).find('.foundry_modal').addClass('iframe-modal');
4205        	var iframe = $(this).find('iframe');
4206        	iframe.attr('data-src',iframe.attr('src'));
4207            iframe.attr('src', '');
4208
4209        }
4210        $(this).find('.btn-modal').attr('modal-link', index);
4211
4212        // Only clone and append to body if there isn't already one there
4213        if(!$('.foundry_modal[modal-link="'+index+'"]').length){
4214            $(this).find('.foundry_modal').clone().appendTo('body').attr('modal-link', index).prepend($('<span class="close-modal" aria-label="Close">&times;</span>'));
4215        }
4216    });
4217    
4218    $('.btn-modal').unbind('click').click(function(){
4219    	var linkedModal = $('.foundry_modal[modal-link="' + $(this).attr('modal-link') + '"]'),
4220            autoplayMsg = "";
4221        $('.modal-screen').toggleClass('reveal-modal');
4222        if(linkedModal.find('iframe').length){
4223            if(linkedModal.find('iframe').attr('data-autoplay') === '1'){
4224                var autoplayMsg = '&autoplay=1'
4225            }
4226        	linkedModal.find('iframe').attr('src', (linkedModal.find('iframe').attr('data-src') + autoplayMsg));
4227        }
4228        linkedModal.toggleClass('reveal-modal');
4229        return false; 
4230    });
4231    
4232    // Autoshow modals
4233	
4234	$('.foundry_modal[data-time-delay]').each(function(){
4235		var modal = $(this);
4236		var delay = modal.attr('data-time-delay');
4237        modal.prepend($('<span class="close-modal" aria-label="Close">&times;</span>'));
4238    	if(typeof modal.attr('data-cookie') != "undefined"){
4239        	if(!mr_cookies.hasItem(modal.attr('data-cookie'))){
4240                setTimeout(function(){
4241        			modal.addClass('reveal-modal');
4242                    $('.modal-screen').addClass('reveal-modal');
4243                    (wrapperEl.attr('aria-hidden') == 'false') ? wrapperEl.attr('aria-hidden', 'true') : wrapperEl.attr('aria-hidden', 'false');
4244                    (headerEl.attr('aria-hidden') == 'false') ? headerEl.attr('aria-hidden', 'true') : headerEl.attr('aria-hidden', 'false');
4245                    (mainEl.attr('aria-hidden') == 'false') ? mainEl.attr('aria-hidden', 'true') : mainEl.attr('aria-hidden', 'false');
4246        		},delay);
4247            }
4248        }else{
4249            setTimeout(function(){
4250                modal.addClass('reveal-modal');
4251                $('.modal-screen').addClass('reveal-modal');
4252                (wrapperEl.attr('aria-hidden') == 'false') ? wrapperEl.attr('aria-hidden', 'true') : wrapperEl.attr('aria-hidden', 'false');
4253                (headerEl.attr('aria-hidden') == 'false') ? headerEl.attr('aria-hidden', 'true') : headerEl.attr('aria-hidden', 'false');
4254                (mainEl.attr('aria-hidden') == 'false') ? mainEl.attr('aria-hidden', 'true') : mainEl.attr('aria-hidden', 'false');
4255            },delay);
4256        }
4257	});
4258
4259    // Autoclose modals
4260
4261    $('.foundry_modal[data-hide-after]').each(function(){
4262        var modal = $(this);
4263        var delay = modal.attr('data-hide-after');
4264        if(typeof modal.attr('data-cookie') != "undefined"){
4265            if(!mr_cookies.hasItem(modal.attr('data-cookie'))){
4266                setTimeout(function(){
4267                if(!modal.hasClass('modal-acknowledged')){
4268                    modal.removeClass('reveal-modal');
4269                    $('.modal-screen').removeClass('reveal-modal');
4270                    (wrapperEl.attr('aria-hidden') == 'true') ? wrapperEl.attr('aria-hidden', 'false') : wrapperEl.attr('aria-hidden', 'true');
4271                    (headerEl.attr('aria-hidden') == 'true') ? headerEl.attr('aria-hidden', 'false') : headerEl.attr('aria-hidden', 'true');
4272                    (mainEl.attr('aria-hidden') == 'true') ? mainEl.attr('aria-hidden', 'false') : mainEl.attr('aria-hidden', 'true');
4273                }
4274                },delay); 
4275            }
4276        }else{
4277            setTimeout(function(){
4278                if(!modal.hasClass('modal-acknowledged')){
4279                    modal.removeClass('reveal-modal');
4280                    $('.modal-screen').removeClass('reveal-modal');
4281                    (wrapperEl.attr('aria-hidden') == 'true') ? wrapperEl.attr('aria-hidden', 'false') : wrapperEl.attr('aria-hidden', 'true');
4282                    (headerEl.attr('aria-hidden') == 'true') ? headerEl.attr('aria-hidden', 'false') : headerEl.attr('aria-hidden', 'true');
4283                    (mainEl.attr('aria-hidden') == 'true') ? mainEl.attr('aria-hidden', 'false') : mainEl.attr('aria-hidden', 'true');
4284                }
4285            },delay); 
4286        }
4287    });
4288    
4289    $('.close-modal:not(.modal-strip .close-modal)').unbind('click').click(function(){
4290    	var modal = $(this).closest('.foundry_modal');
4291        modal.toggleClass('reveal-modal');
4292        if(typeof modal.attr('data-cookie') !== "undefined"){
4293            mr_cookies.setItem(modal.attr('data-cookie'), "true", Infinity);
4294        }
4295    	if(modal.find('iframe').length){
4296            modal.find('iframe').attr('src', '');
4297        }
4298        $('.modal-screen').removeClass('reveal-modal');
4299        (wrapperEl.attr('aria-hidden') == 'true') ? wrapperEl.attr('aria-hidden', 'false') : wrapperEl.attr('aria-hidden', 'true');
4300        (headerEl.attr('aria-hidden') == 'true') ? headerEl.attr('aria-hidden', 'false') : headerEl.attr('aria-hidden', 'true');
4301        (mainEl.attr('aria-hidden') == 'true') ? mainEl.attr('aria-hidden', 'false') : mainEl.attr('aria-hidden', 'true');
4302    });
4303    
4304    $('.modal-screen').unbind('click').click(function(){
4305        if($('.foundry_modal.reveal-modal').find('iframe').length){
4306            $('.foundry_modal.reveal-modal').find('iframe').attr('src', '');
4307        }
4308    	$('.foundry_modal.reveal-modal').toggleClass('reveal-modal');
4309        $(this).toggleClass('reveal-modal');
4310        (wrapperEl.attr('aria-hidden') == 'true') ? wrapperEl.attr('aria-hidden', 'false') : wrapperEl.attr('aria-hidden', 'true');
4311        (headerEl.attr('aria-hidden') == 'true') ? headerEl.attr('aria-hidden', 'false') : headerEl.attr('aria-hidden', 'true');
4312        (mainEl.attr('aria-hidden') == 'true') ? mainEl.attr('aria-hidden', 'false') : mainEl.attr('aria-hidden', 'true');
4313    });
4314    
4315    $(document).keyup(function(e) {
4316		 if (e.keyCode == 27) { // escape key maps to keycode `27`
4317            if($('.foundry_modal').find('iframe').length){
4318                $('.foundry_modal').find('iframe').attr('src', '');
4319            }
4320			$('.foundry_modal').removeClass('reveal-modal');
4321             $('.modal-screen').removeClass('reveal-modal');
4322             (wrapperEl.attr('aria-hidden') == 'true') ? wrapperEl.attr('aria-hidden', 'false') : wrapperEl.attr('aria-hidden', 'true');
4323             (headerEl.attr('aria-hidden') == 'true') ? headerEl.attr('aria-hidden', 'false') : headerEl.attr('aria-hidden', 'true');
4324             (mainEl.attr('aria-hidden') == 'true') ? mainEl.attr('aria-hidden', 'false') : mainEl.attr('aria-hidden', 'true');
4325		}
4326	});
4327    
4328    // Modal Strips
4329    
4330    $('.modal-strip').each(function(){
4331    	if(!$(this).find('.close-modal').length){
4332            $(this).append($('<span class="close-modal" aria-label="Close">&times;</span>'));
4333    	}
4334    	var modal = $(this);
4335
4336        if(typeof modal.attr('data-cookie') != "undefined"){
4337           
4338            if(!mr_cookies.hasItem(modal.attr('data-cookie'))){
4339            	setTimeout(function(){
4340                    modal.addClass('reveal-modal');
4341                    (wrapperEl.attr('aria-hidden') == 'false') ? wrapperEl.attr('aria-hidden', 'true') : wrapperEl.attr('aria-hidden', 'false');
4342                    (headerEl.attr('aria-hidden') == 'false') ? headerEl.attr('aria-hidden', 'true') : headerEl.attr('aria-hidden', 'false');
4343                    (mainEl.attr('aria-hidden') == 'false') ? mainEl.attr('aria-hidden', 'true') : mainEl.attr('aria-hidden', 'false');
4344            	},1000);
4345            }
4346        }else{
4347            setTimeout(function(){
4348                modal.addClass('reveal-modal');
4349                (wrapperEl.attr('aria-hidden') == 'false') ? wrapperEl.attr('aria-hidden', 'true') : wrapperEl.attr('aria-hidden', 'false');
4350                (headerEl.attr('aria-hidden') == 'false') ? headerEl.attr('aria-hidden', 'true') : headerEl.attr('aria-hidden', 'false');
4351                (mainEl.attr('aria-hidden') == 'false') ? mainEl.attr('aria-hidden', 'true') : mainEl.attr('aria-hidden', 'false');
4352            },1000);
4353        }
4354    });
4355    
4356    $('.modal-strip .close-modal').click(function(){
4357        var modal = $(this).closest('.modal-strip');
4358        if(typeof modal.attr('data-cookie') != "undefined"){
4359            mr_cookies.setItem(modal.attr('data-cookie'), "true", Infinity);
4360        }
4361        $(this).closest('.modal-strip').removeClass('reveal-modal');
4362        (wrapperEl.attr('aria-hidden') == 'true') ? wrapperEl.attr('aria-hidden', 'false') : wrapperEl.attr('aria-hidden', 'true');
4363        (headerEl.attr('aria-hidden') == 'true') ? headerEl.attr('aria-hidden', 'false') : headerEl.attr('aria-hidden', 'true');
4364        (mainEl.attr('aria-hidden') == 'true') ? mainEl.attr('aria-hidden', 'false') : mainEl.attr('aria-hidden', 'true');
4365    	return false;
4366    });
4367
4368}); ;
4369/* 
4370 * Selecter v3.2.4 - 2015-04-04 
4371 * A jQuery plugin for replacing default select elements. Part of the Formstone Library. 
4372 * http://classic.formstone.it/selecter/ 
4373 * 
4374 * Copyright 2015 Ben Plum; MIT Licensed 
4375 */
4376
4377;(function ($, window) {
4378	"use strict";
4379
4380	var guid = 0,
4381		userAgent = (window.navigator.userAgent||window.navigator.vendor||window.opera),
4382		isFirefox = /Firefox/i.test(userAgent),
4383		isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(userAgent),
4384		isFirefoxMobile = (isFirefox && isMobile),
4385		$body = null;
4386
4387	/**
4388	 * @options
4389	 * @param callback [function] <$.noop> "Select item callback"
4390	 * @param cover [boolean] <false> "Cover handle with option set"
4391	 * @param customClass [string] <''> "Class applied to instance"
4392	 * @param label [string] <''> "Label displayed before selection"
4393	 * @param external [boolean] <false> "Open options as links in new window"
4394	 * @param links [boolean] <false> "Open options as links in same window"
4395	 * @param mobile [boolean] <false> "Force desktop interaction on mobile"
4396	 * @param trim [int] <0> "Trim options to specified length; 0 to disable”
4397	 */
4398	var options = {
4399		callback: $.noop,
4400		cover: false,
4401		customClass: "",
4402		label: "",
4403		external: false,
4404		links: false,
4405		mobile: false,
4406		trim: 0
4407	};
4408
4409	var pub = {
4410
4411		/**
4412		 * @method
4413		 * @name defaults
4414		 * @description Sets default plugin options
4415		 * @param opts [object] <{}> "Options object"
4416		 * @example $.selecter("defaults", opts);
4417		 */
4418		defaults: function(opts) {
4419			options = $.extend(options, opts || {});
4420			return (typeof this === 'object') ? $(this) : true;
4421		},
4422
4423		/**
4424		 * @method
4425		 * @name disable
4426		 * @description Disables target instance or option
4427		 * @param option [string] <null> "Target option value"
4428		 * @example $(".target").selecter("disable", "1");
4429		 */
4430		disable: function(option) {
4431			return $(this).each(function(i, input) {
4432				var data = $(input).parent(".selecter").data("selecter");
4433
4434				if (data) {
4435					if (typeof option !== "undefined") {
4436						var index = data.$items.index( data.$items.filter("[data-value=" + option + "]") );
4437
4438						data.$items.eq(index).addClass("disabled");
4439						data.$options.eq(index).prop("disabled", true);
4440					} else {
4441						if (data.$selecter.hasClass("open")) {
4442							data.$selecter.find(".selecter-selected").trigger("click.selecter");
4443						}
4444
4445						data.$selecter.addClass("disabled");
4446						data.$select.prop("disabled", true);
4447					}
4448				}
4449			});
4450		},
4451
4452		/**
4453		 * @method
4454		 * @name destroy
4455		 * @description Removes instance of plugin
4456		 * @example $(".target").selecter("destroy");
4457		 */
4458		destroy: function() {
4459			return $(this).each(function(i, input) {
4460				var data = $(input).parent(".selecter").data("selecter");
4461
4462				if (data) {
4463					if (data.$selecter.hasClass("open")) {
4464						data.$selecter.find(".selecter-selected").trigger("click.selecter");
4465					}
4466
4467					// Scroller support
4468					if ($.fn.scroller !== undefined) {
4469						data.$selecter.find(".selecter-options").scroller("destroy");
4470					}
4471
4472					data.$select[0].tabIndex = data.tabIndex;
4473
4474					data.$select.find(".selecter-placeholder").remove();
4475					data.$selected.remove();
4476					data.$itemsWrapper.remove();
4477
4478					data.$selecter.off(".selecter");
4479
4480					data.$select.off(".selecter")
4481								.removeClass("selecter-element")
4482								.show()
4483								.unwrap();
4484				}
4485			});
4486		},
4487
4488		/**
4489		 * @method
4490		 * @name enable
4491		 * @description Enables target instance or option
4492		 * @param option [string] <null> "Target option value"
4493		 * @example $(".target").selecter("enable", "1");
4494		 */
4495		enable: function(option) {
4496			return $(this).each(function(i, input) {
4497				var data = $(input).parent(".selecter").data("selecter");
4498
4499				if (data) {
4500					if (typeof option !== "undefined") {
4501						var index = data.$items.index( data.$items.filter("[data-value=" + option + "]") );
4502						data.$items.eq(index).removeClass("disabled");
4503						data.$options.eq(index).prop("disabled", false);
4504					} else {
4505						data.$selecter.removeClass("disabled");
4506						data.$select.prop("disabled", false);
4507					}
4508				}
4509			});
4510		},
4511
4512
4513		/**
4514		* @method private
4515		* @name refresh
4516		* @description DEPRECATED - Updates instance base on target options
4517		* @example $(".target").selecter("refresh");
4518		*/
4519		refresh: function() {
4520			return pub.update.apply($(this));
4521		},
4522
4523		/**
4524		* @method
4525		* @name update
4526		* @description Updates instance base on target options
4527		* @example $(".target").selecter("update");
4528		*/
4529		update: function() {
4530			return $(this).each(function(i, input) {
4531				var data = $(input).parent(".selecter").data("selecter");
4532
4533				if (data) {
4534					var index = data.index;
4535
4536					data.$allOptions = data.$select.find("option, optgroup");
4537					data.$options = data.$allOptions.filter("option");
4538					data.index = -1;
4539
4540					index = data.$options.index(data.$options.filter(":selected"));
4541
4542					_buildOptions(data);
4543
4544					if (!data.multiple) {
4545						_update(index, data);
4546					}
4547				}
4548			});
4549		}
4550	};
4551
4552	/**
4553	 * @method private
4554	 * @name _init
4555	 * @description Initializes plugin
4556	 * @param opts [object] "Initialization options"
4557	 */
4558	function _init(opts) {
4559		// Local options
4560		opts = $.extend({}, options, opts || {});
4561
4562		// Check for Body
4563		if ($body === null) {
4564			$body = $("body");
4565		}
4566
4567		// Apply to each element
4568		var $items = $(this);
4569		for (var i = 0, count = $items.length; i < count; i++) {
4570			_build($items.eq(i), opts);
4571		}
4572		return $items;
4573	}
4574
4575	/**
4576	 * @method private
4577	 * @name _build
4578	 * @description Builds each instance
4579	 * @param $select [jQuery object] "Target jQuery object"
4580	 * @param opts [object] <{}> "Options object"
4581	 */
4582	function _build($select, opts) {
4583		if (!$select.hasClass("selecter-element")) {
4584			// EXTEND OPTIONS
4585			opts = $.extend({}, opts, $select.data("selecter-options"));
4586
4587			opts.multiple = $select.prop("multiple");
4588			opts.disabled = $select.is(":disabled");
4589
4590			if (opts.external) {
4591				opts.links = true;
4592			}
4593
4594			// Grab true original index, only if selected attribute exits
4595			var $originalOption = $select.find("[selected]").not(":disabled"),
4596				originalOptionIndex = $select.find("option").index($originalOption);
4597
4598			if (!opts.multiple && opts.label !== "") {
4599				$select.prepend('<option value="" class="selecter-placeholder" selected>' + opts.label + '</option>');
4600				if (originalOptionIndex > -1) {
4601					originalOptionIndex++;
4602				}
4603			} else {
4604				opts.label = "";
4605			}
4606
4607			// Build options array
4608			var $allOptions = $select.find("option, optgroup"),
4609				$options = $allOptions.filter("option");
4610
4611			// If we didn't actually have a selected elemtn
4612			if (!$originalOption.length) {
4613				$originalOption = $options.eq(0);
4614			}
4615
4616			// Determine original item
4617			var originalIndex = (originalOptionIndex > -1) ? originalOptionIndex : 0,
4618				originalLabel = (opts.label !== "") ? opts.label : $originalOption.text(),
4619				wrapperTag = "div";
4620
4621			// Swap tab index, no more interacting with the actual select!
4622			opts.tabIndex = $select[0].tabIndex;
4623			$select[0].tabIndex = -1;
4624
4625			// Build HTML
4626			var inner = "",
4627				wrapper = "";
4628
4629			// Build wrapper
4630			wrapper += '<' + wrapperTag + ' class="selecter ' + opts.customClass;
4631			// Special case classes
4632			if (isMobile) {
4633				wrapper += ' mobile';
4634			} else if (opts.cover) {
4635				wrapper += ' cover';
4636			}
4637			if (opts.multiple) {
4638				wrapper += ' multiple';
4639			} else {
4640				wrapper += ' closed';
4641			}
4642			if (opts.disabled) {
4643				wrapper += ' disabled';
4644			}
4645			wrapper += '" tabindex="' + opts.tabIndex + '">';
4646			wrapper += '</' + wrapperTag + '>';
4647
4648			// Build inner
4649			if (!opts.multiple) {
4650				inner += '<span class="selecter-selected">';
4651				inner += $('<span></span>').text( _trim(originalLabel, opts.trim) ).html();
4652				inner += '</span>';
4653			}
4654			inner += '<div class="selecter-options">';
4655			inner += '</div>';
4656
4657			// Modify DOM
4658			$select.addClass("selecter-element")
4659				   .wrap(wrapper)
4660				   .after(inner);
4661
4662			// Store plugin data
4663			var $selecter = $select.parent(".selecter"),
4664				data = $.extend({
4665					$select: $select,
4666					$allOptions: $allOptions,
4667					$options: $options,
4668					$selecter: $selecter,
4669					$selected: $selecter.find(".selecter-selected"),
4670					$itemsWrapper: $selecter.find(".selecter-options"),
4671					index: -1,
4672					guid: guid++
4673				}, opts);
4674
4675			_buildOptions(data);
4676
4677			if (!data.multiple) {
4678				_update(originalIndex, data);
4679			}
4680
4681			// Scroller support
4682			if ($.fn.scroller !== undefined) {
4683				data.$itemsWrapper.scroller();
4684			}
4685
4686			// Bind click events
4687			data.$selecter.on("touchstart.selecter", ".selecter-selected", data, _onTouchStart)
4688						  .on("click.selecter", ".selecter-selected", data, _onClick)
4689						  .on("click.selecter", ".selecter-item", data, _onSelect)
4690						  .on("close.selecter", data, _onClose)
4691						  .data("selecter", data);
4692
4693			// Change events
4694			data.$select.on("change.selecter", data, _onChange);
4695
4696			// Focus/Blur events
4697			if (!isMobile) {
4698				data.$selecter.on("focusin.selecter", data, _onFocus)
4699							  .on("blur.selecter", data, _onBlur);
4700
4701				// Handle clicks to associated labels
4702				data.$select.on("focusin.selecter", data, function(e) {
4703					e.data.$selecter.trigger("focus");
4704				});
4705			}
4706		}
4707	}
4708
4709	/**
4710	 * @method private
4711	 * @name _buildOptions
4712	 * @description Builds instance's option set
4713	 * @param data [object] "Instance data"
4714	 */
4715	function _buildOptions(data) {
4716		var html = '',
4717			itemTag = (data.links) ? "a" : "span",
4718			j = 0;
4719
4720		for (var i = 0, count = data.$allOptions.length; i < count; i++) {
4721			var $op = data.$allOptions.eq(i);
4722
4723			// Option group
4724			if ($op[0].tagName === "OPTGROUP") {
4725				html += '<span class="selecter-group';
4726				// Disabled groups
4727				if ($op.is(":disabled")) {
4728					html += ' disabled';
4729				}
4730				html += '">' + $op.attr("label") + '</span>';
4731			} else {
4732				var opVal = $op.val();
4733
4734				if (!$op.attr("value")) {
4735					$op.attr("value", opVal);
4736				}
4737
4738				html += '<' + itemTag + ' class="selecter-item';
4739				if ($op.hasClass('selecter-placeholder')) {
4740					html += ' placeholder';
4741				}
4742				// Default selected value - now handles multi's thanks to @kuilkoff
4743				if ($op.is(':selected')) {
4744					html += ' selected';
4745				}
4746				// Disabled options
4747				if ($op.is(":disabled")) {
4748					html += ' disabled';
4749				}
4750				html += '" ';
4751				if (data.links) {
4752					html += 'href="' + opVal + '"';
4753				} else {
4754					html += 'data-value="' + opVal + '"';
4755				}
4756				html += '>' + $("<span></span>").text( _trim($op.text(), data.trim) ).html() + '</' + itemTag + '>';
4757				j++;
4758			}
4759		}
4760
4761		data.$itemsWrapper.html(html);
4762		data.$items = data.$selecter.find(".selecter-item");
4763	}
4764
4765	/**
4766	 * @method private
4767	 * @name _onTouchStart
4768	 * @description Handles touchstart to selected item
4769	 * @param e [object] "Event data"
4770	 */
4771	function _onTouchStart(e) {
4772		e.stopPropagation();
4773
4774		var data = e.data;
4775
4776		data.touchStartEvent = e.originalEvent;
4777
4778		data.touchStartX = data.touchStartEvent.touches[0].clientX;
4779		data.touchStartY = data.touchStartEvent.touches[0].clientY;
4780
4781		data.$selecter.on("touchmove.selecter", ".selecter-selected", data, _onTouchMove)
4782					  .on("touchend.selecter", ".selecter-selected", data, _onTouchEnd);
4783	}
4784
4785	/**
4786	 * @method private
4787	 * @name _onTouchMove
4788	 * @description Handles touchmove to selected item
4789	 * @param e [object] "Event data"
4790	 */
4791	function _onTouchMove(e) {
4792		var data = e.data,
4793			oe = e.originalEvent;
4794
4795		if (Math.abs(oe.touches[0].clientX - data.touchStartX) > 10 || Math.abs(oe.touches[0].clientY - data.touchStartY) > 10) {
4796			data.$selecter.off("touchmove.selecter touchend.selecter");
4797		}
4798	}
4799
4800	/**
4801	 * @method private
4802	 * @name _onTouchEnd
4803	 * @description Handles touchend to selected item
4804	 * @param e [object] "Event data"
4805	 */
4806	function _onTouchEnd(e) {
4807		var data = e.data;
4808
4809		data.touchStartEvent.preventDefault();
4810
4811		data.$selecter.off("touchmove.selecter touchend.selecter");
4812
4813		_onClick(e);
4814	}
4815
4816	/**
4817	 * @method private
4818	 * @name _onClick
4819	 * @description Handles click to selected item
4820	 * @param e [object] "Event data"
4821	 */
4822	function _onClick(e) {
4823		e.preventDefault();
4824		e.stopPropagation();
4825
4826		var data = e.data;
4827
4828		if (!data.$select.is(":disabled")) {
4829			$(".selecter").not(data.$selecter).trigger("close.selecter", [data]);
4830
4831			// Handle mobile, but not Firefox, unless desktop forced
4832			if (!data.mobile && isMobile && !isFirefoxMobile) {
4833				var el = data.$select[0];
4834				if (window.document.createEvent) { // All
4835					var evt = window.document.createEvent("MouseEvents");
4836					evt.initMouseEvent("mousedown", false, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
4837					el.dispatchEvent(evt);
4838				} else if (el.fireEvent) { // IE
4839					el.fireEvent("onmousedown");
4840				}
4841			} else {
4842				// Delegate intent
4843				if (data.$selecter.hasClass("closed")) {
4844					_onOpen(e);
4845				} else if (data.$selecter.hasClass("open")) {
4846					_onClose(e);
4847				}
4848			}
4849		}
4850	}
4851
4852	/**
4853	 * @method private
4854	 * @name _onOpen
4855	 * @description Opens option set
4856	 * @param e [object] "Event data"
4857	 */
4858	function _onOpen(e) {
4859		e.preventDefault();
4860		e.stopPropagation();
4861
4862		var data = e.data;
4863
4864		// Make sure it's not alerady open
4865		if (!data.$selecter.hasClass("open")) {
4866			var offset = data.$selecter.offset(),
4867				bodyHeight = $body.outerHeight(),
4868				optionsHeight = data.$itemsWrapper.outerHeight(true),
4869				selectedOffset = (data.index >= 0) ? data.$items.eq(data.index).position() : { left: 0, top: 0 };
4870
4871			// Calculate bottom of document
4872			if (offset.top + optionsHeight > bodyHeight) {
4873				data.$selecter.addClass("bottom");
4874			}
4875
4876			data.$itemsWrapper.show();
4877
4878			// Bind Events
4879			data.$selecter.removeClass("closed")
4880						  .addClass("open");
4881			$body.on("click.selecter-" + data.guid, ":not(.selecter-options)", data, _onCloseHelper);
4882
4883			_scrollOptions(data);
4884		}
4885	}
4886
4887	/**
4888	 * @method private
4889	 * @name _onCloseHelper
4890	 * @description Determines if event target is outside instance before closing
4891	 * @param e [object] "Event data"
4892	 */
4893	function _onCloseHelper(e) {
4894		e.preventDefault();
4895		e.stopPropagation();
4896
4897		if ($(e.currentTarget).parents(".selecter").length === 0) {
4898			_onClose(e);
4899		}
4900	}
4901
4902	/**
4903	 * @method private
4904	 * @name _onClose
4905	 * @description Closes option set
4906	 * @param e [object] "Event data"
4907	 */
4908	function _onClose(e) {
4909		e.preventDefault();
4910		e.stopPropagation();
4911
4912		var data = e.data;
4913
4914		// Make sure it's actually open
4915		if (data.$selecter.hasClass("open")) {
4916			data.$itemsWrapper.hide();
4917			data.$selecter.removeClass("open bottom")
4918						  .addClass("closed");
4919
4920			$body.off(".selecter-" + data.guid);
4921		}
4922	}
4923
4924	/**
4925	 * @method private
4926	 * @name _onSelect
4927	 * @description Handles option select
4928	 * @param e [object] "Event data"
4929	 */
4930	function _onSelect(e) {
4931		e.preventDefault();
4932		e.stopPropagation();
4933
4934		var $target = $(this),
4935			data = e.data;
4936
4937		if (!data.$select.is(":disabled")) {
4938			if (data.$itemsWrapper.is(":visible")) {
4939				// Update
4940				var index = data.$items.index($target);
4941
4942				if (index !== data.index) {
4943					_update(index, data);
4944					_handleChange(data);
4945				}
4946			}
4947
4948			if (!data.multiple) {
4949				// Clean up
4950				_onClose(e);
4951			}
4952		}
4953	}
4954
4955	/**
4956	 * @method private
4957	 * @name _onChange
4958	 * @description Handles external changes
4959	 * @param e [object] "Event data"
4960	 */
4961	function _onChange(e, internal) {
4962		var $target = $(this),
4963			data = e.data;
4964
4965		if (!internal && !data.multiple) {
4966			var index = data.$options.index(data.$options.filter("[value='" + _escape($target.val()) + "']"));
4967
4968			_update(index, data);
4969			_handleChange(data);
4970		}
4971	}
4972
4973	/**
4974	 * @method private
4975	 * @name _onFocus
4976	 * @description Handles instance focus
4977	 * @param e [object] "Event data"
4978	 */
4979	function _onFocus(e) {
4980		e.preventDefault();
4981		e.stopPropagation();
4982
4983		var data = e.data;
4984
4985		if (!data.$select.is(":disabled") && !data.multiple) {
4986			data.$selecter.addClass("focus")
4987						  .on("keydown.selecter-" + data.guid, data, _onKeypress);
4988
4989			$(".selecter").not(data.$selecter)
4990						  .trigger("close.selecter", [ data ]);
4991		}
4992	}
4993
4994	/**
4995	 * @method private
4996	 * @name _onBlur
4997	 * @description Handles instance focus
4998	 * @param e [object] "Event data"
4999	 */
5000	function _onBlur(e, internal, two) {
5001		e.preventDefault();
5002		e.stopPropagation();
5003
5004		var data = e.data;
5005
5006		data.$selecter.removeClass("focus")
5007					  .off("keydown.selecter-" + data.guid);
5008
5009		$(".selecter").not(data.$selecter)
5010					  .trigger("close.selecter", [ data ]);
5011	}
5012
5013	/**
5014	 * @method private
5015	 * @name _onKeypress
5016	 * @description Handles instance keypress, once focused
5017	 * @param e [object] "Event data"
5018	 */
5019	function _onKeypress(e) {
5020		var data = e.data;
5021
5022		if (e.keyCode === 13) {
5023			if (data.$selecter.hasClass("open")) {
5024				_onClose(e);
5025				_update(data.index, data);
5026			}
5027			_handleChange(data);
5028		} else if (e.keyCode !== 9 && (!e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey)) {
5029			// Ignore modifiers & tabs
5030			e.preventDefault();
5031			e.stopPropagation();
5032
5033			var total = data.$items.length - 1,
5034				index = (data.index < 0) ? 0 : data.index;
5035
5036			// Firefox left/right support thanks to Kylemade
5037			if ($.inArray(e.keyCode, (isFirefox) ? [38, 40, 37, 39] : [38, 40]) > -1) {
5038				// Increment / decrement using the arrow keys
5039				index = index + ((e.keyCode === 38 || (isFirefox && e.keyCode === 37)) ? -1 : 1);
5040
5041				if (index < 0) {
5042					index = 0;
5043				}
5044				if (index > total) {
5045					index = total;
5046				}
5047			} else {
5048				var input = String.fromCharCode(e.keyCode).toUpperCase(),
5049					letter,
5050					i;
5051
5052				// Search for input from original index
5053				for (i = data.index + 1; i <= total; i++) {
5054					letter = data.$options.eq(i).text().charAt(0).toUpperCase();
5055					if (letter === input) {
5056						index = i;
5057						break;
5058					}
5059				}
5060
5061				// If not, start from the beginning
5062				if (index < 0 || index === data.index) {
5063					for (i = 0; i <= total; i++) {
5064						letter = data.$options.eq(i).text().charAt(0).toUpperCase();
5065						if (letter === input) {
5066							index = i;
5067							break;
5068						}
5069					}
5070				}
5071			}
5072
5073			// Update
5074			if (index >= 0) {
5075				_update(index, data);
5076				_scrollOptions(data);
5077			}
5078		}
5079	}
5080
5081	/**
5082	 * @method private
5083	 * @name _update
5084	 * @description Updates instance based on new target index
5085	 * @param index [int] "Selected option index"
5086	 * @param data [object] "instance data"
5087	 */
5088	function _update(index, data) {
5089		var $item = data.$items.eq(index),
5090			isSelected = $item.hasClass("selected"),
5091			isDisabled = $item.hasClass("disabled");
5092
5093		// Check for disabled options
5094		if (!isDisabled) {
5095			if (data.multiple) {
5096				if (isSelected) {
5097					data.$options.eq(index).prop("selected", null);
5098					$item.removeClass("selected");
5099				} else {
5100					data.$options.eq(index).prop("selected", true);
5101					$item.addClass("selected");
5102				}
5103			} else if (index > -1 && index < data.$items.length) {
5104				var newLabel = $item.html(),
5105					newValue = $item.data("value");
5106
5107				data.$selected.html(newLabel)
5108							  .removeClass('placeholder');
5109
5110				data.$items.filter(".selected")
5111						   .removeClass("selected");
5112
5113				data.$select[0].selectedIndex = index;
5114
5115				$item.addClass("selected");
5116				data.index = index;
5117			} else if (data.label !== "") {
5118				data.$selected.html(data.label);
5119			}
5120		}
5121	}
5122
5123	/**
5124	 * @method private
5125	 * @name _scrollOptions
5126	 * @description Scrolls options wrapper to specific option
5127	 * @param data [object] "Instance data"
5128	 */
5129	function _scrollOptions(data) {
5130		var $selected = data.$items.eq(data.index),
5131			selectedOffset = (data.index >= 0 && !$selected.hasClass("placeholder")) ? $selected.position() : { left: 0, top: 0 };
5132
5133		if ($.fn.scroller !== undefined) {
5134			data.$itemsWrapper.scroller("scroll", (data.$itemsWrapper.find(".scroller-content").scrollTop() + selectedOffset.top), 0)
5135							  .scroller("reset");
5136		} else {
5137			data.$itemsWrapper.scrollTop( data.$itemsWrapper.scrollTop() + selectedOffset.top );
5138		}
5139	}
5140
5141	/**
5142	 * @method private
5143	 * @name _handleChange
5144	 * @description Handles change events
5145	 * @param data [object] "Instance data"
5146	 */
5147	function _handleChange(data) {
5148		if (data.links) {
5149			_launch(data);
5150		} else {
5151			data.callback.call(data.$selecter, data.$select.val(), data.index);
5152			data.$select.trigger("change", [ true ]);
5153		}
5154	}
5155
5156	/**
5157	 * @method private
5158	 * @name _launch
5159	 * @description Launches link
5160	 * @param data [object] "Instance data"
5161	 */
5162	function _launch(data) {
5163		//var url = (isMobile) ? data.$select.val() : data.$options.filter(":selected").attr("href");
5164		var url = data.$select.val();
5165
5166		if (data.external) {
5167			// Open link in a new tab/window
5168			window.open(url);
5169		} else {
5170			// Open link in same tab/window
5171			window.location.href = url;
5172		}
5173	}
5174
5175	/**
5176	 * @method private
5177	 * @name _trim
5178	 * @description Trims text, if specified length is greater then 0
5179	 * @param length [int] "Length to trim at"
5180	 * @param text [string] "Text to trim"
5181	 * @return [string] "Trimmed string"
5182	 */
5183	function _trim(text, length) {
5184		if (length === 0) {
5185			return text;
5186		} else {
5187			if (text.length > length) {
5188				return text.substring(0, length) + "...";
5189			} else {
5190				return text;
5191			}
5192		}
5193	}
5194
5195	/**
5196	 * @method private
5197	 * @name _escape
5198	 * @description Escapes text
5199	 * @param text [string] "Text to escape"
5200	 */
5201	function _escape(text) {
5202		return (typeof text === "string") ? text.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1') : text;
5203	}
5204
5205	$.fn.selecter = function(method) {
5206		if (pub[method]) {
5207			return pub[method].apply(this, Array.prototype.slice.call(arguments, 1));
5208		} else if (typeof method === 'object' || !method) {
5209			return _init.apply(this, arguments);
5210		}
5211		return this;
5212	};
5213
5214	$.selecter = function(method) {
5215		if (method === "defaults") {
5216			pub.defaults.apply(this, Array.prototype.slice.call(arguments, 1));
5217		}
5218	};
5219})(jQuery, window);
5220;
5221/*
5222Plugin: jQuery Parallax
5223Version 1.1.3
5224Author: Ian Lunn
5225Twitter: @IanLunn
5226Author URL: http://www.ianlunn.co.uk/
5227Plugin URL: http://www.ianlunn.co.uk/plugins/jquery-parallax/
5228
5229Dual licensed under the MIT and GPL licenses:
5230http://www.opensource.org/licenses/mit-license.php
5231http://www.gnu.org/licenses/gpl.html
5232*/
5233
5234(function( $ ){
5235	var $window = $(window);
5236	var windowHeight = $window.height();
5237
5238	$window.resize(function () {
5239		windowHeight = $window.height();
5240	});
5241
5242	$.fn.parallax = function(xpos, speedFactor, outerHeight) {
5243		var $this = $(this);
5244		var getHeight;
5245		var firstTop;
5246		var paddingTop = 0;
5247		
5248		//get the starting position of each element to have parallax applied to it		
5249		$this.each(function(){
5250		    firstTop = $this.offset().top;
5251		});
5252
5253		if (outerHeight) {
5254			getHeight = function(jqo) {
5255				return jqo.outerHeight(true);
5256			};
5257		} else {
5258			getHeight = function(jqo) {
5259				return jqo.height();
5260			};
5261		}
5262			
5263		// setup defaults if arguments aren't specified
5264		if (arguments.length < 1 || xpos === null) xpos = "50%";
5265		if (arguments.length < 2 || speedFactor === null) speedFactor = 0.1;
5266		if (arguments.length < 3 || outerHeight === null) outerHeight = true;
5267		
5268		// function to be called whenever the window is scrolled or resized
5269		function update(){
5270			var pos = $window.scrollTop();				
5271
5272			$this.each(function(){
5273				var $element = $(this);
5274				var top = $element.offset().top;
5275				var height = getHeight($element);
5276
5277				// Check if totally above or totally below viewport
5278				if (top + height < pos || top > pos + windowHeight) {
5279					return;
5280				}
5281
5282				$this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px");
5283			});
5284		}		
5285
5286		$window.bind('scroll', update).resize(update);
5287		update();
5288	};
5289})(jQuery);
5290;
5291/*!
5292 * Masonry PACKAGED v4.2.2
5293 * Cascading grid layout library
5294 * https://masonry.desandro.com
5295 * MIT License
5296 * by David DeSandro
5297 */
5298
5299/**
5300 * Bridget makes jQuery widgets
5301 * v2.0.1
5302 * MIT license
5303 */
5304
5305/* jshint browser: true, strict: true, undef: true, unused: true */
5306
5307( function( window, factory ) {
5308  // universal module definition
5309  /*jshint strict: false */ /* globals define, module, require */
5310  if ( typeof define == 'function' && define.amd ) {
5311    // AMD
5312    define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {
5313      return factory( window, jQuery );
5314    });
vendor: 35,926 bytes, lines 5315-6669
5315  } else if ( typeof module == 'object' && module.exports ) {
5316    // CommonJS
5317    module.exports = factory(
5318      window,
5319      require('jquery')
5320    );
5321  } else {
5322    // browser global
5323    window.jQueryBridget = factory(
5324      window,
5325      window.jQuery
5326    );
5327  }
5328
5329}( window, function factory( window, jQuery ) {
5330'use strict';
5331
5332// ----- utils ----- //
5333
5334var arraySlice = Array.prototype.slice;
5335
5336// helper function for logging errors
5337// $.error breaks jQuery chaining
5338var console = window.console;
5339var logError = typeof console == 'undefined' ? function() {} :
5340  function( message ) {
5341    console.error( message );
5342  };
5343
5344// ----- jQueryBridget ----- //
5345
5346function jQueryBridget( namespace, PluginClass, $ ) {
5347  $ = $ || jQuery || window.jQuery;
5348  if ( !$ ) {
5349    return;
5350  }
5351
5352  // add option method -> $().plugin('option', {...})
5353  if ( !PluginClass.prototype.option ) {
5354    // option setter
5355    PluginClass.prototype.option = function( opts ) {
5356      // bail out if not an object
5357      if ( !$.isPlainObject( opts ) ){
5358        return;
5359      }
5360      this.options = $.extend( true, this.options, opts );
5361    };
5362  }
5363
5364  // make jQuery plugin
5365  $.fn[ namespace ] = function( arg0 /*, arg1 */ ) {
5366    if ( typeof arg0 == 'string' ) {
5367      // method call $().plugin( 'methodName', { options } )
5368      // shift arguments by 1
5369      var args = arraySlice.call( arguments, 1 );
5370      return methodCall( this, arg0, args );
5371    }
5372    // just $().plugin({ options })
5373    plainCall( this, arg0 );
5374    return this;
5375  };
5376
5377  // $().plugin('methodName')
5378  function methodCall( $elems, methodName, args ) {
5379    var returnValue;
5380    var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';
5381
5382    $elems.each( function( i, elem ) {
5383      // get instance
5384      var instance = $.data( elem, namespace );
5385      if ( !instance ) {
5386        logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
5387          pluginMethodStr );
5388        return;
5389      }
5390
5391      var method = instance[ methodName ];
5392      if ( !method || methodName.charAt(0) == '_' ) {
5393        logError( pluginMethodStr + ' is not a valid method' );
5394        return;
5395      }
5396
5397      // apply method, get return value
5398      var value = method.apply( instance, args );
5399      // set return value if value is returned, use only first value
5400      returnValue = returnValue === undefined ? value : returnValue;
5401    });
5402
5403    return returnValue !== undefined ? returnValue : $elems;
5404  }
5405
5406  function plainCall( $elems, options ) {
5407    $elems.each( function( i, elem ) {
5408      var instance = $.data( elem, namespace );
5409      if ( instance ) {
5410        // set options & init
5411        instance.option( options );
5412        instance._init();
5413      } else {
5414        // initialize new instance
5415        instance = new PluginClass( elem, options );
5416        $.data( elem, namespace, instance );
5417      }
5418    });
5419  }
5420
5421  updateJQuery( $ );
5422
5423}
5424
5425// ----- updateJQuery ----- //
5426
5427// set $.bridget for v1 backwards compatibility
5428function updateJQuery( $ ) {
5429  if ( !$ || ( $ && $.bridget ) ) {
5430    return;
5431  }
5432  $.bridget = jQueryBridget;
5433}
5434
5435updateJQuery( jQuery || window.jQuery );
5436
5437// -----  ----- //
5438
5439return jQueryBridget;
5440
5441}));
5442
5443/**
5444 * EvEmitter v1.1.0
5445 * Lil' event emitter
5446 * MIT License
5447 */
5448
5449/* jshint unused: true, undef: true, strict: true */
5450
5451( function( global, factory ) {
5452  // universal module definition
5453  /* jshint strict: false */ /* globals define, module, window */
5454  if ( typeof define == 'function' && define.amd ) {
5455    // AMD - RequireJS
5456    define( 'ev-emitter/ev-emitter',factory );
5457  } else if ( typeof module == 'object' && module.exports ) {
5458    // CommonJS - Browserify, Webpack
5459    module.exports = factory();
5460  } else {
5461    // Browser globals
5462    global.EvEmitter = factory();
5463  }
5464
5465}( typeof window != 'undefined' ? window : this, function() {
5466
5467
5468
5469function EvEmitter() {}
5470
5471var proto = EvEmitter.prototype;
5472
5473proto.on = function( eventName, listener ) {
5474  if ( !eventName || !listener ) {
5475    return;
5476  }
5477  // set events hash
5478  var events = this._events = this._events || {};
5479  // set listeners array
5480  var listeners = events[ eventName ] = events[ eventName ] || [];
5481  // only add once
5482  if ( listeners.indexOf( listener ) == -1 ) {
5483    listeners.push( listener );
5484  }
5485
5486  return this;
5487};
5488
5489proto.once = function( eventName, listener ) {
5490  if ( !eventName || !listener ) {
5491    return;
5492  }
5493  // add event
5494  this.on( eventName, listener );
5495  // set once flag
5496  // set onceEvents hash
5497  var onceEvents = this._onceEvents = this._onceEvents || {};
5498  // set onceListeners object
5499  var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
5500  // set flag
5501  onceListeners[ listener ] = true;
5502
5503  return this;
5504};
5505
5506proto.off = function( eventName, listener ) {
5507  var listeners = this._events && this._events[ eventName ];
5508  if ( !listeners || !listeners.length ) {
5509    return;
5510  }
5511  var index = listeners.indexOf( listener );
5512  if ( index != -1 ) {
5513    listeners.splice( index, 1 );
5514  }
5515
5516  return this;
5517};
5518
5519proto.emitEvent = function( eventName, args ) {
5520  var listeners = this._events && this._events[ eventName ];
5521  if ( !listeners || !listeners.length ) {
5522    return;
5523  }
5524  // copy over to avoid interference if .off() in listener
5525  listeners = listeners.slice(0);
5526  args = args || [];
5527  // once stuff
5528  var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
5529
5530  for ( var i=0; i < listeners.length; i++ ) {
5531    var listener = listeners[i]
5532    var isOnce = onceListeners && onceListeners[ listener ];
5533    if ( isOnce ) {
5534      // remove listener
5535      // remove before trigger to prevent recursion
5536      this.off( eventName, listener );
5537      // unset once flag
5538      delete onceListeners[ listener ];
5539    }
5540    // trigger listener
5541    listener.apply( this, args );
5542  }
5543
5544  return this;
5545};
5546
5547proto.allOff = function() {
5548  delete this._events;
5549  delete this._onceEvents;
5550};
5551
5552return EvEmitter;
5553
5554}));
5555
5556/*!
5557 * getSize v2.0.3
5558 * measure size of elements
5559 * MIT license
5560 */
5561
5562/* jshint browser: true, strict: true, undef: true, unused: true */
5563/* globals console: false */
5564
5565( function( window, factory ) {
5566  /* jshint strict: false */ /* globals define, module */
5567  if ( typeof define == 'function' && define.amd ) {
5568    // AMD
5569    define( 'get-size/get-size',factory );
5570  } else if ( typeof module == 'object' && module.exports ) {
5571    // CommonJS
5572    module.exports = factory();
5573  } else {
5574    // browser global
5575    window.getSize = factory();
5576  }
5577
5578})( window, function factory() {
5579'use strict';
5580
5581// -------------------------- helpers -------------------------- //
5582
5583// get a number from a string, not a percentage
5584function getStyleSize( value ) {
5585  var num = parseFloat( value );
5586  // not a percent like '100%', and a number
5587  var isValid = value.indexOf('%') == -1 && !isNaN( num );
5588  return isValid && num;
5589}
5590
5591function noop() {}
5592
5593var logError = typeof console == 'undefined' ? noop :
5594  function( message ) {
5595    console.error( message );
5596  };
5597
5598// -------------------------- measurements -------------------------- //
5599
5600var measurements = [
5601  'paddingLeft',
5602  'paddingRight',
5603  'paddingTop',
5604  'paddingBottom',
5605  'marginLeft',
5606  'marginRight',
5607  'marginTop',
5608  'marginBottom',
5609  'borderLeftWidth',
5610  'borderRightWidth',
5611  'borderTopWidth',
5612  'borderBottomWidth'
5613];
5614
5615var measurementsLength = measurements.length;
5616
5617function getZeroSize() {
5618  var size = {
5619    width: 0,
5620    height: 0,
5621    innerWidth: 0,
5622    innerHeight: 0,
5623    outerWidth: 0,
5624    outerHeight: 0
5625  };
5626  for ( var i=0; i < measurementsLength; i++ ) {
5627    var measurement = measurements[i];
5628    size[ measurement ] = 0;
5629  }
5630  return size;
5631}
5632
5633// -------------------------- getStyle -------------------------- //
5634
5635/**
5636 * getStyle, get style of element, check for Firefox bug
5637 * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
5638 */
5639function getStyle( elem ) {
5640  var style = getComputedStyle( elem );
5641  if ( !style ) {
5642    logError( 'Style returned ' + style +
5643      '. Are you running this code in a hidden iframe on Firefox? ' +
5644      'See https://bit.ly/getsizebug1' );
5645  }
5646  return style;
5647}
5648
5649// -------------------------- setup -------------------------- //
5650
5651var isSetup = false;
5652
5653var isBoxSizeOuter;
5654
5655/**
5656 * setup
5657 * check isBoxSizerOuter
5658 * do on first getSize() rather than on page load for Firefox bug
5659 */
5660function setup() {
5661  // setup once
5662  if ( isSetup ) {
5663    return;
5664  }
5665  isSetup = true;
5666
5667  // -------------------------- box sizing -------------------------- //
5668
5669  /**
5670   * Chrome & Safari measure the outer-width on style.width on border-box elems
5671   * IE11 & Firefox<29 measures the inner-width
5672   */
5673  var div = document.createElement('div');
5674  div.style.width = '200px';
5675  div.style.padding = '1px 2px 3px 4px';
5676  div.style.borderStyle = 'solid';
5677  div.style.borderWidth = '1px 2px 3px 4px';
5678  div.style.boxSizing = 'border-box';
5679
5680  var body = document.body || document.documentElement;
5681  body.appendChild( div );
5682  var style = getStyle( div );
5683  // round value for browser zoom. desandro/masonry#928
5684  isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
5685  getSize.isBoxSizeOuter = isBoxSizeOuter;
5686
5687  body.removeChild( div );
5688}
5689
5690// -------------------------- getSize -------------------------- //
5691
5692function getSize( elem ) {
5693  setup();
5694
5695  // use querySeletor if elem is string
5696  if ( typeof elem == 'string' ) {
5697    elem = document.querySelector( elem );
5698  }
5699
5700  // do not proceed on non-objects
5701  if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
5702    return;
5703  }
5704
5705  var style = getStyle( elem );
5706
5707  // if hidden, everything is 0
5708  if ( style.display == 'none' ) {
5709    return getZeroSize();
5710  }
5711
5712  var size = {};
5713  size.width = elem.offsetWidth;
5714  size.height = elem.offsetHeight;
5715
5716  var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
5717
5718  // get all measurements
5719  for ( var i=0; i < measurementsLength; i++ ) {
5720    var measurement = measurements[i];
5721    var value = style[ measurement ];
5722    var num = parseFloat( value );
5723    // any 'auto', 'medium' value will be 0
5724    size[ measurement ] = !isNaN( num ) ? num : 0;
5725  }
5726
5727  var paddingWidth = size.paddingLeft + size.paddingRight;
5728  var paddingHeight = size.paddingTop + size.paddingBottom;
5729  var marginWidth = size.marginLeft + size.marginRight;
5730  var marginHeight = size.marginTop + size.marginBottom;
5731  var borderWidth = size.borderLeftWidth + size.borderRightWidth;
5732  var borderHeight = size.borderTopWidth + size.borderBottomWidth;
5733
5734  var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
5735
5736  // overwrite width and height if we can get it from style
5737  var styleWidth = getStyleSize( style.width );
5738  if ( styleWidth !== false ) {
5739    size.width = styleWidth +
5740      // add padding and border unless it's already including it
5741      ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
5742  }
5743
5744  var styleHeight = getStyleSize( style.height );
5745  if ( styleHeight !== false ) {
5746    size.height = styleHeight +
5747      // add padding and border unless it's already including it
5748      ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
5749  }
5750
5751  size.innerWidth = size.width - ( paddingWidth + borderWidth );
5752  size.innerHeight = size.height - ( paddingHeight + borderHeight );
5753
5754  size.outerWidth = size.width + marginWidth;
5755  size.outerHeight = size.height + marginHeight;
5756
5757  return size;
5758}
5759
5760return getSize;
5761
5762});
5763
5764/**
5765 * matchesSelector v2.0.2
5766 * matchesSelector( element, '.selector' )
5767 * MIT license
5768 */
5769
5770/*jshint browser: true, strict: true, undef: true, unused: true */
5771
5772( function( window, factory ) {
5773  /*global define: false, module: false */
5774  'use strict';
5775  // universal module definition
5776  if ( typeof define == 'function' && define.amd ) {
5777    // AMD
5778    define( 'desandro-matches-selector/matches-selector',factory );
5779  } else if ( typeof module == 'object' && module.exports ) {
5780    // CommonJS
5781    module.exports = factory();
5782  } else {
5783    // browser global
5784    window.matchesSelector = factory();
5785  }
5786
5787}( window, function factory() {
5788  'use strict';
5789
5790  var matchesMethod = ( function() {
5791    var ElemProto = window.Element.prototype;
5792    // check for the standard method name first
5793    if ( ElemProto.matches ) {
5794      return 'matches';
5795    }
5796    // check un-prefixed
5797    if ( ElemProto.matchesSelector ) {
5798      return 'matchesSelector';
5799    }
5800    // check vendor prefixes
5801    var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
5802
5803    for ( var i=0; i < prefixes.length; i++ ) {
5804      var prefix = prefixes[i];
5805      var method = prefix + 'MatchesSelector';
5806      if ( ElemProto[ method ] ) {
5807        return method;
5808      }
5809    }
5810  })();
5811
5812  return function matchesSelector( elem, selector ) {
5813    return elem[ matchesMethod ]( selector );
5814  };
5815
5816}));
5817
5818/**
5819 * Fizzy UI utils v2.0.7
5820 * MIT license
5821 */
5822
5823/*jshint browser: true, undef: true, unused: true, strict: true */
5824
5825( function( window, factory ) {
5826  // universal module definition
5827  /*jshint strict: false */ /*globals define, module, require */
5828
5829  if ( typeof define == 'function' && define.amd ) {
5830    // AMD
5831    define( 'fizzy-ui-utils/utils',[
5832      'desandro-matches-selector/matches-selector'
5833    ], function( matchesSelector ) {
5834      return factory( window, matchesSelector );
5835    });
5836  } else if ( typeof module == 'object' && module.exports ) {
5837    // CommonJS
5838    module.exports = factory(
5839      window,
5840      require('desandro-matches-selector')
5841    );
5842  } else {
5843    // browser global
5844    window.fizzyUIUtils = factory(
5845      window,
5846      window.matchesSelector
5847    );
5848  }
5849
5850}( window, function factory( window, matchesSelector ) {
5851
5852
5853
5854var utils = {};
5855
5856// ----- extend ----- //
5857
5858// extends objects
5859utils.extend = function( a, b ) {
5860  for ( var prop in b ) {
5861    a[ prop ] = b[ prop ];
5862  }
5863  return a;
5864};
5865
5866// ----- modulo ----- //
5867
5868utils.modulo = function( num, div ) {
5869  return ( ( num % div ) + div ) % div;
5870};
5871
5872// ----- makeArray ----- //
5873
5874var arraySlice = Array.prototype.slice;
5875
5876// turn element or nodeList into an array
5877utils.makeArray = function( obj ) {
5878  if ( Array.isArray( obj ) ) {
5879    // use object if already an array
5880    return obj;
5881  }
5882  // return empty array if undefined or null. #6
5883  if ( obj === null || obj === undefined ) {
5884    return [];
5885  }
5886
5887  var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
5888  if ( isArrayLike ) {
5889    // convert nodeList to array
5890    return arraySlice.call( obj );
5891  }
5892
5893  // array of single index
5894  return [ obj ];
5895};
5896
5897// ----- removeFrom ----- //
5898
5899utils.removeFrom = function( ary, obj ) {
5900  var index = ary.indexOf( obj );
5901  if ( index != -1 ) {
5902    ary.splice( index, 1 );
5903  }
5904};
5905
5906// ----- getParent ----- //
5907
5908utils.getParent = function( elem, selector ) {
5909  while ( elem.parentNode && elem != document.body ) {
5910    elem = elem.parentNode;
5911    if ( matchesSelector( elem, selector ) ) {
5912      return elem;
5913    }
5914  }
5915};
5916
5917// ----- getQueryElement ----- //
5918
5919// use element as selector string
5920utils.getQueryElement = function( elem ) {
5921  if ( typeof elem == 'string' ) {
5922    return document.querySelector( elem );
5923  }
5924  return elem;
5925};
5926
5927// ----- handleEvent ----- //
5928
5929// enable .ontype to trigger from .addEventListener( elem, 'type' )
5930utils.handleEvent = function( event ) {
5931  var method = 'on' + event.type;
5932  if ( this[ method ] ) {
5933    this[ method ]( event );
5934  }
5935};
5936
5937// ----- filterFindElements ----- //
5938
5939utils.filterFindElements = function( elems, selector ) {
5940  // make array of elems
5941  elems = utils.makeArray( elems );
5942  var ffElems = [];
5943
5944  elems.forEach( function( elem ) {
5945    // check that elem is an actual element
5946    if ( !( elem instanceof HTMLElement ) ) {
5947      return;
5948    }
5949    // add elem if no selector
5950    if ( !selector ) {
5951      ffElems.push( elem );
5952      return;
5953    }
5954    // filter & find items if we have a selector
5955    // filter
5956    if ( matchesSelector( elem, selector ) ) {
5957      ffElems.push( elem );
5958    }
5959    // find children
5960    var childElems = elem.querySelectorAll( selector );
5961    // concat childElems to filterFound array
5962    for ( var i=0; i < childElems.length; i++ ) {
5963      ffElems.push( childElems[i] );
5964    }
5965  });
5966
5967  return ffElems;
5968};
5969
5970// ----- debounceMethod ----- //
5971
5972utils.debounceMethod = function( _class, methodName, threshold ) {
5973  threshold = threshold || 100;
5974  // original method
5975  var method = _class.prototype[ methodName ];
5976  var timeoutName = methodName + 'Timeout';
5977
5978  _class.prototype[ methodName ] = function() {
5979    var timeout = this[ timeoutName ];
5980    clearTimeout( timeout );
5981
5982    var args = arguments;
5983    var _this = this;
5984    this[ timeoutName ] = setTimeout( function() {
5985      method.apply( _this, args );
5986      delete _this[ timeoutName ];
5987    }, threshold );
5988  };
5989};
5990
5991// ----- docReady ----- //
5992
5993utils.docReady = function( callback ) {
5994  var readyState = document.readyState;
5995  if ( readyState == 'complete' || readyState == 'interactive' ) {
5996    // do async to allow for other scripts to run. metafizzy/flickity#441
5997    setTimeout( callback );
5998  } else {
5999    document.addEventListener( 'DOMContentLoaded', callback );
6000  }
6001};
6002
6003// ----- htmlInit ----- //
6004
6005// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
6006utils.toDashed = function( str ) {
6007  return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
6008    return $1 + '-' + $2;
6009  }).toLowerCase();
6010};
6011
6012var console = window.console;
6013/**
6014 * allow user to initialize classes via [data-namespace] or .js-namespace class
6015 * htmlInit( Widget, 'widgetName' )
6016 * options are parsed from data-namespace-options
6017 */
6018utils.htmlInit = function( WidgetClass, namespace ) {
6019  utils.docReady( function() {
6020    var dashedNamespace = utils.toDashed( namespace );
6021    var dataAttr = 'data-' + dashedNamespace;
6022    var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
6023    var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
6024    var elems = utils.makeArray( dataAttrElems )
6025      .concat( utils.makeArray( jsDashElems ) );
6026    var dataOptionsAttr = dataAttr + '-options';
6027    var jQuery = window.jQuery;
6028
6029    elems.forEach( function( elem ) {
6030      var attr = elem.getAttribute( dataAttr ) ||
6031        elem.getAttribute( dataOptionsAttr );
6032      var options;
6033      try {
6034        options = attr && JSON.parse( attr );
6035      } catch ( error ) {
6036        // log error, do not initialize
6037        if ( console ) {
6038          console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
6039          ': ' + error );
6040        }
6041        return;
6042      }
6043      // initialize
6044      var instance = new WidgetClass( elem, options );
6045      // make available via $().data('namespace')
6046      if ( jQuery ) {
6047        jQuery.data( elem, namespace, instance );
6048      }
6049    });
6050
6051  });
6052};
6053
6054// -----  ----- //
6055
6056return utils;
6057
6058}));
6059
6060/**
6061 * Outlayer Item
6062 */
6063
6064( function( window, factory ) {
6065  // universal module definition
6066  /* jshint strict: false */ /* globals define, module, require */
6067  if ( typeof define == 'function' && define.amd ) {
6068    // AMD - RequireJS
6069    define( 'outlayer/item',[
6070        'ev-emitter/ev-emitter',
6071        'get-size/get-size'
6072      ],
6073      factory
6074    );
6075  } else if ( typeof module == 'object' && module.exports ) {
6076    // CommonJS - Browserify, Webpack
6077    module.exports = factory(
6078      require('ev-emitter'),
6079      require('get-size')
6080    );
6081  } else {
6082    // browser global
6083    window.Outlayer = {};
6084    window.Outlayer.Item = factory(
6085      window.EvEmitter,
6086      window.getSize
6087    );
6088  }
6089
6090}( window, function factory( EvEmitter, getSize ) {
6091'use strict';
6092
6093// ----- helpers ----- //
6094
6095function isEmptyObj( obj ) {
6096  for ( var prop in obj ) {
6097    return false;
6098  }
6099  prop = null;
6100  return true;
6101}
6102
6103// -------------------------- CSS3 support -------------------------- //
6104
6105
6106var docElemStyle = document.documentElement.style;
6107
6108var transitionProperty = typeof docElemStyle.transition == 'string' ?
6109  'transition' : 'WebkitTransition';
6110var transformProperty = typeof docElemStyle.transform == 'string' ?
6111  'transform' : 'WebkitTransform';
6112
6113var transitionEndEvent = {
6114  WebkitTransition: 'webkitTransitionEnd',
6115  transition: 'transitionend'
6116}[ transitionProperty ];
6117
6118// cache all vendor properties that could have vendor prefix
6119var vendorProperties = {
6120  transform: transformProperty,
6121  transition: transitionProperty,
6122  transitionDuration: transitionProperty + 'Duration',
6123  transitionProperty: transitionProperty + 'Property',
6124  transitionDelay: transitionProperty + 'Delay'
6125};
6126
6127// -------------------------- Item -------------------------- //
6128
6129function Item( element, layout ) {
6130  if ( !element ) {
6131    return;
6132  }
6133
6134  this.element = element;
6135  // parent layout class, i.e. Masonry, Isotope, or Packery
6136  this.layout = layout;
6137  this.position = {
6138    x: 0,
6139    y: 0
6140  };
6141
6142  this._create();
6143}
6144
6145// inherit EvEmitter
6146var proto = Item.prototype = Object.create( EvEmitter.prototype );
6147proto.constructor = Item;
6148
6149proto._create = function() {
6150  // transition objects
6151  this._transn = {
6152    ingProperties: {},
6153    clean: {},
6154    onEnd: {}
6155  };
6156
6157  this.css({
6158    position: 'absolute'
6159  });
6160};
6161
6162// trigger specified handler for event type
6163proto.handleEvent = function( event ) {
6164  var method = 'on' + event.type;
6165  if ( this[ method ] ) {
6166    this[ method ]( event );
6167  }
6168};
6169
6170proto.getSize = function() {
6171  this.size = getSize( this.element );
6172};
6173
6174/**
6175 * apply CSS styles to element
6176 * @param {Object} style
6177 */
6178proto.css = function( style ) {
6179  var elemStyle = this.element.style;
6180
6181  for ( var prop in style ) {
6182    // use vendor property if available
6183    var supportedProp = vendorProperties[ prop ] || prop;
6184    elemStyle[ supportedProp ] = style[ prop ];
6185  }
6186};
6187
6188 // measure position, and sets it
6189proto.getPosition = function() {
6190  var style = getComputedStyle( this.element );
6191  var isOriginLeft = this.layout._getOption('originLeft');
6192  var isOriginTop = this.layout._getOption('originTop');
6193  var xValue = style[ isOriginLeft ? 'left' : 'right' ];
6194  var yValue = style[ isOriginTop ? 'top' : 'bottom' ];
6195  var x = parseFloat( xValue );
6196  var y = parseFloat( yValue );
6197  // convert percent to pixels
6198  var layoutSize = this.layout.size;
6199  if ( xValue.indexOf('%') != -1 ) {
6200    x = ( x / 100 ) * layoutSize.width;
6201  }
6202  if ( yValue.indexOf('%') != -1 ) {
6203    y = ( y / 100 ) * layoutSize.height;
6204  }
6205  // clean up 'auto' or other non-integer values
6206  x = isNaN( x ) ? 0 : x;
6207  y = isNaN( y ) ? 0 : y;
6208  // remove padding from measurement
6209  x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
6210  y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
6211
6212  this.position.x = x;
6213  this.position.y = y;
6214};
6215
6216// set settled position, apply padding
6217proto.layoutPosition = function() {
6218  var layoutSize = this.layout.size;
6219  var style = {};
6220  var isOriginLeft = this.layout._getOption('originLeft');
6221  var isOriginTop = this.layout._getOption('originTop');
6222
6223  // x
6224  var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';
6225  var xProperty = isOriginLeft ? 'left' : 'right';
6226  var xResetProperty = isOriginLeft ? 'right' : 'left';
6227
6228  var x = this.position.x + layoutSize[ xPadding ];
6229  // set in percentage or pixels
6230  style[ xProperty ] = this.getXValue( x );
6231  // reset other property
6232  style[ xResetProperty ] = '';
6233
6234  // y
6235  var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';
6236  var yProperty = isOriginTop ? 'top' : 'bottom';
6237  var yResetProperty = isOriginTop ? 'bottom' : 'top';
6238
6239  var y = this.position.y + layoutSize[ yPadding ];
6240  // set in percentage or pixels
6241  style[ yProperty ] = this.getYValue( y );
6242  // reset other property
6243  style[ yResetProperty ] = '';
6244
6245  this.css( style );
6246  this.emitEvent( 'layout', [ this ] );
6247};
6248
6249proto.getXValue = function( x ) {
6250  var isHorizontal = this.layout._getOption('horizontal');
6251  return this.layout.options.percentPosition && !isHorizontal ?
6252    ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';
6253};
6254
6255proto.getYValue = function( y ) {
6256  var isHorizontal = this.layout._getOption('horizontal');
6257  return this.layout.options.percentPosition && isHorizontal ?
6258    ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';
6259};
6260
6261proto._transitionTo = function( x, y ) {
6262  this.getPosition();
6263  // get current x & y from top/left
6264  var curX = this.position.x;
6265  var curY = this.position.y;
6266
6267  var didNotMove = x == this.position.x && y == this.position.y;
6268
6269  // save end position
6270  this.setPosition( x, y );
6271
6272  // if did not move and not transitioning, just go to layout
6273  if ( didNotMove && !this.isTransitioning ) {
6274    this.layoutPosition();
6275    return;
6276  }
6277
6278  var transX = x - curX;
6279  var transY = y - curY;
6280  var transitionStyle = {};
6281  transitionStyle.transform = this.getTranslate( transX, transY );
6282
6283  this.transition({
6284    to: transitionStyle,
6285    onTransitionEnd: {
6286      transform: this.layoutPosition
6287    },
6288    isCleaning: true
6289  });
6290};
6291
6292proto.getTranslate = function( x, y ) {
6293  // flip cooridinates if origin on right or bottom
6294  var isOriginLeft = this.layout._getOption('originLeft');
6295  var isOriginTop = this.layout._getOption('originTop');
6296  x = isOriginLeft ? x : -x;
6297  y = isOriginTop ? y : -y;
6298  return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
6299};
6300
6301// non transition + transform support
6302proto.goTo = function( x, y ) {
6303  this.setPosition( x, y );
6304  this.layoutPosition();
6305};
6306
6307proto.moveTo = proto._transitionTo;
6308
6309proto.setPosition = function( x, y ) {
6310  this.position.x = parseFloat( x );
6311  this.position.y = parseFloat( y );
6312};
6313
6314// ----- transition ----- //
6315
6316/**
6317 * @param {Object} style - CSS
6318 * @param {Function} onTransitionEnd
6319 */
6320
6321// non transition, just trigger callback
6322proto._nonTransition = function( args ) {
6323  this.css( args.to );
6324  if ( args.isCleaning ) {
6325    this._removeStyles( args.to );
6326  }
6327  for ( var prop in args.onTransitionEnd ) {
6328    args.onTransitionEnd[ prop ].call( this );
6329  }
6330};
6331
6332/**
6333 * proper transition
6334 * @param {Object} args - arguments
6335 *   @param {Object} to - style to transition to
6336 *   @param {Object} from - style to start transition from
6337 *   @param {Boolean} isCleaning - removes transition styles after transition
6338 *   @param {Function} onTransitionEnd - callback
6339 */
6340proto.transition = function( args ) {
6341  // redirect to nonTransition if no transition duration
6342  if ( !parseFloat( this.layout.options.transitionDuration ) ) {
6343    this._nonTransition( args );
6344    return;
6345  }
6346
6347  var _transition = this._transn;
6348  // keep track of onTransitionEnd callback by css property
6349  for ( var prop in args.onTransitionEnd ) {
6350    _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
6351  }
6352  // keep track of properties that are transitioning
6353  for ( prop in args.to ) {
6354    _transition.ingProperties[ prop ] = true;
6355    // keep track of properties to clean up when transition is done
6356    if ( args.isCleaning ) {
6357      _transition.clean[ prop ] = true;
6358    }
6359  }
6360
6361  // set from styles
6362  if ( args.from ) {
6363    this.css( args.from );
6364    // force redraw. http://blog.alexmaccaw.com/css-transitions
6365    var h = this.element.offsetHeight;
6366    // hack for JSHint to hush about unused var
6367    h = null;
6368  }
6369  // enable transition
6370  this.enableTransition( args.to );
6371  // set styles that are transitioning
6372  this.css( args.to );
6373
6374  this.isTransitioning = true;
6375
6376};
6377
6378// dash before all cap letters, including first for
6379// WebkitTransform => -webkit-transform
6380function toDashedAll( str ) {
6381  return str.replace( /([A-Z])/g, function( $1 ) {
6382    return '-' + $1.toLowerCase();
6383  });
6384}
6385
6386var transitionProps = 'opacity,' + toDashedAll( transformProperty );
6387
6388proto.enableTransition = function(/* style */) {
6389  // HACK changing transitionProperty during a transition
6390  // will cause transition to jump
6391  if ( this.isTransitioning ) {
6392    return;
6393  }
6394
6395  // make `transition: foo, bar, baz` from style object
6396  // HACK un-comment this when enableTransition can work
6397  // while a transition is happening
6398  // var transitionValues = [];
6399  // for ( var prop in style ) {
6400  //   // dash-ify camelCased properties like WebkitTransition
6401  //   prop = vendorProperties[ prop ] || prop;
6402  //   transitionValues.push( toDashedAll( prop ) );
6403  // }
6404  // munge number to millisecond, to match stagger
6405  var duration = this.layout.options.transitionDuration;
6406  duration = typeof duration == 'number' ? duration + 'ms' : duration;
6407  // enable transition styles
6408  this.css({
6409    transitionProperty: transitionProps,
6410    transitionDuration: duration,
6411    transitionDelay: this.staggerDelay || 0
6412  });
6413  // listen for transition end event
6414  this.element.addEventListener( transitionEndEvent, this, false );
6415};
6416
6417// ----- events ----- //
6418
6419proto.onwebkitTransitionEnd = function( event ) {
6420  this.ontransitionend( event );
6421};
6422
6423proto.onotransitionend = function( event ) {
6424  this.ontransitionend( event );
6425};
6426
6427// properties that I munge to make my life easier
6428var dashedVendorProperties = {
6429  '-webkit-transform': 'transform'
6430};
6431
6432proto.ontransitionend = function( event ) {
6433  // disregard bubbled events from children
6434  if ( event.target !== this.element ) {
6435    return;
6436  }
6437  var _transition = this._transn;
6438  // get property name of transitioned property, convert to prefix-free
6439  var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
6440
6441  // remove property that has completed transitioning
6442  delete _transition.ingProperties[ propertyName ];
6443  // check if any properties are still transitioning
6444  if ( isEmptyObj( _transition.ingProperties ) ) {
6445    // all properties have completed transitioning
6446    this.disableTransition();
6447  }
6448  // clean style
6449  if ( propertyName in _transition.clean ) {
6450    // clean up style
6451    this.element.style[ event.propertyName ] = '';
6452    delete _transition.clean[ propertyName ];
6453  }
6454  // trigger onTransitionEnd callback
6455  if ( propertyName in _transition.onEnd ) {
6456    var onTransitionEnd = _transition.onEnd[ propertyName ];
6457    onTransitionEnd.call( this );
6458    delete _transition.onEnd[ propertyName ];
6459  }
6460
6461  this.emitEvent( 'transitionEnd', [ this ] );
6462};
6463
6464proto.disableTransition = function() {
6465  this.removeTransitionStyles();
6466  this.element.removeEventListener( transitionEndEvent, this, false );
6467  this.isTransitioning = false;
6468};
6469
6470/**
6471 * removes style property from element
6472 * @param {Object} style
6473**/
6474proto._removeStyles = function( style ) {
6475  // clean up transition styles
6476  var cleanStyle = {};
6477  for ( var prop in style ) {
6478    cleanStyle[ prop ] = '';
6479  }
6480  this.css( cleanStyle );
6481};
6482
6483var cleanTransitionStyle = {
6484  transitionProperty: '',
6485  transitionDuration: '',
6486  transitionDelay: ''
6487};
6488
6489proto.removeTransitionStyles = function() {
6490  // remove transition
6491  this.css( cleanTransitionStyle );
6492};
6493
6494// ----- stagger ----- //
6495
6496proto.stagger = function( delay ) {
6497  delay = isNaN( delay ) ? 0 : delay;
6498  this.staggerDelay = delay + 'ms';
6499};
6500
6501// ----- show/hide/remove ----- //
6502
6503// remove element from DOM
6504proto.removeElem = function() {
6505  this.element.parentNode.removeChild( this.element );
6506  // remove display: none
6507  this.css({ display: '' });
6508  this.emitEvent( 'remove', [ this ] );
6509};
6510
6511proto.remove = function() {
6512  // just remove element if no transition support or no transition
6513  if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
6514    this.removeElem();
6515    return;
6516  }
6517
6518  // start transition
6519  this.once( 'transitionEnd', function() {
6520    this.removeElem();
6521  });
6522  this.hide();
6523};
6524
6525proto.reveal = function() {
6526  delete this.isHidden;
6527  // remove display: none
6528  this.css({ display: '' });
6529
6530  var options = this.layout.options;
6531
6532  var onTransitionEnd = {};
6533  var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');
6534  onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;
6535
6536  this.transition({
6537    from: options.hiddenStyle,
6538    to: options.visibleStyle,
6539    isCleaning: true,
6540    onTransitionEnd: onTransitionEnd
6541  });
6542};
6543
6544proto.onRevealTransitionEnd = function() {
6545  // check if still visible
6546  // during transition, item may have been hidden
6547  if ( !this.isHidden ) {
6548    this.emitEvent('reveal');
6549  }
6550};
6551
6552/**
6553 * get style property use for hide/reveal transition end
6554 * @param {String} styleProperty - hiddenStyle/visibleStyle
6555 * @returns {String}
6556 */
6557proto.getHideRevealTransitionEndProperty = function( styleProperty ) {
6558  var optionStyle = this.layout.options[ styleProperty ];
6559  // use opacity
6560  if ( optionStyle.opacity ) {
6561    return 'opacity';
6562  }
6563  // get first property
6564  for ( var prop in optionStyle ) {
6565    return prop;
6566  }
6567};
6568
6569proto.hide = function() {
6570  // set flag
6571  this.isHidden = true;
6572  // remove display: none
6573  this.css({ display: '' });
6574
6575  var options = this.layout.options;
6576
6577  var onTransitionEnd = {};
6578  var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');
6579  onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;
6580
6581  this.transition({
6582    from: options.visibleStyle,
6583    to: options.hiddenStyle,
6584    // keep hidden stuff hidden
6585    isCleaning: true,
6586    onTransitionEnd: onTransitionEnd
6587  });
6588};
6589
6590proto.onHideTransitionEnd = function() {
6591  // check if still hidden
6592  // during transition, item may have been un-hidden
6593  if ( this.isHidden ) {
6594    this.css({ display: 'none' });
6595    this.emitEvent('hide');
6596  }
6597};
6598
6599proto.destroy = function() {
6600  this.css({
6601    position: '',
6602    left: '',
6603    right: '',
6604    top: '',
6605    bottom: '',
6606    transition: '',
6607    transform: ''
6608  });
6609};
6610
6611return Item;
6612
6613}));
6614
6615/*!
6616 * Outlayer v2.1.1
6617 * the brains and guts of a layout library
6618 * MIT license
6619 */
6620
6621( function( window, factory ) {
6622  'use strict';
6623  // universal module definition
6624  /* jshint strict: false */ /* globals define, module, require */
6625  if ( typeof define == 'function' && define.amd ) {
6626    // AMD - RequireJS
6627    define( 'outlayer/outlayer',[
6628        'ev-emitter/ev-emitter',
6629        'get-size/get-size',
6630        'fizzy-ui-utils/utils',
6631        './item'
6632      ],
6633      function( EvEmitter, getSize, utils, Item ) {
6634        return factory( window, EvEmitter, getSize, utils, Item);
6635      }
6636    );
6637  } else if ( typeof module == 'object' && module.exports ) {
6638    // CommonJS - Browserify, Webpack
6639    module.exports = factory(
6640      window,
6641      require('ev-emitter'),
6642      require('get-size'),
6643      require('fizzy-ui-utils'),
6644      require('./item')
6645    );
6646  } else {
6647    // browser global
6648    window.Outlayer = factory(
6649      window,
6650      window.EvEmitter,
6651      window.getSize,
6652      window.fizzyUIUtils,
6653      window.Outlayer.Item
6654    );
6655  }
6656
6657}( window, function factory( window, EvEmitter, getSize, utils, Item ) {
6658'use strict';
6659
6660// ----- vars ----- //
6661
6662var console = window.console;
6663var jQuery = window.jQuery;
6664var noop = function() {};
6665
6666// -------------------------- Outlayer -------------------------- //
6667
6668// globally unique identifiers
6669var GUID = 0;
vendor: 18,646 bytes, lines 6670-7427
6670// internal store of all Outlayer intances
6671var instances = {};
6672
6673
6674/**
6675 * @param {Element, String} element
6676 * @param {Object} options
6677 * @constructor
6678 */
6679function Outlayer( element, options ) {
6680  var queryElement = utils.getQueryElement( element );
6681  if ( !queryElement ) {
6682    if ( console ) {
6683      console.error( 'Bad element for ' + this.constructor.namespace +
6684        ': ' + ( queryElement || element ) );
6685    }
6686    return;
6687  }
6688  this.element = queryElement;
6689  // add jQuery
6690  if ( jQuery ) {
6691    this.$element = jQuery( this.element );
6692  }
6693
6694  // options
6695  this.options = utils.extend( {}, this.constructor.defaults );
6696  this.option( options );
6697
6698  // add id for Outlayer.getFromElement
6699  var id = ++GUID;
6700  this.element.outlayerGUID = id; // expando
6701  instances[ id ] = this; // associate via id
6702
6703  // kick it off
6704  this._create();
6705
6706  var isInitLayout = this._getOption('initLayout');
6707  if ( isInitLayout ) {
6708    this.layout();
6709  }
6710}
6711
6712// settings are for internal use only
6713Outlayer.namespace = 'outlayer';
6714Outlayer.Item = Item;
6715
6716// default options
6717Outlayer.defaults = {
6718  containerStyle: {
6719    position: 'relative'
6720  },
6721  initLayout: true,
6722  originLeft: true,
6723  originTop: true,
6724  resize: true,
6725  resizeContainer: true,
6726  // item options
6727  transitionDuration: '0.4s',
6728  hiddenStyle: {
6729    opacity: 0,
6730    transform: 'scale(0.001)'
6731  },
6732  visibleStyle: {
6733    opacity: 1,
6734    transform: 'scale(1)'
6735  }
6736};
6737
6738var proto = Outlayer.prototype;
6739// inherit EvEmitter
6740utils.extend( proto, EvEmitter.prototype );
6741
6742/**
6743 * set options
6744 * @param {Object} opts
6745 */
6746proto.option = function( opts ) {
6747  utils.extend( this.options, opts );
6748};
6749
6750/**
6751 * get backwards compatible option value, check old name
6752 */
6753proto._getOption = function( option ) {
6754  var oldOption = this.constructor.compatOptions[ option ];
6755  return oldOption && this.options[ oldOption ] !== undefined ?
6756    this.options[ oldOption ] : this.options[ option ];
6757};
6758
6759Outlayer.compatOptions = {
6760  // currentName: oldName
6761  initLayout: 'isInitLayout',
6762  horizontal: 'isHorizontal',
6763  layoutInstant: 'isLayoutInstant',
6764  originLeft: 'isOriginLeft',
6765  originTop: 'isOriginTop',
6766  resize: 'isResizeBound',
6767  resizeContainer: 'isResizingContainer'
6768};
6769
6770proto._create = function() {
6771  // get items from children
6772  this.reloadItems();
6773  // elements that affect layout, but are not laid out
6774  this.stamps = [];
6775  this.stamp( this.options.stamp );
6776  // set container style
6777  utils.extend( this.element.style, this.options.containerStyle );
6778
6779  // bind resize method
6780  var canBindResize = this._getOption('resize');
6781  if ( canBindResize ) {
6782    this.bindResize();
6783  }
6784};
6785
6786// goes through all children again and gets bricks in proper order
6787proto.reloadItems = function() {
6788  // collection of item elements
6789  this.items = this._itemize( this.element.children );
6790};
6791
6792
6793/**
6794 * turn elements into Outlayer.Items to be used in layout
6795 * @param {Array or NodeList or HTMLElement} elems
6796 * @returns {Array} items - collection of new Outlayer Items
6797 */
6798proto._itemize = function( elems ) {
6799
6800  var itemElems = this._filterFindItemElements( elems );
6801  var Item = this.constructor.Item;
6802
6803  // create new Outlayer Items for collection
6804  var items = [];
6805  for ( var i=0; i < itemElems.length; i++ ) {
6806    var elem = itemElems[i];
6807    var item = new Item( elem, this );
6808    items.push( item );
6809  }
6810
6811  return items;
6812};
6813
6814/**
6815 * get item elements to be used in layout
6816 * @param {Array or NodeList or HTMLElement} elems
6817 * @returns {Array} items - item elements
6818 */
6819proto._filterFindItemElements = function( elems ) {
6820  return utils.filterFindElements( elems, this.options.itemSelector );
6821};
6822
6823/**
6824 * getter method for getting item elements
6825 * @returns {Array} elems - collection of item elements
6826 */
6827proto.getItemElements = function() {
6828  return this.items.map( function( item ) {
6829    return item.element;
6830  });
6831};
6832
6833// ----- init & layout ----- //
6834
6835/**
6836 * lays out all items
6837 */
6838proto.layout = function() {
6839  this._resetLayout();
6840  this._manageStamps();
6841
6842  // don't animate first layout
6843  var layoutInstant = this._getOption('layoutInstant');
6844  var isInstant = layoutInstant !== undefined ?
6845    layoutInstant : !this._isLayoutInited;
6846  this.layoutItems( this.items, isInstant );
6847
6848  // flag for initalized
6849  this._isLayoutInited = true;
6850};
6851
6852// _init is alias for layout
6853proto._init = proto.layout;
6854
6855/**
6856 * logic before any new layout
6857 */
6858proto._resetLayout = function() {
6859  this.getSize();
6860};
6861
6862
6863proto.getSize = function() {
6864  this.size = getSize( this.element );
6865};
6866
6867/**
6868 * get measurement from option, for columnWidth, rowHeight, gutter
6869 * if option is String -> get element from selector string, & get size of element
6870 * if option is Element -> get size of element
6871 * else use option as a number
6872 *
6873 * @param {String} measurement
6874 * @param {String} size - width or height
6875 * @private
6876 */
6877proto._getMeasurement = function( measurement, size ) {
6878  var option = this.options[ measurement ];
6879  var elem;
6880  if ( !option ) {
6881    // default to 0
6882    this[ measurement ] = 0;
6883  } else {
6884    // use option as an element
6885    if ( typeof option == 'string' ) {
6886      elem = this.element.querySelector( option );
6887    } else if ( option instanceof HTMLElement ) {
6888      elem = option;
6889    }
6890    // use size of element, if element
6891    this[ measurement ] = elem ? getSize( elem )[ size ] : option;
6892  }
6893};
6894
6895/**
6896 * layout a collection of item elements
6897 * @api public
6898 */
6899proto.layoutItems = function( items, isInstant ) {
6900  items = this._getItemsForLayout( items );
6901
6902  this._layoutItems( items, isInstant );
6903
6904  this._postLayout();
6905};
6906
6907/**
6908 * get the items to be laid out
6909 * you may want to skip over some items
6910 * @param {Array} items
6911 * @returns {Array} items
6912 */
6913proto._getItemsForLayout = function( items ) {
6914  return items.filter( function( item ) {
6915    return !item.isIgnored;
6916  });
6917};
6918
6919/**
6920 * layout items
6921 * @param {Array} items
6922 * @param {Boolean} isInstant
6923 */
6924proto._layoutItems = function( items, isInstant ) {
6925  this._emitCompleteOnItems( 'layout', items );
6926
6927  if ( !items || !items.length ) {
6928    // no items, emit event with empty array
6929    return;
6930  }
6931
6932  var queue = [];
6933
6934  items.forEach( function( item ) {
6935    // get x/y object from method
6936    var position = this._getItemLayoutPosition( item );
6937    // enqueue
6938    position.item = item;
6939    position.isInstant = isInstant || item.isLayoutInstant;
6940    queue.push( position );
6941  }, this );
6942
6943  this._processLayoutQueue( queue );
6944};
6945
6946/**
6947 * get item layout position
6948 * @param {Outlayer.Item} item
6949 * @returns {Object} x and y position
6950 */
6951proto._getItemLayoutPosition = function( /* item */ ) {
6952  return {
6953    x: 0,
6954    y: 0
6955  };
6956};
6957
6958/**
6959 * iterate over array and position each item
6960 * Reason being - separating this logic prevents 'layout invalidation'
6961 * thx @paul_irish
6962 * @param {Array} queue
6963 */
6964proto._processLayoutQueue = function( queue ) {
6965  this.updateStagger();
6966  queue.forEach( function( obj, i ) {
6967    this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );
6968  }, this );
6969};
6970
6971// set stagger from option in milliseconds number
6972proto.updateStagger = function() {
6973  var stagger = this.options.stagger;
6974  if ( stagger === null || stagger === undefined ) {
6975    this.stagger = 0;
6976    return;
6977  }
6978  this.stagger = getMilliseconds( stagger );
6979  return this.stagger;
6980};
6981
6982/**
6983 * Sets position of item in DOM
6984 * @param {Outlayer.Item} item
6985 * @param {Number} x - horizontal position
6986 * @param {Number} y - vertical position
6987 * @param {Boolean} isInstant - disables transitions
6988 */
6989proto._positionItem = function( item, x, y, isInstant, i ) {
6990  if ( isInstant ) {
6991    // if not transition, just set CSS
6992    item.goTo( x, y );
6993  } else {
6994    item.stagger( i * this.stagger );
6995    item.moveTo( x, y );
6996  }
6997};
6998
6999/**
7000 * Any logic you want to do after each layout,
7001 * i.e. size the container
7002 */
7003proto._postLayout = function() {
7004  this.resizeContainer();
7005};
7006
7007proto.resizeContainer = function() {
7008  var isResizingContainer = this._getOption('resizeContainer');
7009  if ( !isResizingContainer ) {
7010    return;
7011  }
7012  var size = this._getContainerSize();
7013  if ( size ) {
7014    this._setContainerMeasure( size.width, true );
7015    this._setContainerMeasure( size.height, false );
7016  }
7017};
7018
7019/**
7020 * Sets width or height of container if returned
7021 * @returns {Object} size
7022 *   @param {Number} width
7023 *   @param {Number} height
7024 */
7025proto._getContainerSize = noop;
7026
7027/**
7028 * @param {Number} measure - size of width or height
7029 * @param {Boolean} isWidth
7030 */
7031proto._setContainerMeasure = function( measure, isWidth ) {
7032  if ( measure === undefined ) {
7033    return;
7034  }
7035
7036  var elemSize = this.size;
7037  // add padding and border width if border box
7038  if ( elemSize.isBorderBox ) {
7039    measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
7040      elemSize.borderLeftWidth + elemSize.borderRightWidth :
7041      elemSize.paddingBottom + elemSize.paddingTop +
7042      elemSize.borderTopWidth + elemSize.borderBottomWidth;
7043  }
7044
7045  measure = Math.max( measure, 0 );
7046  this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
7047};
7048
7049/**
7050 * emit eventComplete on a collection of items events
7051 * @param {String} eventName
7052 * @param {Array} items - Outlayer.Items
7053 */
7054proto._emitCompleteOnItems = function( eventName, items ) {
7055  var _this = this;
7056  function onComplete() {
7057    _this.dispatchEvent( eventName + 'Complete', null, [ items ] );
7058  }
7059
7060  var count = items.length;
7061  if ( !items || !count ) {
7062    onComplete();
7063    return;
7064  }
7065
7066  var doneCount = 0;
7067  function tick() {
7068    doneCount++;
7069    if ( doneCount == count ) {
7070      onComplete();
7071    }
7072  }
7073
7074  // bind callback
7075  items.forEach( function( item ) {
7076    item.once( eventName, tick );
7077  });
7078};
7079
7080/**
7081 * emits events via EvEmitter and jQuery events
7082 * @param {String} type - name of event
7083 * @param {Event} event - original event
7084 * @param {Array} args - extra arguments
7085 */
7086proto.dispatchEvent = function( type, event, args ) {
7087  // add original event to arguments
7088  var emitArgs = event ? [ event ].concat( args ) : args;
7089  this.emitEvent( type, emitArgs );
7090
7091  if ( jQuery ) {
7092    // set this.$element
7093    this.$element = this.$element || jQuery( this.element );
7094    if ( event ) {
7095      // create jQuery event
7096      var $event = jQuery.Event( event );
7097      $event.type = type;
7098      this.$element.trigger( $event, args );
7099    } else {
7100      // just trigger with type if no event available
7101      this.$element.trigger( type, args );
7102    }
7103  }
7104};
7105
7106// -------------------------- ignore & stamps -------------------------- //
7107
7108
7109/**
7110 * keep item in collection, but do not lay it out
7111 * ignored items do not get skipped in layout
7112 * @param {Element} elem
7113 */
7114proto.ignore = function( elem ) {
7115  var item = this.getItem( elem );
7116  if ( item ) {
7117    item.isIgnored = true;
7118  }
7119};
7120
7121/**
7122 * return item to layout collection
7123 * @param {Element} elem
7124 */
7125proto.unignore = function( elem ) {
7126  var item = this.getItem( elem );
7127  if ( item ) {
7128    delete item.isIgnored;
7129  }
7130};
7131
7132/**
7133 * adds elements to stamps
7134 * @param {NodeList, Array, Element, or String} elems
7135 */
7136proto.stamp = function( elems ) {
7137  elems = this._find( elems );
7138  if ( !elems ) {
7139    return;
7140  }
7141
7142  this.stamps = this.stamps.concat( elems );
7143  // ignore
7144  elems.forEach( this.ignore, this );
7145};
7146
7147/**
7148 * removes elements to stamps
7149 * @param {NodeList, Array, or Element} elems
7150 */
7151proto.unstamp = function( elems ) {
7152  elems = this._find( elems );
7153  if ( !elems ){
7154    return;
7155  }
7156
7157  elems.forEach( function( elem ) {
7158    // filter out removed stamp elements
7159    utils.removeFrom( this.stamps, elem );
7160    this.unignore( elem );
7161  }, this );
7162};
7163
7164/**
7165 * finds child elements
7166 * @param {NodeList, Array, Element, or String} elems
7167 * @returns {Array} elems
7168 */
7169proto._find = function( elems ) {
7170  if ( !elems ) {
7171    return;
7172  }
7173  // if string, use argument as selector string
7174  if ( typeof elems == 'string' ) {
7175    elems = this.element.querySelectorAll( elems );
7176  }
7177  elems = utils.makeArray( elems );
7178  return elems;
7179};
7180
7181proto._manageStamps = function() {
7182  if ( !this.stamps || !this.stamps.length ) {
7183    return;
7184  }
7185
7186  this._getBoundingRect();
7187
7188  this.stamps.forEach( this._manageStamp, this );
7189};
7190
7191// update boundingLeft / Top
7192proto._getBoundingRect = function() {
7193  // get bounding rect for container element
7194  var boundingRect = this.element.getBoundingClientRect();
7195  var size = this.size;
7196  this._boundingRect = {
7197    left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
7198    top: boundingRect.top + size.paddingTop + size.borderTopWidth,
7199    right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
7200    bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
7201  };
7202};
7203
7204/**
7205 * @param {Element} stamp
7206**/
7207proto._manageStamp = noop;
7208
7209/**
7210 * get x/y position of element relative to container element
7211 * @param {Element} elem
7212 * @returns {Object} offset - has left, top, right, bottom
7213 */
7214proto._getElementOffset = function( elem ) {
7215  var boundingRect = elem.getBoundingClientRect();
7216  var thisRect = this._boundingRect;
7217  var size = getSize( elem );
7218  var offset = {
7219    left: boundingRect.left - thisRect.left - size.marginLeft,
7220    top: boundingRect.top - thisRect.top - size.marginTop,
7221    right: thisRect.right - boundingRect.right - size.marginRight,
7222    bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
7223  };
7224  return offset;
7225};
7226
7227// -------------------------- resize -------------------------- //
7228
7229// enable event handlers for listeners
7230// i.e. resize -> onresize
7231proto.handleEvent = utils.handleEvent;
7232
7233/**
7234 * Bind layout to window resizing
7235 */
7236proto.bindResize = function() {
7237  window.addEventListener( 'resize', this );
7238  this.isResizeBound = true;
7239};
7240
7241/**
7242 * Unbind layout to window resizing
7243 */
7244proto.unbindResize = function() {
7245  window.removeEventListener( 'resize', this );
7246  this.isResizeBound = false;
7247};
7248
7249proto.onresize = function() {
7250  this.resize();
7251};
7252
7253utils.debounceMethod( Outlayer, 'onresize', 100 );
7254
7255proto.resize = function() {
7256  // don't trigger if size did not change
7257  // or if resize was unbound. See #9
7258  if ( !this.isResizeBound || !this.needsResizeLayout() ) {
7259    return;
7260  }
7261
7262  this.layout();
7263};
7264
7265/**
7266 * check if layout is needed post layout
7267 * @returns Boolean
7268 */
7269proto.needsResizeLayout = function() {
7270  var size = getSize( this.element );
7271  // check that this.size and size are there
7272  // IE8 triggers resize on body size change, so they might not be
7273  var hasSizes = this.size && size;
7274  return hasSizes && size.innerWidth !== this.size.innerWidth;
7275};
7276
7277// -------------------------- methods -------------------------- //
7278
7279/**
7280 * add items to Outlayer instance
7281 * @param {Array or NodeList or Element} elems
7282 * @returns {Array} items - Outlayer.Items
7283**/
7284proto.addItems = function( elems ) {
7285  var items = this._itemize( elems );
7286  // add items to collection
7287  if ( items.length ) {
7288    this.items = this.items.concat( items );
7289  }
7290  return items;
7291};
7292
7293/**
7294 * Layout newly-appended item elements
7295 * @param {Array or NodeList or Element} elems
7296 */
7297proto.appended = function( elems ) {
7298  var items = this.addItems( elems );
7299  if ( !items.length ) {
7300    return;
7301  }
7302  // layout and reveal just the new items
7303  this.layoutItems( items, true );
7304  this.reveal( items );
7305};
7306
7307/**
7308 * Layout prepended elements
7309 * @param {Array or NodeList or Element} elems
7310 */
7311proto.prepended = function( elems ) {
7312  var items = this._itemize( elems );
7313  if ( !items.length ) {
7314    return;
7315  }
7316  // add items to beginning of collection
7317  var previousItems = this.items.slice(0);
7318  this.items = items.concat( previousItems );
7319  // start new layout
7320  this._resetLayout();
7321  this._manageStamps();
7322  // layout new stuff without transition
7323  this.layoutItems( items, true );
7324  this.reveal( items );
7325  // layout previous items
7326  this.layoutItems( previousItems );
7327};
7328
7329/**
7330 * reveal a collection of items
7331 * @param {Array of Outlayer.Items} items
7332 */
7333proto.reveal = function( items ) {
7334  this._emitCompleteOnItems( 'reveal', items );
7335  if ( !items || !items.length ) {
7336    return;
7337  }
7338  var stagger = this.updateStagger();
7339  items.forEach( function( item, i ) {
7340    item.stagger( i * stagger );
7341    item.reveal();
7342  });
7343};
7344
7345/**
7346 * hide a collection of items
7347 * @param {Array of Outlayer.Items} items
7348 */
7349proto.hide = function( items ) {
7350  this._emitCompleteOnItems( 'hide', items );
7351  if ( !items || !items.length ) {
7352    return;
7353  }
7354  var stagger = this.updateStagger();
7355  items.forEach( function( item, i ) {
7356    item.stagger( i * stagger );
7357    item.hide();
7358  });
7359};
7360
7361/**
7362 * reveal item elements
7363 * @param {Array}, {Element}, {NodeList} items
7364 */
7365proto.revealItemElements = function( elems ) {
7366  var items = this.getItems( elems );
7367  this.reveal( items );
7368};
7369
7370/**
7371 * hide item elements
7372 * @param {Array}, {Element}, {NodeList} items
7373 */
7374proto.hideItemElements = function( elems ) {
7375  var items = this.getItems( elems );
7376  this.hide( items );
7377};
7378
7379/**
7380 * get Outlayer.Item, given an Element
7381 * @param {Element} elem
7382 * @param {Function} callback
7383 * @returns {Outlayer.Item} item
7384 */
7385proto.getItem = function( elem ) {
7386  // loop through items to get the one that matches
7387  for ( var i=0; i < this.items.length; i++ ) {
7388    var item = this.items[i];
7389    if ( item.element == elem ) {
7390      // return item
7391      return item;
7392    }
7393  }
7394};
7395
7396/**
7397 * get collection of Outlayer.Items, given Elements
7398 * @param {Array} elems
7399 * @returns {Array} items - Outlayer.Items
7400 */
7401proto.getItems = function( elems ) {
7402  elems = utils.makeArray( elems );
7403  var items = [];
7404  elems.forEach( function( elem ) {
7405    var item = this.getItem( elem );
7406    if ( item ) {
7407      items.push( item );
7408    }
7409  }, this );
7410
7411  return items;
7412};
7413
7414/**
7415 * remove element(s) from instance and DOM
7416 * @param {Array or NodeList or Element} elems
7417 */
7418proto.remove = function( elems ) {
7419  var removeItems = this.getItems( elems );
7420
7421  this._emitCompleteOnItems( 'remove', removeItems );
7422
7423  // bail if no items to remove
7424  if ( !removeItems || !removeItems.length ) {
7425    return;
7426  }
7427
vendor: 3,919 bytes, lines 7428-7595
7428  removeItems.forEach( function( item ) {
7429    item.remove();
7430    // remove item from collection
7431    utils.removeFrom( this.items, item );
7432  }, this );
7433};
7434
7435// ----- destroy ----- //
7436
7437// remove and disable Outlayer instance
7438proto.destroy = function() {
7439  // clean up dynamic styles
7440  var style = this.element.style;
7441  style.height = '';
7442  style.position = '';
7443  style.width = '';
7444  // destroy items
7445  this.items.forEach( function( item ) {
7446    item.destroy();
7447  });
7448
7449  this.unbindResize();
7450
7451  var id = this.element.outlayerGUID;
7452  delete instances[ id ]; // remove reference to instance by id
7453  delete this.element.outlayerGUID;
7454  // remove data for jQuery
7455  if ( jQuery ) {
7456    jQuery.removeData( this.element, this.constructor.namespace );
7457  }
7458
7459};
7460
7461// -------------------------- data -------------------------- //
7462
7463/**
7464 * get Outlayer instance from element
7465 * @param {Element} elem
7466 * @returns {Outlayer}
7467 */
7468Outlayer.data = function( elem ) {
7469  elem = utils.getQueryElement( elem );
7470  var id = elem && elem.outlayerGUID;
7471  return id && instances[ id ];
7472};
7473
7474
7475// -------------------------- create Outlayer class -------------------------- //
7476
7477/**
7478 * create a layout class
7479 * @param {String} namespace
7480 */
7481Outlayer.create = function( namespace, options ) {
7482  // sub-class Outlayer
7483  var Layout = subclass( Outlayer );
7484  // apply new options and compatOptions
7485  Layout.defaults = utils.extend( {}, Outlayer.defaults );
7486  utils.extend( Layout.defaults, options );
7487  Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions  );
7488
7489  Layout.namespace = namespace;
7490
7491  Layout.data = Outlayer.data;
7492
7493  // sub-class Item
7494  Layout.Item = subclass( Item );
7495
7496  // -------------------------- declarative -------------------------- //
7497
7498  utils.htmlInit( Layout, namespace );
7499
7500  // -------------------------- jQuery bridge -------------------------- //
7501
7502  // make into jQuery plugin
7503  if ( jQuery && jQuery.bridget ) {
7504    jQuery.bridget( namespace, Layout );
7505  }
7506
7507  return Layout;
7508};
7509
7510function subclass( Parent ) {
7511  function SubClass() {
7512    Parent.apply( this, arguments );
7513  }
7514
7515  SubClass.prototype = Object.create( Parent.prototype );
7516  SubClass.prototype.constructor = SubClass;
7517
7518  return SubClass;
7519}
7520
7521// ----- helpers ----- //
7522
7523// how many milliseconds are in each unit
7524var msUnits = {
7525  ms: 1,
7526  s: 1000
7527};
7528
7529// munge time-like parameter into millisecond number
7530// '0.4s' -> 40
7531function getMilliseconds( time ) {
7532  if ( typeof time == 'number' ) {
7533    return time;
7534  }
7535  var matches = time.match( /(^\d*\.?\d*)(\w*)/ );
7536  var num = matches && matches[1];
7537  var unit = matches && matches[2];
7538  if ( !num.length ) {
7539    return 0;
7540  }
7541  num = parseFloat( num );
7542  var mult = msUnits[ unit ] || 1;
7543  return num * mult;
7544}
7545
7546// ----- fin ----- //
7547
7548// back in global
7549Outlayer.Item = Item;
7550
7551return Outlayer;
7552
7553}));
7554
7555/*!
7556 * Masonry v4.2.2
7557 * Cascading grid layout library
7558 * https://masonry.desandro.com
7559 * MIT License
7560 * by David DeSandro
7561 */
7562
7563( function( window, factory ) {
7564  // universal module definition
7565  /* jshint strict: false */ /*globals define, module, require */
7566  if ( typeof define == 'function' && define.amd ) {
7567    // AMD
7568    define( [
7569        'outlayer/outlayer',
7570        'get-size/get-size'
7571      ],
7572      factory );
7573  } else if ( typeof module == 'object' && module.exports ) {
7574    // CommonJS
7575    module.exports = factory(
7576      require('outlayer'),
7577      require('get-size')
7578    );
7579  } else {
7580    // browser global
7581    window.Masonry = factory(
7582      window.Outlayer,
7583      window.getSize
7584    );
7585  }
7586
7587}( window, function factory( Outlayer, getSize ) {
7588
7589
7590
7591// -------------------------- masonryDefinition -------------------------- //
7592
7593  // create an Outlayer layout class
7594  var Masonry = Outlayer.create('masonry');
7595  // isFitWidth -> fitWidth
vendor: 8,414 bytes, lines 7596-7838
7596  Masonry.compatOptions.fitWidth = 'isFitWidth';
7597
7598  var proto = Masonry.prototype;
7599
7600  proto._resetLayout = function() {
7601    this.getSize();
7602    this._getMeasurement( 'columnWidth', 'outerWidth' );
7603    this._getMeasurement( 'gutter', 'outerWidth' );
7604    this.measureColumns();
7605
7606    // reset column Y
7607    this.colYs = [];
7608    for ( var i=0; i < this.cols; i++ ) {
7609      this.colYs.push( 0 );
7610    }
7611
7612    this.maxY = 0;
7613    this.horizontalColIndex = 0;
7614  };
7615
7616  proto.measureColumns = function() {
7617    this.getContainerWidth();
7618    // if columnWidth is 0, default to outerWidth of first item
7619    if ( !this.columnWidth ) {
7620      var firstItem = this.items[0];
7621      var firstItemElem = firstItem && firstItem.element;
7622      // columnWidth fall back to item of first element
7623      this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
7624        // if first elem has no width, default to size of container
7625        this.containerWidth;
7626    }
7627
7628    var columnWidth = this.columnWidth += this.gutter;
7629
7630    // calculate columns
7631    var containerWidth = this.containerWidth + this.gutter;
7632    var cols = containerWidth / columnWidth;
7633    // fix rounding errors, typically with gutters
7634    var excess = columnWidth - containerWidth % columnWidth;
7635    // if overshoot is less than a pixel, round up, otherwise floor it
7636    var mathMethod = excess && excess < 1 ? 'round' : 'floor';
7637    cols = Math[ mathMethod ]( cols );
7638    this.cols = Math.max( cols, 1 );
7639  };
7640
7641  proto.getContainerWidth = function() {
7642    // container is parent if fit width
7643    var isFitWidth = this._getOption('fitWidth');
7644    var container = isFitWidth ? this.element.parentNode : this.element;
7645    // check that this.size and size are there
7646    // IE8 triggers resize on body size change, so they might not be
7647    var size = getSize( container );
7648    this.containerWidth = size && size.innerWidth;
7649  };
7650
7651  proto._getItemLayoutPosition = function( item ) {
7652    item.getSize();
7653    // how many columns does this brick span
7654    var remainder = item.size.outerWidth % this.columnWidth;
7655    var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
7656    // round if off by 1 pixel, otherwise use ceil
7657    var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
7658    colSpan = Math.min( colSpan, this.cols );
7659    // use horizontal or top column position
7660    var colPosMethod = this.options.horizontalOrder ?
7661      '_getHorizontalColPosition' : '_getTopColPosition';
7662    var colPosition = this[ colPosMethod ]( colSpan, item );
7663    // position the brick
7664    var position = {
7665      x: this.columnWidth * colPosition.col,
7666      y: colPosition.y
7667    };
7668    // apply setHeight to necessary columns
7669    var setHeight = colPosition.y + item.size.outerHeight;
7670    var setMax = colSpan + colPosition.col;
7671    for ( var i = colPosition.col; i < setMax; i++ ) {
7672      this.colYs[i] = setHeight;
7673    }
7674
7675    return position;
7676  };
7677
7678  proto._getTopColPosition = function( colSpan ) {
7679    var colGroup = this._getTopColGroup( colSpan );
7680    // get the minimum Y value from the columns
7681    var minimumY = Math.min.apply( Math, colGroup );
7682
7683    return {
7684      col: colGroup.indexOf( minimumY ),
7685      y: minimumY,
7686    };
7687  };
7688
7689  /**
7690   * @param {Number} colSpan - number of columns the element spans
7691   * @returns {Array} colGroup
7692   */
7693  proto._getTopColGroup = function( colSpan ) {
7694    if ( colSpan < 2 ) {
7695      // if brick spans only one column, use all the column Ys
7696      return this.colYs;
7697    }
7698
7699    var colGroup = [];
7700    // how many different places could this brick fit horizontally
7701    var groupCount = this.cols + 1 - colSpan;
7702    // for each group potential horizontal position
7703    for ( var i = 0; i < groupCount; i++ ) {
7704      colGroup[i] = this._getColGroupY( i, colSpan );
7705    }
7706    return colGroup;
7707  };
7708
7709  proto._getColGroupY = function( col, colSpan ) {
7710    if ( colSpan < 2 ) {
7711      return this.colYs[ col ];
7712    }
7713    // make an array of colY values for that one group
7714    var groupColYs = this.colYs.slice( col, col + colSpan );
7715    // and get the max value of the array
7716    return Math.max.apply( Math, groupColYs );
7717  };
7718
7719  // get column position based on horizontal index. #873
7720  proto._getHorizontalColPosition = function( colSpan, item ) {
7721    var col = this.horizontalColIndex % this.cols;
7722    var isOver = colSpan > 1 && col + colSpan > this.cols;
7723    // shift to next row if item can't fit on current row
7724    col = isOver ? 0 : col;
7725    // don't let zero-size items take up space
7726    var hasSize = item.size.outerWidth && item.size.outerHeight;
7727    this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
7728
7729    return {
7730      col: col,
7731      y: this._getColGroupY( col, colSpan ),
7732    };
7733  };
7734
7735  proto._manageStamp = function( stamp ) {
7736    var stampSize = getSize( stamp );
7737    var offset = this._getElementOffset( stamp );
7738    // get the columns that this stamp affects
7739    var isOriginLeft = this._getOption('originLeft');
7740    var firstX = isOriginLeft ? offset.left : offset.right;
7741    var lastX = firstX + stampSize.outerWidth;
7742    var firstCol = Math.floor( firstX / this.columnWidth );
7743    firstCol = Math.max( 0, firstCol );
7744    var lastCol = Math.floor( lastX / this.columnWidth );
7745    // lastCol should not go over if multiple of columnWidth #425
7746    lastCol -= lastX % this.columnWidth ? 0 : 1;
7747    lastCol = Math.min( this.cols - 1, lastCol );
7748    // set colYs to bottom of the stamp
7749
7750    var isOriginTop = this._getOption('originTop');
7751    var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +
7752      stampSize.outerHeight;
7753    for ( var i = firstCol; i <= lastCol; i++ ) {
7754      this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
7755    }
7756  };
7757
7758  proto._getContainerSize = function() {
7759    this.maxY = Math.max.apply( Math, this.colYs );
7760    var size = {
7761      height: this.maxY
7762    };
7763
7764    if ( this._getOption('fitWidth') ) {
7765      size.width = this._getContainerFitWidth();
7766    }
7767
7768    return size;
7769  };
7770
7771  proto._getContainerFitWidth = function() {
7772    var unusedCols = 0;
7773    // count unused columns
7774    var i = this.cols;
7775    while ( --i ) {
7776      if ( this.colYs[i] !== 0 ) {
7777        break;
7778      }
7779      unusedCols++;
7780    }
7781    // fit container to columns that have been used
7782    return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
7783  };
7784
7785  proto.needsResizeLayout = function() {
7786    var previousWidth = this.containerWidth;
7787    this.getContainerWidth();
7788    return previousWidth != this.containerWidth;
7789  };
7790
7791  return Masonry;
7792
7793}));
7794
7795;
7796/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
7797
7798window.matchMedia || (window.matchMedia = function () {
7799    "use strict";
7800
7801    // For browsers that support matchMedium api such as IE 9 and webkit
7802    var styleMedia = (window.styleMedia || window.media);
7803
7804    // For those that don't support matchMedium
7805    if (!styleMedia) {
7806        var style = document.createElement('style'),
7807            script = document.getElementsByTagName('script')[0],
7808            info = null;
7809
7810        style.type = 'text/css';
7811        style.id = 'matchmediajs-test';
7812
7813        script.parentNode.insertBefore(style, script);
7814
7815        // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
7816        info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
7817
7818        styleMedia = {
7819            matchMedium: function (media) {
7820                var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
7821
7822                // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
7823                if (style.styleSheet) {
7824                    style.styleSheet.cssText = text;
7825                } else {
7826                    style.textContent = text;
7827                }
7828
7829                // Test if media query is true or false
7830                return info.width === '1px';
7831            }
7832        };
7833    }
7834
7835    return function (media) {
7836        return {
7837            matches: styleMedia.matchMedium(media || 'all'),
7838            media: media || 'all'
7839        };
7840    };
7841}());
7842;
7843'use strict';
7844
7845$(function () {
7846    if (!navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) $('.search-results select').selecter();
7847    $('table').wrap("<div class='general-content-table'></div>");
7848});
7849;
7850(function($,sr){
7851 
7852  // debouncing function from John Hann
7853  // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
7854  var debounce = function (func, threshold, execAsap) {
7855      var timeout;
7856 
7857      return function debounced () {
7858          var obj = this, args = arguments;
7859          function delayed () {
7860              if (!execAsap)
7861                  func.apply(obj, args);
7862              timeout = null; 
7863          };
7864 
7865          if (timeout)
7866              clearTimeout(timeout);
7867          else if (execAsap)
7868              func.apply(obj, args);
7869 
7870          timeout = setTimeout(delayed, threshold || 100); 
7871      };
7872  }
7873	// smartresize 
7874	jQuery.fn[sr] = function(fn){  return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
7875 
7876})(jQuery,'smartresize');
7877 
7878 
7879// usage:
7880$(window).smartresize(function(){  
7881  // code that takes it easy...
7882});;
7883'use strict';
7884
7885var parallaxItems = ['.banner-container', '.parallax-container', '.activities-container', '.cta-container-parallax', '.parallax-full-container', '.about-cta-container', '.parallax-right-container', '.parallax-left-container'];
7886
7887function initParallax(key, item) {
7888    $(item).parallax('50%', 0.3);
7889}
7890
7891function checkParallaxViewport() {
7892    if (!window.matchMedia('only screen and (max-width: 64.000em)').matches) {
7893        $.each(parallaxItems, initParallax);
7894    }
7895}
7896
7897$(function () {
7898    checkParallaxViewport();
7899    $(window).smartresize(function () {
7900        checkParallaxViewport();
7901    });
7902});
7903;
7904'use strict';
7905
7906$(function () {
7907    var alerts = $('.alert');
7908
7909    $.each(alerts, function (key, value) {
7910        var alert = $(value);
7911        var alertId = alert.data('node-id');
7912
7913        if (!localStorage.getItem('NRAAlert' + alertId)) alert.closest('.banner-alert').show();
7914    });
7915
7916    $('.banner-alert-close').click(function (ev) {
7917        ev.preventDefault();
7918        ev.stopPropagation();
7919        var bannerAlert = $(this).closest('.banner-alert');
7920        var alertId = bannerAlert.find('.alert').data('node-id');
7921
7922        localStorage.setItem('NRAAlert' + alertId, true);
7923
7924        bannerAlert.hide();
7925
7926        return false;
7927    });
7928});
7929;
7930'use strict';
7931
7932function AriaUpdates() {
7933    var toggle = $('.masthead-panel-toggle');
7934    var target = $('#' + toggle.attr('aria-controls'));
7935    var overlay = $('.mobile-panel-overlay');
7936    var $win = $(window);
7937
7938    var presentationAttributes = { 'tabindex': -1, 'role': 'presentation' };
7939    $('.aspNetHidden').attr(presentationAttributes);
7940    $('#ctxM').attr(presentationAttributes);
7941    $('input[type=hidden]').attr(presentationAttributes);
7942
7943    target.attr('aria-expanded', false);
7944    target.attr('aria-hidden', true);
7945
7946    function toggleMobileMenu() {
7947        toggle.toggleClass('active');
7948        target.attr('aria-expanded', target.attr('aria-expanded') != 'true');
7949        (target.attr('aria-hidden') == 'true') ? target.attr('aria-hidden', 'false') : target.attr('aria-hidden', 'true');
7950        $("html, body").animate({ scrollTop: 0 }, 400, 'swing');
7951        overlay.toggle();
7952    }
7953
7954    toggle.click(function (e) {
7955        toggleMobileMenu();
7956
7957        return false;
7958    }).keydown(function (e) {
7959        if (e.keyCode == 13) {
7960            toggle.toggleClass('active');
7961            target.attr('aria-expanded', true);
7962            target.attr('aria-hidden', false);
7963        }
7964        if (e.keyCode == 27) {
7965            toggle.toggleClass('active');
7966            target.attr('aria-expanded', false);
7967            target.attr('aria-hidden', true);
7968        }
7969
7970        return false;
7971    });
7972
7973    overlay.click(function (e) {
7974        toggleMobileMenu();
7975
7976        return false;
7977    });
7978
7979    function checkScroll() {
7980        var mastheadPanel = $('.masthead-panel');
7981        if ($win.scrollTop() >= 710 && $(mastheadPanel).attr('aria-expanded') == 'true' && $(mastheadPanel).attr('aria-hidden') == 'false') {
7982            $win.off('scroll', checkScroll);
7983            target.attr('aria-expanded', false);
7984            target.attr('aria-hidden', true);
7985            toggle.removeClass('active');
7986            overlay.toggle();
7987        }
7988    }
7989
7990    var barItem = $('.masthead-menu-bar-item[aria-haspopup]');
7991    var barItemLink = $('.masthead-menu-bar-item-link');
7992    var menu = $('.masthead-top-right-menu');
7993    var menuItemLinkLast = $('.masthead-top-nav-sub-item.last');
7994
7995    function showMenu(barItemElem, menuElem) {
7996        barItem.removeClass('active');
7997        barItemElem.attr('aria-expanded', false)
7998        menu.each(function () {
7999            $(this).attr('aria-expanded', false);
8000            $(this).attr('aria-hidden', true);
8001        });
8002
8003        barItemElem.addClass('active');
8004        barItemElem.attr('aria-expanded', 'true');
8005        menuElem.attr('aria-expanded', 'true');
8006        menuElem.attr('aria-hidden', 'false');
8007    }
8008
8009    function hideMenu(barItemElem, menuElem) {
8010        barItemElem.removeClass('active');
8011        barItemElem.attr('aria-expanded', 'false');
8012        menuElem.attr('aria-expanded', 'false');
8013        menuElem.attr('aria-hidden', 'true');
8014    }
8015
8016    barItemLink.focus(function () {
8017        showMenu($(this).parent(), $(this).children('.masthead-top-right-menu'));
8018    });
8019
8020    menuItemLinkLast.blur(function () {
8021        menu.attr('aria-expanded', 'false');
8022        menu.attr('aria-hidden', 'true');
8023        barItem.removeClass('active');
8024        barItemLink.attr('aria-expanded', 'false');
8025    });
8026
8027    barItemLink.hover(function () {
8028        showMenu($(this).parent(), $(this).children('.masthead-top-right-menu'));
8029    }, function () {
8030        hideMenu($(this), $(this).find(menu));
8031    });
8032
8033    barItem.mouseleave(function () {
8034        hideMenu($(this), $(this).find(menu));
8035    });
8036
8037    barItem.keydown(function (e) {
8038        /*if (e.keyCode == 13) {
8039            showMenu($(this).parent(), $(this).children('.masthead-top-right-menu'));
8040        }*/
8041        if (e.keyCode == 27) {
8042            hideMenu($(this), $(this).find(menu));
8043        }
8044    });
8045
8046    return this;
8047}
8048
8049var ariaUpdates;
8050
8051$(function () {
8052    ariaUpdates = new AriaUpdates();
8053});
8054;
8055window.isContactUs = document.location.pathname != null && document.location.pathname.toLowerCase() === '/contact-us';
8056window.genesysDeploymentIds = {
8057    contactUs: '88c6ec62-f34c-446b-84c4-ca4e0ddc236e',
8058    others: 'e3fabbe1-f5d6-47f5-928d-4af938e464cc'
8059}
8060window.genesysDeploymentId = window.isContactUs ? window.genesysDeploymentIds.contactUs : window.genesysDeploymentIds.others;
8061
8062/**
8063 * Genesys Central Site Storage
8064 */
8065var CentralSiteStorageSaver = function () {
8066    var IFRAME_BASE_DOMAIN = "servsafe.com";
8067
8068    var SUBDOMAIN_REGEXES = [
8069        {
8070            regex: /^(?:test[^\.]+|[^\.]+test)\.servsafe\.com$/,
8071            subdomain: "cmstest."
8072        },
8073        {
8074            regex: /^(?:stag[^\.]+|[^\.]+stag|staging[^\.]+|[^\.]+staging|stage[^\.]+|[^\.]+stage)\.servsafe\.com$/,
8075            subdomain: "cmsstaging."
8076        },
8077        {
8078            regex: /.*/,
8079            subdomain: "www."
8080        }
8081    ];
8082
8083    var subdomainMatch = SUBDOMAIN_REGEXES.find(
8084        function (i) {
8085            return i.regex.test(window.location.hostname);
8086        }
8087    ).subdomain;
8088
8089    if (subdomainMatch == null) {
8090        subdomainMatch = "";
8091    }
8092
8093    var IFRAME_URL = "https://" + subdomainMatch + IFRAME_BASE_DOMAIN + "/access/centralsitestorage.html";
8094
8095    var iframeOrigin = (new URL(IFRAME_URL)).origin;
8096
8097    // Setup the iframe element
8098    var iframe = document.createElement("iframe");
8099    iframe.setAttribute("src", IFRAME_URL + "?origin=" + window.location.origin); iframe.setAttribute("frameborder", 0); iframe.setAttribute("width", 0); iframe.setAttribute("height", 0);
8100
8101    var syncGenesysData = function () {
8102        for (var idx = 0; idx < localStorage.length; idx++) {
8103            var lsKey = localStorage.key(idx);
8104
8105            if (lsKey != null && lsKey.startsWith("_" + window.genesysDeploymentId)) {
8106                var lsValue = localStorage.getItem(lsKey);
8107
8108                var genKeyName = lsKey.split(":").slice(1).join(":");
8109                var contactUsKey = "_" + window.genesysDeploymentIds.contactUs + ":" + genKeyName;
8110                var othersKey = "_" + window.genesysDeploymentIds.others + ":" + genKeyName;
8111
8112                if (window.isContactUs) {
8113                    console.log('Updating ls (others):', othersKey, lsValue);
8114                    localStorage.setItem(othersKey, lsValue);
8115                } else {
8116                    console.log('Updating ls (contact us):', contactUsKey, lsValue);
8117                    localStorage.setItem(contactUsKey, lsValue);
8118                }
8119
8120                iframe.contentWindow.postMessage({ id: "genesys", action: "set-data", origin: location.origin, data: { key: contactUsKey, value: lsValue } }, iframeOrigin);
8121                iframe.contentWindow.postMessage({ id: "genesys", action: "set-data", origin: location.origin, data: { key: othersKey, value: lsValue } }, iframeOrigin);
8122            }
8123        }
8124    }
8125
8126    window.addEventListener("message", function (ev) {
8127        if (ev.origin === "https://apps.usw2.pure.cloud") {
8128            // Genesys event
8129
8130            if (ev.data.commandName === "LocalStorage.set") {
8131                //
8132                // Genesys is storing data
8133
8134                // Genesys stores the requested values by the name requested prefixed by an underscore
8135                iframe.contentWindow.postMessage({ id: "genesys", action: "set-data", origin: location.origin, data: { key: "_" + ev.data.data.name, value: '{"value":"' + ev.data.data.value + '","ttl":null}' } }, iframeOrigin);
8136            }
8137
8138            return;
8139        }
8140
8141        if (ev.origin !== iframeOrigin || ev.data == null || ev.data.id == null) {
8142            // Nothing to do with this message. Either it's not for us, or it's malformed.
8143            return;
8144        }
8145
8146        if (ev.data.id === "CentralSiteStorage" && ev.data.event === "Loaded") {
8147            // Event when the CentralSiteStorage iframe has finished loading its javascript, and ready for messages
8148            console.log('Loading central site storage');
8149
8150            Genesys("subscribe", "CobrowseService.ready", function (e) {
8151                Genesys("subscribe", "CobrowseService.sessionStarted", e => {
8152                    syncGenesysData();
8153                });
8154                Genesys("subscribe", "CobrowseService.sessionEnded", e => {
8155                    syncGenesysData();
8156                });
8157                Genesys("subscribe", "CobrowseService.controlGranted", e => {
8158                    syncGenesysData();
8159                });
8160                Genesys("subscribe", "CobrowseService.controlRevoked", e => {
8161                    syncGenesysData();
8162                });
8163                Genesys("subscribe", "CobrowseService.controlRequested", e => {
8164                    Genesys("command", "Messenger.open",
8165                        {},
8166                        function () {
8167                            /*fulfilled callback*/
8168                            console.log('Control Requested: Genesys Messenger opened');
8169                        },
8170                        function () {
8171                            /*rejected callback*/
8172                            console.log("Control Requested: Couldn't open Genesys Messenger.", error);
8173                        }
8174                    );
8175                });
8176                Genesys("subscribe", "CobrowseService.navigationRequested", e => {
8177                    Genesys("command", "Messenger.open",
8178                        {},
8179                        function () {
8180                            /*fulfilled callback*/
8181                            console.log('Control Requested: Genesys Messenger opened');
8182                        },
8183                        function () {
8184                            /*rejected callback*/
8185                            console.log("Control Requested: Couldn't open Genesys Messenger.", error);
8186                        }
8187                    );
8188                });
8189            });
8190
8191            // Synchronize Genesys's User and Session IDs
8192            syncGenesysData();
8193        }
8194
8195        if (ev.data.id === "genesys" && ev.data.event === "set-data") {
8196            // Event from the request to set data
8197            if (!ev.data.success) {
8198                console.log('Saving failed:', ev.data);
8199            }
8200        }
8201    }, false);
8202
8203    document.body.appendChild(iframe);
8204};
8205
8206/**
8207 * Global All pages listener
8208 * Once the chatbot has been engaged using trigger script placed on a specific page, (e.g., Customer Care)
8209 * this script will show the chatbot globally to aid in the screen sharing.
8210 */
8211document.addEventListener("DOMContentLoaded", function () {
8212    (function (g, e, n, es, ys) {
8213        g['_genesysJs'] = e;
8214        g[e] = g[e] || function () {
8215            (g[e].q = g[e].q || []).push(arguments)
8216        };
8217        g[e].t = 1 * new Date();
8218        g[e].c = es;
8219        ys = document.createElement('script');
8220        ys.async = 1;
8221        ys.src = n;
8222        ys.charset = 'utf-8';
8223        document.head.appendChild(ys);
8224    })(window, 'Genesys', 'https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js', {
8225        environment: 'prod-usw2',
8226        deploymentId: window.genesysDeploymentId
8227    });
8228
8229    CentralSiteStorageSaver();
8230
8231    if (!window.isContactUs) {
8232        window.STONLY_WID = 'ca743178-8533-11ec-82f1-064cee365e5a';
8233        !function (s, t, o, n, l, y, w, g) {
8234            s.StonlyWidget || ((w = s.StonlyWidget = function () {
8235                w._api ? w._api.apply(w, arguments) : w.queue.push(arguments)
8236            }).scriptPath = n, w.queue = [], (y = t.createElement(o)).async = !0,
8237                (g = new XMLHttpRequest).open("GET", n + "version?v=" + Date.now(), !0), g.onreadystatechange = function () {
8238                    4 === g.readyState && (y.src = n + "stonly-widget.js?v=" + (200 === g.status ? g.responseText : Date.now()),
8239                        (l = t.getElementsByTagName(o)[0]).parentNode.insertBefore(y, l))
8240                }, g.send())
8241        }(window, document, "script", "https://stonly.com/js/widget/v2/");
8242    }
8243});
8244;
8245'use strict';
8246
8247function faqCheckViewport() {
8248    if (!window.matchMedia('only screen and (max-width: 64.000em)').matches) {
8249        setTimeout(function () {
8250            var maxHeight = -1;
8251            $('.faq-trigger').each(function () {
8252                maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
8253            });
8254            $('.faq-trigger').each(function () {
8255                $(this).height(maxHeight);
8256            });
8257        }, 500);
8258    } else {
8259        $('.faq-trigger').css('height', 'auto');
8260    }
8261}
8262
8263// check users votes and toggle buttons
8264function checkFAQUserVotes() {
8265    var faqCookie = getFAQCookie('faqVotes');
8266    var userFaqVotes = JSON.parse(faqCookie);
8267    var faqs = $('body [data-faq-id]');
8268
8269    if (userFaqVotes) {
8270        faqs.each(function () {
8271            var faq = $(this);
8272            var faqID = faq.data('faq-id');
8273
8274            // in the case that only one vote has been saved we need to put it into an array
8275            // so the grep function will work with it
8276            if (userFaqVotes instanceof Array == false) {
8277                userFaqVotes = [userFaqVotes];
8278            }
8279
8280            var votedFaq = $.grep(userFaqVotes, function (vote) {
8281                return vote.faqID == faqID;
8282            });
8283
8284            if (!$.isEmptyObject(votedFaq)) {
8285                votedFaq[0].helpful == true ? faq.find('[data-js-hook="faq-helpful"]').addClass('active') : faq.find('[data-js-hook="faq-not-helpful"]').addClass('active');
8286            }
8287        });
8288    }
8289}
8290
8291function handleHelpfulVote() {
8292    var helpfulButton = $(this);
8293    helpfulButton.addClass('active');
8294    helpfulButton.siblings('[data-js-hook="faq-not-helpful"]').removeClass('active');
8295
8296    var faqID = helpfulButton.closest("[data-faq-id]").data('faq-id');
8297    if (handleFAQCookies(faqID, true)) {
8298        $.get("/api/PostFaqScore/" + faqID + "/true");
8299    }
8300}
8301
8302function handleNotHelpfulVote() {
8303    var notHelpfulButton = $(this);
8304    notHelpfulButton.addClass('active');
8305    notHelpfulButton.siblings('[data-js-hook="faq-helpful"]').removeClass('active');
8306
8307    var faqID = notHelpfulButton.closest("[data-faq-id]").data('faq-id');
8308    if (handleFAQCookies(faqID, false)) {
8309        $.get("/api/PostFaqScore/" + faqID + "/false");
8310    }
8311}
8312
8313function handleFAQCookies(faqID, helpful) {
8314    var userFaqVotes = JSON.parse(getFAQCookie('faqVotes'));
8315
8316    var vote = {};
8317    vote.faqID = faqID;
8318    vote.helpful = helpful;
8319
8320    if (userFaqVotes) {
8321        var voteFound;
8322        var changingVote = false;
8323
8324        // in the case that only one vote has been saved we need to put it into an array
8325        // so the grep function will work with it
8326        if (userFaqVotes instanceof Array == false) userFaqVotes = [userFaqVotes];
8327
8328        // loops over all votes and find any that matches the current vote
8329        voteFound = $.grep(userFaqVotes, function (vote) {
8330            return vote.faqID == faqID;
8331        });
8332
8333        // check if the vote is changing
8334        if (voteFound.length) {
8335            changingVote = voteFound[0].helpful != helpful;
8336        }
8337
8338        // if no vote was found
8339        if (!voteFound.length && !changingVote) {
8340            userFaqVotes.push(vote);
8341            setFAQCookie('faqVotes', JSON.stringify(userFaqVotes));
8342
8343            return true;
8344        }
8345
8346        // if changing vote
8347        if (voteFound.length && changingVote) {
8348            $.each(userFaqVotes, function (key, vote) {
8349                if (vote.faqID == voteFound[0].faqID) vote.helpful = helpful;
8350                setFAQCookie('faqVotes', JSON.stringify(userFaqVotes));
8351            });
8352
8353            return true;
8354        }
8355
8356        // user already voted
8357        return false;
8358    } else {
8359        setFAQCookie('faqVotes', JSON.stringify(vote));
8360
8361        return true;
8362    }
8363}
8364
8365function setFAQCookie(key, value) {
8366    var expires = new Date();
8367    expires.setTime(expires.getTime() + 60 * 24 * 60 * 60 * 1000);
8368    document.cookie = key + '=' + value + ';path=/;expires=' + expires.toUTCString();
8369}
8370
8371function getFAQCookie(key) {
8372    var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
8373    return keyValue ? keyValue[2] : null;
8374}
8375
8376$(function () {
8377    $('.faq-trigger').click(function (ev) {
8378        ev.preventDefault();
8379        ev.stopPropagation();
8380
8381        var $this = $(this);
8382
8383        var faq = $this.closest('.faq');
8384        var question = faq.children('.faq-question');
8385        var answer = faq.children('.faq-answer');
8386
8387        faq.toggleClass('active');
8388        question.attr('aria-expanded', question.attr('aria-expanded') != 'true');
8389        answer.attr('aria-hidden', answer.attr('aria-hidden') != 'true');
8390
8391        return false;
8392    });
8393
8394    $('.faq-single .faq-question').attr('aria-expanded', true);
8395    $('.faq-single .faq').addClass('active');
8396
8397    $('.faq-container .filter header').click(function (ev) {
8398        ev.preventDefault();
8399        ev.stopPropagation();
8400
8401        $(this).toggleClass('active');
8402        return false;
8403    });
8404
8405    $('[data-js-hook="faq-helpful"]').click(handleHelpfulVote);
8406    $('[data-js-hook="faq-not-helpful"]').click(handleNotHelpfulVote);
8407
8408    $(window).smartresize(function () {
8409        faqCheckViewport();
8410    });
8411
8412    faqCheckViewport();
8413
8414    checkFAQUserVotes();
8415});
8416;
8417function checkMasonryViewport() {
8418    if (window.matchMedia('only screen and (max-width: 51.938em)').matches) {
8419        $('.pod-grid').masonry({
8420            itemSelector: '.pod-grid-item',
8421            initLayout: false,
8422            gutter: 32,
8423            containerStyle: null,
8424            transitionDuration: '.5s',
8425            percentPosition: true,
8426            isFit: false
8427        });
8428    } else {
8429        podMultiple(368, false);
8430    }
8431}
8432
8433function podMultiple(columnSize, isFit) {
8434    $('.pod-grid').masonry({
8435        itemSelector: '.pod-grid-item',
8436        columnWidth: columnSize,
8437        initLayout: false,
8438        gutter: 32,
8439        containerStyle: null,
8440        transitionDuration: '.5s',
8441        isFitWidth: isFit
8442    });
8443    return;
8444}
8445
8446$(function () {
8447    //jQueryBridget('masonry', masonry, $);
8448
8449    // trigger initial layout
8450    $('.pod-grid').masonry();
8451
8452    checkMasonryViewport();
8453
8454    $(window).smartresize(function () {
8455        checkMasonryViewport();
8456    });
8457});
8458;
8459'use strict';
8460
8461function shuffleElements() {
8462    $('.searchBox').appendTo($('.search-module'));
8463}
8464
8465$(function () {
8466    var menu = $('#masthead-panel-menu');
8467    var navMenu = $('.navslide-menu.mobile-menu');
8468    var navMenuOriginalHeight = navMenu.outerHeight();
8469    var buttons = $('.navslide-control');
8470
8471    navMenu.height(navMenuOriginalHeight);
8472
8473    buttons.click(function () {
8474        var $this = $(this);
8475        var clickedItem = $this.closest('.navslide-item');
8476        var nestedNav = clickedItem.find('.nav-nested');
8477
8478        // first check if there are nested items
8479        // if not navigate to the url of the item clicked
8480        if ($this.hasClass('navslide-to')) {
8481            if ($this.next('.nav-nested').find('li').length == 1) {
8482                window.location.href = $this.prev('a').attr('href');
8483                return;
8484            }
8485        }
8486
8487        if (!nestedNav.length) nestedNav = clickedItem.closest('.nav-nested');
8488
8489        nestedNav.toggleClass('active');
8490        var ariaHidden = nestedNav.attr('aria-hidden');
8491        (ariaHidden === "false") ? nestedNav.attr("aria-hidden", "true") : nestedNav.attr("aria-hidden", "false");
8492
8493        if (nestedNav.hasClass('active')) {
8494            navMenu.height(nestedNav.height());
8495            menu.height(nestedNav.outerHeight());
8496        } else {
8497            navMenu.height(navMenuOriginalHeight);
8498            menu.css('height', 'auto');
8499        }
8500    });
8501
8502    $('.mobile-sub-trigger').click(function () {
8503        $(this).toggleClass('active');
8504        ($(this).attr('aria-hidden') == 'false') ? $(this).attr('aria-hidden', 'true') : $(this).attr('aria-hidden', 'false');
8505        return false;
8506    });
8507
8508    shuffleElements();
8509});
8510
8511;
8512'use strict';
8513
8514function newsletterPlaceholder() {
8515    $('.colophon-social-subscribe input:text').each(function (idx, el) { el.placeholder = 'Email Address'; });
8516}
8517$(function () {
8518    newsletterPlaceholder();
8519});
8520;
8521'use strict';
8522
8523var maxHeight = -1;
8524
8525function checkPodViewport(container, size) {
8526    if (container == null) {
8527        return;
8528    }
8529    if (!window.matchMedia('only screen and (max-width: 64.000em)').matches) {
8530        container.each(function () {
8531            size = size > $(this).height() ? size : $(this).height();
8532        });
8533        container.each(function () {
8534            $(this).height(size);
8535        });
8536    } else {
8537        container.css('height', 'auto');
8538    }
8539}
8540
8541function resizePod() {
8542    checkPodViewport($('.multiple-container .pod-description'), maxHeight);
8543    checkPodViewport($('.multiple-container .pod-title'), maxHeight);
8544    checkPodViewport($('.priority-container .pod-description'), maxHeight);
8545    checkPodViewport($('.priority-container .pod-title'), maxHeight);
8546    checkPodViewport($('.multiple-two-container .pod-item'), maxHeight);
8547    checkPodViewport($('.activities-container .pod-description'), maxHeight);
8548    checkPodViewport($('.activities-container .pod-title'), maxHeight);
8549    checkPodViewport($('.parallax-full-container .pod-description'), maxHeight);
8550    checkPodViewport($('.parallax-full-container .pod-title'), maxHeight);
8551    checkPodViewport($('.choice-container .pod-description'), maxHeight);
8552    checkPodViewport($('.portal-container .pod-btn-container'), maxHeight);
8553    checkPodViewport($('.portal-container .pod-description'), maxHeight);
8554    checkPodViewport($('.portal-container .pod-title'), maxHeight);
8555}
8556$(function () {
8557    resizePod();
8558    $(window).smartresize(function () {
8559        resizePod();
8560    });
8561});
8562;
8563'use strict';
8564
8565function setResponsiveImages() {
8566    function getWinSize() {
8567        var e = window,
8568            a = 'inner';
8569
8570        if (!('innerWidth' in window)) {
8571            a = 'client';
8572            e = document.documentElement || document.body;
8573        }
8574        return e[a + 'Width'];
8575    }
8576
8577    function getBreakpoint(winWidth) {
8578        winWidth = winWidth ? winWidth : getWinSize();
8579        var breakpoints = {
8580            desktop: 1024,
8581            tablet: 768,
8582            mobile: 0
8583        };
8584
8585        if (winWidth >= breakpoints.desktop) return 'desktop'; else if (winWidth < breakpoints.desktop && winWidth >= breakpoints.tablet) return 'tablet'; else return 'mobile';
8586    }
8587
8588    function setImage(container, image) {
8589        container.css('background-image', 'url(' + image + ')');
8590    }
8591
8592    var bp = getBreakpoint();
8593
8594    var imageContainers = $('[data-image], [data-image-mobile], [data-image-tablet]');
8595
8596    imageContainers.each(function (key, container) {
8597        container = $(container);
8598        if (bp === 'desktop' && container.data('image') !== undefined) setImage(container, container.data('image')); else if (bp === 'tablet' && container.data('image-tablet') !== undefined) setImage(container, container.data('image-tablet')); else if (bp === 'mobile' && container.data('image-mobile') !== undefined) setImage(container, container.data('image-mobile')); else if (bp === 'tablet' && container.data('image') !== undefined) setImage(container, container.data('image')); else if (bp === 'mobile' && container.data('image-tablet') !== undefined) setImage(container, container.data('image-tablet')); else if (container.data('image') !== undefined) setImage(container, container.data('image'));
8599    });
8600}
8601
8602
8603$(function () {
8604    setResponsiveImages();
8605
8606    $(window).smartresize(function (e) {
8607        setResponsiveImages();
8608    });
8609});;
8610'use strict';
8611
8612var shoppingCartNumber;
8613var shoppingCart = $('.cart-number');
8614
8615function setNumber() {
8616    shoppingCart.text(shoppingCartNumber);
8617}
8618
8619$.get('/access/SS/Catalog/CartIcon').done(function (response) {
8620    shoppingCartNumber = $(response).find('b').text();
8621    setNumber();
8622}).fail(function (response) {
8623    shoppingCartNumber = 0;
8624    setNumber();
8625});
8626;
8627'use strict';
8628
8629function makeItSticky() {
8630    isItSticky = true;
8631    main.css({ marginTop: headerHeight });
8632    header.css({ top: -headerHeight, position: 'fixed' }).animate({ top: 0 });
8633}
8634
8635function makeItSmooth() {
8636    isItSticky = false;
8637    main.css({ marginTop: 0 });
8638    header.css({ top: 0, position: 'relative' });
8639}
8640
8641var win = $(window);
8642var header = $('.masthead');
8643var main = $('#content');
8644var headerHeight = header.outerHeight();
8645var scrollTop = win.scrollTop();
8646var isItSticky = false;
8647
8648win.on('scroll', function (e) {
8649    scrollTop = win.scrollTop();
8650    if (!window.matchMedia('only screen and (max-width: 64.00em)').matches) {
8651        if (scrollTop >= headerHeight * 3 && !isItSticky) makeItSticky();
8652        if (scrollTop == 0 && isItSticky) makeItSmooth();
8653    }
8654});
8655;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.